Fin-Rudder Joint Control Based on Improved Linear-Quadratic-Regulator Algorithm

Navigation accidents and disasters frequently occur when ships sail at sea owing to extreme weather, wind, and wave conditions. The disturbance of wind and waves affects the stability of the ship’s course and makes the ship roll violently. Ships are usually equipped with an autopilot to control the course and a fin stabilizer to reduce rolling during navigation and improve stability and safety. Fin-rudder joint control system considers the coupling effect of the ship’s horizontal plane motion, thereby improving the performance of the rudder and the fin stabilizer. This paper presents an improved linear-quadratic-regulator control algorithm. A rate control law with no static error is proposed based on the traditional linear-quadratic-regulator to eliminate the static error of the state vector and achieve a better control effect. Additionally, a closed-loop state observer is used to estimate the system’s state vector, and a dynamic corrector is designed to reduce rolling and heading angle deviation caused by sea wave interference. The simulation results show that the designed fin-rudder joint controller with the improved linear-quadratic-regulator algorithm can achieve more than 80% roll reduction effect at level 3 and 5 sea states, and has better course keeping ability compared with the rudder control.


I. INTRODUCTION
The rapid development of the shipping industry has contributed to the frequent marine accidents worldwide. The requirements for ship sailing control are also rising to reduce marine accidents [1]. When a ship is sailing at sea, the rolling movement caused by wind, waves, and other environmental disturbances reduces the ship's stability and compromises navigational safety [2]. Similarly, under the interference of sea waves, a ship produces a sway of heading, causing ship deviation the heading and possibly collision accidents [3]. Therefore, controlling a ship's heading and reducing its rolling motion is of great significance to ensure the stability of the ship's navigation and reduce maritime accidents [4].
Over the years, the researchers from various countries have designed various anti-rolling devices such as fin stabilizers, antirocking tank and bilge keels to ensure the stability and The associate editor coordinating the review of this manuscript and approving it for publication was Okyay Kaynak . safety of ships [5]. The fin stabilizer is the most used antirolling device with good effect. By controlling the movement of the fin, an anti-rolling moment is generated to offset the rolling moment of the wave acting on the ship [6], [7]. The anti-rolling moment generated by the fin is proportional to the square of the speed of the ship. Therefore, the anti-rolling effect of the fin stabilizer is constrained by the speed of the ship. The performance of the fin stabilizer is greatly reduced when the rate is very low [8], [9]. In 1970, Taggart [10] showed that the autopilot controls the heading motion via steering and causes the roll angle to change. Taggart believed that manipulating the autopilot could reduce the rolling motion caused by the disturbance of the waves. This method is called rudder roll reduction (RRS). Rudder antiroll is economically advantageous because it only requires adding an antiroll control link to the steering gear; however, its disadvantage is that it quickens the wear of the steering gear [11]. Carley and Duberley [12] first proposed the joint fin-rudder control in 1972 to address the limitations VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ of autopilot and stabilizer fin. The joint fin-rudder control takes advantage of the fact that steering can simultaneously produce roll and heading motion. The autopilot and fin stabilizers are combined to conduct comprehensive control of ship motion, with the fin stabilizer playing the main role in roll reduction and the autopilot playing an auxiliary role while maintaining the course by considering the coupling between heading and rolling [13]. Hongzhang [14] established a mathematical model of the fin-rudder joint control system with integral signals. They further designed an optimal controller with an integrator using the linear-quadratic-gaussian (LQG) control theory, which achieved a better control effect. Liang et al. [15] designed a fin-rudder joint roll reduction system with H ∞ robust control method and proportionalintegral-derivative (PID) autopilot in heading control. Their simulation results showed that the independent heading control and roll reduction achieved good results. Li et al. [16] designed a sliding mode controller based on input and output feedback linearization and simulated rolling and heading joint control under different sea conditions. Their simulation results showed the controller's robustness and better roll stability while maintaining heading control accuracy. Liang et al. [17] designed a distributed model predictive controller for fins and rudder joint control. Their simulation results show that the constrained control ensures the control performance of ships in harsh sea conditions and improves roll stability on the premise of maintaining heading stability. The commonly used controllers highlighted above have some advantages and disadvantages: • H ∞ robust controller: nonlinear controller with strong robustness in which the system generally works in a nonoptimal state, so the steady-state accuracy of the system is low.
• Sliding model controller: nonlinear controller with strong robustness and insensitivity to disturbance and model error in which a ''chattering'' phenomenon occurs when the system reaches equilibrium.
• PID controller: the most widely used in the engineering field at present. It does not need to know the model of the system, and only adjusts according to the deviation between the expectation and the status quo, so that it can reach the desired linear controller. Compared with PID, LQR can take into account multiple performance indicators.
• MPC controller: it is good at dealing with MIMO systems and prediction and rolling optimization characteristics but requires heavy calculations and sacrifices certain optimality compared with the linear-quadratic-regulator (LQR). Compared with MPC, LQR has faster response and higher tracking efficiency when the system is not disturbed [18]. Among these common control algorithms, LQR has been selected as the most effective, simple application and popular controller. It is a well-known systematic design technique for optimal control of linear systems that can minimize a quadratic cost function establishing a reasonable balance between the reduction of responses and required control forces [19], [20], [21].
This study designs a rate control law with no static error based on the optimal control solution obtained from traditional LQR. The design of the rate control law with no static error ensures the basic law of optimality and realizes the system state vector of no static error. A dynamic corrector is designed to reduce the influence of wave disturbance on heading angle and roll angle.
The rest of this paper is organized as follows: The building of the ship and actuator model is described in section II. The control method and controller design are introduced in section III. Section IV shows the simulation results and data to validate the performance of the improved control algorithm. Finally, the conclusion is presented in section V.

II. MATHEMATICAL MODEL A. MATHEMATICAL MODEL OF SHIP
This study uses three different coordinate systems to describe the motion equations of ships ( Fig. 1). O − x e y e z e Earth Centered Earth Fixed coordinate system. O − x n y n z n North-East-Down (NED) coordinate system.
The ship's motion equation is derived from the Newtonian theory of momentum and moment of momentum, described by the body's fixed coordinate system to calculate the force and moment acting on the ship. The origin of the attached coordinate system is set at the ship's centroid, and the MMG model is established referring to the study by Yasukawa and Yoshimura [22]. Nonlinear differential equations describing the ship's heading and roll motion are as follows: where m is the ship's mass, m x , m y are the additional mass of the hull longitudinal and transverse, h is the metacentric height of the ship, z k is the length of the inertia moment arm, u, v, p, r are the ship's surge velocity, sway velocity, roll angular velocity, and heading angular velocity, J x , J z are the projection of the hull's additional moment of inertia on the x-axis and z-axis of the body-fixed coordinate system, X , Y , K , N are the projection of the forces and moments acting on the ship on the axes of the body-fixed coordinate system. The following formula determines these projections: where The nonlinear mathematical model accurately describes the ship's motion and is suitable for testing the controller's performance, but it is difficult to use for controller design [23]. Therefore, there is a need to linearize the mathematical model of the ship's motion to design the controller. According to Blanke and Christensen [24], taking the ship's surge velocity as a constant value, the motion of [v, r, ψ, p, θ] near the system equilibrium operating point, the linear mathematical model of the ship's motion is summarized as the following: The above state space model can be simplified as: T is the control vector, and [δ v , δ b ] are rudder and fin angles respectively. f = f y , M Z , M X T is the external interference vector. A is the state matrix, determined by the sailing speed, mass, moment, and hydrodynamic coefficient B is the input matrix, determined by the sailing speed, the position of the rudder and fins, C is the output matrix.
H is the external disturbance matrix determined by the external disturbance wave characteristics and the sailing speed.

B. ACTUATOR MODEL
The dynamic characteristics of the actuator are closely related to the controller's design. The dynamic characteristics of its mathematical model should be consistent with those of the actual physical device [25], [26].
• Maximum rudder/fin angular rate limit: is the rudder/fin deflection angle, c = [δ vc , δ bc ] is the upper limit of rudder/fin deflection angle ( for vertical rudder δ vc = 30 • , for stabilizer fin δ bc = 35 is the velocity of rudder/fin deflection,˙ c = [δ vc ,δ bc ] is the upper limit of rudder/fin deflection angular velocity (for vertical rudderδ vc = 3 • /s, for fin stabilizerδ bc = 35 • /s). The mathematical model of actuator is shown in Fig. 2.

C. WAVE DISTURBANCE MODEL
This paper adopts rational spectrum modeling to simulate wave interference [27]. S γ (ω) is the power spectral density function of wave inclination χ (t). The power spectral density function S γ (ω) and its corresponding correlation function K γ (τ ) are determined by equation (6): where D r is the discrete difference of the longitudinal distance of the wave. α is the damping coefficient and βis the frequency angle of the correlation function. The spectrum signal in the form of equation (6) is formed by filtering single white noise through a wave-forming filter in equation (7): VOLUME 10, 2022 The highest frequencies of the approximate spectrum and h 2 3 % (3 % meaningful wave height) in equation (7) are determined in Table 1.

III. CONTROLLER DESIGN
This section introduces the composition and design of the controller. The state observer can reconstruct the system's state vector, and the LQR can obtain the optimal solution to the governing equation. This paper improves the traditional LQR and designs a dynamic corrector to reduce the ship roll angle and the heading angle deviation caused by wave disturbance to achieve a better control effect.

A. STATE OBSERVER
The system's state vector is difficult to obtain directly, but the state vector is required for actual control [28]. Therefore, a state observer (Fig. 3) can be designed to obtain the estimated value of the system's state vector via input and output. When the external disturbance is not considered, the state space formal motion equation of the ship can be expressed as follows: The closed-loop state observer equation is designed as follows:ẋ wherex is an estimate of the state vector x, G is the observation coefficient matrix.
If we introduce the deviation vector ε = x −x, then according to equations (8) and (9), we can get: By configuring g 1 ∼ g 5 in the matrix (A − GC) so that all eigenvalues have negative real parts, then t → ∞, ε = 0, and the estimated vectorx is approximately equal to the state vector x. When assigning the characteristic values of (A − GC) by assigning poles, it is important to consider the rate ofx converging to x and the passband of the state observer so that it has a certain anti-interference ability.

B. RATE CONTROL LAW WITH NO STATIC ERROR
Considering the static disturbance of the closed-loop system, the control law obtained using classical LQR cannot guarantee the free static error of the closed-loop system. This paper proposes a rate control law with no static error based on the optimal control law obtained using LQR [29], [30]. First, the state quantity of the above motion state space model is extended by introducing the input quantity : The equation of state of the extended system is: wherex = [v, r, ψ, p, θ, δ v , δ b ] T ,Ã,B are the matrix augmented from A, B. Second, the traditional LQR is designed, and the indicator functional is: where the weighting matrices Q and R are positive definite symmetric matrices and u LQR is the input vector. The obtained u LQR minimizes the functional by solving the algebraic Riccati equation.
whereÃ,B, Q, R are constant matrices, P is the symmetric positive definite solution of algebraic Riccati equation. When t → ∞, the system can be completely controlled and observed, the optimal control is u * LQR .
The control law structure obtained based on the LQR is shown as follows: where K = −R −1B P, K x , K are the components of K . Satisfying the following equations is a necessary and sufficient condition for a linear system to have no static error: F fp (s) = 0, where F fp (s) is the transfer matrix from input f to output p. When the external disturbance f is not considered, the state space equation can be written asẋ = Ax + B . The state vectorxcan be written as x = x a x p T , x a andx p are components of the state vector. The following methods are adopted to ensure the nonstatic error of the closed-loop system: where p is an adjustable variable, and an auxiliary matrix L is introduced to achieve its statically free property. Since the matrix L p is a nonsingular matrix, we can get: At this time, the state equation of ship motion can be written asẋ = A a x a + A p x p + B ; substituting equation (18) into it, we can get: The control law can be transformed by introducing auxiliary vectors γ = x a T and S = A a − A p L −1 p L a B : where The resulting control law u * LQR = µẋ + vy is called the rate control law with no static error, µ is the member of the matrix MS −1 , ν is the member of the matrix N . The above control law not only maintains the optimality of the basic law but also guarantees the nonstatic error in the system state vector. When the ship's speed u = 12.5m/s:

C. DYNAMIC CORRECTOR
When the ship is disturbed by the waves during the navigation, it will produce sway motions in all directions. The purpose of designing a dynamic corrector is to improve the stability of the heading and roll under the disturbance of waves. The transfer matrix of the dynamic corrector should be selected to minimize the heading angle ψ and roll angle θ deviation caused by wave disturbance at each moment. The mathematical model of the dynamic corrector is: where ζ = y − Cx is the corrector input vector, ξ is the corrector output vector. The transfer matrix F (s) can be obtained by the following method. The mathematical model of Fig. 4 can be described as follows: where K 0 = µ (A − GC) , K 1 = µB, v 0 = µG + v, its state space model can be obtained as: The listed mathematical model can be transformed into frequency domain form by means of input and output equations: where T 11 (s) , T 12 (s) , T 21 (s) , T 22 (s) are the members of the transfer matrix T (s): By combining equations (21) and (24), and removing the internal variables ξ and ζ , we can obtain the transfer matrix F y (s) from input y to output .
Similarily F yf (s) is the transfer function from the input external disturbance to the output y. We can derive the transfer function F yf (s) from the transfer function F y (s): The problem of optimal suppression of the influence of input on the output is equivalent to the minimization of some VOLUME 10, 2022 matrix norm of the transfer function. The deviation values of ψ and θ caused by the external disturbance of the ocean wave are minimized by adjusting the controllable matrix F (s) in the transfer function F yf (s).
where y = [ψ, θ] T , f = f y , M Z , M X T . Define the functional: where δ 0 is the control intensity limit, defined by a given normal number. The optimal solution is obtained by the following method: The F (s) obtained at this time is the optimal transfer matrix of the dynamic corrector.

D. CONTROLLER
The block diagram of the controller is shown in the dotted box in Fig. 4, composed of a state observer, dynamic corrector, and rate control law with no static error.
State observer equation: Dynamic corrector equation: Rate control law with no static error: where u v , u b is the rudder/fin control law, µ 1 , µ 2 are members of the matrix MS −1 , ν 11 , v 12 , v 22 are members of the matrix N , ξ is the output of the dynamic corrector.

A. SIMULATION ENVIRONMENT
In this paper, a ship with a length of 134 m is selected for simulation. The main parameters of the ship are shown in Table 2. In the following simulation, the speed of the ship u = 12.5 m/s and wave angle ψ ω = 45 • . Fig. 5 shows the MATLAB simulation environment built to simulate the control system, test the roll and heading stability of the ship, and verify the control performance of the improved control algorithm.  The initialization module is used to initialize the data before the simulation starts. The parameter selection module is used to configure the parameters of the controller. The external interference module is composed of a wave interference mathematical model. The actuator comprises a vertical rudder and a fin stabilizer transmission model. The controller consists of a closed-loop state observer, dynamic corrector, and rate control law with no static error. The visualization module monitors the system state variables in real time.

B. VERIFY THE CONTROL LAW OF ASTAIC
By applying static interference f y = 5, M x = 0, M z = 800 to ship to verify the validity of the rate control law with no static error. Fig. 6 shows the heading angle when the step response is 15 under three control methods. Table 3 shows output of the three control methods at the end of the response.   The simulation results show that compared with PID, the improved LQR has similar static error elimination effect, can reach the stable value faster with less overshoot. Compared with the traditional LQR static error elimination effect is better, there is little difference in overshoot. In addition, the PID algorithm has poor anti-interference ability and is suitable for SISO system. Comprehensive consideration, the improved LQR is more suitable for the design of the fin-rudder joint controller.

C. PERFORMANCE OF THE DYNAMIC CORRECTOR
A comparative experiment is performed by setting the dynamic corrector switch in the controller to analyze the effect of adding a dynamic corrector to the improved control law. Figs. 7-10 show the ship roll angle and course stability under class 3 and class 5 sea conditions, respectively. Table 4 lists the standard deviations of ship roll and heading    angles with dynamic corrector (on/off) at level sea 3 and 5 states.
In the Table 4, the standard deviation σ θ and σ ψ are used to measure the error of the roll angle and the heading angle VOLUME 10, 2022   of the ship when the ship is disturbed. The simulation results show that the designed dynamic corrector effectively reduces the influence of wave disturbance on heading angle and roll angle.

D. ROLL STABILITY PERFORMANCE
To verify the roll stability performance of the fin-rudder joint controller, comparative experiments of fin-rudder joint, fin, and rudder roll reductions were conducted at levels 3 and 5 sea states .
When the ship is not connected to the controller at level 3 and 5 sea states, the standard deviations of roll Angle are σ θ 3 = 3.11, σ θ 5 = 8.34. According to the simulation results, the fin-rudder joint control was found to have a better antiroll     effect than the single fin or rudder control, and can achieve more than 80% roll reduction effect at level 3 and 5 sea states.

E. HEADING CONTROL PERFORMANCE
The fin-rudder joint controller ensures the antiroll effect and maintains the heading. To verify the heading control performance of the fin-rudder joint controller, comparative experiments of joint fin-rudder control and rudder control were conducted at level 3 and 5 sea states respectively (Figs. 17 and 18).   The above experimental results show that the designed fin-rudder joint controller has better course keeping ability compared with the rudder control.

V. CONCLUSION
This paper proposes a rate control with no static error based on the traditional LQR by comparing it with LQR and PID control. The dynamic corrector is designed and verified to effectively filter the influence of wave disturbance on the roll angle and heading angle. Finally, it is demonstrated that the designed fin-rudder controller effectively reduces rolling and improves ship heading stability when disturbed by waves.