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 MATLAB model of the electric car which uses a battery and a DC motor. Choose suitable blocks from the Powertrain block set. - Objectives: - To make the most simple and low run-time models using Matlab using an individual component model. - To check out performance parameters like…
Neel sanap
updated on 25 Feb 2021
- Aim: Create a MATLAB model of the electric car which uses a battery and a DC motor. Choose suitable blocks from the Powertrain block set.
- Objectives:
- To make the most simple and low run-time models using Matlab using an individual component model.
- To check out performance parameters like speed, SOC, current etc. with various drive cycle.
- Method:
Block diagram:
- The figure above shows the basic block diagram for the electric vehicle. This is a more simplified diagram and this is formed for understanding purpose.
![]() |
![]() |
- As a four-wheel model is needed to be developed four wheels in the Simulink model are taken. Where H stands for the hub, s is tire sleep, n is normal force and a is axel connection.
- Consider 4 tires, where 2 acts as rear wheels and 2 acts as front wheels. After doing the connections, two wheels are connected to a gearbox to which the input power will be coming from the motor shaft.
- NR from the vehicle body is connected to the rear tire and stands for rear normal whereas NF is connected to front wheels and stands for the normal front.
- Constand wind speed can be added to the vehicle body and also a beta inclination angle can be added is necessary.
- Vehicle body:
- A vehicle body needs to be connected to these tires and a Simulink block is available for this.
- 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 centre 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.
- The block has an option to include an externally-defined mass and externally-defined inertia. The mass, inertia, and centre of gravity of the vehicle body can vary over the course of simulation in response to system changes.
![]() |
![]() |
As per the requirement, the connections are done for the given situation. A subsystem can be formed for this in order to simplify the model. |
A shaft of the motor is connected to the gearbox. Here the green part is mechanical where output is the rotating power of the shaft. Whereas the blue part is electric which will be connected to the converter. C should be connected to the mechanical reference frame. |
Vehicle body along with wheels, inertia mass, gear block for speed variation, and external parameters like inclination angle beta, wind speed W. |
- Power controller:
- H bridge:
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 a 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.
- For this model, the simulation model is kept average in order to reduce the overall simulation time. If it is kept at PWM the time will be lager, Regenerative braking is activated and load current characteristics are kept smooth.
- The above block showing the necessary parameters for the H bridge block.
- Control voltage source:
- The Controlled Voltage Source block represents an ideal voltage source that is powerful enough to maintain the specified voltage at its output regardless of the current flowing through the source. The output voltage is V = Vs, where Vs is the numerical value presented at the physical signal port.
- This block is connected to the PWM controller in order to provide a constant voltage supply and also in order to generate the energy while braking that is regenerative braking. The same DC motor will act as a generator for some time and act as a generator.
- Drive cycle:
- 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.
- There are several drive cycles that automakers will be using as predefined input.
- As an input, a spreadsheet and a signal builder block can be used as well.
- A multi-input port is used in order to provide more number of inputs as per the requirement.
![]() |
![]() |
- Longitudinal Driver:
- The Longitudinal Driver block 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. You can use the block to model the dynamic response of a driver or to generate the commands necessary to track a longitudinal drive cycle.
- This driver will take the inputs from Vehicle feedback speed and its input will be Vehicle Reference from the input parameters.
- In its simple way targeted speed is a vehicle reference and vehicle feedback is actual speed and the difference between them is the error.
- This block is working on a PI controller and has all the necessary input parameters. This block gives an Accelerator command and a brake command which aids in increasing the speed and applying the brakes.
- Signals will be coming out as 0 and 1 out of the driver and a converter is needed to connect it to the electrical part.
- Battery:
- The Battery block represents a simple battery model. The block has four modelling variants, accessible by right-clicking the block in your block diagram and then selecting the appropriate option from the context menu, under Simscape > Block choices:
- Uninstrumented | No thermal port — A basic model that does not output battery charge level or simulate thermal effects. This modelling variant is the default.
- Uninstrumented | Show thermal port — Model with the exposed thermal port. This model does not measure the internal charge level of the battery.
- Instrumented | No thermal port — Model with an exposed charge output port. This model does not simulate thermal effects.
- Instrumented | Show thermal port — Model that lets you measure the internal charge level of the battery and simulate thermal effects. Both the thermal port and the charge output port are exposed.
- A controlled current source is used which will discharge the battery depending upon the current taken by the motor.
- DC motor:
- A current-carrying conductor, when kept in a magnetic field, gains torque and develops a tendency to move. In short, when electric fields and magnetic fields interact a mechanical force arises. This is the principle on which the DC motors work.
- A magnetic field arises in the air gap when the field coil of the DC motor is energised. The created magnetic field is in the direction of the radii of the armature. The magnetic field enters the armature from the North pole side of the field coil and “exits” the armature from the South pole side of the field coil. The conductors located on the other pole are subjected to a force of the same intensity but in the opposite direction. These two opposing forces create a torque or force that causes the motor armature to rotate.
- Complete model:
- From the above image it can be seen how the SOC is getting calculated and the distance travelled by car as per the given battery conditions.
- From the above image it can be seen that how the vehicle achieves the reference speed that means follow the input requirement and the State of Charge of the vehicle dropping from 100% to 39% for the given cycle time.
- As this is a practice model, and all that values are not as per real parameters the result might differ if the actual values of the car like weight, frontal area, inertia, inclination angle, wind speed, battery type and capacity. All these factors can result in changing the behaviour of the battery, its performance, top speed, distance covered.
- Learning outcome:
- To understand all the block required to model an EV.
- Understanding the working of an EV and its different subsystem like a battery, drive cycle, working principle, SoC calculation.
- Calculating the State of Charge of the vehicle
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...
Photo Realistic Rendering
Title: modelling of the chopper model in Solidworks. - Objectives: - To model different parts of the chopper along with proper constraints. - To do assembly of the chopper model. - Perform the rendering operations. - Introduction: - Designing or modelling of a vehicle generally starts with the styling team,…
01 Sep 2021 10:25 AM IST
Benchmarking
2. Prepare a report explaining what is benchmarking. Benchmarking involved a comparison between similar products on some dimensions of performance. It can be used to compare the availability and delivery of features in a product and in this form often provide the basis of consumer tests and review. These look at products…
30 Jun 2021 05:26 AM IST
Design of backdoor
- Aim: To design the back door of an automobile using the styling surface along with necessary reinforcement and embosses. - Method: - Back door: - A car door is a type of door, typically hinged, but sometimes attached by other mechanisms such as tracks, in front of an opening that is used for entering and exiting a vehicle.…
24 Jun 2021 06:51 PM IST
Roof challenge
- Aim: To design the Automotive roof rail and all the necessary components to improve the strength of the roof as per the master section. - Method: - An automobile roof or car top is the portion of an automobile that sits above the passenger compartment, protecting the vehicle occupants from sun, wind, rain, and other…
22 May 2021 06:44 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.