0% found this document useful (0 votes)
5 views5 pages

Ev Assign

Uploaded by

2021ucs0103
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Ev Assign

Uploaded by

2021ucs0103
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

HarshitaAli

Mohmad Kanwar (2021UCS0098)


(2021ucs0103)

EV-Assignment-02

1. Torque, Power VS Speed


close all; clear all; clc;

Prrated = 85000; %rated rotor power in W

Trrated = 270; %rated rotor torque in Nm

r = 0.203; %wheel radius

ng = 3.61; %gear ratio

vmax = 150; %vehicle max speed at full power in km/h

wrrated = Prrated/Trrated; %angular speed at rated condition

wrmax = ng*vmax/(3.6*r); %rotor speed at maximum vehicle speed

N = 1000; %number of steps

wr = linspace(1,wrmax,N); %array of values for wr

speed = r*3.6/ng*wr; %vehicle speed array in km/h

T = zeros(1,N); %initialize torque array

P = zeros(1,N); %initialize power array

v = zeros(1,N); %initialize speed array

for n = 1:N %Looping N times

if wr(n) < wrrated %Less than rated speed

T(n) = Trrated; %torque array equation (2.28)

P(n) = Trrated*wr(n); %power array equation (2.28)

v(n) = wr(n)/ng*r;

elseif (wr(n) >= wrrated) %More than base speed

T(n) = Prrated/wr(n); %torque array equation (2.30)

P(n) = Prrated; %power array equation (2.30)


end

end

[hAx,hline1,hline2] = plotyy(speed,T,speed,P/1000);

set(hline1,'color','black','linewidth',3)

set(hline2,'color','black','linewidth',3)

set(hAx,{'ycolor'},{'black';'black'})

xlabel('Speed (km/h)');

ylabel(hAx(1),'Rotor Torque (Nm)');

ylabel(hAx(2),'Rotor Power (kW)');

ylim([0 300]);

grid on

ha = findobj(gcf,'type','axes');

set(ha(1),'ytick',linspace(0,200,10));

set(hAx(1),'YLim',[0 360])

set(hAx(1),'YTick',[0:40:360])

set(hAx(2),'YLim',[0 90])

set(hAx(2),'YTick',[0:10:90])

[hAx,hline1,hline2] = plotyy(speed,T,speed,P/1000);

%title(oFull power acceleration of 2016 Volkswagon eGolf and Power vs. Speed');

set(hline1,'color','black','linewidth',3)

set(hline2,'color','black','linewidth',3)

set(hAx,{'ycolor'},{'black';'black'})

xlabel('Speed (km/h)');

ylabel(hAx(1),'Rotor Torque (Nm)');

ylabel(hAx(2),'Rotor Power (kW)');

%legend(’Torque’,’Power’,’Location’,’northwest’);

ylim([0 300]);
grid on

ha = findobj(gcf,'type','axes');

set(ha(1),'ytick',linspace(0,200,10));

set(hAx(1),'YLim',[0 360])

set(hAx(1),'YTick',[0:40:360])

set(hAx(2),'YLim',[0 90])

set(hAx(2),'YTick',[0:10:90])

%set(hline1,’linestyle’,’--’,’color’,’black’,’linewidth’,3)

2.Speed Vs Time
Prrated = 85000; % max rotor power in W

Trrated = 270; % max rotor torque in Nm

r = 0.203; % wheel radius

ng = 3.19; % gear ratio


m = 1538; % vehicle mass in kg

A = 184.428; % coastdown parameter A

B = 7.9461; % coastdown parameter B

C = .0194; % coastdown parameter C

Effg = 0.97; % gear efficiency

J = 3; % axle-reference MOI

wrrated = Prrated / Trrated; % motor base angular speed in rad/s

vrated = wrrated * r / ng; % vehicle speed in m/s

N = 100; % number of steps

tend = 12; % end time of 12 s

dT = tend / N; % time step

t = linspace(0, tend, N); % time variable from 0 to tend in steps=N;

v = zeros(1, N); % initialize speed array at zero.

Tr = zeros(1, N); % initialize torque array at zero.

wr = zeros(1, N); % initialize angular array speed

Pr = zeros(1, N); % initialize rotor power array at zero.

for n = 1:N-1 % looping N-1 times

wr(n) = v(n) * ng / r; % rotor speed

if v(n) < vrated % less than rated speed

Tr(n) = Trrated; % rotor torque array

else % greater than rated speed

Tr(n) = Prrated / wr(n); % rotor torque array

end

v(n+1) = v(n) + dT * (ng * Effg * Tr(n) - r * (A + B * v(n) + C * (v(n))^2)) / (r * m + J / r); % speed equation (2.34)

Pr(n) = Tr(n) * wr(n); % rotor power array

end

plot(t, v);
xlabel('Time (s)');

ylabel('Speed (m/s)');

title('Vehicle Speed over Time');

hold on;

vkmph = v * 3.6;

plot(t, vkmph);

ylabel('Speed (km/h)');

legend('Speed (m/s)', 'Speed (km/h)');

You might also like