All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
AIM: Create a Simulink model of an electric car that uses a battery and a DC motor. OBJECTIVES: To create a Simulink model of an electric car with the necessary components and connections and visualize the discharge characteristics of the battery and view the difference between the vehicle speed…
Kashyap Sarda
updated on 10 May 2021
AIM: Create a Simulink model of an electric car that uses a battery and a DC motor.
OBJECTIVES: To create a Simulink model of an electric car with the necessary components and connections and visualize the discharge characteristics of the battery and view the difference between the vehicle speed output and the drive cycle input.
EV MODEL System-Level Configurations:
Drive Cycle Source and Driver Block:
A drive cycle was generated using the Drive Cycle Source block and FTP75(for city drive cycle) was selected as the type of drive cycle.
The EPA Federal Test Procedure, commonly known as FTP-75 for the city driving cycle, are a series of tests defined by the US Environmental Protection Agency (EPA) to measure tailpipe emissions and fuel economy of passenger cars.
The drive cycle was fed to a Longitudinal Driver block that implements a longitudinal speed-tracking controller. Based on reference and feedback velocities, the block generates normalized acceleration and braking commands that can vary from 0 through 1.
The output of this block i.e, AccelCmd Commanded vehicle acceleration, normalized from 0 through 1 and DecelCmd Commanded vehicle deceleration, normalized from 0 through 1, was then used to generate a voltage which would then be fed to the PWM and H bridge block in order to drive and control the motor.
Parameters:
Drive Cycle Source Parameters:
Drive Cycle source was set to FTP75.
The other drive cycles available are Wide Open Throttle(WOT) where WOT speed parameters are used to specify a drive cycle for performance testing.
Specify the drive cycle using a workspace variable: Where a user-generated drive cycle can be taken as input from the MATLAB workspace.
Specify the drive cycle using a file: Where a drive cycle is generated from a file that contains time, velocity, and, optionally, the gear shift schedule.
Longitudinal Driver Parameters:
Proportional-Integral control type was selected and the Proportional gain was set to 10 from 15 and the Integral gain was kept as 1 for an effective match between the drive cycle source and the actual vehicle speed.
Controlled Voltage Source Block:
The output from the Longitudinal Driver was then sent to a Controlled Voltage Source block that maintains the specified voltage at its output regardless of the current flowing through the source.
Controlled PWM and H-Bridge Block:
PWM:
The use of PWM allows the start-up current to be limited and offers precise control over speed and torque. The PWM frequency is a trade-off between the switching losses that occur at high frequencies and the ripple currents that occur at low frequencies, and which in extreme cases, can damage the motor. Typically, designers use a PWM frequency of at least an order of magnitude higher than the maximum motor rotation speed.
The output voltage from the Controlled Voltage Source block which took AccelCmd as input was fed to the ref+ and ref- of the Controlled PWM Voltage block. The block calculates the duty cycle based on the reference voltage across its ref+ and ref- ports.
where,
Vref is the reference voltage across the ref+ and ref- ports.
Vmin is the minimum reference voltage.
Vmax is the maximum reference voltage.
The PWM and REF electrical ports of the Controlled PWM Voltage block are directly connected to the PWM and REF electrical ports of an H-bridge.
Parameters:
The output voltage amplitude was set to 90V since the car was using a 90V DC motor.
H Bridge:
An H-Bridge is a common topology used to drive rotational devices such as motors, gears, or fans. An H-Bridge circuit topology is able to drive your rotational device in two directions.
To drive the motor in one direction (forward), alternate transistors in the bridge are activated. To go the other direction (reverse), the opposite pair of transistors are activated. To control the speed a pulse-width modulator is used and differing pulse widths are specified in a defined cycle. Changing percentages of the pulse widths defines the duty cycle. Varying the width, and thereby the duty cycle, of the drive signal changes the amount of current, or drive strength, through the motor. In this way, motor control is achieved.
Parameters:
The Power supply source was set as Internal and the Simulation mode was set to Averaged. In the power supply internal mode the supply ports are internal and not visible(default mode). In the Averaged simulation mode, the output voltage is a constant whose value is equal to the average value of the PWM signal. This gives a comparitvely better output in comparison to the PWM mode, where the output voltage is a pulse-width modulated signal(default option).
Threshold Voltage is the value above which the voltage at the PWM port must rise to enable the H-Bridge block output.
PWM signal amplitude is the amplitude of the signal at the PWM input.
Reverse threshold voltage, when the voltage at the REV port is greater than this threshold, the output polarity becomes negative.
Braking threshold voltage, when the voltage at the BRK port is greater than this threshold, the H-Bridge block output terminals are short-circuited via the following series of devices:
One bridge arm
One bridge arm in parallel with a conducting freewheeling diode
The output voltage amplitude was set to 90V.
DC Motor Drive:
The positive and negative ports of the H-Bridge were connected to the DC motor's positive and negative terminals. A voltage sensor was connected in parallel and a current sensor was connected in series to the motor.
Port C of the block is associated with the casing of the DC motor and port R is associated with the Rotor of the motor and is connected to a gearbox.
DC Motor Parameters:
Rated Speed = 3500rpm
Rated load = 40kW
Rated DC supply voltage = 90V
Gear Box:
A gear ratio of 7:1 was specified.
where,
wi is input shaft angular velocity
wo is output shaft angular velocity
To is input shaft torque
Ti is output shaft torque
At the output shaft, speed is reduced and torque is increased.
The output of the gearbox is connected to the rear axle of the vehicle body subsystem.
Vehicle body subsystem:
The Vehicle Body block represents a two-axle vehicle body in longitudinal motion. The vehicle can have the same or a different number of wheels on each axle. For example, two wheels on the front axle and one wheel on the rear axle. The vehicle wheels are assumed identical in size. The vehicle can also have a center of gravity (CG) that is at or below the plane of travel.
The block accounts for body mass, aerodynamic drag, road incline, and weight distribution between axles due to acceleration and road profile. Optionally include pitch and suspension dynamics. The vehicle does not move vertically relative to the ground.
In the vehicle body block, the vehicle mass, CG, number of wheels per axis, frontal area, drag coefficient are defined.
The output of the GearBox is connected to the rear axle. The hubs of all four wheels are connected to each other and connected to the hub port of the vehicle body.
Vehicle Body connected to the front and rear tire blocks:
Parameters:
Vehicle mass = 700kg
Number of wheels per axle = 2
The horizontal distance from CG to front axle = 1.4m
The horizontal distance from CG to rear axle = 1.6m
CG Height above ground = 0.5m
Frontal area = 2.4m^2
Drag coefficient = 0.3
Tire block:
Using the tire block, the rolling radius, inertia, rolling resistance, etc are defined. These take the normal reaction forces as input from the vehicle body block (NR- normal reaction rear, NF- normal reaction front).
The Tire (Magic Formula) block models a tire with longitudinal behavior given by the Magic Formula, an empirical equation based on four fitting coefficients. The block can model tire dynamics under constant or variable pavement conditions.
The Tire (Magic Formula) block assumes longitudinal motion only and includes no camber, turning, or lateral motion.
Tire block Parameters:
Rated vertical load = 3000N
Peak longitudinal force at rated load = 3500N
Slip at peak force at rated load(%) = 10
Power Source:
A constant voltage source was used as the power source with a nominal voltage of 90V.
Power Source Parameter:
Nominal Battery Voltage = 90V
State Of Charge (SOC) of the battery:
In order to calculate the State of Charge of the battery, a subsystem was created where the current sensor output was taken as input.
The input was fed to a Rate Transition block that transfers data from the output of a block operating at one rate to the input of a block operating at a different rate. The output of the Rate Transition block was fed to a gain block where the following equation was fed.
1/Vnom*3600
The gain output was fed to a discrete-time integrator to create a purely discrete model. The output discrete-time integrator block was subtracted from 1 using a Sum block and the output of the sum block was then multiplied by 100 to obtain the battery SOC in percentage.
OUTPUT:
Drive cycle and Vehicle Speed plot:
Battery SOC plot:
The y-axis represents the State of Charge of the battery in percentage.
Where a negative slope is present, the state of charge of the battery is decreasing and where a positive slope is present the state of charge of the battery is increasing.
At the end of the cycle, a SOC of 85% is obtained.
The voltage across motor plot:
The y-axis represents the voltage across in the motor in Volts. The constant voltage plot is obtained when the vehicle is at a stand-still condition.
Current across motor plot:
The y-axis represents the current across the motor in Amps. The positive axis represents the current being fed to the motor to propel the vehicle and the negative axis represents the current being generated by the motor when the vehicle is decelerating.
The constant current plot is obtained when the vehicle is in a stand-still condition.
Conclusion: Using Simulink, an electric car model was created which uses a battery and a DC motor. The vehicle speed and the reference drive cycle were plotted and compared and the battery SOC state was observed for the entire duration.
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...
Simulink model of an electric car
AIM: Create a Simulink model of an electric car that uses a battery and a DC motor. OBJECTIVES: To create a Simulink model of an electric car with the necessary components and connections and visualize the discharge characteristics of the battery and view the difference between the vehicle speed…
10 May 2021 10:31 AM IST
Motor and battery sizing for an electric scooter
Aim: The aim of this project to estimate the sizing of the motor and battery capacity needed to propel a scooter. Objectives: To determine the tractive effort for an electric scooter by calculating the following forces acting on it: Rolling Resistance Drag Resistance Hill climb force Acceleration…
10 May 2021 09:39 AM IST
Door Trim Switch Bezel
AIM: The aim of this project is to create a tooling axis for the given Class A surface and to make it a solid body of prescribed thickness and perform draft analysis on the same using CATIA V5. OBJECTIVES: Using the given Class A surface, create a tooling axis and make it a solid body of prescribed thickness,…
06 May 2021 09:52 AM IST
Coin holder
Aim: The aim of this project is to create a tooling axis for the given part and to make it a solid body of prescribed thickness. Objectives: Using the given Class A surface, create a tooling axis and make it a solid body of prescribed thickness. Procedure: …
06 May 2021 09:52 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.