Professional Documents
Culture Documents
Nonlinear Receding Horizon Control of An Hovercraft
Nonlinear Receding Horizon Control of An Hovercraft
Abstract
Figure 1: RC hovercraft,
1 Introduction
ER
I Uh
ub 6
5 U1 5 Ua
212 6 u o '
(4)
=o,
I (5)
where uav = (ua+ub)/2, and U is the augmented input
vector deiined by U = [ U ~ , U Z , U ~ ,The
V ~ equality
]~.
denoted by u1 and u2, the mass and moment of inertia constraints can also depend on the state in general.
of the hovercraft are denoted by M and I, respectively.
The equations of motion are given by Then, the performance index J of nonlinear receding
horizon control is chosen as
MX = UI + uz
COS@ COS@, (1) t+T
My = U, sin8 + uzsin8, (2) J = rp(r(t + T))+Jt L(s(t'), u(t'))dt',
I8 = ulr - u g . (3) 1
io(z) = 2(" - =t)TS,(x -If),
The state equation is obtained from the equations of 1
motion with the state vector x = [x,y,@?x,y, @IT, The L(I, U) SI(= z +U ~ R U
- z ~ ) ~ Q-(sf)
thrusters of the hovercraft generate thrust of only three - TlVl - T2V21,
discrete values, that is, 0.342 [NI, -0.121 [NI and zero
because the transmitter sends only an onfoffcommand. where T is the horizon length, zf the objective state,
Other parameters are: I = 0.0125 [kgm'], A4 = 0.894 Sf, Q, R,rl and r2 are weights. The penalties on VI
[kg], and r = 0.0485 [m]. and z12 are added to avoid indefiniteness in the signs
of the dummy inputs in Eq. (5). If all weights on the
Two electric bulbs are put on the hovercraft, and their inputs are zero, the minimum principle implies that
positions are measured by an optical position sensor both continuous-valued inputs and discretevalued in-
(OKK Inc., Video Tracker G280) to calculate the PO puts lead to an identical optimal control of bang-bang
sition (s,y)of the center of mass aqd the attitude type, although zero weights on inputs are not advisable
angle 8 of t.he hovercraft. The translational velocity from the viewpoint of numerical computation. There
and angular velocity are obtained with finite difference fore, if the weights on the inputs are sufliciently small,
approximation from the position and attitude angle. the optimal control with the continuous-valued inputs
Low-pass filters are &o implemented to reduce the is nearly bang-bang and is expected to approximate
1077
the optimal control with the discretevalued inputs of t. The actual control input to the system is given by
tua,U), 0). Once the continuous-valued inputs are cal- u(t)= ugt).
culated, their discretization gives the actual discrete-
valud inputs. Let N denote the Hamiltonian defined by
Given the actual state z(t) as the initial state for the H(a,X,u,p) :=L(z,U)+XTf(z,U)+~=c(s,U),
optimal control problem, the optimal control is deter-
where X denotes the costate, and p denotes the La-
+
mined over the horizon [t,t T ] so as t.o m i n i i e the
grange multiplier associated with the equality con-
performance index, and only its initial value at time t
straint. The first-order necessary conditions for the
is used as the actual input to the system. Since the
optimal control depends on the initial state s(t),this
sequences of optimal control {U; (t)}E;', multiplier
{ p f ( t ) ) z i ' and Costate { A l ( t ) } c oare obtained by the
strategy results in a state feedback control law. The
calculus of variation as
optimal trajectory starting from z(t) is not necessarily
identical to the actual trajectory of the closed-loop s y s = 0,
NU(zf(t),~~'(t),Uf(t),pf(t)) (10)
tem over [t,t +TI,since the optimal control is updated
at each time. = X+lN
+ H;(zf(t), X:+l(t), (11)
a f ( t ) P.f(t))AT,
,
Closed-loop stability of nonlinear receding horizon con-
trol has been studied extensively in recent years (see, U t ) = rp:(zi(t)). (12)
e.g., [SI).However, existing stability conditions are still The sequences of the optimal control {uf(t)}E;l and
conservative, and a closed-loop system is often stable the multiplier {pf(t)}&' have to satisfy Eqs. (6) - (8),
without satisfyiug them. It is almost hopeless to guar- (10) - ( E ) , which defines a two-point boundary-value
antee the stability analytically in the present problem problem (TPBVP) for the discretized optimal control
because the system is highly nonlinear and only the problem. It should be noted that the TPBVP for the
discrete-valued control inputs are available. S i c e the discretized problem is identical to a finite difference a p
linearized system is not stabilizable, we cannot guar- proximation of the TPBVP for the original continuous-
antee even local stability near the objective state. Al- time problem. Therefore, the solution of the discretized
though analytic approaches are not available, the real- problem converges to the solution of the continuous-
time optimization is expected to result in the best p o s time problem as N -+ m under mild conditions 161.
sible control performance with respect to the given per- Other high order discretization schemes can also be
formance index. employed at the expense of simplicity.
Po(U) :=U;.
4 + i ( t ) = zf(t) + f(lf(t),Uf(t))Ar, (6) For a given U ( t ) and z ( t ) ,{ s f ( t ) } g oare calculated
43)= d t ) , (7) recursively by Eqs. (6) and (7), and then, { ~ ( t ) ) ~ o
are also calculated recursively from i = N to i = 0 by
C ( z f ( t ) , u f ( t=
) ) 0, (8)
Eqs. (11) and (12). Since eT(t) and Af(t) are deter-
mined b y z ( t ) and U ( t )through Eqs. (6), (7),(11) and
(12), Eqs. (8) and (10) can be regarded as an equation
defined as
where f(+,U) denotes the vector field ofthe state equ%
tion, AT := T I N , sf(t) corresponds to the discrete
time trajectory starting from s ( t ) at i = 0. Since t,he
horizon T depends on time t in general, so does AT.
Note that only the problem over the horizon is d i s
cretized, and the dependence on t remains continuous
:= I I
at this stage of problem formulation. Given the ini-
tial state of the discretized problem, z;(t)= z(t),the
control sequence {uf(t)}&' is optimized at each time =O. (13)
1078
The equation also depends on time t through AT in
general. If the equation is solved with respect to V ( t )
for the measured ~ ( tat) each timet, then the control
input u(t) = Po(U(t))is determined.
i.(U(t),I(t)>t)=
F(U(O),I(O),O) = 0,
- c ~ ( w ) > 4 ~ ) , tc)>, 0,
where the right-hand side in the first equation is added
5$11_1 .
..................................................
~,)(
.......................................................
7.2 *I
4
~
m
r". ,
.
I
$6 h
to stabilize F = 0. If the Jacobian Fu is nonsingular,
(a) S i d a t i o n with (b) Experiment with
we obtain a Merentid equation of U ( t ) as
continuowvalued inputs, discrete-valued inputs.
U = F;'(-/F - FIB - F'). (14) Figure 4: Time histories of onedimensional motion.
Then, U ( t ) can be updated without any successive
approximation by integrating Eq. (14) in real time,
which is a kind of the continuation method [7]. A sim-
file by processing an input file given by a user. The
ple method for initializing U ( 0 ) is to choose a t i m e
input file defines the state equation, performance in-
dependent horizon T ( t )as a smooth function such that
dex, simulation conditions, and so on. The experiment
T ( 0 ) = 0 and T ( t ) -* Tf (t -t CO), e.g., T ( t ) =
program can also be developed easily by modifying the
Tf(l - e-"') (Tf,a > 0). Then, the equation on U(0) generated simulation program.
reduces to an equation on only ui(0) and &(O), which
can be solved more easily than the original equation. First, results of the experiment and simulation
are compared for simple one-dimensional motion
Since Eq. (14) still involves numerically expensive o p
to evaluate the approximate solution method with
erations to solve the linear equation arsociated with
the constrained continuousvalued inputs. Figure
F;', we also employ the GMRES (Generalized Mini-
4 compares time histories of the Simulation with
mum RESidual) [8]with forward difference approxima-
the continuousvalued inputs and the experiment
tion for products of Jacobians and vectors. GMRES is
with the discretevalued inputs. The parameters
a kind of Krylov subspace methods for linear equations.
in the performance index are chosen as: T =
Error analysis of the entire continuation/GMR.ES al- Tf(l - e-*'), Tf = 0.5 [sec], a = 1, Sf =
gorithm (41 shows that the error lIFl1 is bounded under diag[8.85,0,0,1.85,0,0], Q = diag[8.85,0,0,1.85,0,0],
some assumptions if the parameter is chosen so that R = diag[0.01,0.01,0.01,0.01], T I = T Z = 0.1, and
0 < CAt 5 ?At with 1 5 <At < 2, where At denotes zf = 0. The inltialstate is IO = [-0.667,0,0,0, 0,OjT.
the time step of numerical integration of Eq. (14) and It is confirmed from the figure that the control input in
corresponds to the sampling period in the hardware the simulation is nearly bang-bang, as is expected..The
experiment. responses of the states are similar between the simula-
tion and experiment, although chattering is observed
in the control input of the experiment to keep the hov-
ercraft near the objective state.
5 Experimental Results
Next, results of the experiment and simulation for
The real-time algorithm in the previous section is coded two-dimensional motion are compared in Figs. 5
in C and is implemented in the computer with the sam- and 6. The simulation is also carried out with
pling period of 1/120 [sec], which is specified by the the discretevalued inputs to predict the experi-
frame rate of the CCD camera. Numerical simulation mental result. The parameters in the performance
is also carried out, and its results are compared with index are chosen BS: T = Tf(1 - e-='), Tf = 1
the experimental results. The simulation program in C [sec], a = 1, Sf = diag[5,15,0.05,1,1,0.01],
is generated by an automatic code generation system Q = diag[5,10,0.1,1,1,0.01], R =
called AutoGenU [9]. AutoGenU is a Mathematica p r e diag[O.Ol,0.01,0.001,0.001], r 1 = rz = 0.1,
gram to generate a simulation program for nonlinear r e and z, = 0. The initial state is o0 =
ceding horizon control utilizing Mathematica packages [-0.38,0.30,0.052,0.0092,-0.0053,0.0021] T.
Format [lo], Optimize 1111 and a Mathematica com-
mand Splice [14. AutoGenU generates a C source Figure 5 shows that the simulation result predicts
1079
D., 1 Dll , 1
. . . ...; .............. .:
-E
I
1080
control experiments of an air cushion vehicle,” Jour-
nal of the Japan Society for Aemnautical and Space
Sciences, vol. 44, no. 514, pp. 6 2 M 3 6 , 1996, (in
Japanese).
141 T, Ohtsuka, “Contiuuation/GMRES method h r
fast algorithm of nonlinear receding horizon control,”
in Pmceedings of the 39th IEEE Conference on Deci-
sion and Control, Sydney, Australia, Dec. ZOOO, pp.
766-771.
[SI D. Q . Mayne, J. B. Rawlings, C. V. Rao, and
P. 0. M. S C O W , ”Constrainedmodel predictive con-
t r o l Stabnity and optimality,” Automatica, vol. 36,
no. 6, pp. 784-814, 2000.
161 U. M. Ascher, R. M. M. Mattheji, and R. D.Rus
. - sel, Numerical.Solution of Boundary Value Problems
for Ordinary Difleerential Equations, SIAM, Philadel-
phia, PA, 1995.
[7] S. L. Richter and R. A. DeCarlo, “Continua-
tion methods: Theory and applications,” IEEE l h w -
actions on Automatic Control, vol. AC28, no. 6, pp.
660-665, 1983.
IS] C. T. Kelley, Iterative Methods for Linenr and
Nonlineor Equations, vol. 16 of f i n t i e r s in Applied
Mathematics, SIAM, Philadelphia, PA, 1995.
[9] T. Ohtsuka, http://www-newton.mech. eng.
Osaka-u.ac.jp/-ohtsuka/code/index.htm, 20M).
\IO) M. Soboniou, ftp://ftp.cent.r.osaka-u.ac.jp/
MathSource/Enhancements/Interfacing/Other/O%OS-
%54/, 1994.
1111 M. Sofroniou, ftp://ftp.center.osaka-u.ac.jp/
MathSource/Enhancements/Language/O%O6-592/,
1994.
1121 S. Wolfram, The Mathematic0 Book, Wolfram
Media / CambridgeUniversity Press, 3rd edition, 1996.
1081