Model Predictive Control of a Shipborne Hydraulic Parallel Stabilized Platform Based on Ship Motion Prediction

Shipborne stabilized platform is an important equipment to ensure the stability of shipborne equipment relative to inertial coordinate system. This paper presents a model predictive control strategy based on ship motion prediction (MPMPC) for ship stabilization platform. Firstly, the ship motion is simulated, and the autoregressive prediction model (AR model) is used to predict the ship motion. Then the kinematics analysis of the Shipborne stabilized platform is carried out and the mathematical model of the hydraulic drive unit (HDU) of the stable platform is established. Then the predicted ship motion is combined with model predictive control (MPC). The predicted trajectory of HDU can be obtained by the kinematics calculation of predicted ship motion. One part of the predicted trajectory is used to compensate the time delay of HDU, and the other part is used as the reference trajectory of the rolling optimization of MPC, instead of the reference trajectory using the measured ship motion at the current moment in traditional model predictive control. Compared with the reference trajectory using the measured ship motion at the current moment, the predicted trajectory of AR model can reflect the future state of the system better, and a better control sequence will be obtained by minimizing the objective function. Finally, the simulation and experiment show that the MPMPC has higher tracking accuracy than traditional MPC.


I. INTRODUCTION
In the actual marine environment, due to the action of wave, current, wind and other environmental factors, a ship constantly generates the movement of six degrees of freedom including surge, sway, heave, roll, pitch and yaw, and the motion of each degree of freedom has certain regularity and prediction [1]. Ship motion prediction is an old subject and its prediction methods are various. The time series analysis method is an effective way to realize the extreme short-term prediction of ship motion, and modeling and predicting can be carried out based on the historical data of ship movement. Many scholars have studied ship motion prediction based on AR model [2], [3], neural network [4], [5], grey theory [6] and other methods. AR model has been widely used in the The associate editor coordinating the review of this manuscript and approving it for publication was Bin Xu. very short-term pose prediction due to its simple algorithm, good real-time performance and strong adaptability.
The ship stabilization platform is a kind of equipment which can isolate the disturbance of ships and ensure the stability of sea crew, shipborne radar antenna and shipborne artillery relative to inertial coordinate system. The ship stabilized platform is divided into series stabilized platform and parallel stabilized platform. Series stabilized platform is developed earlier and its application was relatively mature [7], [8]. Parallel stable platform was developed relatively later. However, due to the large stiffness, high bearing capacity and strong stability of parallel mechanism, it is an important research direction of stabilized platform [9], [10]. For a large load parallel stabilized platform, hydraulic servo drive has become an ideal driving mode for its high power mass ratio and high frequency response [11], [12].
At present, there has been a lot of research on the control of hydraulic parallel platform. Yang et al. [13] proposed a novel model-based controller for 6-DOF hydraulic parallel platform considering the nonlinear characteristic of hydraulic systems, the control performance improved and steady state errors eliminated. Pi and Wang [14] proposed a sliding mode control with discontinuous projection-based adaptation laws for a 6-DOF hydraulic platform with uncertain load disturbances to improve the tracking performance. Chen and Fu [15] proposed a backstepping control strategy to control the 6-DOF hydraulic parallel platform while incorporating an observer-based forward kinematics solver, and the friction compensation is applied to improve the control performance.
Then a sliding mode control with discontinuous projectionbased adaptation laws is proposed to improve the tracking performance of the parallel robot manipulator. Simulations and experiments with typical desired trajectory are presented, and the results show that good tracking performance is achieved in the presence of uncertain load disturbances. But the hydraulic drive unit has high time delay and uncertainty, which is affected by the traditional controller.
Model predictive control (MPC) is an optimal control method developed from the field of industrial process in the 1970s, which includes prediction model, rolling optimization and feedback correction. System modeling of MPC has low requirements, rolling optimization strategy can produce good dynamic control effect, and feedback correction is helpful to improve the robustness of the control system, so MPC has been widely studied and 'applied [16]. At each sampling moment, a finite time open-loop optimization problem is solved online based on the feedback information at current moment, and the first element of the control sequence is applied to the controlled object. At the next sampling time, repeat the above process, using the new feedback information as the initial condition to predict the future states of the system, and re-optimize the solution. MPC was firstly applied to process control. With the development of computer technology, MPC is gradually applied to servo control system. At present, some scholars applied state feedback MPC to hydraulic servo system. Gu et al. [17] proposed an output feedback MPC with the integration of an extended state observer for hydraulic drive unit, and the controller had strong robustness against various model uncertainties. Marusak and Kuntanapreeda [18] designed a MPC controller for force control of a valve controlled non-symmetry hydraulic cylinder system, considering the constraints on input and output variables. And experimental result showed that the MPC controller has better tracking performance than conventional P and PI controllers. Yuan et al. [19], [20] designed a MPC and PIC controller for accurate force tracking of an electro-hydraulic servo system (EHSS) and experimental result showed that the MPC-PIC controller has better robustness and dynamic and static properties than MPC and PIC controllers. Essa et al. [21] studied the application of MPC for high force control precision in a real industrial EHSS, and the results showed that the performance of MPC controller is considerably improved compared with the traditional and fractional order controllers. Tao et al. [22] presented a third order state-space model with input and output constraints to depict the dynamic behavior of the unidirectional proportional pump-controlled asymmetric cylinder systems, and designed model predictive controller and realized the high precision position control under multiple constraints effectively. Lin et al. [23] realized the precise control of die forging hydraulic press by the combination of BP neural network and MPC. Wang et al. [24] applied the MPC to the active suspension system with electrohydraulic actuators, and experiment showed that the ride comfort and handling stability of the active suspension system have been significantly improved. Peng et al. [25] proposed a MPC strategy based on neurodynamic optimization to control a servo motor driven constant pump hydraulic system in the injection molding process and simulation results showed that this control method has good control precision and quick response. Zeng et al. [26] investigated a nonlinear control scheme based on MPC for a hydraulic hub-motor auxiliary system. Through MATLAB/Simulink and AMESim co-simulation, the superiority of MPC over PID controller and the feed forward controller was verified.
At present, few scholars apply the predictability of ship motion to the controller of shipborne stabilized platform. Therefore, a shipborne stabilized platform MPC strategy based on ship motion prediction (MPMPC) is proposed in this paper. The predicted ship motion is combined with MPC. The predicted trajectory of HDU can be obtained by the kinematics calculation of predicted ship motion. One part of the predicted trajectory of AR model is used to compensate the time delay of HDU, and the other part is used as the reference trajectory of the rolling optimization of MPC, instead of the reference trajectory using the measured ship motion at the current moment in traditional MPC. Compared with the reference trajectory using the measured ship motion at the current moment, the predicted trajectory of AR model can reflect the future state of the system better, and a better control sequence will be obtained by minimizing the objective function.
In this paper, the ship motion is simulated, and the AR model is used to predict the ship motion, firstly. Then the kinematics analysis of the Shipborne stabilized platform is carried out and the mathematical model of the hydraulic drive unit of the stable platform is established. Then the predicted ship motion is combined with MPC. Finally, the simulation and experiment show that the MPMPC has higher tracking accuracy than traditional MPC.

II. SHIP MOTION SIMULATION AND PREDICTION A. SHIP MOTION SIMULATION
Ship motion simulation is the basis of ship motion prediction and shipborne stabilized platform. In this paper, the frequency domain method is used to simulate ship movement. Firstly, the power spectrum of sea wave under different sea conditions is calculated, and then the response amplitude operator (RAO) and phase angle of the hull are calculated.   The ship motion is obtained by multiplying RAO and the power spectrum of sea wave.
There are many formulas to describe the power spectrum of sea wave, such as BTTP, PM, ISSC and JONSWAP wave spectrums. The ITTC dual-parameter wave spectrum is adopted in this paper, which is a derivative form of PM wave spectrum. It takes the significant wave height and the characteristic period of wave as spectral parameters, and is the standard wave spectrum recommended by the 11th International Towing Tank Conference. The ITTC dual-parameter spectrum can be expressed as follows: where: H s is the significant wave height, T z is the characteristic period, ω is the wave angular frequency. The RAO can be obtained by pool model experiment or computational fluid dynamics (CFD) computer program. ANSYS AQWA software is used to calculate RAO in this paper and the hull parameters are shown in TABLE 1 [27].
The angle between the orientation of the vessel and the direction of wave is set as 165 • , and the RAOs of six degrees of freedom can be simulated, among which the roll and pitch RAOs are shown in FIGURE 1.
When it's a class four wave, H s = 2.1m, T z = 5.4s. The ship motions of six degrees of freedom are obtained by multiplying RAO and wave spectrum.

B. SHIP MOTION PREDICTION
During the operation of the stabilized platform, the ship motion is obtained by a pose sensor, and there is a random   noise signal in the measurement signal. Therefore, the measurement signal needs to be de-noised first, and then the prediction model is driven by the de-noised signal to obtain the predicted signal.
Taking roll motion as an example, a noise signal of ±0.01 • is add to the simulated ship motion, and then the moving average filter is used to reduce the noise signal. The filtering effect of the first 0.2 seconds of roll motion is shown in FIGURE 4, and the filtered data is smooth enough to be used for prediction.
The predicted trajectory R p of HDU is obtained by kinematics calculation of predicted ship motion. One part of the predicted trajectory is used to compensate the delay trajectory R d of HDU, and the other part is used as the reference The sampling period of the time series is 10ms, and the time delay of HDU T d = 60ms (see Section III for details), so the delay step number N d is 6. The prediction horizon N p for the reference trajectory is 10 (see Section V for details). Therefore, the step number of prediction is N d + N p = 16, which belongs to extreme short-term prediction. Therefore, AR model with simple algorithm, and good real-time performance and strong self-adaptability can be used for prediction with high accuracy. AR prediction model can be expressed as follows: where X (t) is the time series of prediction, p is the order of the model, ϕ i is the coefficient of the model, N is the number of original time series. In this paper, the Bayesian Information Criterion (BIC) is used to determine the order p, and the model coefficient ϕ i is estimated by Recursive Least Square (RLS). Take roll motion as an example, when N is 50 and the step number of prediction is 16. The prediction error of AR model is shown in FIGURE 5. According to formula (3), the prediction error of roll motion is calculated, which is 0.12%. The prediction accuracy is much higher than the tracking accuracy of the ordinary control system. The AR model is programmed by LabVIEW software and runs on NI CompactRIO-9033 controller, and the operation time is 0.1ms which is far less than the sampling time of 10.0ms. Therefore, the ship motion predicted by the AR model can be used in the control system.
where: µ is the prediction error, τ (t) is the actual value at time t,τ (t) is the predicted value at time t, t 0 is the start time of the prediction, and t s is the end time of the prediction.

III. PARALLEL STABILIZED PLATFORM
A. KINEMATICS ANALYSIS The coordinate system of shipborne stabilized platform is shown in FIGURE 6. The coordinate system {g} is the inertial coordinate system, fixed on the land. The coordinate system {e} is fixed in the center of the lower platform of the stabilized platform, and the lower platform of the stabilized platform is fixed on the ship. The coordinate system {p} is fixed at the center of the upper platform of the stabilized platform.
When the coordinate system {e} moves relative to the inertial coordinate system {g}, the coordinate system {p} is stable relative to the inertial coordinate system {g} through motion compensation of the stabilize platform. The orientation of the coordinate system {p} relative to the coordinate system {e} is where e p R is the rotation matrix of coordinate system {p} relative to {e}; g p R is the rotation matrix of coordinate system {p} relative to {g}, and is a constant value; g e R is the rotation matrix of coordinate system {e} relative to {g}, and can be obtained by inertial measurement unit.
The position of the coordinate system {p} relative to the coordinate system {e} is where e p is the position of coordinate system {p} relative to {e}, g p is the position of the coordinate system {p} relative to {g}, and is a constant value; g e is the position of the coordinate system {e} relative to {g}, and can be obtained by inertial measurement unit. The structure diagram of Stewart parallel stabilized platform is shown in FIGURE 7.
The length of HDU can be solved as follows: where l i is the length of the ith HDU; p b i is the coordinate of B i in the coordinate system {p}; e a i is the coordinate of A i in the coordinate system {e}.

B. HYDRAULIC DRIVE UNIT MODELING
Hydraulic driving unit (HDU) includes proportional valve system and valve controlled asymmetric hydraulic cylinder VOLUME 8, 2020  system. The proportional valve system is simplified as a proportional component, and the formula is as follows where u is the proportional valve input; K v is the proportional valve gain; x v is the proportional spool displacement. Without considering elastic load and external interference, the schematic diagram of valve controlled asymmetric hydraulic cylinder system is shown in FIGURE 8.
The valve controlled asymmetric hydraulic cylinder is a nonlinear system, and in order to meet the general application and calculation convenience of engineering, its linear model is generally established. The natural frequency and damping of asymmetric hydraulic cylinder are different in the two directions, so the linear mathematical model is different in the two directions. However, in engineering applications, the mathematical model in one direction or the integrated mathematical model in two directions is generally taken as the mathematical model [28]. The mathematical model when the piston rod of the hydraulic cylinder extends is shown in formula (8), and the variables are shown in TABLE 2.
where q L = (q 1 + q 2 )/2; p L = p 1 -n·p 2 ; n = A 2 /A 1.  The transfer function of valve controlled asymmetric hydraulic cylinder is obtained by Laplace transformation of equation (8), as follows: where ω h is the hydraulic natural frequency, ζ h is the hydraulic damping. In the hydraulic system, there are some nonlinearity factors such as oil compression characteristics and valve pressure flow characteristics. In addition, there are some time-varying parameters such as valve flow coefficient and damping coefficient, which make it difficult to determine the model parameters. Therefore, it is necessary to identify the model parameters of valve controlled asymmetric hydraulic cylinder system. The relevant parameters of identification experiment are shown in TABLE 3.
The white noise sequence is selected as the input signal, and the response of the HDU system to the input signal is obtained by delaying the input signal by 0.3s, as shown in FIGURE 9.
The model parameter is computed based on system identification toolbox in Matlab. The identification result is shown in formula (10). The displacement of the HDU of experiment and the identification model are shown in FIGURE 10. The identification error was 0.1%. According to formula (11), where: ν is the identification error, η (t) is the experiment displacement at time t,η (t) is the identification model displacement at time t, t 0 is the start time of the identification, and t s is the end time of the identification. Time-delay parameter identification is carried out for HDU system. When a step signal is input to the HUD system, the system starts to respond after 6 sampling periods, as shown in FIGURE 11. The sampling cycle is 10ms, namely, the delay time T d = 60ms.

IV. MPC BASED ON MOTION PREDICTION A. TRADITIONAL MPC
The MPC of HDU based on state feedback is shown in FIGURE 12, which mainly includes prediction model, rolling optimization and state estimation and feedback correction.
The prediction model is designed for rolling optimization and can predict the future output of the controlled object. The prediction model is generally in the form of discrete equation of state, so the formula (10) can be transformed into  the following formula In order to eliminate the error between the prediction model and the actual model, the augmented state space model is obtained by introducing integral behavior, as follows (13) where

x(k+1) =Ax(k) + B u(k) y(k) = Cx(k)
For the single-input and single-output system, the state equations of prediction horizon N p and control horizon N c can be obtained through formula (11) where Y = y(k + 1|k)y(k + 2|k) · · · y(k + N p |k) T , The goal of HDU is to make the output track the reference signal with high precision and to control the input current signal to change not too fast. Therefore, set the target function as follows where R = R c r (k), R c = N p [11 · · · 1] T , Q is the weight matrix. The optimal control sequence can be obtained by solving the minimum value of objective function J , as follows At each sampling moment, the optimal control sequence U is obtained by minimizing J , and the first element of U is applied to the controlled object, as shown in FIGURE 13. At the next sampling time, repeat the above process.
State feedback can compensate for the influence of uncertain factors on the system. But, in reality, with most applications, not all state variables are measured (such as the speed of the hydraulic cylinder). One approach is to estimate the state variable by a state observer [29]. The pole assignment method can be used to estimate the state of the closed loop system, and the stability and quickly dynamic response speed of the closed-loop system can be realized. The state estimation formula of formula (13) is as followŝ (17) where K ob is the observer gain vector, and it can be obtained by MATLAB software 'place' command.
The stability analysis of closed-loop MPC system based on state observer is as follows: The optimal control sequence U is obtained as The first element of U is as follows where K y is his first element of T + Q −1 T R c , K mpc is his first element of T + Q −1 T F. Substitute formula (19) into (13) to obtain Combination of formula (13) with (17) leads to: Substitute formula (22) into (20) to obtain The closed-loop state equation of the system can be obtained from equations (21) and (23) x(k+1) (24) According to formula (24), it can be obtained that the eigenvalues of the closed-loop MPC system consists of predictive control-loop eigenvalues and observer-loop eigenvalues. This means that the design of the predictive control law and the observer can be carried out independently to ensure the stability of the closed-loop MPC system.

B. MPC BASED ON MOTION PREDICTION (MPMPC)
At present, in traditional state feedback MPC, the reference trajectory R is the value of r(k), as shown in formula (15) and  FIGURE 13. However, for a shipborne stabilized platform, the ship motion is predictable, which results that the reference trajectory of MPC of HDU is predictable.
Therefore, a ship stabilization platform MPC strategy based on predicted ship motion is proposed in this paper, as shown in FIGURE 14. At each sampling moment, the ship motion is predicted by AR model and the predicted trajectory R p of HDU is obtained through the kinematics calculation. One part of the predicted trajectory R p is used to compensate the time delay trajectory R d of HDU, and the other part is used as the reference trajectory R AR of the rolling optimization of MPC. Obtain the optimal control sequence U by minimizing J AR , and the first element of U is applied to the controlled object. At the next sampling time, repeat the above process.
There are N d + N p predicted elements in the predicted trajectory R p , among which the first N d predicted elements compensate the delay R d , as shown in formula (25), and the last N p predicted elements serve as reference trajectory R AR , as shown in formula (26). The solution formula of the objective function J AR is formula (27).
Compared with the reference trajectory R using the value of r(k), AR predicted trajectory R AR can reflect the future state of the system better, and a better control sequence U can be obtained by minimizing the objective function J AR , and has higher tracking accuracy.
According to formula (15), (25), (26), the following can be obtained According to formula (17)-(24), r(k) and R c do not change the formula (24). In other words, the eigenvalues of the closed loop MPMPC system remain the same as those of the traditional closed loop MPC system, i.e. the stability of the system remains the same.

V. SIMULATION AND EXPERIMENT OF HUD
In order to verify the effectiveness of MPMPC, the HDU is firstly verified.

A. SIMULATION VERIFICATION
Matlab/Simulink software is used for simulation, and the simulation block diagram is shown in FIGURE 15.
Firstly, the predicted trajectory R AR of input signal is obtained by AR model. Then the optimal control sequence  The displacement error of HDU based on traditional MPC and MPMPC is shown in FIGURE 18. The maximal displacement error based on traditional MPC is 4.72 mm, however the maximal displacement error based on MPMPC is 0.96 mm, the tracking accuracy is improved obviously.

B. EXPERIMENTAL VERIFICATION
The experimental system of HDU based on MPMPC is shown in FIGURE 19. The experimental parameters are the same as the simulation parameters.
The displacement error of HDU based on traditional MPC and MPMPC is shown in FIGURE 20. The experimental result is similar to the simulation result. The maximal displacement error based on traditional MPC is 4.96 mm, while the maximal displacement error based on MPMPC is 1.02 mm. Therefore the tracking accuracy is improved obviously.

VI. SIMULATION AND EXPERIMENT OF YDRAULIC PARALLEL STABILIZED PLATFORM
Due to the condition limitations, the ship is replaced by a two-degree-of-freedom ship motion simulation platform with roll and pitch motion. The ship motion simulation platform outputs the roll and pitch motion as shown in FIGURE 2 and FIGURE 3 at the same time, and it can cause the upper VOLUME 8, 2020      heave motions are shown in FIGURE 21. Therefore, for the stabilized platform, the disturbance of five degrees of freedom should be compensated simultaneously, which is very effective for the verification of stabilized platform control performance.
When the stabilized platform is working, the platform would remain stationary under ideal conditions, but there will be remaining motion due to the displacement error of HDU. In addition, the displacement error of HDU causes certain yaw of the upper platform.

A. SIMULATION VERIFICATION
Matlab/Simulink software is used for simulation, and the simulation block diagram is shown in FIGURE 22. Firstly, the roll and pitch motion of the ship is output by the two-degree of freedom ship motion simulation platform. Then the predicted motion of ship motion is obtained by AR model, and the AR predicted trajectory R AR of HDU is obtained by the kinematics calculation. Then the optimal control sequence U of HDU is obtained by MPC and is input to the HDU model established by SimHydraulics, and the displacement of HDU is fed back to the MPC. The rigid body dynamics model of parallel stabilized platform built by SimMechanics provides load for HDU, and outputs the remaining motion of the stabilized platform. The remaining motions of the upper platform are obtained by SimMechanics. The traditional MPC can be obtained by eliminating AR model predictive.    The output motion of the two-degree-of-freedom ship motion simulation platform is shown in FIGURE 2 and FIGURE 3. The prediction parameters of AR model are

B. EXPERIMENTAL VERIFICATION
The experimental system of shipborne stabilized platform based on MPMPC is shown in FIGURE 32. The twodegree-of-freedom ship motion simulation platform outputs the roll and pitch motion as shown in FIGURE 2 and FIGURE 3. At the same time, the SINVT sensor of Wit-Motion company was used to measure the roll and pitch motion of the ship motion simulation platform. The resolution of SINVT is 0.01 • and the accuracy is 0.1 • . The moving average filter, AR predicted model and MPC program are programmed by LabVIEW software and run on NI CompactRIO-9033 controller, so as to realize MPC control based on motion prediction.    The experimental parameters are same as the simulation parameters. The remaining motion of the stabilized platform is obtained by forward kinematic. And the remaining motions   of each degree-of-freedom based on traditional MPC and MPMPC are shown in FIGURE 33-38. The experimental result is similar to the simulation result. But due to the accuracy of the displacement sensor, the heave and yaw remaining motion is basically same. The control effect of stabilized platform based on MPMPC is obviously better than traditional MPC.

VII. CONCLUSION
A MPC strategy of ship stabilization platform based on ship motion prediction (MPMPC) is proposed in this paper. The predicted ship motion is combined with MPC. The predicted trajectory of HDU can be obtained by the kinematics calculation of predicted ship motion. One part of the predicted trajectory is used to compensate the time delay of HDU, and the other part is used as the reference trajectory of the rolling optimization of MPC, instead of the reference trajectory using the measured ship motion at the current moment in traditional MPC. Compared with the reference trajectory using the measured ship motion at the current moment, the predicted trajectory can reflect the future state of the system better, and a better control sequence is obtained by minimizing the objective function. The tracking accuracy of HDU is improved obviously and the remaining motions of the stabilized platform are greatly reduced.
The MPMPC proposed in this paper is not only applicable to ship stable platform, but also applicable to other systems whose reference trajectory is predictable.