- The first task for automating an driverless vehicle is to define a model for how the vehicle moves given steering, throttle and brake commands.
- This module progresses through a sequence of increasing fidelity physics-based models that are used to design vehicle controllers and motion planners that adhere to the limits of vehicle capabilities.
Learning Objectives
- Develop a kinematic bicycle model of a car with velocity and steering angle inputs
- Develop a dynamic bicycle models of a car with velocity and steering angle inputs
- Differentiate between models of tire forces
- Develop a model for actuation in a car, from pedal and steering wheel to tire forces
Generally vehicle motion can be modeled in two ways:
- dynamic constraint that define its motion
- considerring all the forces and moments acting on the vehicle
Kinematic vs Dynamic Model
Kinematic Model
: At low speeds (less significant/low acceleration), it is often sufficient to look only at kinematic models of vehicles- Examples : Two wheeled robot, Bicycles model
Dynamic Model
: is more involved, but captures vehicle behavior (motion) more precisely over a wide operating range (Also more involved and developed than Kinematic Model)- Examples : Dynamic vehicle model
Coordinate Frames
- Right handed by convention
- Inertial frame
- Fixed, usually relative to earth
- ENU (Est: X; North : Y; Z: Up) relative to a reference point nearby
- Earth-Centered Earth fixed (ECEFG), used in GNSS systems
- Fixed, usually relative to earth
- Body frame
- Attached to vehicle, origin at vehicle center of gravity, or center of rotation
- Example : the center of gravity of the vehicle or the center point of the rear axle
- Attached to vehicle, origin at vehicle center of gravity, or center of rotation
- Sensor frame
- Attached to sensor, convenient for expressing sensor measurements
Why We Need Coordinate Transformation
- In robotics applications:
- Coordinates are attached to the moving system also to represent elements from these frames in the inertial frame
- To do so, we need to transform variables from one coordinate frame to the other (Body => Inertial frame)
A two wheeled robot with a single sensor has 3 frames
- Vehicle Frame has multiple sensor frame
Vectors
- Vectors are variables with both magnitude and direction
-
$\displaystyle v$ is a vector, in a 2D plane and can be define in two coordinates frame: -
body frame
: {$b1$ ,$b2$ } -
inertial frame
: {$e1$ ,$e2$ } - Both coordinates define two different coordinate frames
$F_{B}$ and$F_{E}$
Rotation Matrices in 2D
The frames
where :
-
$C_{EB}$ : transforms vectors from$b$ to the frame$e$ -
$C_{BE}$ : projects the frame$e$ onto$b$ using the angle$\theta$
Coordinate Transformation Application example: Two wheeled robot
Problem :
- Represent the position of the point
$P$ observed by the robot body frame$B$ w/ respect to the inertial frame$e$ - the position of the robot w/ respect to the inertial frame is x and y
- the orientation of the robot is
$\theta$
Solution :
- Conversion between Inertial frame and Body cordinates is done with
translation vector
and arotation matrix
- Location of the point
$P$ in Body Frame$B$
- Location of the point
- Location of the Point(P) in Inertial Frame(E)
where :
-
$O_{EB} / O_{BE}$ : translation of the axis -
$C_{EB} / C_{BE}$ : the rotation of the axis
Homogenous Coordinate Form
- A 2D vector in homogeneous form
- Transforming a point from body to inertial coordinates with homogeneous coordinates
2D Kinematic Modeling
- The Kinematic constraint is nonholonomic
- It restricts the rate of change of the position of the robot
- the robot can only move forward because its wheels point in this direction
the robot can roll forward and turn while rolling but cannot move sideways directly
- A constraint on rate of change of degrees of freedom (dof)
- Vehicle velocity always tangent to current path
- Nonholonomic constraint
- Velocity components
Simple Robot Motion Kinematics
graph LR
A[Inputs]-->B[Simple Model]
B-->C[Outputs / States]
where :
- Inputs : [v, w] , the velocity and rotation rate
- Output : [x, y, theta], the position of the robot and its the orientation / heading
- State : is a set of variables often arranged in the form of vectors that fully describe the system at the current time
Two-Wheeled Robot Kinematic Model
- Assume control inputs are wheel speeds :
where :
- p : center of the robot
- l : wheel to center
- r : wheel radius
- w1, w2 : wheel rotation rates
- Kinematic constraint
assuming no slip btw the wheel and the surface
The robot moves in a curved path about some Instantaneous Center of Rotation (ICR)
- ICR == robot kinematic model
- Use the instantaneous center of rotation (ICR)
- Equivalent triangle give the angular rate of rotation
Kinematic Model of a Simple 2D Robot
- Continuous time model :
- Discrete time model : enable to convert the model from differentiel to finite difference form (FDF) for control design & simulation
where :
- k : value of the variable in the current time step
- k + 1 : value of the variable in the next time step
Read more about 2D plan motion and coordinate frames in the PDF below:
Bicycle Kinematic Model : has been used as suitable control-oriented model
for representing vehicles.
- 2D bicycle model (simplified model of four-wheel car)
- Nonholonomic constraints of a car
- Front wheel steering model (similar to cars in 2D plane inertial frame (FI))
Rear Wheel Reference Point
-
Apply Instantaneous Center of Rotation (ICR)
$\displaystyle \dot{\theta} = \omega = \frac{v}{R}$ -
Similar triangles
$\displaystyle \tan \delta = \frac{L}{R}$ -
Rotation rate equation
$\displaystyle \dot{\theta} = \omega = \frac{v.tan \delta}{L}$
where :
-
$\displaystyle v$ : the velocity -
$\displaystyle R$ : the radius -
$\displaystyle \theta$ : the heading of bicycle -
$\displaystyle \delta$ : the steering angle -
$\displaystyle \omega$ : the angular/rotation rate of the bicycle -
$\displaystyle L$ : the gap/length between the two wheels -
$\displaystyle x, y$ : the front/rear axle reference point
Rear Axle bicycle Model
- If the desired point is at the center of the rear axle :
Front Axle bicycle Model
- If the desired point is at the center of the front axle :
Center of Gravity (CG) - Model
- If the desired point is at the center of gravity:
where :
State - Space Representation
- It is instantaneously not possible to change the steering angle (
$\delta$ ) of the vehicle from one extreme of its range to another but it's possible with our kinematic model. - If we assume we can only control the
rate of change
of the new steering angle ($\phi$ ) - Modify CG kinematic bicycle model to use steering rate input
- Inputs :
$[v, \phi]^T$ (steering rate phi as our modified input) - State:
$[x, y, \theta, \delta]^T$ (extended version with delta as a state)
- Inputs :
Where :
-
$\phi$ - is the modified Input: rate of change of steering angle - This model satisfies the no slip condition
Read more about the Kinematic Bicycle Model (pages 15-26) in the PDF below:
Dynamic Modeling
-
Why Dynamic Modeling is important ?
- At higher speed and slippery roads, vehicles do not satisfy no slip condition
- Forces such as drag, road friction govern required throttle inputs
- By modeling the balance of forces in moments acting on the vehicle allows to determine the accelerations the vehicle is experiencing and use them to model the vehicle motion
-
Steps to build a typical dynamic model :
1. Coordinate frames
2. Lumped dynamic elements
3. Free Body Diagram
4. Dynamic Equations
Dynamic Modeling - Translation Systems
- Deals with forces and torques
- Roughly, need to equate all forces
- Governed by Newton's Second Law (
$\displaystyle \Sigma \overrightarrow{F} {i} = M\overrightarrow{a}$ )
- Example: Vehicle Shock Absorver (Suspension)
Dynamic Modeling - Rotation Systems
- Very common in the automobile :
- Ex : Internal combustion engine chap, gear boxes, converters and tires etc
- Inertia, J
- Torsion force, T
- Forces resisting that torsionanl force
- Spring force
- Damping force
- Inertia force
Full Vehicle Modeling
- All components, forces and moments in 3D
- Pitch, roll, normal forces
- Suspension, drivetrain, components models
Dynamic models of vehicles are useful for multiple applications :
-
Improvement of state estimation methods in sensor fusion to track motion
-
trajectory path tracking
-
help define the limits of vehicle performance : unsafe trajectories that car cannot track
-
A Full 3D vehicle modeling is very complex due to all components, forces and moments ...
-
One of the 'easiest' way is to split the model into two 2D models :
- steering control
- Throttle and brake control problem
2D Dynamics - Vehicle Longitudinal Motion
2D Dynamics - Vehicle Lateral Motion
- In both model There are several forces acting in the vehicles
General Dynamics:
-
Ardema, Mark D. Newton-Euler Dynamics, Springer: Santa Clara University, Santa Clara (2005).
-
Tong, David. Classical Dynamics University of Cambridge Course Notes (2004)
Vehicle Modeling:
-
Rajamani, Rajesh. Vehicle dynamics and control, Springer Science & Business Media (2011).
Based on the dynamic of the vehicle that generated forward motion
Where :
- Faero : Aerodynamic drag force
- Fxf, Fxr : Front and rear tire forces
- Rxf, Rxr : Rolling
- mgsin(alpha) : force of gravity where alpha is the local road slope
Based on Newton 2nd Law
:
The imbalance btw these forces defines the acceleration of the vehicle in the longitudinal direction (
The Simplified Longitudinal Dynamics
-
The full eq. :
$\displaystyle m\ddot{x} = F_{xf} + F_{xr} - F_{aero} - R_{xf} - R_{xr} -mg \sin \alpha$
-
Let
$F_{x}$ -total longitudinal force
:$F_{x} = F_{xf} + F_{xr}$ -
Let
$R_{x}$ -total rolling force
:$R_{x} = R_{xf} + R_{xr}$ -
Assume
$\alpha$ is a small angle (small road inclinations):$\sin \alpha = \alpha$ -
Then the simplified longitudinal dynamics become
$\displaystyle m\ddot{x} = F_{x} - F_{aero} - R_{x} - mg \alpha$
-
where then :
- x : inertial term for longitudinal acceleration
- Fx : the traction Force generated by the powertrain
- (Faero - Rx - mgalpha) : the Total Resistance Forces (Fload)
Each force
in the equation has a separated model associated to it.
Simple Resistance Force Models
- Total resistance load :
-
$\displaystyle F_{load} = F_{aero} + R_{x} + mg \alpha$ - We already built a model for the effects on gravity in the previsous lesson above
-
- The aerodynamic force can depend on air density, frontal area, on the speed of the vehicle
$\displaystyle F_{aero} = 1/2 C_{\alpha} \rho A \dot{x}^2$ - Given a fixed vehicle shaped and standard atmospheric pressure :
$\displaystyle F_{aero} = C_{\alpha}\dot{x}^2$
- where :
- C_alpha : lumped Coefficient
- Rho : Air density
- A : front area of the vehicle/vehicle coef of friction?
- x (.) = current speed of the vehicle
- The Rolling resistance can depend on the tire normal force (N), tire pressures and vehicle speed :
-
$\displaystyle R_{x} = N (\hat{C_{r,0}} + \hat{C_{r,1}} |\dot{x}| + \hat{C_{r,2}} \dot{x}^2)$ -
If we assume nominal operating conditions, and dropping the 2nd-order terms for simplicity we get a
linear rolling model
: -
$\displaystyle R_{x} \approx {C}_{r,1} |\dot{x}|$
-
where :
- Cr1 : linear rolling coef resistance
Notice this an approximative model. In pratice the accuracy required of the controller or the simulation environment.
Powertrain Modeling
-
The force generated to conquer the resistance forces comes from the power train
-
They can be modeled as being generated by series of components
-
the power provided by
combustion in gasoline/diesel engines
,electrochemical reactions in batteries for electric/hybrid vehicles
flow to thedriveline
providing a torque to the wheels -
The driveline refers to the sequences of components btw the engine and the wheels :
- the torque converter/clutch
- the transmission/gearbox
- differentials
-
The connection btw wheel and engine when in gear it is possible to model the relationship wheel speed - engine speed as a
kinematic constraint
- Rotational Coupling :
$\displaystyle \omega_{w} = GR \omega_{t} = GR \omega_{e}$
- Rotational Coupling :
where :
- Ww : wheel angular speed (provided by the differential axle)
- Wt : turbine angular speed
- We : engine angular speed
- GR : Combined gear ratios (changes depending on the powertrain components state)
- The vehicle forward velocity is proportional to the wheel angle speed times the effective tire radius
- Longitudinal velocity :
$\displaystyle \dot{x} = r_{eff} \omega{w}$
- Longitudinal velocity :
where :
- Ww : wheel angular speed (provided by the differential axle)
- reff : effective tire radius
- Longitudinal acceleration
$\displaystyle \ddot{x} = r_{eff} GR \dot{\omega}_{e}$
Power flow in the PowerTrain
where
- Ie, Iw, It : are the Inertia for each component
where
- Je : Powertrain Inertia which is the sum of all inertial
- GRr_effF_load : total Load Torque (T_load)
To learn more about longitudinal dynamics and vehicle drivetrain, read Chapter 4 in the textbook below:
Vehicle Model to bicycle Model
- Assumptions :
- Longitudinal velocity is constant(allows to modeling inaccuracies when acceleration/decelerating out of curves)
- Left and right axle are lumped into a single wheel (bicyle model)
- Suspension movement, road inclination and aerodynamic influences are neglected
Lateral Dynamics
- Lateral dynamics can be written as
Tire Slip Angles
- Many different tire slip models
- For small tire slip angles, the lateral tire forces are approximated as a linear function of tire slip angle
- Tire variables
- Front tire slip angle,
$\alpha f$ - Rear tire slip angle,
$\alpha r$
- Front tire slip angle,
Front and Rear Tire Forces
- The cornering stiffness of the tire is defined by theits ability tp resist deformation while the vehicle corners
Cf : linearized cornering stiffness of the front wheel
Cr : linearized cornering stiffness of the rear wheel
Lateral and Yaw Dynamics
- From the previous slide formulations :
Where :
- Beta-dot : the vehicle slip angle rate
- Psi-dot-dot : the rate of change of the yaw rate
Standard State Space Representation
- State Vectors :
- System Dynamic Matrices A & B, are time-invariant if the forward speed
$V$ is constant
- Linear Dynamic Model : is also suitable with Kalman filter (Course 2)
where :
- Delta : the driver steering angle command
Read more about the Lateral Dynamics of Bicycle Model (pages 27-44) in the PDF below:
Coupled Lateral & Longitudinal
- Notice that the lateral dynamics and the longitudinal dynamics can affect each other
Main Control Task
:- Provide suitable steering angle , throttle and brake commands
- To keep the vehicle on the defined path at the desired velocity
Assumption :
- The desired elements are provided by the motion planning system (i.e. Course 4.)
Steering : the driver's cmd to turn the vehicle to the left or right
- Simple Steering Model
- The wheel angle
$\delta_s$ is proportional to the steering angle$\delta$
where
- C : the steering coefficient
-
This model can now be used in simulation & as a starting point for non-agressive driving
-
Actual Steering System
- Supplementary reading on : Vehicle steering system.
-
PowerTrain (Drive line) : the vehicle powertrain determines the vehicle forward velocity and acceleration
- Throtlle and brake commands affect torque balance
- In automatic transmission cars, a driver/autonomy has two inputs to accelerate or decelerate the car:
- the gas
- brake
- In order to convert the driver commands into wheel motions :
- the power flow starts from the power generation unit (PGU) (internal combustion engine/electric motor)
- the throttle depal position drives the torque produced by the PGU
- then passed to the transmission system
- in the automatic transmission the fluid coupling system/torque converter is placed btw the engine shafts and the gearbox unit and based on operating mode/ desired speeds the GB changes the gear as needed
- `Gear 1 & 2`, are the `torque modes` and the higher gears are the `speed modes`
- Then the power flows to the wheels through a differential and generates the wheel torques which generate traction forces
- the traction force might be higher than the resistance force (Faero + road friction) to accelerate the vehicle forward in the longitudinal direction
Throttle (Accelerating)
-
The driver puts their foot on the gas pedal to define the level of torque demand needed to accelerate the vehicle
-
The actual response is a bit more complex and depends on the type of the PGU.
-
Accelerating Model
- PGUs are differents based on the source and we use the
Torque
-Speed
diagram to represent their characteristics for power units-
Characteristics Plots
-
Gasoline Engines : higher operating speed range : [2000, 3000] RPM for passager vehicle
- suitable for small/city vehicles
-
Diesel Engines : more consistent torque generation over a wider range of speeds
- suitable for heavy-duty vehicles
-
Electric Motors : more efficient at lower RPMs such as 1500 RMP not very effecient at higher RPM
- Hybrid vehicles can be the solution to compensated the loss and improve performance at higher speeds
-
Typical torque curves for Gasoline Engines
-
Brake (Decelerating)
-
The Brake pressure results in a braking force on the brake disc or drum, which then becomes a braking wheel torque at the wheel
-
the braking torque on the wheel creates a negative longitudinal force to decelerate the vehicle
-
Very predictable response because of the braking management system
-
Braking Model
-
A simple linear mapping from pedal position to brake torque can use used for modeling
-
Braking System
- Basic functionality of braking includes :
- Shorten stopping distance
- Steerability during braking through ABS systems
- Stability during braking to avoid overturning
- Basic functionality of braking includes :
-
Read more about vehicle steering system in the Journal article below:
- Reimann G., Brenner P., Büring H. (2015) "Steering Actuator Systems". In: Winner H., Hakuli S., Lotz F., Singer C. (eds) Handbook of Driver Assistance Systems. Springer, Cham
-
Read more about vehicle driveline (throttling and braking system) in the textbook below:
- Mashadi, B., Crolla, D, Vehicle Powertrain Systems. Wiley (2012)
Importance of Tire Modeling
- The tire is the interface btw the vehicle and road
- Vehicle Actuation (Steering, Throttle, Brake) is the input of the Tire Model
- The external forces that are exerted on the vehicle are entirely defined by the tire's abilities to genrate them
- A good controller based on dynamics model depends on the efficiency of the tires model to capture the force-generating behavior of the tire thoughtout its operating range
Vehicle Slip Angle vs Slip Ratio
- Slip Angle (
$\beta$ ) is the angle btw the forward direction of the vehicle in the actual direction of its motion
- Vehicle(Bicycle) Slip Angle
where :
- Vy : the lateral velocity
- Vx : Longitudnal velocity
Tire Slip Angles
- the angle btw the direction in which a wheel is pointing and the direction in which it is actually travelling
where :
- Ar, Af : tire slip angle for the front and rea wheels
- Slip Ratios
- Longitudinal slip (also called slip ratio)
- The slip ratio captures the relationship between the deformation of the tire and the longitudinal forces acting upon it.
- When accelerating or breaking, the observed angular velocity of the tire does not match the expected velocity for the pure rolling motion, which means there is sliding between the tire and the road in addition to rolling
Tire Modeling
-
Additional inputs can improve accuracy :
- Camber angle
- Tire properties
-
3 types of modeling :
- Analytical - ex : Brush, Fiala, Linear
- Tire physical parameters are explicitly employed
- Low precision, but simple
- Numerical
- Look up tables instead of mathematical equations
- No explitic mathematical form
- Geometry and material property of tire are considered
- Parameterized models
- Need experiments for each specific tire
- Formed by fitting model with experimental data
- Match experimental data very well
- Used widely for vehicle dynamics simulation studies and control design
- Analytical - ex : Brush, Fiala, Linear
Liner Tire Parameterized Model
- Assumption : the relationship btw slip angle and force is linear
Pacejka Tire Model
- Also called Magic Formula tire model
- widely used in model-based control development.
where
- Fz : tire vertical force
- B, C, D, E : varying Friction coefficient (differ to one tire to another)
Force vs Slip Ratio
- These datas are collected from tire road testing
- Both models are good representations of the data in the low slip regions but the linear does poorly as the lip increases
- Tire modeling is often diffucult task as the spread measured forces is quite pronounced relative to the models
Force vs Slip Angle
- Both models are extremely useful for creating
simulated vehicles
whose dynamics can be computed efficiently and for developing control laws based on the dynamic models of the vehicle and its many .
Read more about different tire model and formulation in the PDF below:
- New industry
- New different way to solve problem
- Challenge to build a scalable algorithms
- various wider inputs
- complexity interactions w/ the env
- various wider inputs
- Do/try several experiments :
- Collecting datas
- trying all sensors (Strenghts vs Weakness)
- OK
- Holonomic vs. Nonholonomic Constraints for Robots
- Analytical Mechanics
- Odometrie
- Modern robotics book by Kevin Lynch
- Python for scientific computing - FR
- ISO 8855:2011 - Road vehicles — Vehicle dynamics and road-holding ability — Vocabulary
-
Configurations space (C-space) : the space of all configurations, representations of all the positions of the robot
-
Degree of freedom (dof) : the dimension of C-space
-
$dof = \Sigma n - k$ - where :
-
$n$ is the number of coordinates - k : the independent constraint
-
- where :
-
-
Holonomic Constraint
:- constraint on configuration (C-space)
- reduces the
dof
of the C-space of the robot
-
Non-Holonomic Constraint
(Non integrable):- constraint on velocity
- reduces the the space of possibles velocities, but doesnot reduce the C-space
-
Vehicle Dynamics Control (VDC) sytems in the market :
- functions :
- types of maneuvers
- longitudinal maneuvers
- lateral maneuvers
-
inputs
:- brakes, steering, ...
-
output
:- correct understeers (front wheels) / overstreer (rear wheels)
- safety, stability, comfort
- types of maneuvers
- usage :
- sudden maneuvers affecting the control of vehicle body such as : brakes, steering, ...
- the driving conditions are poor (slippery, wet, dangerous, etc.).
- technologies :
- Anti-lock Braking Systems (ABS): Prevent wheel lock during braking
- Electronic Stability Control/Program (ESC/P) / Dynamic Stability Control(DSC): Enhances lateral vehicle stability
- Braking based technique
- 4 Wheel steering (4WS): Enhances steerability
- Adding additional steering angle
- Adaptive Cruise Control (ACC )
- functions :