Development of Hardware-In-The-loop Simulation System For Electri
Development of Hardware-In-The-loop Simulation System For Electri
Dissertations, Master's Theses and Master's Dissertations, Master's Theses and Master's
Reports - Open Reports
2015
Recommended Citation
Liu, Chuanliangzi, "DEVELOPMENT OF HARDWARE-IN-THE-LOOP SIMULATION SYSTEM FOR ELECTRIC
POWER STEERING CONTROLLER TESTING", Master's report, Michigan Technological University, 2015.
https://doi.org/10.37099/mtu.dc.etds/992
By
Chuanliangzi Liu
A REPORT
Submitted in partial fulfillment of the requirements for the degree of
MASTER OF SCIENCE
In Mechanical Engineering
iii
4.2 ASM Vehicle Dynamics Model Description .................................................................... 23
4.2.1 Vehicle Movement Subsystem .............................................................................. 24
4.2.1.1 Vehicle Motion Car ............................................................................................ 25
4.2.1.2 Vehicle and Wheel Velocities ............................................................................. 26
4.2.1.3 Mass Forces and Torques................................................................................... 27
4.2.1.4 Coordinate Transformation ............................................................................... 28
4.2.2 Suspension Subsystem ........................................................................................... 28
4.2.2.1 Rotation Switch .................................................................................................. 29
4.2.2.2 Front Symmetric Suspension Kinematics ........................................................... 32
4.2.2.3 Suspension Compliance ..................................................................................... 36
4.2.2.4 Relative Velocities .............................................................................................. 40
4.2.2.5 Relative Position ................................................................................................ 41
4.2.2.6 Front Suspension Forces .................................................................................... 42
4.2.2.7 Generalized Front Suspension Forces ................................................................ 43
4.2.3 Steering Subsystem ................................................................................................ 46
4.2.3.1 Force on Steering Rack....................................................................................... 47
4.2.3.2 Generalized Force and Torques ......................................................................... 48
4.2.3.3 Steering Mass ..................................................................................................... 49
4.2.3.4 Displacement of Steering rack ........................................................................... 50
4.2.4 Tire Subsystem ....................................................................................................... 50
5 MODEL INTEGRATION AND OFFLINE SIMULATION OF INTEGRATED MODEL ....................... 51
5.1 The Integration of ASM Model with Steering Model..................................................... 51
5.2 Offline Validation Results of the Integrated Mechanical Model ................................... 55
5.2.1 Maneuver Signal Design......................................................................................... 55
5.2.2 Ramp Steer Test ..................................................................................................... 61
5.2.3 Single Lane Change Test......................................................................................... 66
6 CONCLUSIONS ........................................................................................................................ 71
REFERENCES............................................................................................................................. 72
APPENDIX ................................................................................................................................... 74
iv
LIST OF FIGURES
v
Figure 5.10 Single Lane Change waveform .................................................................................... 61
Figure 5.11 Ramp Steer Time Plots@20kph .................................................................................. 63
Figure 5.12 Ramp Steer Cross Plot @20kph .................................................................................. 63
Figure 5.13 Ramp Steer Time Plots @60kph ................................................................................. 64
Figure 5.14 Ramp Steer Cross Plot @60kph .................................................................................. 65
Figure 5.15 Ramp Steer Time Plots @100kph ............................................................................... 66
Figure 5.16 Ramp Steer Cross Plot @100kph ................................................................................ 66
Figure 5.17 Single Lane Change Time Plots @20kph ..................................................................... 67
Figure 5.18 Single Lane Change Cross Plot @20kph ...................................................................... 68
Figure 5.19 Single Lane Change Time Plots @60kph ..................................................................... 69
Figure 5.20 Single Lane Change Cross Plot @60kph ...................................................................... 69
Figure 5.21 Single Lane Change Time Plots @100kph ................................................................... 70
Figure 5.22 Single Lane Change Cross Plot @100kph .................................................................... 70
vi
ACKNOWLEDGEMENTS
First and foremost, I would like to express my sincere gratitude to my advisor, Dr. Bo Chen,
for giving me the opportunity to work on this research project, providing the work space
and equipment, and her aspiring guidance during the project work.
I would like to thank the rest of my committee members: Dr. John E. Beard and Dr. Jeffrey
B. Burl, for their valuable time, encouragement and insightful comments.
My sincere thank also goes to Mr. Anthony Champagne and Mr. Keyur Patel from Nexteer
Automotive, for their guidance and technical support in this project.
I would like to thank Senior Design Team 6 supervised by Dr. Jeffrey B. Burl in Michigan
Tech Electrical and Computer Engineering Department, for their calibration work in this
project.
Last but not least, I would like to thank my family for their support and encouragement
through my entire life especially during my research project in the past year.
vii
ABSTRACT
The Electronic Control Unit (ECU) of an Electric Power Steering (EPS) system is a core
device to decide how much assistance an electric motor applies on steering wheel. EPS
ECUs play an important role in EPS systems. The effectiveness of EPS ECUs needs to be
thoroughly tested before mass production. Hardware-in-the-loop (HIL) simulation
provides an efficient way for the development and testing of embedded controllers. This
report focuses on the development of HIL system for testing EPS controllers. The hardware
of the HIL system employs a dSPACE HIL simulator. The EPS plant model is an integrated
model consisting of Vehicle Dynamics model of the dSPACE Automotive Simulation
Model (ASM) and the Nexteer model. The report presents the design of EPS HIL system,
the simulation of sensors and actuators, the functions of ASM Vehicle Dynamics model,
and the integration method of ASM Vehicle Dynamics model with Nexteer model. The
offline simulation of the integrated model is performed and the results for different driving
maneuvers are presented. The real-time HIL testing will be conducted in the future to
examine the performance of an entire HIL system.
viii
1 INTRODUCTION
1.1 Motivations
With increasing demands on driving handiness flexibility, ride comfort, and safety, EPS system
has been gaining popularity in recent years and widely used in modern cars. An ECU is a core
component of EPS system since it decides how much assistant power the EPS provides in different
situations. Considering the Steering System deterministic influence on vehicle stability,
developing algorithms for an EPS ECU is not only for the effectiveness of the steering system, but
also the whole car performance. Therefore, a repeated testing of EPS ECUs at an early
development phase, prior to road testing, is necessary to check the reliability under various
operating scenarios.
HIL Simulation is a widely used technology in automotive industry for the development and
testing of real-time embedded control systems. HIL system provides an effective simulation of
physical plant for ECU design and testing. HIL testing shortens the development time; cuts down
the cost; and reduces the risk from in-vehicle driving test, while improves the ECU software quality
at the same time. HIL system enables to test the behavior and effect of EPS in various critical
situations.
In this report, HIL system serves as a simulated vehicle to connect to an EPS ECU and test its
control performance in real time. The goal of this research is to develop a dSPACE HIL system
that can be used to test an EPS ECU for various driving maneuvers in the laboratory of IMES.
Waeltermann [1] provides an overview of the HIL technology. He defines HIL simulation as a
method used in the electronics development process in which real subsystems, including one or
more ECUs, controllers, or intelligent mechatronic components interact with subsystems that are
simulated in real time. The basic hardware components of HIL system include host PC, real-time
processor system, I/O boards and signal conditioning, Bus systems, electrical loads and load
simulation, electrical fault simulation, real components and power supply. The software
1
components consist of the operating software MATLAB/Simulnk, the real-time software and the
dynamic plat model. Several Automotive HIL applications are thoroughly described, such as
engine test system, vehicle dynamics and electric drives.
Pfister et al. [2] gives a brief summarization of the developments of HIL simulation technology.
The significance of the wide adoption of HIL simulation in automotive industry is explained in
details. First, HIL is an effective tool for designing, testing and evaluating ECUs. Second, HIL
makes it possible to assess the performance of final products in advance of prototyping and also
make design optimizations timely. Third, HIL which uses computer simulations is able to reduce
development cost and shorten product development cycles. Forth, the rapid development in
simulation software and computer hardware facilitates the use of HIL which requires real-time
simulation.
Schuette and Waeltermann [3] demonstrate the use of HIL simulation for the development of
modern vehicle dynamics controllers. The specific sensors and actuators commonly used for
vehicle dynamics control and the interfaces for HIL simulation are described. The simulation
models are outlined. Application examples of HIL simulation for vehicle dynamics ECUs are
presented.
Grunewald [4] introduces functional testing of an electric power steering using HIL simulations.
A HIL test bench solution developed by Daimler AG is employed for testing functionalities of
EPS. The paper introduces a simulation environment for the vehicle dynamics with an EPS
connected to it as a real device. The complex EPS software is examined, including functions such
as active return, steering feel function, active damping, and etc. Not only the behavior of the
steering system is analyzed, but also its interaction with other systems is evaluated by means of
combined test benches.
Lee et al. [5] focused on the establishment of the Hardware-In-the-Loop Simulation (HILS) system
to be applied in the development process of an electronic steering device. The developed electronic
steering device was installed in the HILS system and applied with a control algorithm, which could
accomplish improvements on the precision of steering torque and the feeling of steering. In
addition, malfunction situations were tested and self-diagnosis function was verified.
Kim and Song [6] aim at developing EPS control logic for the reduction of steering torque exerted
by a driver, realization of various steering feels, and improvement of return-to-center performance.
To verify the proposed control logic, a HILS system was constructed with a load motor attached
to a rack-and-pinion system to simulate the load resulting from lateral and longitudinal tire forces
from road.
2
Segawa et al. [7] conducted preliminary study concerning quantitative analysis of steering system
using HIL Simulator.
3
2 HARDWARE IN THE LOOP SIMULATION
This chapter introduces the basic concept and architecture of HIL system and describes the
components of dSPACE HIL Simulator. For each component, their functionalities and hardware
configuration are presented. The detailed introduction of dSPACE HIL simulator components
facilitates to further discussions of their applications in EPS HIL system in the next chapter.
HIL simulation is an increasingly prevalent technique in automotive industries, which has been
used in the development and test of complex real-time embedded systems. Figure 2.1 illustrates
the basic architecture of the HIL system.
4
As shown in Figure 2.1, HIL simulation includes plant simulation, sensors and actuators emulation.
The plant is simulated as a dynamic system, represented by a series of mathematical equations.
The electrical emulations act as the interface between the plant simulation and the embedded
system under test. The procedure of HIL system process is presented as follows: emulated sensor
signals from plant simulation are read by embedded controller under test, which will generate
actuator control signals by implementing control algorithms in the controller. Then, the actuation
signals from controller will update the variables in the plant simulation. This loop continues to
examine the performance of embedded control algorithms. Therefore, the core concept of HIL
simulation is to develop and test an embedded system by connecting it with a virtual plant, which
is emulated from dynamic models in HIL system platform.[1] [8]
dSPACE EcoLine simulator is a HIL simulator to test ECU. There are five variants of simulators
tailored to test different ECU types. The one in IMES Lab is Engine Solenoid Simulator, used for
HIL simulation of ECUs for engines with solenoid injectors. It is connected to a host PC by a bus
for purpose of downloading the real-time model to the simulator and controlling the simulation
[9].
Figure 2.2 shows the front view of the dSPACE EcoLine simulator in IMES Lab. The general
structure with specific modules and components on front panel are designated in the figure. Figure
2.3 shows the hardware components in dSPACE HIL simulator and the internal connection and
signals between each component.
5
GND VBT1 VBT2
P2 P3 P1 P4 HYP1 HYP2 HYP3
CANalyzer connector
tor
CARB connectororr
o
Real-time system
(DS1006, DS2211, DS5202)
Power Supply
ECU Connectors
onnec Real-time System ECU Connectors
onnec
(PX expansion box)
DS1006 Processor
ocesso Board
6
As illustrated in Figure 2.3, the core components of the real-time simulator are DS1006 Processor
Board and DS2211 HIL I/O Board. DS5202 FPGA Base board is added with Electric Motor HIL
(EMH) Solution to simulate the electric motor. Engine signals from the engine ECU are routed to
the real-time system by DS5376 Wiring Board and two signal conditioning modules, DS223 and
EV1025 [9]. Simulink models can be directly downloaded into real-time system through auto-code
generation. The online calibration task can be realized through dSPACE ControlDesk Next
Generation (CDNG). Elaboration of each component is presented in the following subsections.
The Sensor and Actuator Interface (SAI), consisting of standard I/O and timing I/O, includes
several functional units:[11]
In this research, PWM signals are measured by channels on DS5202 FPGA Board rather than
DS2211 Board because the high-precision requirement of 3-phase PWM signals measurement
cannot be satisfied by DS2211. Also, Engine EcoLine is used as a HIL simulator to test EPS ECU
rather than an engine ECU.
7
2.2.3 DS5202 FPGA Base Board
The DS5202 FPGA Base Board is designed for HIL simulations that require high-timing and high-
resolution signal generation and measurement such as high-precision digital capturing of 3-phase
PWM signals and electric motor simulation. For the purpose of fast and precise response of electric
motor signals so as to decide the assistant torque to be applied in real time, using DS5202 to
simulate the electric motor is an ideal option. The DS5202 FPGA Base Board can be programmed
by different FPGA code and carry different types of I/O piggyback modules for different
applications. The normal operation of DS5202 requires compatible version of DS5202 firmware
and the I/O piggyback module.[12]
In this research, the 3-phase PWM signals coming from the EPS ECU are measured by EMH
Solution, b and c phase current calculated by DS1006 processor board are then sent back to the
ECU via analog output channels on EMH Solution.
In our system configuration, EV1053 Piggyback Module with EV1062 Digital I/O Extension
Board is plugged onto the DS5202 FPGA Base Board for electric motor simulation, as shown in
Figure 2.3. The EV1053 Piggyback Module provides standard analog and digital inputs and
outputs necessary for simulation of an electric motor. The EV1062 Digital I/O Extension Board
provides 15 input channels for center-aligned PWM measurement, two high-speed digital output
channels and two digital input channels.[12]
Signal Conditioning (SC) modules in dSPACE HIL simulator is used for some of the signals which
require additional signal conditioning. The types of the SC modules depend on the simulator
8
variant. In Engine Solenoid variant, DS223 and EV1025 modules are necessary components for
signal conditioning.[9]
9
3 EPS HIL SIMULATION SETUP
This chapter introduces EPS system and presents the HIL simulation setup for EPS system using
dSPACE Ecoline simulator. Sensors and actuator simulations are demonstrated with details by
introducing the basic principle, setup and interface blocks to be used. The setup and configuration
of PWM Signal Measurement and CAN Module are introduced as well.
Figure 3.1 illustrates the physical structure of a steering system. In addition to the components that
a conventional column-type steering system always has, including steering wheel, steering column,
and rack and pinion mechanism, the EPS system has an assist motor connected to the steering shaft
through gears. The motor is a BLDC (brushless dc) motor and provides assisting torque to support
driver’s steering.
Depending on an electric motor as a power source, EPS system augments the steering effort on
steering wheel to improve the portability and controllability of steering comparing to traditional
mechanical steering which uses driver’s turning force to maneuver.
Steering Wheel
Torsion bar
Steering Column
Steering Column Damping
Stiffness
10
The main purpose of an EPS system, which is to provide assist to a driver, is achieved by an EPS
control system, as shown in Figure 3.2.
Rack
&
Pinion
Generally, an EPS system consists of a steering wheel torque sensor, vehicle speed sensor, EPS
ECU, electric motor, rac
rack and pinion, and so on.
The basic principle of an EPS system can be summarized as follows: the torque sensor mounted
on steering column measures the driver’s torque and sends a torque signal to the controller
proportional to this torque. Also, the EPS controller takes in vehicle speed signal. These input
values are processed in the controller, and a three-phase PWM control signal is generated. The
PWM control signals determine the three-phase currents flowing in the electric motor, which
decide the motor assist torque. The assist torque is then applied to the steering column through
gear mechanism. Also, a motor position sensor measures the motor positions and sends positions
signals to EPS controller.
Since the electric motor is connected to the steering column, the magnitude and direction of assist
torque will be acted on the wheels via rack and pinion system. The amount of assistance being
applied could be varied in different driving conditions whether a vehicle is stopped, driving slowly
or fast, which is realized by EPS ECU with specific control logic. EPS system provides more
reliable and effective support comparing to other power steering systems.
11
3.2 Overview of EPS HIL Simulation Setup
For this research, a dSPACE HIL test bench is employed to analyze the behavior of the steering
system and test their functionality. Figure 3.3 shows the implementation of the HIL test bench for
EPS ECU testing including all the hardware and software used.
Host PC
Simulation Models
download
RTI
Experiment Environment
Access
Control Desk
Cable Harness
ECU Interface
Software ECU Calibration Tool EPS ECU
Figure 3.3 dSPACE HIL Test Bench for EPS ECU Testing
As shown in Figure 3.3, a vehicle plant model is built in Simulink and dSPACE ASM. Real-Time
Interface (RTI) blocks are necessary in the model to connect the Simulink and dSPACE ASM
model to dSPACE I/O board. C code can be automatically generated from dSPACE/Simulink
models and downloaded to real-time hardware. The dSPACE simulator can be considered as a
virtual vehicle connected with an EPS ECU through cable harness. An ECU Calibration Tool
connects the EPS ECU to the host PC through an USB cable. The ECU Interface Software can be
used to monitor and change variable values of the ECU. Modifications to variable values is either
through a CAN interface or by modifying the source binary file and re-programming the ECU’s
non-volatile memory. CDNG is the dSPACE experiment software for seamless ECU development.
It provides access to simulation platforms and connected bus systems, and can perform
measurement.[3]
12
Figure 3.4 shows an overview of dSPACE HIL simulation for EPS system, including brief
illustration of plant model, sensors and actuators simulation, and signal flow between dSPACE
HIL simulator and EPS controller.
CAN H
Vehicle
CAN Subsystem
Speed
CAN L
Reaction Rack
Force Displacement
Steering Torque Torque 1
T-bar
Torque
Sensor
Torque 2
EPS
Simulation
Controller
Steering System 3 Phase Current Sensor
Phase B&C Current
Current Simulation
Sine/Cos (4)
Motor Position Sensor
Speed Simulation
Index (2)
dSPACE ASM
Electric Components
Power Stage
3-Phase PWM Signals
Simulation
As shown in Figure 3.4, the plant model consists of three main parts, dSPACE ASM Vehicle
Dynamics Model, Steering System and dSPACE ASM Electric Components. Reaction force and
rack displacement are communicated between the first two models. Detailed analyses of these
models are discussed later.
Signals communicated between HIL simulator and EPS controller are shown in Figure 3.4. EPS
controller is powered by an ignition signal of dSPACE HIL simulator and a temperature sensor is
simulated. The vehicle speed is calculated by the plant model and transmitted through CAN bus.
Steering torque sensor is simulated and two torque signals are sent to EPS controller. The EPS
controller processes the information by implementing the control logic and determines the 3-phase
PWM control signals. A current sensor is also emulated to measure B and C phase current flowing
in the electric motor. A position sensor determines the motor position and sends out four sine and
13
cosine signals and two index signals, which will be explained later. Sensors and actuator
emulation, PWM signal measurement and CAN Module setup are discussed in detail below.
In this research, torque sensor and temperature sensor are simulated by using DS2211 I/O board
DAC channels. Board and channel numbers for different sensors to be simulated are specified.
Detailed discussion on torque sensor simulation will be presented in later subsection.
Because high precision calculation is required by EPS electric motor, DS5202 EMH Solution is
used to simulate and measure all the electric motor signals, including three phase motor current
signals and motor position signals. DS5202 EMH SETUP block is necessary for all functions used
on DS5202 EMH Board.
DS2211 DAC
Channelwise
(Boad #1, Channel #1)
DS2211 DAC
Torque Sensor 1 Channelwise
(Boad #1, Channel #3)
DS2211 DAC
Channelwise
(Boad #1, Channel #2)
Torque Sensor 2
14
Torque sensor is simulated through DAC channels on DS2211 I/O board, which contain 20 parallel
D/A converters with 12-bit resolution. As illustrated in Figure 3.5, the DS2211DAC block is a
Channel-wise D/A Conversion block, which is used to write to individual D/A channels. The
channel number must be specified for individual channels. The board number should be selected
as 1 in our HIL system.
There are 11 DS2211 DAC channels on ECU 2 connector of the dSPACE Ecoline simulator which
can be selected in consistent with the channel number specified to simulate the torque sensor.
DS5202_EMH_ANALOG_
SENSOR_SETUP
(APU1)
Reset APU
[0/1] DS5202_EMH_APU_IN
Speed [rpm] (APU1)
15
DS5202_EMH_SETUP block is required if any DS5202 EMH Solution I/O is used in the model.
It is used to initialize the DS5202 EMH Solution and configure the signal behavior for all digital
inputs. Inside the DS5202_EMH_SETUP block, we are able to specify the signal behavior, high
active or low active for each of eight gates of the PWM groups.
Six out of seven analog output channels on DS5202 EMH solution board are on 50-Pin Female
Sub-D Connector P2 of dSPACE Simulator Ecoline. Therefore, two of the channels could be
selected for current sensor simulation. To be compatible with the Analog output number selected
in the DS5202_EMH_ANALOG_OUT block, the pins designated for B and C phase current
signals on EPS controller must be connected to the specified pins on Connector P2.
In this research, once the B and C phase motor currents are measured, the corresponding analog
voltage signals are calculated and sent to the EPS controller through
DS5202_EMH_ANALOG_OUT block.
The simulated sine encoder consists of three output channels, A, B, and C (also called index), as
shown in Figure 3.7. The Sine incremental signals A and B are 90 degree phase-shifted with each
other for the determination of rotational direction. The output voltage (Vpp) and DC offset voltage
are defined as 1.0V and 2.5V, respectively [12]. The index generates one pulse per revolution,
which is useful to decide the absolute position by counting the number of full revolutions.
16
Figure 3.7 Sine Encoder Signals
17
Figure 3.8 DS5202_EMH_ANALOG_SENSOR SETUP
Six specified pins on the 50-Pin Female Sub-D Connector P3 of dSPACE Simulator Ecoline,
shown in Figure 2.2, are set specifically for the six signals, A, A1, B, B1, C (index), C1 (index1) in
Figure 3.7, which are generated by DS5202_EMH_APU_IN. Therefore, the pins of the EPS
controller defined for the six motor positions signals must be connected to the corresponding pins
on dSPACE P3 Connector, to enable the perfect position sensor signal communication between
the dSPACE HIL Simulator and the EPS controller.
18
For standard PWM measurement, the EV1053/EV1062 provides up to 8 channels with a resolution
of 16 bits (The channels are shared with center aligned PWM input signals). Figure 3.9 shows all
the blocks used for PWM signal measurement.
Function-call subsystem
DS5202_EMH_HW_INTERRUPT
This INTERRUPT block defines the external PWM signals received from EPS ECU as trigger
source in the model. DS5202_EMH_PWM_IO in a function-call subsystem is used to measure
duty cycles, latch time, gate active times, period times and dead times of up to 8 center aligned
PWM input signals. The DS5202_EMH_PWM_SETUP block must be in the model at the same
time for using the IO block.[12]
DS5202_EMH_PWM_SETUP is for the purpose of setting up one of the center aligned PWM
measurement groups. As illustrated in Figure 3.9, the DS5202_EMH_PWM_SETUP block has
three inputs, minimum PWM period, maximum PWM period and minimum dead time.[12]
19
The RTI CAN MultiMessage Blockset is used for setting up CAN in dSPACE HIL applications.
In order to work with RTI CAN MultiMessage Blockset, we need to make sure that the Microsoft
Windows SDK compiler is used to build MEX functions which is initialized via the ‘mex –setup’
command.[13]
Figure 3.10 shows all the blocks used for CAN Module Setup. Detailed explanation of individual
blocks is discussed in the following sub-sections.
For General Setup, the destination folder to save generated files by all RTICANMM blocks in the
model must be specified in RTICANMM General Setup block. The folder should be in an absolute
or relative path with the model root folder. RTICANMM Controller Setup block is to initialize the
CAN Controller by specifying basic information including Transceiver type, Termination
resistance and Baud rate. Then use Options Menu in Controller Setup block to create S-Function
for Controller Setup block. To be notice that only one RTICANMM General Setup block is
necessary in a model, which will apply the settings to all CAN blocks, but each CAN controller
must have individual RTICANMM Controller Setup block within a model.[13]
20
MainBlock dialog displays their names together with the names of the corresponding messages as
‘MessageName.SignalName’. On the Model Signals (TX) page, select the signals as TX Signals
to be transmitted from the model among all of the available signals. Similarly, the signals to be
captured are selected as RX signals on the Model Signals (RX) Page. All the files for RTICANMM
communication such as S-function are created by single clicking ‘create’ in the dialog.[13]
In this research, ‘Vehicle Speed’ signal needs to be transmitted from dSPACE simulator to EPS
controller via CAN Controller, as shown in Figure 3.4, so RTICANMM blocks are required in the
model. RTICANMM MainBlock used for transmitting ‘Vehicle Speed’ signal is illustrated in
Figure 3.11.
The basic procedure to use RTICANMM blocks in the model can be described as follows. First,
the model needs to be saved before adding the first RTICANMM blocks to it. Second, there is a
certain sequence to add these blocks into a model. Specifically, RTICANMM General Setup block
needs to be added first followed by a RTICANMM Controller Setup block. In the next step,
RTICANMM MainBlocks needs to be added in the model for each CAN controller. To be
highlighted, ‘Vehicle Speed’ signal is selected as the TX signal to be transmitted by this CAN
controller and no messages expect to receive in our situation.[14]
21
4 ASM VEHICLE DYNAMICS MODEL
ASM Vehicle Dynamics Model is used to simulate steering reaction force, which is the summation
of the forces on both steering racks delivered from the road. Steering reaction force has significant
influence on vehicle maneuverability so an accurate estimation of reaction force is important to
evaluate the vehicle steering behavior and test EPS ECU functions. Subsystems in ASM Vehicle
Dynamics Model are explained into details below.
The ASM Vehicle Dynamics Model from dSPACE is a complete dynamics model used to simulate
a vehicle and the environment. The ASM Vehicle Dynamics Blockset provides open Simulink
models for real time simulation of vehicle dynamics. They support an effective vehicle controller
development process from function design to ECU testing. The open model approach offers
flexibility to meet individual requirements by adding or replacing ASM components with customer
models.[15]
The ASM Vehicle Dynamics Model is designed as a multibody system with 24 degrees of freedom,
which consists of five subsystems including Soft ECU, Engine, Drivetrain, Vehicle Dynamics and
Environment, as illustrated in Figure 4.1.
SoftECU
Sensor
Signals
SoftECU
Engine
Actuator Signals from ECU
Signals
Sensor Signals to ECU
Engine Speed
Engine Torque
Drivetrain
Differential Torque
Wheel Speed
Vehicle Dynamics
Environment
Vehicle
Signals
Signals
Environment
22
This chapter gives a detailed description of the Vehicle Dynamics Subsystem in ASM Vehicle
Dynamics Model, which will be incorporated into EPS Model to perform functional testing of EPS
ECU via dSPACE HIL Simulator.
The Vehicle Dynamics Subsystem provides main components, including two semi-empirical tire
models, a nonlinear table-based vehicle suspension model with kinematics and compliance, a
steering model, aerodynamics model and brake model.[15] In addition, there is a Vehicle
Movement Subsystem to simulate the motion of the vehicle. Major descriptions are made for
Vehicle Movement, Suspension and Steering Subsystem to discuss how vehicle speed and steering
reaction force are calculated from this model.
The block diagram in Figure 4.2 illustrates an upper-level structure of the Vehicle Dynamics
Subsystem. Detailed description of the model is discussed in the next sub-section.
F_Aero_CoorSys_V
Trq_Aero_CoorSys_V
UnitVec_y_Wheel_CoorSys_V
F_Tire_CoorSys_V
RotationMatrix_V_to_E_T
F_Tire_CoorSys_V Trq_Tire_CoorSys_V V_Abs_Vehicle_CoG
Pos_Wheels_CoorSys_E
Trq_Tire_CoorSys_V w_Wheel [FL,FR,RL,RR] RotationMatrix_V_to_E_T
v_Abs_WheelBody_CoorSys_V Pos_Wheels_CoorSys_E
Trq_Tire_Wheel [FL,FR,RL,RR] Trq_Shaft_CoorSys_V [FL,FR,RL,RR]
w_Abs_WheelBody_CoorSys_V v_Abs_WheelBody_CoorSys_V
gF_Susp
Omega_Wheel [FL,FR,RL,RR] w_Abs_WheelBody_CoorSys_V
Pos_Wheels [FL,FR,RL,RR]]
v_Rel_WheelBody [FL,FR,RL,RR]] F_Gyroscopic [FL,FR,RL,RR]
gFront_dq_Front_dt q_Wheel_dt
SuspensionKinematicRelations_Rear q_Wheel
Trq_Tire_Wheel [FL,FR,RL,RR]
Trq_Shaft_CoorSys_V [FL,FR,RL,RR]
Trq_Shaft [FL,FR,RL,RR] SuspensionKinematicRelations_Front
w_Wheel [FL,FR,RL,RR]
Trq_Brake [FL,FR,RL,RR]
Omega_Wheel [FL,FR,RL,RR]
UnitVec_y_Wheel_CoorSys_V
SuspensionKinematicRelations_Front
SuspensionKinematicRelations_Rear
Trq_Tire
gFront_dq_Front_dt
w_Rel_WheelBody_dDispl_SteeringRod F_Tire
gFront_dq_Rear_dt
Pos_Wheel_dDispl_SteeringRod q_Wheel
v_Rel_WheelBody [FL,FR,RL,RR]
F_Tire [FL,FR,RL,RR]] q_Wheel_dt
w_Rel_WheelBody [FL,FR,RL,RR]
Trq_Tire [FL,FR,RL,RR]] Displ_SteeringRod
Displ_SteeringRod Pos_Wheels [FL,FR,RL,RR]
Trq_Shaft_CoorSys_V Displ_SteeringRod_dt
Displ_SteeringRod_dt gF_Susp
Steering
Angle_SteeringWheel
Angle UnitVec_y_Wheel_CoorSys_V
F_Gyroscopic [FL,FR,RL,RR]]
Trq_Gyroscopic [FL,FR,RL,RR]]
F_Gravitational [FL,FR,RL,RR]]
23
The ASM Vehicle Dynamics model is based on four systems of coordinates, which is illustrated
in Figure 4.3.
z z
v
W
x y
y
x z
E
x y
x CP
y
Vehicle generalized degrees of freedom are divided into three components: translational vehicle
velocities, angular vehicle velocities and vertical speed of the wheel.
ݍܯሷ ൌ ܳ (4-1)
ݍሷ ൌ ିܯଵ ܳ
where
ݍሷ is the generalized degrees of freedom vector with 10 elements in it, including the vehicle and
wheel accelerations and vehicle angular accelerations of vehicle reference system. Then the
vehicle and wheel velocities and wheel positions can be calculated by applying integral on the
degrees of freedom.
M is a 10ൈ10 generalized mass matrix, which is a function of the wheel position and kinematic
suspension relations. It is not constant and is calculated at every simulation step.
Q is a 10×1 generalized forces and torques vector, including generalized forces and torques in
vehicle reference coordinate, and generalized forces on wheels. They are calculated from the tire,
aerodynamics, mass forces, and torques and suspension forces in the direction of the relevant
degrees of freedom.
The generalized forces on vehicle is the sum of all forces acting on vehicle in x,y,z direction
respectively. All of these forces are represented in vehicle reference coordinate system, including
tire forces on each tire (F_Tire[FL,FR,RL,RR][x y z]), aerodynamic forces
(F_Aero_CoorSys_V[x,y,z]), external forces (F_External_CoorSys_V[x;y;z]), gravitational
forces of the vehicle and wheels (F_Gravitational[V,FL,FR,RL,RR][x,y,z]), gyroscopic forces of
the vehicle and wheels (F_Gyroscopic[V,FL,FR,RL,RR][x,y,z]).
The generalized torques on vehicle consists of two major parts, torque generated from forces, and
torque directly acting on the vehicle. The first part can be divided into the torque generated by tire
25
forces relative to position of wheel, gravitational and gyroscopic forces respect to position of center
of gravity on vehicle body. The second part torque includes tire torques
(Trq_Tire[FL,FR,RL,RR][x y z]), aerodynamic torques (Trq_Aero_CoorSys_V[x,y,z]),
gyroscopic torques (Trq_Gyroscopic[V,FL,FR,RL,RR][x,y,z]), and external torques
(Trq_External_CoorSys_V[x;y;z]). The sum of all of these torques in x,y,z direction is the
generalized torque on vehicle.
߱ீ ൌ ߱
where
߱ௐ ൌ ߱ ߱ௐ̴
where
26
݅ FL, FR, RL and RR tire
x Gravitational Force
The production of acceleration of gravity and the mass of entire vehicle is the gravitational
force of the vehicle. Acceleration of gravity times mass on each of the four wheels is the
gravitational force acting on the corresponding wheels.
x Gyroscopoic Force
Residual Acceleration times mass of total vehicle is the Gyroscopoic force on the total vehicle.
Residual Acceleration times mass on each of the four wheels is the Gyroscopoic force acting
on the corresponding wheels.
x Residual Acceleration
The expression of acceleration for each of the wheels can be written as follows:
where
Residual acceleration are terms in acceleration expression that are not the derivative of velocity.
So the residual acceleration of each wheel is the third term of the above acceleration expression:
27
where
The derivative of orientation angles roll, pitch and yaw around x,y,z axis are calculated from
degree of freedoms, the angular vehicle velocities with respect to vehicle reference coordinate
system. So the orientation angles can be calculated simply by integration and plus the initial angles.
Then, the overall rotation matrix is a 3by3 matrix calculated from the orientation angles, which is
used to calculate the vehicle velocity in the earth coordinate system.
The vehicle position in earth coordinate system can be calculated by integration plus the initial
vehicle position respect to earth.
28
SuspensionKinematicRelations_Front
SuspensionKinematicRelations_Rear
Trq_Tire
gFront_dq_Front_dt
F_Tire
gFront_dq_Rear_dt
q_Wheel
v_Rel_WheelBody
q_Wheel_dt
w_Rel_WheelBody
Displ_SteeringRod
Pos_Wheels
Displ_SteeringRod_dt
gF_Susp
UnitVec_y_Wheel_CoorSys_V
x Camber angle
Camber angle is an angle between the vertical axis of wheel and vertical axis of vehicle when
viewed from front or rear. The definition of camber angle for ASM is illustrated in Figure 4.5.
Positive camber is when the distance from upper part of the wheel to the vehicle is greater than the
lower part. For the left side of vehicle, positive camber angle nearly equals to the negative ߙ angle
about x axis.
29
Figure 4.5 Camber Angle
x Caster angle
Caster is an angle to which the steering pivot axis is tilted forward or rearward from vertical, as
viewed from left or right side of vehicle. The definition of caster angle is shown in Figure 4.6.
Positive caster angle is when the upper pivot line is leaned backward father than bottom pivot. The
positive caster angle nearly equals to the negative ߚ about y axis when viewed from each side of
vehicle.
30
Figure 4.6 Caster Angle
x Toe angle
Toe angle identifies the exact direction the tires are pointed comparing to the longitudinal axis of
the vehicle when viewed from top. Figure 4.7 illustrates the toe angle defined in ASM. Positive
toe, or toe in, which means the front of the wheel pointing in towards the centerline of the vehicle,
is nearly equal to a negative ߛ for left side of the vehicle. The definition of toe out is the other way
round.
31
Figure 4.7 Toe Angle
Because a right-handed coordinate system is used in ASM, the left wheel positive toe angle is a
negative rotation about the z-axis, the positive camber angle is a negative rotation about the x-axis,
and the positive caster angle is a negative rotation about the y-axis. Therefore, the positive camber,
caster and toe angle are in accordance with the negative alpha, beta and gamma.
In ASM model two rotation orders are ready for user to choose. The order of the rotation angles
plays an important role in parameterizing values such as the suspension kinematics.
x Automotive angle:
ߛ – ߚ– ߙ
x Cardan angle:
The suspension kinematics is divided into three parts, Wheel Position, Wheel Orientation, Spring,
Damper and Stabilizer Displacements. Inside these three blocks, 2-D look-up tables are used to
obtain related kinematics information with two inputs: displacement of steering rack ݍ௦ and
vertical displacement of left and right front wheel ݖௐ ிȀோ .
Wheel position information, including wheel position in xyz directions, and the derivative of wheel
position with respect to steering rack displacement and vertical wheel displacement for both of the
front right and left wheels, are directly acquired from the Map_Displ_x/y/z_Wheel 2-D look-up
tables with the given two inputs, as shown in Figure 4.8.
The following equations demonstrate the calculation of front left wheel position, which indicates
that the final position of the wheel is the summation of its initial position ݍௐ ி and relative
change of the position οݍௐ ி obtained from the look-up tables in Figure 4.8. The front right wheel
position οݍௐ ிோ is calculated in the same way.
33
where
The wheel orientation information, including wheel angle ߙǡ ߚǡ ߛand changes in orientation with
respect to steering rack displacement and vertical wheel movement, are obtained from the output
of Map_Angle_Alpha/Beta/Gamma_Wheel 2-D look-up tables with the same inputs, as shown in
Figure 4.9.
ݎݏݍ x v ߠܹ ܮܨሾߙǡ ߚǡ ߛሿ
v_dx
ܮܨ ܹݖȀܴ y v_dy
μߠܹ ܮܨ
Ma
Map_Angle_Alpha_Wheel
μܮܨ ܹݖ
x v
v_dx μߠܹ ܴܨ
y v_dy μܴܨ ܹݖ
Ma
Map_Angle_Beta_Wheel
μߠܹ ܮܨ
x v μݎݏݍ
v_dx
y v_dy μߠܹ ܴܨ
Map_Angle_Gamma_Wheel μݎݏݍ
The equation for the front left wheel orientation ߠௐ ி is shown below. And the front right wheel
orientation ߠௐ ிோ is calculated in the same way.
where
34
ݍ௦ : Steering rack displacement.
The vertical displacement of the spring joint points, damper joint points of front left and front right
wheel, and vertical displacement of the stabilizer left joint point relative to the right joint point
also rely on steering rack displacement and wheel vertical movement. The main dependency is on
wheel vertical displacement. Partial differentiation of spring, damper and stabilizer displacement
with respect to wheel vertical movement are obtained from Map_Displ_Spring/Damper/Stabilizer
2-D look-up table as shown in Figure 4.10.
ܮܨ ܹݖȀܴ y
μ ܮܨ ݏݖμܴܨ ݏݖ
v_dy
ǡ
Map_Displ_Spring[m]
M
μ ܮܨ ܹݖμܴܨ ܹݖ
x v ܮܨ ݀ݖȀܴܨ
y v_dy
μ ܮܨ ݀ݖμܴܨ ݀ݖ
ǡ
Map_Displ_Damper[m]
M
μ ܮܨ ܹݖμܴܨ ܹݖ
x v ܮܨ ܾܽݐݏݖȀܴܨ
y v_dy
μ ܮܨ ܾܽݐݏݖμܴܨ ܾܽݐݏݖ
ǡ
Map_Displ_Stabilizer[m] μ ܮܨ ܹݖμܴܨ ܹݖ
The equations for front left vertical displacements of spring, damper and stabilizer joint points are
shown below. And their front right vertical displacements are obtained in the same way.
where
35
ݖௗ ி : Vertical displacement of the front left damper joint points.
To calculate the wheel velocity relative to vehicle body and establish the equation of motion in
Vehicle Movement block, some partial derivatives must be evaluated, including changes in wheel
position and orientation with respect to vertical wheel movement and steering rack displacement,
பೈ ಷಽ பೈ ಷೃ பೈ ಷಽ பೈ ಷೃ பఏೈ ಷಽ பఏೈ ಷೃ பఏೈ ಷಽ பఏೈ ಷೃ
represented as , , , ப , ப௭ , ப௭ , ப , ப .
ப௭ೈ ಷಽ ப௭ೈ ಷೃ பೞೝ ೞೝ ೈ ಷಽ ೈ ಷೃ ೞೝ ೞೝ
To evaluate the forces acting between the wheel and vehicle body (suspension equivalent force in
the direction of wheel center motion), partial derivatives of vertical displacement of spring, damper
and stabilizer with respect to vertical wheel movement and steering rack displacement, represented
ப௭ೞ ப௭ೞ ப௭ ப௭ ப௭ೞೌ್ ಷಽ ப௭ೞೌ್ ಷೃ
as
ப௭ೈ ಷಽ
ಷಽ
, ப௭ ಷೃ
, ப௭ ಷಽ , ப௭ ಷೃ , , ப௭ , must be evaluated.
ೈ ಷೃ ೈ ಷಽ ೈ ಷೃ ப௭ೈ ಷಽ ೈ ಷೃ
The additional x,y displacements and Ƚ and ɀ angles caused by tire longitudinal force in x
direction denoted as ܨ௫ , are obtained from four 2-D look-up tables with longitudinal force as table
input, as shown in Figure 4.11. οݍௐ̴ಷೣ is used to represent οǡ οǡ οȽǡ οɀ caused by ܨ௫
applied on left and right tires.
36
ݔܨ
Map_Displ_x_Wheel_F_x
Map_Displ_y_Wheel_F_x
ο݈ ݉ܥܹݍ
ݔܨ
Map_Angle_Alpha_Wheel_F_x
Map_Angle_Gamma_Wheel_F_x
Similarly, the additional x,y displacements and Ƚ and ɀ angles caused by tire lateral force ܨ௬ , are
obtained from the similar 2-D look-up tables with lateral force as table input, as shown in Figure
4.12. Also, οݍௐ̴ಷ represents οǡ οǡ οȽǡ οɀ caused by ܨ௬ .
ݕܨ
Map_Displ_x_Wheel_F_y
Map_Displ_y_Wheel_F_y
ο݈ ݉ܥܹݍ
ݕܨ
Map_Angle_Alpha_Wheel_F_y
Map_Angle_Gamma_Wheel_F_y
37
The influence of the tire torque about longitudinal axis ܶݍݎ௫ on tire displacements and orientations,
represented as οݍௐ̴ೝೣ , are obtained from corresponding 2-D look-up tables, as shown in
Figure 4.13.
ܶݔݍݎ
Map_Displ_x_Wheel_Trq_x
Map_Angle_Alpha_Wheel_Trq_x
Map_Angle_Gamma_Wheel_Trq_x
Displacements in x,y direction andȽ and ɀ angles caused by aligning torque (ܶݍݎ௭ ) about vertical
axis, are acquired similarly from the corresponding 2-D look-up tables, as shown in Figure 4.14.
οݍௐ̴ೝ is used to demonstrate οǡ οǡ οȽǡ οɀ caused by ܶݍݎ௭ .
38
ܶݖݍݎ
Map_Displ_x_Wheel_Trq_z
Map_Angle_Alpha_Wheel_Trq_z
Map_Angle_Gamma_Wheel_Trq_z
According to above model description, it can be seen that the acting torque about longitudinal or
vertical axis on wheel has no effect on the displacements of wheel in these two directions.
As demonstrated in the following equation, the total additional displacements and angles due to
compliance οݔ , οݕ , οߙ , οߛ are the summation of the additional movements
of the tire caused by four different forces or torques, ܨ௫ ǡ ܨ௬ ǡ ܶݍݎ௫ ǡ ܶݍݎ௭ .
where
39
axis ܶݍݎ௫ .
where
డೈಷಽ
: Changes in front left wheel position with respect to vertical movement of front
డ௭ೈಷಽ
left wheel.
డೈಷಽ
: Changes in front left wheel position with respect to vertical movement of front
డ௭ೈಷೃ
rack.
40
ݍሶ ௐ ி̴ : Translational velocity of front left wheel due to compliance.
where
డఏೈಷಽ
: Changes in front left wheel orientation with respect to vertical movement of
డ௭ೈಷಽ
displacement of wheel.
Calculations of front right wheel relative velocities are the same. Obviously, velocities of wheel
body relative to vehicle body consist of four parts; change of wheel velocity with respect to vertical
wheel velocity for both front wheels, change of wheel velocity with respect to velocity of steering
rack and additional wheel velocity due to suspension compliance.
41
ݍௐ ݍௐ ி̴
ቂ ݍಷಽ ቃ ݍ ൨ ൌ ݍௐ ሾܮܨǢ ܴܨሿሾݔǢ ݕǢ ݖሿ (4-12)
ௐಷೃ ௐ ிோ̴
where
ݍௐ ி̴ : Additional front left wheel displacement due to suspension compliance.
ݍௐ ிோ̴ : Additional front right wheel displacement due to suspension compliance.
ݍௐ ሾݔǢ ݕǢ ݖሿ: Front wheels position including compliance effects.
where
ݖሶௗ ி : Vertical speed of displacement of the front left damper joint point.
ݖ௦௧ : Vertical displacement of the stabilizer left joint point relative to the right joint
point.
42
ܨ௦௧ : Force of stabilizer.
The stabilizer force ܨ௦௧ is obtained from the look-up table Map_StabilizerForce, with vertical
displacement of the stabilizer left joint point relative to the right joint point as the table input.
v ܮܨ ݀ܨ
ݖሶ݀ ܮܨ x ߲ܮܨ ݀ܨ
v_dx
߲ݖሶ݀ ܮܨ
Map_DamperForceLeft
v ܾܽݐݏܨ
ܾܽݐݏݖ x
v_dx ߲ܾܽݐݏܨ
Map_StabilizerForce ߲ܾܽݐܵݖ
A Jacobian matrix for suspension spring deflection with respect to front wheel vertical
displacement is demonstrated as:
43
߲ݖ௦ ி ߲ݖ௦ ி
ۍ ې
߲ݖௌ ݖ߲ ێௐ ி ߲ݖௐ ிோ ۑ
ܬௌ ൌ ൌێ (4-14)
߲ݖௐ̴ி௧ ߲ݖ௦ ிோ ߲ݖ௦ ிோ ۑ
ێ ۑ
ݖ߲ ۏௐ ி ߲ݖௐ ிோ ے
where
ܬௌ ǣJacobian matrix for suspension spring deflection with respect to front wheel
vertical movement.
ݖௐ̴ி௧ ሾݖௐ ி ǡݖௐ ிோ ሿǣFront wheel vertical movement including vertical movement
where
The generalized spring forces acting on front left wheel and front right wheel are calculated as
follows:
Similar calculations are carried out for the damper and stabilizer.
The Jacobian matrix for suspension damper and damper forces are calculated as follow:
߲ݖௗ ி ߲ݖௗ ி
ۍ ې
ݖ߲ێௐ ி ߲ݖௐ ிோ ۑ ܨௗ ሺݖሶௗ ሻ
ܬ ൌ ێ ۑ ǡ ܨ ൌ ቈ ி ி (4-17)
߲ݖ ߲ݖௗ ிோ ܨௗ ிோ ሺݖሶௗ ி ሻ
ێௗ ிோ ۑ
ݖ߲ۏௐ ி ߲ݖௐ ிோ ے
where
ܬ : Jacobian matrix for suspension damper displacement with respect to front wheel
44
vertical movement.
So, the generalized damper forces applying on front left wheel and front right wheel respectively
are calculated as follows:
where
So, the generalized stabilizer forces acting on front left wheel and front right wheel respectively
are calculated as follows:
The generalized suspension forces with respect to front left and right wheel are the summation of
three forces, spring forces, damper forces and stabilizer forces.
ቂ݃ܨ௭ೈ ቃ ሺܮܨǢ ܴܨሻ ൌ ሾ݃ܨௌ ሿଶൈଵ ሾ݃ܨ ሿଶൈଵ ሾ݃ܨௌ௧ ሿଶൈଵ (4-21)
ಷೝ ଶൈଵ
where
45
To stabilize the equation of motion, the derivatives of the generalized forces with respect to the
generalized speeds are required. It can be calculated using the Jacobian matrices and the
derivatives of the spring, damper and stabilizer forces with respect to spring displacement, damper
velocity, and stabilizer displacement, respectively.
w_Rel_WheelBody_dDispl_
SteeringRod
Pos_Wheel_dDispl_Steerin
gRod
F_Tire
Trq_Tire Displ_SteeringRod_dt
Trq_Shaft_CoorSys_V Displ_SteeringRod
Angle_SteeringWheel Reaction Force
F_Gyroscopic
Trq_Gyroscopic
F_Gravitational
Steering Subsystem
There are two different inputs to the steering system: either driver angle or driver torque. If driver
angle is used as an input, a steering torque is calculated at the steering column from relative angle
of driver steering input and pinion gear angle. If driver torque is used as input, it is considered as
the torque that directly acts on the steering rack. In-depth analysis of the Steering Subsystem in
ASM Vehicle Dynamics Model is discussed below.
46
4.2.3.1 Force on Steering Rack
The connection between steering wheel and rack and pinion system is simulated as a torsion bar,
which is an assembly of a spring and damping. So the steering torque at steering column is written
as:
ሶ
ܶௌ௧̴ ൌ ݇ௌ௧ ൫ߜௌ௧ೈ െ ߜௌ௧ಸೌೝ ൯ ݀ௌ௧ ൫ߜௌ௧ ሶ
െ ߜௌ௧ ൯ (4-22)
ೈ ಸೌೝ
where
ሶ
ߜௌ௧ : Angular velocity of the steering wheel [rad/s]
ೈ
ሶ
ߜௌ௧ : Angular velocity of the pinion [rad/s]
ಸೌೝ
Angle of the pinion gear is related to two parameters. First one is the radian that the gear turns for
per meter the steering rack goes, described as ݅௦௧ [rad/m]. Second one is the displacement of the
steering rack. Therefore, when turning the steering wheel, the angle of the gear derives from
multiplication of these two parameters.
݅ௌ௧ : Radian that the pinion gear turns for per meter the steering rack goes [rad/m]
Force on Steering rack is contributed to the torque at steering column due to driver input and torque
exerted from Electric Power Steering device. The model simulates the power steering by a first
order time delay dynamics equation related to the time constant ߬ௌ௧̴௪ and a function of steering
column torque, as illustrated in Figure 4.17 The function of steering torque at column is
represented by a look-up table.
47
2
τSt_Pow
÷
1 + × Integrator 1
TSt_Col - TSt_Pow
3
Reset
Look-up Table
The whole equation for simulating electric power steering torque is written as:
With all of the variables needed, generalized force on steering rack is calculated as:
The summation of front tire torques consists of three parts: tire torque from Tire Subsystem,
gyroscopic torque of the wheel from Vehicle Movement Subsystem and driving torque on the
wheel from Tire Subsystem. The summation of front tire forces consists of tire force from Tire
Subsystem, gyroscopic force and gravitational force of the wheel from Vehicle Movement
Subsystem.
48
Therefore, the generalized reaction force applied on steering rack is written as:
where
ሾߠி̴ௗ௦̴ௌ௧ Ǣ ߠிோ̴ௗ௦̴ௌ௧ ሿ: Change of front wheel orientation with respect to the displacement of
steering rack [x;y;z]
ሾܵி̴ௗ௦̴ௌ௧ Ǣ ܵிோ̴ௗ௦̴ௌ௧ ሿ: Change of front wheel position with respect to the displacement of
steering rack [x;y;z]
ሾܶி Ǣ ܶிோ ሿ: Front tire torque vector in vehicle reference system [x;y;z]
ሾܨி Ǣ ܨிோ ሿ: Front tire force vector in vehicle reference system [x;y;z]
The generalized force on steering rack, a necessary parameter to estimate the dynamics of steering
rack, is calculated by the summation of active steering force ܨௌ௧ and reactive force ்݃ܨ̴ௌ௧ . These
two forces are in opposite direction.
where
49
݉ிோ : Front right wheel mass.
In order to calculate the displacement of steering rack, several parameters are necessary, including
generalized force and torque in steering, mass of steering and friction. The equation of
displacement of steering rack is written as follows:
ܨௗ̴் : Damping force when steering torque is the input of a steering system
The displacement of steering rack is calculated by integrating ܵௌ௧ோ̴ௗ௧ଶ for twice in a row. What is
worth to pay attention during the integration is that the upper and lower limit of the steering rack
displacement, which should be set up based on physical steering system via a saturation block.
50
5 MODEL INTEGRATION AND OFFLINE SIMULATION
OF INTEGRATED MODEL
The dSPACE ASM Vehicle Dynamics Model is integrated with a Nexteer Steering Model to
provide an entire mechanical model with main components, including tire, suspension, steering,
aerodynamics and brake models. The Integrated Mechanical Model serves as an important part in
the plant model for the calculation of vehicle speed, handwheel torque and motor coupling torque,
as shown in Figure 5.1. It takes in signals, including motor angle and motor speed from the EPS
Master Model, which can be divided into dSPACE ASM Electric Components, Sensors and
Actuators Simulation and CAN Bus.
There are two reasons for the integration of dSPACE ASM Vehicle Dynamics Model and the
Nexteer Steering Model. The first is to use a Nexteer Steering Model with real-car tested
parameters makes the model performance closer to a real steering system. Second, the dSPACE
Vehicle Dynamics Model can simulate the reaction force applied on the steering rack from road.
Steering reaction force has a significant influence on vehicle maneuverability. An accurate
estimation of reaction force is important to evaluate the vehicle steering behavior and test EPS
ECU functions.
In general, the dSPACE Vehicle Dynamics Model will estimate the reaction force, the feedback
force from road applied on steering rack. In addition, the vehicle speed will be calculated by ASM
51
model. The Steering Model calculates the displacement of steering rack by using the reaction force
calculated by dSPACE ASM Vehicle Dynamics model (see equation 4-26). The block diagram of
the Integrated Mechanical Model is shown in Figure 5.2, which provides basic information about
these two models and the interface between them.
Reaction Force
dSPACE ASM Vehicle Dynamics
Steering Model
Model
Shaft Torque
Vehicle Speed [m/s]
Vehicle Speed PID
1/3.6 +
Command (kph) - Controller
Kph to m/s
As seen from Figure 3.2, three sources of torques are applied on the steering rack: Driver Torque
from steering wheel, Motor Assist Torque from power steering electric motor and Reaction force
from rod. Therefore, as shown in Figure 5.2, the reaction force obtained from dSPACE Vehicle
Dynamics Model will be imported into the Steering Model and converted to torque, together with
driver torque and motor torque to calculate the displacement and velocity of the steering rack,
which will be sent back to the ASM Model. The detailed calculation is represented in equation 5-
1, 5-2, 5-3, 5-4 as follows.
The following equation shows the conversion from reaction force to reaction torque on steering
rack.
52
ܶுௐ̴௦௧ ܶெ௧௨ ̴்ܶ௦௧ (5-2)
ൌ ܵௌ௧ோ̴ௗ௧ଶ
ܬோ
where
The following equations show the calculation of angular velocity and rotation angle of steering
rack.
න ܵௌ௧ோ̴ௗ௧ଶ ൌ ߱ௌ௧ோ
(5-3)
න ߱ௌ௧ோ ൌ ߠௌ௧ோ
where
The following equation shows the conversion of rack angle in radians and rack velocity in
radians/s to rack displacement in mm and rack displacement velocity in mm/s.
ோ
ݍோ ൌ ߠோ୩ ൈ
ʹߨ (5-4)
ோ
ݍோ ݀ ݐൌ ߱ோ୩ ൈ
ʹߨ
where
53
In addition, a PID controller is used to control the vehicle speed to track vehicle speed command.
The steering behaviors of vehicle for various driving maneuvers are analyzed at a stable and
constant vehicle speed.
The key of the model integration lies in the interface between the two models, specifically, the
input and output signals between them, which are illustrated in Figure 5.3Figure 5.3. The integration
of dSPACE ASM Vehicle Dynamics Model and Nexteer Steering Model is to replace the blocks
of calculating displacement and velocity of the steering rack in dSPACE Vehicle Dynamics Model
Steering Subsystem with the Nexteer Steering Model.
dSPACE ASM
Vehicle Dynamics Model
1/1000
mm to m
SuspensionKinematic
Relations_Front
Reaction
Steering Subsystem Force
As shown in Figure 5.3, there is a Steering Subsystem in the vehicle dynamics model. The reason
that Nexteer Steering Model is used is because that model could better simulate the characteristic
54
of steering system designed by Nexteer. Therefore, part of the ASM steering subsystem is kept
with other subsystems in dSPACE Vehicle Dynamics Model to simulate the reaction force and
calculate vehicle speed. And the Steering Model will output steering rack velocity and
displacement.
Parameters between the interfaces of the two models to be integrated must be unified. The steering
rack displacement and velocity from Steering Model are measured as millimeters, so they must be
converted to meters to be compatible with the same variables to be used in the dSPACE Model.
The displacement of the steering rack, calculated by the Steering Model, is served as an input to
Suspension Subsystem in dSPACE ASM Vehicle Dynamics model to evaluate the movement and
rotation of wheels. The signal ‘SuspensionKinematicRelations_Front’ from Suspension
Subsystem to Steering Subsystem is a combination of two signals, change of wheel position and
wheel orientation with respect to the displacement of steering rack, which shows the movement
and rotation of wheels due to the movement of steering rack, as discussed in 4.2.2.2. Then, the
Steering Subsystem in ASM model is able to estimate the reaction force applied on the steering
rack, which is represented as ்݃ܨ̴ௌ௧ in 4.2.3.2. The specific calculation of ்݃ܨ̴ௌ௧ is described
in equation 4-26. Also the equation of motion is established in Vehicle Movement Subsystem to
calculate the vehicle speed in equation 4-2.
The offline testing of the Integrated Mechanical Model is necessary before using it for real-time
simulation. The test procedures will be briefly introduced and detailed maneuver signal design will
be demonstrated. Also, test results for various driving maneuvers are analyzed.
x Chirp Signal
55
A chirp is a sinusoidal signal whose frequency linearly varies from f1 to f2 within a time period
of T. It is used to represent the input of steering wheel angle. Figure 5.4 shows a Matlab Simulink
model to generate a chirp signal.
The following equation represents the generation of a chirp signal.
ͳ ʹߨሺ݂ଶ െ ݂ଵ ሻ ଶ
ܨ ሺݐሻ ൌ ሺ ή ή ݐ ʹߨ݂ଵ ݐሻ (5-5)
ʹ ܶ
where
݂ଵ : Initial frequency
݂ଶ : Final frequency
T: Time period for the chirp signal
t: Time
As shown in Figure 5.4, the rising edge of a step input is used to initiate the generation of a chirp
signal. The chirp signal generation continues when the “Reset” input keeps high and the generation
stops when the “Reset” input changes to zero. Blocks circled in Figure 5.4(b) are the original Chirp
block in Simulink. The rest are additional blocks I added.
In future real-time simulation, the step input could be replaced by a constant block, so the model
is able to generate a chirp signal whenever changing the constant value from zero to one in CDNG
in real-time.
56
Figure 5.4 (b) Chirp Signal Design in Simulink
Figure 5.5 shows a chirp signal generated by the presented model. The frequency of the signal
goes from 1 to 10Hz within 10 seconds.
chirp signal
1.5
0.5
-0.5
-1
-1.5
0 2 4 6 8 10 12 14 16 18 20
t
x Ramp Signal
57
A ramp signal is used as an input signal of steering wheel angle, which will make a vehicle moving
with a driving path as shown in Figure 5.6. This signal is named as ‘ramp signal’ because the
vehicle driving path caused by this steering input looks like a series of mathematical ramp
functions.
A ramp signal is designed by using Repeating Sequence block in Simulink, which repeats sequence
of numbers specified in a table of time-value pairs. The following equation shows the calculation
in Repeating Sequence block.
where
Figure 5.7 illustrates ramp signal model in Simulink. The circled blocks are in the Repeating
Sequence block which represents equation (5-6). In equation (5-6), ݂ோ ሺሻ stands for the
function in Look-Up Table in Figure 5.7. For generation of a ramp signal, ݂ோ ሺሻ is a single
sinusoidal waveform, which forms a ramp signal by repeating process. The rest blocks in Figure
5.7 are developed to generate repeated sine waves controlled by a rising edge of a step signal.
58
Figure 5.7 Ramp Signal Model in Simulink
The function in Look-Up Table is generated by breakpoints and table data set. Equation (5-7)
shows the breakpoints ݐுௐ and output data ߠுௐ̴ in ramp signal generation.
Figure 5.8 shows a ramp signal which has six repeating 0.2Hz sinusoidal waveform (݂ ൌ ͲǤʹ)
within 30 seconds generated by the model in Figure 5.7.
59
Figure 5.8 Generated Ramp Signal
Similar to the generation of ramp signal, single lane change signal is also generated by Repeating
Sequence block in Simulink. The following equation shows the calculation in Repeating Sequence
block.
ܨௌ ሺݐሻ ൌ ݂ௌ ሺሾ ݐെ ݐ௦௧௧ ሿ െ ݊ ή ܶሻ (5-7)
where
60
t: Time
݂ௌ ሺሻ: Single lane change function
The Simulink model for generating single lane change signal is the same as the model for ramp
signal, as shown in Figure 5.7. ݂ௌ ሺሻ in equation (5-7) is the single lane change function in
Look-Up Table.
The calculation of break point HwAngle_time and output values HwAngle_output in the Look-Up
Table for single lane change is referred to Figure A in Appendix A.
Figure 5.10 shows the generated single lane change waveform with 0.2Hz sinusoidal wave and
period of 10 seconds. The single lane change signal is the continuous repeating of the single lane
changes waveform which represents the steering angle input by driver when doing single lane
change.
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
0 1 2 3 4 5 6 7 8 9 10
t
Ramp Steer Test is used to examine vehicle steering performance under sine maneuver input at
maintained vehicle speed. In this test, a low frequency of 0.2Hz sinusoidal signal is used as a
steering input to investigate the vehicle behavior at 20kph, 60kph and 100kph, respectively. For
61
each constant vehicle speed, parameters in PID controller need to be adjusted to make vehicle
reach the command speed quickly and stably.
In the following analysis, two kinds of plots are generated for each constant vehicle speed to
evaluate the behavior of the steering system. The first is in time domain, which consists of five
subplots, including vehicle speed, steering angle, steering torque, motor speed, lateral acceleration
and yaw rate. The second plot is a cross plot which consists of four subplots, steering torque, lateral
acceleration and yaw rate with respect to steering angle, and steering torque with respect to lateral
acceleration.
With the spread of power steering systems, there are increasing demands for not only vehicle
performance, but also comfortable steering feeling. Evaluation of lateral acceleration and yaw rate
are carried out to describe vehicle performance under steering maneuvers. The steering torque is
considered as an indication of driver’s steering feeling, which is an important factor of driving
handling.
Figure 5.11 and Figure 5.12 illustrate the steering behavior of the Integrated Mechanical Model
with 0.2Hz steering input at maintained speed of 20kph. The maximum value of the simulated
handwheel angle is referring to the real vehicle test. It is clear that all the variables in time plots
follow the 0.2Hz sine pattern at constant speed 20kph. The cross plot shows a generally linear
response between handwheel angle and handwheel torque, lateral acceleration, yaw rate.
62
Figure 5.11 Ramp Steer Time Plots@20kph
63
Figure 5.13 and Figure 5.14 illustrate the test results for 0.2Hz sine maneuver at maintained speed
60kph. All variables are following the period of 0.2Hz sinusoidal input signal. However, there is
obvious fluctuation on lateral acceleration and handwheel torque, which can be seen at related
cross plot as well. Complicated steering at high vehicle speeds inevitably lead to change of lateral
acceleration, which will have an impact on reaction force applied on steering rack and definitely
influence driver’s feeling represented by steering torque.
64
Figure 5.14 Ramp Steer Cross Plot @60kph
65
Figure 5.15 Ramp Steer Time Plots @100kph
66
PID controller: KP: 5.5 KI: 0.05
Figure 5.17 and Figure 5.18 illustrate the Single Lane Change Test results at 20kph. All variables
shown in time plots follow the steering input pattern at exactly the same frequency of 0.2Hz. The
cross plots have an approximately linear response between handwheel angle and handwheel torque,
lateral acceleration, yaw rate.
0
-20
0 20 40 60 80 100 120 140 160 180 200
100
HwAngle
( o)
0
-100
150 155 160 165 170 175 180
0.5
HwTrq
(Nm)
0
-0.5
150 155 160 165 170 175 180
200
MtrSpd
(rad/s)
0
-200
150 155 160 165 170 175 180
1
0 LatAccel (m/s2)
YawRate (rad/s)
-1
150 155 160 165 170 175 180
67
Single Lane Change 20kph
0.4 Cross Plot 1
0.2 0.5
HwTorque
LatAccel
(m/s )
(Nm)
2
0 0
-0.2 -0.5
-0.4 -1
-100 -50 0 50 100 -100 -50 0 50 100
o o
HwAngle ( ) HwAngle ( )
0.4 0.4
0.2 0.2
HwTorque
YawRate
(rad/s)
(Nm)
0 0
-0.2 -0.2
-0.4 -0.4
-100 -50 0 50 100 -1 -0.5 0 0.5 1
o 2
HwAngle ( ) LatAccel (m/s )
The test results for single lane change at maintained 60kph are shown in Figure 5.19 and Figure
5.20. The handwheel torque and lateral acceleration follow the steering input frequency, but they
do have some oscillations over time, which can also be seen in cross plot.
68
Single Lane Change 60kph
100
VehSpd
(kph)
0
-100
0 20 40 60 80 100 120 140 160 180 200
100
HwAngle
( o)
-100
150 155 160 165 170 175 180
0.5
HwTrq
(Nm)
0
-0.5
150 155 160 165 170 175 180
100
MtrSpd
(rad/s)
-100
150 155 160 165 170 175 180
2
2
LatAccel (m/s )
0
YawRate (rad/s)
-2
150 155 160 165 170 175 180
0.2 1
HwTorque
LatAccel
(m/s )
(Nm)
0 0
-0.2 -1
-0.4 -2
-30 -20 -10 0 10 20 30 -30 -20 -10 0 10 20 30
o o
HwAngle ( ) HwAngle ( )
1 0.4
0.5 0.2
HwTorque
YawRate
(rad/s)
(Nm)
0 0
-0.5 -0.2
-1 -0.4
-30 -20 -10 0 10 20 30 -1.5 -1 -0.5 0 0.5 1 1.5
o 2
HwAngle ( ) LatAccel (m/s )
69
Figure 5.21 and Figure 5.22 give illustration about single lane change test results at 100kph. It is
seen from the figure that handwheel torque and lateral acceleration behave a little oscillation over
time.
-200
0 20 40 60 80 100 120 140 160 180 200
100
HwAngle
( o)
0
-100
150 155 160 165 170 175 180
0.5
HwTrq
(Nm)
-0.5
150 155 160 165 170 175 180
200
MtrSpd
(rad/s)
-200
150 155 160 165 170 175 180
02
5
LatAccel (m/s2)
0
YawRate (rad/s)
-5
150 155 160 165 170 175 180
0.2
HwTorque
LatAccel
(m/s )
(Nm)
0 0
-0.2
-0.4 -5
-20 -10 0 10 20 -20 -10 0 10 20
o o
HwAngle ( ) HwAngle ( )
0.5 0.4
0.2
HwTorque
YawRate
(rad/s)
(Nm)
0 0
-0.2
-0.5 -0.4
-20 -10 0 10 20 -5 0 5
o 2
HwAngle ( ) LatAccel (m/s )
70
6 CONCLUSIONS
In this report, a dSPACE HIL system is developed for the testing of EPS ECUs to facilitate
repetitive functional testing, cut down development cost, and enable early testing before
production.
Sensors and Actuators are simulated, PWM Signal Measurement and CAN Module are configured
to build to complete dSPACE HIL system for EPS ECUs testing. The set up system can be used
on testing different vehicles different controller algorithms.
Reaction force is simulated by ASM Vehicle Dynamics Model to improve the reliability and
accuracy of the HIL bench testing. The Integrated Mechanical Model, which is the combination of
ASM Vehicle Dynamics Model and Nexteer Steering Model, simulate the driver on vehicle and
calculate the steering torque which represents driver’s feeling during steering. The model is
validated via offline steering maneuver test, including ramp steering and single lane change.
Specific testing cases are defined based on vehicle speed and steering input signals.
In the future, the dSPACE HIL Simulator is connected with EPS ECU with the whole EPS Model
operating as plant model in real-time to test functionalities of the ECU, including base assist, active
return, active damping, etc. In addition, the functionalities of the EPS ECU when interacted with
other systems such as Electronic Stability Control (ESC) can be evaluated by means of combined
test benches. [18] [19]
71
REFERENCES
2. Pfister, F., C. Reitze, and A. Schmidt, Hardware-in-the-Loop - The technologie for development
and test for vehicle control systems.
4. Grunewald, M.C. Functional testing of an electric power steering using HiL simulations. in 5th
International Munich Chassis Symposium 2014. 2014. Springer.
5. Lee, M.H., et al., Development of a hardware in the loop simulation system for electric power
steering in vehicles. International Journal of Automotive Technology, 2011. 12(5): p. 733-744.
6. Kim, J.-H. and J.-B. Song, Control logic for an electric power steering system using assist motor.
Mechatronics, 2002. 12(3): p. 447-459.
7. Segawa, M., et al., Preliminary Study Concerning Quantitative Analysis of Steering System
Using Hardware-in-the-Loop (HIL) Simulator, 2006, SAE Technical Paper.
9. GmbH, d., dSPACE Simulator EcoLine Hardware Installation and Configuration. 2010.
10. GmbH, d., Quad Power Performance boost for HIL simulation with new DS1006 Processor
Board, in dSPACE Magazine2010. p. 52-55.
11. GmbH, d., DS2211 HIL I/O Board Features. 2013(Release 2013-A).
12. GmbH, d., DS5202 Electric Motor HIL Soluation Hardware and Software Installation and
Configuration. 2013(Soluation Version 13.1).
13. GmbH, d., RTI CAN MultiMessage Blockset Reference For RTI CAN MultiMessage Blockset 2.9.
2013(Relaease 2013-B).
14. GmbH, d., RTI CAN MultiMessage Blockset Tutorial. 2013(Release 2013-B).
16. GmbH, d., ASM Vehicle Dynamics Reference For ASM Vehicle Dynamics Blockset 2.4 and ASM
Vehicle Dynamics Operator Blockset 2.4. 2013(Release 2013-A).
72
17. Yan, Q., et al., Hardware in the Loop for a Dynamic Driving System Controller Testing and
Validation. SAE World Congress, 2005.
73
APPENDIX
A Single Lane Change waveform generation
period = 10; % s
freq = 0.3; % Hz
step_size = 0.001;
time1 = 0: step_size:period/2;
HwAngle_time = 0:step_size:period;
output1 = zeros(length(time1),1);
for ii = 1:length(time1)
if time1(ii)<period/4
output1(ii) = 0;
else
output1(ii) = -1*sin(2*pi*freq*time1(ii));
end
end
HwAngle_output = zeros(length(HwAngle_time),1);
HwAngle_output = [output1;-1*output1];
HwAngle_output(1) = [];
74