Challenge

Project-1: Modelling an electric Car with Li-ion battery

Aim:Create a MATLAB model of electric car which uses lithium ion battery and suitable motor.
 
Objective: 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.
 
 
Selecting appropriate parameters of electric vehicle and understanding their characteristics, are the preliminary step in modeling a good electric vehicle. This challenge presents the study of vehicle parameters based on simulation of electric vehicle. All works are performed in MATLAB/Simulink environment.
 
Keywords: electric vehicle, vehicle parameters,  simulation, MATLAB/Simulink
 
 
 
INTRODUCTION
Nowadays, the trend of reducing energy consumption and environmental impact has led to the electrification of vehicle for future transportation. The serious issue of global warming, also known as the greenhouse effect, urban pollution, and the depletion of fossil fuels have increased the worldwide tensions. Although the Internal Combustion Engine (ICE) technology is being matured over the past 100 years, it will mainly rely on improving the fuel economy and reduce emissions. Powered by battery, Electric Vehicles (EV) have been proposed by many as one of the above solution as they are highly efficient, silent, produce zero emission, and can be regulated by the power grid operator . However, the main challenges to solve in EV are battery-related issues; the high initial cost, limited driving range, and long charging time of its battery.  The battery must contain sufficient energy to drive certain range and provide enough power during accelerations. In order to estimate and optimize the energy consumption of EV, we need to model an EV. It is important to have a good model of EV to prevent wrong conclusions.
In this study: modeling of EV is presented and discussed below:>
 
In this simulation we are designing a electric vehicle which are having following specifications: -
 
Specifications of Electric vehicle:
 
System level configurations:
 
 

Model Parameters:

Simulink Model:

When working with a bigger models, it is good idea to create a subsystem. In order to group of component into a single block. You can easily create a subsystem. I have divided the simulation system into a Six subsystem. 

  • We have 6 different sub-systems in the Model,

    • First subsystem contains the Driver
    • Second Subsystem contains the Power Controller
    • Third Subsystem contains the Battery pack
    • Fourth Subsystem contains the SOC(State of Charge)
    • Fifth Subsystem contains the Motor and Gear System
    • Sixth Subsystem contains the Vehicle Dynamics
     

We see one by one, 

1-> Subsystem contains the Driver:

The input for the speed is taken from the drive cycle and is controlled by a PID Controller. The acceleration and deceleration of the vehicle with a saturation of 0.5 depends on the actual vehicle speed input into the system. The PID Values are set to default.

 
PID Tunning:
Controller Parameters:
 
 

->  Subsystem contains the Power Controller:

All the systems of the model are dependent of power and it has to be supplied in control. A power controller consists of a sine PWM voltage circuit, H-bridge circuit and a current sensor. The output voltage amplitude is set to 110V for PWM and the same is for H-Bridge.

 The image shows of the Motor circuit and controlled subsystem.

1) H-Bridge Motor Driver

 The H - Bridge with Thermal Port block is used to drive a motor. The H bridge two output ports

Positive Port 

Negative Port 

This port is directly connected to the motor that has to be controller. There is also a REV port.When the reverse threshold voltage is lower than the REV port voltage,the polariy of the motor is reversed, and if the BRK port voltage is greater than the value of breaking threshold voltage, it indicates that the vehicle is in braking condition.

The following image shows the H-Bridge Motor Driver block from Powertrain block set.

I Have changed the Input Thresholds as per our requirements

2) Controlled PWM Voltage Source

The PWM signal is used or controlling the speed of the traction motor. This block is used for providing a controlled PWM voltage output.

The Duty cycle is given by,

100*(Vref-Vmin/Vmax-Vmin)

Where,

Vref - is the reference voltage across the ref+ and ref- ports.

Vmin - denotes the minimum reference voltage.

Vmax - denotes the minimum reference voltage.

The following image shows the Controlled PWM Voltage Source block from Powertrain blockset.

 

3) Temperature sensor

This block and its parameters are shown below, this block measure temperature in a thermal network. There is no heat flow through the sensor.

4). Current Sensor

 

This block is used to measure the flow current through of circuit.

5). Controlled voltage Source

The controlled voltage source block is used to give a constant voltage output. It has two electrical conserving ports and a physical signal port. The output from the controlled voltage source is fed to the controlled PWM voltage source.

3-> Subsystem contains the Battery pack

The following image shows the Battery Pack Subsystem

 Lithium-ion battery is used for this model with a nominal voltage of 60V. The SOC of the battery reduces as the vehicle starts.

 The power controller provides the input cuurent to the battery while charging. The SOC, current and Voltage are the parameters of the battery.

Subsystem Parameters are explained below.

1. Li-ion Battery:

The Battery block implements a generic dynamic model that represent most popular types of rechargeable batteries.

The following image shows the Li-ion Battery block from powertrain blockset. 

                           

2) Bus Selector:

This block accept a bus as input which can be created from Bus creator, Bus selector. from the m port of the battery block , we get SOC,ampere and voltage values. These values are extracted using bus selector , which when connected to the m port , will show those values as shown below,

3) Current Controlled Source:

The Controlled Current Source block converts th Simulink input signal into an equvivalent current source The generated current is driven by the input signal of the block.

The following image shows the Current Controlled  Source block from Powertrain blockset.

 

4-> Subsystem contains the SOC(State of Charge)

1) Rate transition

Rate transition handles data transfer between different rates and tasks. The SOC of the battery reduces as the vehicle starts and increase when the charger is connected.

2) Gain

5-> Subsystem contains the Motor and Gear System

Subsystem Parameters are explained below.

1. DC Motor

 The Motor will take controller power from the battery and convert electrical energy to mechanical energy. Different types  of motors can be used to drive the wheels. so we using the DC motor. The purpose of the dc motor in electric vehicle is to drive the tires/wheels.The one side of the DC motor block is connected to the vehicle body blocks, and the other side is connected to DC motor driver, which controls and rotates the motor.

The following image shows the DC motor block  from Powertrain block set.

6-> Subsystem contains the Vehicle Dynamics

Below we can see the model of vehicle body. The Ev model is the combination of both Electrical and Mechanical parts. The mechanical parts in the system include tires, vehicle body, transmission(simple) gears, differential, and the motor. The  tires and the vehicle body are formed into a subsystem to separatre the mechanical component from that of electrical components. We can change the block parameters as per our requirements.

The image of the subsystem is attached below.

Subsystem blocks are explained below:

1. Vehicle Body:

These is the block of vehicle body which represents a dual axel vehicle or a 4 wheeer. There are 6 ports.

The following image shows the Vehicle body block  from Powertrain block set.

     

The Ports W and beta are physical signal input ports which are for wind speed and inclination of road respectively. 

Connections to V, NF, and NR are physical signal output ports for the velocity of the vehicle. 

Front axel and Rear axel it is a normal forces and the H is for Horizontal motion and the tie is connected to this port.

 2. Tire (Magic Formula)

We have selected the tire(Magic Formula).

The following image shows the Tire block  from Powertrain block set.

3. Simple Gear:

This block is used for giving a fixed gear ratio. This is a mechanical component and can be avoided, but it ives users the ability to adjust vehicle speed with respect to the rpm of the motor.

The following image shows the Simple gear Powertrain block set.

 

  

Drive Input :

 The block is capable of taking feedback velocity of the ehicle and changing the speed by giving output signal, it can decide when the vehicle needs to be accelerated and when the break need to be applied.  

1. Drive Cycle Source

The Drive cycle source block is used to provide the refernence Speed of the simulation.

The following image shows the Drive Cycle Source block from Powertrain blockset.

There are many  Drive cycle sources as well as we can generate our own signal by using signal builder. So  I used the FTP75 Drive Cycle Source block to create the Drive input.

4. Testing and simulation

After designing the circuit, all thet is left is testing the circuit. We usually need to put scope at any point in the circuit to measure the desired parameters. The scope module looks like the one shown below.

The scope can have multiple inputs, and the real time output is displayed when the simulation.  

RESULT:

Drive Cycles:

The model is made to run at  drive cycles: FTP75.

 FTP75 

First, with the aid of the Drive Cycle source FTP75. Each drive cycle has its own time duration.So the Drive Cycle source FTP75 has time duration is 2474 seconds.

1. Distance travelled

The distance travelled by the vehicle is 17.82km

SOC

The graph of the SOC percentage.  

The SOC of vehicle after running for 2474 seconds the battery has changed intermittently from 100% to (appro.)72%. During this vehicle has travelled for 17.82 Km. Trend is decreasing but during some time it is increasing. The SOC increases beacause Regenerative breaking.

The SOC is dropped from 100% to (approxi.)72%.

 Temperature:

Controller Temperature:

Motor Temperature:

Conclusion:

The Matlab model of an Electric Vehicle has been successfully made by choosing Suitable blocks from powertrain block set. We understand how to make the model of Electric Vehicle by using powertrain blockset. 

So we conclude that 

  •  The designed Electric Vehicle model for a suitable FTP75 drive cycle travels for a distance of 17.82Km for the simulation time of 2474 secs.
  •  The designed Electric Vehicle has a SOC of about 72% after a successful run of 17.82Km. 
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.