Considering the problem of dynamic positioning systems for the slowly varying disturbances, a parametrically adaptive observer is presented. The peak frequency of observer is adjusted on-line by autoregressive (AR) spectral estimation; other parameters of observer are optimized using particle swarm optimization (PSO). The peak frequency can be calculated by spectral analysis of the pitch, roll, and heave measurements. In the spectral estimation, Levinson-Durbin algorithm is used to solve the Yule-Walker equations. Finally, the computer simulation is given to demonstrate the effectiveness of the proposed method.
1. Introduction
Dynamic positioning systems keep floating structures in fixed position or predetermined track for marine operation purposes exclusively by means of active thrusters [1].
Filtering and state estimation are important features of a DP system. In most cases, measurements of the vessel velocities are not available. Hence, estimates of the velocities must be computed from noisy position and heading measurements through a state observer. Unfortunately, the position and heading measurements are corrupted with colored noise due to wind, waves, and ocean currents as well as sensor noise. However, only the slowly varying disturbances should be counteracted by the propulsion system, whereas the oscillatory motion due to the waves (first-order wave disturbances) should not enter the feedback loop. This is done by using the so-called wave filtering techniques, which separate the position and heading measurements into a low-frequency and wave frequency position and heading estimate.
The conventional observer filters out the WF motions from the measured position and estimates the LF position and velocity. In the early studies, Balchen et al. [2] and Sørensen et al. [3] used the Kalman filter to filter the WF motion. Later, Fossen and Strand [4] introduced the nonlinear passive observer. It should be noted that the two types of observers are based on a priori knowledge of the sea state to filter the WF motions; this means that peak frequency is assumed to be known. However, over a longer time frame, the sea state may change, and therefore peak frequency in general is not known. So, Strand and Fossen [5] improved the nonlinear passive observer with recursively adaptive WF filtering; however this design has two main drawbacks. Firstly, only the wave model parameters (not the observer gains) are adapted. This means that a priori knowledge of the sea state is required to choose observer gains, such that a notch filtering effect is achieved to remove the first-order wave components. Secondly, the observer tuning can be quite difficult. Guttorm Torsetnes gives a gain scheduled observer. The gain scheduled wave filtering is achieved by measuring the slowly varying wave model parameters on-line and therefore requires no a priori knowledge of the sea state.
In this study, particle swarm optimization (PSO) is implemented in conjuncture with an AR spectrum estimation to adajust the parameters of observer. Some numerical simulation results are given to demonstrate the effectiveness of the proposed method.
2. Ship Model
A useful model describing the dynamics of a surface ship sailing in a horizontal plane having 3 degrees of freedom is given in [1], which is common to separate the model into a kinematic model and dynamic model.
2.1. Kinematic Model
In dynamic positioning, the motions and state variables of the control system are defined and measured with respect to some reference frames or coordinate systems as shown in Figure 1. The Earth-fixed reference frame is denoted by OE-XEYEZE, and the body frame is O-XYZ (see [1]).
Earth-fixed, reference-parallel, and body-fixed frame.
The state vector is defined by η=[x,y,ψ]T, (x,y)∈ℜ2 is the position of the ship given in an inertial frame, and ψ∈[0,2π) is the heading angle of the ship relative to geographic North.
If only surge, sway, and yaw (3-DOF) are considered, the kinematics and the state vectors are reduced to
(1)η˙=R(ψ)v,
where R(ψ) is defined as
(2)R(ψ)=[cosψ-sinψ0sinψcosψ0001].
2.2. Dynamic Model
In the mathematical modeling of ship dynamics, it is common to separate the model into a low-frequency model and wave-frequency model. The WF motion of the ship is due to first-order wave loads. The nonlinear LF equation of motion is driven by second-order mean and slowly varying wave, current and wind loads, and thrust forces.
2.2.1. Low-Frequency Model
The equations of motion of a large class of surface ships can be described by the following model:
(3)Mv˙+Dv=τ+RT(ψ)e.
τ=[τx,τy,τψ]T is the control vector consisting of forces and moments produced by the thruster system; e∈ℜ3×1 is the environmental disturbance; M∈ℜ3×3 is the system inertia matrix including added mass; D∈ℜ3×3 is the damping matrix.
2.2.2. Wave-Frequency Model
In the controller design synthetic white-noise-driven processes consisting of uncoupled harmonic oscillators with damping will be used to model the WF motions. The synthetic WF model can be written in state-space form according to
(4)ξ˙=Awξ+Ewww,ηw=Cwξ.ηw=[xw,yw,ψw]T is the position and orientation measurement vector and ξ∈ℜ6, ww∈R3×1 is a zero-mean Gaussian white noise vector. Consider
(5)Aw=[03×3I3×3Aw21Aw22],Ew=[03×3Σ],Cw=[03×3I3×3],Aw21=diag[-ωo12-ωo22-ωo32],Aw22=diag[-2ξ1wo1-2ξ2wo2-2ξ3wo3],Σ=diag[k1k2k3].
The relative damping ratio ξi will typically be in the range [0.05–0.1]; ωoi is the parameter vector of the unknown dominating wave frequencies in surge, sway, and yaw.
The bias model may also be modelled as
(6)e˙=Ebwb.
3. Observer Design
Fossen and Strand have proposed a passive nonlinear observer; see [4]. The observer includes wave filtering properties, bias state estimation, reconstruction of the LF motion components, and noise-free estimates of the nonmeasured vessel velocities. The proposed observer has been proven to be passive and globally exponentially stable (GES). Based on (1), (3), (4), and (6) the observer takes the following form:
(7)ξ^˙=Awξ^+K1y-,η^˙=R(ψy)v^+K2y-,e^˙=-Tb-1e^+K3y-,Mv^˙=-Dv^+RT(ψy)e^+τ+RT(ψy)K4y-,y^=[η^+Cwξ,v^˙]T,
where K1∈ℜ6×3, K2, K3 and K4∈ℜ3×3 are observer gain matrices; y-=y-y^ is the estimation error. Consider
(8)K1=[diag{k1,k2,k3}diag{k4,k5,k6}],K2=diag{k7,k8,k9},K3=diag{k31,k32,k33},K4=diag{k41,k42,k43}.(9)ki=-2(ζni-ζi)ωciωi,i=1,2,3,ki=2ωi(ζni-ζi)ωciωi,i=4,5,6,ωci=1.22ωi,ki=ωcii=7,8,9,
where ζi is the desired damping ratio (typically 1) and ωi is often set equal to the wave peak frequency. ωci=1.22ωi is the cutoff frequency of the notch filter. ζni>ζi is a tuning parameter to be set between 0.1 and 1.0. K3 and K4 should be sufficient high to ensure proper bias estimation. K3 and K4 are simply chosen so that 1/Tbi<K3i/K4i<ωi<ωci is fulfilled. We can see that ωi, K3, and K4 are the unknown parameters in the wave model.
4. Measuring <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="M41"><mml:mrow><mml:msub><mml:mrow><mml:mi>ω</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> by AR Estimation
The dominating wave frequency ωi is assumed to be the peak frequency of the unbiased Power Density Spectrum (PDS) based on pitch, roll, and heave response of the vessel. At this point, it is worth noting that the pitch, roll, and heave motions are usually not controlled in DP systems for ships, and they will therefore not be affected by the controller in the same degree as the three horizontal motions; see [6]. The power spectrum estimation method used here is the parametric method of Autoregressive (AR) Spectral Estimation, which has several advantages compared to nonparametric methods; see [7]. Parametric methods are recommended since they give better estimates for shorter finite-length data records.
An autoregressive (AR) model is a possible method of modeling a stationary stochastic process. Given the signal x(n), x(n-1), x(n-2),…,x(n-p), the autoregressive model can be written as
(10)x(n)=w(n)-∑k=1pakx(n-k),
where w(n) is an independent identically distributed stochastic sequence with zero mean and variance. The coefficients ak are called the autoregressive parameters of the model, and is p the model order. Once such a model of the process is available, its spectrum can be easily computed:
(11)Pxx(ejw)=σw2|1+∑k=1pake-jw|2.
The values of the parameters ak and σw2 are unknown. The problem is to estimate the unknown parameters. ak and σw2 can be calculated by solving the following:
(12)ϕxx(m)=E[x(n)x(n+m)]=-E[x(n)(∑k=1pakx(n-k+m)+w(n+m))]=-∑k=1pakϕxx(m-k)+E[x(n)w(n+m)].
Since E[x(n)w(n+m)]={0m>0σw2m=0, we have
(13)ϕxx(m)={-∑k=1pakϕxx(m-k),m>0,-∑k=1pakϕxx(-k)+σw2,m=0.
From (12) and (13), we obtain
(14)[ϕxx(0)ϕxx(-1)⋯ϕxx(-p)ϕxx(1)ϕxx(0)⋯ϕxx(-(p-1))⋮⋮⋯⋮ϕxx(p)ϕxx(p-1)⋯ϕxx(0)][1a1⋮ap]=[σw20⋮0].
Equation (14) is called the Yule-Walker equations and describes the p unknown AR coefficients in terms of the p+1 estimated autocorrelation coefficients. Solving the Yule-Walker equations for ak is termed the autocorrelation method of AR parameter estimation and can be accomplished using a recursive technique such as the Levinson-Durbin algorithm. The Levinson-Durbin algorithm is given by
(15)km=-[ϕxx(m)+∑k=1m-1am-1(k)ϕxx(m-k)]σm-12,am(k)=am-1(k)+kmam-1(m-k),σm2=σm-12(1-km2).
The coefficients am(k) are generated recursively from their (m-1)-order values. σm2 is the minimum backward prediction errors of m-order model, and km is the reflection coefficient.
5. Optimizing K<sub>3</sub> and K<sub>4</sub>
The tuning of the parameters is a necessary part of design observer, and the appropriate observer can guarantee the system obtaining fast dynamic response and robust. In this section, the matrics K3 and K4 of observer are optimised by PSO.
5.1. Overview of the PSO
The particle swarm optimization (PSO) is an evolutionary computation technique developed by Kennedy and Eberhart in 1995; see [8–11]. Similar to the genetic algorithm (GA), the PSO algorithm is an optimization tool based on population, and the system is initialized with a population of random solutions and can search for optima by the updating of generations. It can be described as follows. At each iteration, each particle can adjust its velocity vector, based on its momentum and the influence of its best position as well as the best position of its neighbors, and then compute a new position where the “particle” is to fly to. Supposing that the dimension for a searching space is J, the total number of particles is N, the position of the ith particle can be expressed as vector li=(l1i,l2i,…,lJi)T; the best position of the ith particle being searching until now is denoted by llbesti=(l1i,l2i,…,lJi)T, and the best position of the total particle swarm being searching until now is denoted by vector lgbestg=(l1g,l2g,…,lJg)T; the velocity of the ith particle is represented by vector ui=(u1i,u2i,…,uJi)T. So, the velocity and position of the ith particle can be updated as follows:
(16)ui(t+1)=Wui(t)+h1r1(llbesti(t)-li(t))+h2r2(lgbest-li(t)),li(t+1)=li(t)+ui(t+1),
where r1 and r2 are random numbers between 0 and 1; h1 and h2 are the acceleration constants with positive values; W is the weight function. The following weighting function is usually used in (16):
(17)W=Wstart-Wstart-Wendtmax×t,
where Wstart is the initial weight, Wend is the final weight, tmax is the maximum iteration number, and t is the current iteration number.
5.2. Fitness Function
Adopting the absolute error (ITAE) as the minimum, we can gain fitness function as
(18)J=∫0∞β|z1(t)|dt,
with β being positive constant.
5.3. Optimization Procedure
The PSO algorithm comprises the following steps.
Step 1.
Set t=0 (t is the iterative number). Initialization of particle swarm is generated randomly as follows: li(0)=(l1i(0),l2i(0),…,lJi(0))T=(k31,k32,k33,k41,k42,k43)T; the swarm has 6-dimension particles which can guarantee K3 and K4 to be positive matrices. K3 and K4 are used in the observer mentioned in Section 3. The particle velocities are generated randomly in the range 0~1 and as follows: ui=(u1i(0),u2i(0),…,uJi(0))T.
Step 2.
Define objective function values of the particles that are evaluated given by (18). To each particle in the particles’ swarm, set its best position llbestj(0) (the fitness function is the least). Finding the least fitness function values in the initializing particles’ swarm, the best position is lgbest(0).
Step 3.
The position and the velocity of each particle are updated using (16). The fitness function values are calculated for the updated positions of the particles.
If J(lj(t))≤J(lj(t-1)),j=1,2…,J, then llbestj=lj(t); else llbestj=lj(t-1).
Setting the least fitness function values in the current particles’ swarm is the gth particle.
If J(lg(t))≤J(lgbest(t-1)),g=1,2,…,J,then lgbest=lg(t);else lgbest=lgbest(t-1).
Step 4.
If we attain the maximum iteration, exit, and otherwise go to iterate.
6. Simulation Research
In this section, the performance of the observer tuning by PSO and AR spectrum estimation is verified. A supply ship named as S-175 is used as a case study, and the vessel main particulars are shown in Table 1.
For the purpose of comparison, all the simulations deploy the same parameter settings as follows. The ship controlled by PID controller [1] is maintained in the desired position and heading ηd=[000°]T. The population size of PSO is 50, the maximum velocity is set as 1, the iteration is 200, and the weights are Wstart=0.9 and Wend=0.4.
6.1. Example 1. Verify the PSO
In order to demonstrate the efficiency of the proposed PSO, optimization observer by PSO is compared with an observer using genetic algorithmic (GA) [12]. The vessel was exposed to the JONSWAP distributed waves with significant wave height 2.0 m and peak frequency ωi=0.65 rad/s, ς1=ς2=ς3=0.1. The parameters are shown in Table 2, and the simulation curve is shown in Figure 2.
Parameters of observer.
Matrix
Empirical value
Parameter results by PSO
K3
0.1 × (45^{4}) × diag([1.42, 1.33, 0.74])
0.1 × (45^{4}) × diag([1.40, 1.94, 1.02])
K4
(45^{4}) × diag([1.35, 1.28, 0.57])
(45^{4}) × diag([1.41, 1.89, 0.16])
Simulation curve of observer using GA and using PSO.
Simulation curve of observer using GA
Simulation curve of observer using PSO
The measured position of ship of observer using GA and PSO
From Figure 2, we can see that the proposed PSO optimization observer can give better results, with a small position and heading bias.
6.2. Example 2. Verify the Parametrically Adaptive Observer
To demonstrate the performance of parametrically adaptive observer in this paper, the proposed parametrically adaptive observer is compared with the observer (7). The aforementioned two observer gains are optimized using PSO. The JONSWAP wave spectrum with significant wave height to be set at 1.2~3.6 m and peak frequency to be set at 0.8~0.65 rad/s is used to imitate sea conditions. The simulation curve is shown in Figure 3.
Simulation curve of observer without and with AR estimation.
Simulation curve of observer without AR estimation
Simulation curve of observer using AR estimation
The measured position of ship of observer without and with AR estimation
The estimated peak frequency
From Figures 3(a) and 3(b), the observer with AR spectral estimation can avoid the transients caused by the instability of verying sea states. From Figure 3(c), we can clearly see that the ship using observer with AR estimation has better position and heading. It can be seen from Figure 3(d) that the ωi estimated by AR method is very close to predefined peak frequency.
7. Conclusions
This paper proposed a parametrically adaptive observer of ship for the slowly varying seas. The peak frequency of observer can be calculated by AR spectral estimation of the pitch, roll, and heave measurements, some parameters of observer are tuned on-line based on peak frequency, and other parameters of observer are optimized off-line using PSO. The simulation results show that the parametrically adaptive observer can avoid the transients caused by the instability of varying sea states and can improve the accuracy of dynamic positioning systems.
Acknowledgment
The paper was supported by the National Nature Science Foundation of China, no. 60775060.
FossenT. I.BalchenJ. G.JenssenN. A.SælidS.Dynamic positioning using kalman filtering and optimal control theoryProceedings of the IFAC/IFIP Symposium on Automation in Offshore Oil Field Operation1976Amsterdam, The Netherlands183186SørensenA. J.SagatunS. I.FossenT. I.Design of a dynamic positioning system using model-based controlFossenT. I.StrandJ. P.Passive nonlinear observer design for ships using Lyapunov methods: full-scale experiments with a supply vesselStrandJ. P.FossenT. I.Nonlinear passive observer design for ships with adaptive wave filteringTannuriE. A.SparanoJ. V.SimosA. N.Da CruzJ. J.Estimating directional wave spectrum based on stationary ship motion measurementsPardeyJ.RobertsS.TarassenkoL.A review of parametric modelling techniques for EEG analysisKennedyJ.EberhartR.Particle swarm optimizationProceedings of the IEEE International Conference on Neural NetworksDecember 1995Piscataway, NJ, USA194219482-s2.0-0029535737GaingZ. L.A particle swarm optimization approach for optimum design of PID controller in AVR systemWaiR. J.ChuangK. L.Design of backstepping particle-swarm-optimisation control for maglev transportation systemYangM.WangX.ZhengK.Nonlinear controller design for permanent magnet synchronous motor using adaptive weighted PSOProceedings of the American Control Conference (ACC '10)July 2010Baltimore, Md, USA196219662-s2.0-77957758499HassaneinO. I.AlyA. A.Abo-IsmailA. A.Parameter tuning via genetic algorithm of fuzzy controller for fire tube boiler