MECH 4420 Lecture: Vehicle Dynamics Control David Bevly 1
MECH 4420 Lecture:Vehicle Dynamics Control
David Bevly
1
Various Yaw Dynamic Models
2
Bicycle Model
−−+
++
−+
=
2
21
2120202
1
)()(
mVcmVcccs
mVmcIcsI
mVCcCa
sCa
ssR
ZZ
fff
ααα
δ
DC Gain: δ2xUS
xss
VKLV
R+
=
Neutral Steer Model (Kus=0)
VcsI
CassR
Z
f
2)()(
+= α
δ
Kinematic Model
δL
VR x=
VF
αF
VRαR
δ
Vx
Vy
Vrβ
N
E
ψ
ν
Classical (3140) Yaw Dynamic Control
• Placing the bicycle model transfer function into a classic block diagram format results in:
3
K(s)
−−+
++
−+
=
2
21
2120202
1
)()(
mVcmVcccs
mVmcIcsI
mVCcCa
sCa
ssR
ZZ
fff
ααα
δe δ+
-
rrdes
Classical (3140) Yaw Dynamic Control
• Where does desired yaw rate come from?– From knowledge of trajectory (and speed)– From an “ideal” bicycle model
• Use measured steer angle and speed to determine desired yaw rate
• Design Methods– Classical Design (need good model)
• Have to design in Bode or Root Locus– Why? Because of zero in the bicycle model TF– Prevents from being able to do coefficient matching
– Hand-Tuning• Need access to the vehicle
4
Classical Control Options for K(s)
• P– Takes advantage of “free” zero (zero in the TF)– Closed loop GDC will not be one!
• Need to add feedforward or pre-reference scaling• Don’t want zero steer angle when error is zero
• PI (or Lag)– Drive steady state error to zero (even with disturbances)
• PD (or Lead)– If desire better (faster, higher closed-loop bandwidth)
• Note: Very likely actuator limited in achieving this through steering
• PID (or Lead+Lag)– If desire both of the PI and PD.
5
Root Locus with Proportional Control
• P controller using the G35 Specifications– Note that (limited) improvement in settle time
and bandwidth does exist with P control
6
𝐾𝐾 𝑠𝑠 = 𝐾𝐾
Root Locus with PI Control• PI controller using the G35 specifications
– Note that the time to steady state is decreased due to the additional integrator pole which will be dominant • But guarantees zero steady state error
7
𝐾𝐾 𝑠𝑠 = 𝐾𝐾𝑠𝑠 + 10𝑠𝑠 = 𝐾𝐾 +
10𝐾𝐾𝑠𝑠
Kp=KKI=10K
What about controlling Position
• Various Strategies:– Waypoint Following
• Easier to implement and tune (by hand)• Requires fewer model parameters• One less integrator (i.e. lower order)
– Line Tracking• Need good model• Requires more parameters/states• Harder to define error• Provides improved tracking
8
Waypoint (Heading Control)
• Ignore the position and drive to “waypoints”– Reduce the order of the dynamics by one
• One integrator
• Error is defined to be the angle pointing to the waypoint– Difference in the angle between the vehicle and
the waypoint
9
S(s)
−−+
++
−+
=
2
21
2120202
1
)()(
mVcmVcccs
mVmcIcsI
mVCcCa
sCa
ssR
ZZ
fff
ααα
δu δ+
-
rydes K(s)e 1𝑠𝑠
ψ
Waypoint (Heading) Control
ψerr
[ ]Trx δψ=
10
• One way of doing vehicle position/later control is to drive to “waypoints.”– Feedback three measurements
• Heading error (modified to scale gain with Vx)• Yaw rate • Steer angle
– Some gains set to zero because of lack of reliable vehicle model
– If gain is too large the vehicle becomes unstable
• Models predict this result
– Use a “look ahead” distance (blue semi-circle) to select which point to drive to
• Increasing the look ahead distance adds damping and increases stability
• Increasing the look ahead distance leads to more error as the vehicle will cut corners in tight turns
Waypoint Controller
• Heading Error
• Look Ahead Radius
Waypoints from Path Planner
Chosen Waypoint
Look Ahead
Heading Error
minm11 m
m sR V = +
−−
−= −NNEE
des
deserror
1tanψψ
11
Waypoint (Heading ) with P Control• Proportional heading controller using the
G35 Specifications– Stable with P only
12
𝐾𝐾 𝑠𝑠 = 𝐾𝐾
Waypoint with PD Control• PD heading controller using the G35
specifications– Note this is exactly the same root locus as PI on yaw
dynamic control
13
𝐾𝐾 𝑠𝑠 = 𝐾𝐾 𝑠𝑠 + 10 = 𝐾𝐾𝑠𝑠 + 10𝐾𝐾
Kp=10KKD=K
Simplified Waypoint Control
• Waypoint control using a simplified vehicle model (1st order yaw dynamics) and ignoring steering dynamics, S(s))
14
Desired Closed Loop C.E.: Resulting Gains:
1)()(
+=
sG
ssr
r
DC
τδ 2VKLVG
USDC +
=
2
2 22n
des n ns sωψ
ψ ζω ω=
+ +
DC
rn
GK
τωψ
2
=
DC
rnr G
K12 −
=τζω
Vehicle Model:
PD Controller: 𝛿𝛿 = 𝐾𝐾𝜓𝜓𝜓𝜓𝑒𝑒𝑒𝑒𝑒𝑒 + 𝐾𝐾𝑒𝑒�̇�𝜓𝑒𝑒𝑒𝑒𝑒𝑒 = 𝐾𝐾𝜓𝜓 𝜓𝜓𝑒𝑒𝑒𝑒𝑒𝑒 + 𝐾𝐾𝑒𝑒𝑟𝑟
Waypoint Following Results
• Test performed on ATV at Auburn• Waypoint controller works o.k. with correct parameters• The incorrect model results in instability
-150 -100 -50 0-10
-8
-6
-4
-2
0
2
East (m)
Nor
th (
m)
Incorrect ParametersCorrect ParametersDesired Path
15
Further Improvements
• Driving to waypoints is not best control method
• Results in decreased tracking accuracy– Vehicle oscillates more
• In limited scenarios this caused instability on RASCAL
ψerr
yerr
• Two errors are important• Heading• Lateral position
• Driving both errors to zero requires line-tracking controller
• Requires a more accurate model
ψerr
16
Line Tracking
• Heading Error
• Lateral Error– Neglecting Vy
−−
−= −NNEE
des
deserror
1tanψψ
Look Ahead
Heading Error
Lateral Offset
Path from Path Planner
ψψX
VX
Vy ≈= )sin(
17
Lateral Position DynamicsV = velocityr = yaw rateψ = heading (or yaw)ν = vehicle courseδ = steer angleβ = body sideslip angleα = tire sideslip angle
VF
αF
VRαR
δ
Vx
Vy
Vrβ
N
E
ψ
ν
18
�̇�𝑦 = 𝑉𝑉𝑠𝑠𝑉𝑉𝑉𝑉 𝜓𝜓 + 𝛽𝛽 = 𝑉𝑉𝑥𝑥sin 𝜓𝜓 + 𝑉𝑉𝑦𝑦cos 𝜓𝜓
�̇�𝑦 ≈ 𝑉𝑉𝑥𝑥𝜓𝜓 + 𝑉𝑉𝑦𝑦
• Lateral velocity is defined as:
• Assuming small angles:
Full Yaw Vehicle Dynamics
• Steering– 1st order
• Neglecting motor dynamics– 0th order if neglect steering dynamics (𝛿𝛿 = 𝑢𝑢)
• Vehicle– 2nd Order
• Error– Heading (1st order)– Lateral Position (1st Order)
1+=
sK
u δδ
τδ
( )2 22
v v
v v v
k s nrs sδ ζ ω ω
+=
+ +
r=ψ
( )u=δ
19
�̇�𝑦 ≈ 𝑉𝑉𝑥𝑥𝜓𝜓 + 𝑉𝑉𝑦𝑦
Full Yaw Vehicle Dynamics
• Note that to put the lateral position into a transfer function, Vy has to be neglected (or treated as a disturbance)– Recall TF only allow one input and one output
• Not the case for state space
𝑦𝑦 𝑠𝑠 𝑠𝑠 = 𝑉𝑉𝑥𝑥𝜓𝜓 𝑠𝑠 + 𝑉𝑉𝑦𝑦(𝑠𝑠)
20
+ yψ𝑉𝑉𝑥𝑥
Vy+ 1
𝑠𝑠
Control Strategies
• Classical (i.e. 3140)– Single Controller
• This must be done in Root Locus or Bode– Cascaded
• Break up the system into more manageable systems– Yaw dynamic loop still must be done with root locus or bode
due to the zero– Inner and outer loops could be designed with coefficient
matching, root locus, or bode– Hand-tune each loop
• State Feedback (we will get into this later)– Need Good Model for Design– Need Estimator (also requires good model)
21
Lateral Control Dynamics
• Single Controller Design• Neglecting Lateral Velocity, the system
can be represented as follows (Vy is treated as a disturbance):
22
S(s)
−−+
++
−+
=
2
21
2120202
1
)()(
mVcmVcccs
mVmcIcsI
mVCcCa
sCa
ssR
ZZ
fff
ααα
δu δ+
-
rydes K(s)e 1𝑠𝑠
ψ 𝑉𝑉𝑥𝑥𝑠𝑠
y
Lateral Control Dynamics
• Can use any type of controller for K(s) • Note the closed loop GDC=1 for any K(s)
• This is because the plant already had integrators (2 to be exact)
• Therefore if yss=ydes (if ydes=constant) so ess=0• However might still need integrator for:
– Changing ydes (i.e. tracking curves)– Disturbances (banks, cross-wind, etc.)
23
S(s)
−−+
++
−+
=
2
21
2120202
1
)()(
mVcmVcccs
mVmcIcsI
mVCcCa
sCa
ssR
ZZ
fff
ααα
δu δ+
-
rydes K(s)e 1𝑠𝑠
ψ 𝑉𝑉𝑥𝑥𝑠𝑠
y
Lateral Proportional Controller• Lateral P controller using the G35 specifications and
ignoring steering dynamics (S(s)=1)– Unstable with P only (for any value of K)– Therefore also unstable for PI
24
𝐾𝐾 𝑠𝑠 = 𝐾𝐾
Lateral PD Control• PD lateral controller using the G35 specifications
and ignoring steering dynamics (S(s)=1)– Stable, but not that great of performance (settle time
of 2 seconds)
25
𝐾𝐾 𝑠𝑠 = 𝐾𝐾 𝑠𝑠 + 2 = 𝐾𝐾𝑠𝑠 + 2𝐾𝐾
Kp=2KKD=K
Cascaded Approach• Cascaded into 3 consecutive controllers
– Inner loop: Steering Control– Middle Loop: Yaw Dynamics– Outer Loop: Position Control (waypoint or line)
• Each consecutive controller should be designed “slower” than the previous– Therefore previous “inner” dynamics can be neglected– Can use P, PI, and/or PID for any of the loops
26
Gc1(z)Gc2(z)Gc3(z) Gp1(z) Gp2(z) Gp3(z)
yr
δ
+ + +- - -
Line Tracking of a Tractor with GPS
-0.3
0.0
0.3
0.6
0.9
0 50 100 150 200
Time (sec)
Late
r Erro
r (m
)
1 FootMean = 5 mm 1σ=3 cm
27
MECH 4420 Lecture:�Vehicle Dynamics ControlVarious Yaw Dynamic ModelsClassical (3140) Yaw Dynamic ControlClassical (3140) Yaw Dynamic ControlClassical Control Options for K(s)What about controlling PositionWaypoint (Heading Control)Waypoint (Heading) ControlSimplified Waypoint ControlWaypoint Following ResultsFurther ImprovementsLateral Position DynamicsFull Yaw Vehicle DynamicsFull Yaw Vehicle DynamicsControl StrategiesLateral Control DynamicsLateral Control DynamicsCascaded ApproachLine Tracking of a Tractor with GPS