Power Train

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 175

Power Train

Drive Motor

Designing a good motor controller requires the motor model to be as accurate as


possible. If you wish to learn to model a DC motor using simple electrical and
mechanical equations then the Motor Module is here for you! Proceed further to
tune a controller and obtain the required response.

Drive Motor | Introduction

Understanding the Motor

Figure 1: Equivalent circuit


of motor

The above diagram is the equivalent circuit of a permanent magnet


motor. The motor equation can be divided into electrical and mechanical.
From the above diagram, using Kirchhoff’s Voltage Law, we can state the
following equation of the electrical circuit:

Here V is the voltage applied to the motor terminals, R is the internal


resistance, i is the armature current, L is the inductance of the motor coil
and Ve is the back emf generated. As per Lenz’s Law, the emf (Ve) induced
in a circuit due to a change or a motion in a magnetic field (dθ/dt) is
directed to oppose the change in flux. Numerically it can be stated as:
Ve = Ke × dθ/dt

Here Ke is the back emf constant.

Hence we can state after substitution,


By rearranging the terms, we have:

For the mechanical equations, we consider a rotational damper with a


damping coefficient (b) (Nm/rad/s). The effective torque (T) is given by

As per Lorentz law a current (i) carrying conductor placed in a magnetic


field experiences a torque (Te) and can be numerically stated as:

Here Kt is the motor torque constant.

Thus, by replacing Te we have

The net acceleration achieved by the motor is given as

Where Ti—is the load torque. The effective angular velocity is given by

Here Kt,Ke,L,R are motor design parameters which are obtained from
specification sheet of the motor or experimentally calculated.
The inductance (L) resists the change in current. Motor inductance acts as
a switch inductance resistor, consumes voltage and reduces the peak
motor speed, while producing torque and reducing the measured motor
current.
The internal resistance R of the motor is due to the resistance of the
armature wires. Smaller the value of resistance the better as the energy
loss due to heat is reduced.
More about Kt,Ke will be discussed in the last section of this chapter. For
now, it is essential to remember the relation between the two parameters,
T, dθ/dt ,i and V.

Building the Model – Building the Motor

In this approach the motor takes the load torque and applied voltage as
the input and gives the angular speed as the output. The equations used
are same as equation 1 and 2 however the model connections change
slightly. Also we make use of equation 3 for calculating the motor angular
velocity. We begin first with the mechanical loop

Step 1]
Chose the components from library browser

Step 2]
Consider the integrator block first
Step 3]
Form equation 3 on the LHS of the integrator block

Step 4]
Close the loop by connecting the output of the integrator block to the
input of the gain b
Next we shall model the electrical loop using equation 1.

Step 5]
Consider the integrator block first

Step 6]
Consider the integrator block first
Step 7]
Form the equation 1 on the LHS of the Integrator block and form the
relation between torque and current on the RHS

Step 8]
Complete the loop and the model by connecting the angular speed input
and torque output to the mechanical loop. Connect an output port to the
angular velocity of the motor (ωm)
Building the Model – Preparing the Script

The script contains a list of all the necessary constants used in the
SIMULINK model. It can also contain the code to load specific drive cycles
and simulate models directly through the script, all of which will be dealt
with in the modules to come. The lists of constants to be declared in the
script are given below:

The next section delves into the open-loop analysis of the models
developed. For this purpose, the script requires only the constants to be
declared. Refer to the following figures for the script.
Results and Observations – Understanding the Behaviour of the
Motor

n this section we will try to understand the behaviour of the motor, the
dependence of the parameters Ve, V, ω,i and T.
We have seen previously while deriving the motor equations that:
Ve = Ke × ω and T = Kt × i
The motor converts the electrical energy from the battery to the
mechanical energy obtained at the shaft. The link between these two
types of energies is given the constants Ke and Kt.
In the following experiments we will change the Terminal voltage value
and the Load Torque demanded value to understand the effect on the
other two variables angular speed and current.

Varying The Load Torque


First we will construct the grid for testing.

Step 1]
First connect a scope to the current signal (i).
Step 2]
Select all the components of the model, right click and select Create
Subsystem.

Step 3]
Next add the following components from the library.

Step 4]
Connect the step inputs to the input port of the Motor and the scope to
the angular speed output.
Step 5]
For Load Torque test open the Step Input connected to Tl and set the final
value of the step input 20 and the step time as 0. Open the Step Input
connected to Vm and set the step time to 0 and the Final Value to 60.

Set the simulation time to 50 seconds. We will be increasing the step


value for Tl up to 80 in steps of 20. Run the Script first in the Matlab
window and then run the Simulink Model. Observe the change in current
with the change in Load Torque.

Figure 3: Effect of load torque on the armature current.

We can observe that as the Load Torque increases the current drawn
increases. Consider the case where the applied terminal voltage V is 60V
and the load torque is 40Nm:
Figure 4: Characteristics of the armature current at 60 V terminal voltage and 40 Nm applied torque.

Before applying the terminal voltage, the motor shaft is at rest. Hence,
Refer the circuit equation obtained using Kirchoff’s Voltage Law in the first
section of this module:

For simplicity ignore the inductor term for now:

At the time of start, the terminal voltage ‘V’ is applied and the motor shaft
is at rest omega(ω) = 0. Hence:

Substituting the known values:

As the armature resistance is a small value the initial current drawn by


the motor is high. We observe in our model the current drawn by the
motor during starting is 569.5A. This value then gradually decreases as
the motor starts to rotate and the back emf Ve increases. Remember, the
terminal voltage is constant throughout.

The function of the inductor is to resist any changes in the current value.
When the current value changes suddenly during start, the rate of change
of current di/dt is high. This makes the inductor term high leading to a
drop in the current immediately. You can imagine it to be similar to the
derivative term of a PID (reducing the reaction time of the system). At
steady state as the rate of change of current is zero the inductor behaves
like a simple conductor.

Finally, we will correlate the current value with the torque demanded at
steady state. Consider the equation:

As the motor is steady:

If we check the steady state value of angular velocity (Scope) we get ω


131.53 rad/s. Substituting the known values, we get the expected current
drawn value:

If we check the actual reading for current we observe it is 106.7 A. This is


a great way to check the model developed.
Varying The Voltage
Next we will see the effect of Voltage on the angular velocity of the motor.
Focus on understanding the difference between terminal voltage and the
back emf.

Open the step input connected to Vm and set the final value to 20 V. Open
the Step Input connected to Tl and set it to zero.

Setting the load torque minimizes the current.

Set the simulation time to 50 seconds. We will be increasing the step


value for Voltage up to 80 in steps of 20. Run the Script first in the Matlab
window and then run the Simulink Model. Observe the change in angular
velocity and the back emf with the change in Terminal Voltage.
Figure 5: Effect of terminal voltage on the angular speed at the motor shaft.

Figur
e 6: Effect of terminal voltage on back emf at constant load torque.

We observe that as the terminal voltage increases with zero load torque
the angular speed of the motor shaft increases, increasing the back emf
produced. In the current graph we observe that the starting current value
varies due to different terminal voltage but the steady state current value
goes to zero due to low torque demand.
Hence at steady state:

We also know:

As per calculations at V=60V:

We find the angular velocity of the motor is 160 rad/sec at 60V terminal
voltage.

Here it is crucial to understand that this is a special case where the load
torque is zero. If we set the load torque value to 40Nm and terminal
voltage to 60V, we can calculate the following:

At steady state the inductor behaves like a simple wire:

Substituting values:

Finally
We observe from the scope that the angular speed of the motor is 131.5
rad/sec. We can also see that at the same voltage the angular speed is
higher 160 rad/sec when the load torque is zero as compared to when the
load torque is increased.

System Analysis

In this section we deal with simulating the models in open loop and
understanding their behaviour. System analysis can also be carried out
using the linear system analyzer available in Matlab. The application
allows the user to plot step response graphs and bode plots to visualize
the rise time, settling time and other characteristics of the system. First
we shall manually determine the open loop response of the system.

Open Loop Response Of


Torque Base
Referring to the Torque Based Motor module created previously we select
all, right click and choose Create Subsystem from Components.

Figure 7: TORQUE BASED motor model as a


Subsystem

We observe that the TORQUE BASED model takes load torque applied
externally and the applied voltage as the input while gives the angular
velocity as the output. In this open loop system analysis we consider the
external load to be zero. We connect the step input to Vm and scope to
wm. Connect a constant block to TL and set value as zero.
Double click on the Step input block and set the following values of the
parameters.

The model script is run first in the Matlab window after which the model is
simulated in the Simulink Window. The results obtained are similar to that
of EV model. The settling time is 50 seconds and the steady state value is
26.65 rad/s.

Figure 8:
Open loop response of TORQUE BASED motor model
To plot the graphs of angular speed v/s time using Matlab workspace add
two To Workspace block from Sinks to the model. Add a Clock from
Sources to the model. Connect one Workspace block to the Clock and give
the variable name
as t_out while connect the other to w signal and set variable name as w.
Change the save format from time series to Array (2D).

Figure 9:
Plotting model graphs from workspace in TORQUE BASED

This now saves the angular speed and time values to the workspace which
can be plotted by using the command plot (t_out, w)
In certain cases if the t_out and w values are not being exported into the
workspace, check the following:
In the Simulink window, click on the Model Configurations Parameters tab
(gear icon) to open the window. Next, click Data Import/Export on the left
pane. Uncheck the ‘Save simulation data as a single object’ option at the
bottom.
We have now understood the motor’s open loop response, but we are not
quite satisfied! Next we will observe the effect of P, I and D gains on the
behaviour of the motor. We will tune the gains to achieve the performance
we want.

Proportional Integral Derivative Controller

Given the open loop response of our motor we will now design a controller
which meets the performance requirements. The motor controller varies
the voltage applied across the motor to obtain the required angular
speed. Thus here our control variable is the terminal voltage of the motor
and the controlled variable is the angular speed. The performance
parameters are stated below:

Steady State Error = SSE = 0


Maximum overshoot<40%

Settling Time < 2seconds

One can refer the PID module to understand the significance of the
parameters mentioned above.

Using a P Controller

We begin with a simple P controller to control our motor. A P controller


multiplies the error with the gain to obtain the control action. As discussed
in the module Introduction to PID controller, the P controller decreases the
response time and reduces the steady state error to a small non zero
value.

Step 1]

Add components from the library

Step 2]

Connect the components to form the P controller

Step 3]

Create a subsystem of the controller by selecting all components, right


clicking and clicking on Create Subsystem. Add the step input block
Step 4]

Connect the step input block to the Reference and wm signal from the
TORQUE BASED_Motor to the Output of the Controller. Connect the
Control Signal from the controller to Vm of the TORQUE BASED Motor
Step 5]

Set the step time for 1 and final value as 60 (rad/s) for the step input
block
As discussed earlier, the P controller might not completely remove the
steady state error of the system. Additionally it also leads to an overshoot
if the value is too high. All these effects can be observed using our model
developed.

Figure 10: System response for different values of proportional gain

The tabulated values can be seen below for comparison. Along with
increasing the overshoot an increase in Kp also increases the number of
corrections made by the system.
Table 2: Comparison of SSE, overshoot and settling time of plant and
controller model

We can observe that a simple P controller with Kp=40 is able to attain a


settling time of 0.929 seconds with an overshoot of 30.26%. However it
cannot completely eliminate the steady state error. Similarly, if the plots
of the system response are observed closely we realize that with a higher
Kp value the system oscillation frequency increases. The system has to
take more corrective action to maintain a steady state. This means the
motor will never exactly reach the required value and the continuous
corrections can lead to undue mechanical load on the system. This makes
a simple P controller a bad choice for our motor control.

Using PI Controller

The elimination of steady state error in a simple P controller requires the


introduction of an integrator. The proof for how the integrator removes
the error is discussed in the Introduction to PID module. To construct the
PI controller follow the steps:

Step 1]

Add the following components from the library


Step 2]

Complete the controller equation

The Ki term increases the overshoot of the system and increases the
settling time making the system slower. With our Kp value as 40 the Ki
value is increased and the SSE, overshoot and settling time are noted.

Table 3: Comparison of SSE, overshoot and settling time for increasing Ki


values
One can observe that the system becomes progressively slower and the
overshoot increases. The steady state error is reduced to zero with even a
very small value of Ki. The oscillations are reduced and of lesser intensity.
Thus a PI controller of Kp=40 and Ki=7 can be chosen for our motor.

Figure 11: System response for increasing values of Ki

Using a PD Controller

As discussed the derivative predicts the future of the system and retards
or accelerates the response respectively. It primarily helps decrease the
overshoot and decrease the settling time. Construct the PD controller as
follows:

Step 1]

Select the following components from the library


step 2]

Connect the derivative branch to the error and add to get the control
signal

We choose Kp as 40 with overshoot 30.26% and settling time 0.929


seconds. The Kd value is increased to see the effects
Table 4: Comparison of SSE, overshoot and settling time for increasing Kd
values

Figure 12: System Response for increasing Kd values

The Derivative, decrease the overshoot to zero and reduces the settling
time. However, it leads to increased oscillations of the system at steady
state. The steady state error remains constant and cannot be reduced to
zero with a PD controller alone

Using A PID Contrller

The PID controller is the most widely used controller design especially in
industry settings. The PID controller, as the name suggests, consists of 3
components, the Proportional which considers the present, the Integral
which considers the past actions and the Derivative which predicts the
future. The PID controller combines the positives of all three controller
types, decreases settling time, decreases overshoot and reduces SSE to
zero. The tuning of PID can be carried out manually as will be discussed
and automatically using tools available in Matlab. The PID controller is
constructed as follows:

Step 1]

Select the following components from the library

Step 2]

Connect the derivative branch to the error and add to get the control
signal
We will carry forward the PD controller design and determine an ideal
value of Integrator to reduce the SSE to 0.

Figure 13: System response using PID controller

Table 5: Comparison of SSE, overshoot and settling time for different PID
controllers

The introduction of the Integral reduces the SSE to zero as observed but
makes the system slightly slower than the original PD system.

Summary Of The Section

1.We have seen the development of different types of controllers for the
motor namely P, PI, PD and PID, for our given motor model.

2.We observe that while using a PI controller it is advised to choose a


small value of Kp and Ki to reduce overshoot, decrease settling time and
reduce SSE to zero. However, with a large Kp term one needs to use a
derivative to reduce the overshoot. In such situations a PID controller will
give minimum overshoot, zero SSE and fastest settling time.

3.The PD controller is successful in reducing the overshoot of the P


controlt it increases the oscillations in the system and does not reduce the
SSE to zero

4.The PID controller combines the benefits of all three controllers.

5.The requirements set of SSE=0, Overshoot<40% and Time Settling< 2


seconds are met by the following controllers:

Understanding the motor constants

Kt, Ke, L and R are important motor parameters of a DC motor. As an


automobile engineer we concern ourselves solely with the motor
performance we expect for our automobile i.e. we give our requirements
in terms of max motor speed and torque. However, while developing a
model we might not have the aforementioned motor parameters
available. In such cases it is crucial to have at least a basic understanding
of their significance.

The torque constant is the ratio of torque applied on the rotor to the
armature current.

The back emf constant is the ratio of the back emf generated to the
angular velocity of the rotor.
The SI units of the two constants are Nm/Amps and V-s/rad respectively.

The relation between and for DC motors and BLDC motors will be obtained
below.

Figure 14: Simple DC Motor Circuit

Consider the above diagram. V is the applied terminal voltage, I is the


current passing through the armature, R is the motor internal resistance, L
is the inductance and Ve is the back emf generated.

The power supplied to the motor is given by

Now applying Kirchhoff’s Voltage law to the circuit,

The power consumed by the motor is

Vemf can be written as


Hence substituting in Pm we have,

The power lost due to motor resistance as heat

Hence, the net Electrical Power supplied:

The mechanical power delivered by the motor

By simplifying we observe

Constructing an Energy Calculation Grid

We will be constructing a grid which is able to calculate the electrical


energy supplied by the battery, electrical energy consumed by the motor,
mechanical energy at the shaft and the traction energy demanded by the
load. This grid can be used for many purposes. Here our sole purpose is to
observe three cases:

Case (1) Kt = Ke
Case (2) Kt > Ke
Case (3) Kt < Ke

For this experiment we do not require the controller. We can simply


remove the controller and attach two Constant blocks at the motor input
ports Vm and Tl as follows:
Step 1]

Connect GoTo tags from the signal routing library to the following signals
inside the motor: Current (i), Vm, Ke * w (Ve), Tl, Te and wm.

After connecting the GoTo tag to the signal double click on it and make
the following changes in the window:
Step 2]

Outside the model add the corresponding From tags form the Signal
Routing Library.
As discussed before:

We will be modelling the above equations in Simulink as follows:

Step 3]

Add Product blocks between V and I, Ve and I, Te and wm and Tl and wm.
To obtain energy we integrate the power signal.

Step 4]

Attach an Integrator block to each power signal.


Finally we would like to view all the energy signals in a single scope. This
will aid our observation.

Step 5]

Add a Mux from the Signal Routing Library. Double click on it and change
the number of inputs to 4. Connect the output port to a Scope.
The energy grid is ready for simulation:
Figure 15: Energy grid and the motor module

Set the simulation time to 150 seconds. Run the script first in the Matlab
window and then run the model.

Before observing the results, make note of the following:

For any system as per the law of conservation of energy:

In our case:

Hence Ebatt must be greater than EMotor,Etrac

Results And Obseravtion


Figure 16: Energy graphs for battery, motor and traction for Kt=Ke

We Observe

And

Hence

In the Matlab Workspace, under the Command Window type the following:
Kt = 0.55;
This will set Kt > Ke DO NOT RUN THE SCRIPT AGAIN.

Run the simulation:


Figure 17: Energy graphs for battery, motor and traction for Kt>Ke

We observe that eventually:

Hence we can say:

Run the Matlab script once again in the Matlab workspace. Next in the
Command Window type the following >> Ke = 0.55;
This will set Kt < Ke DO NOT RUN THE SCRIPT AGAIN.
Run the simulation:
Figure 18: Energy graphs for battery, motor and traction for Ke>Kt

We observe

Hence

Conclusion And Inference

In Case (1) we observe that the system is in accordance with the law of
Conservation of Energy with Esupplied > Econsumed (eqn (b)). Also there is no loss
during conversion from electrical to mechanical in the motor (eqn (c)).
This thus supports our initial statement: For PMDC and BLDC motors K t =
Ke given the two are in SI units.

Next understanding the effect Kt,Ke on the performance of the motor is


crucial.

1] As one increases Kt, the current draw required for the same amount of
torque reduces. This is beneficial for the battery life.
2] As one increases Ke, the amount of terminal voltage required to
produce a certain torque at the same angular speed increases.

It is preferred to have a high Kt value to decrease the current drawn,


however the higher Ke will restrict the Vmax. A compromise is made
between speed range and maximum torque while designing the motor.
In Short!

In this module we understood the basics of motor and how it works. We


also analysed the relation between voltage, angular velocity, torque and
current through experimentation.

The open loop response of the motor model was analysed. Given the
performance requirements, set in terms of steady state error, settling
time and max overshoot we tuned the controller to obtain the same.

Finally, we evaluated energy conversions to understood the physical


significance of the Kt and Ke parameters of a permanent magnet motor.

One can continue to understand the motor module further. Here are some
questions you can try and solve on your own! Remember you have all that
you need!

One can check the response of the controller to an external disturbance


and note the behaviour. The disturbance can be given by introducing TL
(Torque Load) as a step input at 50 secs. Try to understand which
controller is more robust to disturbances.

Analyse the results obtained in Case (2) Kt > Ke and (3) Kt < Ke and try
to reason why these two are invalid.

AC induction motors and BLDC synchronous motors are preferred in


automobiles. What are the possible advantages of the said motors over
PMDC. Try to go over modelling of the BLDC motor!

IC Engine
The engine has been powering our vehicles for more than 200 years. With the
development of HEVs, we are able to combine the positives of both the electrical
and conventional powertrains. As this component continues to stay relevant
during electrification it is imperative to learn how to model and test it. Package 3
Powertrain enables you to construct and test Engine models in Simulink.

IC Engine | Introduction

Understanding the Engine


The engine model is a simple lookup table. It outputs the engine torque
for the given engine speed and throttle value. The lookup table is fed with
a 3 dimensional graph also known as a surface. The torque forms the
vertical Z axis while the speed and throttle values form a mesh grid.

Figure 1: Engine map of throttle v/s engine speed and throttle lookup table

The other lookup table used is in the gas tank. The gas tank outputs the
amount of fuel left given the consumption. The consumption rate of the
fuel is determined using a lookup table. The gas tank lookup table takes
the engine speed and torque as the input and outputs the fuel
consumption in grams/second. The gas tank lookup table can be
visualized as follows:

Figure 2: Engine fuel consumption map


The BSFC (Brake Specific Fuel Consumption) graph is often referred to in
literature. It is crucial to understand the difference between BSFC and fuel
consumption. The Brake Specific Fuel Consumption (BSFC) is the fuel
consumed per unit brake power produced by the engine (gram/kW).

The BSFC graph is generally plotted as contour to aid understanding.

Figure 3: BSFC map of engine

The points on the same contour denote engine operating points. Observe
that to reduce the BSFC, one should move vertically above.

IC Engine | Building the Model – Building the Engine


Step 1]

Select the following components from the library to construct the Engine
subsystem. Name the Input Ports as Engine Speed and Throttle while the
two output ports are named as Power and Torque.
Step 2]

Connect the two input signals to the input ports u1 and u2 of the 2-D
Lookup Table. Connect the output signal to the Torque output port.

Step 3]

The power of the engine is calculated as the product of Engine speed and
Engine Torque. Connect the product signal to the Power output port.

Step 4]

Select all the components, right click and create the Engine subsystem
Next we will be constructing the Gas Tank subsystem with Engine Speed
and Torque as the Input and the Fuel Level Left as the output.

Step 5]

Select the following components from the Library

Step 6]

Connect the Engine Speed and Torque input signal to the 2-D Lookup
Table. The Table outputs the FUEL CONSUMPTION value in gram/s.

Step 7]

Integrate the FUEL CONSUMPTION signal from the table to get the amount
of fuel consumed in grams. Add a gain of 1/1000 to the signal to obtain
the consumption in kilograms.
Step 8]

To determine the volume of fuel consumed in litres add one gain of


1/fuel_density, with fuel density in kg/m3, and another gain of 1000 to
convert the volume from m3 to litre.

Step 9]

The initial fuel level is obtained by multiplying the maximum fuel level
(MFL) with Initial_FL (this is the fraction of fuel available at the time of
start). Next we subtract the fuel consumed from the initial fuel level to
obtain the fuel level left and connect it to the output port.

Step 10]

Add a STOP block and connect it to the fuel level left signal through a
Compare to Constant block. Set the value of the block to 0.1 and operator
to ‘<=’.
Step 11]

Select all the components, right click and create the Gas tank subsystem

Next we will be connecting the Engine and Gas Tank to complete the
system.

Step 12]

Select a Ramp block and Constant block from the Sources Library. Insert a
Scope and set the number of axes to 4.

Step 13]

Connect the Ramp block to the Engine Speed input ports of Gas tank and
Engine subsystem. Connect the Constant block to the Throttle port of
Engine subsystem.
Step 14]

Connect the Torque signal from the Engine to the Torque input port of Gas
tank subsystem. Connect the Power, Engine Speed, Torque and fuelleft
signals to the scope.

Step 15]

Set the slope value for the Ramp block to 1, constant block value to 0.2
and simulation time to 600 seconds.

IC Engine | Building the Model – Preparing the


Script
The script is divided into three parts in which we declare the variable
values, initialize the engine torque map and initialize the engine fuel
consumption map. The engine torque map and the fuel consumption map
as discussed earlier are obtained by continuous dynamometer testing of
the engine at different speeds, throttle and torque points. The engine
torque and fuel consumption graphs presented here are representative
only. These tables will facilitate in understanding how to model the engine
and gas tank systems.

First initialize the variable values:


Table 1: Variable initialization for engine and gas tank.

Figure 4: Variable Initialization in script

Next we initialize the two maps:

Step.1]

Download the .mat files provided with this module.

Click the link below for downloading .mat files


IC_Engine_Maps
Step.2]
Save the files in the same folder as your model.

Step 3]

Add the following lines of code to your script for the engine map:

Figure 5: Initialization of the engine map

Step 4]

Next to initialize the fuel consumption map:

Figure 6: Initialization of the engine fuel consumption map.

After preparing the script the corresponding variables need to be added to


the lookup tables.
Open the Lookup Table in Engine subsystem. This Lookup Table accepts
map_trq as table data, map_throttle as u1 and map_speed as u2.

Figure 7: Engine lookup table

Similarly the Lookup table in Gas tank accepts fuelmap_fuel as Table data,
fuelmap_spd as u1 and fuelmap_trq as u2.
Figure 8: Gas tank lookup table

Results and Observations – Plotting Engine Maps as Surface

After writing the script you can plot the engine surface map as shown in
Figure (1) and (2) for Engine Performance and Fuel Consumption. For this
you will require a few lines of code.

First, run the script previously prepared. Next in the Matlab command line
write the following code.

%this plots the engine performance graph


>>figure(1)
>>[X,Y] =meshgrid(map_spd,map_throttle);
>>surf(X,Y,map_trq)

%this plots the engine fuel consumption graph


>>figure(2)
>>[X,Y] =meshgrid(fuelmap_spd,fuelmap_trq);
>>surf(X,Y,fuelmap_fuel)
Engine Torque and Power Characteristics

We will be generating the Torque and Power characteristics of a 60 kW


engine at different throttle values. For this we will be changing the throttle
value from 0.2 to 1 in steps of 0.2.

To plot all the torque graphs and power graphs generated at different
throttles together, follow the steps:

Step 1]

Connect To Workspace blocks (Simulink>>Sinks) to the Power, Torque


and Speed signals. Name them as Power, Torque and Speed respectively.
Double click on each and set the name and the save format to 2D array.

Step 2]

Next run the script.


Step 3]

Set the throttle value in the model and run the model.

Step 4]

After running go to the MATLAB workspace and type the following lines of
code:

>>figure(1)

>>plot(Speed, Torque, ‘b-‘);

>>hold on

>>figure(2)

>>plot(Speed, Power, ‘b-‘);

>>hold on

Repeat steps 3 to 4 for each throttle value.

The power characteristics obtained are presented together as follows:


Figure 9: Power v/s speed graph

The torque characteristics are as follows:


Figure 10: Torque v/s speed graph

We can observe from the above graph that the maximum torque is
obtained at a lower speed as compared to the maximum power. The
power graph can be seen increasing with speed as against the torque
graph which falls after attaining the maximum value at speeds between
3000 to 4000 rpm.

The engine, like a typical petrol engine is unable to provide a constant


torque for a range of speeds. The torque graph of a diesel engine if
plotted can be seen to be more flat than petrol thus supplying constant
torque over a range of speeds.

In Short!
In this module we have built the IC engine model (SI engine) using an
engine lookup table. An engine lookup table gives the torque produced by
the engine as the output for a given speed and throttle combination. We
have also seen how we can input the engine maps in a Simulink model.

Furthermore, we have constructed a surface plot of engine performance


and BSFC. Following up with plotting the engine torque and power
characteristics and have analysed the same!
As a challenge, you can try writing a concise code for plotting the torque
and power characteristics to replace the steps.

Try plotting the fuel consumption across speed to analyse how the fuel
consumption changes.

Finally, this module gives us one way of modelling the engine. You can
explore the physics based models of engines as well!

Automatic Transmission

The demand for Automatic Transmission is on the rise. A vehicle with an AT is


best equipped for daily urban use given the seamless shifts and increased driver
comfort. Currently, research efforts are focussed on the shift schedule to make
the ride more fuel-efficient. With this module, ‘model and simulate an Automatic
transmission, develop a simple shift logic and test it for different driving
conditions!

Automatic Transmission | Introduction


The automobiles powered by internal combustion engine requires a multi-
step gearbox and clutch assembly. The engine has a limited range of
speeds, for which it can provide the required traction torque. A vehicle,
however, is driven in different conditions and hence has a variety of
operating points emerge. For example, on highways, driving the vehicle
requires less traction force as compared to when driving up a slope.
Figure 1: Ideal
Traction Hyperbola (a) Engine Tractive Effort versus that on wheel (b)
Gear shift leveraging
The transmission and clutch assembly leverage the engine’s capacity and
provide the required torque at given speed.
To summarize, the transmission carries out the following functions,
1.It disconnects the engine during start from the road load acting on the
wheels during starting (clutch).

2.Increases the traction torque from the engine to achieve the required
torque at the wheels (gear).
3.Allows the vehicle to move in reverse although the engine can rotate in
a single direction (reverse gear).
4.Allows the vehicle to achieve better fuel efficiency by allowing the
engine to remain in optimum operating point.
The transmission systems can be classified into manual and automatic.
Both the automatic transmission (plus its torque converter) and a manual
transmission (with its clutch) accomplish exactly the same thing, but in
different ways.

In case of an automatic transmission,


•There is no clutch pedal in an automatic transmission car.
•There is no manual gear shift in an automatic transmission car.
Automatic Transmission | Working of a Automatic Transmission
System

Figure 2: Automatic Transmission System

A key difference between a manual and an automatic transmission is that


the manual transmission locks and unlocks different sets of gears to the
output shaft to achieve the various gear ratios, while in an automatic
transmission, the same set of gears produces all of the different gear
ratios. The planetary gearset is the device that makes this possible in an
automatic transmission.

In this Module we will be building individual subsystems in the form of


their governing equations and their corresponding input and output
signals. We will also prepare a shift logic which governs the gear shift in
an automatic transmission.
Figure 3: Automatic Transmission System, Simulation Model

Let the equations that govern each subsystem walk you through the
modelling of the same.

Equations

This section focuses on the equations governing the subsystems. As we


have seen in the above section, let us break down the module into
subsystems: Engine, Torque Converter, Transmission Ratio, Gear Box,
Vehicle model. Now let us look into the equations governing each system
in order to design the systems better.

Engine

Net torque on engine will be the difference between the torque generated
due to engine and torque generated due to impeller.

Differential of angular speed of engine is its corresponding angular


acceleration.
Torque Convertor

Ratio of Turbine speed (RPM) and Engine speed (RPM) is defined as Speed
Ratio.

Based on a given Speed Ratio a K-factor is generated using a map.

Figure 4: K-factor map

Impeller torque is defined as the square of ratio between Engine speed


and K-factor.
Based on a given Speed Ratio a Torque ratio is generated using a map.

Figure 5: Torque Ratio map

Turbine torque is defined as the product of the Torque ratio, for a given
Speed ratio, and Impeller torque.
Transmission Ratio

Transmission output torque is defined as the product of the Transmission


ratio and Transmission input torque.

Transmission input speed is defined as the product of the Transmission


ratio and Transmission output speed.

Gear Box

This module contains the gear shift logic based on the vehicle speed and
throttle (%) at that instant. The upshift-downshift in gears happens based
on the map depicted below.

Figure 6: Map depicting upshift-downshift of gear


Contains two map-based logic of getting the up-threshold and down-
threshold value of vehicle speed and given the instantaneous gear and
vehicle speed, a MATLAB Function is written to evaluate the gear shift.

Vehicle Model

Net Road Load forces is the summation of aerodynamic drag force, force
due to grade of the road profile, rolling friction and brake force applied by
the driver.

Aerodynamic drag,

Grade force,

Rolling friction,

Torque due Tractive forces,

Torque at wheels is the difference between Torque generated due to


tractive forces and net torque due to road load forces.

Torque at wheels is equivalent to the product of moment of inertia of


vehicle and angular acceleration of the wheel.
Differential of angular speed of wheel is its corresponding angular
acceleration.

Transmission output speed (RPM) is the product of angular speed at


wheels and final drive ratio.

Automatic Transmission | Script File


About Lesson

The values of Jveh and Jei are inclusive of conversion factors based on the
model created.

Adding Data

Step 1]

Right click on Workspace Tab in MATLAB and select New to create data for
Lookup Tables.
Figure 8: Adding data, Step 1

Step 2]

Name them and double click on it to add data.

Figure 9: Adding data, Step 2

Step 3]
Right click on the variable name and click on Save As to save the data.

Figure 10: Adding data, Step 3

The data to be added along with their names are given in the next
section.

Data To Be Added

EMAP

Figure 11: EMAP

A two-dimensional table that depicts the engine torque data, used to


interpolate engine torque versus throttle and engine speed.

NE_VEC
Figure 12: NE_VEC

A one-dimensional table that depicts the engine speed, used to


interpolate engine torque versus throttle and engine speed.

TH_VEC

Figure 13: TH_VEC

A one-dimensional table that depicts the throttle, used to interpolate


engine torque versus throttle and engine speed.

Kfactor
Figure 14: Kfactor

A one-dimensional table that depicts the K-factor data, used to interpolate


K-factor versus Speed Ratio.

SpeedRatio
Figure 15: SpeedRatio

A one-dimensional table that depicts the Speed Ratio data used to


interpolate Torque Ratio versus Speed Ratio.

TorqueRatio
Figure 16: Torque Ratio

A one-dimensional table that depicts the Torque Ratio data used to


interpolate Torque Ratio versus Speed Ratio.

DOWN_TABLE
Figure 17: DOWN_TABLE

A two-dimensional table that depicts Down threshold data, used to


interpolates Down threshold (vehicle speed threshold value based on the
map depicted in Fig.5) versus throttle and gear value.

DOWN_TH_BP

Figure 18: DOWN_TH_BP

A one-dimensional table that depicts Throttle data, used to interpolates


Down threshold (vehicle speed threshold value based on the map
depicted in Fig.5) versus throttle and gear value.

UP_TABLE

Figure 19: UP_TABLE

A two-dimensional table that depicts Up threshold data, used to


interpolates Up threshold (vehicle speed threshold value based on the
map depicted in Fig.5) versus throttle and gear value.

UP_TH_BP
Figure 20: UP_TH_BP

A one-dimensional table that depicts Throttle data, used to interpolates


Up threshold (vehicle speed threshold value based on the map depicted in
Fig.5) versus throttle and gear value.

Automatic Transmission | Building The Module

In this section we will look into building of the Automatic transmission


system.

Let us move on to creating Vehicle Subsystem.

Vehicle Subsystem

Step 1]

Create two Input ports and name them as Traction torque and Net torque
due to road load forces respectively. Add a Sum Block, Gain Block (with
1/Jveh as Gain value) and an Integrator Block as shown below.

Figure 21: Subsystem Vehicle Modelling,1

Following the equations that govern this subsystem,


Step 2]

Using the Sum Block get the difference of Traction torque by Net torque
due to road load forces and connect its corresponding output to the Gain
Block (named Gain6 in Figure 21). Connect the output of the Gain Block
(named Gain6 in Figure 21, name its output signal as αwheel) to the
Integrator Block (and name its output signal as ωwheel).

Figure 22: Subsystem Vehicle Modelling,2

Step 3]

Connect the signal ωwheel to a Gain Block (with Gain value FDR*9.55,
named Gain in Figure 22). Add an Output Port and name it as Wt.

Figure 23: Subsystem Vehicle Modelling,3

Following the equations that govern this subsystem,


An additional gain of 9.55 is introduced as a conversion factor from rad/s
to rpm.

Step 4]

Connect the output of the Gain Block (named Gain in Figure 23) to the
Output port, Wt. Add two Gain Block and Square Block.

Figure 24: Subsystem Vehicle Modelling,4

Following the equations that govern this subsystem,

Step 5]

Connect the output of Integrator Block (named Integrator in Figure 24) to


the Gain Block (with Gain value R, named Gain1 in Figure 24) and name
its output as v and connect it to the Square Block (named Square in Figure
24). Connect the output of the Square Block to the Gain Block (with Gain
value 0.5*rho*cd*A, named Gain2 in Figure 24) and name its output signal
as F_aero.

Figure 25: Subsystem Vehicle Modelling,5

Step 6]
Add a Constant Block (with Constant value grade, named Constant in
Figure 25), Sin Block, Cos Block and two Gain Blocks (with Gain value m*g,
named Gain3; with Gain value fr*m*g, named Gain4 in Figure 25).

Figure 26: Subsystem Vehicle Modelling,6

Following the equations that govern this subsystem,

Step 7]

Connect the Constant Block (named Constant in Figure 26) to the Sin and
Cos Blocks (named Sin and Cos respectively in Figure 26) as their inputs.
Connect the outputs of the Sin and Cos Blocks (named Sin and Cos
respectively in Figure 26) to the Gain Blocks (named Gain3 and Gain4
respectively in Figure 26) and name their output signals as grade force
and rolling resistance respectively.
Figure 27: Subsystem Vehicle Modelling,7

Step 8]

Create an Add Block and a Gain Block. Connect the signals F_aero, grade
force and rolling resistance to the Add Block to sum them up.

Figure 28: Subsystem Vehicle Modelling,8

Following the equations that govern this subsystem,

Step 9]

Create an Input port (name it as Brake torque) and a Sum Block. Connect
the output signal of the Add Block (named Add in Figure 28) to the Gain
Block (with Gain value R, named Gain5 in Figure 28). Connect the output
signals of the said Gain Block and Brake torque to the Sum Block and
name its output signal as Net torque due to road load forces.
Figure 29: Subsystem Vehicle Modelling,9

Step 10]

Create an Output port (name it vehicle speed), Gain Block, Sign Block, and
Product Block.

Figure 30: Subsystem Vehicle Modelling,10

Step 11]

Connect the output signal v to the Gain Block (with Gain value 2.24,
named Gain7 in Figure 30), connect its corresponding output signal to the
Output Port, vehicle speed. Connect the output signal of the Gain Block
(named Gain7 in Figure 30) as input to the Sign Block (named Sign in
Figure 30) and connect its corresponding output signal to the Product
Block (named Product in Figure 30).
Figure 31: Subsystem Vehicle Modelling,11

The vehicle speed taken as output is in the mph units, thereby having a
conversion factor of 2.24

The Sign Block is used here to get if the vehicle is going in the opposite
direction, this would imply that the resistive forces would also be in the
opposite direction.

Step 12]

Connect the output signal of Sum Block, Net torque due to road load
forces, as input to Product Block (named Product in Figure 31). Remove
the Input Port, Net torque due to road load forces and connect the output
signal of Product Block (named Product in Figure 31) in its place (rename
this signal as Net torque due to road load forces).

Figure 32: Subsystem Vehicle Modelling,12

Step 13]
Select the complete Vehicle module and right click. Select Create
Subsystem from Selection from the dropdown.

Figure 33: Subsystem Vehicle Modelling,13

Step 14]

Name the Subsystem as Vehicle.

Figure 34: Subsystem Vehicle Modelling,14

Step 15]

Remove the Input and Output Ports of the subsystem Vehicle.


Figure 35: Subsystem Vehicle Modelling,15

Let us move on to creating Engine Subsystem.

Building the Model – Engine Subsystem


Step 16]

Add two Input ports, name them as Ti and throttle respectively, add a
Sum Block, Gain Block, Integrator Block, 2-D Lookup Table Block and an
Output Port, name it as Ne.

Figure 36: Subsystem Engine Modelling,1

Following the equations that govern this subsystem,


Step 17]

Name the output signal of the 2-D Lookup table Block (named 2-D Lookup
Table in Figure 36) and Input port, Ti, as engine torque and impeller
torque. Connect the signals engine torque and impeller torque to the Sum
Block (named Sum in Figure 36) to get its difference.

Connect the output signal of the Sum Block (named Sum in Figure 36) to
the Gain Block (with Gain value 1/Jei, named Gain in Figure 36). Connect
its output to the Integrator Block (named Integrator in Figure 36).

Connect the output of the Integrator Block (named Integrator in Figure 36)
to the Output Port, Ne. Connect the same as the second input, u2 to the 2-
D Lookup Table Block (named 2-D Lookup Table in Figure 36). Connect the
Input Port, Throttle as the input signal to the 2-D Lookup Table Block
(named 2-D Lookup Table in Figure 36).

Figure 37: Subsystem Engine Modelling,2

Step 18]

Double click on the 2-D Lookup Table Block (named 2-D Lookup Table in
Figure 37). Specify EMAP as input for Table data, TH_VEC as input for
Breakpoints 1 and NE_VEC as input for Breakpoints 2 and click Apply and
Ok.
Figure 38: Subsystem Engine Modelling,3

Step 19]

Double click on the Integrator Block (named Integrator in Figure 38). Give
Initial Condition as 1000 and click on Limit output and give Upper
saturation limit as 6000 and Lower saturation limit as 600 and click Apply
and Ok.
Figure 39: Subsystem Engine Modelling,4

Step 20]

Name the output signal of the Integrator Block (named Integrator in Figure
39) as engine RPM.
Figure 40: Subsystem Engine Modelling,5

Step 21]

Select the complete Engine module and right click. Select Create
Subsystem from Selection from the dropdown.

Figure 41: Subsystem Engine Modelling,6

Step 22]
Figure 42: Subsystem Engine Modelling,7

Step 23]

Remove the Input and Output Ports of the subsystem Engine.

Figure 43: Subsystem Engine Modelling,8

Let us move to creating the Transmission Subsystem. Transmission


subsystem contains,
•Torque Converter Subsystem
•Transmission Ratio Subsystem
Let us move to creating the Torque Converter Subsystem.

Torque Convertor Subsystem

Step 24

Create two Input Ports, name them as Nin and Ne, add two Divide Blocks,
two 1-D Lookup Table Blocks, a Square Block, Product Block and two
Output Ports, name them as Ti and Turbine torque. Connect Divide Block
(named Divide1 in Figure 43) to the Square Block (named Square in Figure
43).
Figure 44: Subsystem Torque Converter Modelling,1

Following the equations that govern this subsystem,

Based on a given Speed Ratio a K-factor is generated using a map.


Figure 45: K-factor map

Based on a given Speed Ratio a Torque ratio is generated using a map.

Figure 46: Torque ratio map

Step 25]

Using the Divide Block (named Divide in Figure 46) divide signals Nin by
Ne by connecting them to the Divide Block (named Divide in Figure 46).
Connect its corresponding output signal, name it as speed ratio, to the 1-D
Lookup Table Block (named 1-D Lookup Table in Figure 46) and name its
output signal as k-factor. Connect the signal k-factor to the Divide Block
(named Divide1 in Figure 46) as something to be divided by this signal.
Figure 47: Subsystem Torque Converter Modelling,2

Step 26]

Connect the signal of speed ratio as input to the 1-D Lookup Table Block
(named 1-D Lookup Table1 in Figure 47) and name its output as torque
ratio and connect it to the Product Block (named Product in Figure 47).

Figure 48: Subsystem Torque Converter Modelling,3

Step 27]

Connect Input Port, Ne, to the Divide Block (named Divide1 in Figure 48).
Connect the output signal of Square Block (named Square in Figure 48) to
Output Port, Ti, and name the signal as impeller torque.
Figure 49: Subsystem Torque Converter Modelling,4

Step 28]

Connect the impeller torque signal to the Product Block (named Product in
Figure 49) and connect its corresponding output signal to the Output Port,
Turbine torque.

Figure 50: Subsystem Torque Converter Modelling,5

Step 29]

Double click on the 1-D Lookup Table Block (named 1-D Lookup Table in
Figure 49). Specify Kfactor as input for Table data, SpeedRatio as input for
Breakpoints 1and click Apply and Ok.
Figure 51: Subsystem Torque Converter Modelling,6

Step 30]

Double click on the 1-D Lookup Table Block (named 1-D Lookup Table1 in
Figure 49). Specify TorqueRatio as input for Table data, SpeedRatio as
input for Breakpoints 1and click Apply and Ok.
Figure 52: Subsystem Torque Converter Modelling,7

Step 31]

This is the final Torque Converter Module.


Figure 53: Subsystem Torque Converter Modelling,8

Step 32]

Select the complete Torque Converter module and right click. Select
Create Subsystem from Selection from the dropdown.

Figure 54: Subsystem Torque Converter Modelling,9

Step 33]

Name the Subsystem as Torque Converter.


Figure 55: Subsystem Torque Converter Modelling,10

Step 34]

Remove the Input and Output Ports Nin and Turbine torque of the
subsystem Torque Converter.

Figure 56: Subsystem Torque Converter Modelling,11

Let us move to creating Transmission Ratio Subsystem.

Building the Model – Torque Converter Subsystem

Step 24]

Create two Input Ports, name them as Nin and Ne, add two Divide Blocks,
two 1-D Lookup Table Blocks, a Square Block, Product Block and two
Output Ports, name them as Ti and Turbine torque. Connect Divide Block
(named Divide1 in Figure 43) to the Square Block (named Square in Figure
43).
Figure 44: Subsystem Torque Converter Modelling,1

Following the equations that govern this subsystem,

Based on a given Speed Ratio a K-factor is generated using a map.

Figure 45: K-factor map


Based on a given Speed Ratio a Torque ratio is generated using a map.

Figure 46: Torque ratio map

Step 25]

Using the Divide Block (named Divide in Figure 46) divide signals Nin by
Ne by connecting them to the Divide Block (named Divide in Figure 46).
Connect its corresponding output signal, name it as speed ratio, to the 1-D
Lookup Table Block (named 1-D Lookup Table in Figure 46) and name its
output signal as k-factor. Connect the signal k-factor to the Divide Block
(named Divide1 in Figure 46) as something to be divided by this signal.
Figure 47: Subsystem Torque Converter Modelling,2

Step 26]

Connect the signal of speed ratio as input to the 1-D Lookup Table Block
(named 1-D Lookup Table1 in Figure 47) and name its output as torque
ratio and connect it to the Product Block (named Product in Figure 47).

Figure 48: Subsystem Torque Converter Modelling,3

Step 27]

Connect Input Port, Ne, to the Divide Block (named Divide1 in Figure 48).
Connect the output signal of Square Block (named Square in Figure 48) to
Output Port, Ti, and name the signal as impeller torque.
Figure 49: Subsystem Torque Converter Modelling,4

Step 28]

Connect the impeller torque signal to the Product Block (named Product in
Figure 49) and connect its corresponding output signal to the Output Port,
Turbine torque.

Figure 50: Subsystem Torque Converter Modelling,5

Step 29]

Double click on the 1-D Lookup Table Block (named 1-D Lookup Table in
Figure 49). Specify Kfactor as input for Table data, SpeedRatio as input for
Breakpoints 1and click Apply and Ok.
Figure 51: Subsystem Torque Converter Modelling,6

Step 30]

Double click on the 1-D Lookup Table Block (named 1-D Lookup Table1 in
Figure 49). Specify TorqueRatio as input for Table data, SpeedRatio as
input for Breakpoints 1and click Apply and Ok.
Figure 52: Subsystem Torque Converter Modelling,7

Step 31]

This is the final Torque Converter Module.

Figure 53: Subsystem Torque Converter Modelling,8

Step 32]

Select the complete Torque Converter module and right click. Select
Create Subsystem from Selection from the dropdown.
Figure 54: Subsystem Torque Converter Modelling,9

Step 33]

Name the Subsystem as Torque Converter.

Figure 55: Subsystem Torque Converter Modelling,10

Step 34]

Remove the Input and Output Ports Nin and Turbine torque of the
subsystem Torque Converter.
Figure 56: Subsystem Torque Converter Modelling,11

Let us move to creating Transmission Ratio Subsystem.

Building the Model – Transmission Ratio Subsystem


Step 35]

Create three Input Ports, name them Turbine torque, Gear and Nout, a 1-D
Lookup Table Block, two Product Blocks, a Gain Block and two Output
Ports, name them Traction torque and Nin.

Figure 57: Subsystem Transmission Ratio Modelling,1

Following the equations that govern this subsystem,


Step 36]

Connect the Input Port, Gear, to the 1-D Lookup Table Block (named 1-D
Lookup Table in Figure 57) and connect its output signal to both the
Product Blocks (named Product and Product1 in Figure 57).

Figure 58: Subsystem Transmission Ratio Modelling,2

Step 37]

Connect the Input Ports, Turbine torque and Nout, to each Product Blocks
(named Product and Product1 in Figure 58) and connect their
corresponding output signals to Gain Block (with Gain value FDR, named
Gain in Figure 58) and Output Port, Nin, respectively. Further connect the
output signal of the Gain Block (named Gain in Figure 58) to the Output
Port, Traction torque.

Figure 59: Subsystem Transmission Ratio Modelling,3

Step 38]
Double click on the 1-D Lookup Table Block (named 1-D Lookup Table in
Figure 58). Specify as input for Table data and as input for Breakpoints 1
and click Apply and Ok.

Figure 60: Subsystem Transmission Ratio Modelling,4

Step 39]

Select the complete Transmission Ratio module and right click. Select
Create Subsystem from Selection from the dropdown.
Figure 61: Subsystem Transmission Ratio Modelling,5

Step 40]

Name the Subsystem as Transmission Ratio.

Figure 62: Subsystem Transmission Ratio Modelling,6

Step 41]

Remove the Input and Output Ports Turbine torque and Nin of the
subsystem Transmission Ratio.
Figure 63: Subsystem Transmission Ratio Modelling,7

Step 42]

Now interconnect Torque Converter and Transmission Ratio by connecting


the Nin and Turbine torque.

Figure 64: Subsystem Transmission Modelling,1

Step 43]

Select the complete Torque Converter and Transmission Ratio module and
right click. Select Create Subsystem from Selection from the dropdown.
Figure 65: Subsystem Transmission Modelling,2

Step 44]

Name the Subsystem as Transmission.

Figure 66: Subsystem Transmission Modelling,3

Step 45]

Remove the Input and Output Ports of the subsystem Transmission.


Figure 67: Subsystem Transmission Modelling,4

Let us move to creating Gear Box Subsystem.

Building the Model – Gear Box Subsystem


Step 46]

Create two Input Ports and an Output Port Block, name it as Throttle,
Vehicle speed and Gear respectively, two 2-D Lookup Table Blocks, a
MATLAB Function Block, a Delay Block, with 1 as the input to its Delay
length, and an Initial Condition Block, with 1 as the input of Initial value.

Figure 68: Subsystem Gear Box Modelling,1

Double click on MATLAB Function Block and add the following Script file.
Figure 69: Subsystem Gear Box Modelling,1

Step 47]
Connect Input Port, Throttle, to the 2-D Lookup Table Blocks (named 2-D
Lookup Table and 2-D Lookup Table1 in Figure 68) as their first input
signal, u1. Connect the output signal of MATLAB Function (named MATLAB
Function in Figure 68), gear, to the Output Port, Gear. Connect it as input
to the Initial Condition Block (named IC1 in Figure 68), connect its output
to the Delay Block (named Delay in Figure 68). Connect the output of the
Delay Block (named Delay in Figure 68) to the 2-D Lookup Table Blocks
(named 2-D Lookup Table and 2-D Lookup Table1 in Figure 68) as their
second input signal, u2.

Figure 70: Subsystem Gear Box Modelling,2

Step 48]

Connect the output signals of the 2-D Lookup Table Blocks (named 2-D
Lookup Table and 2-D Lookup Table1 in Figure 70), name it Up thresh. and
Down Thresh., as inputs, u1 and u2, to the MATLAB Function Block (named
MATLAB Function in Figure 70).
Figure 71: Subsystem Gear Box Modelling,3

Step 49]

Connect Input Port, Vehicle speed, and output signal of the Delay Block
(named Delay in Figure 71) as inputs, u3 and u4, respectively to the
MATLAB Function Block (named MATLAB Function in Figure 71).

Figure 72: Subsystem Gear Box Modelling,4

Step 50]

Double click on the 2-D Lookup Table Block (named 2-D Lookup Table in
Figure 71). Specify UP_TABLE as input for Table data, UP_TH_BP as input
for Breakpoints 1 and as input for Breakpoints 2 and click Apply and Ok.
Figure 73: Subsystem Gear Box Modelling,5

Step 51]

Double click on the 2-D Lookup Table Block (named 2-D Lookup Table1 in
Figure 71). Specify DOWN_TABLE as input for Table data, DOWN_TH_BP as
input for Breakpoints 1 and [1234] as input for Breakpoints 2 and click
Apply and Ok.
Figure 74: Subsystem Gear Box Modelling,6

Step 52]

Select the complete model and right click.

Select create subsystem from selection from the dropdown


Figure 75: Subsystem Gear Box Modelling,7

Step 53]

Name the Subsystem as Gear Box.

Figure 76: Subsystem Gear Box Modelling,8

Step 54]

Remove the Input and Output Ports, Vehicle speed and Gear of the
subsystem Gear Box.

Figure 77: Subsystem Gear Box Modelling,9

Let us now look at interconnecting the subsystems that we have made.

Step 55]
Let us first arrange the modules to have a better understanding of flow of
signals.

Figure 78: Automatic Transmission System Modelling,1

Step 56]

Interconnect the signals.

 Connect Input Port, Throttle, to Engine: Input Port> Throttle.

 Connect Engine: Input Port> Ti to Transmission: Output Port> Ti.

 Connect Engine: Output Port> Ne to Transmission: Input Port> Ne.

 Connect Gear Box: Input Port> Vehicle speed to Vehicle: Output Port>
vehicle speed.

 Connect Gear Box: Output Port> Gear to Transmission: Input Port> Gear.

 Connect Transmission: Input Port> Nout to Vehicle: Output Port> Wt.

 Connect Transmission: Output Port> Traction torque to Vehicle: Input


Port> Traction torque.

Figure 79: Automatic Transmission System Modelling,2

Step 57]
Create an Input Port, name it as Brake.

Figure 80: Automatic Transmission System Modelling,3

Step 58]

Connect the Input Port, Brake, to Vehicle: Input Port> Brake torque.

Figure 81: Automatic Transmission System Modelling,4

Automatic Transmission | Test Rig – Building The Maneuver

Step 1]
Create Signal Builder Block.
Figure 82: Modelling Maneuvers,1

Step 2]
Double-click on the Signal Builder Block. On its tab click
Signal>>New>>Constant. Click Ctrl+S to save the Block and close it.

Figure 83: Modelling Maneuvers,2

Step 3]
Now the Signal Builder will have two output signals Signal 1, Signal 2.
Figure 84: Modelling Maneuvers,3

Step 4]
Double-click on the Signal Builder Block. Click on Signal 1 in the box
containing the signals and re-enter its Name as Throttle as shown below.

Figure 85: Modelling Maneuvers,4

Step 5]
Click on Signal 2 in the box containing the signals and re-enter its Name
as Brake as shown below.
Figure 86: Modelling Maneuvers,

Test Rig – Passing Maneuver

Step 6]
Click the Gear icon next to the Active Group tab and from the dropdown
select Rename.
Figure 87: Passing Maneuver,1

Step 7]
Re-enter the name of the maneuver from Group 1 to Passing Maneuver.
Click Ok.

Figure 88: Passing Maneuver,2

Step 8]
Click Throttle signal from the box containing the output signals. Then on
its tab click on Axes> Change Time Range.
Figure 89: Passing Maneuver,3

Step 9]
Change the signal time from 0 to 50, by giving 0 as input for Minimum and
50 as input for Maximum. Click Ok.

Figure 90: Passing Maneuver,4

Step 10]
Click Throttle signal from the box containing the output signals.
Figure 91: Passing Maneuver,5

Step 11]
Go to its tab and on Signal>Replace with> Step.
Figure 92: Passing Maneuver,6

Step 12]
We get Throttle as a Step input of magnitude 1 from time, t=25.
Step 13]
Click Throttle signal from the box containing the output signals and click
on one of its vertices, it can be seen that point is represented by (t,y) co-
ordinates.
Figure 94: Passing Maneuver,8

Step 14]
Click on each vertex of the Throttle signal and change its co-ordinates as,

(0,60)

(14.9,40)

(15,100)

(50,60)

Test Rig – Gradual Acceleration Maneuver

Step 15]
Let us create another Group of Throttle and Brake inputs for simulating
Gradual Acceleration maneuver. Select Passing Maneuver in the Active
Group dropdown. Go to its tab and click on Group> Copy.
Figure 96: Gradual Acceleration Maneuver,1

Step 16]
Click on Active Group dropdown and select Passing Maneuver1, the copy
version of the initial maneuver that we have created.
Figure 97: Gradual Acceleration Maneuver,2

Step 17]
Click Throttle signal from the box containing the output signals. Go to its
tab and on Signal>Replace with> Constant.
Figure 98: Gradual Acceleration Maneuver,3

Step 18]
Click Throttle signal from the box containing the output signals.
Figure 99: Gradual Acceleration Maneuver,4

Step 19]
Click on each vertex of the Throttle signal and change its co-ordinates as,

(0,13.4)

(50,24)

Test Rig – Hard Braking Maneuver

Step 21]
Let us create another Group of Throttle and Brake inputs for simulating
Hard Braking maneuver. Select Passing Maneuver in the Active Group
dropdown. Go to its tab and click on Group> Copy.
Figure 102: Hard Braking Maneuver,1

Step 22]
Click on Active Group dropdown and select Passing Maneuver1, the copy
version of the initial maneuver that we have created.
Figu
re 103: Hard Braking Maneuver,2

Step 23]
Click Throttle signal from the box containing the output signals. Click on
each vertex of the Throttle signal and change its co-ordinates as,

(0,50)

(5.1,50)

(5.1,1)

(50,1)
Figure 104: Hard Braking Maneuver,3

Step 24]
Click Brake signal from the box containing the output signals. Go to its tab
and on Signal>Replace with> Step.
Figure 105: Hard Braking Maneuver,4

Step 25]
Click on each vertex of the Brake signal and change its co-ordinates as,

(0,0)

(10,0)

(10,325)

(50,325)
Figure 106: Hard Braking Maneuver,5

Step 26]
Click the Gear icon next to the Active Group tab and from the dropdown
select Rename. Re-enter the name of the maneuver from Passing
Maneuver1 to Hard Braking Maneuver. Click Ok.

Figure 107: Hard Braking Maneuver,6


Figure 100: Gradual Acceleration Maneuver,5

Step 20]
Click the Gear icon next to the Active Group tab and from the dropdown
select Rename. Re-enter the name of the maneuver from Passing
Maneuver1 to Gradual Acceleration Maneuver. Click Ok.

Figure 101: Gradual Acceleration Maneuver,6

Now let us create Hard Braking maneuver.


Figure 95: Passing Maneuver,9

Now let us create Gradual Acceleration maneuver.

Test Rig – Hard Braking Maneuver

Step 21]
Let us create another Group of Throttle and Brake inputs for simulating
Hard Braking maneuver. Select Passing Maneuver in the Active Group
dropdown. Go to its tab and click on Group> Copy.
Figure 102: Hard Braking Maneuver,1

Step 22]
Click on Active Group dropdown and select Passing Maneuver1, the copy
version of the initial maneuver that we have created.
Figure 103: Hard Braking Maneuver,2

Step 23]
Click Throttle signal from the box containing the output signals. Click on
each vertex of the Throttle signal and change its co-ordinates as,

(0,50)

(5.1,50)

(5.1,1)

(50,1)
Figure 104: Hard Braking Maneuver,3

Step 24]
Click Brake signal from the box containing the output signals. Go to its tab
and on Signal>Replace with> Step.
F
igure 105: Hard Braking Maneuver,4

Step 25]
Click on each vertex of the Brake signal and change its co-ordinates as,

(0,0)

(10,0)

(10,325)

(50,325)
Figure 106: Hard Braking Maneuver,5

Step 26]
Click the Gear icon next to the Active Group tab and from the dropdown
select Rename. Re-enter the name of the maneuver from Passing
Maneuver1 to Hard Braking Maneuver. Click Ok.

Figure 107: Hard Braking Maneuver,6

Test Rig – Coasting Maneuver

Step 27]
Let us create another Group of Throttle and Brake inputs for simulating
Coasting maneuver. Select Passing Maneuver in the Active Group
dropdown. Go to its tab and click on Group> Copy.

Figure
108: Coasting Maneuver,1

Step 28]
Click on Active Group dropdown and select Passing Maneuver1, the copy
version of the initial maneuver that we have created.
Figure
109: Coasting Maneuver,2

Step 29]
Click Throttle signal from the box containing the output signals. Click on
each vertex of the Throttle signal and change its co-ordinates as,

(0,80)

(4.8,80)

(4.8,1)

(50,1)
Figure
110: Coasting Maneuver,3

Step 30]
Click the Gear icon next to the Active Group tab and from the dropdown
select Rename. Re-enter the name of the maneuver from Passing
Maneuver1 to Coasting Maneuver. Click Ok.

Figure 111: Coasting Maneuver,4

Step 31]
Remove the Output Ports Throttle and Brake.
Figure 112: Modelling Maneuvers,6

Step 32]
Connect the Throttle signal to Throttle port of Signal Builder and Brake
signal to Brake port of Signal Builder.

4.Figure 113: Modelling Maneuvers,7


Few changes that needs to be made before simulating are,
1. Change the simulation time to 30 s.
2. Change the Solver configuration by opening Model Settings and under
Solver tab change Solver,
a. Type to Fixed-step.
b. Configuration to ode5 (Dormand-Prince) and the Fixed-step size
(fundamental sample time) to 0.04 and click Apply and then Ok.
3. Evaluate the performance of the system for different parameters would
be to log the signals that you would want to observe using Simulation
Data Inspector.
a. Keep the Simulation Data Inspector enabled.
b. Click on the signals, engine RPM, gear, Throttle, Brake torque and
vehicle speed, and log these signals so that you can view them and
compare their data for different maneuvers.
4. Run the Script file, mentioned in Fig. 6, for loading the system
parameters before running each manoeuvre.
5. Select the maneuvers that you would want to simulate your model with
in the Active Group dropdown in your Signal Builder Block. Let us now
interpret the results that we have got upon testing the model for these
given maneuvers.

Test Rig – Testing The performance of module for the


maneuver built above
Passing Maneuver

Figure 114: Passing Maneuver, Engine RPM


Figure 115: Passing Maneuver, Gear-shift

Figure 116: Passing Maneuver, Throttle and vehicle speed


Observation

As the driver steps to 60% throttle at t = 0, the engine immediately


responds by increasing its speed. This brings about a low speed ratio
across the torque converter and, hence, a large torque ratio (see Figs. 107
and 109).

As Ne increases speed ratio decreases. Looking at the relation between


torque ratio and speed ratio using the map, we can see that a large
torque ratio is generated.

The vehicle accelerates quickly and both the engine and the vehicle gain
speed until about t = 1.72, at which time a 1-2 upshift occurs. The engine
speed characteristically drops abruptly, then resumes its acceleration. The
2-3 and 3-4 upshifts take place at about 4.24 and 8.24 seconds,
respectively. Notice that the vehicle speed remains much smoother due to
its large inertia.

At t = 15, the driver steps the throttle to 100%, typical of a passing


maneuver. The transmission downshifts to third gear and the engine
jumps from about 2580 to about 3708 RPM. The engine torque thus
increases somewhat, as well as the mechanical advantage of the
transmission. With continued heavy throttle, the vehicle accelerates to
about 100 mph at t=23.4 and then the vehicle cruises along in fourth gear
for the remainder of the simulation.

Gradual Acceleration maneuver


Figure 117: Gradual Acceleration Maneuver, Engine RPM

Figure 118: Gradual Acceleration Maneuver, Gear-shift


Figure 119: Gradual Acceleration Maneuver, Throttle and vehicle speed

Observation

As the driver steps to 13.4% throttle at t = 0, the engine immediately


responds by increasing its speed. This brings about a low speed ratio
across the torque converter and, hence, a large torque ratio (see Figs. 110
and 112).

As Ne increases speed ratio decreases. Looking at the relation between


torque ratio and speed ratio using the map, we can see that a large
torque ratio is generated.

The vehicle accelerates quickly and both the engine and the vehicle gain
speed until about t = 2.44, at which time a 1-2 upshift occurs. The engine
speed characteristically drops abruptly, then resumes its acceleration. The
engine torque thus increases somewhat, as well as the mechanical
advantage of the transmission. With continued heavy throttle, the vehicle
accelerates to about 30.06 mph and then shifts into overdrive at about t =
21.68. The vehicle cruises along in third gear for the remainder of the
simulation.

Hard Braking Maneuver

Figure 120: Hard Braking Maneuver, Engine RPM


Figure 121: Hard Braking Maneuver, Gear-shift

Figure 122: Hard Braking Maneuver, Throttle (%)


Figure 123: Hard Braking Maneuver, Brake torque (Nm)

Observation
As the driver steps to 50% throttle at t = 0 continuously, the engine
immediately responds by increasing its speed. This brings about a low
speed ratio across the torque converter and, hence, a large torque ratio
(see Figs. 113 and 117).

As Ne increases speed ratio decreases. Looking at the relation between


torque ratio and speed ratio using the map, we can see that a large
torque ratio is generated.

The vehicle accelerates quickly and both the engine and the vehicle gain
speed until about t = 1.56, at which time a 1-2 upshift occurs. The engine
speed characteristically drops abruptly, then resumes its acceleration.
Both the engine and the vehicle gain speed until about t = 4.2, at which
time 2-3 upshift occurs. The engine speed characteristically drops
abruptly, then resumes its acceleration till t=5 and drops abruptly after
t=5, as the driver applies throttle of 1% thereafter due to which the
vehicle speed gradually decreases.

This is followed by a step-in brake torque at t = 10. Again, the large


vehicle inertia dominates the dynamics as it eventually slows down to a
crawl. The gear shifts occur at about 19.6 and 27.68 seconds, ending in
first gear.

Coasting Maneuver
Figure 125: Coasting Maneuver, Engine RPM

Figure 126: Coasting Maneuver, Gear-shift


Observation

As the driver steps to 80% throttle at t = 0 continuously, the engine


immediately responds by increasing its speed. This brings about a low
speed ratio across the torque converter and, hence, a large torque ratio
(see Figs. 118 and 120).

As Ne increases speed ratio decreases. Looking at the relation between


torque ratio and speed ratio using the map, we can see that a large
torque ratio is generated.

The vehicle accelerates quickly (no tire slip is modeled) and both the
engine and the vehicle gain speed until about t = 2.2, at which time a 1-2
upshift occurs. The engine speed characteristically drops abruptly, then
resumes its acceleration. The 2-3 and 3-4 upshifts take place at about
t=4.84 and 4.88 seconds. Notice that the vehicle speed remains much
smoother due to its large inertia.

At t = 4.84, the driver steps the throttle to 1% as might be typical of a


coasting maneuver. The transmission downshifts to third gear at t=27.2
The engine torque continues with its minimum threshold value. With
continued throttle of 1%, the vehicle decelerates to about 32.71 mph.

In Short!

In this module we have modelled the engine, torque converter and the
automatic transmission systems. Physics based equations have been used
to relate the input and output variables. We have also designed a shift
logic which governs the gear shift given the speed of the vehicle at that
instant and the throttle command from the user.

The system is tested and analyzed using 4 distinct maneuvers namely,


passing, gradual acceleration, hard braking and coasting. Further the
engine and vehicle speed variations as well as their corresponding gear
shifts are analyzed for better understanding of the behavior of the
transmission system.
You must have observed that the given system does not possess a neutral
gear. You can try and introduce a neutral gear in the transmission by
changing the gear shift logic and also keeping in mind to introduce a
neutral ratio in the transmission box.

We have determined the gear shift logic on the basis of two factors, speed
and throttle, modern transmission system controllers are able to decide
gear shifts on the basis of other crucial factors such as fuel efficiency of
the vehicle as a whole.

You can also further explore other transmission systems such as CVTs!

Battery

The EV industry today is focusing on the improvement of Battery Technology. A


well designed BMS(Battery management system) ensures efficiency, reliability
and safety. The battery module throws light on understanding key parameters of
batteries and it will guide you step by step to construct and test your own
battery model with the help of Simulink.

Battery Modeling | Introduction


In this section we will see how to model a battery in Simulink. In
Simscape, we can directly use the SimPower Systems Battery.

This is a masked model and you can investigate this model further. To
uncover the mask, right click on the battery>>Mask>> Look under mask.

Modelling the Electrochemical reactions of the battery is difficult. Hence


engineers prefer other ways of representing/ modelling the battery
behaviour. One example is the SimPower Systems battery. After
uncovering the mask, you can observe that this model consists of
equations replicating the battery behaviour.

Another approach is empirical. Graphs and Lookup tables with data


generated from tests can help make the model behave as realistically as
possible. Graphs between Voltage and SOC are commonly used. In this
model we will be using the lookup table approach for modelling.
Nominal Voltage
The nominal voltage is the average voltage the battery outputs when
charged. This is a common parameter used by manufacturers to define
their batteries.

Capacity
Capacity is the amount of charge stored in the battery. The unit for
capacity is Ampere-Hour (A-hr). We can say that if the battery has a
capacity of 1000mAhr then we can discharge the battery completely in an
hour by draining a continuous 1000mA current. Remember:

Here ‘i’ is in Amperes and the limits of ‘t’ are in seconds.

C Rate
The C rate gives an idea of the rate at which the charge is being
consumed. Rate of change of charge is current. C rate is defined as:

This means that for a 1000mAh battery if a current of 500mA, 1000mA


and 2000mA is drawn then the C rate is:

The manufacturer generally provides maximum charge and discharge C


rate. Using the battery at a higher C rate than what is recommended will
damage it.

State Of Charge
The State of Charge also known as SOC is defined as:

The SOC is monitored closely in a battery. The BMS of a Li-ion Battery


ensures that all the cells are working in the same SOC range. The SOC
helps in determining the state of the battery.
A few other concepts such as State of Health and Depth of Discharge can
also be understood in a similar manner.

SOC And Voltage


Models of batteries make use of the relation between the battery’s SOC
and Voltage. As the SOC of the battery drops, the charge material reduces
thus reducing the potential difference between the two electrodes. This is
modeled using a simple graph.

Lookup Table
Lookup Tables are graphs like the one shown above. Lookup tables take at
least one input to give the corresponding output. For example for the
graph above, a lookup table will take the SOC as the input and give the
corresponding Voltage as the output.
Figure 1: Types of lookup
tables available in Simulink
In this module we will be using a simple 1 D Lookup Table which takes the
SOC as the input (breakpoints) and gives the Voltage as the output (table
data).

Battery | Building the Model – Building the Battery Model

Step 1]
To calculate the SOC of the battery at any given point of time, we select
the following components from the library.

Step 2]
We name the input ports as I_a (armature current) and I_regen
(regenerative current). Set the value as Qmax for the Constant block
Step 3]
Pass the current signals through the respective Integrator blocks to
determine the charge supplied by the battery to the motor and the charge
regenerated. Note the unit of charge so calculated is A-s.

Step 4]
Pass the Qmax signal through two gains. The first converts the charge
from A-hr to A-s (value=3600), while for the second set the value as
Initial_SOC. The second gain is the fraction of the maximum charge
available at the time of start.
Step 5]
Subtract the Charge Supplied by the battery to the motor (I_a) from the
Charge at start and add the Charge Regenerated.

Step 6]
Divide the Charge Left by the Maximum charge available to obtain the
SOC. Add a Saturation block and set the upper limit as 1 and lower limit as
0 to ensure the SOC remains between zero and one.

The order of signs in the divide block can be changed by double


clicking on it and changing the order in Number of inputs.
Step 7]
Select the 1 D Lookup Table from the Lookup Table Library. The SOC
obtained in the last step is sent to the lookup table which outputs the
corresponding normalized voltage.

Step 8]
Double click on the Lookup Table and set the Table Data value to
normalized_V and Breakpoints as SOC.
Step 9]
Multiply the normalized voltage value obtained with the nominal voltage
to obtain the battery voltage at the given point of time. Connect the Vb
signal to Output port.
You can also attach an output port to the SOC signal.

The final model looks as follows:


Figure 2: Battery Simulink model.

Building the Model – Preparing the Script


In the script for the battery we declare all the required data stated as
variable in the Simulink model. The variable Q_max is the battery
capacity, commonly expressed in A-hr. The Initial_SOC refers to the
fraction of total capacity initially available at the time of start. The SOC
and normalized_V variables are array which initialize the lookup table. The
nom_V is the battery nominal voltage expressed in Volts.

Table 1: Variables declared in the script


The array SOC is declared as follows:

SOC=0:0.1:1;

This command takes 10 values in the range 0 to 1 in steps of 0.1. The


normalized voltage array values are:

normalized_V=[0; 0.35; 0.8; 0.95; 1; 1.02; 1.06; 1.09; 1.12; 1.15;


1.18];
Figure 3: Script for Battery

Battery Testing – Constructing the Test Rig

Step 1]
Add an output port and connect it to the SOC signal if not done so yet.

Step 2]
Create a subsystem of the created battery model by selecting all >> right
clicking on any component >>choose Create Subsystem. Delete the I/O
ports outside the subsystem.

Step 3]
Connect two Constant blocks to the I_regen and I_aports respectively. The
values of each will be decided on whether we want to conduct charging or
discharging test.
Step 4]
Add a scope and click on the settings option in the scope window. Here,
under the tab General, set the Number of Axes as 2 and check the
Legends option. Uncheck the Limit Data Points option in the Logging tab.
Connect the scope to the Vb and SOC output ports.
Step 5]
In the Sink library choose the Stop block. Connect the Stop block to the
SOC signal through a Compare to Constant block from the Logic and Bit
Operations Library. This serves as a switch which stops the simulation
given a condition.

With this the battery test rig is ready. Next we will see the Charging and
Discharging test. We will be changing the following variables in the test
rig to shift between the two tests:
Battery Testing – Discharging
During discharging the battery is drained at a constant rate. The
discharge rate determines the time required for the battery to discharge
completely from 100% SOC.

In our case, Qmax=142 A-hr, a discharge current of 142 A will discharge


the battery in 1 hr. Twice the discharge current (284 A) implies battery
discharging at twice the rate and hence reaching 0% SOC in half an hour.
For half the discharge current (71 A) the battery will discharge at half the
rate and last for two hours.

For the discharge test, we will discharge the battery at 5 different


currents.
1.Set the constant value connected to I_regen as zero and vary the
constant value connected to I_a (35.5, 71, 142, 284 and 568).
2.Double click on the Compare to Constant block and set the Constant
Value as 0 and operator as ‘==’.
3.In the script, set the Initial_SOC value to 1.
Set the Simulation Time 15000. Set solver to ODE23t. Run the script in
workspace first and then simulate the model.
We can observe the discharge characteristics of the battery for the
currents in the following graph. (Battery Voltage versus Time)

Figu
re 4: Battery discharge characteristics for different currents.
The observed time for discharge is recorded in the following table.
Table 2: Discharging at different rates.

Battery Testing – Charging

For charging we will be charging the battery at 5 different currents (35.5


A, 71 A, 142 A, 284 A and 568 A).
1.For charging test set the I_a as zero and vary the current for I_regen.
2.Set the Initial_SOC value as 0.
3.Double click on the Compare to Constant block and set the Constant
Value as 1 and operator as ‘==’.
Keep the simulation time and solver same as the discharging test. Run the
script and then simulate the model.
We observe the following battery charging characteristics (Battery Voltage
versus Time):

Figure 5: Battery charging characteristics for different charging rates

Table 3: Battery charging test results


In Short!
In this module we have learnt the basics of batteries and developed an
understanding of C-rate, SOC, Capacity and Nominal voltage of the
battery. We have also analysed the relation between the SOC and voltage
available at the battery terminals.

The battery is modelled using physics based equations and a lookup table.
We have analysed the Charging and Discharging behaviour of the battery
and further analysed the graphs obtained for charging and discharging
the battery at different currents.

With the demand for increasing electrification of Automobiles, there is a


growing need to invest and study battery technologies. As an engineer it
is crucial for us to predict the battery life and behaviour better. In this
module we have seen the dependence of battery life (hours on one
charge) on the current drawn by the system. Other factors such as,
temperature, Depth of Discharge, maximum charge available also
influence the battery performance as well as its lifetime greatly.

Given this foundation you can try and model the thermal effects as well as
develop an algorithm to predict the expected lifetime of the battery!

You might also like