All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Aim: To Create a MATLAB model of an electric car in which we uses which uses lithium ion battery and suitable motor choosing a suitable blocks from the Powertrain block set and Implement the Vehicle Speed by using PI Controller and generate the accelerator and brake commands. Objectives: …
Praveen Kumar E S
updated on 27 Jan 2022
Aim:
To Create a MATLAB model of an electric car in which we uses which uses lithium ion battery and suitable motor choosing a suitable blocks from the Powertrain block set and Implement the Vehicle Speed by using PI Controller and generate the accelerator and brake commands.
Objectives:
To prepare the technical report about the EV model including
Theory:
An electric car is powered by the electric motor instead of a petrol engine. The electric motor gets energy from the controller, which regulates the amount of powerbased on the driver’s use of an accelerator pedal. The electric car (also known as electric vehicle or EV) uses the energy stored in its rechargeable batteries, which it recharged by common household electricity.
Thus an electric vehicle will have three basic components :
The energy storage unit will have a way to store power. The controller acts as a pipeline or gateway to the electric motor. The controller acts like brains of the system.The electric motor, which is the propulsion system, converts the electric power and converts this into physical energy for movement. The whole system is a much simpler, more efficient device than the combustion engine found in most cars, enabling you to get the most mileage for your charge.
Electric Vehicle Components
Basic Main Components of Electrical Vehicle:
The basic main elements of electric cars installed in almost all types of electric cars are as follows:
Traction Battery Pack:
Power Inverter:
Controller:
Electrical Traction Motor:
Other Electric Car Components:
Charger
This is a battery charging device. Chargers get electricity from outside sources. AC electricity is converted into DC electricity and then stored in the battery.
There are 2 types of electric car chargers:
Transmission :
The transmission transfers mechanical power from the electric traction motor to drive the wheels.
DC/DC Converter:
This one of electric car parts that to converts higher-voltage DC power from the traction battery pack to the lower-voltage DC power needed to run vehicle accessories and recharge the auxiliary battery.
Battery :
In an electric drive vehicle, the auxiliary battery provides electricity to power vehicle accessories.
Thermal System – Cooling :
This system maintains a proper operating temperature range of the engine, electric motor, power electronics, and other components.
Charge Port :
The charge port allows the vehicle to connect to an external power supply in order to charge the traction battery pack.
Procedure:
Vehicle Body Subsystem:
The Vehicle is assumed to be the front axle driven( 4 wheels and in 2 on each axle)
Tire
The wheels are modelled using simple Tire( Magical formula) simulink blocks.
The connection S represent the output port for the slip of the tire.
Velocity Body:
This 2 axle (4 wheel) assembly is now connected to a velocity Body simscape block.
This block basically represent a two-axle vehicle body in longitudinal motion.The block accounts for
Here the connection H is the mechanical translational conserving port NF and Nr are said to be a normal reaction forces on the front axle and the rear wheels respectively.Connection V represent the actual output translational velocity of the vehicle.
The geometric paramerters of the vehicle is given as
To be account for proper drag force on the vehicle, the related parameters are kept as
The pitch dynamics for the vehicle are not considered for this simulation
Differential:
Simple Gear
The input for this subsystem is taken as the Rotational speed of the motor.
And here the rotational direction of the output shaft is kept as the same as the input shaft. Also, no meshing losses are considered for the simulation.
Inertia:
A concrete block which serves as a base for mechanical equipment such as fans or pumps; the block is mounted on a resilient support to reduce the transmission of vibration to the EV structure.
The complete subsystem is shown below
DC Motor:
All the other parameters are changed as shoen in below.
We consider the Inertia and the Friction and also the Temperature Sensor.
Motor Controller:
H-Bridge circuit:
The H-Bridge block represents an H-bridge motor driver. The block has the following two Simulation mode options:
PWM
— The H-Bridge block output is a controlled voltage that depends on the input signal at the PWM port. If the input signal has a value greater than the Enable threshold voltage parameter value, the H-Bridge block output is on and has a value equal to the value of the Output voltage amplitude parameter. If it has a value less than the Enable threshold voltage parameter value, the block maintains the load circuit using one of the following three Freewheeling mode options:
Via one semiconductor switch and one freewheeling diode
Via two freewheeling diodes
Via two semiconductor switches and one freewheeling diode
The first and third options are sometimes referred to as synchronous operation.
The signal at the REV port determines the polarity of the output. If the value of the signal at the REV port is less than the value of the Reverse threshold voltage parameter, the output has positive polarity; otherwise, it has negative polarity.
Averaged
— This mode has two Load current characteristics options:
Smoothed
Unsmoothed or discontinuous
The block can be driven by the controlled PWM Voltage block in PWM or Averaged mode.
The Input Threshold Parameters are left with their default values.
Output Voltage Amplitude of the H-Bridge circuit is given the same value as the rated DC supply Voltage of the DC motor.
Controlled PWM Voltage block
Simulink provides an inbuilt Controlled PWM Voltage block. This block is used for providing the proper pulse input to the block
The Controlled PWM Voltage block represents a pulse-width modulated (PWM) voltage source.
Electrical input ports — The block calculates the duty cycle based on the reference voltage across its ref+ and ref- ports. This modeling variant is the default.
PS input — Specify the duty cycle value directly by using an input physical signal port.
The PWM and REF connection are for the corresponding ports on the H-Bridge Circuit.The two reference inputs corresponds to the throttle inputs given by the driver.The block generates corresponding pulse width as per the acceleration and brakes applied by the driver himself.Here the PWM frquency is 4000Hz. Also the simulation mode is Averaged as that in the H-Bridge circuit.
The input Scaling Parameters given are
The H-Bridge circuit along with the PWM input, together form the motor controller circuit.
PID Controller Subsystem:
The Discrete PID Controller block implements a PID controller (PID, PI, PD, P only, or I only). The block is identical to PID Controller block with the Time domain parameter set to Discrete-time
.
The block output is a weighted sum of the input signal, the integral of the input signal, and the derivative of the input signal. The weights are the proportional, integral, and derivative gain parameters. A first-order pole filters the derivative action.
The block supports several controller types and structures. Configurable options in the block include:
Controller type (PID, PI, PD, P only, or I only)
Controller form (Parallel or Ideal)
Time domain (continuous or discrete)
Initial conditions and reset trigger
Output saturation limits and built-in anti-windup mechanism
Signal tracking for bumpless control transfer and multiloop control
The Sum blocks subtract feedback Velocity from the reference Velocity.This output is given to the PID Controller.
The parameters of the PID Controller block is shown in below diagram.
The output from the sum block is given to this block based on the PID, the output is generated.
The Saturation block produces an output signal that is the value of the input signal bounded to the upper and lower saturation values. The upper and lower limits are specified by the parameters Upper limit and Lower limit.
Input | Output |
---|---|
Lower limit ≤ Input value ≤ Upper limit | Input value |
Input value < Lower limit | Lower limit |
Input value > Upper limit | Upper limit |
In the Saturation there is two types they are
Acceleration:
Deceleration:
This blocks helps to limit the output signal from the PID controller and the separate deceleration and the acceleration values.
The output from these block is sent to a transfer function then these are provided to the motor Controller block.
Battery:
A lithium-ion (Li-ion) battery is an advanced battery technology that uses lithium ions as a key component of its electrochemistry. During a discharge cycle, lithium atoms in the anode are ionized and separated from their electrons. The lithium ions move from the anode and pass through the electrolyte until they reach the cathode, where they recombine with their electrons and electrically neutralize. The lithium ions are small enough to be able to move through a micro-permeable separator between the anode and cathode. In part because of lithium’s small size (third only to hydrogen and helium), Li-ion batteries are capable of having a very high voltage and charge storage per unit mass and unit volume.
The Datasheet Battery block implements a lithium-ion, lithium-polymer, or lead-acid battery that you can parameterize using manufacturer data. To create the open-circuit voltage and internal resistance parameters that you need for the block, use the manufacturer discharge characteristics by temperature data the battery output voltage, the block uses lookup tables for the battery open-circuit voltage and the internal resistance. The lookup tables are functions of the state-of charge (SOC) and battery temperature, characterizing the battery performance at various operating points:
To calculate the voltage, the block implements these equations.
Positive current indicates battery discharge. Negative current indicates battery charge.
Complete model of the Lithium ion battery by Implement a model for a lithium ion model by the Datasheet.
Temperature Sensor block:
The Temperature Sensor block represents an ideal temperature sensor, that is, a device that determines the temperature differential measured between two points without drawing any heat.
Connections A and B are thermal conserving ports that connect to the two points where temperature is being monitored. Port T is a physical signal port that outputs the temperature differential value.
The block positive direction is from port A to port B. The measured temperature is determined as T = TA – TB.
The block has the following ports:
B -
Thermal conserving port associated with the sensor negative probe.T -
Physical signal output port for temperature
Reference Velocity(Drive Cycle):
Here, the selected drive cycle is the standard FTP75.
The plot of the drive cycle is shown below
Signal Builder:
Multiport Switch:
Multiport Switch block determines which of several inputs to the block passes to the output. The block bases this decision on the value of the first input. The first input is the control input and the remaining inputs are the data inputs. The value of the control input determines which data input passes to the output.
Complete Reference Model:
Simulink Model:
System Level Configuration:
MATLAB Model of Electric Car which uses Li-ion Battery and a Suitable Motor
Case:
1)Run the model on FTP75 drive cycle and get the result.
2)Run the model on WOT and get the result.
Result:
From this drive cycle the Vehicle can able to cover the distance of 17.69
Battery Current ,SOC and the Battery Capacity:
Motor Temperature, Controller Temperature and the Motor Speed:
WOT:
The Drive Cycle Source block generates a standard or user-specified longitudinal drive cycle. The block output is the specified vehicle longitudinal speed, which you can use to:
Predict the engine torque and fuel consumption that a vehicle requires to achieve desired speed and acceleration for a given gear shift reference.
Produce realistic velocity and shift references for closed loop acceleration and braking commands for vehicle control and plant models.
Study, tune, and optimize vehicle control, system performance, and system robustness over multiple drive cycles.
The above WOT drive cycle source block with the reference WOT with Velocity of the Vehicle.
Battery Current ,SOC and the Battery Capacity:
Motor Temperature, Controller Temperature and the Motor Speed:
Conclusion:
We Create a MATLAB model of an electric car which uses lithium ion battery with suitable motor and by using suitable blocks from the Simscape or Powertrain Block set , We Implement the vehicle speed control using PI Controller and generate a brake and accelerator commands, we have seen the System level Configuration, Model Parameters and the model run as per our reference input give with less error in it due to PID Controller.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Control Logic of Washing Machine and Gear Shift .
Aim: To Implement control logic of a 'Washing Machine' Using Stateflow as per given Sequence. Make a Simulink chart for the 'Gear Shift' logic as per given conditions. Objective: In Simulink, Implement the Control logic of a Washing Machine using StateFlow as per given input conditions.…
10 Feb 2022 11:26 AM IST
Week 2 Challenge
Question 1:Compare four different types of fuel cells and state their applications. An electrical current is produced via redox reactions occurring on the electrodes of the fuel cell. The most common fuel cell is the hydrogen fuel cell. On the anode, hydrogen molecules, which are fed to the anode from an external supply,…
06 Feb 2022 04:59 PM IST
Project-1: Modelling an electric Car with Li-ion battery
Aim: To Create a MATLAB model of an electric car in which we uses which uses lithium ion battery and suitable motor choosing a suitable blocks from the Powertrain block set and Implement the Vehicle Speed by using PI Controller and generate the accelerator and brake commands. Objectives: …
27 Jan 2022 06:44 AM IST
Final Project: Electric Rickshaw modelling
1.Create a detailed MATLAB model of an electric rickshaw (three wheel passenger vehicle) as per details below: Rear wheels driven by PM brushed type motor Assume efficiency points of motor controller and motor Make an excel sheet of all input and assumed data Results: For any three standard driving cycles show…
27 Jan 2022 05:01 AM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.