Power Train
Power Train
Power Train
Drive Motor
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.
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.
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.
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:
At the time of start, the terminal voltage ‘V’ is applied and the motor shaft
is at rest omega(ω) = 0. Hence:
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:
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.
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:
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:
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.
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.
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:
One can refer the PID module to understand the significance of the
parameters mentioned above.
Using a P Controller
Step 1]
Step 2]
Step 3]
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.
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
Using PI Controller
Step 1]
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.
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]
Connect the derivative branch to the error and add to get the control
signal
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
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]
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.
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.
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.
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.
By simplifying we observe
Case (1) Kt = Ke
Case (2) Kt > Ke
Case (3) Kt < Ke
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:
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]
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.
In our case:
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 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
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.
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.
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.
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!
Analyse the results obtained in Case (2) Kt > Ke and (3) Kt < Ke and try
to reason why these two are invalid.
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
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:
The points on the same contour denote engine operating points. Observe
that to reduce the BSFC, one should move vertically above.
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]
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]
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.
Step.1]
Step 3]
Add the following lines of code to your script for the engine map:
Step 4]
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
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.
To plot all the torque graphs and power graphs generated at different
throttles together, follow the steps:
Step 1]
Step 2]
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)
>>hold on
>>figure(2)
>>hold on
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.
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.
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
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.
Let the equations that govern each subsystem walk you through the
modelling of the same.
Equations
Engine
Net torque on engine will be the difference between the torque generated
due to engine and torque generated due to impeller.
Ratio of Turbine speed (RPM) and Engine speed (RPM) is defined as Speed
Ratio.
Turbine torque is defined as the product of the Torque ratio, for a given
Speed ratio, and Impeller torque.
Transmission Ratio
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.
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,
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]
Step 3]
Right click on the variable name and click on Save As to save the data.
The data to be added along with their names are given in the next
section.
Data To Be Added
EMAP
NE_VEC
Figure 12: NE_VEC
TH_VEC
Kfactor
Figure 14: Kfactor
SpeedRatio
Figure 15: SpeedRatio
TorqueRatio
Figure 16: Torque Ratio
DOWN_TABLE
Figure 17: DOWN_TABLE
DOWN_TH_BP
UP_TABLE
UP_TH_BP
Figure 20: UP_TH_BP
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.
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).
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.
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.
Step 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).
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.
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.
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).
Step 13]
Select the complete Vehicle module and right click. Select Create
Subsystem from Selection from the dropdown.
Step 14]
Step 15]
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.
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).
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.
Step 22]
Figure 42: Subsystem Engine Modelling,7
Step 23]
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
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).
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.
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]
Step 32]
Select the complete Torque Converter module and right click. Select
Create Subsystem from Selection from the dropdown.
Step 33]
Step 34]
Remove the Input and Output Ports Nin and Turbine torque of the
subsystem Torque Converter.
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
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).
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.
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]
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]
Step 34]
Remove the Input and Output Ports Nin and Turbine torque of the
subsystem Torque Converter.
Figure 56: Subsystem Torque Converter Modelling,11
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.
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).
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.
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.
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]
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]
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]
Step 45]
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.
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.
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).
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]
Step 53]
Step 54]
Remove the Input and Output Ports, Vehicle speed and Gear of the
subsystem Gear Box.
Step 55]
Let us first arrange the modules to have a better understanding of flow of
signals.
Step 56]
Connect Gear Box: Input Port> Vehicle speed to Vehicle: Output Port>
vehicle speed.
Connect Gear Box: Output Port> Gear to Transmission: Input Port> Gear.
Step 57]
Create an Input Port, name it as Brake.
Step 58]
Connect the Input Port, Brake, to Vehicle: Input Port> Brake torque.
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.
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.
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,
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.
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.
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)
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)
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.
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.
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.
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.
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.
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.
Observation
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.
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).
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.
Coasting Maneuver
Figure 125: Coasting Maneuver, Engine RPM
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.
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.
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
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.
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:
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:
State Of Charge
The State of Charge also known as SOC is defined as:
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).
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.
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.
SOC=0:0.1:1;
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.
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.
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.
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!