The optimal control system of the ship based on the linear quadratic regular algorithm

Received Feb 16, 2019 Revised Mar 24 2020 Accepted Apr 4, 2020 In this paper, the authors propose an optimal controller for the ship motion. Firstly, the model and dynamic equations of the ship motion are presented. Basing on the motion equations of ship model, the authors build the linear quadratic regular algorithm-based control system of ship motion to minimize difference between the response coordinate and the setting-coordinate. The task of the controller is controlling the ship coordinate to coincide with the desired coordinate. The ship model and controller are built to investigate the system quality through Matlab-Simulink software. The results show the high quality of the control system. The coordinate of a ship always follows the desired coordinate with very small errors.


INTRODUCTION
Transport by ship has outstanding advantages such as low shipping cost, high carrying capacity, wide transport range, etc. Maritime transport plays an increasingly important role, it accounts for 80% of all goods shipped worldwide. Therefore, it is very important to improve the maritime safety the transport efficiency by ship. However, the equation of ship model is a complex so it is difficult to control the ship motion with a high-quality. The order of ship motion differential equation is high. The ship-dynamic characteristics have properties such as the large time constant, the high-vibration and the small stabilization margin [1]. Thus, the ship motion control has been a challenge of researchers.
The traditional controller commonly used in ship motion control is the proportional integral derivative (PID) controller [2][3][4]. This is a controller with a simple structure, but the quality of the control system is not high. Recently, the development of informatics and electronic technology let the scientist to set up the advanced control theory for ship, such as fuzzy control [5][6][7], the model predictive control [8][9][10], the sliding mode control [11,12], the backstepping technique [13,14], the adaptive control [15,16], etc. The research [17] has proposed the control system of the ship in order for the motion trajectory to follow with the desired trajectory based on the backstepping technique. However, the trajectory is only straight and the speed is only positive and constant. To overcome the above disadvantage, the research [18] has built the controller of trajectory ship based on the backstepping technique and Lyapunov function. The research [19] has provided a linear-algebra controller that is built by linearizing of nonlinear model.
The disadvantage of the above-mentioned control methods are the complex process of calculating, the complex control algorithms, high harmonic of control signals, causing the lifespan of the actuator and equipment reduces. To overcome all the limitations of the previous method, in this study, the authors propose The control algorithm is simple and the quality is high [23], the trajectory of a ship always follows the desired trajectory with very small errors. The remains of the paper are as follows: Section 2 presents the model equations of ship motion. The Section 3 presents linear quadratic regular algorithm-based controller for ship motion. Section 4 presents the results and analysis. Finally, the conclusions are presented in section 5.

THE MODEL OF SHIP
The ship moving components on the sea surface are shown in Figure 1. Those components are the rotary motion (r), the straight slide motion (u) and horizontal slide motion (v). The ignored components are the yaw rotary motion (ω = 0), roll rotary motion (p = 0) and pitch rotary motion (q = 0).
In the three-degrees-of-freedom space, the ship motion is described through the position vector   components( , , ). This kind of ship has full actuators. The straight-slide force is controlled by the main propeller, the horizontal slide force is controlled by the horizontal propeller on both sides, and the ship direction is controlled by the rudder. This kind is usually applied to the ship for marine-researching, specialtask and serving.
If there is no horizontal slide force means that = 0, it is named underactuated ship. There are only two actuators in this ship: the rudder for controlling the direction and the main propeller for controlling the straight-force. This kind is usually applied to the ships for the long transport journey, container and cargo.
In this paper, the authors perform the control of a fully-actuated ship. Considering (1), setting: 1 = , 2 = , = , and = col( 1 , 2 ). We thus have the following: Then: where: The (3) is the state equation of the ship.

THE LQR CONTROLLER FOR SHIP MOTION
The state equation of ship are as following: is the state vector of response signal is the state vector of desired signal. Named is the error between and . The state (4) is rewritten as follows: where: The requirement of the control system is to find the control signal ( ) = = [ ] in order for the control object from the initial state The optimal experiment is the solution of the following equations: The state equation: The equilibrium equation: The optimal condition: From (10), we have: Replace ( ) into (8), we have: Combining (12) and (9) we have: Solving the above equations, we have the optimal control signal: * ( ) = − ( ). ( ) where Because of the infinite time = ∞, the cost function is as follows:

RESULTS AND DISCUSSIONS
The authors built the optimal LQR control system for ships on Matlab-Simulink software. The block diagram of the control system is shown in Figure 2. The parameters of the ship are shown in Table 1.  The quality of control system and the goal depend on the matrices , . The authors set the optimal controller with the weight matrices are as follows: Running the entire control system, we have the results presented in Figure 3 and Figure 4. Figure 3 shows the ability to follow the desired trajectory of the ship. The simulation results show that the trajectory of the ship always follows the desired trajectory very well: the motion trajectory of the ship almost coincides with the desired trajectory. The trajectory errors of the ship motion in the x, y directions are shown in Figure 4. The results show that the orbit error in each direction is very small, less than 0.5m.

CONCLUSION
In this study, the author has succeeded in building the optimal controller LQR for the ship motion. The authors presented the dynamics equation of ship motion as a basis for setting up the algorithm of the optimal controller for the trajectory control. The simulation results show that although the algorithm of the proposed controller is very simple, the quality of the control system is very high. This is a good basis for applying the control algorithm to ship motion for improving the maritime safety and transport efficiency.