The Bilinear Model Predictive Method-Based Motion Control System of an Underactuated Ship with an Uncertain Model in the Disturbance

Ship transportation plays an increasingly important role in and accounts for a large proportion of cargo transport. Therefore, it is necessary to improve the quality of the trajectory control system of the ship for improving the transport efficiency and ensuring maritime safety. This paper deals with the advanced control system for the three-degrees-of-freedom model of the underactuated ship in the condition of uncertain disturbance. Based on the three-degrees-of-freedom model of the underactuated ship, the authors built a bilinear model of the ship by linearizing each nonlinear model section. Then, the authors used the state estimator to compensate for uncertain components and random disturbances in the model. Finally, the authors built the output-feedback predictive controller based on the channel-separation principle combined with direct observation of the continuous model for controlling the motion of the underactuated ship in the case of uncertain disturbance and the bound control signals. The result is that the movement quality of the underactuated ship is very good in the context of uncertain disturbance and bound control signals. Record Type: Published Article Submitted To: LAPSE (Living Archive for Process Systems Engineering) Citation (overall record, always the latest version): LAPSE:2019.1024 Citation (this specific file, latest version): LAPSE:2019.1024-1 Citation (this specific file, this version): LAPSE:2019.1024-1v1 DOI of Published Version: https://doi.org/10.3390/pr7070445 License: Creative Commons Attribution 4.0 International (CC BY 4.0) Powered by TCPDF (www.tcpdf.org)


Introduction
Maritime transport plays a particularly important role in international trade because about 80% of imports and exports are transported through the sea. Maritime transport is a large market because of its essential advantages, such as its wide transport range, large carrying capacity, low shipping cost, etc. Therefore, it is necessary to conduct research for improving the trajectory control system of the ship in order to improve the transport efficiency and ensure maritime safety. However, controlling the ship movement with a high-quality is a challenge for scientists because the ship is a complex object, with large nonlinearity and unknown structures, and works in dynamic environments with complex noise.
The dynamic model of a ship is an uncertain nonlinear model, and the model parameters depend on the control states. The equation used to describe ship motion is a high-order differential equation. Considering the kinetic properties, ships have the following characteristics: The oscillation and the time constant are large, and the stabilization margin is small [1]. Therefore, controlling the ship motion is always a challenge for scientists, especially controlling the underactuated ship that has fewer control signals than the state variables to be controlled [2]. Studies on ship control with the model of a lack of actuators have been presented in the literature [3][4][5][6][7].
A ship is a large nonlinear object, so the use of simplified or linear control models does not give us the expected results. In recent years, the development of electronic and informatics technology has allowed us to apply modern control theory for ship motion, such as adaptive control, backstepping, sliding mode control, model predictive control, etc. The research [8] uses the backstepping technique to control an underactuated ship following the set trajectory. However, this research assumes that the ship only moves along a straight trajectory and the speed is constant and positive, and the uncertainties in the kinematic model and the disturbance are not considered. The research [9] has provided a trajectory ship controller based on the Lyapunov function and backstepping technique on the condition that the control signals are not bound. Additionally, the research [10] has proposed a control method based on linear algebra, where the controller is designed based on linearizing the nonlinear model of the control object. However, this research does not address the problem of disturbance and uncertainties in the dynamic model of the ship.
Therefore, difficult problems when designing the ship motion controller are as follows: the state variables cannot be measured, and the coefficients in the model matrices are changed, depending on the control states, so it is difficult to accurately determine the coefficients in the model matrices. For simplicity, some previous research has ignored many factors, leading to models of the ship that are very different to the actual situation.
In order to solve the problems caused by uncertain parameters and disturbance, the research [11,12] has used the neural network to update and estimate the uncertain components in the model. In the study [13], the author used the coordinate transformation method to overcome the third-order uncertain component in the derivative of the Lyapunov function caused by the centrifugal and Coriolis forces. To update the uncertain parameters and the time-varying parameters of the inertial mass matrix of the model, the study [14] proposed a motion controller of the self-driver ship using the unscented Kalman filter to compensate for the hidden noise in the model. The work [15] estimated the uncertain components based on the finite-time disturbance observer. The works [16,17] proposed the nonlinear disturbance observer based on the kinetic model to estimate the disturbance that is compensated for the controller.
Another problem faced when designing the trajectory controllers of ship motion is that the studies often ignore the limit of control signals. In fact, the angle of the steer is always limited from 35 degrees left to 35 degrees right. The research [18] also addressed this problem when designing the nonlinear model predictive controller for a ship following a set trajectory.
The review of previous studies shows that it is very complicated to design the trajectory control system of ships in the condition of uncertain disturbance. There are some works that have studied this topic in an attempt to solve these problems, but each work has only solved a specific problem in the case of assumptions to simplify the object. There is no research that has simultaneously solved all the problems, such as designing the advanced trajectory controller, eliminating the disturbance in the system, control in the case of the object lacking the actuator, and the limit of control signals.
To solve all of the above limitations, this study will perform the following tasks. It will compensate for the disturbance components in the object model and the disturbance components from the environment by the state observers based on the continuous object model and the difference between the object model and the reference model. Additionally, it will design the trajectory controller of the underactuated ship based on the model predictive controller (MPC) combined with segment-linearization techniques of the nonlinear object in the time-axial.

The Motion of the Ship
Considering the ship motion on the sea surface, the motion of the ship is described as Figure 1. It is characterized by the following motion components: the straight slide motion (u), horizontal slide motion (v), and rotary motion (r). This ignores the following motion components: the roll rotary motion (p = 0), pitch rotary motion (q = 0), and yaw rotary motion (ω = 0).

The Equations of Ship Motion
The equations of ship motion in the three-degree freedom space are as follows [19]: where: M denotes the inertial matrix; ( ) C u denotes the centrifugal and Coriolis forces; ( ) D u denotes the hydrodynamic damping matrix; ( ) J h denotes the orthogonal matrix; represents the gravity forces; t is the vector of control torques, including the propeller force and the rudder force; , then the ship is called a fully-actuated ship. This model of a ship has many actuators, such as the main propeller for creating the straight-slide force, the horizontal propeller on both sides for creating the horizontal slide force, and the rudder for controlling the ship direction. This model often appears in types of ship such as the serving-ship, the special-task ship, and the ship for researching marine dynamic stability control.

If the control force
means that there is no horizontal slide force, then the ship is called an underactuated ship. This ship only has two actuators, such as the main propeller for creating the straight-slide force and the rudder for controlling the ship direction. This model often appears in types of ship such as cargo ships and container ships with a long transport journey. The motion equations of an underactuated ship in the three-degree-freedom space are as follows  Here, u, v, r denote the straight slide speed, the horizontal slide motion speed, and the rotation speed, respectively.

The Equations of Ship Motion
The equations of ship motion in the three-degree freedom space are as follows [19]: where: M denotes the inertial matrix; C(υ) denotes the centrifugal and Coriolis forces; D(υ) denotes the hydrodynamic damping matrix; J(η) denotes the orthogonal matrix; g(η) represents the gravity forces; τ is the vector of control torques, including the propeller force and the rudder force; τ w represents disturbances from the environment.
In the mathematical model (1), if the control force includes all of the components τ = [τ u τ v τ r ] T , then the ship is called a fully-actuated ship. This model of a ship has many actuators, such as the main propeller for creating the straight-slide force, the horizontal propeller on both sides for creating the horizontal slide force, and the rudder for controlling the ship direction. This model often appears in types of ship such as the serving-ship, the special-task ship, and the ship for researching marine dynamic stability control.
If the control force τ = [τ u 0 τ r ] T means that there is no horizontal slide force, then the ship is called an underactuated ship. This ship only has two actuators, such as the main propeller for creating the straight-slide force and the rudder for controlling the ship direction. This model often appears in types of ship such as cargo ships and container ships with a long transport journey.
The motion equations of an underactuated ship in the three-degree-freedom space are as follows [2]: It is very difficult to fully define the coefficients of M, C(υ), D(υ). These coefficients can be determined by driving the ship at different speeds in different directions and measuring the response signals. However, we still have to assume that the high-order nonlinear components are zero. Moreover, the coefficients in the above matrices also depend on other factors, such as the cargo weight on the ship and the waters in which the ships move.
In order for the model equations to fully express the dynamics of the underactuated ship in the space of three-degrees-of-freedom, this research proposes merging all of the components that are difficult to identify, uncertain components, and the environmental disturbance into the undefined vector ∆(η, υ). where: is the force and torque vector that is synthesized from the uncertainty components of the ship model and disturbance from the external environment.
The matrices in Equation (3) are as follows: To solve the uncertainty component ∆(η, υ) in Equation (3), this research will propose the estimator and compensate for the uncertainty component in the controller.

The Diagram of the Control System
The targets of this study are to build the output-feedback MPC according to the separation principle and combine a state-feedback MPC and a state observer to control an underactuated ship in case the model contains an uncertain component ∆(η, υ). The mission includes building the MPC controller based on a bilinear model of the ship combined with the direct state observer that is built from a continuous model of the ship, and building the estimator of uncertain components to estimate and compensate for the uncertain components in the model. The proposed control system structure is described in Figure 2.

The Bilinear Model of the Underactuated Ship in the Three-Freedom Space
We thus have the following: Equation (4) is transformed into the following equation: Equation (6) is the bilinear model of the underactuated ship in the three-freedom space.
Since the MPC controller is discrete, Equation (6) , Equation (6) is transformed into the following equation: Linearizing each segment  k of the model (6) along the time-axis with the assumption of a small amount of time, model (7) is approximated by the linear time-invariant model as follows [20]: where In the figure, d(x, t) is an uncertain component that arises in the model, d (x, t) is the uncertain component which is estimated from the estimator, ω k is the set trajectory, u(t) is the control signal, and y(t) is the output signal. MPC-O denotes the output-feedback MPC controller. ZOH denotes the zero-order hold component.

The Bilinear Model of the Underactuated Ship in the Three-Freedom Space
Considering Equation (2), x 1 = η, x 2 = υ, u = τ, and x = col(x 1 , x 2 ). We thus have the following: Then, Equation (4) is transformed into the following equation: Equation (6) is the bilinear model of the underactuated ship in the three-freedom space.
Since the MPC controller is discrete, Equation (6) must be discrete with the sample time T a . Performing the approximate equation (6) is transformed into the following equation: Linearizing each segment H k of the model (6) along the time-axis with the assumption of a small amount of time, model (7) is approximated by the linear time-invariant model as follows [20]: where

Building the Direct State Observer Based on the Continuous Model
Since the state variables in model (6) cannot be measured, the authors propose the direct observer from the continuous model (2) or (6) based on the measured output signal y(t) = η(t) = [x y ψ] T .
Here, x, y, ψ denote the x-axis coordinate, y-axis coordinate, and the direction of the ship, respectively. These values can be measured by the Global Position System (GPS) and the compass on board.
The observer's task is to identify the state vector of the continuous model (2) or (6) x = col(η, υ).
In the status vector x(t) = col η(t), υ(t) , the component η(t) = y(t) has been measured, so we only need to define the second component υ(t).
From Equation (2), we have . η = J(η)υ, with the orthogonal matrix J(η) shown as follows: Therefore, we can determine the state component as follows: To determine the derivative value y. Since T ≈ 0, the output y (t) is defined as follows: y ≈ . y = J(η)υ. Finally, we can obtain the observed signal as follows:

Building the Estimator to Compensate for the Uncertainty Component in the Model
The incorrect model of a ship containing an uncertainty component (3) can be rewritten as follows: The matrixes of the model A(x), B, C are inferred from the original model (3). Compared with the exact model in Equation (6), the model Equation (11) has an uncertain component d(x, t), which is smooth. The article will identify this uncertain component.
After compensating for d (x, t) in the input for the uncertainty model (11), this model is equivalent to the correct model (6).
The research will propose an approximate estimation method for d (x, t) ≈ d(x, t) based on the discontinuous model. This method is reasonable because the ships are not a fast-changing system, and in a control cycle, the uncertain components seem constant. This means that d(x, t) is a constant uncertain function in each cycle.
Equation (3) can be re-written according to the discontinuous form at the time (k) by linearizing each segment according to the time-axis. In the present control cycle, the uncertain component of the input d has been compensated for by d k−1 , which is defined in the previous control cycle. We have the model at period k as follows: where The exact reference model at the time of k is where u k−1 is the input. The error of two models is e k = υ k − ν k . This error completely depends on the uncertain component, so we can determine d k ≈ d from e k . Then, d k is used to compensate for the uncertain component in the next control loop (k + 1). From (13) and (14), we have Therefore, if the matrix B has a rank of 2, then Equation (15) is used for approximating d k ≈ d from e k = υ k − ν k , υ k−1 , and ν k−1 . υ k , υ k−1 can be measured or observed from the system. ν k−1 , ν k are defined by Equation (14).
After defining d k , we can compensate for the input of the system at time k + 1 as Figure 3. , which is defined in the previous control cycle. We have the model at period k as follows: where [ ] The exact reference model at the time of k is ( ) where 1 k u − is the input. The error of two models is From (13) and (14), we have Therefore, if the matrix B  has a rank of 2, then ( ) Equation (15) (14).
After defining k d  , we can compensate for the input of the system at time 1 k + as Figure 3.

Building the MPC Controller with Output-Feedback Based on the Separation Principle
The separation principle-based output-feedback MPC controller is the combination of the state feedback MPC controller and the state observer directly from the continuous model. Unlike the conventional controller of linear MPC or nonlinear MPC, the proposed MPC controller is a linear controller used for a nonlinear object based on the linearization of each nonlinear model section.

Building the MPC Controller with Output-Feedback Based on the Separation Principle
The separation principle-based output-feedback MPC controller is the combination of the state feedback MPC controller and the state observer directly from the continuous model. Unlike the conventional controller of linear MPC or nonlinear MPC, the proposed MPC controller is a linear controller used for a nonlinear object based on the linearization of each nonlinear model section. Along the time axis, the object includes countless linear models (8).
Based on the linear approximation model of each segment H k (k = 0, 1, . . .) and the predictive control principle, we can obtain the future outputs y k for the entire forecasting window (N) as follows [21]: where p is the vector of future input signals that need to be defined. After having obtained the future output signals y k+i (i = 1, 2, . . . , N) in the current forecasting window that depend on the future input signals ∆u k+ j ( j = 0, 1, . . . , N − 1) through Equation (8), we must define the future input signals so that the output signals follow the set signals η k .
Setting the target function is the sum of the squared deviation of the errors in the current forecasting window. In order to improve the response speed, this study proposed a technique to adjust the set signal [22]. The set-signal after adjustment is as follows: Here, η k = η(kT a ), e k = y / k − η k is the error at the previous time and K is the calibration parameter of the set signal (0 < K < 1).
The objective function is set as follows: The solution is as follows: P is bound because of the mandatory requirements for the steer-angle α that is as follows: The common methods employed to find the optimal solution with bound conditions are the sequential quadratic programming (SQP) method, interior-point method, or evolutionary methods for optimal control, such as genetic algorithms (GA) and the particle swarm optimization (PSO) method. This research will use the GA method [23] to find the optimal solution of Equation (18).
The genetic algorithm (GA) is based on two basic rules of natural adaptations that hybridize 'good' elements p i , p j together to get better elements and transform the 'bad' elements p k . The 'bad' and 'good' valuations of these elements are evaluated through their objective function J i = J(p i ). Firstly, N elements p i , i = 1, 2, . . . , N are randomly chosen in the constraint set p. Then, the values J i = J(p i ) will be calculated respectively. Elements with δ i ≤ δ c are 'good', and elements with δ k ≥ δ m are 'bad'. Here, Next, a good pair of elements is hybridized to form new pairs, and bad elements are mutated. Therefore, a new generation formed from the old generation contains better elements. This process, with two calculations of the hybrid and mutant, is repeated many times until the end condition is satisfied. When the end condition of the algorithm is satisfied, the element p i of the current generation with the smallest J i is chosen as the solution.
Currently, the GA has been installed into the command ga (·) in MATLAB, and we can use this command to build the proposed MPC controller. The parameters, such as the number of generations, the population size, and the type of selection, will automatically be defined. The syntax detail of the command is as follows: where FUN is the objective function; NVARS is the number of variables of the objective function; and A, B, AE, and BE are the boundary conditions.
In this research, the authors execute the command as follows: The objective function: The number of the variables: NVARS = 2. The boundary conditions: −2 ≤ u 1 ≤ 2, −3 ≤ u 2 ≤ 3. Finally, the details of the command are as follows: After defining the solution p * of (18), we get the control signal u k for controlling the ship motion (3) in the present cycle, as follows: where u k is the control signal during one sampling period T a . The control algorithm is as follows: • Step 1: Initialing and setting the forecasting window width N ≥ 2, the sample period T a , and the calibration parameter of the set signal 0 < K < 1. Calculating B, C according to (5), B, C according to (8), and B according to (13). Setting k = 1, d 0 = 0; • Step 2: Setting the two positive symmetric matrices Q k ∈ R 3N×3N , R k ∈ R 2N×2N ;

•
Step 4: Determining ν k according to (12) and d k according to (15) for the next cycle;

•
Step 7: Using u k − d k−1 for controlling the continuous model (3), which is also the object (4) and (6); • Step 8: Setting k := k + 1. If it needs to update G, go back to the step (2); otherwise, set Q k+1 = Q k , R k+1 = R k and go back to step (3).
The observer is considered a continuous-time model and the control input is calculated by using the discrete-time model. Therefore, in the proposed controller algorithm, after observing the state of the continuous model, we have to make the observed signal of the continuous model discrete with the sample time Ta and then feed it into the controller. This is shown in step 3, where, after measuring η k and estimating υ k , we calculate A k according to (8).

The Results and Discussion
To verify the quality of the proposed control system, the authors have run the system on Matlab software (R2014b, MathWorks Inc., Natick, MA, USA). The control object is an underactuated ship with three degrees-of-freedom. The specifications of the ship given by Do K. D and J. Pan in the document [2], with the length of 32 m, the weight of 118 × 10 3 kg, the minimum radius of curvature of 150 m, and other parameters, are shown in Table 1. The set trajectory is a straight and circular one, and the details are as follows: The ship moves straight for a period of 300 s with a distance of 1200 m, and the ship then moves in a circle with a radius of 200 m for a period of 325 s. The uncertain signals are assumed according to the document [5] as follows:  Figure 4a shows the ability of the ship to follow the set trajectory, with the error shown in Figure 4b. Figure 5a shows the actual direction error. The errors obtained from the observer are shown in Figure 5b. The qualities of estimating the uncertain components d1 and d2 are shown in Figure 6a,b, respectively.
During the control process, the control signals of the straight slip force and the torque force are bound in the defined range, and they are shown as Figure 7a,b. The shapes of the control signals in Figure 7 are feasible because the control signal depends on the disturbance if the disturbance becomes large and the control becomes large. The simulation time of 800 s is long, so the number of times the control signal is changed in the simulation time is small. This number conforms to the Maritime regulation on the number of signal changes of the steering angle.
The quality of the control system has been evaluated based on the following factors: The error of trajectory, the actual direction error, the errors obtained from the observer, and the error of the estimator. The results show that these errors are very small, so the quality of the control system is very good.        Although the control object has undefined components and the control signals are bound within limits, the quality of the entire control system is still very good: The response trajectory is very close to the set trajectory, and the error of the trajectory and the error of direction are very small. In addition, the quality of the observer depends on the receding horizon of the controller and the time needed to calculate the differential stage by the direct observer.
The estimator performed the mission well, compensating for the uncertain signals 1 2 , d d in the system. The difference between the estimated signal and the uncertainty signal is very small. The estimation error also depends on the receding horizon of the controller and the estimated value at the initial time.
In addition, the quality of the entire control system depends on the forecasting window N and the two positive symmetric matrices R R

Conclusions
This article was successful in building the MPC control system with the output-feedback based on the separation principle, and building the direct observer based on the continuous model in order to control the trajectory of the underactuated ship. The controller was built based on the optimal control combined with the linearizing technique of each nonlinear model section. Disturbances from the environment and uncertainty components in the model were estimated and compensated for by the estimator. The simulation results show that although the control object has undefined components and the control signals are bound, the quality of the entire control system is still very good. The response values follow the set values, with tiny error. The success of this research is the basis for the authors to apply it to actual ships in further studies.  Although the control object has undefined components and the control signals are bound within limits, the quality of the entire control system is still very good: The response trajectory is very close to the set trajectory, and the error of the trajectory and the error of direction are very small. In addition, the quality of the observer depends on the receding horizon of the controller and the time needed to calculate the differential stage by the direct observer.
The estimator performed the mission well, compensating for the uncertain signals d 1 , d 2 in the system. The difference between the estimated signal and the uncertainty signal is very small. The estimation error also depends on the receding horizon of the controller and the estimated value at the initial time.
In addition, the quality of the entire control system depends on the forecasting window N and the two positive symmetric matrices Q k ∈ R 3N×3N , R k ∈ R 2N×2N . In fact, we can choose matrixes Q k , R k that match the control target.

Conclusions
This article was successful in building the MPC control system with the output-feedback based on the separation principle, and building the direct observer based on the continuous model in order to control the trajectory of the underactuated ship. The controller was built based on the optimal control combined with the linearizing technique of each nonlinear model section. Disturbances from the environment and uncertainty components in the model were estimated and compensated for by the estimator. The simulation results show that although the control object has undefined components and the control signals are bound, the quality of the entire control system is still very good. The response values follow the set values, with tiny error. The success of this research is the basis for the authors to apply it to actual ships in further studies.