Project-1: Modelling an electric Car with Li-ion battery
Aim:- Create a MATLAB model of electric car which uses lithium ion battery and suitable motor. Choose suitable blocks from Simscape or Powertrain block set. Implement the vehicle speed control using PI controller and generate brake and accelerator commands. Avoid using readymade driver block for speed control.
Prepare a report about your model including following:
Objectives, System level configurations, Model parameters, Results, Conclusion.
(Note- The simulink model file should be compulsorily attached)
Electric Vehicle:-
An electric vehicle (EV) is a vehicle that uses one or more electric motors for propulsion. It can be powered by a collector system, with electricity from extravehicular sources, or it can be powered autonomously by a battery (sometimes charged by solar panels, or by converting fuel to electricity using fuel cells or a generator). EVs include, but are not limited to, road and rail vehicles, surface and underwater vessels, electric aircraft and electric spacecraft.
Electric vehicles have low running costs as they have less moving parts for maintaining and also very environmentally friendly as they use little or no fossil fuels (petrol or diesel). While some EVs used lead acid or nickel metal hydride batteries, the standard for modern battery electric vehicles is now considered to be lithium ion batteries as they have a greater longevity and are excellent at retaining energy, with a self discharge rate of just 5% per month. Despite this improved efficiency, there are still challenges with these batteries as they can experience thermal runaway, which have, for example, caused fires or explosions in the Tesla model S, although efforts have been made to improve the safety of these batteries.
The Main Componants Of the Electric Vehicles Are Following:-
- Traction battery pack
- DC-DC Converter
- Electric motor
- Power inverter
- Charge Port
- Onboard charger
- Controller
- Thermal system (cooling)
- Transmission.
Objectives To create the Electric Vehicle In matlab.
- To Make the Most Simple And Low run Time vehicle model using individual componant model.
- To check the out performance:speed,SOC,current etc with Drive cycle.
- To understand The motor power,vehicle body,(Rolling Resistance,Air Drag, Weight)inputs.
- To know Matlab Models and their configuration to matcyh with actual vehicle.
Main Subsystem of the Electric-vehicle.
For modelling the whole vehicle in SIMULINK. we need to model the above emntioned components separately and make them work together.
All the main components are available in the library of SIMULINK blocks.
so we add components and configure the parameters to fit the the working requirements of the model.
In This We Implement the Five SubSystems.
- Vehicle.
- Motor.
- Controller.
- Battery.
- Drive Block.
- Drive Cycle.
1.Sub-system Of the Vehicle.
In This Subsystem Consist Of Following Componants Or Parts:-
1. Tire:-
- H is noting but HUB.
- A is nothing but the axel.
- N is the normal force.
- S stands for slip.
- We selected The Four Tire For Four Wheeler we consider Left of the tire as a rear tire and N Port of the tire conected to NR port of the vehicle body.
- And we consider Right of the tire as a front tire and N Port of the tire conected to NF port of the vehicle body.
- H port of the Tire is conected to the H port of the vehicle body.
- Left of the Axel Port (A) is going to the motor.
Parameters Of The Block.
2. Vehicle Body :-
- Represents a two-axle vehicle body in longitudinal motion. The block accounts for body mass, aerodynamic drag, road incline, and weight distribution between axles due to acceleration and road profile.
- The vehicle can have the same or a different number of wheels on each axle. Optionally include pitch and suspension dynamics or additional variable mass and inertia.
- The vehicle does not move vertically relative to the ground.
Connection H is the mechanical translational conserving port associated with the horizontal motion of the vehicle body. The resulting traction motion developed by tires should be connected to this port. - Connections V, NF, and NR are physical signal output ports for vehicle velocity and front and rear normal wheel forces, respectively. Wheel forces are considered positive if acting downwards.
- Connections W and beta are physical signal input ports corresponding to headwind speed and road inclination angle, respectively.
- If variable mass is modeled, the physical signal input ports CG and M are exposed. CG accepts a two- element vector representing the x and y distance offsets from vehicle CG to additional load mass CG.
- M represents the additional mass. If both variable mass and pitch dynamics are included, the physical signal port J accepts the inertia of the additional mass about its own CG.
Parameters Of The Block.
3. Gear System.
- Represents a fixed-ratio gear or gear box. No inertia or compliance is modeled in this block. You can optionally include gear meshing, backlash, and viscous bearing losses.
- Connections B (base) and F (follower) are mechanical rotational conserving ports. Specify the relation between base and follower rotation directions with the Output shaft rotates parameter.
- Optionally include thermal effects and expose thermal conserving port H by setting Friction model to a temperature-dependent setting.
Parameters Of The Block.
2. Sub-system Of the Motor.
In This Subsystem Consist Of Following Componants Or Parts:-
1. DC Motor:-
- For EV model we selected the DC motor block Which Is Brush Type DC Motor And implementation is simle compare to others and its have few parameters.
- In This motor Block two sides which is Right one is mechanical side and Left is electrical side.
- In mechanical side has a two ports C And R. C is the nothing but the casing and it is standstill And R is nothing But the Rotor Which is produced the toque.
- In electrical side Two Ports Which Possitive and anather is Negative for voltage is applied. the possitive port is going to the possitive side of the H-bridge through the current sensor block and negative is connected to the Negative side of the H-Bridge.
- Mechanical side R port is connected to the gear in the vehicle body block And C port is connected to the Rotational Reference Block because the its stationary.
Parameters Of The Block.
2. Current Sensor :-
- This device that converts current measured in any electrical branch into a physical signal proportional to the current.
- In this Two Port + and - are conserving electrical ports through which the sensor is inserted into the circuit. Connection I is a physical signal port that outputs current value
3. Mechanical Rotational Refrance :-
This block represents a mechanical rotational reference point, that is, a frame or a ground. Use it to connect mechanical rotational ports that are rigidly affixed to the frame (ground).
3. Sub-system Of the Controller.
In This Subsystem Consist Of Following Componants Or Parts:-
- This is a power converter which is needed to provide power of the correct form and magnitude from one component to other.
- In case of EV,s a power converter is needed to provide a DC voltage from the battery of the EV to the DC motor, so that it can fuction properly at the required parameters.
- Here i have used an H-bridge motor drive as my power converter.
- The left side is for controlling the voltage signalsand the right side terminals to provide the controlled voltage to the DC motor the left side ports are:
- PWM- Pulse width modulation
- REF- Reference
- REV- Reverse
- BRL- Brake
Parameters Of The Block.
2. Controlled PWM Voltage Block.
- This block creates a Pulse-Width Modulated (PWM) voltage across the PWM and REF ports.
- The output voltage is zero when the pulse is low, and is equal to the Output voltage amplitude parameter when high.
- Duty cycle is set by the input value.
- At time zero, the pulse is initialized as high unless the duty cycle is set to zero or the Pulse delay time is greater than zero.
- The Simulation mode can be set to PWM or Averaged. In PWM mode, the output is a PWM signal. In Averaged mode, the output is constant with value equal to the averaged PWM signal.
Parameters Of The Block.
3. Controlled Voltage Source.
- The block represents an ideal voltage source that is powerful enough to maintain the specified voltage at its output regardless of the current passing through it.
- The output voltage is V = Vs, where Vs is the numerical value presented at the physical signal port.
4. Solver Configuration.
Defines solver settings to use for simulation.
Parameters Of This Block is set as defult .
5. Electrical reference.
Electrical reference port. A model must contain at least one electrical reference port (electrical ground).
4. Sub-system Of the Battery.
In This Subsystem Consist Of Following Componants Or Parts:-
1. Battery.
- We Select the Lithium-Ion battery type.
- Norminal Voltage is 60 V for our condition.
Parameters Of The Block.
2. Controlled Current Source.
Converts the Simulink input signal into an equivalent current source. The generated current is driven by the input signal of the block.
You can initialize your circuit with a specific AC or DC current. If you want to start the simulation in steady-state, the block input must be connected to a signal starting as a sinusoidal or DC waveform corresponding to the initial values.
3.Bus Selector.
This block accepts a bus as input which can be created from a Bus Creator, Bus Selector or a block that defines its output using a bus object. The left listbox shows the elements in the input bus. Use the Select button to select the output elements. The right listbox shows the selections. Use the Up, Down, or Remove button to reorder the selections. Check 'Output as virtual bus' to output a single bus.
4. Integrator.
This Block Is used to Continuous-time integration of the input signal.
5. Product.
This Block Is Used To Multiply or divide inputs.
5. Drive Block.
In This Subsystem Consist Of Following Componants Or Parts:-
1. PID Controller.
This block implements continuous- and discrete-time PID control algorithms and includes advanced features such as anti-windup, external reset, and signal tracking. You can tune the PID gains automatically using the 'Tune...' button (requires Simulink Control Design)
Parameters Of The Block.
2. Saturation.
This Block Is used To Limit input signal to the upper and lower saturation values.
3. Transfer FCN.
The numerator coefficient can be a vector or matrix expression. The denominator coefficient must be a vector. The output width equals the number of rows in the numerator coefficient. You should specify the coefficients in descending order of powers of s.
Parameters Of The Block.
4.Sum Block.
This Block Is Used For Add or subtract inputs.
5. ABs Block.
This Block Is Used For Difining The Value Of Y.
6. Drive cycle.
We Select The FTP75 Drive Cycle
A drive cycle is a data set that contains velocity and time data for the purpose of modelling the motion of a vehicle. It is a plot of the vehicle velocity against the time and it is made to resembl typicall driving conditions that a consumer may experience themselves in. Drive cycles are used by various testing procedures such as mileage, pollution tests, and acceleration and top speed tests.There are three ways of implementing a drive cycle. One method is to create your own drive cycle with spreedsheet or excelsheet. Another method isuse a signal builder and create siganls according to the user and the method that we used is to implement industry standard drive cycles which are previosly used to test parameters of the vehicle.
Parameters Of The Block.
We Run the above drive cycle for We implimentd EV model and Take the outputs. The distance travelled by the vehicle in the drive cycle is also measured using the display block. Before simulation the run time was updated according to the drive cycle time 2474secs.
Scope Outputs As following.
- State Of charge (SOC).
- Energy.
- Voltage.
- Current.
- Distance
- Speed.
1. State Of charge (SOC).
2. Energy.
3.Voltage.
4.Current.
5.Distance.
6.Speed.
From Above Results
- The SOC scope shows how the state of the battery varies over the drive cycle time, The batter was modelled to begin with an SOC pf 1 that is 100%. As the simulation starts the charge of the bettery gets decreased and when the vehicle is in braking mode the uplift in the grapf shows that regenerative braking is working to maintain the battery charge.The SOC Value Is 99.2577
- From the above image the display block measured the distance which is 4.988kms in 2474sec.
CONCLUSIONS:
A matlab model of EV can be created using lithium-ion battery with a suitable motor, using suitable blocks from simscape or power train block sets. We can implement the vehicle speed control using PI controller, generative brake and accelerator commands. The PID gains can be designed based on system parameters and estimated precisely.