Project-1: Modelling an electric Car with Li-ion battery
AIM;
Modelling an electric Car with Li-ion battery using MATLAB.
Objective;
Create a MATLAB model of electric car which uses lithium ion battery and suitable motor.
Implement the vehicle speed control using PI controller and generate brake and accelerator commands.
We will start the model with drive cycle data, here my drive cycle is Highway Fuel Economy Test(HWFET)
speed and time data imported to the signal builder block.

The regerence signal os passed into the sum block, then the PI controller is connected with the block.
the signal coming out of the PI controller are then connected to satuartion blocks, here we have to set upper and lower limit. these two signals act as the acceleration and brake commands for my electric vehicle.

Motor and controller

Saturation blocks emitts the signals and sent to controlled voltage sources. it used to keep the voltage of the signals constant regardless of the current flowing through the circuit.
PWM voltage

The frequency is kept high at 5000hz. the mode of simulaton is kept as averaged so as to speed up the simulation time.
Now the controlled PWM voltage connected to H-bridge block

Enable the averaged simulation mode here and also enable regenerative braking. h-bridge controller is used to change the polarity of the voltage applied at the DC motor so as to run the vehicle in forward and reverse direction as per the acceleration and brake commands.
This is end of controller circuit. In MATLAB an electrical circuit must have atleast one electrical reference block and solver configuration block connected. connect them anywhere in the controller circuit.
Motor that we are going to select for this model is PMDC motor.

Battery

Battery will be the energy store of EV and it will contain the electrical energy in DC form and provide the energy to operate.

Here we can extract the output from battery like current, voltage and SOC. they can be extracted by using a bus selector.
Vehicle body
It consist of vehicle body, tyres and transmission system.
Vehicle body block based on mass, frontal area, drag coefficient, grade angle and wind velocity and this main body of out vehicle.

Reference speed vs Actual speed.

SOC, Current, Voltage.

Distance:
Vehicle covers 16.42kms for this drive cycle.

Conclusion:
Thus we have created a MATLAB model of an EV, without using inbuilt driver block for speed control.