# Improved Fractional-Order PID Controller of a PMSM-Based Wave Compensation System for Offshore Ship Cranes

Hao Chen, Xin Wang, Mohamed Benbouzid, Jean-Frédéric Charpentier,
Nadia A t-Ahmed, Jingang Han

<figure><img src="image_1.png" /></figure>

## ► To cite this version:

Hao Chen, Xin Wang, Mohamed Benbouzid, Jean-Frédéric Charpentier, Nadia A t-Ahmed, et al. Improved Fractional-Order PID Controller of a PMSM-Based Wave Compensation System for Offshore Ship Cranes. Journal of Marine Science and Engineering, 2022, Journal of Marine science and Engineering, 10 (9), pp.1238. 10.3390/jmse10091238. [https://doi.org/10.3390/jmse10041308](https://doi.org/10.3390/jmse10041308)

HAL Id: hal-04041308

https://nantes-universite.hal.science/hal-04041308

Submitted on 6 Jun 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Improved Fractional-Order PID Controller of a PMSM-Based Wave Compensation System for Offshore Ship Cranes

Hao Chen, Xin Wang, Mohamed Benbouzid, Jean-Frédéric Charpentier,
Nadia A t-Ahmed, Jingang Han

<figure><img src="image_1.png" /></figure>

## ► To cite this version:

Hao Chen, Xin Wang, Mohamed Benbouzid, Jean-Frédéric Charpentier, Nadia A t-Ahmed, et al. Improved Fractional-Order PID Controller of a PMSM-Based Wave Compensation System for Offshore Ship Cranes. Journal of Marine Science and Engineering, 2022, Journal of Marine science and Engineering, 10 (9), pp.1238. 10.3390/jmse10091238. [https://doi.org/10.3390/jmse10091238](https://doi.org/10.3390/jmse10091238)

HAL Id: hal-04041308

https://nantes-universite.hal.science/hal-04041308v1

Submitted on 6 Jun 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Article

# Improved Fractional-Order PID Controller of a PMSM-Based Wave Compensation System for Offshore Ship Cranes

Hao Chen<sup>1,*</sup>,<sup>ID</sup> Xin Wang<sup>1</sup>, Mohamed Benbouzid<sup>1,2,*</sup>,<sup>ID</sup> Jean-Frédéric Charpentier<sup>3</sup>,<sup>ID</sup> Nadia Aït-Ahmed<sup>4 ID</sup>
and Jingang Han<sup>1 ID</sup>

<figure><img src="image_3.png" /></figure>

check for
updates

**Citation:** Chen, H.; Wang, X.; Benbouzid, M.; Charpentier, J.-F.; Aït-Ahmed, N.; Han, J. Improved Fractional-Order PID Controller of a PMSM-Based Wave Compensation System for Offshore Ship Cranes. *J. Mar. Sci. Eng.* **2022**, *10*, 1238. https://doi.org/10.3390/jmse10091238

Academic Editor: Dong-Sheng Jeng

Received: 3 August 2022

Accepted: 27 August 2022

Published: 3 September 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_4.png" /></figure>

**Copyright:** © 2022 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).

**Abstract:** Wave compensation technology is crucial to the safety of the ship operation and the accurate placement of load. Its compensation efficiency and the gentle change of the rope tension are particularly important. In this paper, we adopt permanent magnet synchronous machine (PMSM) as the actuator to construct the basic wave compensation system. Firstly, the motion model of ship and load under wave action is established, and the fractional-order PID (FOPID) controller for the position loop of the PMSM is introduced. Then, the parameters of FOPID are optimized by genetic algorithm-particle swarm optimization (GAPSO) algorithm, which is based on genetic algorithms (GA) and particle swarm optimization (PSO) algorithms for better compensation performance. The wave synchronization strategy is used to simulate the load, when it needs to be taken into the water. The non-linear dynamic equations of the rope are solved by Lagrange mechanics and the heave displacement is obtained by time series prediction algorithm. Finally, the effect of wave compensation and wave synchronization strategy are verified on MATLAB/Simulink. The results show that after the compensation, the crane load can follow the set height value very well, the compensation efficiency can reach more than 94%, and the wave synchronization strategy significantly reduces the change of the rope tension.

**Keywords:** active heave compensation system; permanent magnet synchronous machine (PMSM); vessel crane system; genetic algorithm-particle swarm optimization (GAPSO)

## 1. Introduction

The offshore oil and gas industry includes activities related to the exploration, extraction, transportation, and processing of offshore oil and gas. With the depletion of onshore oil and gas resources, exploration and development of offshore oil and gas has become an important strategy for many countries and regions. Consequently, the safety of marine operations above the sea surface and the safety oil and gas operations below the sea surface is a key feature [1,2].

When the vessel is disturbed by wind and waves, 6 degrees of freedom (DOF) motion will make the crane load deviate from its desired position. This phenomenon will highly affect the system's controllability and lead to system damage. In the 6 DOF motion, the heave motion has the most significant impact on the load when the vessel crane is lifting objects at the wharf or offshore. Consequently, when the vessel rises and falls with the waves, in order to keep the load at the set position, as shown in Figure 1, the vessel heave compensation system is particularly important. The current heave compensation systems are mainly divided into two categories: a passive compensation system (PCS) and an active compensation system (ACS) [3].

<footnote n="1">¹ The Research Institute of Power Drive and Control, Shanghai Maritime University, Shanghai 201306, China</footnote>

<footnote n="2">² Institut de Recherche Dupuy de Lôme (UMR CNRS 6027 IRDL), University of Brest, 29240 Brest, France</footnote>

<footnote n="3">³ Institut de Recherche de l'Ecole Navale (EA 3634 IRENav), French Naval Academy, 29240 Brest, France</footnote>

<footnote n="4">⁴ Institut de Recherche en Energie Electrique de Nantes Atlantique, Nantes University,
44602 Saint-Nazaire, France</footnote>

<footnote>* Correspondence: chenhao@shmtu.edu.cn (H.C.); mohamed.benbouzid@univ-brest.fr (M.B.)</footnote>
Article

# Improved Fractional-Order PID Controller of a PMSM-Based Wave Compensation System for Offshore Ship Cranes

Hao Chen <fnref n="1" />,* ID, Xin Wang <fnref n="1" />, Mohamed Benbouzid <fnref n="1" />,<fnref n="2" />,* ID, Jean-Frédéric Charpentier <fnref n="3" /> ID, Nadia Aït-Ahmed <fnref n="4" /> ID and Jingang Han <fnref n="1" /> ID

<figure><img src="image_3.png" /></figure>

check for
updates

**Citation:** Chen, H.; Wang, X.; Benbouzid, M.; Charpentier, J.-F.; Aït-Ahmed, N.; Han, J. Improved Fractional-Order PID Controller of a PMSM-Based Wave Compensation System for Offshore Ship Cranes. *J. Mar. Sci. Eng.* **2022**, *10*, 1238. https://doi.org/10.3390/jmse10091238

Academic Editor: Dong-Sheng Jeng

Received: 3 August 2022

Accepted: 27 August 2022

Published: 3 September 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_4.png" /></figure>

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

**Abstract:** Wave compensation technology is crucial to the safety of the ship operation and the accurate placement of load. Its compensation efficiency and the gentle change of the rope tension are particularly important. In this paper, we adopt permanent magnet synchronous machine (PMSM) as the actuator to construct the basic wave compensation system. Firstly, the motion model of ship and load under wave action is established, and the fractional-order PID (FOPID) controller for the position loop of the PMSM is introduced. Then, the parameters of FOPID are optimized by genetic algorithm-particle swarm optimization (GAPSO) algorithm, which is based on genetic algorithms (GA) and particle swarm optimization (PSO) algorithms for better compensation performance. The wave synchronization strategy is used to simulate the load, when it needs to be taken into the water. The non-linear dynamic equations of the rope are solved by Lagrange mechanics and the heave displacement is obtained by time series prediction algorithm. Finally, the effect of wave compensation and wave synchronization strategy are verified on MATLAB/Simulink. The results show that after the compensation, the crane load can follow the set height value very well, the compensation efficiency can reach more than 94%, and the wave synchronization strategy significantly reduces the change of the rope tension.

**Keywords:** active heave compensation system; permanent magnet synchronous machine (PMSM); vessel crane system; genetic algorithm-particle swarm optimization (GAPSO)

## 1. Introduction

The offshore oil and gas industry includes activities related to the exploration, extraction, transportation, and processing of offshore oil and gas. With the depletion of onshore oil and gas resources, exploration and development of offshore oil and gas has become an important strategy for many countries and regions. Consequently, the safety of marine operations above the sea surface and the safety oil and gas operations below the sea surface is a key feature [1,2].

When the vessel is disturbed by wind and waves, 6 degrees of freedom (DOF) motion will make the crane load deviate from its desired position. This phenomenon will highly affect the system's controllability and lead to system damage. In the 6 DOF motion, the heave motion has the most significant impact on the load when the vessel crane is lifting objects at the wharf or offshore. Consequently, when the vessel rises and falls with the waves, in order to keep the load at the set position, as shown in Figure 1, the vessel heave compensation system is particularly important. The current heave compensation systems are mainly divided into two categories: a passive compensation system (PCS) and an active compensation system (ACS) [3].

<footnote n="1">¹ The Research Institute of Power Drive and Control, Shanghai Maritime University, Shanghai 201306, China</footnote>

<footnote n="2">² Institut de Recherche Dupuy de Lôme (UMR CNRS 6027 IRDL), University of Brest, 29240 Brest, France</footnote>

<footnote n="3">³ Institut de Recherche de l'Ecole Navale (EA 3634 IRENav), French Naval Academy, 29240 Brest, France</footnote>

<footnote n="4">⁴ Institut de Recherche en Energie Electrique de Nantes Atlantique, Nantes University, 44602 Saint-Nazaire, France</footnote>

<footnote>* Correspondence: chenhao@shmtu.edu.cn (H.C.); mohamed.benbouzid@univ-brest.fr (M.B.)</footnote>
<figure><img src="image_5.png" /><figcaption>**Figure 1.** Structure block diagram of the system.</figcaption></figure>

Although PCS is relatively simple in structural design, there are still many shortcomings: PCS does not have a closed loop, which makes feedback control impossible; PCS also has a large delay, which brings a lag in compensation effects [4]. PCSs use only mechanical equipment for buffering and has an efficiency less than 80%. If higher compensation efficiency and accuracy is desired, the use of ACS is needed [5]. Generally, the compensation efficiency of ACS can reach more than 90%. Compared with PCS, it has a better timely compensation performance, better regulation ability for over-compensation, and can drastically reduce the heave motion of the load coupling.

In 1970, A. Southerland designed a hybrid heave compensation system: a passive system to maintain constant rope tension and an active system to control the heave motion [6]. Later, developments in the oil and gas industry led to further research into heave compensation systems. A circuit system was proposed to compensate for gravitational movement, but due to the limitations of the technology at the time, this circuit structure could not be changed once the design was completed. Another limitation was linked to the fact that the accuracy of the measurement system was low. To ensure the accuracy of the system, the use of a more expensive inertial measurement unit (IMU) to measure the vessel's motion is needed. A GPS-based measurement scheme that can reduce costs has therefore been proposed instead, using a GPS comparable to the IMU but with a limited sampling frequency.

To cope with the disturbance of wind and waves, assorted control strategies have been proposed for the actuator. Pan et al. explored a Lyapunov's direct method based nonlinear control strategy to adjust the distance from the upper end of the riser to the seabed to reduce the effect of the heave motion of the vessel [7]. Johansen et al. introduced wave synchronization for active control strategy to use a wave-amplitude measurement to minimize variation in the relative vertical velocity between the load and water. The results indicated that the reduction in the standard deviation of the rope tension may be up to 50% [8]. Yan et al. designed an adaptive robust integral sliding mode control (ARISMC) based on the back-stepping control method strategy to realize constant tension control of hybrid active-passive heave compensator (HAHC) applied to heavy deep-sea towing systems [9]. Sandre-Hernandez et al. introduced a PSO algorithm to identify the direct and quadrature stator inductances and the stator resistance of a PMS compensation motor [10], nevertheless, PSO algorithm is prone to find local optima when dealing with parameter optimization.
<figure><img src="image_5.png" /><figcaption>**Figure 1.** Structure block diagram of the system.</figcaption></figure>

Although PCS is relatively simple in structural design, there are still many shortcomings: PCS does not have a closed loop, which makes feedback control impossible; PCS also has a large delay, which brings a lag in compensation effects [4]. PCSs use only mechanical equipment for buffering and has an efficiency less than 80%. If higher compensation efficiency and accuracy is desired, the use of ACS is needed [5]. Generally, the compensation efficiency of ACS can reach more than 90%. Compared with PCS, it has a better timely compensation performance, better regulation ability for over-compensation, and can drastically reduce the heave motion of the load coupling.

In 1970, A. Southerland designed a hybrid heave compensation system: a passive system to maintain constant rope tension and an active system to control the heave motion [6]. Later, developments in the oil and gas industry led to further research into heave compensation systems. A circuit system was proposed to compensate for gravitational movement, but due to the limitations of the technology at the time, this circuit structure could not be changed once the design was completed. Another limitation was linked to the fact that the accuracy of the measurement system was low. To ensure the accuracy of the system, the use of a more expensive inertial measurement unit (IMU) to measure the vessel's motion is needed. A GPS-based measurement scheme that can reduce costs has therefore been proposed instead, using a GPS comparable to the IMU but with a limited sampling frequency.

To cope with the disturbance of wind and waves, assorted control strategies have been proposed for the actuator. Pan et al. explored a Lyapunov's direct method based nonlinear control strategy to adjust the distance from the upper end of the riser to the seabed to reduce the effect of the heave motion of the vessel [7]. Johansen et al. introduced wave synchronization for active control strategy to use a wave-amplitude measurement to minimize variation in the relative vertical velocity between the load and water. The results indicated that the reduction in the standard deviation of the rope tension may be up to 50% [8]. Yan et al. designed an adaptive robust integral sliding mode control (ARISMC) based on the back-stepping control method strategy to realize constant tension control of hybrid active-passive heave compensator (HAHC) applied to heavy deep-sea towing systems [9]. Sandre-Hernandez et al. introduced a PSO algorithm to identify the direct and quadrature stator inductances and the stator resistance of a PMS compensation motor [10], nevertheless, PSO algorithm is prone to find local optima when dealing with parameter optimization.
For the typical three-loop control of the compensation PMSM, Sun et al. proposed an improved model predictive current control (MPCC) scheme to select the optimal voltage vector based on a current track circle instead of a cost function to improve the steady state and dynamic performance [11]. Gao et al. proposed a new single-loop model predictive control (MPC) based on back-electromotive force and I-F control to simplify the system structure and control algorithm. It has a high dynamic and steady-state performance [12]. Zhang et al. designed an asymmetric space vector modulation (ASVM) method to improve the calculated position estimate [13]. Liu et al. proposed a closed-loop detection system to accurately extract harmonics and to use a compensation algorithm to suppress harmonics in winding currents [14].

The paper's main contributions to address the previously presented issues are the following:

To accurately obtain the load motion information, this paper solves the non-linear dynamic equations of the rope by using the Lagrange mechanics principle, and the length of the rope is thought to be variable.

To solve the traditional FOPID parameter adjustment difficulties, this paper introduces the GAPSO algorithm to optimize parameters. This FOPID has a better dynamic response than the classical PID controller. It allows for carrying out a more rapid and extensive optimization search. The controller parameters will be optimized and the system's anti-interference ability will be improved.

To solve the violent changes in rope tension, a wave synchronization strategy is introduced. It can make the rope tension change slowly, when the load passes through the splash zone.

This paper uses MATLAB/Simulink software to model the motion of the vessel and the crane under wave excitation. It also simulates the effects for the heave displacements of the crane using the proposed active wave compensation system. This solution shows capabilities to allow the crane to better follow the set position. The outline of the paper is organized as follows: Section 2 presents the detailed mathematical model and system analysis, Section 3 presents the PMSM-based compensation control system, Section 4 discusses the overall simulation results of the system, and finally the conclusions are given in Section 5. The movement form of the system is shown in Figure A1 in Appendix A.

## 2. Mathematical Models

To study the active compensation system of the vessel, this paper has established a mathematical model of the system mechanical behavior using MATLAB/Simulink. The work in this article carries out under some reasonable assumptions, which are as follows:

1. Assuming the vessel is operating in the level 4 sea state;

2. Assuming that the lifting vessel is a square box and that the crane boom is not deformed during operation;

3. The mass of the rope is negligible compared to the mass of the load being lifted;

4. The influence of air resistance on the load being lifted is neglected.

In order to better describe each part of the system and their relationships, we use Figure 1 to show:

The position setting module in the above figure is shown in Figure A2 in Appendix A. and other parts correspond to the following sections.

### 2.1. *Motion Coordinate System*

During the operation of the vessel on the sea surface, it is affected by the waves and generates six DOF of displacement: surge, sway, heave, roll, pitch, and yaw. To accurately describe the motion state of the system, reference coordinate systems are used in this paper: the North East Down (NED) frame (O-X_NY_NZ_N), the translation coordinate system frame (O-X_OY_OZ_O), and the Body-axis coordinate system (BODY) frame (O-X_bY_bZ_b); the positions of these coordinate systems are shown in Figure 2:
For the typical three-loop control of the compensation PMSM, Sun et al. proposed an improved model predictive current control (MPCC) scheme to select the optimal voltage vector based on a current track circle instead of a cost function to improve the steady state and dynamic performance [11]. Gao et al. proposed a new single-loop model predictive control (MPC) based on back-electromotive force and I-F control to simplify the system structure and control algorithm. It has a high dynamic and steady-state performance [12]. Zhang et al. designed an asymmetric space vector modulation (ASVM) method to improve the calculated position estimate [13]. Liu et al. proposed a closed-loop detection system to accurately extract harmonics and to use a compensation algorithm to suppress harmonics in winding currents [14].

The paper's main contributions to address the previously presented issues are the following:

To accurately obtain the load motion information, this paper solves the non-linear dynamic equations of the rope by using the Lagrange mechanics principle, and the length of the rope is thought to be variable.

To solve the traditional FOPID parameter adjustment difficulties, this paper introduces the GAPSO algorithm to optimize parameters. This FOPID has a better dynamic response than the classical PID controller. It allows for carrying out a more rapid and extensive optimization search. The controller parameters will be optimized and the system's anti-interference ability will be improved.

To solve the violent changes in rope tension, a wave synchronization strategy is introduced. It can make the rope tension change slowly, when the load passes through the splash zone.

This paper uses MATLAB/Simulink software to model the motion of the vessel and the crane under wave excitation. It also simulates the effects for the heave displacements of the crane using the proposed active wave compensation system. This solution shows capabilities to allow the crane to better follow the set position. The outline of the paper is organized as follows: Section 2 presents the detailed mathematical model and system analysis, Section 3 presents the PMSM-based compensation control system, Section 4 discusses the overall simulation results of the system, and finally the conclusions are given in Section 5. The movement form of the system is shown in Figure A1 in Appendix A.

## 2. Mathematical Models

To study the active compensation system of the vessel, this paper has established a mathematical model of the system mechanical behavior using MATLAB/Simulink. The work in this article carries out under some reasonable assumptions, which are as follows:

1. Assuming the vessel is operating in the level 4 sea state;

2. Assuming that the lifting vessel is a square box and that the crane boom is not deformed during operation;

3. The mass of the rope is negligible compared to the mass of the load being lifted;

4. The influence of air resistance on the load being lifted is neglected.

In order to better describe each part of the system and their relationships, we use Figure 1 to show:

The position setting module in the above figure is shown in Figure A2 in Appendix A. and other parts correspond to the following sections.

### 2.1. *Motion Coordinate System*

During the operation of the vessel on the sea surface, it is affected by the waves and generates six DOF of displacement: surge, sway, heave, roll, pitch, and yaw. To accurately describe the motion state of the system, reference coordinate systems are used in this paper: the North East Down (NED) frame (O-X_NY_NZ_N), the translation coordinate system frame (O-X_OY_OZ_O), and the Body-axis coordinate system (BODY) frame (O-X_bY_bZ_b); the positions of these coordinate systems are shown in Figure 2:
<figure><img src="image_6.png" /><figcaption>**Figure 2.** Coordinate systems for vessel movement.</figcaption></figure>

Equation (1) presents the mechanical equation of ship motion.

$$[M + A(\omega_1)]\ddot{x} + B(\omega_1)\dot{x} + Cx = F(\omega_1) \quad (1)$$

where $x$ is the displacement vector of the vessel in all DOF (m); $\omega_1$ is the oscillation frequency (Hz); $M$ is the mass of the vessel (Kg); $A(\omega_1)$ is the additional quality (Kg); $B(\omega_1)$ is the damping ratio; $C$ is the resilience factor; $F(\omega_1)$ is the harmonic excitation force (N).

Using Equation (1), the Amplitude Response Operator (RAO) can be employed to simulate the motion of the crane vessel under different sea conditions after wave disturbance [15].

It leads to:

$$RAO(\omega_1) = \frac{\mathbf{x}}{\zeta_a} = \frac{\mathbf{F}_0}{C - (M + A(\omega_1))\omega_1^2 + iB(\omega_1)\omega_1} \quad (2)$$

where $\mathbf{F}_0$ is the wave linear excitation force (N); $\zeta_a$ is the amplitude of the harmonic vector (m); using the MSS toolbox module in MATLAB, the response of the vessel in the different DOF can be modeled using the RAO principle.

In the coordinate system of Figure 2, the vector from the origin of the lifting vessel to the bottom of the crane is $\mathbf{r}^b_{\text{base}}$; the vector from the bottom to the top lifting point of the crane is $\mathbf{r}^b_{\text{basetip}}$.

The vector from the vessel's origin to the lifting point of the crane can be obtained as:

$$\mathbf{r}_{\text{tip}}^{b} = \mathbf{r}_{\text{base}}^{b} + \mathbf{r}_{\text{basetip}}^{b} \quad (3)$$

According to Table 1, the roll transformation matrix is:

$$R_{x,\phi} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos(\phi) & -\sin(\phi) \\ 0 & \sin(\phi) & \cos(\phi) \end{bmatrix} \quad (4)$$

<table><caption>**Table 1.** Vessel's six DOF displacement.</caption><thead><tr><th>6 DOF</th><th>Linear Velocity and<br>Angular Velocity</th><th>Displacement and<br>Offset Angle</th></tr></thead><tbody><tr><td>surge</td><td>u</td><td>x</td></tr><tr><td>sway</td><td>v</td><td>y</td></tr><tr><td>heave</td><td>w</td><td>z</td></tr><tr><td>roll</td><td>p</td><td>φ</td></tr><tr><td>pitch</td><td>q</td><td>θ</td></tr><tr><td>yaw</td><td>r</td><td>Ψ</td></tr></tbody></table>
<figure><img src="image_6.png" /><figcaption>**Figure 2.** Coordinate systems for vessel movement.</figcaption></figure>

Equation (1) presents the mechanical equation of ship motion.

$$[M + A(\omega_1)]\ddot{x} + B(\omega_1)\dot{x} + Cx = F(\omega_1) \quad (1)$$

where $x$ is the displacement vector of the vessel in all DOF (m); $\omega_1$ is the oscillation frequency (Hz); $M$ is the mass of the vessel (Kg); $A(\omega_1)$ is the additional quality (Kg); $B(\omega_1)$ is the damping ratio; $C$ is the resilience factor; $F(\omega_1)$ is the harmonic excitation force (N).

Using Equation (1), the Amplitude Response Operator (RAO) can be employed to simulate the motion of the crane vessel under different sea conditions after wave disturbance [15].

It leads to:

$$RAO(\omega_1) = \frac{x}{\zeta_a} = \frac{F_0}{C - (M + A(\omega_1))\omega_1^2 + iB(\omega_1)\omega_1} \quad (2)$$

where $F_0$ is the wave linear excitation force (N); $\zeta_a$ is the amplitude of the harmonic vector (m); using the MSS toolbox module in MATLAB, the response of the vessel in the different DOF can be modeled using the RAO principle.

In the coordinate system of Figure 2, the vector from the origin of the lifting vessel to the bottom of the crane is $\mathbf{r}^b_{\text{base}}$; the vector from the bottom to the top lifting point of the crane is $\mathbf{r}^b_{\text{basetip}}$.

The vector from the vessel's origin to the lifting point of the crane can be obtained as:

$$\mathbf{r}_{\text{tip}}^{b} = \mathbf{r}_{\text{base}}^{b} + \mathbf{r}_{\text{basetip}}^{b} \quad (3)$$

According to Table 1, the roll transformation matrix is:

$$R_{x,\phi} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos(\phi) & -\sin(\phi) \\ 0 & \sin(\phi) & \cos(\phi) \end{bmatrix} \quad (4)$$

<table><caption>**Table 1.** Vessel's six DOF displacement.</caption><thead><tr><th>6 DOF</th><th>Linear Velocity and<br>Angular Velocity</th><th>Displacement and<br>Offset Angle</th></tr></thead><tbody><tr><td>surge</td><td>u</td><td>x</td></tr><tr><td>sway</td><td>v</td><td>y</td></tr><tr><td>heave</td><td>w</td><td>z</td></tr><tr><td>roll</td><td>p</td><td>φ</td></tr><tr><td>pitch</td><td>q</td><td>θ</td></tr><tr><td>yaw</td><td>r</td><td>Ψ</td></tr></tbody></table>
Similarly, the pitch and yaw transformation matrices can be drawn as:

$$R_{y,\theta} = \begin{bmatrix} \cos \theta & 0 & \sin \theta \\ 0 & 1 & 0 \\ -\sin(\theta) & 0 & \cos(\theta) \end{bmatrix} \qquad (5)$$

$$R_{y,\theta} = \begin{bmatrix} \cos \theta & 0 & \sin \theta \\ 0 & 1 & 0 \\ -\sin(\theta) & 0 & \cos(\theta) \end{bmatrix} \qquad (6)$$

The vessel's rotation transformation matrix can be calculated as:

$$R_b^n = \begin{bmatrix} \cos \psi \cos \theta & -\sin \psi \cos \phi + \cos \psi \sin \theta \sin \phi & \sin \psi \sin \phi + \cos \psi \cos \phi \sin \theta \\ \sin \psi \cos \theta & \cos \psi \cos \phi + \sin \phi \sin \theta \sin \psi & -\cos \psi \sin \phi + \sin \theta \sin \psi \cos \phi \\ -\sin \theta & \cos \theta \sin \phi & \cos \theta \cos \phi \end{bmatrix} \qquad (7)$$

where $\phi$ is the angle of rotation of the x-axis; $\theta$ is the angle of rotation of the y-axis; $\psi$ is the angle of rotation of the z-axis.

The coordinates of the lifting point can be expressed in the NED frame as:

$$\mathbf{P}_{\text{tip}}^{n} = \mathbf{r}_{o}^{n} + \mathbf{R}_{b}^{n} \mathbf{r}_{\text{tip}}^{b} \qquad (8)$$

When calculating the velocity in the NED frame, the fork product operator S is introduced to facilitate the calculation:

$$a \times b = \mathbf{S}(a)b \qquad (9)$$

where $\mathbf{S}(a)$ is defined as:

$$\mathbf{S}(a) = \begin{bmatrix} 0 & -a_3 & a_2 \\ a_3 & 0 & -a_1 \\ -a_2 & a_1 & 0 \end{bmatrix} \qquad (10)$$

$$\mathbf{a} = [a_1 \ a_2 \ a_3]^T \qquad (11)$$

The velocity of the lifting point in the NED frame and the velocity of the crane vessel in the translation coordinate system are expressed as:

$$\dot{\mathbf{P}}_{\text{tip}}^{n} = \mathbf{R}_{b}^{n} \mathbf{V}_{\text{tip}}^{b} = \mathbf{R}_{b}^{n} \left[ \mathbf{V}_{o}^{b} + \omega_{nb}^{b} \times \mathbf{r}_{\text{tip}}^{b} \right] = \mathbf{R}_{b}^{n} \left[ \mathbf{V}_{o}^{b} + \mathbf{S}(\omega_{nb}^{b}) \mathbf{r}_{\text{tip}}^{b} \right] \qquad (12)$$

The rotation matrix relationship between the BODY frame and NED frame is:

$$\dot{\mathbf{R}}_{b}^{n} = \mathbf{R}_{b}^{n} \mathbf{S}(\omega_{nb}^{b}) \qquad (13)$$

The acceleration of the lifting point is:

$$\ddot{\mathbf{P}}_{\text{tip}}^{n} = \mathbf{R}_{b}^{n} \left[ \dot{\mathbf{V}}_{o}^{b} + \mathbf{S}(\dot{\omega}_{nb}^{b}) \mathbf{r}_{\text{tip}}^{b} + \mathbf{S}(\omega_{nb}^{b}) \dot{\mathbf{r}}_{\text{tip}}^{b} + \mathbf{S}(\omega_{nb}^{b}) \mathbf{V}_{o}^{b} + \mathbf{S}^{2}(\omega_{nb}^{b}) \mathbf{r}_{\text{tip}}^{b} \right] \\ = \mathbf{R}_{b}^{n} \left\{ \dot{\mathbf{V}}_{o}^{b} + \left[ \mathbf{S}(\dot{\omega}_{nb}^{b}) + \mathbf{S}^{2}(\omega_{nb}^{b}) \right] \mathbf{r}_{\text{tip}}^{b} + \mathbf{S}(\omega_{nb}^{b}) \left[ \dot{\mathbf{r}}_{\text{tip}}^{b} + \mathbf{V}_{o}^{b} \right] \right\} \qquad (14)$$

## 2.2. Wave Model

In this paper, the Guidance, Navigation and Control (GNC) module in the Marine Systems Simulator (MSS) MATLAB Simulink toolbox (version number 2020; Natick, MA, USA) is used. Waves are modelled using the JONSWAP wave energy spectrum. In order to
Similarly, the pitch and yaw transformation matrices can be drawn as:

$$R_{y,\theta} = \begin{bmatrix} \cos \theta & 0 & \sin \theta \\ 0 & 1 & 0 \\ -\sin(\theta) & 0 & \cos(\theta) \end{bmatrix} \qquad (5)$$

$$R_{y,\theta} = \begin{bmatrix} \cos \theta & 0 & \sin \theta \\ 0 & 1 & 0 \\ -\sin(\theta) & 0 & \cos(\theta) \end{bmatrix} \qquad (6)$$

The vessel's rotation transformation matrix can be calculated as:

$$R_b^n = \begin{bmatrix} \cos \psi \cos \theta & -\sin \psi \cos \phi + \cos \psi \sin \theta \sin \phi & \sin \psi \sin \phi + \cos \psi \cos \phi \sin \theta \\ \sin \psi \cos \theta & \cos \psi \cos \phi + \sin \phi \sin \theta \sin \psi & -\cos \psi \sin \phi + \sin \theta \sin \psi \cos \phi \\ -\sin \theta & \cos \theta \sin \phi & \cos \theta \cos \phi \end{bmatrix} \qquad (7)$$

where $\phi$ is the angle of rotation of the x-axis; $\theta$ is the angle of rotation of the y-axis; $\psi$ is the angle of rotation of the z-axis.

The coordinates of the lifting point can be expressed in the NED frame as:

$$\mathbf{P}_{\text{tip}}^{n} = \mathbf{r}_{o}^{n} + R_{b}^{n} \mathbf{r}_{\text{tip}}^{b} \qquad (8)$$

When calculating the velocity in the NED frame, the fork product operator S is introduced to facilitate the calculation:

$$a \times b = \mathbf{S}(a)b \qquad (9)$$

where $\mathbf{S}(a)$ is defined as:

$$\mathbf{S}(a) = \begin{bmatrix} 0 & -a_3 & a_2 \\ a_3 & 0 & -a_1 \\ -a_2 & a_1 & 0 \end{bmatrix} \qquad (10)$$

$$\mathbf{a} = [a_1 \ a_2 \ a_3]^T \qquad (11)$$

The velocity of the lifting point in the NED frame and the velocity of the crane vessel in the translation coordinate system are expressed as:

$$\dot{\mathbf{P}}_{\text{tip}}^{n} = \mathbf{R}_{b}^{n} \mathbf{V}_{\text{tip}}^{b} = \mathbf{R}_{b}^{n} \left[ \mathbf{V}_{o}^{b} + \omega_{nb}^{b} \times \mathbf{r}_{\text{tip}}^{b} \right] = \mathbf{R}_{b}^{n} \left[ \mathbf{V}_{o}^{b} + \mathbf{S}(\omega_{nb}^{b}) \mathbf{r}_{\text{tip}}^{b} \right] \qquad (12)$$

The rotation matrix relationship between the BODY frame and NED frame is:

$$\dot{\mathbf{R}}_{b}^{n} = \mathbf{R}_{b}^{n} \mathbf{S}(\omega_{nb}^{b}) \qquad (13)$$

The acceleration of the lifting point is:

$$\ddot{\mathbf{P}}_{\text{tip}}^{n} = \mathbf{R}_{b}^{n} \left[ \dot{\mathbf{V}}_{o}^{b} + \mathbf{S}(\dot{\omega}_{nb}^{b}) \mathbf{r}_{\text{tip}}^{b} + \mathbf{S}(\omega_{nb}^{b}) \dot{\mathbf{r}}_{\text{tip}}^{b} + \mathbf{S}(\omega_{nb}^{b}) \mathbf{V}_{o}^{b} + \mathbf{S}^{2}(\omega_{nb}^{b}) \mathbf{r}_{\text{tip}}^{b} \right] \\ = \mathbf{R}_{b}^{n} \left\{ \dot{\mathbf{V}}_{o}^{b} + \left[ \mathbf{S}(\dot{\omega}_{nb}^{b}) + \mathbf{S}^{2}(\omega_{nb}^{b}) \right] \mathbf{r}_{\text{tip}}^{b} + \mathbf{S}(\omega_{nb}^{b}) \left[ \dot{\mathbf{r}}_{\text{tip}}^{b} + \mathbf{V}_{o}^{b} \right] \right\} \qquad (14)$$

## 2.2. Wave Model

In this paper, the Guidance, Navigation and Control (GNC) module in the Marine Systems Simulator (MSS) MATLAB Simulink toolbox (version number 2020; Natick, MA, USA) is used. Waves are modelled using the JONSWAP wave energy spectrum. In order to
simulate the effect of waves on the vessel, the wave elevation at any (x, y) position can be represented by superposition using the statistical principle.

$$ \zeta(x, y, t) = \sum_{i=1}^{\infty} \zeta_a(i) \cos[\omega(i)t + \varphi(i) - k(i)(x\cos(\psi(i)) + y\sin(\psi(i)))] \quad (15) $$

where $\omega(i)$ is the frequency of the harmonic vector (rad/s); $\varphi(i)$ is the initial phase of the harmonic vector (rad); $\psi(i)$ is the direction of the harmonic vector (rad); $i$ is the number of the harmonic vector, $t$ is the time (s). The relationship between the amplitude $\zeta_a(i)$ in equation (15) and wave frequency spectrum ($S_\zeta$) is:

$$ \zeta_a = \sqrt{2S_\zeta(\omega_i)d\omega} \quad (16) $$

In this paper, the JONSWAP wave energy spectrum is used to model and simulate the waves in level 4 sea state.

$$ S(\omega) = \alpha_n \frac{g^2}{\omega^5} e^{[-\frac{5}{4} (\frac{\omega_p}{\omega})^4]} \gamma e^{-[\frac{1}{2} (\frac{\omega-\omega_p}{\sigma\omega_p})^2]} \quad (17) $$

The spectral parameters of this spectrum are:

$$ \sigma = \begin{cases} 0.07 & \omega \le \omega_p \\ 0.09 & \omega \ge \omega_p \end{cases} \quad (18) $$

$$ \alpha = 0.0076 \left( \frac{gx}{U^2} \right)^{-0.22} \quad (19) $$

$$ \omega_p = 22 \left( \frac{g}{U} \right) \left( \frac{gx}{U^2} \right)^{-0.33} \quad (20) $$

where $\alpha_n$ is a causeless constant; $g$ is the acceleration of gravity (m/s²); $U$ is the average wind speed (m/s); $\gamma$ is the spectral peak factor and takes the value 3.3; $\omega_p$ is the spectral peak frequency (Hz).

## 2.3. Model of the Vessel Crane Load Motion System

When the vessel crane is disturbed by waves, its motion is non-linear, and the system model is shown in Figure 3.

<figure><img src="image_7.png" /><figcaption>Figure 3. Vessel crane system.</figcaption></figure>

To be able to determine the position of the load, define its position in the NED system is $G^n$, and $GP$ is the position of the load in the coordinate system with the lifting point ($P_{tip}$) as the original point; $\alpha$, $\beta$ is the inner angle of the plane and the outer angle of the plane. The vector relationship gives:

$$ G^n = P_{tip}^n + G^P \quad (21) $$
simulate the effect of waves on the vessel, the wave elevation at any (x, y) position can be represented by superposition using the statistical principle.

$$ \zeta(x, y, t) = \sum_{i=1}^{\infty} \zeta_a(i) \cos[\omega(i)t + \varphi(i) - k(i)(x\cos(\psi(i)) + y\sin(\psi(i)))] \quad (15) $$

where $\omega(i)$ is the frequency of the harmonic vector (rad/s); $\varphi(i)$ is the initial phase of the harmonic vector (rad); $\psi(i)$ is the direction of the harmonic vector (rad); $i$ is the number of the harmonic vector, $t$ is the time (s). The relationship between the amplitude $\zeta_a(i)$ in equation (15) and wave frequency spectrum ($S_\zeta$) is:

$$ \zeta_a = \sqrt{2S_\zeta(\omega_i)d\omega} \quad (16) $$

In this paper, the JONSWAP wave energy spectrum is used to model and simulate the waves in level 4 sea state.

$$ S(\omega) = \alpha_n \frac{g^2}{\omega^5} e^{[-\frac{5}{4} (\frac{\omega_p}{\omega})^4]} \gamma e^{-[\frac{1}{2} (\frac{\omega - \omega_p}{\sigma \omega_p})^2]} \quad (17) $$

The spectral parameters of this spectrum are:

$$ \sigma = \begin{cases} 0.07 & \omega \le \omega_p \\ 0.09 & \omega \ge \omega_p \end{cases} \quad (18) $$

$$ \alpha = 0.0076 \left( \frac{gx}{U^2} \right)^{-0.22} \quad (19) $$

$$ \omega_p = 22 \left( \frac{g}{U} \right) \left( \frac{gx}{U^2} \right)^{-0.33} \quad (20) $$

where $\alpha_n$ is a causeless constant; $g$ is the acceleration of gravity (m/s²); $U$ is the average wind speed (m/s); $\gamma$ is the spectral peak factor and takes the value 3.3; $\omega_p$ is the spectral peak frequency (Hz).

## 2.3. Model of the Vessel Crane Load Motion System

When the vessel crane is disturbed by waves, its motion is non-linear, and the system model is shown in Figure 3.

<figure><img src="image_7.png" /><figcaption>Figure 3. Vessel crane system.</figcaption></figure>

To be able to determine the position of the load, define its position in the NED system is $G^n$, and $GP$ is the position of the load in the coordinate system with the lifting point ($P_{tip}$) as the original point; $\alpha$, $\beta$ is the inner angle of the plane and the outer angle of the plane. The vector relationship gives:

$$ G^n = P_{tip}^n + G^P \quad (21) $$
GP is expressed as:

$$ egin{cases} x_G(t) = (L + s(t)) \sin \alpha(t) \cos \beta(t) \\ y_G(t) = -(L + s(t)) \sin \beta(t) \\ z_G(t) = (L + s(t)) \cos \alpha(t) \cos \beta(t) \end{cases} \quad (22) $$

The total kinetic energy of the vessel crane system is:

$$ T = \frac{1}{2} m \dot{x}_G^2(t) + \frac{1}{2} m \dot{y}_G^2(t) + \frac{1}{2} m \dot{z}_G^2(t) \quad (23) $$

The total potential energy of the system is:

$$ V = \frac{1}{2} k(s(t))^2 + mg(L + \lambda) - mg(L + s(t))\cos \alpha(t)\cos \beta(t) \quad (24) $$

The Lagrange function of the system is:

$$ L = T - V \quad (25) $$

According to the Lagrange equation:

$$ \frac{d}{dt} \left( \frac{\partial L_a}{\partial \dot{q}_j} \right) - \frac{\partial L_a}{\partial q_j} = 0 \quad (26) $$

The second order differential equation for the dynamics of the vessel crane system is derived by simplification:

$$ \ddot{s}(t) = (L + s(t))\dot{\alpha}^2(t) \cos^2 \beta(t) - \frac{k}{m}s(t) + (L + s(t))\dot{\beta}^2(t) + g\cos \alpha(t)\cos \beta(t) \quad (27) $$

$$ \ddot{\alpha}(t) = -\frac{2\dot{s}(t)\dot{\alpha}(t)}{L+s(t)} + 2\dot{\alpha}(t)\dot{\beta}(t)\frac{\sin \beta(t)}{\cos \beta(t)} - \frac{g\sin \alpha(t)}{(L+s(t))\cos \beta(t)} \quad (28) $$

$$ \ddot{\beta}(t) = -\frac{2\dot{s}(t)\dot{\beta}(t)}{L+s(t)} - \dot{\alpha}^2(t)\sin \beta(t)\cos \beta(t) - \frac{g}{(L+s(t))}\cos \alpha(t)\sin \beta(t) \quad (29) $$

where L is the length of the rope at rest (m); λ is the extension of the rope at rest (m); s is the rope elongation in motion (m); m is the mass of the load (kg).

## 2.4. Hydrodynamic Calculations of Splash Zones

During offshore operations, the load is subject to hydrodynamic force that may break the rope when it passes through the splash zone. The equation of motion can be derived from the force applied to the load as follows:

$$ mg = F_t + F_h \quad (30) $$

where F_t is the elasticity of the rope (N); F_h is the hydrodynamic force on the rope (N).

From the differential equation for the second-order dynamics of the rope crane, the elongation of the rope can be determined as s. The elasticity of the rope can therefore be expressed as:

$$ F_t = m\ddot{s} + z\dot{s} + ks \quad (31) $$

where z is the damping factor (N·s/m); k is the elasticity factor (N/m).
GP is expressed as:

$$ egin{cases} x_G(t) = (L + s(t)) \sin \alpha(t) \cos \beta(t) \\ y_G(t) = -(L + s(t)) \sin \beta(t) \\ z_G(t) = (L + s(t)) \cos \alpha(t) \cos \beta(t) \end{cases} \quad (22) $$

The total kinetic energy of the vessel crane system is:

$$ T = \frac{1}{2} m \dot{x}_G^2(t) + \frac{1}{2} m \dot{y}_G^2(t) + \frac{1}{2} m \dot{z}_G^2(t) \quad (23) $$

The total potential energy of the system is:

$$ V = \frac{1}{2} k(s(t))^2 + mg(L + \lambda) - mg(L + s(t))\cos \alpha(t)\cos \beta(t) \quad (24) $$

The Lagrange function of the system is:

$$ L = T - V \quad (25) $$

According to the Lagrange equation:

$$ \frac{d}{dt} \left( \frac{\partial L_a}{\partial \dot{q}_j} \right) - \frac{\partial L_a}{\partial q_j} = 0 \quad (26) $$

The second order differential equation for the dynamics of the vessel crane system is derived by simplification:

$$ \ddot{s}(t) = (L + s(t))\dot{\alpha}^2(t) \cos^2 \beta(t) - \frac{k}{m}s(t) + (L + s(t))\dot{\beta}^2(t) + g\cos \alpha(t)\cos \beta(t) \quad (27) $$

$$ \ddot{\alpha}(t) = -\frac{2\dot{s}(t)\dot{\alpha}(t)}{L+s(t)} + 2\dot{\alpha}(t)\dot{\beta}(t)\frac{\sin \beta(t)}{\cos \beta(t)} - \frac{g\sin \alpha(t)}{(L+s(t))\cos \beta(t)} \quad (28) $$

$$ \ddot{\beta}(t) = -\frac{2\dot{s}(t)\dot{\beta}(t)}{L+s(t)} - \dot{\alpha}^2(t)\sin \beta(t)\cos \beta(t) - \frac{g}{(L+s(t))}\cos \alpha(t)\sin \beta(t) \quad (29) $$

where L is the length of the rope at rest (m); λ is the extension of the rope at rest (m); s is the rope elongation in motion (m); m is the mass of the load (kg).

## 2.4. Hydrodynamic Calculations of Splash Zones

During offshore operations, the load is subject to hydrodynamic force that may break the rope when it passes through the splash zone. The equation of motion can be derived from the force applied to the load as follows:

$$ mg = F_t + F_h \quad (30) $$

where F_t is the elasticity of the rope (N); F_h is the hydrodynamic force on the rope (N).

From the differential equation for the second-order dynamics of the rope crane, the elongation of the rope can be determined as s. The elasticity of the rope can therefore be expressed as:

$$ F_t = m\ddot{s} + z\dot{s} + ks \quad (31) $$

where z is the damping factor (N·s/m); k is the elasticity factor (N/m).
Since the modelling of waves has been done in the previous section, the hydrodynamic forces can be obtained here:

$$F_h = F_B + F_A + F_D \quad (32)$$

where F<sub>B</sub>, F<sub>A</sub>, and F<sub>D</sub> are the forces caused by buoyancy, added mass, and drag effects, respectively (N). In this paper it is assumed that the load is a sphere with a diameter of d = 2 m. The hydrodynamic force can therefore be simplified as [16]:

When d<sub>p</sub> > 0:

$$F_h = m_a(\ddot{z} - \dot{z}_0) \left(\frac{d_p}{d}\right) + \frac{1}{2} \rho C_D A_p (\dot{z} - \dot{z}_0) |\dot{z} - \dot{z}_0| \left(\frac{d_p}{d}\right) + \rho g V_p (d_p) \quad (33)$$

When d<sub>p</sub> ≤ 0:

$$F_h = 0 \quad (34)$$

where d<sub>p</sub> is the distance below the surface of the sea (m); m<sub>a</sub> is the additional mass of the spherical load (kg); V<sub>p</sub>(d<sub>p</sub>) is the volume of the object submerged in water (m<sup>3</sup>); d is the diameter of the object to be lifted (m); ρ is the density of seawater, ρ ≈ 1024 (kg/m<sup>3</sup>). d<sub>p</sub> can be found from the distance between the load and the water surface (z<sub>w</sub>):

$$d_p = \begin{cases} -z_w, & -d \le z_w \le 0 \\ d, & z_w \le -d \\ 0, & z_w \ge 0 \end{cases} \quad (35)$$

When z<sub>w</sub> = 0, the load just touches the water surface. The remaining terms in Equation (33) can be derived from the following equation:

$$m_a = \frac{1}{2} \rho \left( \frac{4}{3} \pi \left( \frac{d}{2} \right)^2 \right) \quad (36)$$

$$V_p(d_p) = \frac{\pi}{3} d_p^2 \left( \frac{3}{2} d - d_p \right) \quad (37)$$

$$A_p = \pi \left( \frac{d}{2} \right)^2 \quad (38)$$

## 2.5. Prediction of Heave Displacement Data

The detection and mechanical links usually cause time lags in the system, which seriously affects the compensation accuracy and stability. In order to reduce this effect, forecast of heave motion is often used to ensure the safety and efficiency of operations in advance [17]. Prediction variance increases with the number of periods. This paper uses time series prediction algorithm with the principle of minimum forecast variance. The collected time series are fitted with the autoregressive moving average (ARMA) model [18]. ARMA effectively uses a small amount of historical data to rapidly track the current degradation trend. And the least squares method is used for parameter estimation after fitting the ARMA model. The least square estimation is the smallest estimation of a residual sum. Model testing is to check whether the residual sequence has incomplete information. Then, as Figure 4 shows, it will predict the next sampling moment of heave displacement data.

The time series prediction algorithm is only applicable to smooth and non-white noise series. Therefore, the smoothness test must be performed before the time series can be predicted. When the time series is inherently non-smooth, it can be predicted when it is smooth after differencing. It is needed that the order of difference is not too large, otherwise the prediction accuracy will be low.
Since the modelling of waves has been done in the previous section, the hydrodynamic forces can be obtained here:

$$F_h = F_B + F_A + F_D \quad (32)$$

where $F_B$, $F_A$, and $F_D$ are the forces caused by buoyancy, added mass, and drag effects, respectively (N). In this paper it is assumed that the load is a sphere with a diameter of $d = 2$ m. The hydrodynamic force can therefore be simplified as [16]:

When $d_p > 0$:

$$F_h = m_a(\ddot{z} - \dot{z}_0) \left(\frac{d_p}{d}\right) + \frac{1}{2} \rho C_D A_p (\dot{z} - \dot{z}_0) |\dot{z} - \dot{z}_0| \left(\frac{d_p}{d}\right) + \rho g V_p (d_p) \quad (33)$$

When $d_p \le 0$:

$$F_h = 0 \quad (34)$$

where $d_p$ is the distance below the surface of the sea (m); $m_a$ is the additional mass of the spherical load (kg); $V_p(d_p)$ is the volume of the object submerged in water (m³); $d$ is the diameter of the object to be lifted (m); $\rho$ is the density of seawater, $\rho \approx 1024$ (kg/m³). $d_p$ can be found from the distance between the load and the water surface ($z_w$):

$$d_p = \begin{cases} -z_w, & -d \le z_w \le 0 \\ d, & z_w \le -d \\ 0, & z_w \ge 0 \end{cases} \quad (35)$$

When $z_w = 0$, the load just touches the water surface. The remaining terms in Equation (33) can be derived from the following equation:

$$m_a = \frac{1}{2} \rho \left( \frac{4}{3} \pi \left( \frac{d}{2} \right)^2 \right) \quad (36)$$

$$V_p(d_p) = \frac{\pi}{3} d_p^2 \left( \frac{3}{2} d - d_p \right) \quad (37)$$

$$A_p = \pi \left( \frac{d}{2} \right)^2 \quad (38)$$

## 2.5. Prediction of Heave Displacement Data

The detection and mechanical links usually cause time lags in the system, which seriously affects the compensation accuracy and stability. In order to reduce this effect, forecast of heave motion is often used to ensure the safety and efficiency of operations in advance [17]. Prediction variance increases with the number of periods. This paper uses time series prediction algorithm with the principle of minimum forecast variance. The collected time series are fitted with the autoregressive moving average (ARMA) model [18]. ARMA effectively uses a small amount of historical data to rapidly track the current degradation trend. And the least squares method is used for parameter estimation after fitting the ARMA model. The least square estimation is the smallest estimation of a residual sum. Model testing is to check whether the residual sequence has incomplete information. Then, as Figure 4 shows, it will predict the next sampling moment of heave displacement data.

The time series prediction algorithm is only applicable to smooth and non-white noise series. Therefore, the smoothness test must be performed before the time series can be predicted. When the time series is inherently non-smooth, it can be predicted when it is smooth after differencing. It is needed that the order of difference is not too large, otherwise the prediction accuracy will be low.
<figure><img src="image_8.png" /><figcaption>Figure 4. Time series prediction flow chart.</figcaption></figure>

The expression for ARMA (p, q) is:

$$x_t = \phi_0 + \phi_1 x_{t-1} + \dots + \phi_p x_{t-p} + \varepsilon_t - \theta_1 \varepsilon_{t-1} - \dots - \theta_q \varepsilon_{t-q} \quad (39)$$

where $\phi_1, \phi_2, \dots, \phi_p$ denote the autoregressive coefficient, $\theta_1, \theta_2, \dots, \theta_q$ denote the sliding average coefficient, $\varepsilon_t$ denotes the white noise sequence. The expected value of the $\varepsilon_t$ is 0 and the variance value of the $\varepsilon_t$ is $\sigma_\varepsilon$. The following are statistical characteristics:

Average value:

$$E(x_t) = \frac{\Phi_0}{1 - \Phi_1 - \dots - \Phi_p} \quad (40)$$

Variance:

$$\mathrm{Var}(x_t) = \sum_{j=0}^{\infty} G_j^2 \sigma_\varepsilon^2 \quad (41)$$

Autocovariance:

$$\gamma(k) = \sigma_\varepsilon^2 \sum_{i=0}^{\infty} G_j G_{j+k} \quad (42)$$
<figure><img src="image_8.png" /><figcaption>Figure 4. Time series prediction flow chart.</figcaption></figure>

The expression for ARMA (p, q) is:

$$x_t = \phi_0 + \phi_1 x_{t-1} + \dots + \phi_p x_{t-p} + \varepsilon_t - \theta_1 \varepsilon_{t-1} - \dots - \theta_q \varepsilon_{t-q} \quad (39)$$

where $\phi_1, \phi_2, \dots, \phi_p$ denote the autoregressive coefficient, $\theta_1, \theta_2, \dots, \theta_q$ denote the sliding average coefficient, $\varepsilon_t$ denotes the white noise sequence. The expected value of the $\varepsilon_t$ is 0 and the variance value of the $\varepsilon_t$ is $\sigma_\varepsilon$. The following are statistical characteristics:

Average value:

$$E(x_t) = \frac{\Phi_0}{1 - \Phi_1 - \dots - \Phi_p} \quad (40)$$

Variance:

$$\mathrm{Var}(x_t) = \sum_{j=0}^{\infty} G_j^2 \sigma_\varepsilon^2 \quad (41)$$

Autocovariance:

$$\gamma(k) = \sigma_\varepsilon^2 \sum_{i=0}^{\infty} G_j G_{j+k} \quad (42)$$
Autocorrelation coefficient:

$$ \rho(k) = \frac{\gamma(k)}{\gamma(0)} = \frac{\sum_{j=0}^{\infty} G_j G_{j+k}}{\sum_{j=0}^{\infty} G_j^2} \qquad (43) $$

$$ \left\{ \begin{array}{l} G_0 = 1 \\ G_k = \sum_{j=1}^{k} \Phi_j' G_{k-j} - \theta_k', k \ge 1 \end{array} \right. \quad \Phi_j' = \left\{ \begin{array}{l} \Phi_j, 1 \le j \le p \\ 0, j > p \end{array} \right. \quad \theta_k' = \left\{ \begin{array}{l} \theta_k, 1 \le k \le q \\ 0, k > q \end{array} \right. $$

According to Table 2, the autocorrelation coefficient (ACF) and partial autocorrelation coefficient (PACF) of the sample are used to identify the model. It can determine the order of undetermined model parameters p and q. After passing the time series smoothness test, the smooth non-white noise series will be predicted according to the Figure 4:

<table><caption>**Table 2.** Trailing and truncation characteristics of time series models.</caption><thead><tr><th>Model</th><th>ACF</th><th>PACF</th></tr></thead><tbody><tr><td>AR(p)</td><td>trailing</td><td>p-order truncation</td></tr><tr><td>MA(q)</td><td>q-order truncation</td><td>trailing</td></tr><tr><td>ARMA(p,q)</td><td>trailing</td><td>trailing</td></tr></tbody></table>

The heave displacement autocorrelation test chart and autocorrelation test chart are shown in Figure 5a,b:

<figure><img src="image_9.png" /><figcaption>**Figure 5.** The heave displacement autocorrelation test chart and autocorrelation test chart. (a) Heave displacement autocorrelation test chart; (b) Heave displacement partial autocorrelation test chart.</figcaption></figure>

## 2.6. Mathematical Model of PMSM

PMSM has the advantages of reliable operation, high efficiency, and a small size. So, this paper uses PMSM as the compensation mechanism. As shown in Figure 1, it can make the rope extend and contract.

The stator voltage equation is:

$$ \left\{ \begin{array}{l} u_d = \frac{d\psi_d}{dt} + R_s i_d - \psi_q \omega \\ u_q = \frac{d\psi_q}{dt} + R_s i_q + \psi_d \omega \end{array} \right. \qquad (44) $$

The equation for the flux linkage component is:

$$ \left\{ \begin{array}{l} \psi_d = L_d i_d + \psi_f \\ \psi_q = L_q i_q \end{array} \right. \qquad (45) $$
Autocorrelation coefficient:

$$ \rho(k) = \frac{\gamma(k)}{\gamma(0)} = \frac{\sum_{j=0}^{\infty} G_j G_{j+k}}{\sum_{j=0}^{\infty} G_j^2} \qquad (43) $$

$$ \left\{ \begin{array}{l} G_0 = 1 \\ G_k = \sum_{j=1}^{k} \Phi_j' G_{k-j} - \theta_k', k \ge 1 \end{array} \right. \quad \Phi_j' = \left\{ \begin{array}{l} \Phi_j, 1 \le j \le p \\ 0, j > p \end{array} \right. \quad \theta_k' = \left\{ \begin{array}{l} \theta_k, 1 \le k \le q \\ 0, k > q \end{array} \right. $$

According to Table 2, the autocorrelation coefficient (ACF) and partial autocorrelation coefficient (PACF) of the sample are used to identify the model. It can determine the order of undetermined model parameters p and q. After passing the time series smoothness test, the smooth non-white noise series will be predicted according to the Figure 4:

<table><caption>**Table 2.** Trailing and truncation characteristics of time series models.</caption><thead><tr><th>Model</th><th>ACF</th><th>PACF</th></tr></thead><tbody><tr><td>AR(p)</td><td>trailing</td><td>p-order truncation</td></tr><tr><td>MA(q)</td><td>q-order truncation</td><td>trailing</td></tr><tr><td>ARMA(p,q)</td><td>trailing</td><td>trailing</td></tr></tbody></table>

The heave displacement autocorrelation test chart and autocorrelation test chart are shown in Figure 5a,b:

<figure><img src="image_9.png" /><figcaption>**Figure 5.** The heave displacement autocorrelation test chart and autocorrelation test chart. (a) Heave displacement autocorrelation test chart; (b) Heave displacement partial autocorrelation test chart.</figcaption></figure>

## 2.6. Mathematical Model of PMSM

PMSM has the advantages of reliable operation, high efficiency, and a small size. So, this paper uses PMSM as the compensation mechanism. As shown in Figure 1, it can make the rope extend and contract.

The stator voltage equation is:

$$ \left\{ \begin{array}{l} u_d = \frac{d\psi_d}{dt} + R_s i_d - \psi_q \omega \\ u_q = \frac{d\psi_q}{dt} + R_s i_q + \psi_d \omega \end{array} \right. \qquad (44) $$

The equation for the flux linkage component is:

$$ \left\{ \begin{array}{l} \psi_d = L_d i_d + \psi_f \\ \psi_q = L_q i_q \end{array} \right. \qquad (45) $$
The electromagnetic torque equation is:

$$ T_e = \frac{3}{2} P_n (\psi_d i_q - \psi_q i_d) \\ = \frac{3}{2} P_n [\psi_f i_q + (L_d - L_q) i_d i_q] \quad (46) $$

The equation of motion is:

$$ T_e - T_L = J_m \frac{d\omega_r}{dt} + B\omega_r \quad (47) $$

where $\omega_r$ is the mechanical angular velocity of the motor (rad/s); $\omega$ is the electrical angular of the motor (rad/s); $u_d$, $u_q$; $\psi_d$, $\psi_q$; $i_d$, $i_q$; $L_d$, $L_q$ are the respectively the voltages (V), flux linkage component (Wb), current (A) and inductance (H) components expressed in the d-q frame; $R_s$ is the stator equivalent resistance (Ω); $\psi_f$ is the permanent magnet flux of the rotor (Wb); $T_L$ is the load torque (N·m); $J_m$ is the moment of inertia (kg/m²); $T_e$ is the electromagnetic torque (N·m); $P_n$ is the number of pole pairs.

In this paper, the reluctance torque is ignored because the surface-mounted PMSM is considered ($L_d = L_q = L$). So, the corresponding electromagnetic torque equation can be simplified as:

$$ T_e = \frac{3}{2} P_n \psi_f i_q \quad (48) $$

Combining Equations (44), (46), and (47), the state equation for the motor in the d-q coordinate system can be obtained as:

$$ \frac{d}{dt} \begin{bmatrix} i_d \\ i_q \\ \omega_r \end{bmatrix} = \begin{bmatrix} -\frac{R_s}{L} & P_n \omega_r & 0 \\ -P_n \omega_r & -\frac{R}{L} & -\frac{P_n \psi_f}{L} \\ 0 & \frac{1.5 P_n \psi_f}{J_m} & -\frac{P_n \psi_f}{J_m} \end{bmatrix} \begin{bmatrix} i_d \\ i_q \\ \omega_r \end{bmatrix} + \begin{bmatrix} \frac{u_d}{L} \\ \frac{u_d}{L} \\ -\frac{u_L}{J_m} \end{bmatrix} \quad (49) $$

In this paper, a maximum Torque per Ampere strategy is used for motor control. So, $i_d$ is controlled to be 0 and $i_q$ current is used for torque control in current loop which will be described in the next section.

### 3. Fractional-Order PID Controller

PMSM control used in this paper is based on a triple closed-loop control structure. The three-loop control diagram is shown in Figure 6.

<figure><img src="image_10.png" /><figcaption>Figure 6. Three closed-loop control diagram of the motor.</figcaption></figure>

Closed-loop control of the system can improve the following performance of the motor [19]. A triple closed-loop structure usually uses the PID controllers. However, it has poor tracking performance due to the complex wave disturbance of the system. Because differential and integral operators can only be 0 or 1 orders for P, PI, PD, or PID
The electromagnetic torque equation is:

$$ T_e = \frac{3}{2} P_n (\psi_d i_q - \psi_q i_d) \\ = \frac{3}{2} P_n [\psi_f i_q + (L_d - L_q) i_d i_q] \qquad (46) $$

The equation of motion is:

$$ T_e - T_L = J_m \frac{d\omega_r}{dt} + B\omega_r \qquad (47) $$

where $\omega_r$ is the mechanical angular velocity of the motor (rad/s); $\omega$ is the electrical angular of the motor (rad/s); $u_d, u_q; \psi_d, \psi_q; i_d, i_q; L_d, L_q$ are the respectively the voltages (V), flux linkage component (Wb), current (A) and inductance (H) components expressed in the d-q frame; $R_s$ is the stator equivalent resistance (Ω); $\psi_f$ is the permanent magnet flux of the rotor (Wb); $T_L$ is the load torque (N·m); $J_m$ is the moment of inertia (kg/m²); $T_e$ is the electromagnetic torque (N·m); $P_n$ is the number of pole pairs.

In this paper, the reluctance torque is ignored because the surface-mounted PMSM is considered ($L_d = L_q = L$). So, the corresponding electromagnetic torque equation can be simplified as:

$$ T_e = \frac{3}{2} P_n \psi_f i_q \qquad (48) $$

Combining Equations (44), (46), and (47), the state equation for the motor in the d-q coordinate system can be obtained as:

$$ \frac{d}{dt} \begin{bmatrix} i_d \\ i_q \\ \omega_r \end{bmatrix} = \begin{bmatrix} -\frac{R_s}{L} & P_n \omega_r & 0 \\ -P_n \omega_r & -\frac{R}{L} & -\frac{P_n \psi_f}{L} \\ 0 & \frac{1.5 P_n \psi_f}{J_m} & -\frac{P_n \psi_f}{J_m} \end{bmatrix} \begin{bmatrix} i_d \\ i_q \\ \omega_r \end{bmatrix} + \begin{bmatrix} \frac{u_d}{L} \\ \frac{u_d}{L} \\ -\frac{u_L}{J_m} \end{bmatrix} \qquad (49) $$

In this paper, a maximum Torque per Ampere strategy is used for motor control. So, $i_d$ is controlled to be 0 and $i_q$ current is used for torque control in current loop which will be described in the next section.

### 3. Fractional-Order PID Controller

PMSM control used in this paper is based on a triple closed-loop control structure. The three-loop control diagram is shown in Figure 6.

<figure><img src="image_10.png" /><figcaption>Figure 6. Three closed-loop control diagram of the motor.</figcaption></figure>

Closed-loop control of the system can improve the following performance of the motor [19]. A triple closed-loop structure usually uses the PID controllers. However, it has poor tracking performance due to the complex wave disturbance of the system. Because differential and integral operators can only be 0 or 1 orders for P, PI, PD, or PID
controllers, the number of DOF in terms of controller parameters is small. This paper uses fractional-order PID controllers instead of traditional PID controllers in the automatic position regulator (APR) [20]. Automatic speed regulator (ASR) and automatic current regulator (ACR) still use PID controller. In order to avoid the uncertainty and complexity of manual tuning of a fractional-order PID controller, the next section applies artificial intelligence based algorithms. It can refine their parameters and improve the accuracy of the control. For the speed loop where a PID controller is used, there are also problems with complex models and speed overshoot [21].

### 3.1. Basic Principle of FOPID Controller

During wave compensation, it is necessary to accurately place the load at the set position. Therefore, the position loop is particularly important in the three loops control. Because there is an integral link in the position loop, and the integral link will lead to the delay of the system. Although a given position signal can reach the desired position, the speed command will still maintain a high value due to the delay effect. The motor will continue to rotate at a high speed, and it will be forced to stop due to reverse rotation due to position overshoot. So, APR is set as the proportional controller.

If the servo system wants to satisfy that the position loop has no overshoot, the proportional gain of the system cannot be too large. This cannot meet the rapid response requirements of the system. The response speed and small steady-state error of the system limits the proportional gain of the controller. As a result, the rapidity and high accuracy of the control system cannot be guaranteed.

The concept of fractional-order calculus was developed in the seventeenth century [22]. Fractional-order calculus extends the traditional integral and differential operators from the integer order to the real order. It offers a greater range of feasibility and flexibility in system modelling and controller design methods than the classical integer order approach. It also provides a better closed-loop response and greater robustness to uncertainty [23]. Open-loop frequency response experiments are performed on the PMSM. It shows that in the middle and high-frequency range, the frequency response of the fractional-order model is closer to the actual frequency response of PMSM than the integer-order model [24]. FOPID controller can suppress the high-frequency and low-frequency disturbances. In other words, the robustness of the fractional-order controller is much better than the traditional PID controller. The transfer function of FOPID is shown in Equation (50):

$$G_c(s) = K_p + \frac{K_i}{s^\lambda} + K_d s^\mu \quad (50)$$

When the values of [λ, μ] are taken as [0, 0], [1, 0], [0, 1], [1, 1]. Fractional-order PID controller can be considered as a classical P, PI, PD, and PID controller. In this paper, 1/s^λ can be approached by connecting an integer-order integrator and a fractional-order differentiator approximated by an Oustaloup filter. As shown in Figure 7, and Equation (50) 5 parameters have to be determined to tune a FOPID. If the five parameters of the controller are set appropriately, a better control than conventional PID controllers can be achieved [25].

<figure><img src="image_11.png" /><figcaption>Figure 7. Fractional-order PID controller structure diagram.</figcaption></figure>
controllers, the number of DOF in terms of controller parameters is small. This paper uses fractional-order PID controllers instead of traditional PID controllers in the automatic position regulator (APR) [20]. Automatic speed regulator (ASR) and automatic current regulator (ACR) still use PID controller. In order to avoid the uncertainty and complexity of manual tuning of a fractional-order PID controller, the next section applies artificial intelligence based algorithms. It can refine their parameters and improve the accuracy of the control. For the speed loop where a PID controller is used, there are also problems with complex models and speed overshoot [21].

### 3.1. Basic Principle of FOPID Controller

During wave compensation, it is necessary to accurately place the load at the set position. Therefore, the position loop is particularly important in the three loops control. Because there is an integral link in the position loop, and the integral link will lead to the delay of the system. Although a given position signal can reach the desired position, the speed command will still maintain a high value due to the delay effect. The motor will continue to rotate at a high speed, and it will be forced to stop due to reverse rotation due to position overshoot. So, APR is set as the proportional controller.

If the servo system wants to satisfy that the position loop has no overshoot, the proportional gain of the system cannot be too large. This cannot meet the rapid response requirements of the system. The response speed and small steady-state error of the system limits the proportional gain of the controller. As a result, the rapidity and high accuracy of the control system cannot be guaranteed.

The concept of fractional-order calculus was developed in the seventeenth century [22]. Fractional-order calculus extends the traditional integral and differential operators from the integer order to the real order. It offers a greater range of feasibility and flexibility in system modelling and controller design methods than the classical integer order approach. It also provides a better closed-loop response and greater robustness to uncertainty [23]. Open-loop frequency response experiments are performed on the PMSM. It shows that in the middle and high-frequency range, the frequency response of the fractional-order model is closer to the actual frequency response of PMSM than the integer-order model [24]. FOPID controller can suppress the high-frequency and low-frequency disturbances. In other words, the robustness of the fractional-order controller is much better than the traditional PID controller. The transfer function of FOPID is shown in Equation (50):

$$G_c(s) = K_p + \frac{K_i}{s^\lambda} + K_d s^\mu \quad (50)$$

When the values of [λ, μ] are taken as [0, 0], [1, 0], [0, 1], [1, 1]. Fractional-order PID controller can be considered as a classical P, PI, PD, and PID controller. In this paper, 1/s^λ can be approached by connecting an integer-order integrator and a fractional-order differentiator approximated by an Oustaloup filter. As shown in Figure 7, and Equation (50) 5 parameters have to be determined to tune a FOPID. If the five parameters of the controller are set appropriately, a better control than conventional PID controllers can be achieved [25].

<figure><img src="image_11.png" /><figcaption>Figure 7. Fractional-order PID controller structure diagram.</figcaption></figure>
In order to ensure stability of the control loop, the open-loop frequency characteristics of the system need to satisfy the following two conditions:

$$ \operatorname{Arg}[G(j\omega_c)] = -\pi + \psi_m \quad (51) $$

$$ |G(j\omega_c)| = 1 \quad (52) $$

where $\psi_m$ is the phase margin (rad), $\omega_c$ is the gain crossover frequency (rad/s).

If the control loop needs to be strongly robust, it needs to satisfy:

$$ \left( \frac{d(\operatorname{Arg}[G(j\omega)]))}{d\omega} \right)_{\omega=\omega_c} = 0 \quad (53) $$

The constraint equation can be derived as:

$$ \begin{aligned} & \arctan \frac{K_d \omega_c^\mu \sin\left(\frac{\pi \mu}{2}\right) - K_i \omega_c^{-\lambda} \sin\left(\frac{\pi \lambda}{2}\right)}{K_p + K_i \omega_c^{-\lambda} \cos\left(\frac{\pi \lambda}{2}\right) + K_d \omega_c^\mu \cos\left(\frac{\pi \mu}{2}\right)} - \arctan(\omega_c T) \\ & = -\pi + \psi_m \end{aligned} \quad (54) $$

$$ \begin{aligned} & \frac{\sqrt{\left(K_p + K_i \omega_c^{-\lambda} \cos\left(\frac{\pi \lambda}{2}\right) + K_d \omega_c^\mu \cos\left(\frac{\pi \mu}{2}\right)\right)^2 + \left(K_d \omega_c^\mu \sin\left(\frac{\pi \mu}{2}\right) - K_i \omega_c^{-\lambda} \sin\left(\frac{\pi \lambda}{2}\right)\right)^2}}{\sqrt{1+(T\omega_c)^2}} \\ & = 1 \end{aligned} \quad (55) $$

$$ \frac{A'B - AB'}{A^2 + B^2} - \frac{T}{1 + (T\omega_c)^2} = 0 \quad (56) $$

$$ A = K_d \omega^\mu \sin\left(\frac{\pi \mu}{2}\right) - K_i \omega^{-\lambda} \sin\left(\frac{\pi \lambda}{2}\right) \quad (57) $$

$$ B = K_p + K_i \omega^{-\lambda} \cos\left(\frac{\pi \lambda}{2}\right) + K_d \omega^\mu \cos\left(\frac{\pi \mu}{2}\right) \quad (58) $$

$$ A' = \mu K_d \omega^{\mu-1} \sin\left(\frac{\pi \mu}{2}\right) + \lambda K_i \omega^{-\lambda-1} \sin\left(\frac{\pi \lambda}{2}\right) \quad (59) $$

$$ B' = -\lambda K_i \omega^{-\lambda-1} \cos\left(\frac{\pi \lambda}{2}\right) + \mu K_d \omega^{\mu-1} \cos\left(\frac{\pi \mu}{2}\right) \quad (60) $$

where T is the time constant of the controlled system. In the presented study, the phase margin of the controller is chosen to be 45° and the gain crossover frequency is chosen to be 80 rad/s.

## 3.2. Improved FOPID Based on GAPSO Algorithm

The position loop of PMSM allows accurate positioning. It is also an essential part of the entire triple closed-loop control system for stable and highly accurate operation. The objective of this paper is to propose control solutions in order to improve the tracking of the reference position for the load. Optimization of the values of the five parameters of the controller can increase the performance of the control system and achieve robustness. The calculation process of FOPID is complicated and it is necessary to select appropriate crossover frequency and phase margin. It is obvious that the tuning of the parameters of the FOPID will affect the controller performance. They can improve the robustness and performance of system. However, this will certainly make the parameter adjustment process more complicated [26]. So, these parameters should be chosen carefully. To be able to determine relevant parameters for the FOPID, an optimization algorithm based on a combination of genetic algorithm and particle swarm algorithm (GAPSO algorithm) is used to optimize the parameters.

Both genetic algorithms and particle swarm algorithms are optimization algorithms based on population search. Their flowchart is shown in Figure 8. More details about these two algorithms can be found in reference [27,28] for interested readers. However, particle
In order to ensure stability of the control loop, the open-loop frequency characteristics of the system need to satisfy the following two conditions:

$$ \operatorname{Arg}[G(j\omega_c)] = -\pi + \psi_m \quad (51) $$

$$ |G(j\omega_c)| = 1 \quad (52) $$

where $\psi_m$ is the phase margin (rad), $\omega_c$ is the gain crossover frequency (rad/s).

If the control loop needs to be strongly robust, it needs to satisfy:

$$ \left( \frac{d(\operatorname{Arg}[G(j\omega)]))}{d\omega} \right)_{\omega=\omega_c} = 0 \quad (53) $$

The constraint equation can be derived as:

$$ \arctan \frac{K_d \omega_c^\mu \sin\left(\frac{\pi \mu}{2}\right) - K_i \omega_c^{-\lambda} \sin\left(\frac{\pi \lambda}{2}\right)}{K_p + K_i \omega_c^{-\lambda} \cos\left(\frac{\pi \lambda}{2}\right) + K_d \omega_c^\mu \cos\left(\frac{\pi \mu}{2}\right)} - \arctan(\omega_c T) \\ = -\pi + \psi_m \quad (54) $$

$$ \frac{\sqrt{(K_p + K_i \omega_c^{-\lambda} \cos(\frac{\pi \lambda}{2}) + K_d \omega_c^\mu \cos(\frac{\pi \mu}{2}))^2 + (K_d \omega_c^\mu \sin(\frac{\pi \mu}{2}) - K_i \omega_c^{-\lambda} \sin(\frac{\pi \lambda}{2}))^2}}{\sqrt{1+(T\omega_c)^2}} = 1 \quad (55) $$

$$ \frac{A'B - AB'}{A^2 + B^2} - \frac{T}{1 + (T\omega_c)^2} = 0 \quad (56) $$

$$ A = K_d \omega^\mu \sin\left(\frac{\pi \mu}{2}\right) - K_i \omega^{-\lambda} \sin\left(\frac{\pi \lambda}{2}\right) \quad (57) $$

$$ B = K_p + K_i \omega^{-\lambda} \cos\left(\frac{\pi \lambda}{2}\right) + K_d \omega^\mu \cos\left(\frac{\pi \mu}{2}\right) \quad (58) $$

$$ A' = \mu K_d \omega^{\mu-1} \sin\left(\frac{\pi \mu}{2}\right) + \lambda K_i \omega^{-\lambda-1} \sin\left(\frac{\pi \lambda}{2}\right) \quad (59) $$

$$ B' = -\lambda K_i \omega^{-\lambda-1} \cos\left(\frac{\pi \lambda}{2}\right) + \mu K_d \omega^{\mu-1} \cos\left(\frac{\pi \mu}{2}\right) \quad (60) $$

where T is the time constant of the controlled system. In the presented study, the phase margin of the controller is chosen to be 45° and the gain crossover frequency is chosen to be 80 rad/s.

## 3.2. Improved FOPID Based on GAPSO Algorithm

The position loop of PMSM allows accurate positioning. It is also an essential part of the entire triple closed-loop control system for stable and highly accurate operation. The objective of this paper is to propose control solutions in order to improve the tracking of the reference position for the load. Optimization of the values of the five parameters of the controller can increase the performance of the control system and achieve robustness. The calculation process of FOPID is complicated and it is necessary to select appropriate crossover frequency and phase margin. It is obvious that the tuning of the parameters of the FOPID will affect the controller performance. They can improve the robustness and performance of system. However, this will certainly make the parameter adjustment process more complicated [26]. So, these parameters should be chosen carefully. To be able to determine relevant parameters for the FOPID, an optimization algorithm based on a combination of genetic algorithm and particle swarm algorithm (GAPSO algorithm) is used to optimize the parameters.

Both genetic algorithms and particle swarm algorithms are optimization algorithms based on population search. Their flowchart is shown in Figure 8. More details about these two algorithms can be found in reference [27,28] for interested readers. However, particle
swarm algorithm can easily lead to local optimum solutions, while genetic algorithms are slower to find the optimum. This paper introduces an optimization algorithm that includes a genetic algorithm into the particle swarm algorithm. This GAPSO algorithm is based on double population. The particles with better fitness obtained by PSO algorithm will start crossover and variation. Because GA has no selection link, the running time of the GAPSO program is faster than GA. Its flowchart is shown in Figure 9. Particle swarm algorithms can improve the convergence speed of the overall algorithm, while genetic algorithms can expand the search space and improve the limitations of particle swarm algorithms. The use of the GAPSO algorithm to adjust fractional-order PID controller parameters expands the solution space, while avoiding the problems of complex operations.

<figure><img src="image_12.png" /><figcaption>Figure 8. Particle swarm algorithm flowchart and genetic algorithm flowchart.</figcaption></figure>

The first population mentioned above serves mainly as detection, which has a higher probability of crossover and variation. It can generate completely new individuals for the population and enhance global search capabilities. The second population is called the development population and it has fast convergence as its main goal. It has a relatively low probability of crossover and variation, which is suitable for local searches for well-adapted individuals. At the end of a cycle of the algorithm, the individuals with the highest fitness of the other population are introduced into their own population. It enhances interactions between populations and speeds up the search, while preventing incomplete solutions from being obtained. A more complete description of the GAPSO algorithm can be found in [29].

The parameters of the fractional-order PID controller are adjusted by GAPSO algorithm. Both populations are 100 in number and 5 iterations are performed. The range of P,I,D and μ,λ are set as [0.01, 300] and [0.01, 2]. After the parameters are introduced into the system, the fitness is determined based on the ITAE in (62). Finally, after algorithm iteration and calculation, the parameters of fractional-order controller are:

$$G_{\text{GAPSO}}(s) = 281.977 + \frac{209.12}{s^{0.174}} + 267.41s^{0.16} \quad (61)$$
swarm algorithm can easily lead to local optimum solutions, while genetic algorithms are slower to find the optimum. This paper introduces an optimization algorithm that includes a genetic algorithm into the particle swarm algorithm. This GAPSO algorithm is based on double population. The particles with better fitness obtained by PSO algorithm will start crossover and variation. Because GA has no selection link, the running time of the GAPSO program is faster than GA. Its flowchart is shown in Figure 9. Particle swarm algorithms can improve the convergence speed of the overall algorithm, while genetic algorithms can expand the search space and improve the limitations of particle swarm algorithms. The use of the GAPSO algorithm to adjust fractional-order PID controller parameters expands the solution space, while avoiding the problems of complex operations.

<figure><img src="image_12.png" /><figcaption>Figure 8. Particle swarm algorithm flowchart and genetic algorithm flowchart.</figcaption></figure>

The first population mentioned above serves mainly as detection, which has a higher probability of crossover and variation. It can generate completely new individuals for the population and enhance global search capabilities. The second population is called the development population and it has fast convergence as its main goal. It has a relatively low probability of crossover and variation, which is suitable for local searches for well-adapted individuals. At the end of a cycle of the algorithm, the individuals with the highest fitness of the other population are introduced into their own population. It enhances interactions between populations and speeds up the search, while preventing incomplete solutions from being obtained. A more complete description of the GAPSO algorithm can be found in [29].

The parameters of the fractional-order PID controller are adjusted by GAPSO algorithm. Both populations are 100 in number and 5 iterations are performed. The range of P,I,D and μ,λ are set as [0.01, 300] and [0.01, 2]. After the parameters are introduced into the system, the fitness is determined based on the ITAE in (62). Finally, after algorithm iteration and calculation, the parameters of fractional-order controller are:

$$G_{\text{GAPSO}}(s) = 281.977 + \frac{209.12}{s^{0.174}} + 267.41s^{0.16} \quad (61)$$
<figure><img src="image_13.png" /><figcaption>Figure 9. GAPSO algorithm.</figcaption></figure>

4. Presentation and Discussion of Test Results

In this paper, the effect of compensation is analyzed using a MATLAB/Simulink to represent the overall system for crane operation in a level 4 sea state. The sea level is Z = 0 m and the crane point height (P<sub>tip</sub> in Figure 2) is Z = -25 m. The simulation parameters are shown in Table 3.

<table><caption>Table 3. Simulation parameters of system.</caption><thead><tr><td>Parameters</td><td>Value</td><td>Parameters</td><td>Value</td></tr></thead><tbody><tr><td>Vessel draft</td><td>6 m</td><td>Load diameter</td><td>2 m</td></tr><tr><td>Vessel width</td><td>19.2 m</td><td>Wave spreading factor</td><td>1</td></tr><tr><td>Vessel quality</td><td>63,622 kg</td><td>Significant wave height</td><td>3 m</td></tr><tr><td>Elasticity of the rope</td><td>8.2 × 10<sup>6</sup> N/m</td><td>Mean wave direction</td><td>Pi/4 rad</td></tr><tr><td>Load mass</td><td>21,000 kg</td><td>The density of water</td><td>1025 kg/m<sup>3</sup></td></tr></tbody></table>

The vessel is influenced by the waves to move up and down in the direction of the heave. After the crane load enters the water and is influenced by the hydrodynamic force, the line of the reference position will become curves. Due to wave effects, the tracking of the position of the crane load to the reference position is subject to strong errors. To illustrate the wave influence, a first simulation is done with a rope length equal to L = 5 m, and a load descending speed equal to V = 0.2 m/s. The position and heave error of the load in this case without compensation are shown in Figure 10.
<figure><img src="image_13.png" /><figcaption>Figure 9. GAPSO algorithm.</figcaption></figure>

4. Presentation and Discussion of Test Results

In this paper, the effect of compensation is analyzed using a MATLAB/Simulink to represent the overall system for crane operation in a level 4 sea state. The sea level is Z = 0 m and the crane point height (P<sub>tip</sub> in Figure 2) is Z = -25 m. The simulation parameters are shown in Table 3.

<table><caption>Table 3. Simulation parameters of system.</caption><thead><tr><td>Parameters</td><td>Value</td><td>Parameters</td><td>Value</td></tr></thead><tbody><tr><td>Vessel draft</td><td>6 m</td><td>Load diameter</td><td>2 m</td></tr><tr><td>Vessel width</td><td>19.2 m</td><td>Wave spreading factor</td><td>1</td></tr><tr><td>Vessel quality</td><td>63,622 kg</td><td>Significant wave height</td><td>3 m</td></tr><tr><td>Elasticity of the rope</td><td>8.2 × 10<sup>6</sup> N/m</td><td>Mean wave direction</td><td>Pi/4 rad</td></tr><tr><td>Load mass</td><td>21,000 kg</td><td>The density of water</td><td>1025 kg/m<sup>3</sup></td></tr></tbody></table>

The vessel is influenced by the waves to move up and down in the direction of the heave. After the crane load enters the water and is influenced by the hydrodynamic force, the line of the reference position will become curves. Due to wave effects, the tracking of the position of the crane load to the reference position is subject to strong errors. To illustrate the wave influence, a first simulation is done with a rope length equal to L = 5 m, and a load descending speed equal to V = 0.2 m/s. The position and heave error of the load in this case without compensation are shown in Figure 10.
<figure><img src="image_14.png" /><figcaption>**Figure 10.** L = 5 m, V = 0.2 m/s, The position and heave error of the load without the compensation.</figcaption></figure>

Using ARMA model for the prediction of the heave displacement, the reference value subtracts the actual value of position (the heave error) in the above Figure as the input signal of prediction. After using the above prediction method, the heave error and the prediction error are shown in Figure 11.

<figure><img src="image_15.png" /><figcaption>**Figure 11.** Heave error and heave error prediction.</figcaption></figure>

A zoom on the 66–74 s period for the predicted heave error results is shown in the top of Figure 11. These results show that ARMA models seem to be efficient tools for single-step prediction. These tools can be used efficiently for the compensating effect of the load’s movement and to reach a stable operation.

To objectively evaluate and analyze the performance of the different algorithms, the integral of the timeweightd absolute error (ITAE) is adopted in this paper. The performance criterion used is calculated by Equation (62):

$$J = \int_{0}^{\infty} t|e(t)|dt \qquad (62)$$

where e(t) is the error between the reference and the obtained value of the controlled parameter, and t is the time (s).

Figure 12 shows the results for different algorithms for the same reference signal for the position loop of PMSM. ASR and ACR use a PI controller. In this test case, only the PMSM is modeled. The input signal is set to a sinusoidal signal (Amplitude:10 m,
<figure><img src="image_14.png" /><figcaption>**Figure 10.** L = 5 m, V = 0.2 m/s, The position and heave error of the load without the compensation.</figcaption></figure>

Using ARMA model for the prediction of the heave displacement, the reference value subtracts the actual value of position (the heave error) in the above Figure as the input signal of prediction. After using the above prediction method, the heave error and the prediction error are shown in Figure 11.

<figure><img src="image_15.png" /><figcaption>**Figure 11.** Heave error and heave error prediction.</figcaption></figure>

A zoom on the 66–74 s period for the predicted heave error results is shown in the top of Figure 11. These results show that ARMA models seem to be efficient tools for single-step prediction. These tools can be used efficiently for the compensating effect of the load’s movement and to reach a stable operation.

To objectively evaluate and analyze the performance of the different algorithms, the integral of the timeweightd absolute error (ITAE) is adopted in this paper. The performance criterion used is calculated by Equation (62):

$$J = \int_{0}^{\infty} t|e(t)|dt \qquad (62)$$

where e(t) is the error between the reference and the obtained value of the controlled parameter, and t is the time (s).

Figure 12 shows the results for different algorithms for the same reference signal for the position loop of PMSM. ASR and ACR use a PI controller. In this test case, only the PMSM is modeled. The input signal is set to a sinusoidal signal (Amplitude:10 m,
frequency: 5 rad/s). A torque disturbance (with an amplitude of 400 N·m) is added at 1.4 s to observe the behavior of the position loop with different algorithms.

<figure><img src="image_16.png" /><figcaption>**Figure 12.** Comparison of simulation results for the position loop using different algorithms.</figcaption></figure>

Simulation results presented in Figure 12 show that the fractional-order PID controller parameters adjusted using the GAPSO algorithm have the lowest ITAE metric and the best steady state performance during operation. It is minimally affected by disturbances and can be returned to a stable position very quickly. The ITAE metrics above are shown in Table 4:

<table><caption>**Table 4.** ITAE metrics for each algorithm for the results of Figure 12.</caption><thead><tr><td>Algorithms</td><td>ITAE</td></tr></thead><tbody><tr><td>PID</td><td>5.4437</td></tr><tr><td>FOPID</td><td>2.3731</td></tr><tr><td>GAPSO</td><td>0.3024</td></tr></tbody></table>

### 4.1. Simulation When the Initial Rope Length *L* = 5 m and Fixed Position for the Load (*V* = 0 m/s)

A wave disturbance force is applied to the vessel and indirectly transferred to the crane load. The whole system is simulated using the system parameters and simulation conditions presented in Table 3.

A first simulation is done with a rope length *L* = 5 m and a fixed reference position for the load (*V* = 0 m/s). A comparison of the position response of the different algorithms is shown in Figure 13:

<figure><img src="image_17.png" /><figcaption>**Figure 13.** *L* = 5 m, *V* = 0 m/s, Position of the load with compensation.</figcaption></figure>
frequency: 5 rad/s). A torque disturbance (with an amplitude of 400 N·m) is added at 1.4 s to observe the behavior of the position loop with different algorithms.

<figure><img src="image_16.png" /><figcaption>**Figure 12.** Comparison of simulation results for the position loop using different algorithms.</figcaption></figure>

Simulation results presented in Figure 12 show that the fractional-order PID controller parameters adjusted using the GAPSO algorithm have the lowest ITAE metric and the best steady state performance during operation. It is minimally affected by disturbances and can be returned to a stable position very quickly. The ITAE metrics above are shown in Table 4:

<table><caption>**Table 4.** ITAE metrics for each algorithm for the results of Figure 12.</caption><thead><tr><td>Algorithms</td><td>ITAE</td></tr></thead><tbody><tr><td>PID</td><td>5.4437</td></tr><tr><td>FOPID</td><td>2.3731</td></tr><tr><td>GAPSO</td><td>0.3024</td></tr></tbody></table>

### 4.1. Simulation When the Initial Rope Length L = 5 m and Fixed Position for the Load (V = 0 m/s)

A wave disturbance force is applied to the vessel and indirectly transferred to the crane load. The whole system is simulated using the system parameters and simulation conditions presented in Table 3.

A first simulation is done with a rope length L = 5 m and a fixed reference position for the load (V = 0 m/s). A comparison of the position response of the different algorithms is shown in Figure 13:

<figure><img src="image_17.png" /><figcaption>**Figure 13.** L = 5 m, V = 0 m/s, Position of the load with compensation.</figcaption></figure>
As can be seen in Figures 12 and 13 and Table 5, the GAPSO algorithm has the best response curve among the above algorithms. A compensation efficiency indicator is used to evaluate the compensation effect.

<table><caption>**Table 5.** Compensation efficiency of different algorithms using results of Figure 13.</caption><thead><tr><th>Algorithms</th><th>η</th></tr></thead><tbody><tr><td>PID</td><td>96.432%</td></tr><tr><td>FOPID</td><td>96.949%</td></tr><tr><td>GAPSO</td><td>97.369%</td></tr></tbody></table>

The compensation efficiency indicator is calculated using the integral of the heave errors over time with and without compensation:

$$ \eta = 1 - \frac{\int_{0}^{t} |e_{1}(t)| dt}{\int_{0}^{t} |e_{2}(t)| dt} \times 100\% \qquad (63) $$

where $e_1(t)$ is the compensated heave error; $e_2(t)$ is the heave error without the compensation.

As shown in Figure 14, the load will deviate from the reference position due to wave disturbance forces, a large heave error is generated in the vertical direction. However, with the action of the compensation motor, the heave error is greatly reduced after compensation. The compensation efficiencies (calculated by Equation (63)) are given in Table 5.

<figure><img src="image_18.png" /><figcaption>**Figure 14.** L = 5 m, V = 0 m/s, Heave errors with and without compensation.</figcaption></figure>

## 4.2. Simulation When the Initial Rope Length L = 5 m and the Lowering Speed of the Rope V = 0.2 m/s

In a second simulation, a descending speed of V = 0.2 m/s and an initial rope length equal to V = 5 m are considered with the same system parameters and environmental conditions than in subsection A, the simulation time is set to 110 s. Considering the effect of wave height, the load finally encountered the sea surface at approximately 96 s. The position of the load without compensation is shown in Figure 15 and the position of the load with compensation is shown in Figure 16.
As can be seen in Figures 12 and 13 and Table 5, the GAPSO algorithm has the best response curve among the above algorithms. A compensation efficiency indicator is used to evaluate the compensation effect.

<table><caption>**Table 5.** Compensation efficiency of different algorithms using results of Figure 13.</caption><thead><tr><th>Algorithms</th><th>η</th></tr></thead><tbody><tr><td>PID</td><td>96.432%</td></tr><tr><td>FOPID</td><td>96.949%</td></tr><tr><td>GAPSO</td><td>97.369%</td></tr></tbody></table>

The compensation efficiency indicator is calculated using the integral of the heave errors over time with and without compensation:

$$ \eta = 1 - \frac{\int_{0}^{t} |e_{1}(t)| dt}{\int_{0}^{t} |e_{2}(t)| dt} \times 100\% \qquad (63) $$

where $e_1(t)$ is the compensated heave error; $e_2(t)$ is the heave error without the compensation.

As shown in Figure 14, the load will deviate from the reference position due to wave disturbance forces, a large heave error is generated in the vertical direction. However, with the action of the compensation motor, the heave error is greatly reduced after compensation. The compensation efficiencies (calculated by Equation (63)) are given in Table 5.

<figure><img src="image_18.png" /><figcaption>**Figure 14.** L = 5 m, V = 0 m/s, Heave errors with and without compensation.</figcaption></figure>

## 4.2. Simulation When the Initial Rope Length L = 5 m and the Lowering Speed of the Rope V = 0.2 m/s

In a second simulation, a descending speed of V = 0.2 m/s and an initial rope length equal to V = 5 m are considered with the same system parameters and environmental conditions than in subsection A, the simulation time is set to 110 s. Considering the effect of wave height, the load finally encountered the sea surface at approximately 96 s. The position of the load without compensation is shown in Figure 15 and the position of the load with compensation is shown in Figure 16.
<figure><img src="image_19.png" /><figcaption>**Figure 15.** L = 5 m, V = 0.2 m/s, Position of the load before compensation.</figcaption></figure>

<figure><img src="image_20.png" /><figcaption>**Figure 16.** L = 5 m, V = 0.2 m/s Position of the load with compensation.</figcaption></figure>

As can be seen in the Figures 15 and 16, the load essentially descends in accordance with the reference position if compensation is used. After 96 s, the load is under the sea surface and the sea surface height is added to the reference position of the load to prevent the rope from breaking suddenly (wave synchronization control strategy) [30]. This is why the reference position of the load becomes an irregular curve. Figures 17 and 18 present rope tension and hydrodynamic forces on the load without and with wave synchronization strategy, respectively. From Figure 17, when the load is not in contact with the water, the hydrodynamic force is zero. After 96 s when the load is in contact with the water, the water will produce an upward impact on the load and buoyancy to reduce the tension of the rope. When the wave synchronizations control strategy is used, the tension of the rope, shown in Figure 18, is significantly reduced compared to Figure 17. This wave synchronization strategy allows for prevention of the rope breaking suddenly during operation.
<figure><img src="image_19.png" /><figcaption>**Figure 15.** L = 5 m, V = 0.2 m/s, Position of the load before compensation.</figcaption></figure>

<figure><img src="image_20.png" /><figcaption>**Figure 16.** L = 5 m, V = 0.2 m/s Position of the load with compensation.</figcaption></figure>

As can be seen in the Figures 15 and 16, the load essentially descends in accordance with the reference position if compensation is used. After 96 s, the load is under the sea surface and the sea surface height is added to the reference position of the load to prevent the rope from breaking suddenly (wave synchronization control strategy) [30]. This is why the reference position of the load becomes an irregular curve. Figures 17 and 18 present rope tension and hydrodynamic forces on the load without and with wave synchronization strategy, respectively. From Figure 17, when the load is not in contact with the water, the hydrodynamic force is zero. After 96 s when the load is in contact with the water, the water will produce an upward impact on the load and buoyancy to reduce the tension of the rope. When the wave synchronizations control strategy is used, the tension of the rope, shown in Figure 18, is significantly reduced compared to Figure 17. This wave synchronization strategy allows for prevention of the rope breaking suddenly during operation.
<figure><img src="image_21.png" /><figcaption>**Figure 17.** L = 5 m, V = 0.2 m/s rope tension and hydrodynamic forces on the load without wave synchronization.</figcaption></figure>

<figure><img src="image_22.png" /><figcaption>**Figure 18.** L = 5 m, V = 0.2 m/s rope tension and hydrodynamic forces on the load with wave synchronization.</figcaption></figure>

In the studied case, as shown in Figure 19 (which presents the heave errors) and Table 6 (which presents the compensation efficiencies for the different studied methods), PMSM with fractional-order PID controller tuned by GAPSO allows for a better compensation control than other methods.

<table><caption>**Table 6.** Compensation efficiency for different algorithms using results of Figure 19.</caption><thead><tr><td>Algorithms</td><td>η</td></tr></thead><tbody><tr><td>PID</td><td>96.773%</td></tr><tr><td>FOPID</td><td>95.268%</td></tr><tr><td>GAPSO</td><td>96.135%</td></tr></tbody></table>
<figure><img src="image_21.png" /><figcaption>**Figure 17.** L = 5 m, V = 0.2 m/s rope tension and hydrodynamic forces on the load without wave synchronization.</figcaption></figure>

<figure><img src="image_22.png" /><figcaption>**Figure 18.** L = 5 m, V = 0.2 m/s rope tension and hydrodynamic forces on the load with wave synchronization.</figcaption></figure>

In the studied case, as shown in Figure 19 (which presents the heave errors) and Table 6 (which presents the compensation efficiencies for the different studied methods), PMSM with fractional-order PID controller tuned by GAPSO allows for a better compensation control than other methods.

<table><caption>**Table 6.** Compensation efficiency for different algorithms using results of Figure 19.</caption><thead><tr><td>Algorithms</td><td>η</td></tr></thead><tbody><tr><td>PID</td><td>96.773%</td></tr><tr><td>FOPID</td><td>95.268%</td></tr><tr><td>GAPSO</td><td>96.135%</td></tr></tbody></table>
<figure><img src="image_23.png" /><figcaption>**Figure 19.** L = 5 m, V = 0.2 m/s, Heave errors with and without compensation.</figcaption></figure>

4.3. *Simulation When the Initial Rope Length L = 27 m and the Rising Speed of the Rope of 0.2 m/s*

In a third studied case, the initial rope length is set to 27 m, the load is submerged 2 m below sea level before rising at a speed of 0.2 m/s. Considering the effect of wave height, the load passes through the sea surface at roughly 15 s. A wave synchronization control strategy is added before t = 15 s when the load is in the contact with the sea. The simulation time was set to 110 s. The position of the load without compensation is shown in Figure 20 and the position of the load with compensation is shown in Figure 21.

<figure><img src="image_24.png" /><figcaption>**Figure 20.** L = 27 m, V = -0.2 m/s, Position of the load without compensation.</figcaption></figure>

The diagram shows that the longer the starting rope length, the more violent the swaying of the rope, resulting in significant heave errors. As the rope length is gradually shortened during operation, the swaying of the rope becomes progressively smaller. When a compensation control is used, the load can basically rise in accordance with the reference position.

The position of the load without and with compensation with the studied methods is shown in Figure 2. The corresponding heave errors are shown in Figure 22. And Table 7 shows the compensation efficiency of the third study case.
<figure><img src="image_23.png" /><figcaption>**Figure 19.** L = 5 m, V = 0.2 m/s, Heave errors with and without compensation.</figcaption></figure>

4.3. *Simulation When the Initial Rope Length L = 27 m and the Rising Speed of the Rope of 0.2 m/s*

In a third studied case, the initial rope length is set to 27 m, the load is submerged 2 m below sea level before rising at a speed of 0.2 m/s. Considering the effect of wave height, the load passes through the sea surface at roughly 15 s. A wave synchronization control strategy is added before t = 15 s when the load is in the contact with the sea. The simulation time was set to 110 s. The position of the load without compensation is shown in Figure 20 and the position of the load with compensation is shown in Figure 21.

<figure><img src="image_24.png" /><figcaption>**Figure 20.** L = 27 m, V = -0.2 m/s, Position of the load without compensation.</figcaption></figure>

The diagram shows that the longer the starting rope length, the more violent the swaying of the rope, resulting in significant heave errors. As the rope length is gradually shortened during operation, the swaying of the rope becomes progressively smaller. When a compensation control is used, the load can basically rise in accordance with the reference position.

The position of the load without and with compensation with the studied methods is shown in Figure 2. The corresponding heave errors are shown in Figure 22. And Table 7 shows the compensation efficiency of the third study case.
<figure><img src="image_25.png" /><figcaption>Figure 21. L = 27 m, V = -0.2 m/s Position of the load with compensation with the 3 studied methods.</figcaption></figure>

<figure><img src="image_26.png" /><figcaption>Figure 22. L = 27 m, V = -0.2 m/s, Heave errors with and without compensation.</figcaption></figure>

<table><caption>Table 7. Compensation efficiency for different algorithms and the results of Figure 22.</caption><thead><tr><td>Algorithms</td><td>η</td></tr></thead><tbody><tr><td>PID</td><td>92.426%</td></tr><tr><td>FOPID</td><td>93.607%</td></tr><tr><td>GAPSO</td><td>94.068%</td></tr></tbody></table>

The evolution of the rope tension with and without the wave synchronization control strategy is shown in Figures 23 and 24. As in the previous case (subsection B), it is shown that the wave synchronization control strategy can limit significantly the rope tension.

As a synthesis the presented results show the efficiency of the proposed methods for a better tracking of the load position in all the studied cases. The heave error is strongly reduced by the proposed GAPSO/FOPID compensation control strategy.

The wave synchronizations strategy can also make the rope tension change smoothly when entering or leaving the water, which is important for the actual work of the vessel in the sea.
<figure><img src="image_25.png" /><figcaption>**Figure 21.** L = 27 m, V = -0.2 m/s Position of the load with compensation with the 3 studied methods.</figcaption></figure>

<figure><img src="image_26.png" /><figcaption>**Figure 22.** L = 27 m, V = -0.2 m/s, Heave errors with and without compensation.</figcaption></figure>

<table><caption>**Table 7.** Compensation efficiency for different algorithms and the results of Figure 22.</caption><thead><tr><td>Algorithms</td><td>η</td></tr></thead><tbody><tr><td>PID</td><td>92.426%</td></tr><tr><td>FOPID</td><td>93.607%</td></tr><tr><td>GAPSO</td><td>94.068%</td></tr></tbody></table>

The evolution of the rope tension with and without the wave synchronization control strategy is shown in Figures 23 and 24. As in the previous case (subsection B), it is shown that the wave synchronization control strategy can limit significantly the rope tension.

As a synthesis the presented results show the efficiency of the proposed methods for a better tracking of the load position in all the studied cases. The heave error is strongly reduced by the proposed GAPSO/FOPID compensation control strategy.

The wave synchronizations strategy can also make the rope tension change smoothly when entering or leaving the water, which is important for the actual work of the vessel in the sea.
<figure><img src="image_27.png" /><figcaption>**Figure 23.** L = 27 m, V = -0.2 m/s, rope tension and hydrodynamic forces without using adding wave synchronization strategy.</figcaption></figure>

<figure><img src="image_28.png" /><figcaption>**Figure 24.** L = 27 m, V = -0.2 m/s, rope tension and hydrodynamic forces on the load with wave synchronization.</figcaption></figure>

**5. Conclusions**

An efficient strategy is proposed for wave compensation on a ship crane. This strategy associates a fractional-order PID based on a controller for the PMSM motor used for wave compensation in the crane system. A combined particle swarm and genetic algorithm is used to improve the parameters of the proposed controller. A wave synchronization strategy with reasonable prediction of heave displacements of the load is also used and proposed. In order to validate the proposed strategy, the overall structure of the system has been simulated in a MATLAB/Simulink environment. This whole model includes ship motion model, mechanical model of the crane, wave model, and compensation motor and motor control model. This simulation tool allows for representing the whole system's behavior with accuracy. Simulation results on representative test cases show that the proposed approach is able to significantly improve the behavior of the system compared with more classical methods.
<figure><img src="image_27.png" /><figcaption>**Figure 23.** L = 27 m, V = -0.2 m/s, rope tension and hydrodynamic forces without using adding wave synchronization strategy.</figcaption></figure>

<figure><img src="image_28.png" /><figcaption>**Figure 24.** L = 27 m, V = -0.2 m/s, rope tension and hydrodynamic forces on the load with wave synchronization.</figcaption></figure>

**5. Conclusions**

An efficient strategy is proposed for wave compensation on a ship crane. This strategy associates a fractional-order PID based on a controller for the PMSM motor used for wave compensation in the crane system. A combined particle swarm and genetic algorithm is used to improve the parameters of the proposed controller. A wave synchronization strategy with reasonable prediction of heave displacements of the load is also used and proposed. In order to validate the proposed strategy, the overall structure of the system has been simulated in a MATLAB/Simulink environment. This whole model includes ship motion model, mechanical model of the crane, wave model, and compensation motor and motor control model. This simulation tool allows for representing the whole system's behavior with accuracy. Simulation results on representative test cases show that the proposed approach is able to significantly improve the behavior of the system compared with more classical methods.
**Author Contributions:** Conceptualization, H.C., X.W., M.B., J.H. and J.-F.C.; methodology, H.C.; software, X.W.; validation, H.C. and X.W.; writing—original draft preparation, X.W.; writing—review and editing, H.C., M.B., J.H., J.-F.C. and N.A.-A.; visualization, X.W.; supervision, H.C., M.B., J.H. and J.-F.C.; project administration, H.C.; funding acquisition, H.C. and M.B. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was supported by: (a) National Natural Science Foundation of China, China (Grant No. 61503242, 61673260); (b) Shanghai Science and Technology Commission project (Grant No. 20040501200); (c) Science & Technology Commission of Shanghai Municipality and Shanghai Engineering Research Center of Ship Intelligent Maintenance and Energy Efficiency under Grant 20DZ2252300.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The data that support the findings of this study are available within the article.

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analysis, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

## Appendix A

<figure><img src="image_29.png" /><figcaption>**Figure A1.** The movement form of the compensation system.</figcaption></figure>

<figure><img src="image_30.png" /><figcaption>**Figure A2.** The position setting module.</figcaption></figure>
**Author Contributions:** Conceptualization, H.C., X.W., M.B., J.H. and J.-F.C.; methodology, H.C.; software, X.W.; validation, H.C. and X.W.; writing—original draft preparation, X.W.; writing—review and editing, H.C., M.B., J.H., J.-F.C. and N.A.-A.; visualization, X.W.; supervision, H.C., M.B., J.H. and J.-F.C.; project administration, H.C.; funding acquisition, H.C. and M.B. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was supported by: (a) National Natural Science Foundation of China, China (Grant No. 61503242, 61673260); (b) Shanghai Science and Technology Commission project (Grant No. 20040501200); (c) Science & Technology Commission of Shanghai Municipality and Shanghai Engineering Research Center of Ship Intelligent Maintenance and Energy Efficiency under Grant 20DZ2252300.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The data that support the findings of this study are available within the article.

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analysis, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

## Appendix A

<figure><img src="image_29.png" /><figcaption>**Figure A1.** The movement form of the compensation system.</figcaption></figure>

<figure><img src="image_30.png" /><figcaption>**Figure A2.** The position setting module.</figcaption></figure>
## References

1. Yang, J. The development and prospect of the offshore oil and gas industry. *Adv. Resour. Res.* **2021**, *1*, 1–3.

2. Liu, Y.; Lu, H.; Li, Y.; Xu, H.; Pan, Z.; Dai, P.; Wang, H.; Yang, Q. A review of treatment technologies for produced water in offshore oil and gas fields. *Sci. Total Environ.* **2021**, *775*, 145–485. [CrossRef] [PubMed]

3. Woodacre, J.K.; Bauer, R.J.; Irani, R.A. A review of Vertical Motion Heave Compensation Systems. *Ocean Eng.* **2015**, *104*, 140–154. [CrossRef]

4. Wu, W.; Liu, X.; Guo, Z.; Wang, H. Real time-delay control of active heave compensation system for marine crane. *Chin. Hydraul. Pneumatics.* **2021**, *45*, 167.

5. Shrenik, Z.; Abhilash, S. A comparative study of different active heave compensation approaches. *Ocean. Syst. Eng.* **2020**, *10*, 373–399.

6. Southerland, A. Mechanical systems for ocean engineering. *Nav. Eng. J.* **1970**, *82*, 63–74. [CrossRef]

7. Do, K.; Pan, J. Nonlinear control of an active heave compensation system. *Ocean Eng.* **2008**, *35*, 558–571. [CrossRef]

8. Johansen, T.A.; Fossen, T.I.; Sagatun, S.I.; Nielsen, F.G. Wave synchronizing crane control during water entry in offshore moonpool operations. *IEEE J. Ocean. Eng.* **2003**, *28*, 720–728. [CrossRef]

9. Yan, F.; Fan, K.; Yan, X.; Li, S. Constant tension control of hybrid active-passive heave compensator based on adaptive integral sliding mode method. *IEEE Access* **2020**, *8*, 103782–103791. [CrossRef]

10. Sandre-Hernandez, O.; Morales-Caporal, R.; Rangel-Magdaleno, J.; Peregrina-Barreto, H.; Hernandez-Perez, J.N. Parameter identification of PMSMs using experimental measurements and a PSO algorithm. *IEEE Trans. Instrum. Meas.* **2015**, *64*, 2146–2154. [CrossRef]

11. Sun, X.; Wu, M.; Lei, G.; Guo, Y.; Zhu, J. An Improved Model Predictive Current Control for PMSM Drives Based on Current Track Circle. *IEEE Trans. Ind. Electron.* **2021**, *68*, 3782–3793. [CrossRef]

12. Gao, J.; Liu, J.; Gong, C. A High-efficiency PMSM Sensorless Control Approach Based on MPC Controller. In Proceedings of the ICEON 2018-44th Annual Conference of the IEEE Industrial Electronics Society, Washington, DC, USA, 21–23 October 2018.

13. Zhang, H.; Liu, W.; Chen, Z.; Luo, G.; Liu, J.; Zhao, D. Asymmetric space vector modulation for PMSM sensorless drives based on square-wave voltage-injection method. *IEEE Trans. Ind. Appl.* **2018**, *54*, 1425–1436. [CrossRef]

14. Liu, G.; Chen, B.; Wang, K.; Song, X. Selective current harmonic suppression for high-speed PMSM based on high-precision harmonic detection method. *IEEE Trans. Ind. Inform.* **2018**, *15*, 3457–3468. [CrossRef]

15. Yasukawa, H.; Yoshimura, Y. Introduction of MMG standard method for ship maneuvering predictions. *J. Mar. Sci. Technol.* **2015**, *20*, 37–52. [CrossRef]

16. Johansen, T.A.; Fossen, T.I. *Modeling and Identification of Offshore Crane-Rig System*; Tech. rep; Department of Engineering Cybernetics, NTNU: Trondheim, Norway, 2001.

17. Chu, Y.; Li, G.; Zhang, H. Incorporation of ship motion prediction into active heave compensation for offshore crane operation. In Proceedings of the 2020–15th IEEE Conference on Industrial Electronics and Applications (ICIEA), Kristiansand, Norway, 9–13 November 2020.

18. Cai, B.; Wang, Z.; Zhu, H.; Liu, Y.; Hao, K.; Yang, Z.; Ren, Y.; Feng, Q.; Liu, Z. Artificial Intelligence Enhanced Two-Stage Hybrid Fault Prognosis Methodology of PMSM. *IEEE Trans. Ind. Inform.* **2021**, *18*, 7262–7273. [CrossRef]

19. Yu, L.; Wang, C.; Shi, H.; Xin, R.; Wang, L. Simulation of PMSM field-oriented control based on SVPWM. In Proceedings of the 2017–29th Chinese Control And Decision Conference (CCDC), Chongqing, China, 28–30 May 2017.

20. Zhang, T.; He, L. Secondary development of nonlinear creep model for element with fractional derivative. *J. East China Jiaotong Univ.* **2017**, *34*, 21–28. [CrossRef]

21. Karthikeyan, A.; Prabhakaran, K.; Nagamani, C. FPGA based direct torque control with speed loop Pseudo derivative controller for PMSM drive. *Clust. Comput.* **2018**, *22*, 13511–13519.

22. Wang, D.; Song, B. Design of Fractional-order Sliding Mode Controller for Permanent Magnet Synchronous Motor Based on PSO. *Electr. Drive.* **2017**, *50*, 8–12.

23. Shah, P.; Agashe, S. Review of fractional PID controller. *Mechatronics* **2016**, *38*, 29–41. [CrossRef]

24. Zheng, W.; Luo, Y.; Chen, Y.; Pi, Y. Fractional-order modeling of permanent magnet synchronous motor speed servo system. *J. Vib. Control* **2016**, *22*, 2255–2280. [CrossRef]

25. Zheng, W.; Luo, Y.; Chen, Y.; Wang, X. A simplified fractional order PID controller’s optimal tuning: A case study on a PMSM speed servo. *Entropy* **2021**, *23*, 130. [CrossRef] [PubMed]

26. Yeroglu, C.; Tan, N. Note on fractional-order proportional-integral-differential controller design. *IET Control Theory Appl.* **2011**, *5*, 1978–1989. [CrossRef]

27. Chaoui, H.; Khayamy, M.; Okoye, O.; Gualous, H. Simplified Speed Control of Permanent Magnet Synchronous Motors Using Genetic Algorithms. *IEEE Trans. Power Electron.* **2019**, *34*, 3563–3574. [CrossRef]

28. Mesloub, H.; Benchouia, M.T.; Goléa, A.; Goléa, N.; Benbouzid, M.E.H. Predictive DTC schemes with PI regulator and particle swarm optimization for PMSM drive: Comparative simulation and experimental study. *Int. J. Adv. Manuf. Technol.* **2016**, *86*, 3123–3134. [CrossRef]
References

1. Yang, J. The development and prospect of the offshore oil and gas industry. *Adv. Resour. Res.* **2021**, *1*, 1–3.

2. Liu, Y.; Lu, H.; Li, Y.; Xu, H.; Pan, Z.; Dai, P.; Wang, H.; Yang, Q. A review of treatment technologies for produced water in offshore oil and gas fields. *Sci. Total Environ.* **2021**, *775*, 145–485. [CrossRef] [PubMed]

3. Woodacre, J.K.; Bauer, R.J.; Irani, R.A. A review of Vertical Motion Heave Compensation Systems. *Ocean Eng.* **2015**, *104*, 140–154. [CrossRef]

4. Wu, W.; Liu, X.; Guo, Z.; Wang, H. Real time-delay control of active heave compensation system for marine crane. *Chin. Hydraul. Pneumatics.* **2021**, *45*, 167.

5. Shrenik, Z.; Abhilash, S. A comparative study of different active heave compensation approaches. *Ocean. Syst. Eng.* **2020**, *10*, 373–399.

6. Southerland, A. Mechanical systems for ocean engineering. *Nav. Eng. J.* **1970**, *82*, 63–74. [CrossRef]

7. Do, K.; Pan, J. Nonlinear control of an active heave compensation system. *Ocean Eng.* **2008**, *35*, 558–571. [CrossRef]

8. Johansen, T.A.; Fossen, T.I.; Sagatun, S.I.; Nielsen, F.G. Wave synchronizing crane control during water entry in offshore moonpool operations. *IEEE J. Ocean. Eng.* **2003**, *28*, 720–728. [CrossRef]

9. Yan, F.; Fan, K.; Yan, X.; Li, S. Constant tension control of hybrid active-passive heave compensator based on adaptive integral sliding mode method. *IEEE Access* **2020**, *8*, 103782–103791. [CrossRef]

10. Sandre-Hernandez, O.; Morales-Caporal, R.; Rangel-Magdaleno, J.; Peregrina-Barreto, H.; Hernandez-Perez, J.N. Parameter identification of PMSMs using experimental measurements and a PSO algorithm. *IEEE Trans. Instrum. Meas.* **2015**, *64*, 2146–2154. [CrossRef]

11. Sun, X.; Wu, M.; Lei, G.; Guo, Y.; Zhu, J. An Improved Model Predictive Current Control for PMSM Drives Based on Current Track Circle. *IEEE Trans. Ind. Electron.* **2021**, *68*, 3782–3793. [CrossRef]

12. Gao, J.; Liu, J.; Gong, C. A High-efficiency PMSM Sensorless Control Approach Based on MPC Controller. In Proceedings of the ICEON 2018-44th Annual Conference of the IEEE Industrial Electronics Society, Washington, DC, USA, 21–23 October 2018.

13. Zhang, H.; Liu, W.; Chen, Z.; Luo, G.; Liu, J.; Zhao, D. Asymmetric space vector modulation for PMSM sensorless drives based on square-wave voltage-injection method. *IEEE Trans. Ind. Appl.* **2018**, *54*, 1425–1436. [CrossRef]

14. Liu, G.; Chen, B.; Wang, K.; Song, X. Selective current harmonic suppression for high-speed PMSM based on high-precision harmonic detection method. *IEEE Trans. Ind. Inform.* **2018**, *15*, 3457–3468. [CrossRef]

15. Yasukawa, H.; Yoshimura, Y. Introduction of MMG standard method for ship maneuvering predictions. *J. Mar. Sci. Technol.* **2015**, *20*, 37–52. [CrossRef]

16. Johansen, T.A.; Fossen, T.I. *Modeling and Identification of Offshore Crane-Rig System*; Tech. rep; Department of Engineering Cybernetics, NTNU: Trondheim, Norway, 2001.

17. Chu, Y.; Li, G.; Zhang, H. Incorporation of ship motion prediction into active heave compensation for offshore crane operation. In Proceedings of the 2020–15th IEEE Conference on Industrial Electronics and Applications (ICIEA), Kristiansand, Norway, 9–13 November 2020.

18. Cai, B.; Wang, Z.; Zhu, H.; Liu, Y.; Hao, K.; Yang, Z.; Ren, Y.; Feng, Q.; Liu, Z. Artificial Intelligence Enhanced Two-Stage Hybrid Fault Prognosis Methodology of PMSM. *IEEE Trans. Ind. Inform.* **2021**, *18*, 7262–7273. [CrossRef]

19. Yu, L.; Wang, C.; Shi, H.; Xin, R.; Wang, L. Simulation of PMSM field-oriented control based on SVPWM. In Proceedings of the 2017–29th Chinese Control And Decision Conference (CCDC), Chongqing, China, 28–30 May 2017.

20. Zhang, T.; He, L. Secondary development of nonlinear creep model for element with fractional derivative. *J. East China Jiaotong Univ.* **2017**, *34*, 21–28. [CrossRef]

21. Karthikeyan, A.; Prabhakaran, K.; Nagamani, C. FPGA based direct torque control with speed loop Pseudo derivative controller for PMSM drive. *Clust. Comput.* **2018**, *22*, 13511–13519.

22. Wang, D.; Song, B. Design of Fractional-order Sliding Mode Controller for Permanent Magnet Synchronous Motor Based on PSO. *Electr. Drive.* **2017**, *50*, 8–12.

23. Shah, P.; Agashe, S. Review of fractional PID controller. *Mechatronics* **2016**, *38*, 29–41. [CrossRef]

24. Zheng, W.; Luo, Y.; Chen, Y.; Pi, Y. Fractional-order modeling of permanent magnet synchronous motor speed servo system. *J. Vib. Control* **2016**, *22*, 2255–2280. [CrossRef]

25. Zheng, W.; Luo, Y.; Chen, Y.; Wang, X. A simplified fractional order PID controller’s optimal tuning: A case study on a PMSM speed servo. *Entropy* **2021**, *23*, 130. [CrossRef] [PubMed]

26. Yeroglu, C.; Tan, N. Note on fractional-order proportional-integral-differential controller design. *IET Control Theory Appl.* **2011**, *5*, 1978–1989. [CrossRef]

27. Chaoui, H.; Khayamy, M.; Okoye, O.; Gualous, H. Simplified Speed Control of Permanent Magnet Synchronous Motors Using Genetic Algorithms. *IEEE Trans. Power Electron.* **2019**, *34*, 3563–3574. [CrossRef]

28. Mesloub, H.; Benchouia, M.T.; Goléa, A.; Goléa, N.; Benbouzid, M.E.H. Predictive DTC schemes with PI regulator and particle swarm optimization for PMSM drive: Comparative simulation and experimental study. *Int. J. Adv. Manuf. Technol.* **2016**, *86*, 3123–3134. [CrossRef]
29. Wu, X.; Wang, Y.; Zhang, T. An improved GAPSO hybrid programming algorithm. In Proceedings of the 2009 International Conference on Information Engineering and Computer Science (ICIECS), Wuhan, China, 19–20 December 2009.

30. Skaare, B.; Egeland, O. Parallel Force/Position Crane Control in Marine Operations. *IEEE J. Ocean. Eng.* **2006**, *31*, 599–613.
[CrossRef]
29. Wu, X.; Wang, Y.; Zhang, T. An improved GAPSO hybrid programming algorithm. In Proceedings of the 2009 International Conference on Information Engineering and Computer Science (ICIECS), Wuhan, China, 19–20 December 2009.

30. Skaare, B.; Egeland, O. Parallel Force/Position Crane Control in Marine Operations. *IEEE J. Ocean. Eng.* **2006**, *31*, 599–613.
[CrossRef]