Final Project: Design of an Electric Vehicle
Aim:
Create a MATLAB model of electric car which uses a battery and a DC motor. Choose suitable blocks from Powertrain block set.
Objectives:
- To make a most simple and low run-time vehicle model using individual component blocks.
- To examine performance parameters like SOC, current and speed.
- To simulate the model to find the distance travelled for given drive cycle and time.
- To observe the actual drive cycle compared to the reference drive cycle.
- To know MATLAB model and their configuration to match with actual vehicle.
What is EV?

An electric vehicle (EV) is a vehicle that uses one or more electric motors for propulsion. The negative environmental effects of the transportation system based on petroleum and the concern over peak oil have rekindled interest in an electric transportation system. The electricity used by EVs can be produced from a variety of sources, including fossil fuels, nuclear power, renewable energy sources like solar and wind power, or any combination of those. This makes EVs different from fossil fuel-powered vehicles. Depending on the fuel and technology used to produce the energy, different electric vehicles have different carbon footprints and other pollutants. A battery, flywheel, or supercapacitors could be used to store the electricity inside the car. Typically, only one or a few sources, typically non-renewable fossil fuels, provide the energy for internal combustion engine vehicles. A key advantage of electric vehicles is regenerative braking, which recovers kinetic energy, typically lost during friction braking as heat, as electricity restored to the on-board battery.
Block Diagram for an EV:

Main components of an EV:
- Tire
- Vehicle Body
- Motor
- Motor Controller
- Power Converter
- Battery
- Transmission System
The electric power required to run the EV's many systems and requirements is stored in batteries. Power converters transform the battery's energy into a form that the motor can use. This conversion may be made from DC to AC or vice versa. The motor is used to propel the vehicle forward or backward while it is moving. The car can produce electricity while braking and send it back to the battery to charge it (regenrative braking). The vehicle's ability to alter speeds as it accelerates and decelerates depends on the transmission system. Tires provide traction for acceleration and braking and limits the transmission of road vibrations to the automobile body.
System Details:
Tires-
Represents the longitudinal behavior of a highway tire characterized by the tire Magic Formula. The block is built from Tire-Road Interaction (Magic Formula) and Simscape Foundation Library Wheel and Axle blocks. Optionally, the effects of tire inertia, stiffness, and damping can be included.

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. Connections V, NF, and NR are physical signal output ports for vehicle velocity and front and rear normal wheel forces, respectively. Connections W and beta are physical signal input ports corresponding to headwind speed and road inclination angle, respectively. 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.

DC Motor(Brushed Type)-
The block assumes that no electromagnetic energy is lost, and hence the back-emf and torque constants have the same numerical value when in SI units. Motor parameters can either be specified directly, or derived from no-load speed and stall torque. If no information is available on armature inductance, this parameter can be set to some small non-zero value.
When a positive current flows from the electrical + to - ports, a positive torque acts from the mechanical C to R ports. Motor torque direction can be changed by altering the sign of the back-emf or torque constants.

H-Bridge-
This block represents an H-bridge motor drive. The block can be driven by the Controlled PWM Voltage block in PWM or Averaged mode. In PWM mode, the motor is powered if the PWM port voltage is above the Enable threshold voltage. In Averaged mode, the PWM port voltage divided by the PWM signal amplitude parameter defines the ratio of the on-time to the PWM period. Using this ratio and assumptions about the load, the block applies an average voltage to the load that achieves the correct average load current.
For this model, Averaged mode is selected.

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.
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.
Battery-

Controlled PWM Voltage-

Drive Cycle Source-

Longitudinal Driver-

System Model:

Vehicle body model-

Result Plots:
- Current
The current varies between +1500A to -200A. It varies according to the motor direction. When the vehicle is accelerating, current is positive and during regenerative braking, current goes negative.

- SOC
The following represents the battery SOC. SOC drops as the vehicle accelerates and the battery SOC can be restored during regenerative braking. For the given model, the SOC dropped from 100% to approximately 72% for the travel distance of 5.9 km.

- Velocity
The speed of the vehicle is compared reference drive cycle. Reference drive cycle taken is FTP75 and is indicated by blue colour. The vehicle speed is indicated by yellow colour. Further, errors can be minimised and the speed can be matched to the reference speed by tuning PI controller.

- Distance Travelled:
The distance travelled by the vehicle whose rated load is 120 kW and other simulated parameters is 5.944km.

Conclusion:
- A simple and low run-time vehicle model using individual component blocks is designed.
- The distance travelled by the vehicle is calculated ,i.e., 5.944 km.
- The SOC, current in the vehicle battery is observed.
- The design for an electric vehicle is modelled. Further, the controlling part can be optimised with improved and better control system operation.
- The travel distance of the vehicle can be increased by increasing the motor rated load,battery capacity and depending on the forces acting on the vehicle.