Fev Manual 1
Fev Manual 1
(AUTONOMOUS)
PERUNDURAI, ERODE - 638 060
Name :___________________________
Roll No. :___________________________
Year and Section :___________________________
INDEX
S. MARKS SIGNATURE
NO DATE NAME OF THE EXPERIMENT coe obs vv tot OF THE
30 20 10 60 FACULTY
1.
2.
3.
4.
5.
20EEJ01 - FUNDAMENTALS OF ELECTRIC VEHICLES
LIST OF EXPERIMENTS
AIM
The script file for modelling the acceleration of that vehicle is quite similar to that for the
scooter, and is given below:
MATLAB CODE:
% GMEV1 **********************
% Simulates the WOT test of the GM EV1 electric car.
t=linspace(0,15,151); % 0 to 15 seconds, in 0.1 second steps
v=zeros(1,151); % 151 readings of velocity
dT=0.1; % 0.1 second time step
%In this case there are three phases to the acceleration, as
% explained in the text.
for n=1:150
if v(n)< 19.8
% Equation (8.21)
v(n+1) = v(n) + dT*(3.11 + (0.000137*(v(n)^2)));
elseif v(n) > 35.8
% Controller stops any more speed increase
v(n+1) = v(n);
else
% Equation (8.22)
v(n+1) = v(n) + dT * ((62.1/v(n)) - 0.046 - (0.000137*(v(n)^2)));
end;
end;
v=v.*3.6; %Multiply all v values by 3.6 to
%convert to kph
plot(t,v);
xlabel('Time/seconds');
ylabel('velocity/kph');
title('Full power (WOT) acceleration of GM EV1 electric car');
OUTPUT:
RESULT:
AIM:
When using MATLAB these driving cycles must be set up as one- dimensional arrays which
contain successive values of velocity. There are many ways of doing this, including methods
involving directly reading files. However, the easiest way to do the task is simply to set up a
matrix by cutting and pasting in the data as text into a file, as follows.
Let us imagine a very simple driving cycle involving increasing the speed at 1 m s−1 each
second, up to 3 m s−1, and then slowing down again. This would be set up as a
V=[0
1
2
3
2
1
0];
This would be saved under a name such as SIMPLE.m and would be called from the
simulation program. For real cycles the values would be obtained from a file from the
World Wide Web, and then cut and pasted, making a file like the one above, except that
it would be several hundred lines long. Each line would just have one number. Such
files should be saved under suitable names, and will be called early in the simulation
program as shown in the examples that follow. Some of the most common, including those
discussed in Chapter 8, have been made available as M-files on the web site associated
with this book.1 Because each cycle will have a different number of values, the simulation
program will need to find how many numbers there are, so that it cycles through the correct
number of points. This is done using the MATLAB function length().
Once the velocity values are loaded into an array, care must be taken with the units,
as all simulation work must be carried out in metres per second. Thus, in some of the
programs that follow all the values in the matrix V are divided by 3.6, to convert from
The first three lines of a range simulation will often contain the lines
V=V./3.6;
Not all driving cycles are a simple string of values, but are calculated from a series of values
of accelerations, followed by so many seconds at such a speed, and so on. This sort of cycle
can be created reasonably easily, and an example is given below.
The velocity/time graph produced by this program (or script file) was shown in Figure 8.12.
MATLAB CODE:
% ECE 47 *****************
% electric scooter.
V=zeros(1,111);
for n=1:51
V(n)=vel(((n-1)*10)+1);
end;
%next 15 seconds.
decel=(V(51)-5.56)/15;
for n=52:65
V(n)=V(n-1) - decel;
end
for n=66:101
V(n)=5.56;
end;
decel=5.56/8;
for n=102:108
V(n)=V(n-1)-decel;
end;
V(109)=0;
V(110)=0;
V(111)=0;
OUTPUT:
In order to produce diagrams such as Figure 8.12 plot commands are added at the end
of the file. However, when doing range and other simulations, as outlined in Section 8.4,
these should not be used. In all this work, and the examples that follow, it is important
to note that with MATLAB variables are normally ‘global’. This means that a variable or
RESULT:
AIM:
To simulate the range of a vehicle involves the continuous running of driving cycles or
schedules until there is no more energy left.
The script file below is for the simulation of just one cycle. It is saved under the name one
cycle.m. It is called by the range simulation programs that follow. Broadly, it follows the
method outlined in Section 8.4.2 and the flowchart of Figure 8.14.
This file requires the following:
• An array of velocity values V must have been created, corresponding to the driving
• The value of N must have been found, as also explained in the previous section.
voltage NC, must have been created. These functions have been outlined and
explained in Chapter 3.
• All the variables such as mass, area, Cd, and so on, must have been created by the
MATLAB file that uses this file. Rather than listing them again here, refer to either of
MATLAB CODE:
% ******************************
% ONE CYCLE
% *******************************
for C=2:N
accel=V(C) - V(C-1);
Pte=0;
Torque=0;
if Pte < 0
% of transmission losses.
if Pte>=0
elseif Pte<0
eff mot=(Torque*omega)/((Torque*omega)+((Torque^2)*kc)+
(omega*ki)+((omega^3)*kw)+ConL);
elseif Torque<0
eff mot=(-Torque*omega)/((-Torque*omega) +
((Torque^2)*kc)+(omega*ki)+((omega^3)*kw)+ConL);
end;
if Pmot out>=0
end;
end;
Pbat = Pmot in + Pac; % Equation (8.26)**
if bat type=='NC'
else
end;
I = (E - ((E*E) - (4*Rin*Pbat))^0.5)/(2*Rin);
elseif Pbat==0
I=0;
Pbat = - 1 * Pbat;
end;
if DoD(C)>1
DoD(C) =1;
end
End
RESULT:
Thus, the simulation of range of a vehicle involves the continuous running of driving cycles
is done using MATLAB.
EX.NO: DATE:
AIM:
To verify the range simulation of the GM EV1 Electric Car using MATLAB.
The MATLAB script file for this is shown below. Notice that it calls several of the MATLAB
files we have already described. However, it should be noted how this program sets up, and
often gives values to, the variables used by the program one cycle described in the preceding
section.
MATLAB CODE:
% an array V.
V=V./3.6;
% equation, (8.25)
% connecting leads.
CR end = zeros(1,100);
D end = zeros(1,100);
CY=1;
%Beginning of a cycle.************
% complete cycle.
one cycle;
CR end(CY) = CR(N);
D end(CY) = D(N);
DoD(1)=DoD(N); CR(1)=CR(N);D(1)=D(N);
CY = CY +1;
end;
ylabel('Depth of discharge');
xlabel('Distance traveled**/km');
The plot lines at the end of the program produce a graph such as in Figure 8.15. This
graph has two sets of values. This is achieved by running the program above a second
time, using the MATLAB hold on command. The second running was with much a
higher value (800) for the average accessory power Pac , and a slightly higher value (1.16)
OUTPUT:
RESULT:
Thus, the range simulation of GVM EV1 Electric car is done and verified using MATLAB.
EX.NO: DATE:
AIM:
By way of another example, the MATLAB script file below is for the range modelling of
an electric scooter. The program is very similar, except that almost all the variables are
different, and a different driving cycle is used. This shows how easy it is to change the
MATLAB CODE:
CR end = zeros(1,100);
D end = zeros(1,100);
% corrected, as in Chapter 3.
XDATA=zeros(1,N);
YDATA=zeros(1,N);
CY=1;
%Beginning of a cycle.************
one cycle;
% **********
CR end(CY) = CR(N);
D end(CY) = D(N);
DoD(1)=DoD(N); CR(1)=CR(N);D(1)=D(N);
CY = CY +1;
end;
plot(XDATA,YDATA,'k+');
Notice that the last line plots data collected during one cycle, as explained in Section
8.4.4. Graphs such as Figures 8.16 and 8.17 were produced in this way. If we wish to
find the range to exactly 80% discharged, then the while DD < 0.9; line is changed
to while DD < 0.8;. The following line is added to the end of the program in place
Range = D(N)*0.8/DoD(N)
The lack of a semicolon at the end of the line means that the result of the calculation