A Nonlinear Ship Manoeuvering Model: Identification and Adaptive Control with Experiments for a Model Ship

Complete nonlinear dynamic manoeuvering models of ships, with numerical values, are hard to find in the literature. This paper presents a modeling, identification , and control design where the objective is to manoeuver a ship along desired paths at different velocities. Material from a variety of references have been used to describe the ship model, its difficulties, limitations, and possible simplifications for the purpose of automatic control design. The numerical values of the parameters in the model is identified in towing tests and adaptive manoeuvering experiments for a small ship in a marine control laboratory. Introduction Model-based control for steering and positioning of ships has become state-of-the-art since LQG and similar state-space techniques were applied in the 1960s. For a rigid-body the dynamic equations of motion are divided into two distinctive parts: kinematics, which is the study of motion without reference to the forces that cause motion, and kinetics, which relates the action of forces on bodies to their resulting motions (Meriam & Kraige, 1993). The rigid-body and hydrodynamic equations of motion for a ship are in reality given by a set of (very complicated) differential equations describing the 6 degrees-of-freedom (6 DOF); surge, sway, and heave for translation, and roll, pitch, and yaw for rotation. The models used to represent the physics of the real world, however, vary as much as the underlying control objectives vary. Roughly divided these control objectives are either slow speed positioning or high speed steering. The first is called dynamical positioning (DP) and includes station keeping, position mooring, and slow speed reference tracking. For DP the 6 DOF model is reduced to a simpler 3 DOF model that is linear in the kinetic part. Such applications with references are thoroughly described by Strand (1999) and Lindegaard (2003). High speed steering, on the other hand, includes automatic course control, high speed position tracking, and path following; see for instance Holzhü ter (1997), Lefeber et al. (2003) and Fossen et al. (2003). For these applications, Coriolis and centripetal forces together with nonlinear viscous effects become increasingly important and therefore make the kinetic part nonlinear. By port-starboard symmetry , the longitudinal (surge) dynamics are essentially decoupled from the lateral (steering; sway-yaw) dynamics and can therefore be controlled independently by


Introduction
Model-based control for steering and positioning of ships has become state-ofthe-art since LQG and similar state-space techniques were applied in the 1960s.For a rigid-body the dynamic equations of motion are divided into two distinctive parts: kinematics, which is the study of motion without reference to the forces that cause motion, and kinetics, which relates the action of forces on bodies to their resulting motions (Meriam & Kraige, 1993).The rigid-body and hydrodynamic equations of motion for a ship are in reality given by a set of (very complicated) differential equations describing the 6 degrees-of-freedom (6 DOF); surge, sway, and heave for translation, and roll, pitch, and yaw for rotation.The models used to represent the physics of the real world, however, vary as much as the underlying control objectives vary.Roughly divided these control objectives are either slow speed positioning or high speed steering.The first is called dynamical positioning (DP) and includes station keeping, position mooring, and slow speed reference tracking.For DP the 6 DOF model is reduced to a simpler 3 DOF model that is linear in the kinetic part.Such applications with references are thoroughly described by Strand (1999) and Lindegaard (2003).High speed steering, on the other hand, includes automatic course control, high speed position tracking, and path following; see for instance Holzhu ¨ter (1997), Lefeber et al. (2003) and Fossen et al. (2003).For these applications, Coriolis and centripetal forces together with nonlinear viscous effects become increasingly important and therefore make the kinetic part nonlinear.By port-starboard symmetry, the longitudinal (surge) dynamics are essentially decoupled from the lateral (steering; sway-yaw) dynamics and can therefore be controlled independently by forward propulsion.Moreover, for cruising at a nearly constant surge speed and only considering first order approximations of the viscous damping, a linear parametrically varying approximation of the steering dynamics is applicable.The origin of these types of models are traced back to Davidson & Schiff (1946), while Nomoto et al. (1957) gave an equivalent representation.See Clarke (2003) for a historical background and Fossen (2002) for a complete reference on these original models and their later derivations.
The contribution of this paper is a 3 DOF nonlinear manoeuvering model for a ship.This model can be simplified further to either a 3 DOF model for DP, a steering model according to Davidson and Schiff or Nomoto, or it can be used as is for nonlinear control design.Furthermore, system identification procedures for a model ship called CyberShip II (CS2) in a towing tank facility have produced numerical values for nearly all the hydrodynamic coefficients.To find the other values, an adaptive manoeuvering control law was implemented for CS2, and free-running manoeuvering experiments were performed.The adaptive parameter estimates in these experiments then give approximate values for the other hydrodynamic coefficients.
The Euclidean vector norm is D x D :ó(x T x)12 which reduces to the absolute value for a scalar.

The 3 DOF ship manoeuvering model
Ship dynamics are described by 6 degrees-of-freedom (6 DOF) differential equations of motion.The modes are (x, y, z), referred to as surge, sway, and heave, describing the position in three-dimensional space, and ({, h, t), called roll, pitch, and yaw, describing the orientation of the ship.Assuming that the ship is longitudinally and laterally metacentrically stable with small amplitudes {óhó{ ˙óh ˙B0, one can discard the dynamics of roll and pitch.Likewise, since the ship is floating with zB0 in mean, one can discard the heave dynamics.The resulting model for the purpose of manoeuvering the ship in the horizontal plane becomes a 3 DOF model.Let an inertial frame be approximated by the earth-fixed reference frame {e} called NED (North-East-Down) and let another coordinate frame {b} be attached to the ship as seen in Figure 1.The states of the vessel can then be taken as gó[x, y, t] T and ló[u, v, r] T where (x, y) is the Cartesian position, t is the heading (yaw) angle, (u, v) are the body-fixed linear velocities (surge and sway), and r is the yaw rate.

Rigid-body dynamics
The earth-fixed velocity vector is related to the body-fixed velocity vector through the kinematic relationship g ˙óR(t)l (1) is skew-symmetric.By Newton's second law it is shown in Fossen (2002) that the rigid body equations of motion can be written where M RB is the rigid-body system inertia matrix, C RB (l) is the corresponding matrix of Coriolis and centripetal terms, and q RB ó[X, Y, N] T is a generalized vector of external forces (X, Y) and moment N. Let the origin 'O' of the body frame be taken as the geometric center point (CP) in the ship structure.Under the assumption that the ship is port-starboard symmetric, the center-of-gravity (CG) will be located a distance x g along the body x b -axis.In this case, M RB takes the form where m is the mass of the ship and I z is the moment of inertia about the z b -axis (that is, yaw rotation).Several representations for the Coriolis matrix are possible.Based on Theorem 3.2 in Fossen ( 2002), we choose the skew-symmetric representation The force and moment vector q RB is given by the superposition of actuator forces and moments qó[q u , q v , q r ] T , hydrodynamic effects q H , and exogenous disturbances w(t) due to, for instance, waves and wind forces (Sørensen et al., 1996).The forces and moments in q RB are all expressed with reference to the center point (CP) such that the full set of dynamical equations is given in the body-fixed reference frame.

Hydrodynamic forces and moments
The vector q H is the result of several hydrodynamic phenomena, some not yet fully understood.For an ideal fluid, some of these components are added mass, radiation-induced potential damping, and restoring forces.For the 3 DOF states considered here, restoring forces are only important in case of mooring which is not in the scope of this paper.In addition to potential damping there are also other damping effects such as skin friction, wave drift damping, and damping due to vortex shedding (Faltinsen, 1990).
Due to currents in the ocean fluid, the velocity l is different than the relative velocity l r between the ship hull and the fluid.The hydrodynamic forces and moments depend on this relative velocity.For a nonrotational current with fixed speed V c and angle b c in the earth-fixed frame, the current velocity is given by Normally V c and b c should be modeled as stochastic processes.However, in the deterministic setting of this paper we simply assume that V ˙cób ˙có0.In the body-frame this gives the current component l c :óR(t) T v c and the relative velocity l r With these definitions it is common (Sørensen, 2002) to model the hydrodynamic effects as where M A accounts for added mass, C A (l r ) accounts for the corresponding added Coriolis and centripetal terms, and d(l r ) sums up the damping effects.By the notation of The Society of Naval Architects and Marine Engineers (1950) the matrix M A is given by where the assumption of port-starboard symmetry again is applied.For zero relative velocity, l r ó0, zero frequency of motion due to water surface effects, and assuming an ideal fluid, the added mass matrix is constant and M A óM T A [0.However, under non-ideal conditions with waves and high velocity, M A óM A (u e )ÖM A (u e ) T where u e is the frequency of encounter given by u e Here u 0 is the dominating wave frequency, g is the acceleration of gravity, Uó u2òv2 is the total ship speed, and b is the angle of encounter defined by bó0º for following sea.For control design it is common to assume that ) is constant and strictly positive.Since M A is not necessarily symmetric, Theorem 3.2 in Fossen ( 2002) is not directly applicable to find C A (l r ).To solve this obstacle, we observe that this theorem is deduced from the kinetic energy Tó 1 2 l T Ml.A modification for the added mass kinetic energy is ), for a nonsymmetric M A , is derived from Theorem 3.2 of Fossen (2002) using M ¯A instead of M A , and this gives The most uncertain component in the hydrodynamic model ( 6) is the damping vector d(l r ), to which many hydrodynamic phenomena contribute.Let T .For a constant cruise speed l r ól 0 B[u 0 , 0, 0] T one can fit the damping forces and moments at l 0 to the linear functions where the hydrodynamic coefficients {X , Y , N } are called hydrodynamic derivatives because they are the partial derivatives of the forces and moment with respect to the corresponding velocities, for instance, Seeking in this paper a more globally valid model of the damping effects, we consider a nonlinear representation.Abkowitz (1964) proposed using a truncated Taylor series expansion of d(l r ).Since in general d(l r ) is dissipative for both positive and negative relative velocities, it must be an odd function, and, hence, only odd terms in the Taylor expansion are required.Using first and third order terms only, and assuming port-starboard symmetry, this gives which is valid for all feasible velocities.Fedyaevsky and Sobolev (1963) and later Norrbin (1970) gave another nonlinear representation called the second order modulus model.These functions are not continuously differentiable, and strictly speaking they therefore cannot represent the physical system.However, experiments have shown that they match the damping effects quite accurately and are therefore often used.Based on the experimental data presented in the next section and curve fitting, we choose in this paper the damping model where which essentially is the second order modulus model with an extra third order term in surge.The reason for picking this model was that it gave the best fit to the experimental data.With q RB óqòq H òw(t) the kinetic equation of motion (2) becomes where For the kinetic model ( 14) one must decide upon using either the relative velocity l r or the inertial velocity l as the velocity state.There are different practices in the literature, and the current velocity v c must in either case be measured or somehow estimated to account for it in equation ( 14).A simplifying technique was applied by Fossen & Strand (1999) who used l as the velocity state and assumed that the dynamics related to the current v c (and other unmodeled dynamics) are captured by a slowly varying bias b in the earth frame.This gives the simplified model where M:óM RB òM A and C(l):óC RB (l)òC A (l).The alternative, applied among others by Holzhu ¨ter (1997), is to use l r as the state, but in this case the kinematic relationship (1) must be rewritten as which means that v c enters both the kinematic and kinetic equations of motion.For simulator design, a model according to equation ( 14) or more advanced should be used.For control design, on the other hand, experience shows that equations ( 1) and ( 15) are adequate provided some type of integral action is used in the controller to compensate for the bias b; see for instance Skjetne & Fossen (2004).

Simplified models
For special applications, simpler models than equation ( 15) can be used.For instance, for DP a linearization of equation ( 15) around ló0 yields where the Coriolis and nonlinear damping terms were eliminated.Note that the curve-fitted coefficients in D L for DP will be different from those fitted to the nonlinear (globally valid) model equation ( 13); see next section.
Another special application is steering a ship at (nearly) constant surge speed.Separating the surge dynamics from the steering dynamics, using equation ( 10), and assuming port-starboard symmetry and v c •0, we get a manoeuvering model consisting of the surge dynamics and the sway-yaw (steering) dynamics For each fixed surge speed uóu 0 , the steering dynamics become linear.Hence, treating u as a parameter, equation ( 19) is a linear parametrically varying (LPV) model of the form of Davidson & Schiff (1946).This can be further related to a Nomoto model as described by Clarke (2003).For conventional ships, the inputs are usually linearly related to the rudder angle d as q v óñY B d and q r óñN B d.As a result, linear design techniques as gain scheduling or similar can be applied to solve a steering task.

Actuator forces
The actuator forces and moments are generated by a set of thrusters with revolutions per second nó[n 1 , n 2 , . . ., n p1 ] T é Rp1 and a set of control surfaces (or propeller blade pitch) with angles dó[d 1 ,d 2 , . . ., dp2] T é Rp2.They are related to the input vector q through the mapping where B é R3" p1>p2 is an actuator configuration matrix, and f c : R3îRp1î [ñn, n)p2 Rp1>p2 is a function that for each velocity l r relates the actuator setpoints (n, d) to a vector of forces.
As a case we consider CyberShip II which has two main propellers and two rudders aft, and one bow thruster fore; see Figure 2 where u rudi , ió1, 2, are given below.Let the force attack points of {T )} in the body-frame, and likewise {(l xR1 , l yR1 ), (l xR2 , l yR2 )} for the rudders.Then the actuator configuration matrix is Bó The propeller thrust forces {T 1 , T 2 } are according to Blanke (1981) and later Fossen (1994), expressed as where o is the water density, d i is the propeller diameter, and K T is a nondimensional thrust coefficient which depends on the advance ratio of thruster i.The ambient flow velocity u a is given by u a ó(1ñw)u r where w é (0, 1) is the wake fraction number usually assumed constant (generally it is a slowly varying dynamic variable).For a range of J i ) is nearly linear and may be expressed according to Blanke (1981) as where a 0 , a 1 [0.An approximate formula for the thrust forces is then obtained by substituting equations ( 23) into ( 22) and grouping all constants, that is where T nn [0, T nu [0 are the new parameters.However, the experimental results show that the thrust force T i primarily is dependent on the propeller revolutions n i and less sensitive to the ambient flow velocity u a .Additional accuracy is therefore obtained if equation ( 24) is separated into the equations  25) is a monotone function for which the inverse function becomes: The thrust force produced by the bow thruster will also depend on the velocity of the ship.However, because the exact form of this relationship is not known, we rather choose the speed independent equation used by Lindegaard & Fossen (2003), that is, This has the inverse function Finally we must find the rudder lift forces as a function of rudder angle and the relative velocity of the fluid u rud at the rudder surface.From momentum theory (Lewis, 1988) it can be shown that for a positive velocity u r P0 then at rudder i, ió1,2, where T i is the thrust force from the preceding propeller, d i is the propeller diameter, and k u is an induced velocity factor.Normally k u B0.5 when the rudder is close to the propeller.This equation tells that for a positive surge speed and positive propeller thrust, the fluid velocity at the rudder is larger than the surge velocity u r .However, for T i \0 the argument inside the root may become negative.In this case we make the blanket assumption that this argument is zero.For negative surge speed we simply assume u rudi óu r .In summary we then have From foil theory (Newman, 1999) the lift and drag forces are modeled as where Ae rudi is the effective rudder area, C L is the nondimensional lift coefficient, and C D is the nondimensional drag coefficient.These latter coefficients are further modeled as C L , and c 3 are positive constants.Putting this together and grouping all constants, we get the lift and drag force models  model.However, since D i depends on T i through u rudi this expression becomes excessively complicated.To make it less complicated, experimental data suggest that D i can be viewed as a perturbation of the hull drag force d 1 (l r ) in surge.Assuming that a robust manoeuvering controller is able to deal with this perturbation, we do not consider it hereafter.The inverse function of equation ( 32) is where we have introduced an e-neighbourhood around the non-effective point u rudi ó0 to avoid division by zero.

System Identification
The Marine Cybernetics Laboratory (MCLab) is an experimental facility2 for testing of ships, rigs, underwater vehicles, and propulsion systems at the Centre for Ships and Ocean Structures (CESOS) at the Norwegian University of Science and Technology (NTNU).The dimensions of the basin are LîBîDó40 mî6.45 mî 1.5 m, and it is equipped with a towing carriage, a position measurement system, and a wave maker system, while a wind and current system are under construction.
CyberShip II (CS2; see Figure 3 is a 1:70 scale replica of a supply ship for the North Sea.Its mass is mó23.8kg, its length is L CS2 ó1.255 m, and its breadth is B CS2 ó0.29 m.It is fully actuated with two main propellers and two rudders aft, and one bow thruster; see Figure 2. It is further equipped with a PC104-bus driven by a QNX real-time operating system which controls the internal hardware achitecture and communicates with onshore computers through a WLAN.For position and attitude measurements, four cameras onshore in the MCLab observe three infrared emitters on the ship, and a kinematic computer algorithm calculates the 6 degreesof-freedom (6 DOF) data.The accuracy of these measurements are very high which means that the corresponding velocities can be estimated with high precision to render a full state feedback design possible.To facilitate real-time feedback control of the ship, Opal RT-Lab is used for rapid prototyping of a desired control structure programmed in Matlab and Simulink .For execution of free-running experiments, a LabVIEW interface has been developed for commanding and monitoring the ship.
Since we do not expose the ship to any currents or exogenous disturbances in the model basin, the CS2 ship model becomes where the parameters in M RB , M A , D L , D NL (l), B and f c (l, n, d) must be identified.We choose the following strategy:   (3) When the damping parameters for pure surge and sway motions are known, the actuator parameters in f c (l, n, d) are found by repeating the above towing experiments at different thruster revolutions and rudder angles.(4) The remaining parameters are those damping coefficients excited by the yaw rate.
Lacking equipment for turning experiments and moment measurements on the towing carriage, we choose to use adaptive estimation in free-running adaptive manoeuvering experiments to find those remaining parameters.
The parameters in the rigid-body system inertia matrix M RB and the input matrix B are found from straight-forward measurements of the main particulars of the ship, that is, its dimensions, weight, mass distribution, volume, area, and the actuator setup.The zero frequency added mass coefficients in M A can be found from semiempirical formulas or simple engineering 'rules-of-thumb'.For commercial ships, however, strip theory is usually applied (Faltinsen, 1990).This requires a ship geometry computation program that produces a geometry file which is fed into a hydrodynamic computation program based on strip theory.Nevertheless, for CS2 these parameters have all been roughly estimated beforehand by Lindegaard (2003), and their values are given in Table 1.The ship model used by Lindegaard ( 2003) was for DP using a linear damping model according to equation ( 17).Since we seek a nonlinear representation of the damping effects, the DP values cannot be used.The system identification procedure next will therefore be concerned with the damping and actuator coefficients.
The parameters to be identified in the surge direction are {X u , X uu , X uuu } and {T> nn , T> nu , T\ nn , T\ nu .Using the towing carriage, CS2 was pulled both forward and backward at different constant speeds, and for each run the average pull force X pull was measured and recorded; see Figure 4. Since u ˙óvóró0, and letting n 1 ón 2 at each run, we have for pure surge motion that 0ó where X drag óX u uòX uu D u D uòX uuu u3.Setting this up as a linear set of equations, Axób, where x contains the unknown parameters, A contains the applied speeds u and propeller rps n 1 , and b contains the corresponding measured forces X pull , the unknown coefficients are calculated by a least square fit.For n 1 ón 2 ó0 then X drag óñX pull .Figure 5 shows these measured forces and the corresponding interpolation.In addition it shows the linear DP curve X drag óX u u fitted to those measured points that are within the slow speed region u é [ñ0.15, 0.15].Clearly, there is a large discrepancy for higher speeds.Having the nominal drag forces for n 1 ón 2 ó0, then the same towing experiments are repeated for different propeller revolutions.These were chosen as n 1 ón 2 é {ô200, ô500, ô1000, ô2000}, and the thrust forces were estimated from 2T 1 óñX pull ñX drag .The result is shown in Figure 6 where it is   observed that for each revolution set-point, the surge speed has very little effect at positive revolutions, while for negative revolutions the slope is higher.Figure 7  and L 1 is given by equation ( 32) with u rud óu.For these runs, the sideslip angle bóarctan(v/u)B0 such that we can assume that N pull BñY pullsternstbd • l stern , that is, not affected by the moment arms from X pull .Separating positive and negative motion according to equation (32), Figure 10 shows that the rudders are most effective in forward motion.Finally, we repeat the same experiment for the bow thruster to find the parameter {T n3n3 } in equation ( 27).Unfortunately, the sideslip angle b was rather high in these runs so that hull drag distorted the measurements for higher speeds.Nevertheless, Y pullbowstbd was measured, and since equation ( 27) is an odd function it is enough to test with negative revolutions for n 3 . Figure 11 shows the measured points and the weighted least square fitted curve.
To sum up, the parameters identified thus far are given in Tables 1 and 2. Since no yaw motion was induced in these towing experiments, the parameters } are yet to be identified.We leave these to be estimated in the adaptive manoeuvering controller developed and experimentally tested in the next section.

Adaptive Ship Manoeuvering With Experiments
We consider the dynamic ship model equations (1) and ( 35) which for qóBf c (l, n, d) can be rewritten as g ˙óR(t)l (37) Ml ˙óqñC(l)lòg(l)ò'(l)r    where g(l) is the known part of ñD(l)l and are the vector of unknown parameters and the regressor matrix, respectively, so that g(l)ò'(l)róñD(l)l.The objective is to design a robust adaptive control law that ensures tracking of g(t) to a time-varying reference g d (t) while adapting the parameters r.

Remark 1
Using adaptive tracking to estimate unknown parameters will not in general guarantee convergence to the true values.This is only obtained if the inputs to the closed-loop system (references and disturbances) are persistently exciting the regressor matrix (Anderson et al., 1986).Consequently, this step in the parameter identification strategy involves most uncertainty.Nonetheless, the success in the design of a robust tracking control law with subsequent accurate tracking in experiments indicate that 100% parameter accuracy of the model is not necessary.Using the obtained (numerical) model with integral action to compensate for the bias b in equation ( 15) for control design should guarantee success in practical implementations.
The time-varying reference g d (t) must trace out a desired path on the surface as well as satisfying a desired speed specification along the path.Such problems are conveniently solved according to the methodology in Skjetne et al. (2004a,b), where the tracking objective is divided into two tasks.Instead of constructing a desired reference g d (t) that contains both the path and speed objectives in one package, one can keep these objectives separate by solving the manoeuvering problem.
Using h as a scalar parametrization variable, we want the desired path to be an ellipsoid with heading along the tangent vector, that is, Note that the dynamic task can be solved identically by letting h ˙ó, s (h, t) be a dynamic state in the control law, called a tracking update law, which is decoupled from the rest of the dynamics of the ship.Other update laws are also possible based on the results in Skjetne et al. (2004a).
The manoeuvering control design is based on adaptive backstepping (Krstic ´et al., 1995).A complete adaptive design procedure with stability analysis for solving the manoeuvering problem is reported in Skjetne et al. (2004a) where CS2 is used in a case study.This gives the internal control signals where the error vector z 1 is rotated to the body-frame for convenience.This means that the controller gains are not dependent on the ship heading (which is more intuitive since a control technician will himself be located in the body-frame when tuning the gains).The control law, the adaptive update law, and the manoeuvering update law are given in Table 3, where r ˆis the parameter estimate, K p óK T p [0, K d óK T d [0, and !ó! T [0 are controller gain matrices.Finding the optimal actuator set-points (n, d) for each commanded input q in equation ( 20) is termed control allocation.The simplest approach is to solve an unconstrained least-square optimization problem by using the generalized pseudoinverse and the inverse functions ( 26), ( 28) and (34), that is, (n, d)óf \1 c ( l, B †q)  where B †óW\1B T (BW\1B T )\1 is the generalized pseudo-inverse with a weight matrix W (Fossen, 2002, Chapter 7.5).Experience has shown, though, that using the pseudo-inverse does not result in good control allocation.A more advanced method is to use constrained optimization techniques.For CS2 this has been developed and reported by Lindegaard & Fossen (2003), Johnsen et al. (2003), where the routine developed by the former authors has been used in these experiments.
For the experiment, the controller settings were K p ódiag(0.5, 2.0, 1.5), K d ódiag(8, 25, 18), and !ódiag (8,4,8,8,8,4,8,8).The initial condition for the parameter update was r ˆ(0)ó0.The ship was first put to rest in dynamic positioning (zero speed) at g d (0), and then the ship was commanded online to move along the path with u REF ó0.15 m/s for 22 rounds before we commanded it to come to a stop again.The experiment was conducted on calm water without environmental disturbances (sea state code 0) since we use and wish to estimate zero frequency hydrodynamic parameters.
Figure 12 shows how CS2 accurately traced the path (in the time interval t é [808, 950] s).In the experiment we experienced problems with position measurement outages along the upper side of the path.This accounts for the transients at tB500 s in the surge speed response seen in Figure 13.The way the manoeuvering problem is posed, accurate path following has priority over accurate speed tracking.Nevertheless, it is seen in Figure 13 that CS2 tracks the commanded speed quite well.Figure 14 shows the adaptive parameter estimates of r ˆ(t).We observe a rapid change and a subsequent slow convergence to new values.We believe those values are close to the true values for the nominal surge speed uB0.15 m/s and moving along this ellipsoidal path.It is likely that the parameter convergence will be different for different paths and speeds.Nonetheless, we adopt these values as approximate values for the remaining parameters in the manoeuvering model for CS2; see Table 4.
This robust adaptive manoeuvering design with experiments also illustrates that 100% numerically correct values for the hydrodynamic parameters are not necessary to achieve accurate tracing of the path.Table 5 shows the standard deviations of the error signals in z 1 .The most important variable for path keeping is z 12 since this is an approximate measure of the cross-track error (provided the ship is pointed along the path, z 13 B0).An accuracy of 2.26 cm is 7.8% of the ship breadth and acceptable.This corresponds to an accuracy of 1.58 m for the full scale ship having a breadth of 20.3 m.

Conclusion
We have presented a modeling, identification, and control design for the task of manoeuvering a ship along desired paths.The identification and adaptive manoeuvering procedure with experiments have provided numerical values for all parameters in the nonlinear ship model for CyberShip II.It was the intention of the authors to quantify such a model and share it with the marine control research community for use in simulations and case studies.Material from a rich variety of references have been used to describe the model, its difficulties and possible simplifications.
System identification procedures, using a towing carriage in the Marine Cybernetics Laboratory in Trondheim, Norway, were performed where the model ship Cyb-erShip II was towed at many different velocities and the average towing forces were recorded.For zero acceleration and zero input forces these measurements are directly related to the drag of the ship hull.These measurements were accurately fitted to a nonlinear damping model of the ship for pure surge and sway motions.Knowing these nominal models, the same towing tests were repeated, with the thrusters and rudders activated, to find the actuator models.After these tests, eight damping parameters related to the yaw rate of the ship were still unknown.To find these, an adaptive manoeuvering control law was implemented and experimentally tested.The estimates of the unknown parameters in this experiment were assumed to be close to the true values and therefore adopted as the remaining numerical values.
In summary, this design with experimental testing has provided a complete manoeuvering model with numerical values for CyberShip II.The accuracy of the obtained parameters are believed to be close to the true values (as far as this is possible to quantify for a nonlinear ship model that still is a mere simplification of the real world).Nonetheless, the free-running manoeuvering experiment using a robust adaptive control law showed that accurate manoeuvering along desired paths is very much achievable in presence of modeling uncertainties and exogenous disturbances.

Figure 1 .
Figure 1. Figure showing the inertial earth-fixed frame and the body-fixed frame for a ship with the earth-fixed position (x, y), the heading t, and the corresponding body-fixed velocities (u, v) and rotation rate r.
. The main propellers generate thrust forces {T 1 , T 2 }, the bow thruster generates {T 3 }, while the rudders generate lift forces {L 1 , L 2 } and drag forces {D 1 , D 2 }.Disregarding the drag forces, the force vector becomes

Figure 3 .
Figure 3.A picture of CyberShip II in the Marine Cybernetics Laboratory at NTNU.

( 1 )
The matrices M RB , M A , and B are found from the main particulars of CS2 (weight, mass distribution, lengths, area, volume, etc.) (2) By towing CS2 at different constant surge and sway velocities, with f c ó0, and measuring the average towing forces, one can use least square interpolation to find the damping parameters in D L and D NL (l) that are excited by pure surge and sway motions; see Figure 4.

Figure 4 .
Figure 4. Two force rings, forward and backward, were applied to measure the drag and propulsion forces when towing CyberShip II longitudinally at different speeds.Four force rings, two port and two starboard, were used to measure the drag force and moment for lateral motion.

Figure 5 .
Figure 5. Measured drag forces of CyberShip II for n 1 ón 2 ó0 at different speeds and the corresponding fitted nonlinear curve as well as a linear curve for DP.

Figure 6 .
Figure 6.Measured and interpolated thrust forces T 1 óT 2 for different propeller revolutions at different speeds for CyberShip II.

Figure 7 .
Figure 7.The measured and curve fitted drag forces for different rudder angles d 1 ód 2 for CyberShip II.
shows how the rudders affect the drag in surge motion at different speeds.This justifies the argument, previously discussed, of not including the the rudder drag force D i in the actuator model, but rather viewing it as perturbations of the nominal drag coefficients.A robust control design should compensate for this.The next step is to identify the parameters {Y v , Y vv , N v , N vv } which can be found from pure sway motion measurements.In this case we have v ˙óuóró0, and the force equation becomes Y pull òY drag ó0 where Y drag óY v vòY vv DvDv.Force rings are set up according to Figure 4 to measure the pull forces at both positive and negative sway speeds.The full set of measurements constitutes a set of linear equations that are solved by least square minimization, see Figure 8.These measurements are also used to identify the moment coefficients {N v , N vv }.The moment equation is N pull òN drag ó0 where N drag óN v vòN vv D v D v. Let the moment arms from CP to the stern and bow measurement points for Y pull be l stern and l bow respectively; see Figure 4. Then v[0different (equal) rudder angles, and for each run the average force Y pullsternstbd is recorded.The moment equation is N pull òN lift ó0 where N lift ó2 D l xR1 D L 1

Figure 8 .
Figure 8. Measured drag forces in sway motion and the corresponding fitted nonlinear curve as well as a linear curve for DP for CyberShip II.

Figure 9 .
Figure 9. Measured drag moments in sway motion and the corresponding fitted nonlinear curve as well as a linear curve for DP for CyberShip II.

Figure 10 .
Figure 10.Curve interpolation to the measured lift forces for the rudders.Notice that CyberShip II generate more lift force in forward motion than backward motion.

Figure 11 .
Figure 11.Measured and interpolated bow thrust force T 3 for forward and backward motion of CyberShip II and different negative propeller revolutions.

Figure 13 .
Figure 13.The desired and actual surge speed of CyberShip II for the full experiment.Notice the discrepancies around tB500 s which resulted from position measurement outages.

Table 1 .
Mass-related parameters with respect to CP for CyberShip II

Table 2 .
Experimentally identified parameters for CyberShip II

Table 3 .
Manoeuvering control and guidance system for CyberShip II

Table 4 .
Adaptively estimated parameters for CyberShip II