(t k + 1 ) } P (t
e
) k+l
J:. A
){p
(t k
e
( t ) _ Pe(tk)q>(tk+l)q>T(tk+l)Pe(tk) } k A (t k ) +
(t k + 1 )
Divergence problems due to computational factors, which may cause the estimation parameter covariance matrix Po(t k) to lose its positive semidefinite character, can be countered by use of what is termed UD-factorization (Bierman [10]), step 7: parameter update 9(t k ) - 9(tk _1 ) + Ke(tk)@(t k
324
)
step 8: calculate the estimation error €L(t k ) -
(~/~)~(tk)
Step 9: generate the state XL(tkltk) and the output ZL(tklt k) using (10) and (11), respectively; return to the step 2.
The structure of the extended Kalman filtering scheme for trackkeeping system is shown in Fig.3. This scheme consists also the other filtering subsystems (sway- and yaw-filter), which a structure is based on the same philosophy as in the case of the surge-filter. Wind filter Involved in equations of LF-motion estimates of forces induced by the wind require performance of wind parameters (i.e. velocity and direction) estimation and knowledge of aerodynamic characteristics as well. The estimation is provided by means of Kalman filtering. It is assumed that dynamics of velocity and direction are described by equations (20), where subscript L points average values, H - gusts of the wind, Vw-velocity, aw-direction, a v and aaparameters of gusts correlation, f]vi and f]ai-whi te noises. Vw - VWL + VWH
VWL -
a
-
aWL
+
0: WL- 11 «1
11Vl
VWH--aVvWH + 11v2
O:WH--aUaWH
av
au
-
a WH
11v3
-
(20 ) + 11U2
11«3
Equations presented above determine the dynamics of wind in earth fixed system of coordinate and are used to obtain the estimates of wind velocity ~w and wind direction a~. After transformation to relative values 'VWR and WR proper vessel motions estimation, the forces induced by wind can be estimated as follow: P W ,,2
a
l lW
-
Cwx (cl WR )
2"" VWRSx
( 21)
where ~WR is the estimate of the average wind speed, Sx - projected front area above water line, S - projected side area above water line, Lpp - length of the ship between perpendiculars. The wind coeff~cients CWx ' Cw and Cwn as ~unctions of ,t~e ,wind direction WR relatlve to the ShlP can be estlmated by utlllzlng the results of the model experiment in a wind tunnel.
a
Current filter The problem of current estimation is more complex than estimation of wind. Estimates of velocity ~ and direction a are obtained from equations concerning the dyna~ics of estimation ~rror in LF-motion estimation. Tuning of this filter is more sophisticated and requires to take into account the dynamics of closed loop, i.e. estimators and controllers. The details are not presented in .this paper. After obtaining ~c and c relative estimates - corre-
a
325
sponding forces can be calculated: PW
l le
-
Cex(a eR )
2
l 2e
-
Cey(a eR )
2
l 3e
-
Cen ( cx. eR
2
~
PW
~2
VCRBT ~2
(22)
VCRLppT
)Pw~2
2
VCRLppT
where a R is the angle between the speed ~R through the water and the ship's heading, T-draught of ship. Thecresistance coefficients Ccx' CCY. a~d Ccn are functions of the relative angle and are based on emplrlc~l data.
a;R
position and heading control The dynamic properties of the trackkeeping system depend on the Kalman filter as well as the control law. This control law can be divided into two main parts: first - feedback, taken from the predicted state estimates and second - feedforward from wind and current, which yields integral action in the control loops. Controller The coefficients of feedback gain matrix are solution of the optimization problem with quadratic performance index for each considered motion (i.e. surge, sway and yaw). Assuming properly compensation of disturbances induced by wind the state equations can be reformulated as follows: SURGE:
.KlL - u L { u L --C1IUL-Ucl (uL-U ) + d (flR-f ) c l lC
{ilL - vL vL --C2 v L- v cI (vL-v
SWAY:
I
lfr L {iL
YAW:
-
-
+
e)
(23)
d 2 (f2R - f2c )
rL
a3
(UL-U c ) (vL-VC) -
c 31r dr L
+
d 3 (f3R -f)c)
Above equations linearized at demanded values of velocity and heading rate on the trajectory (u o ' Vo and ro respectively) yield: SURGE:
!1.K1L - !1 UL {!1u L --2Cl lu -u l!1u + dlf L o L lR
(24)
SWAY:
YAW:
Quadratic performance indexes are: JSURGE -
J
SWAY -
~
Jo {P
ll
~ J{P21 (!1Y1L) 2
12R}d~
P
(!1 U L )
2
+
%f
+
P 22
(.~VL) 2
+
%f2~}d't
+
2 P 32 (!1r L)2 + %f3 R}d't
(!1x 1L ) 2 +
12
o J
yAW
~ ~J{P31(LlWL)2 o
326
where coefficients P", P'2' P2" P22' P3" P32' q" q2 and q3 > o. Such a problem leads to following law of control (compare Sage [10]): SURGE:
flR(t)
- -Qll{XlL (t)
- xo(t)} - %z{uL(t)
- u o )}
where the gain coefficients are defined by the equation (25). The
(25)
control signals fZR and f3R are defined similarly as above for surge motion. The results of optimization should be satisfactory as long as lineazization is justified. For greater values of set velocities Uo and v o' i.e. the conditions (26) are true, nonlinear controller {luo-ucl
IVo-Vcl}
or
(26)
should be more effective. It is proposed to combine the action of two controllers: first given by above solutions of linear problem, and second obtained from optimal controller synthesis for the problem stated as: min ( ~
J[P ll (L~xIL)
2
+
P (8U L ) 12
2
+ Qlf12R]
d~)
o
subject to the constraints 8XlL - I!.. u L { l!..u
L
- -2cl lu o-ucl- clsign(uo-u c ) (8U L )2 + d l f12R
where P", P'2 and q, > o. According to the principles presented by Sage and White in [10], the solution of above problem is: flR (t)
-
-glO [XlL (t) -Xo (t)] - gll [u L (t) -u o (t)] + gl2 [u L (t) -u o ] 2
where the gain coefficients are defined below:
gll-
c
l o- cl
1 U
U
dl
2 2 4c (uo-u c) +
1
d
+
2
P - 12 %
+
2gl0 dl
1
-3 clluo-ucl + dlgll
The switching between linear and nonlinear controller in appropriate channel depends on condition (26). To determine the final control force the feedforward from the wind and the current must be added to feedback (see also Fig.3): f lT ( t)
- fIR ( t)
- [lW( t)
327
-
f lc ( t)
where
r 1101 (t)
is defined by eq.
(21) and f~c - by eq.
(22).
TURNING
In automatic slow-speed tracking the vessel should move along trajectory defined as sequence of lines between so called turnpoints. In the middle of the line trackkeeping .. system performs control accordinq to control laws described above. It is important question how to control the vessel during manoeuver of turning. It is obvious, (k+1) that stopping it at the turnpoint, changing the heading according to the coordinate of next turnpoint and then continuation, in many cases is .. ,, inadmissible. ~k+1 Presented trackkeeping system performs turning as follows. If turn-point is the last in sequence at some distance from turn-point the trackkeeping system begins performance of classical oP-task (i.e. setpoints for velocity equals to zero). That (k+1) distance is dependent on vessel speed stabilized along last line of trajectory. In another case trackkeeping system per- Fig.2 Two variants of the desired (solid forms the turning manoline) and "substitutionaP' (dashed line) trajectory euver (see Fig.2, which presents the tracks in two variants - first one for the course changing n~€<60o,180o> and second one for n~€
··
....
. ,
I
...... ~I
,
THRUSTER LOGIC ALLOCATION
The forces needed to keep the vessel in position are generated by the propulsion units. The controller calculates the total demand
328
in surge, sway and yaw direction in normal (automatic) operation mode. If manual (joystick) control is used, the force command comes from the joystick module. The force demand has to be satisfied by available thrusters as economically as possible. The power limits of the thrusters and the generators are taken into account as well. In general the configuration of propulsion units on the board of trackkeeping ship is redundant. The algorithm of the thrust allocation should select the best way of tasks distribution for all thrusters. Demanded forces are determined by controller and are represented as 3D-vector: F - {f 1T , f
2T ,
f
3T}
Assuming that M independent thrusters exist and axis of each one are fixed (no possibility of axis rotation) the following quality is fulfilled: (27) F - CT where T = [t"t2, ... ,t~]T- the vector of forces generated by thrusters, C - the matr1x with dimensions 3xM containing constant elements dependent on a geometry of thrusters' configuration. The task of thrusters • allocation is to determine the values of t.1 • • (1=1,2, ... ,M) fulf1111ng (27). Firstly the linear approach is presented. Let will be def~ned the quadratic performance index Q(T) = TTRT, where the matrix R is diagonal and all elements on the diagonal are positive and constant. The selection of values for these elements can take into account the relations between maximum forces obtainable for every thruster and costs of the energy consumed by them. In such an approach the inequality constraints for maximum forces determined by technical construction of the thruster can be neglected in formulated below problem of optimization: min {Q( T) - T TRT} (28) T
with equality constraints: CT-F-O
The problem is solved according to the method of Lagrange multipliers. The Lagrange function for above problem has form: L(T,')..) - TTRT + )..T(CT - F)
(29)
where A - the vector of Lagrange multipliers. Linear and equality constraints and positive definite R matrix yield the necessary and sufficient conditions for existing of the minimum: aL (T, )..)
at i
aL(T, ')..) ')..j
- 0,
i - 1,2, .. .
- 0,
j
- 1,2,3
,M
(30)
The solution of equations (30) exists if only the matrix CR-'C T is nonsingular (this condition is fulfilled according to positive values on diagonal of the matrix R) and is presented by eq. (31) .
329
Hence the required equation for thruster allocation has form (32), T - R -1 C T ( CR -1 C T) -1 F ( 32 ) and only linear transformation of controllers output is necessary. The direct consideration of inequality constraints leads to the following minimization problem: min {Q(T) - TTRT} (33) T
with constraints: CT-F-O T imin :$; t i:$; T imax ,
i - 1,2, ... , M
where T imin and T i!{1ax are extremal ob~ainable values of t i . The approach to solv1ng this problem 1S to expand the Lagrange multipliers vector up to dimension 3+2xM and to introduce so called slack variables J..L . for every inequality constraint. Introducing Lagrange multipliets vectors: A - connected to equality constraints (dim A = 3), A, - connected to maximum force limits (dim A, = M), Az - connected to minimum force limits (dim Az = M) and s.lack variables vectors: J..L, - connected to maximum force limits (dim J..L, = M), J..Lz - connected to minimum force limits (dim J..Lz = M), then Lagrange function (34) can be created. Because L(T,A,A 1 ,A 2 ,!-11,!-12) - TTRT + AT(CT - F) + 2 + t{Ali(t i + !-11 i
- T ima )
2
+ A 2i (-t i + J.L2 i
(34) + T imin )}
~-1
performance index Q(T) is strictly convex and all constraints are linear the necessary conditions for existing of function's (34) minimum are equivalent Kuhn-Tucker conditions: aL(J;)..)
~2TTR+ATC + Ar-AI-o
aL (T, A)
=
CT - F - 0
(35)
A
Ali
(t i - T ima )
T imi n
:$;
- 0,
ti ~ T imax '
A2i (t i - T imin ) - 0 } ~
II.li
~
0,
~
1I.
2i ~ 0
i-1,2,,,.,M
It is obvious that the process of optimization presented above requires more calculations than algorithm determined in (32). And now more realistic approach will be stated. Any performance index should be referred to real energy costs. These costs are dependent not only on the value of the thrust generated by the thruster but on the energy consumed by the whole propulsion system as well. Of course this dependency includes also influence of the ship's velocity (mostly the projection of the velocity vector to the thruster's axis). Regardless of the difficulties it is possible to determine for ith thruster the nonlinear function of costs r 2,.(t . ,u.) >• 0 in such a way that value t 1.r,.(t . ,u 1. ) represents global 1 1 1 1 1 costs of 1th thruster exploitation, when the thruster generates force ti and the value of the velocity vector projection to the thruster's axis equals to u i . Extremal values of the obtainable force also depends on u i ' i.e. Timin=Timin(ui) and Timax=Timax(ui).
330
creating the penalty function: 0 I 2i (t i ,U i ) -
_
Wmax(t i
when T imin (u) Timax(U))
{ Wmin(ti-Timin(ui))
<-
ti ~ Timax(u)
>0
when ti
>
Timax(U)
>
when ti
<
Timin(ui)
0
( 36)
and extending the function of costs to: Ii(ti,UJ
- I1i(ti,U i ) + I 2i (t i ,U i ),
(i-1,2, ... ,M)
the new formulation of the optimization problem is set: min {Q(T) - TTR(T, U) T} T
(37)
(38)
subject to the constraints: CT-F-O
where U [u"u 2 ' ••• ,uMJ the vector of the ship's velocity projections,• R-the diagonal matrix with rj(t 1. ,u 1. ) on the diagonal. • Interpretatlon of the functlon of costs should guarantee the convexity of it. The practice in construction and identification of costs functions leads to the polynomial representation satisfying the conditions for continuity and smoothness (differentiability). In conclusion - the solution of the problem (38) exists and is obtainable by using the standard optimization methods. RESULTS OF THE SIMULATION
It is usual to test the ship motion control designed for real applications using simulated rather than measured data. This is partly due to the difficulty in investigating this kind of systems in real conditions, but also reflects the fact that tests over a range of different conditions must be made. In this section we snaIl give some simulation results where the control system is working against a vessel simulator realized by a computer program. The simulator includes realistic excitations from wind, wave and current, measurement noises, etc. The simulation results presented below were obtained using the nonlinear model of the ship motion (see Hoft, Drinoczy [13J) and models of disturbances (Kallstrom [12J). The tests were made for B90 ship type (length L =56.4 m, breadth B=13.8 m,draught T=4.7 m and displacement v=230~m3) and for weather conditions corresponding to 6° in Beaufort scale (Baltic sea, wind speed 11 m/ sand relative direction 45°, wave height 1.6 m). The figures 4 + 7 show some typical results for the case in which the ship was in trackkeeping mode. The set of filtering results of the total motions, estimated and modeled low frequency motions are shown in Fig. 4 and Fig. 5. The estimate of the low frequency motion is required for control purpose and it is clear that the estimate is good throughout the time interval. It is important that the LF-motion estimates are relatively smooth and reduce undesirable variations in the control action. Simultaneously the parameter estimates for the low- and high-frequency were registered. Figures 6 and 7 shows the parameter estimates progress of the coefficients in LF- and HF-model. The parameters converged to their steady values. It is, of course, well known that the convergence rate of any technique, where the innovations must be approximated, is slower.
331
Fig.4 Desired (dashed line) and estimated (solid line) position of the ship (h)
t,[~J
I
!
) ...
Fig.S Actual and estimated motions: (a) and (h) hue (LF+HFl and estimated (LF) surge (UI~ L)' and sway (v I0L) velocities, (c) and (0) estimated x,,(surge) and YH (sway) HF position 332
·----------~~----------~-----------
(; .~. 11 I 1
\
~------_ v'V---- Pl --l\~~t[sl-
;) . ~ (:,+'!--,------r--,-----,--...,---,----,---,--,---,,---,--r----.-.,-----r--;---7) . 'L ::~ 1. is 1. !t ! ;) :,:
!
'I
!;
Fig.6 EstiMated paraMeters of the surge and sway LF-Models
l·3.'· ;· Id. "z1d ' "';, Id";,.; [.] 1 ~
1
/"
1~~---------------------4~
d:-------------
(1. (1~.,r_ 1 _ _ _ _ _ _ _ _ _ _ _-;-_ _---:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
A I
"
"
.i
~
~
'-' It
H.: 13.; 1d~
' , ,, 1
:.'
d'.... [ . ]~----------~ a~ ~---r---"
,'-,
. . . .~____ f{ ---~-
~--~~---.----~~
i
'). ')t~r--------------------------------
i
< · (' 7~1
i
• U (.,+'(; .':H)
..:.'
,
d l ____~-------
-----~~-
{I j-t[s]-
-,---,--..,.---,---...,---,----,--,--,--,---,--,---,------.-,__-4). O ,S~
1. H:
Fig. 7 E:d im3.ted pai'rtll1eters of the sUi'ye and
333
1.7t.
SWiPJ
HI;:
HF-iU ode ls
According to practice obtained in computer simulation - when the turning manoeuver is held the HF-filter is switched off. Remarkable changes of LF-parameters estimates are visible in tine moments when the turns are made. It is the consequence of the relative wind changes. The influence of that fact is also visible at figures presenting HFparameters. The tuning phase for estimation after turning is relatively short but it is closely connected to the procedure of HFfilter switching.
m.asurements WInd ~urements
Surge
+
meuurement. SWay
measurements y~
meouurementl
+ Feedforward
CONCLUSIONS
Thrusters
command.
As could be expected, the trackkeeping control system based on the Kalman filter works extremely well. The efficient filtering of Fig.3 The filters and controllers measurement signals has structure signif icantly reduce the thruster control excitations from environmental noises. However, to achieve these advantages, a substantial amount of computational work has to be carried out before installation and testing, i. e. one has to compute mathematical model parameters, thruster parameters, etc. During a sea trial period all these computations and simulation results have to be verified. REFERENCES [1]
[2 ]
[3]
[4]
J.G.Balchen, N.A.Jenssen and S.Saelid - DYNAMIC POSITIONING USING KALMAN FILTERING AND OPTIMAL THEORY, in Automation in Offshores Oil Field Operation, 00.183-188, 1976 J. G. Balchen, et al. - A DYNAMIC POSITIONING SYSTEM BASED ON KALMAN FILTERING AND OPTIMAL CONTROL, Modeling, Identification and Control, Vol.l, No.3, 1980 S.Saelid, N.A.Jenssen and J.G.Balchen - DESIGN AND ANALYSIS OF A 11 DYNAMIC POSITIONING SYSTEM BASED ON KALMAN FILTERING AND OPTIMAL CONTROL, IEEE Trans.on Autom.Control, Vol.AC-28, NO.3, pp.331-339, 1983 M.J.Grimble, R.J.Patton and D.A.Wise - THE USE OF KALMAN FILTERING TECHNIQUES IN DYNAMIC SHIP POSITIONING SYSTEMS, Oceanology Interna tional Conference, Brighton, England, 1978
334
[5J
[6J
[7J
[8J
[9J [10J [llJ [12J
[13J
M.J.Grimble, R.J.Patton and D.A.Wise - THE DESIGN OF DYNAMIC SHIP POSITIONING CONTROL SYSTEMS USING EXTENDED KALMAN FILTERING TECHNIQUES, Proc. IEEE Oceans'79 Conf., San Diego, CA, 1979, pp.488-498 P.T.K.Fung and M.J.Grimble - SELF-TUNING CONTROL OF SHIP POSITIONING SYSTEMS, IEEE Workshop on Theory and Application of Adaptive and Self-Tuning Control, Oxford University, 1981 P.T.K.Fung and M.J.Grimble - DYNAMIC SHIP POSITIONING USING A SELFTUNING KALMAN FILTERS, IEEE Trans. on Automatic Control, Vol. AC28, No.3, pp.339-349, 1983 N.H.Norrbin - THEORY AND OBSERVATIONS ON THE USE OF A MATHEMATICAL MODEL FOR SHIP MANOEUVREING IN DEEP AND CONFINED WATERS, Publ. of the Swedish state Shipbuilding Experimental Tank, No.68, Goteborg, 1971 A.H.Jazwinski - STOCHASTIC PROCESSES AND FILTERING THEORY, Academic Press, New York 1970 G.J.Bierman - Factorization methods for discrete sequential estimation, New York, Academic Press, 1977 A.P.Sage and Ch.C.White - OPTIMUM SYSTEMS CONTROL, Prentice Hall, Inc, New Jersey, 1977 C.G.Kallstrom - IDENTIFICATION AND ADAPTIVE CONTROL APPLIED TO SHIP STEERING, Swedish Maritime Research Center SSPA, Publ. No.93, 1982 J.P.Hoft and A.J.A.M.Drinoczy - DESIGN INFORMATION ON THE SHIP MANEUVERABILITY, PART 1, Netherlands Ship Model Basin, Report No.45931-1-NS, 1984
335