IFAC
Copyright ((., IFAC Guidnnce nnd Control of Underwnter Vehicles, Wnles, UK, 20D3
\ J Publications www.elsevier.com/locntelifnc
IDENTIFICATION OF MULTIVARIABLE MODELS OF UNDERWATER VEHICLES A. Tiano, A. Pecoraro and A. Zirilli
Department ofInformation and Systems University ofPavia. Italy email:
[email protected]
Abstract: This paper deals with the identification ofmultivariable models of underwater vehicles. The proposed method can be applied to non linear models that are linear with respect to the unknown parameter vector. In order to cope with time-varying parameters. a recursive version ofthe identijication algorithm has been implemented. The validity of this algorithm is illustrated by an application to the id,!ntijication of the longitudinal dynamics ofa DSRV (Deep Submergence Rescue Vehicle/ Copyright © 2003 IFAC Keywords: System identification, parameter estimation, numerical methods, underwater vehicles.
herewith developed and validated by simulation. The algorithm has a quite general validity, but in this paper it will be applied to the identification of the longitudinal dynamics of underwater vehicles with a particular reference to a DSRV ( Deep Submergence Rescue Vehicle). After presenting in section 2 a concise description of the mathematical model of the longitudinal dynamics of the underwater vehicle, the proposed identification method, in its off-line version and in the recursive implementation is described in section 3. Some identification results, obtained on the basis of simulation experiments, are discussed in section 4, and preliminary conclusions are given in section 5.
I. INTRODUCTION Even if underwater vehicles are widely used since many years in many off-shore activities, however the problem of adequately controlling them is still far from being solved in an optimal way. One of the main difficulties is given by the impossibility to get on-line reliable mathematical models of their dynamic behaviour. An increasing interest has been devoted in the last two decades to the experimental determination of the dynamical behaviour of naval vehicles by means of system identification methods (Abkowitz, 1980). Such methods, unlike traditional naval architecture methods, are potentially capable to drastically reduce experiment time and expenses of both towing tank and at sea trials, because a multitude of parameters can be determined from a few dedicated tests. Furthermore, it should be remarked that identification plays a fundamental role in many related applications, such as, for example, simulation of vehicle's dynamics, design of guidance and control system, fault detection and diagnosis. In this paper a recently proposed identification method (Tiano, 2002) , (Carreras, 2003), will be applied to the identification of coupled multivariable models of underwater vehicles. Based on such a method, a recursive identification algorithm is
2. UNDERWATER VEHICLE MODELLING As it can be demonstrated by a classical mechanics approach (Fossen, 1994), the mathematical model of a wide class of underwater vehicles can be expressed with respect to a local body reference system by a set of non linear coupled Newtonian equations of the form:
M(x,t)i
181
= f(x,t) + T(t) + g(x,t)
(I)
where x(t) E R 6 is the vehicle's state vector, generally constituted by linear and angular velocities,
= [u v w p q r
i.e. x
r
U u is the cruise speed and 0 is the rudder angle. The elements of matrix M are inertial coefficients and those of vectors I(x) and r(t) are hydrodynamic derivatives, the numerical values of which are reported by (Healey, 1992). It is convenient to transform the above model into the following state space form:
consisting of surge,
sway, heave, roll rate, pitch rate and yaw rate, M(x,t) E R 6x6 is the body inertial matrix including hydrodynamic added masses,
I(x,t)
E
R 6 is the 6
vector of kinematic forces and moments, r(t) E R is the vector of control forces and moments from 6
thrusters and control surfaces, g(x,t) E R is a vector including all the other hydrodynamic forces and moments. In many cases (Fossen, 2002) the complete six degrees of freedom equations of motion (I) can be decomposed into two essentially non-interacting subsystems constituted by the longitudinal and the lateral dynamics. The longitudinal subsystem, describing the dynamics occurring in the vertical plane, can be expressed in terms of the state vector
x = [u
q
w
r
where
O(x.O)~[:
=[v
p
r
r.
2.1 DSR V model
Mi(t) = I(x(t» + r(t)
pitch rate
Sr
q
0
0
0
w q
0
0
angle
Juo +w B7
Bsr
(7)
e
81 -.6529
= 4. 11
'%
are reported in
82
83
84
85
86
-0.2508
0.0855
0.4147
3.2219
-3.2228
87 -44.6794
8s -3.6757
3. IDENTIFICATION METHOD The identification problem consists of estimating the unknown parameter vector on the basis of a finite number of discrete time measurements of inputoutput data. For this purpose, let us assume that input-output variables are available at uniformly sampled time instants t k = kh,k = 0, 1, ...N. Let
e
{O(tk)}:~O be the measured input sequence and let us
-9, while
[2.0]
B5 B6
2
(6)
Table 1 DSRV parameters
(2)
Zww+Zqq M9 9 ;,(1)= M;8 M"w+Mqq+ ~ 2 Uo +W2
B3 B4
:]
9
Table 1
is constituted by the heave
q and pitch
B2
B=[B,
assume j(x) =
0
constant cruise speed U 0
A DSRV (Deep Submergence Rescue Vehicle) is a slender body underwater vehicle generally used in emergency situations when the crew onboard a submarine need to be rescued. In this case longitudinal motion is by far the prevailing one and pitch and depth control is usually done by using forces and moments exerted by control surfaces, thrusters and ballast systems. For a neutrally buoyant vehicle (Fossen, 2002), rudders are preferred to use as far as diving and depth manouevres are considered. If it is assumed that the cruise speed is constant and that the mass matrix is known and constant, the following model (Healey, 1992) can be considered:
W ,
8
and the parameter vector is related by an algebraic transformation to the inertial and hydrodynamic coefficients contained in equation (3) and (4). The numerical values of such coefficients, as deduced by Matlab GNC Toolbox (Fossen, 2002) related to a
The two subsystems are used for modelling, respectively, the underwater vehicle's diving motion and the course-keeping motion.
= [w
9
,while the lateral subsystem can
be expressed by the state vector x
where x
q
sequence
(3)
that
the
corresponding
output
vector
{y(tk)}:~O is obtained through a noisy
measurement channel of the form :
q
(8)
M
[~'
= ";;'
~2
m22 0
~l
c= [ 01
( 4) where
182
0 0J
10
e(tk ) is a zero-mean noise vector.
the parameter vector (}(N) that minimizes the cost
According to the Output Prediction Error method (Ljung, 1987), identification of parameter vector () is equivalent to the minimization of a scalar cost function of the form:
1
N
function on the basis N of input-output observations. In fact, it can be easily demonstrated (Ljung, 1987) that, under regularity condition of the matrix appearing in the normal equation, such problem admits a unique solution obtained through the Least Squares (LS) algorithm:
T
J«(}) = - I G k AkGk N k=1
(9)
The cost function is constituted by a weighted sum of
B(N) = (FT (N)A(N)F(N)f'
squares of prediction errors Gk' which are the
( 16)
FT (N)A(N)Y(N)
difference between the observed output vectors and the one-step prediction of the output y(tk) , i.e.: (10)
The
{A k } :=1
posItIve C
definite
matrices
R 2x2 consist of weights
that should take
A(N)=
into account the reliability of measurements at each discrete time instant. It is worth noting that if the measurement noise
0
0
0
A2
0
0
0
AN
F; Fe
vector G(I k) is zero-mean then:
y(lk)=CX(lk )
AI
(11)
(17)
1';
y(t l )
Yz
y(tz) - y(t l )
-
y(to)
Y(N)=
F(N)=
(18)
where y(tk) and x(t k) denote the expected output and state vectors at time I k
.
In order to determine a solution to the minimization of the cost function expressed by Equation (9), it is necessary that an estimate of one-step output predicted output y(t k ) is available. For this purpose,
The elements of the compound matrix F (N) can be obtained by using a standard numerical integration algorithm.
let us formally integrate both sides of state equation in Equation (5) between two subsequent time instants
3.1 Recursive identification
I k-l and I k ' obtaining: X(tk) - X(tk_l) =
'f j(x(s),J(s»ds
The above presented identification method operates off-line, in the sense that the parameter estimation is done by collecting a long enough record of inputoutput data and then processing them in one shot. If the identified model has to be used for prediction or control, however, this procedure may be not adequate. Furthermore, the method presumes that the parameter vector is time invariant, but in the case of an underwater vehicle this assumption is generally quite unrealistic, as far as a relatively long time horizon is considered. It is possible to extend the above identification algorithm to a recursive mode, in such a way that also slowly time variant parameter can be recursively estimated. The basic idea is to
(12)
If, taking into account Equation (11), it is assumed that y(tk-l) =
ji(tk _ I ),
where
ji(tk _ l )
is a properly
filtered version of the output vector y(l k - 1 ), i.e. if we assign to the unknown output vector a corresponding filtered output, then we obtain the following estimate for the output vector at time
tk
:
compute the new parameter vector estimate B(k) at
where
time k
'k
f
F;. = ljJ(x(s),5(s»ds
(14)
by adding some correction vector to the
previous parameter estimate
B(k -1).
It can be
demonstrated that the following Recursive Least Squares (RLS) estimate can be deduced.
and thus, we can achieve an evaluation of the onestep prediction error of Equation (10) in the form:
A
A
B(k) = B(k -1) + r k (~
A
-
F;.B(k -1)
r k =~_,F;.T(A.I +F;.~_IF;.Trl
By inserting this evaluation of the one-step prediction error into the cost function expression of equation (9), it is finally possible to find the value of
~
183
1
= A. (I -r,F;.)~_1
(19)
Of course, the quality of identification depends on the amplitude of the measurement noise. As far as the signal to noise ratio is relatively high, the identification method, in both its off-line and on-line version, achieves quite good performance. In the limit case of a zero measurement error, the system parameter vector is perfectly estimated. Prediction errors of a low measurement noise identification are shown in Fig.2. The corresponding autocorrelation functions shown in Fig.3 indicate that the prediction errors have a time-uncorrrelated behaviour, thus supplying a good statistical validation of the identification results.
2<8
where ~ ER, r, ER, ~ ER, Yk ER' . 8x8
8x2
2.<8
The RLS algorithm has been deduced under the assumption that the weighting matrices have the form (20) The algorithm generally converges to the true parameter vector. As remarked (Nelles, 2002), the RLS algorithm is capable to take into account timeinvariant processes as well as non-stationary systems. The real parameter A. E (0,1], often called forgetting factor, takes into account that most recent data are weighted more than old ones. The adjustment of A. is generally a tradeoff between high robustness against disturbances ( large A.) and tracking capability (small A.). The forgetting factor is generally set bewteen 0.9 and I. The algorithm RLS requires an initial parameter estimate B(O) and an initial assignement of the positive definite matrix
Po,
100
DJ
200
400
all
500
700
500
EO)
lIID
that generally should reflect the degree of a-
priori knowledge about unknown parameter vector (Ljung, 1987) ,(Nelles, 2002). 4. IDENTIFICATION RESULTS -10 L-.....L.._'---'-_-'--.....J..._-'----'-_--'----'----' o 100 200 DJ 400 SOl all 700 EO) 500 1000
The identification algorithm has been tested through a number of simulation tests. During such tests the DSRV undelWater vehicle was perturbed by PRBS (Pseudo Random Binary Sequences) acting on the rudder, while the corresponding heave and pitch variables were measured, by assuming a zero-mean Gaussian additive noise perturbing the output vector. The typical input-output signals of an identification test are shown in Fig.l, where, from top to bottom, there are shown the time histories of rudder, heave and pitch.
Figure2 Heave and pitch prediction errors
__
5 ----- .;- -----~
1 __.1.__
__
0.5 r---.---,---.---r---.----,--.,...-__,---.---, -50l.--:1lllJ:':-:--:2000:':-:--::mo::':c:--:4lllJ::':c:--:SOOO::':c:--:5000::':c:--:7-='=lllJ"""""EOJQ:-::'::--5OOQ:-::'::--1-:-:'OOOO
o --
, 10~
8 r-,--.,...----,--.,...---.---.----,---,-___,--,
-
,
_. -.
-o50L--l-'-oo:--c:-';m.,-----:c300-'-::--4...l.00:--..,-J5OQ':---:c600'-:--:7,-L00:--.,-'OCO---:c!OJL--J1000 4
0.5,----,---,--.,--.,..---,---,---.---r---.---,
;m
300
i
o -1
o
i
:1 ';
~; I 100
400
500 600 deltaw-q
~i
'
jl
;m
300
i 400
i
!;
; 500
i'
'; I
600
!
700
. .,,,
+
~
-~
.
, , ,
.. ~
, ,
-.. _ ..
-1······ -1--- _.. _~ _.
..
,
I
Figure 3 Autocorrelation functions of prediction errors.
1.1
i: I :1~
I :, i1
_
1000
fl III ill!
~
;
700
_
. .... -!_ _.~ .. --- --:- --_.. -~- -- -.. :-- -- -' ~- -..--~- --- ... ~ -_.... ~ -_..
2 .. -. -t- _ ~
100
, ,
,
-.-, ..
OCO
!OJ
1000
This excellent performance can also be appreciated in Fig. 4, where the measured and predicted heave and pitch variables are plotted. The same excellent
Figure I Input-Output signals
184
perfonnance has been obtained in the recursive parameter estimation algorithm implementation. In Fig. 5 the convergence patterns of the RLS algorithm to the true parameter vector are shown for the
5. CONCLUDING REMARKS An identification method for non linear systems that are linear with respect to the unknown parameter vector has been presented. The method, that is capable to operate in both otT-line and on-line mode, has been applied to the identification of a simulated underwater vehicle of the DSRV type. The results obtained in both cases indicate that the algorithm works quite well and therefore can allow interesting applications in the area of adaptive control and fault detection of underwater vehicles.
different components of the parameter vector B(k).
:• '• !,!I o ... '.·
·0.2'"
-lJ40
·, ··:,
' .. .. .... ., .
. .
..
.,,
..
4lJ()
500
~
~.
~
.
100
~
. . :.
.,
200
300
oo~..
~ , .~ " , .
, ,,
"
~.
.,
Ill)
. .. .,,~
700
800
~
..
!Ul
1000
REFERENCES
1
05
•
0 ·05 ...
'
. 0
j
oo
oo
.. ..
oo.
200
300
400
Abkowitz, M.A.( 1980). System identification techniques for ship manoeuvring trials. In: Proceedings of Symposium on Control Theory and Navy Applications, pp.337-393, Monterey (USA).
~tf
oo
'1'
j'l 100
oo
Of.
500
Ill)
700
800
!Ul
1000
Carreras, M., A.Tiano, A.EI-Fakdi, A.Zirilli, P.Ridao (2003). On The identification of non linear models of unmanned underwater vehicles, ]" IFAC Workshop on Guidance and Control of Underwater Vehicles. Newport, U.K.
Figure 4 Output vector fitting
Fossen, T.!., (1994). Guidance and Control ofOcean Vehicles, John Wiley and Sons, New York. Fossen, T.!., (2002). Marine Control Systems, Marine Cybernetics, Trondheim, Norway. Healey, AJ. (1992). Marine vehicle dynamics lecture notes and problem sets. Naval Postgraduate School, Monterey,CA, USA. Ljung, L., (1987). System Identification: Theory for the User, Prentice Hall, Englewoods Clifts. Nelles,O,.(2001). Nonlinear system identification, Springer, Berlin. Tiano, A., Carreras, M., Ridao, P., and Zirilli, A. (2002). On the identification of non linear models of unmanned underwater vehicles. In: 10th Mediterranean Conference on Control and Automation MED'02 July 9-12, Lisbon, Portugal
Figure 5 Convergence RLS agorithm for parameter vector
B
185