Copyright © IFAC Theory and Application of Digital Control New Delhi , India 1982
A TEST CASE FOR ADAPTIVE CONTROL: CAR STEERING P. Andersson and L. Ljung* Department of Electrical Engineering, Linkoping University, S-58183 Linkoping, Sweden
Abstract. Adaptive control of the steering dynamics of an automobile is studied. The input is the angle of the steering wheel and the output is the lateral position of the automobile. This dynamics depends in a singificant way on the velocity of the car. A sampled data model changes from m~n~mum phase to non-m~n~mum phase as the velocity increases. Other problems include that a detailed model is of fifth-order, which may lead to slow adaptation. These problems are discussed in the paper, and it is suggested that the system in question could be used as a test case for evaluation of different adaptive regulators. 1.
INTRODUCTION
what the "best" adaptive control policy might be - it is rather to point out encountered difficulties and problems to be taken into consideration. In fact, the car steering system would be a good test case for evaluating how various adaptive regulators can cope with these problems.
A typical way of evaluating different adaptive controllers is to perform simulation studies. The simulated system can be chosen in a number of ways. In this paper we shall study a fairly accurate model of the steering dynamics of an automobile. This model was developed by Fenton et al. (1976). The car steering system poses several interesting problems for adaptive control. The dynamics is highly dependent on the car's velocity. The zeros of a sampled model move from inside the unit circle for low speeds to well outside it for high speeds. The system thus changes from being minimum phase to non-minimum phase. The model developed in Fenton et al. (1976) is of fifth order. When disturbances (typically side-wind effects) are included, this means that the model contains 15 parameters to be tracked. Obviously, this may result in too slow an adaptation of the regulator parameters. Therefore, it may be necessary to use lower-order models in the adaptive control mechanism. This, in turn, brings up the question of the sensitivity of the chosen regulators with respect to the accuracy of the model.
Due to the limited'space, not all details regarding model parameters and adaptation rates can be given here. Such information can be found in the report Anderson and Ljung (19S1), upon which this paper is based. 2.
THE CAR STEERING MODEL
The system we are studying is the lateral position of the car, as affected by the steering wheel angle and by side-wind forces. The steering wheel affects the front wheel angles via a steering servo. Let us introduce the notations:
These problems are illustrated in this paper, where adaptive regulators of the self-tuning type, cf. Astrom et al. (1977), are tested. The purpose of the paper is not to suggest
u(t):
Steering wheel angle (degrees)
e (t) :
Side wind force (N/m2)
y(t) :
Lateral position of the car in the road (m)
v:
Velocity of the car (m/s).
The model for how the signals relate is developed in Fenton et al. (1976) using both identification (frequency analysis) and manufacturer's data. The model is, in continuous time, of the form
*At
present with the Information Systems Laborabory, Stanford University, Stanford, Calif. 94305. Part of Ljung's work was supported by the U.S. Army Research Office, under contract DAAG29-79-C-021S and the Defense Research Projects Agency under contract MDA903-S0-C0331.
y(t)
= G(p)
u(t) + H(p) e(t) ,
(2.1)
where G and H are rational functions of the differential operator p. The order of the model is five.
7I
P. Andersson and L. Ljung
72
2
The adaptive controllers that we are going to discuss will all be sampled data regulators. Let us therefore consider sampling of the model (2.1). With a sampling interval of T seconds over which the input is assumed to be constant, the corresponding sampleddata model becomes y(t) + a y(t-T) + •.. + asy(t-ST) l
-2
2
= b u(t-T) + ••• + bSu(t-ST) + l + fl (e(t) + c e(t-T)+ •.• +c 4e(t-4T)) l (2.2) We shall also use the operator notation A(q
where
-1
)
l+a q l
-1
B(q-l)
b l + .•• +bSq
C(q-l)
l+c q l
q-l
-1
-2
-5 + ••• +a q , s
-4
+ ..• +c q 4
Fig. 2-1. The poles of the model as a function of car velocity.
-4
it is shown how the five poles (zeros of ~A(Z-I)) of (2.2) vary with v.
is the delay operator
q-l y(t) = y(t-T) •
We notice that there are three fixed poles that do not depend on the velocity: two in 1 and one in 0.38. The former ones correspond to the double integration from from wheel angle to lateral position. The latter one corresponds to the servo dynamics of the power steering. The two other poles move from the origin for low velocities to 0.30 ± 0.51 i for v = 30 m/so
Then (2.2) can be written as A(q -1)y(t) = q-I B(q -1)u(t) + flC(q -1)e(t) (2.3) Remark. For simplicity, the model (2.1) has been sampled under the assumption that the side-wind force e(t) is constant over the sampling interval, just as the input. The wind effect has then been shifted one time interval forward in (2.2), since no phase can be detected in the disturbances. This is the reason why e(s) contains terms only to s = t-4T. The coefficients
a., b., c. and fl l.
l.
In Fig. 2-2, the zeros of the model (2.2) are plotted for different values of v. We notice that one zero moves out of the unit circle for v = 2. Hence, the sys tem is nonminimum phase for v > 2.
in (2.2)
l.
Finally, in Fi g. 2-3, the zeros of the C-
depend of course on the sampling interval T, the car's velocity v, as well as on specific features of the car in question. For a 1965 Plymouth sedan (the make treated in Fenton et al. (1976)) and T = 0.2 seconds, the model (2.2) can be described as follows. In Fi g. 2-1,
4
-1
polynomial (z C(z )=0) are shown for different velocities. From these three figures, we see that the dynamics of the car steering system changes quite substantially as the velocity varies.
2
-3
-2
2
-1
3
-2
Fi g . 2-2.
The zeros of the model as a function of car velocity.
A Test Case for Adaptive Control
73
2
! \
-2
2
-2
Fig. 2-3.
The zeros of the noise polynomial as a function of car velocity.
It may therefore be difficult to achieve good and rapid lateral control by a constant feedback regulator.
(1978)A will be used. with 8(t) and ~ (t)
cl (t) ~(t)
ADAPTIVE REGULATORS
The adaptive regulators that we shall try on the car model are of the self-tuning type, see Astrom et al. (1977), based on minimum variance control.
-1
=~
••• Cm(t))T
(-y(t-1), ••• ,-y(t-n), u(t-1), .•• -
where
ai'
bi
and
ci
~ R(q- )
-1
-1
). F(q
-1
) ,
)F(q
-1
(3.2)
-1 -1 -1 )+q BI(q )S(q ) (3.3)
Here, 1
where
B(q - )
=
BS
and
BS (q BI
T
-1
). BI (q
-1
) ,
,
are the estimates of the
y(t) - eT(t) ~ (t) ,
(3 . 5)
8 (t-1) +K(t) (y(t) - ;JT(t-1)~(t)) , (3.6)
y(t) , (3.1)
and F and S are determined by the polynomial equation A(q
-
parameters in (2.2) and
K(t)
P(t-1) p(t)
A + ~T(t) P(t-l) ~ (t)
where 1
bn (t)
-1
r(t) -
R(q- )
R(q - ) = BS (q
.••
u(t-n), £(t-1), ••• ,£(t-m))
When the system is given by (2 . 3), it can be shown, Xstrom et al. (1977), Astrom (1970), that a (suboptimal) minimum variance control law is u(t)
hI (t)
El
In the next section we shall investigate how adaptive regulators may handle this problem. 3.
This method is obtained defined as follows
(3.4)
are the stable and un-
stable parts, respectively, of the B-polynomial . In (3.1), r(t) is the reference signal that we would like the output to follow. Now, in our application, the coefficients of the A-, B- and C-polynomials vary with the car's velocity. Hence, we have to estimate the coefficients of (2.2) using some recursive identification method. The Extended Least Squares (ELS) method, of Soderstrom et al.
P(t)
[
P(t-1) _
(3.7)
P(t-1~~ (t)~T(t)p(t-1)]/A. A+~
(t)P(t-1) ~ (t)
(3.8) Here A is the "forgetting factor," a positive number less than one, that discounts older measurements. It typically has values between 0.95 and 0.99. In the special case, where no C-parameters are estimated (m = 0), the al gorithm (3.5)(3.8) is the familiar recursive least-squares (RLS) al gorithm. Since the car model is a fifth-order system, a total of 14 parameters have to be estimated. This gives an unrealistically slow adaptation, since a large amount of data (i.e., a A-value very close to one) is required to support reasonable estimates of that many parameters. One way of dealing with this problem would be to estimate a lower-order system and calculate the controller from these estimates.
74
P. Andersson and L. Ljung
Let us test this idea. A third-order model with no noise polynomial (Le., n = 3, m = 0) was identified using RLS for velocity v = 20 m/s. The poles for this approximate model are shown in Fig. 3-1a. Compare this with the true pole locations in Fig. 3-1b. It can be seen that the two integrations have been found. The pole approximating the other three poles can be explained as follows. The complex conjugate pair of poles in Fig. 3-1b represent an oscillation. Now, there is only one pole left to approximate this, and this is achieved if the pole is placed on the negative real axis. The minimum variance (or "dead-beat" since C=l) controller (3.1)-(3.4) based on this third-order approximation was tested on the system with no noise added (e(t):::: 0). The result is shown in Fig. 3-2a. For comparison, a minimum-variance controller based on the true fifth-order system (with C=l) is simulated in Fig. 3-2b. We see that the third-order model is not a very good approximation from the point of view of producing good minimum variance control.
IH
Cl.
Let us now study how the regulator may adapt to changing speed of the car. We first study a full third-order model (n=3, m=3) estimated recursively using ELS. The parameter estimates, nine altogether, are used to determine the regulator (3.1)-(3.4). The forgetting factor was chosen as A = 0.995. This high value is motivated by the relative large number of estimated parameters, and was determined after some tests. The performance of the regulator is shown in Fig. 3-3. We see from the figure that the regulator recovers only slowly after the velocity change. This no doubt has one reason in the large value of A. Hence, the adaptation must be faster and a smaller value of .>... is desirable. To obtain estimates with reasonable reliability, this also means that the number of parameters must be reduced. The number of a-parameters (= the number of poles) can hardly be reduced below three. Hence, we choose to exclude the c-parameters which leads to a model with n=3 and m=O. A simulation with this regulator is shown in Fig. 3-4.
b.
I.
IH
I.
x RE
o
RE
o. o
x
Fig. 3-1.
Poles for the approximate third-order model (a) and for the fifth-order system (b). v = 20 m/so
A Test Case for Adaptive Control
a...
\
0
0
\ .0
•
o.
75
0 .6
o. ,
r--
r--
r--
0 .2
-9 . 9 \
-8 . 2
..
-0 . " ~
L--
- ea -0
•
-Cl . 8
- \
0
-1 . 9
'--
Fig. 3-2. Minimum variance (or "dead-beat") control applied to the system (2.2) with e(t):::: O. The reference r (t) changes between ± 0.5 as a square wave. a: b:
Regulator based on approximate third-order model (C=l). Regulator based on true system (C=l).
\ .0
0 .6
o • o • o
2
-0 0
The adaptation started 300 samples before the data shown in the figure.
-0 2 -0
•
-0 • -0 • - \ 0
Fig. 3-3. Adaptive control of the car. n=3, m=3, \ =0.995, e(t): white noise, rectangular distributed ±5000. Between samples 50 and 70 the velocity i~5increased from 10 to 20 m/so (For v=10!...5~=1.07.10 and for v=20 ~ =1. 31· 10 )
P. Andersson and L. Ljung
76 I
•
o •
-0 • -I . B
Fig. 3-4.
As Fig. 6-3 but n=3, m=O, A=0.98.
We see that this regulator gives a faster adaptation. Evaluated in terms of the criterion function 300
L t=1
(y(t) - r(t))
2
,
the regulator in Fig. 3-3 gives a loss of 17.63, while the regulator in Fig. 3-4 gives the loss 14.75. Hence, the simplified model, with no estimation of the C-po1ynomia1, behaves better due to its faster adaptation rate. For a constant, but unknown system, the more complex model would behave better asymptotically. 4.
CONCLUSIONS
We have studied different ways of controlling the steering dynamics of a car, when its speed varies. The system has been used as a simulation example to evaluate adaptive controllers, and we have not pursued the practical aspects of the control law in the application in question. Nevertheless, the study has brought out a number of issues that should be important in realistic applications of adaptive control: •
We have to work with models that are simpler than the true system.
•
There is a trade-off between the model complexity and tracking capability.
•
The sensitivity of the control laws becomes an important issue when simplified models are used to determine the regulator.
Let us comment further on the last statement. We noted in Fig. 3-2 that the minimum-variance (dead-beat) regulator based on a third-order model exhibits quite a bad performance when applied to the true fifth-order system. The
reason is of course that the dead-beat regulator is quite sensitive to system variations. The best third-order approximation is simply not good enough. This stresses the dilemma we have encountered in the simu1ations: To achieve reasonably fast adaptation, we must use simplified models. On the other hand, simplified models may not be good enough for the (demanding) control goals we are trying to reach, like minimum-variance control. A faster sampling rate, together with a more conservative control design (pole placement further from the origin) would probably gi.ve better adaptive control. The objective of this contribution has not been to determine the best adaptive controller for the system in question. Rather, we have stressed the type of problems adaptive regulators encounter when applied to more complex systems. It would be interesting to see the car steering system (2.1)-(2.3) used as a test case for various approaches to adaptive control. REFERENCES Astrom, K.J. (1970). Introduction to Stochastic Control Theory. Academic Press, New York. Astrom, K.J., U. Borisson, L. Ljung and B. Wittenmark (1977). Theory and applications of self-tuning regulators. Automatica, Vol. 13, No. 5, pp. 457-47-6-.-Fenton, R.E., G.C. Me10cik and K.W. 01son (1976). On the steering on automated vehicles: theory and experiment. IEEE Trans. Automati.c Control, Vol. AC-2-1-,-1976, pp. 306-315. Soderstrom, T., L. Ljung and I. Gustausson (1978). A theoretical analysis of recursive identification methods. Automatica, Vol. 14, pp. 231-244. Andersson, P. and L. Ljung(1981). A test case for adaptive control: Car steering. Report LiTH-ISY, Dept of Electrical Engineering, Linkoping University, Sweden