Project-1: Modelling an electric Car with Li-ion battery
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.
PROJECT REPORT
------DESIGN OF ELECTRICAL CAR-------
Introduction to the project
Timeline of EVs
Electrical vehicles are vehicles which generally move by electrical energy which is generated by electric motors used in it. These electric Vehicles are started by the English inventor “Robert Anderson” in 1830s but they become more practical and developed in 1870s. before his invention "Anyos jedlik" has created small electric car.


Electrical vehicle became trend in automobile industry. These vehicles picked up speed in 2020s even though they been in industry in late 2000s also. Earlier these Electrical vehicles are used as mode of transportation mostly for goods, but today in 21st century these vehicles are most common mode of transportation.

EV industry from 2020
We all know about pandemic happen in that year 2020 and it is named as “covid-19” pandemic. Due to the pandemic the year 2020 is been a very disaster year of each country. Due to Thus pandemic many change have happened in every country and has affected their economic rate as well. As the economy rate has fallen down inversely the imports of goods and fuel are also been gone to sky high in that year.
As the fuel charges reached sky high then inversely the renewable energies come into picture to serve the need. Solar energy is also used utmost. And next is EVs comes into play. These EVs had a chance to replace most of the fuel engine, due to the fuel prices gone high.

Accidents related to EV in after Pandemic
Where there are pros and there must be cons added to it. From 2021 to 2022 there are several cases related to evs stating that these evs are getting fired and catching up fire extremely and even to the 4W vehicles as well. As these vehicles are getting damaged and made the EV market specialist and experts into a big trouble.

2W EVs caught fire while transporting in INDIA

EV showroom caught fire in HYDERABAD, INDIA
These accidents are been viral over internet heavily due to it popularity over the market. There are few reasons and theories which raised to confess this issues happening over the time.
Future of EV
When there is a boon in software industry in earlier 20s then many had questioned the boon and started ignoring it. As of now this EV is in boon and it would continue and lead the path for next 10 to 30 years from now. Because of the cost savings and low maintenance moreover these vehicles are more capable in load and stylish look appearence, it can replace combustion vehicles which causes polution over the world. Due to increase in fuel prices, subsequently the EV rise over the world would also be propotinate.

Abstract of the project
Objective of EVs
Electric vehicles have the capability of essentially decreasing city contamination by having zero tail pipe discharges. Vehicle ozone harming substance investment funds really rely on how the power is created. Electric vehicles are usually fueled by ready battery packs, and as such are battery electric vehicles (BEVs). THese electric vehicles frequently give great speed increase and have maximum velocity, the more unfortunate energy limit of batteries contrasted with that of petroleum products implies that electric vehicles have generally unfortunate reach among charges, and re-energizing can take huge time allotments.
These EVs are the one thing which can easily gone through the middle class man brain in order to manage his/her wallet. The EVs production and management has now good market value in automobile industry. As demand is more then automatically the supply must satisfy the demand in order to sustain in the market. As this evs are designed for low pollution effect and more over the expenditures and maintenance cost of EVs are also less comparatively. The electric Vehicles have motor and battery to generate power and then it is been supplied it to motor to produce power further to run the wheel of the vehicle.
Model of EVs
In Electrical vehicles there are many components involved and been employed in it to serve the best output to the end user. The ev s are mainly developed by the power train which include generation, transmission, drive shaft. These components used in EV s are discussed further. These EVs been developed in 2W, 3W, 4W and other heavy load vehicles like busses, transport busses, etc.

Components used
Motors :
In evs the motor is heart the vehicle when it is compared to fuel engine where the engine is the heart of the mechanical vehicle. These motors are of some types and they are employed to the certain parameters criterion.
Pmdc – permanent magnet DC motor(PMDC) used in variable speed drives
Bldc – Brushless DC motor(BLDC) consumes less power and used in Fans, EVs
Induction motor - Induction motors runs on AC power and perform at higher efficiency
Dc motors – DC motors are the motors which can run on DC supply and can give higher performance.
These are the motors which are employed in Electrical vehicles based on discussed application and criterion.
Battery:
in evs the motor is considered as heart and this battery is considered as fuel for the vehicle to move. This battery supplies the fuel which is Electrical energy to the motor to run the vehicle. These battery are also used according to the criteria and based on different conditions as well.
Li-ion battery – Lithium-ion battery are mostly used battery in battery pack for EVs because of it long lifespan
Ni-Mh – Nickel metal hydride batteries are used in hybrid electric vehicles and have good tolerance and safer
lead acid - these batteries are old rechargeable batteries and they are cheaper comparatively.
Controller :
Thus the controller is the brain of the vehicle. This controller is the main component which is used to control the motor and battery charging and other actions in the vehicle. The acceleration and declaration are also controlled by this controller. The battery soc and dod are are controlled by the controller.
BMS :
It is the doctor of the battery used in the vehicle. Because usually the battery used in evs are heavy capacity and high rated and there are chance to explode if no care taken to it. So the bms is the battery management system which controls each cell used in battery pack and monitor the health of the battery in the battery pack.
Companies of ev manufacturers
Here are the few companies which manutactures 2W, 3W, 4W vehicls in 'INDIA'
Ather - 2W(two-wheeler)
Ola - 2W(two-wheeler)
Revolt - 2W(two-wheeler)
Tvs - 2W(two-wheeler)
Oben - 2W(two-wheeler)
Bajaj - 2W(two-wheeler)
Okinawa - 2W(two-wheeler)
Kinetic green - 3W(three-wheeler)
Piaggio - 3W(three-wheeler)
Mahindra - 3W(three-wheeler), 4W(four-wheeler)
Tata - 4W(four-wheeler)
Kia - 4W(four-wheeler)
Hyundai - 4W(four-wheeler)

--- 2W(two-wheeler) electric vehicles details of battery parameters ---

--- 3W(three-wheeler) electric vehicles details of battery parameters ---

--- 4W(four-wheeler) electric vehicles details of battery parameters ---
Theses are the companies which manufacture the EV in all types of 2W, 3W, 4W and their battery specifications which are used in their vehicles.
Objective of the project
In this project I had design a electric vehicle car which has tyre allignment and other segments as such. The project is whole based on Designing a EV using simulink software. The electric car has designed in such a way that to indicate the theme of the project. The theme and motto of this project is to control the vehicle and satisify the controllability of the EV without any deafult block used in it. So the 'LOngitundal driver' block is the defualt block used in HEV project but here that driver is excluded and created a system to replace it. The subsystem created is made for assigning the acceralation and deceleration comand to control the vehicle speed finally. And all this are hosted by the simulink software of MATLAB version R2021a.
What is simulink?
Simulink is the simulation software which is used to simulate or design any component or equipment using predefined blocks in it. Using Simulink we can design circuits and some other model as well.
Simulink blocks used
Drive cycle:
drive cycle is the block that refers to the vehicle speed in terms of road and other driving conditions while driving a vehicle. In Simulink the drive cycle is default set to FTP drive cycle, but if we want we can set any other drive cycle which is relatable. Generally this drive cycle generates random longitudinal drive cycle, in some cases it is required to employ user-defined drive cycle also it is possible, by clicking add new data which adds new drive cycle data from the external file source.

Drive cycle system configurations:

Hence the FTP drive cycle has a time duration of 2474 seconds so the complier run time must be runned for more than 2474 seconds to observe the full record.
PI controller subsystem:
The PI controller susbystem is made for controlling the speed of the vehicle and it assignes and generates the acceleration and deceleration commands and thus those commands are given to the motor controller subsystem. PI controller takes the refernece speed and feedback speed as input and the PI controller has 1 and 0.2 P and I gains respectively. 
PI controlling system configuration:

Saturation blocks: The saturation blocks are used to assign the upper limit and lower limit of their output respectively. So by using this feature there are two saturation blocks. One of them is used as acceleration command block and other one is used for deceleartion commands where their values are shown below.

Acceleration Saturation block parameters:


Deceleration Saturation block parameters:

Motor controller subsystem:
this is the custom subsystem block which is made to embed all the blocks to a subsystem to control the motor output parameters. This subsystem block represents motor controller which is the “Brain of the EV” . this subsystem block contains controlled voltage source blocks and an H-bridge block to control the motor’s rotation. PWM voltage block which is used as an input parameter to the H-bridge block.

Controlled voltage source block: this is the block which controls the voltage parameters with specific voltage. Here it plays like accelerating and decelerating parameter.

Controlled PWM voltage block: it is just like the PWM voltage source where output voltage is “0” when pulse is low, and here it is used to power the h-bridge block and gives PWM input to the h-bridge block. It has 4 terminals which need the reference voltages. PWM is the output port that is connected to the h-bridge circuit.

H-bridge circuit: here the H-bridge circuit is used as a motor driver where it requires a PWM signal as input. The H-Bridge block output is a controlled voltage that depends on the input signal at the PWM port.

Current sensor:
It is the measuring unit that is used to measure the current value of the circuit where it is connected. It should be connected in series to the circuit to measure the current value.

DC motor block:
The dc motor block is the motor component that is used to convert electrical energy to mechanical energy. This is the main in the design of the EV model. It has four ports which are positive and negative for the motor positive and negative terminals and it has R and C ports which indicates the mechanical translational rotating port and mechanical reference port respectively.

DC motor parameters:

Battery subsystem:
It is a user-defined subsystem that embeds all the battery-related components. It has a battery pack and it measurement display. Here in this subsystem, there is a SOC estimation system that determines the state of charge of the battery’s parameter.
Battery model parameters:

Battery subsystem:

The battery pack which is been used is 'lithium-ion' battery pack where the capacity is set to '70ah' and the battery volatge is set to '300v' output.
Vehicle subsystem:
it is also a user-defined subsystem that embeds all the vehicle related components. In this system we have tyre of front and rear wheel alignment and main block called ‘vehicle body’ which used to move the tyre alignment from the propulsion came from the motor.

Distance travelled unit: This unit system is used to calcuate the distance travelled by the vehicle by using vehicle's motor propulsion and battery pack. THis subsystem is created to differentiate the measurement unit and vehicle alignments. The default calucaltion is done in M/S, to calucate it into KM/H , I had used product block to convert it into KM/H, to mutlipy it with 3.6 to get kmph units.

Tire block:
the tire block represents the tire alignment of the vehicle. It has 4ports which must be refers to mechanical rotating translational unit and normal forces acting on the tire. Where N is the connected to rear wheel thrust or front wheel thrust alignment of the vehicle. S is the slip factor ogf the tire and it can be connected to terminator.

Gear box block:
this block is the gear box which enables the normal rotations to a specific gear ratio and works as same gear box used in cars and bikes. Where it has two ports namely B and F ports , these are used to conversion of gear ratio. B is the input port of the simple gear and F is the output port of the gear and it is connected to vehicle propulsion shaft.

Matlab simulink model for "Design of EV"

Results:
Distance travelled by the vehicle:

Hence the vehicle travelled almost in 64.21 km/h.

Drive cycle and feedback velocity:

Battery SOC (state of charge):

Energy(charge) left in battery is almost 70%
Battery voltage output:

Battery voltage is recorded as appox. 350v as highest volatge
BAttery current output:

Battery current drawn is recorded as 780amps appox as highest current
Battery energy consumption:

Energy consumed is appox 7200 watt-hour
Conclusion:
- Hence we can conclude that our design of EV is completed since the vehicle is moving along with the original drive cycle generated. Since the feedback velocity is closer with the driver block drive cycle. Stop time is 2474 seconds is the most important catch in this model.
- The SOC (state of charge) is going steeper while the vehicle travelling, it indicates that the motor is consuming the batttery energy to move froward. Since the sstop time of vehicle is 2474 seconds, the battery charge is consumed and energy left in battery is almost 70%.
- Battery voltage is recorded as appox. 350v as highest volatge and 290v appox as lowest volatge obtained.
- Battery current drawn is recorded as 780amps appox as highest cuurent rating drawn and 5 to 10 amps is the lowest current drawn from.
- AS we know the energy consumed is obtained with respective also. When the time is running then the energy consumed is also increasing respectively. At the end of the stop time 2474 seconds the energy consumed is appox 7200 watt-hour.
- The longitudnal block is also replaced by the PI controller system as named in the model. This generates commands for acceleration and decleration commands.
- Objective of the project is also classifed above.
- System configurations are also mentioned with respect to the blocks and systems
- The model parameters are attached with respective to the block and their systems