ECE 726 - Project Report - Redacted
ECE 726 - Project Report - Redacted
Fall 2015
Project Report
2. Problem Definition
The control system of an ACC vehicle system is commonly modeled by a two-level control
architecture which consists of an upper level and a lower level controller. The upper-level
controller computes the acceleration commands for performing the TM, which are sent to the
lower-level controller. The lower-level controller then uses the throttle and braking commands
to track the spacing-control laws.
This project deals with use of Model Predictive Control (MPC) for designing of the upper-level
controller. The following first-order ACC model is used to design the spacing-control laws -
𝑑
𝜏 𝑥̈ (𝑡) + 𝑥̈ (𝑡) = 𝑢(𝑡)
𝑑𝑡
𝑥̇ (𝑡) ≥ 0
𝑢𝑚𝑖𝑛 ≤ 𝑢 ≤ 𝑢𝑚𝑎𝑥
Where,
u (t) - acceleration commands computed by upper-level controller,
𝑥,𝑥,̇ 𝑥̈ - absolute position, velocity and acceleration of the ACC vehicle,
𝜏 - Time-lag corresponding to bandwidth of lower-level controller.
𝑥(𝑡 + 𝑇) 1 𝑇 0 𝑥(𝑡) 0
0 1 𝑇 0
(𝑥̇ (𝑡 + 𝑇)) = ( 𝑇) (𝑥̇ (𝑡)) + (𝑇) 𝑢(𝑡)
𝑥̈ (𝑡 + 𝑇) 0 0 1− 𝑥̈ (𝑡)
𝜏 𝜏
In order to find the feasible initial conditions, we need to solve the system equations to
determine the minimum distance required by the vehicle to stop for any given initial condition.
The solution for the state equations of a system can be written as:
𝑥(𝑡)
𝑥(𝑡) = (𝑅̇ (𝑡))
𝑥̈ (𝑡)
subject to
𝑒𝑘+1 = 𝜙𝑒𝑘 + Γ𝑢𝑘
e(0) ≡ measured
with the state and control constraints which formulate the collision avoidance, non-negative
velocity constraint and acceleration limits of the ACC vehicle respectively
𝑒𝑘 𝑆𝐼𝑉𝐷
𝑦𝑘 = (−𝑒̇ ) ≤ ( ) = Sc
𝑘 𝑣𝑜
𝑢𝑚𝑖𝑛 ≤ 𝑢𝑘 ≤ 𝑢𝑚𝑎𝑥
and the final state constraint which formulates the establishment of SIVD with zero range-rate
0
𝑒𝑁 = 𝜓 = (0)
0
3.4 Formulation of MP
A three step procedure is used to reformulate the FTCOCP as a MP -
1. Predicted error ek is expressed as a function of e(0) and the control sequence.
ek = Φke(0) + ∑𝑘−1 𝑙
𝑙=0 𝜙 Γ 𝑢𝑘−𝑙−1 , where k=1,2,…..,N.
The above equation can be expressed as 𝐸 = 𝐴̅𝑒(0) + 𝐵̅ 𝑈. – I
2. The J (performance index), state constraints and control constraints are written in a
matrix form similar to ‘I’.
3. Expression for ek is directly substituted into J and the three constraint equations of
FTCOCP.
The performance index in matrix form is expressed as:
𝑡
𝐽 = 𝑒𝑁𝑇 𝑆𝑒𝑁 + 𝑒𝑜𝑇 𝑄𝑒𝑁 + ⋯ + ⋯ 𝑒𝑁−1
𝑇
𝑄𝑒0 + 𝑢0𝑇 𝑅𝑢0 + ⋯ + 𝑢𝑁−1 𝑅𝑢𝑁−1
= 𝑒0𝑇 𝑄𝑒0 + 𝐸 𝑇 𝑄̅ 𝐸 + 𝑈 𝑇 𝑅̅ 𝑈 - II
Where,
𝑄 0 … 0
𝑄̅ = ( 0 ⋱ ⋱ ⋮)
⋮ ⋱ 𝑄 0
0 … 0 𝑆
𝑅 0 … 0
𝑅̅ = ( 0 ⋱ ⋱ ⋮)
⋮ ⋱ 𝑅 0
0 … 0 𝑅
By substituting I into II, we have,
𝐽(𝑈, 𝑒(0)) = 𝑒𝑜𝑇 𝑄𝑒0 + {𝐴̅𝑒(0) + 𝐵̅ 𝑈}𝑇 𝑄̅{𝐴̅𝑒(0) + 𝐵̅ 𝑈}
= 𝑒𝑜𝑇 {𝑄+𝐴𝑇̅ 𝑄̅ 𝐴̅}𝑒0 + 𝑈 𝑇 𝐻𝑈+2GU
Where,
𝐻 = 𝑅̅ + 𝐵̅ 𝑇 𝑄̅ 𝐵̅
𝐺 = 𝑒(0)𝑇 𝐴𝑇̅ 𝑄̅ 𝐵̅
Combining the above performance index with the state, control and terminal constraints, the
fixed time constrained OCP can be written as:
𝑚𝑖𝑛 𝑇
𝑈 𝐻𝑈 + 2𝐺(𝑒(0))𝑈
𝑈
Subject to -
𝐿𝐼𝑁 𝑈 ≤ 𝑀𝐼𝑁 (𝑒(0)) - obtained from state and control constraints
𝐿𝐸𝑄 𝑈 = 𝑀𝐸𝑄 (𝑒(0)) - obtained from terminal state constraints.
Where,
𝐶̅ 𝐵̅
𝐿𝐼𝑁 = ( 𝐼 )
−𝐼
𝑆𝑐̅ − 𝐶̅ 𝐴̅𝑒(0)
𝑀𝐼𝑁 = ( 𝑈𝑚𝑎𝑥 )
−𝑈𝑚𝑖𝑛
𝑆𝑐
̅
𝑆𝑐 = ( ⋮ )
𝑆𝑐
And,
𝐿𝐸𝑄 = ( 𝜙 𝑁−1 Γ 𝜙 𝑁−2 Γ…Γ )
𝑀𝐸𝑄 = 𝜓 − 𝜙 𝑁 𝑒(0)
Fig.3: ACC vehicle response with all constraints in formulation of FTCOCP (a)Relative vehicle position,
(b)Vehicle velocity, (c)Vehicle Acceleration and (d)Commanded Acceleration
Fig.3 shows the response of ACC vehicle to spacing control laws with all constraints applied in the
formulation of FTCOCP. Thus the formed QP has both equality as well as inequality constraints.
Two cases are considered here –
1. Static SIVD (=0 m, since target vehicle is at rest)
2. Dynamic SIVD as computed from equation. A.
For Case 1, the TM is a success for the ACC vehicle as represented by the black lines in Fig. 3. The
solid lines represent the ACC vehicle’s relative position with respect to the SIVD and the dashed
lines represent the ACC vehicle’s relative position with respect to the target vehicle in Fig. 3(a).
Since the scenario considered for Case 2 is of extreme deceleration for ACC vehicle, sudden
encounter of the target leads to rapid increase in SIVD as seen in Fig. 3(a) and thus the range
reduces drastically in a short time span. Thus the vehicle can’t decelerate rapidly enough and
maintaining SIVD becomes infeasible, as can be observed from the violation of the input
constraints in Fig. 3(c). The ACC vehicle doesn’t collide with the target vehicle though, as can be
seen from the plot of relative position of ACC with respect to target vehicle. Thus, we can
conclude that this method of dynamically calculating SIVD can be overly conservative for extreme
deceleration cases and can’t be satisfied.
Fig.4: ACC vehicle response with variation in time-lag of lower-level controller of ACC. (a) Relative
vehicle position, (b)Vehicle velocity, (c)Vehicle Acceleration and (d)Commanded Acceleration
Fig.4 shows response of ACC vehicle to spacing control laws with all constraints applied in
formulation of FTCOCP. The case of static SIVD is considered and simulation is carried out by
changing the bandwidth of lower-level controller of the ACC system. As observed from Fig. 4, the
system performance deteriorates as the time-lag is increased. A greater time-lag leads to more
spikes in commanded acceleration. It is observed that for time-lag of 0.6, the corresponding TM
is a failure as collision occurs and a negative velocity, as seen in Fig. 4(b), is required to bring the
vehicle back to the origin.
4.2.4 Variation of Control Horizon
Fig. 5 ACC vehicle response with variation in control horizon (a) Relative vehicle position, (b)Vehicle
velocity, (c)Vehicle Acceleration and (d)Commanded Acceleration
Fig. 5 shows response of ACC vehicle to spacing control laws while control horizon (Nc) is varied
and prediction horizon (NP) is set at 100. It is observed from Fig. 5 that the system is more
conservative for longer control horizon. Also the computational cost reduces as the control
horizon is reduced, but because of fewer degrees of freedom it becomes difficult to control the
system and ensure feasibility throughout the horizon. Beyond a point, reduction in control
horizon makes the system infeasible and results in a collision (Nc = 25) as it makes the system
infeasible. Thus a balance is needed to be found between the two conflicting goals based on
design requirements and knowledge of system operating conditions.
4.2.5 Variation of Relative Weights of States
Fig. 6 shows the response of ACC vehicle to spacing control laws when the relative weighting of
range and range rate is varied while formulating the FTCOCP. An initial error vector of e0 = [-50;
5; 0] is chosen. This scenario is slightly less extreme as compared to the baseline scenario and
prevents the controller from going into saturation and thus allowing us to observe the change
in behavior with variation in parameters.
When Qpos = 100*Qvel, we observe that ACC vehicle reaches SIVD quickly, but the controller has
to keep switching between extreme input values to maintain the position, and thus there are lot
of oscillations in input. When Qvel = 100*Qpos, the controller is much more conservative and it
takes longer to reach desired terminal state, but the input is much more stable. The best results
are achieved when Qpos = Qvel, as ACC vehicle reaches SIVD and zero range rate at the earliest
without a lot of oscillations in input.
Fig. 6: ACC vehicle response with variation in relative weighting of desired position and velocity. (a)
Relative vehicle position, (b) Vehicle velocity, (c) Vehicle Acceleration and (d) Commanded Acceleration
4.2.6 Encounter with accelerating target vehicle
Fig.7 ACC vehicle response with all constraints included in formulation of FTCOCP while the target vehicle
is accelerating
Fig. 7 shows response of ACC vehicle to spacing control laws when the target vehicle is
accelerating and all constraints are included in formulation of the FTCOCP. We observe from Fig.
7(d) that the law initially commands a deceleration as the target is encountered but the SIVD
goes on increasing due to the accelerating target vehicle and so the spacing-control law then
commands the ACC vehicle to accelerate. We can observe from Fig. 7(b) that a negative range
rate is maintained. This is done to ensure that the range decreases as the ACC vehicle tracks the
increasing SIVD. Also from Fig. 7, it is observed that the change in time-lag due to lower-level
controller does not affect the controller output considerably.
Fig.8 ACC vehicle response with all constraints included in formulation of FTCOCP while the target vehicle
is accelerating (a)Absolute vehicle position, (b)Absolute Vehicle velocity.
In Fig. 8 the solid lines represent the absolute response of ACC vehicle to spacing control laws
and the dashed lines represent the absolute response of target vehicle. From Fig. 8(a) we see
that the ACC vehicle maintains the SIVD and from Fig. 8(b) we infer that the ACC vehicle first
tracks the velocity of target vehicle then decreases making the range-rate negative and finally
settles down to the steady-state value.
5. Conclusion
Upper-level controller for designing spacing control laws of ACC vehicle was designed and
simulated under different scenarios using Model Predictive Control. The following conclusions
can be drawn from the simulations –
6. References
1. L. Bageshwar, L. Garrard and R. Rajamani "Model predictive control of transitional
maneuvers for adaptive cruise control vehicles", IEEE Trans. Veh. Technol., vol. 53, no.
5, pp.1573 -1585 2004
2. Abhishek Jain, ‘Linear Model Predictive Control – Introduction and Parallels with LQR’, Guest
Lecture for Course : Advanced Feedback Control (ECE 726), NC State University
7. Division of Labour
The formulation of constraints and quadratic program for optimization was jointly handled by
both the group members. Beyond that Aamod Velangi was in-charge of writing the project
report and making the presentation. While Ajinkya Khade handled the coding of the entire
problem and generation of plots for various simulation cases. It should be noted that the MPC
controller design and simulation was done entirely using basic Matlab functions and without
the use of Matlab MPC Toolbox, as against the previous discussion with the instructor.