Model Based Design and Simulation of a complete Electric Vehicle
Objective:
To model and simulate a complete Electric Vehicle in Matlab/Simulink
Introduction:
The project shows complete model based design of an electric vehicle. In this project, the subsystem such vehicle dynamics, braking system, regeneration system, PID controller, motor, battery etc have been modelled and simulated. The model have been run on USSD driving cycle and the range of vehicle have been calculated and validated. The values used to model the equation have been benchmarked and based upon this, sizing of motor and battery is carried out. The complete modelling and simulation is performed using MATLAB/Simulink 2017a version.
Theory:
a. Vehicle Dynamics:
The vehicle dyanamic is concerned with the movement of vehicle on the road surface. The Dynamic behaviour of the vehicle is determined by the forces imposed on vehicle from road wheels, gravity and aerodynamic drag force.
The vehicle dynamics works on Newton’s 2nd law which states that when a body is in motion, the forces acting on it is equal to it’s mass multiplied by acceleration.
m*a = Ft
In case of vehicle the net tractive force have to overcome a couple of resistive forces such as aerodynamic drag force, rolling reistance force and hill climbing or grade force.
m*a = F_t – F_resist
Aerodynamic drag force depends on two components i.e shape drag and skin friction. It is the function of frontal area, shape and air passage etc of the vehicle.
F_a = ½*rho*af *C_d*v^2
Where ‘af’ is the vehicle’s frontal area, ‘C_d’ is the drag coefficient, ‘rho’ is the density of air and ‘v’ is the velocity at which the vehicle is moving.
Rolling resistance is caused by hysteresis present in wheel loading and unloading, and creates a moment that opposes the rotation of the wheel. However, rolling resistance is simplified and represented as an equivalent force acting at the wheel\'s center, given by the equation:
Frr = m*g*fr*cosθ
where ‘m’ is the mass, ‘g’ is the gravitational force, ‘fr’ is the rolling resistance coefficient, is the road inclination angle
Grade resistance is the component of the vehicle\'s weight acting parallel to the road surface, and is given by:
Fg = m*g*sinθ
The tractive force Ft is calculated from the torque generated from the motor :
Ft = T*g_r/r_w
where ‘T’ is the torque, ‘g_r’ is the gear ratio, ‘r_w’ is the radius of the wheel
The resistive force is given by :
F_resist = Fa + Frr + Fg
Hence acceleration is calculated by:
a = (F_t – Fa – Frr – Fg) / m
Further, the velocity is calculated by integrating the acceleration which is the output of vehicle dynamic.
b. Benchmarking:
Benchmarking is a process of measuring the performance of a company’s products, services, or processes against those of another business considered to be the best in the industry, aka “best in class.” The point of benchmarking is to identify internal opportunities for improvement. By studying companies with superior performance, breaking down what makes such superior performance possible, and then comparing those processes to how your business operates, you can implement changes that will yield significant improvements.
Hence for this case benchmarking is done for complete vehicle. Also benchmarking helps us to specify motor and battery rating.
The benchmarked parameters for vehicle is as follows:
|
Parameters |
Values |
|
Acceleration |
0-60 mph in 6 seconds |
|
Max. Speed |
95 mph |
|
Range per charge |
176 miles |
|
Mass |
1000 kg |
|
Parameters |
Motor |
Battery |
|
Max.Torque |
355 Nm |
- |
|
Max. Power |
166 Kw |
- |
|
Max. Voltage |
- |
420 volts |
|
Max. Current |
- |
625 amps |
|
Battery Capacity |
- |
200 Ah |
c. Motor model:
DC motor model is used in the vehicle.The motor model does not include power loss due to friction and other rotational losses of hysteresis, eddy current, and windage. The model also does not include the time lag due to energy storage in the rotor inertia. The motor model is based on the following equations.
Developed Torque is proportional to armature current:
T = Km*I
Back emf voltage is directly proportional to motor angular speed.
V_emf = /Km
Motor armature input or terminal voltage is equal to the sum of developed voltage plus resistance and inductance voltage drops. In addition, the motor High Side voltage and current are directly connected to, and therefore identical to, the motor controller High Side voltage and current.
Vin = I*R + L*di(t)/dt + V_emf
where’I’ is the current, ‘R’ is the resistance, ‘L’ is the inductance,’ V_emf’ is the back emf voltage and is the angular velocity
The velocity which is the output from vehicle dynamics is converted into angular speed
ω = v*g_r/r_w
where v is the velocity at wheels.
Torque and angular speed is the input to the DC motor model.
d. Motor controller:
The motor controller is assumed to be an ideal controller with no power loss and no time lag. The controller simply raises the battery voltage to meet the higher voltage needs of the motor. The dimensionless constant gain or K ratio of the input and output voltages is determined in order to meet the motor’s needs. The same K ratio is used to adjust the current so that input and output power values are equal.
High side voltage is equal to K times the low side voltage:
VH = K*VL
High side current is equal to 1/K times the low side voltage:
IH = (1/K)*VL
e. Battery:
The battery is modeled as a voltage source with an internal resistance. The model accounts for internal power loss in the resistance of the battery. There is no time lag component in the model. The battery is assumed to have a constant internal voltage, EB . The battery terminal voltage,VB , is equal to the sum of the internal voltage and resistance voltage drop. The battery voltage and battery current are equal to the controller low side voltage and current.
VB (Volt) = IA(Amp) * RA(Ohm) + EB(Volt).
VL (Volt) = IL(Amp) *RA(Ohm) + EB(Volt).
Assuming: VB = VL and IA = IL
The battery model uses the current and voltage information from the Motor Controller to calculate the required battery’s internal voltage. This voltage is compared with the actual EB value to create a battery voltage error, B_err, and that error is used by the PI controller model to adjust the loop gain.
Error Voltage Calculation:
B_err = EB (actual) - EB (calculated)
f. Battery Controller:
The PI controller accepts the B_err signal from the Battery Model and uses proportional (Kp) and integral (Ki) to calculate the gain K value that is used by the Motor Controller. A saturation block is provided so that the controlled values should be in between 10 and -10.
K = ( Kp + s*KI)*B_err
g. Drive Cycle:
A driving cycle is a series of data points representing the speed of a vehicle versus time. Driving cycles are produced by different countries and organizations to assess the performance of vehicles in various ways, as for example fuel consumption and polluting emissions.
In this case the Urban Dynamometer Driving Schedule (UDDS) cycle is used and it will run in the loop till the State of Charge(SOC) of the battery is 5 percent. The output of the driving cycle is the velocity with respective time
h. Driver Controller:
The velocity from the driving cycle is substracted from the velocity of the vehicle dynamics and the error is obtained which is to be control so that the input and output velocity should exactly match.
The error is sent as an input to PID controller where the tuning is done. PID tuning is the process of finding the values of proportional, integral, and derivative gains of a PID controller to achieve desired performance and meet design requirements.
The positive output is the throttle applied or the acceleration and negative output is the brake applied, for this purpose ‘Saturation Block’ is used.
i. Acceleration, Braking and Regeneration:
The acceleration signal is neutralized and multiplied by minimum torque value to get the demanded torque. The braking signal is neutralized and multiplied by maximum braking force and 60 percent of this force is directed towards and substracted from net tractive force. Note that the braking force is negative. 40 percent of the braking signal when multiplied by maximum braking force is used for regeneration.
To convert regeneration force to regeneration torque, the formula used is :
T_regen = F_regen*tyre_radius/G_r
This regeneration torque is substracted from the demaded torque and the net demanded torque is given as a input to motor.
j. Battery SOC calculation:
In this model, the current calculated from the motor model is actually the current demanded by the motor from the battery to run which is assumed that it is given by the battery.
This current is used to calculate State Of Charge (SOC) of the battery. To calculate the SOC, this current is first integrated which gives current in Ampere second and then this current is divided by 3600 to get current in Ampere hour. The calculated Ampere hour(Ah) is divided by actual current capacity of the battery which is 200 Ah, then the output is substracted by 1 and multiplied by 100 to get the SOC in percentage.The simulation should stop when the battery SOC is about 5 percent. For this purpose ‘Stop Simulation’ block is used.
Complete Electrical Model:
Important Plots:
Driving Cycle(Targeted and Simulated):
Below figure shows the behavior of velocity of our electric vehicle which exactly matches the Driving Cycle(UDDC cycle). We can conclude that the bevavior of vehicle is good.
Conclusion:
The subsystems of a typical electric vehicle were modelled in Simulink. The modelling procedures were outlined with first principles and engineering justifications. A combination of physics-based and data-based models were used to keep the complexity and obfuscation of the model at a minimum. The subsystems modelled include DC motor, regenerative braking, battery, vehicle dynamics, and driver systems.
The advantage of a concise and transparent toolset lies in its ease of adaptability to almost any scenario, and its low learning overhead allows students and professionals alike to modify even its core components to fit an application. Tools like this can be used to quickly and cheaply validate vehicle designs, including “think-outside-the-box” or radical designs.
First-pass component sizing and system-level optimization studies can also be performed without the need for expensive laboratory experiments. The forward-looking nature of this toolset also allows future users to perform control system optimization studies as well as hardware-in-the-loop (HIL) Simulation.
Appendix:
clear all
close all
clc
% EV modelling
% McDonald
tyre_radius=(15*0.0254+(2*0.155*0.6))/2; %155/60R15 Tires
m_eq=1000;
G_r=5;
m=1050; % by considering inertia %KG
Crr0=0.011;
Cd=0.2;
Af=1.5;
%constants
g=9.81;
rho=1.2;
% Grade
Fg = m_eq *g * sind(0);
% Air resistance
%Fae = 0.5 * Cd * rho * Af * v^2; %v = velocity
% Rolling Resistance
Fr = Crr0 * m_eq * g ;
max_tor = 350;
%braking force
Fb = (42.5^2/(2*120))*m
load(\'CYC_US06.mat\')
load(\'UDDC_Drive_Cycle.mat\');
UDDC = xyz;
UDDC_loop = UDDC
for n =1:1:1000
UDDC_loop = [UDDC_loop; UDDC(:,1)+1370*n, UDDC(:,2)];
end