Challenge

Modelling of EV using MATLAB and Simulink

PROJECT 2

ELECTRIC VEHICLE DESIGN

AIM

To model an Electric Vehicle in Simulink

OBJECTIVES

  • Explain System-level configuration.
  • Explain each model parameters and blocks.
  • Comment on the results.

THEORY

INTRODUCTION OF ELECTRIC VEHICLE:

Operates on an electric motor instead of an IC engine that generates power by burning a mix of fuel and air. This is seen as a possible replacement of the existing traditional vehicle technology, in wake of the rising pollution, global warming, fossil depletion, etc. Amid the rising carbon footprint of fuel-based vehicles, a lot of vehicle manufacturers such as TATA Motors, Mahindra, Toyota Kirloskar, Ola Electric, etc, have made heavy advances towards the technology. Big players like Tesla, General Motors, Ford, Toyota, etc, have already worked on this technology since long in Europe and United States of America.

While some EVs used lead-acid or nickel-metal hydride batteries, the standard for modern battery electric vehicles is now considered to be lithium-ion batteries as they have greater longevity and are excellent at retaining energy, with a self-discharge rate of just 5% per month. Despite this improved efficiency, there are still challenges with these batteries as they can experience thermal runaway, which has, for example, caused fires or explosions in the Tesla Model S, although efforts have been made to improve the safety of these batteries.

CLASSIFICATION OF ELECTRIC VEHICLE:

There are two main types of electric vehicles (EV); Fully electric and plug-in hybrids:

1.FULLY ELECTRIC VEHICLE:

Fully Electric Vehicle or Battery Electric Vehicles, also called BEVs and more frequently called EVs, are fully electric vehicles with rechargeable batteries and no gasoline engine. All energy to run the vehicle comes from the battery pack which is recharged from the grid. BEVs are zero emissions vehicles, as they do not generate any harmful tailpipe emissions or air pollution hazards caused by traditional gasoline-powered vehicles.

  1. PLUG-IN HYBRID ELECTRIC VEHICLE (PHEVs):

Plug-in Hybrid Electric Vehicles, or PHEVs, have both an engine and electric motor to drive the car. Like regular hybrids, they can recharge their battery through regenerative braking. They differ from regular hybrids by having a much larger battery, and being able to plug into the grid to recharge. While regular hybrids can (at low speed) travel 1-2 miles before the gasoline engine turns on, PHEVs can go anywhere from 10-40 miles before their gas engines provide assistance. Once the all-electric range is depleted, PHEVs act as regular hybrids, and can travel several hundred miles on a tank of gasoline. All PHEVs can charge at an EV go L2 charger, but most PHEVs are not capable of supporting fast charging.

  1. HYBRID ELECTRIC VEHICLE:

Hybrid Electric Vehicles, or HEVs, have both a gas-powered engine and an electric motor to drive the car. All energy for the battery is gained through regenerative braking, which recoups otherwise lost energy in braking to assist the gasoline engine during acceleration. In a traditional internal combustion engine vehicle, this braking energy is normally lost as heat in the brake pads and rotors. Regular hybrids cannot plug into the grid to recharge and cannot charge with EV go.

Block Diagram of an EV:

Drive cycle: This is the input given to the vehicle. There are different types of drive cycle based on the application we choose. In this vehicle is simulated for acceleration & deceleration for a particular type with the varying speed range.

Driver controller: To drive the drive cycle as per the given condition, a driver controller is present to run the vehicle taking the input and feedback from to move from one place to another.

Battery: This the powerhouse which supplies the energy required to drive the vehicle.

Motor: It is the rotating device which converts the electrical energy in the form of current and voltage into the mechanical energy at the vehicle through a transmission system.

Vehicle body: This is where the output is achieved via the motor power is transferred to the wheel considering the different forces and resistance and compare with the input drive cycle

In the designed EV main blocks are Battery, drive cycle, controller, DC Motor, Vehicle body & Transmission system. Drive cycle is the input data like how a human drive his actual vehicle here FTP75 drive cycle is introduced to make the designed vehicle to give the output how it reacts to the drive cycle. The main object to design the EV is to obtain the speed by the driver, to estimate the state of charge (SOC), distance travelled by the vehicle. There is a SOC block that will estimate the state of charge of a battery, distance is calculated by speed and time parameters.

DESCRIPTION:

VARIOUS BLOCKS USED IN EV DESIGN:

  1. Drive Cycle Source:

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.
  • Identify the faults within tolerances specified by standardized tests.
  1. Longitudinal Drive:

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.

  1. Controlled 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.

  1. Controlled PWM voltage:

The Controlled PWM Voltage block represents a pulse-width modulated (PWM) voltage source. The ports represented as;

  • Electrical input ports — The block calculates the duty cycle based on the reference voltage across its ref+ and ref- ports. This modelling variant is the default.
  • PS input — Specify the duty cycle value directly by using an input physical signal port.
  1. H – bridge:

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. The Simulation mode parameter value must be the same for the Controlled PWM Voltage and H-Bridge blocks

  1. Current sensor:

The block represents an ideal current sensor, that is, a device that converts current measured in any electrical branch into a physical signal proportional to the current. Connections + and - are conserving electrical ports through which the sensor is inserted into the circuit. Connection I is a physical signal port that outputs current value.

  1. DC motor:

This block represents the electrical and torque characteristics of a DC motor. 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.

  1. Controlled Current Source:

The controlled current source block converts the Simulink input signal into an equivalent current source. The generated current is driven by the input signal of the block. The positive current direction is as shown by the arrow in the block icon.

We can initialize the Controlled Current Source block with a specific AC or DC current. If we want to start the simulation in steady state, the block input must be connected to a signal starting as a sinusoidal or DC waveform corresponding to the initial values.

  1. Battery:

The battery block represents a simple batery model. The block has four modeling 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 — Basic model that does not output battery charge level or simulate thermal effects. This modeling variant is the default.
  • Uninstrumented | Show thermal port — Model with exposed thermal port. This model does not measure internal charge level of the battery.
  • Instrumented | No thermal port — Model with exposed charge output port. This model does not simulate thermal effects.
  • Instrumented | Show thermal port — Model that lets you measure internal charge level of the battery and simulate thermal effects. Both the thermal port and the charge output port are exposed.

  1. Mechanical Rotational Reference:

The Mechanical Rotational Reference block represents a reference point, or frame, for all mechanical rotational ports. All rotational ports that are rigidly clamped to the frame (ground) must be connected to a Mechanical Rotational Reference block.

  1. Electrical Reference:

The Electrical Reference block represents an electrical ground. Electrical conserving ports of all the blocks that are directly connected to ground must be connected to an Electrical Reference block. A model with electrical elements must contain at least one Electrical Reference block.

  1. Solver Configuration:

Each physical network represented by a connected Simscape block diagram requires solver settings information for simulation. The Solver Configuration block specifies the solver parameters that your model needs before you can begin simulation. Each topologically distinct Simscape block diagram requires exactly one Solver Configuration block to be connected to it.

  1. Vehicle Body:

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.The block has an option to include an externally-defined mass and an externally-defined inertia. The mass, inertia, and center of gravity of the vehicle body can vary over the course of simulation in response to system changes.

  1. Tire (Magic Formula):

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.

  1. Simple Gear:

The Simple Gear block represents a gearbox that constrains the connected driveline axes of the base gear, B, and the follower gear, F, to corotate with a fixed ratio that you specify. You choose whether the follower axis rotates in the same or opposite direction as the base axis. If they rotate in the same direction, the angular velocity of the follower, ωF, and the angular velocity of the base, ωB, have the same sign. If they rotate in opposite directions, ωF and ωB have opposite signs.

  1. Inertia:

The Inertia block represents an ideal mechanical translational inertia that is described with the following equation:

T=J*(dω/dt)

where:

  • T is inertia torque.
  • J is inertia.
  • ω is angular velocity.
  • t is time.
  1. Rate Transition:

The Rate Transition block transfers data from the output of a block operating at one rate to the input of a block operating at a different rate. Use the block parameters to trade data integrity and deterministic transfer for faster response or lower memory requirements.

  1. Discrete-Time Integrator:

Use the Discrete-Time Integrator block in place of the Integrator block to create a purely discrete model. With the Discrete-Time Integrator block, you can:

  • Define initial conditions on the block dialog box or as input to the block
  • Define an input gain (K) value
  • Output the block state
  • Define upper and lower limits on the integral
  • Reset the state with an additional reset input

SIMULINK MODEL EXPLANATION:

In the above model, the input drive cycle data taken is a drive cycle source for 2474 sec. This drive cycle data is then fed into the Longitudinal driver block. It takes reference velocity and velocity feedback. Also, a grade can also be entered to simulate the hill climb, if any. This block outputs acceleration and deceleration commands into the motor controller. In the controller subsystem, the commands from the driver are entered as input data. The commands from the acceleration port are given to the PWM port of the H-bridge, through a controlled PWM Voltage source. The deceleration commands are given into the BRK port of the H-bridge. All the references are grounded. The positive and negative terminals are connected to the DC motor. Different parameters that are used for the simulation are shown below.

  • Now, the positive of the H-bridge is also connected to a battery source through a current sensor. Moving onto the DC Motor, the motor controlled fed the voltage through a controlled battery source as shown above into the DC Motor. In the motor, the shaft output is connected to the gear box and the motor casing is connected to a mechanical rotational reference. Battery and DC Motor parameters are shown below;

  • Then, the R-port of the DC motor is connected to the subsystem titled ‘vehicle’. The internal diagram of the subsystem is given below;

  • The input of the subsystem is a PMC port titled ‘R’ which is connected to a simple gear. The parameters of the simple gear taken are given below;

  • An inertia block is also taken into consideration and the simple gear is connected to the 4 tire blocks. Since, this is a rear wheel drive, so the motor shaft is connected to the rear axle of the car. The parameters taken in the tire blocks are;

  • All the wheel hubs are connected to the hub of the vehicle body block set. N port is for the normal force acting on the wheel. So, they are connected to the NR and NF for Rear and Front respectively. And the V-port of the vehicle body block set is connected to an output PMC port of the subsystem titled as ‘V’. The vehicle body block parameters given are;

  • Then, the output of the subsystem is connected to an integrator block through a PS-Simulink converter and connected to the display block for calculating the distance. A scope is taken from the VelFdbk port of the longitudinal driver and the output of the subsystem for determining the variation of speed with time
  • Another subsystem titled ‘SOC Estimate’ is taken from the negative terminal of the current sensor, along with a scope to determine the variation of current with time. The internal diagram of this subsystem is given below;

  • The input of the subsystem is a PMC port titled ‘[A]’ which is connected to a rate transition block and then to a gain block with the value 1/(80*3600). It is then connected to a discrete-time integrator and given to an add block that adds the given signal with a constant block of value 1 and gives the result to an output PMC port titled ‘SOC[0, 1]’.
  • Lastly, a scope and display blocks are taken from the output of this subsystem for calculating the SOC value and determining the variation of SOC with respect to time.

OBSERVATIONS:

  • Speed Vs time plot:

From the below curves for the actual speed and the command speed, it is evident that the velocity feedback (actual speed) very closely traces the input velocity (command speed). Only, at instants where the drive cycle velocity is declining abruptly, the velocity feedback comes to zero at a slower rate than the former, because practically the vehicle will come to a halt after in some time. So, a slow negative acceleration is shown.

  • Current Vs time plot:

The Current Vs time plot for the EV model is given below; Here, the current curve fluctuates in the positive and negative halves in between 206.6 A and -111.25 A from 0 to 1500 sec. Then, the value becomes zero in between 1500 to 2000 sec, as it follows the drive cycle which is similarly 0 during this time interval. Then, for the rest of the time it continues to fluctuate in the negative and positive halves as before.

  • SOC Vs time plot:

The SOC of the battery goes from 100% to around 77.7%, where there is a decrease in the SOC by about 22.3%. In some intervals this value increases, that is representing the regenerative braking. During this period the motor is acting as a generator and is feeding the charge back into the battery, thus charging the battery.

Also, the SOC value is 0.777 and the distance value travelled by the EV is 18.35Km by the respective display blocks.

CONCLUSION:

An electric vehicle is modelled in Simulink by completing all the objectives mentioned above.

REFERENCES:

  • https://www.researchgate.net/publication/359120589_ELECTRIC_AND_HYBRID_ELECTRIC_VEHICLES
  • https://www.researchgate.net/publication/353260957_Electric_Vehicles_in_India_A_Literature_Review
  • https://www.sciencedirect.com/science/article/pii/S2666691X21000130
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.