-
Notifications
You must be signed in to change notification settings - Fork 1
/
Power_Analysis_of_Electric_Bus.m
330 lines (271 loc) · 10.8 KB
/
Power_Analysis_of_Electric_Bus.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
%% Power Analysis of Electric Bus
% *Authors:* Tanmay Samak and Chinmay Samak
%%
%
% <<Free_Body_Diagram.PNG>>
%
%
%%
% Physical Parameters
mass_bus = 16.2E3; % mass of bus (kg)
mass_person = 75; % average mass of each person (kg)
slope_deg = 30; % slope of the hill (deg)
slope = deg2rad(slope_deg); % slope of the hill (rad)
driver_count = 1; % driver count (#)
u = 0.4; % coeff. of friction
r = 0.45; % wheel radius (m)
s = 50; % speed of the bus (km/h)
v = s * (1000/3600); % speed of the bus (m/s)
% Motor Parameters
p = 4; % no. of poles (#)
Ra = 20E3; % armature resistance (ohm)
Ia = 5; % armature current (A)
%% Case 1: No Passengers
passenger_count = 0; % passenger count (#)
% Analysis
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r; % torque
W = v/r; % angular velocity
P = T * W; % power
V = P/Ia; % terminal voltage
Eb = V - (Ia * Ra); % back emf
Is = V/Ra; % starting current
Ir = (V - Eb)/Ra; % rated current
Tr = T; % rated torque
k = Tr/Ia; % motor constant (k = p*phi*z/2*pi*A)
Ts = k * Is; % starting torque
if Is < 6 * Ir
result = 'Starting current is within safe limits.';
else
result = 'Starting current is NOT within safe limits.';
end
fprintf('-------------------------\nCase 1: No Passengers\n-------------------------\nPower = %.2f W\nStarting Current = %.2f A\nStarting Torque = %.2f N-m\nRated Current = %.2f A\nRated Torque = %.2f N-m\n%s\n', P, Is, Ts, Ir, Tr, result);
% Variable Weather Condtitions
u_array = [0.2 0.3 0.4 0.5 0.6 0.7 0.8]; % array of various coeff. of friction for different weather conditions
P_array = zeros(1,7); % empty array for power
for i=1:7
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u_array(i) * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r; % torque
W = v/r; % angular velocity
P_array(i) = T * W; % power
end
figure('Name','Weather - Power Relation for Case 1','NumberTitle','off');
plot(u_array,P_array,'o -');
title('Weather - Power Relation for Case 1');
xlabel('Coeff. of Friction');
ylabel('Power (W)');
% Variable Wheel Radius
r_array = [0.35 0.4 0.45 0.5]; % array of various wheel radii (m)
P_array = zeros(1,4); % empty array for power
for i=1:4
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r_array(i); % torque
W = v/r_array(i); % angular velocity
P_array(i) = T * W; % power
end
figure('Name','Wheel Radius - Power Relation for Case 1','NumberTitle','off');
plot(r_array,P_array,'o -');
title('Wheel Radius - Power Relation for Case 1');
xlabel('Wheel Radius (m)');
ylabel('Power (W)');
% Variable Vehicle Speed
s_array = [30 40 50 60]; % array of various vehicle speeds (km/h)
v_array = s_array * (1000/3600); % array of various vehicle speeds (m/s)
P_array = zeros(1,4); % empty array for power
for i=1:4
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r; % torque
W = v_array(i)/r; % angular velocity
P_array(i) = T * W; % power
end
figure('Name','Vehicle Speed - Power Relation for Case 1','NumberTitle','off');
plot(s_array,P_array,'o -');
title('Vehicle Speed - Power Relation for Case 1');
xlabel('Vehicle Speed (km/h)');
ylabel('Power (W)');
%% Case 2: Half Passengers
passenger_count = 25; % passenger count (#)
% Analysis
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r; % torque
W = v/r; % angular velocity
P = T * W; % power
V = P/Ia; % terminal voltage
Eb = V - (Ia * Ra); % back emf
Is = V/Ra; % starting current
Ir = (V - Eb)/Ra; % rated current
Tr = T; % rated torque
k = Tr/Ia; % motor constant (k = p*phi*z/2*pi*A)
Ts = k * Is; % starting torque
if Is < 6 * Ir
result = 'Starting current is within safe limits.';
else
result = 'Starting current is NOT within safe limits.';
end
fprintf('-------------------------\nCase 2: Half Passengers\n-------------------------\nPower = %.2f W\nStarting Current = %.2f A\nStarting Torque = %.2f N-m\nRated Current = %.2f A\nRated Torque = %.2f N-m\n%s\n', P, Is, Ts, Ir, Tr, result);
% Variable Weather Condtitions
u_array = [0.2 0.3 0.4 0.5 0.6 0.7 0.8]; % array of various coeff. of friction for different weather conditions
P_array = zeros(1,7); % empty array for power
for i=1:7
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u_array(i) * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r; % torque
W = v/r; % angular velocity
P_array(i) = T * W; % power
end
figure('Name','Weather - Power Relation for Case 2','NumberTitle','off');
plot(u_array,P_array,'o -');
title('Weather - Power Relation for Case 2');
xlabel('Coeff. of Friction');
ylabel('Power (W)');
% Variable Wheel Radius
r_array = [0.35 0.4 0.45 0.5]; % array of various wheel radii (m)
P_array = zeros(1,4); % empty array for power
for i=1:4
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r_array(i); % torque
W = v/r_array(i); % angular velocity
P_array(i) = T * W; % power
end
figure('Name','Wheel Radius - Power Relation for Case 2','NumberTitle','off');
plot(r_array,P_array,'o -');
title('Wheel Radius - Power Relation for Case 2');
xlabel('Wheel Radius (m)');
ylabel('Power (W)');
% Variable Vehicle Speed
s_array = [30 40 50 60]; % array of various vehicle speeds (km/h)
v_array = s_array * (1000/3600); % array of various vehicle speeds (m/s)
P_array = zeros(1,4); % empty array for power
for i=1:4
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r; % torque
W = v_array(i)/r; % angular velocity
P_array(i) = T * W; % power
end
figure('Name','Vehicle Speed - Power Relation for Case 2','NumberTitle','off');
plot(s_array,P_array,'o -');
title('Vehicle Speed - Power Relation for Case 2');
xlabel('Vehicle Speed (km/h)');
ylabel('Power (W)');
%% Case 3: All Passengers
passenger_count = 50; % passenger count (#)
% Analysis
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r; % torque
W = v/r; % angular velocity
P = T * W; % power
V = P/Ia; % terminal voltage
Eb = V - (Ia * Ra); % back emf
Is = V/Ra; % starting current
Ir = (V - Eb)/Ra; % rated current
Tr = T; % rated torque
k = Tr/Ia; % motor constant (k = p*phi*z/2*pi*A)
Ts = k * Is; % starting torque
if Is < 6 * Ir
result = 'Starting current is within safe limits.';
else
result = 'Starting current is NOT within safe limits.';
end
fprintf('-------------------------\nCase 3: All Passengers\n-------------------------\nPower = %.2f W\nStarting Current = %.2f A\nStarting Torque = %.2f N-m\nRated Current = %.2f A\nRated Torque = %.2f N-m\n%s\n', P, Is, Ts, Ir, Tr, result);
% Variable Weather Condtitions
u_array = [0.2 0.3 0.4 0.5 0.6 0.7 0.8]; % array of various coeff. of friction for different weather conditions
P_array = zeros(1,7); % empty array for power
for i=1:7
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u_array(i) * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r; % torque
W = v/r; % angular velocity
P_array(i) = T * W; % power
end
figure('Name','Weather - Power Relation for Case 3','NumberTitle','off');
plot(u_array,P_array,'o -');
title('Weather - Power Relation for Case 3');
xlabel('Coeff. of Friction');
ylabel('Power (W)');
% Variable Wheel Radius
r_array = [0.35 0.4 0.45 0.5]; % array of various wheel radii (m)
P_array = zeros(1,4); % empty array for power
for i=1:4
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r_array(i); % torque
W = v/r_array(i); % angular velocity
P_array(i) = T * W; % power
end
figure('Name','Wheel Radius - Power Relation for Case 3','NumberTitle','off');
plot(r_array,P_array,'o -');
title('Wheel Radius - Power Relation for Case 3');
xlabel('Wheel Radius (m)');
ylabel('Power (W)');
% Variable Vehicle Speed
s_array = [30 40 50 60]; % array of various vehicle speeds (km/h)
v_array = s_array * (1000/3600); % array of various vehicle speeds (m/s)
P_array = zeros(1,4); % empty array for power
for i=1:4
m = mass_bus + ((passenger_count + driver_count) * (mass_person)); % total mass (kg)
Fg = m * 9.81; % gravitational force
Fn = Fg * cos(slope); % normal force
Fl = Fg * sin(slope); % load force
Ff = u * Fn; % frictional force
Fm = Ff + Fl; % motor force
T = Fm * r; % torque
W = v_array(i)/r; % angular velocity
P_array(i) = T * W; % power
end
figure('Name','Vehicle Speed - Power Relation for Case 3','NumberTitle','off');
plot(s_array,P_array,'o -');
title('Vehicle Speed - Power Relation for Case 3');
xlabel('Vehicle Speed (km/h)');
ylabel('Power (W)');