Anti-Swaying Control Strategy of Ship-Mounted 3-RCU Parallel Platform Based on Dynamic Gravity Compensation

: It is essential to ensure stability during marine transportation or the installation of high center of gravity loads. The heavy loads increase gravity disturbance, affecting the steady-state-error control of the multiple degrees of freedom (DOFs) motion compensation platform. In this paper, we propose a proportional derivative (PD) controller with dynamic gravity compensation (PDGC) for a 3-RCU (revolute–cylindrical–universal) parallel platform to improve the control effect of marine motion compensation for high center of gravity loads. We introduce an evaluation parameter of load stability and a weighting coefficient of anti-swaying control to tune the controller performance. The controller can set its control target between the two, keeping the load contact surface level and allowing the load center of gravity with the least movement. By deriving the Jacobian matrix, the gravity disturbance in the joint space is calculated and is compensated in the controller. First, we verify the control superiority of this controller over the PD controller under sinusoidal excitation in simulation and validate the effectiveness of the proposed anti-swing strategy. Then, the experiments are conducted with random excitation. The root mean square (RMS) value of the load’s residual angle with the proposed controller is reduced to 32.2% and 17.6% in two directions, respectively, compared with the PD controller under class 4 sea state excitation. The proposed method is effective for the anti-swaying control of ship-mounted 3-RCU parallel platforms.


Introduction
With the continuous exploitation and utilization of marine resources, safe ocean operation becomes increasingly important, especially when the sea conditions are relatively rough [1].Vessels in the ocean are subjected to six degrees of freedom (DOFs) disturbances, including roll, pitch, yaw, surge, sway, and heave [2], which poses a challenge to marine operations.Therefore, installing motion compensation devices on offshore floating equipment and using them for real-time dynamic position adjustment to reduce the sway caused by the ocean can improve working performance and ensure the safety and reliability of offshore operations [3,4].
At the beginning of the 20th century, Schlick developed the world's first ship's motion compensation device, which used the gyroscope to sense changes in the ship's attitude and then control to produce resistance to the damping effect of the ship's transverse rocking [5].Although this mechanism can realize the reduction of 30~60% of the ship's turbulence movement within a certain speed range, it was a passive device with high cost and poor stability.In the decades that followed, researchers continued to work intensively on wave compensation mechanisms.Said et al. designed a 3-DOF serial compensation mechanism for use as a shipboard antenna stabilization platform [6].The dynamic model of the system was established, the effects of friction, inertia, and torque motors were considered, and a control structure consisting of three control loops was developed through the concept of decentralized control, the feasibility of which was verified by simulation.Sui et al. designed a three-axis tandem stage to improve the tracking accuracy and response speed of the stage by using a conventional proportional-integral-derivative (PID) controller with a feedforward velocity loop [7].Serial motion compensation platforms have been industrialized and widely used, but their limitations in carrying capacity, response speed, and positional accuracy affect their application in certain scenarios [8].In 1965, Stewart proposed a novel parallel mechanism with 6-DOF in space [9], and then scholars began an in-depth study on the parallel compensation platform based on the Stewart mechanism.Due to the advantages of high stiffness, fast response, and high precision [10,11], the application research of parallel platforms in wave compensation has become increasingly extensive.Some parallel platforms with fewer degrees of freedom have gradually become a research hotspot to meet the low cost and realize the compensation of major ocean disturbances.Jaouen et al. designed a 3-SPS/UR (spherical-prismatic-spherical/universal-revolute) 3-DOF parallel platform that achieves isolation from the three main disturbances in the ocean, i.e., roll, pitch, and heave; through its simulation, it can compensate for 90% of the wave disturbances under general conditions [12].Zeeuw designed a 3-SRR/RCR (spherical-revolute-revolute/revolute-cylindrical-revolute) parallel platform, analyzed the mechanism characteristics of the platform in detail, and applied model predictive control (MPC) to verify the effectiveness of the platform [13].Hu et al. investigated the kinematic characteristics of a 3UPU/UP (universal-prismatic-universal/universalprismatic)-coupled parallel platform with three DOFs and analyzed its advantages as a wave compensation platform [14].
In recent years, there has been more and more research on wave compensation control strategies, and they are focused on different application scenarios and proposed various control methods for wave motions with different degrees of freedom [15][16][17].Sui et al. proposed a three-degrees-of-freedom-stabilized platform control method consisting of a feedforward controller and a disturbance observer and verified the advantages of the combined control method in terms of dynamic performance and steady-state error through simulation [7].Campos et al. used the Stewart platform as an active helideck to ensure the safety of a helicopter landing at the ocean, and they used the traditional proportional derivative (PD) control for wave compensation, which was experimentally verified to be effective [18].Cai et al. proposed a sliding mode control strategy using Stewart as a wave compensation platform, and, at the same time, a new velocity feedforward compensator was proposed, and the effectiveness of the combined scheme was verified by simulation [19].To solve the trajectory tracking control problem of an offshore antenna platform, He et al. proposed an improved non-sinusoidal end-integrated sliding mode controller, which used a Stewart mechanism to realize the wave compensation, obtained the attitude parameters through an attitude compensation algorithm and the limb velocity by using a state observer based on the super-twisting algorithm, and the simulation results showed that, compared with the traditional sliding mode controller, the proposed control strategy reduced the squared error integral by 49.49% [20].Ono et al. used the Stewart platform as a shipboard surgical table to compensate for the pitch, roll, and yaw.They used a hybrid controller combining analytic acceleration control and H infinity control and designed a state observer with a ship motion predictor, which was finally verified by numerical simulation [21].Liu et al. used the Stewart mechanism as a shipboard stabilization platform to compensate for the roll, pitch, and heave motions of the ship for severe sea conditions.They designed a task-space controller based on the forward kinematics of the Stewart and, at the same time, an improved adaptive control strategy based on the radial basis function neural network (RBFNN) with an attenuation factor.Through simulation and physical experiments, the maximum compensation error of the proposed controller was reduced by 40~70% compared with the traditional method [22].Chen et al. proposed a three-loop control strategy with active disturbance rejection control for the Stewart wave compensation platform with high nonlinearity, large inertia, parameter uptake, etc.Through simulation, it was obtained that under random wave excitation of class 4 sea state, the control strategy can improve the compensation deviation by about 4.4 times and the smoothness by about four times compared with the proportional-integral (PI) controller [23].
It can be seen that multiple configurations of parallel mechanisms and control methods have been applied in the field of marine motion compensation according to different operational requirements.In this paper, for the application scenario of load transportation and installation with a high center of gravity, an anti-swaying control strategy using a 3-RCU parallel platform is proposed to ensure the stability of the load, while a PD controller with gravity compensation (PDGC) is proposed to improve the control effect of the traditional PD controller during the control process.Finally, the effectiveness of the control strategy is verified by simulation and experiment.
The rest of this paper is organized as follows: Section 2 presents wave compensation anti-swaying strategies in the context of specific applications.Section 3 proposes a detailed anti-swaying control method and analyzes the kinematics of the 3-RCU (revolutecylindrical-universal) parallel platform.Section 4 presents the verification of the effectiveness of the controller and control strategy through simulation.Section 5 encompasses the building of an experimental test system to verify the control strategy.Section 6 presents the conclusions of this work.

Application Scenarios
Improving the stability against overturning while transporting heavy loads with a high center of gravity is crucial.For example, vertically transporting the tower sections of offshore wind turbines can reduce installation time, enhance installation quality, and improve efficiency [24].However, as shown in Figure 1, the ship experiences disturbances in six DOFs in the ocean, which can increase the risk of overturning of the loads with higher center of gravity.Therefore, providing wave compensation technology in the marine environment can improve the stability of the transportation process.The Stewart parallel platform is now widely used in the field of wave compensation, which enables the compensation of six directional disturbances in the ocean [25].At the same time, however, the Stewart parallel platform is complex, costly, and correspondingly difficult to control [26].It is characterized by strong coupling and nonlinearity [27].In addition, with the development of ship technology, the ship's dynamic positioning (DP) system has been able to better realize the compensation of slow time-varying winds, ocean currents, and second-order wave drift forces through the propulsion to ensure that the ship will not sway and surge drift, at the same time, ensure that the vessel's motion in the yaw direction remains within a small range [3].Therefore, the influence of the motion in the three aforementioned DOFs on a high center of gravity load can be regarded as secondary disturbances.
Therefore, disturbances in the roll and pitch directions are more likely to induce overturning of a high center of gravity load.Meanwhile, a disturbance in the heave direction exhibits significant amplitude characteristics [28], and its control differs substantially from that of the former two.Control measures for heave disturbances primarily focus on damping and impact resistance.Simultaneously, the roll and pitch control demonstrates a stronger correlation with safety in a given scenario.Therefore, this paper proposes to explore control strategies for maintaining stability in high center of gravity loads under roll and pitch disturbances.Currently, there is limited research on such issues.To simplify the analysis, we assume the vessel is only subjected to disruptions in the roll and pitch directions.

Anti-Swaying Strategy
In anti-swaying control, in order to ensure the absolute stability of the high center of gravity load, it is necessary to keep it stationary.However, in the process of using a three DOF parallel platform in the wave compensation, if the platform is kept horizontal will inevitably lead to the additional displacement of the load, and if the center of gravity of the load is kept stationary, the contact surface between the load and the platform cannot be kept in the horizontal state all the time.Hence, it is essential to compromise the two control targets.
First, when the control target is top platform stabilization (control target 1), the ideal control effect under wave disturbance is shown in Figure 2b, and Figure 2a shows the platform state when control is not applied, and  is the angle between the line connecting the load center of gravity  and the platform center  and the horizontal direction, which can be regarded as one of the indicators of load stabilization.For this control target, keeping the load contact surface level will cause additional displacement , and when the angular acceleration of the base platform caused by the excitation is large, the lateral acceleration of the load  will be large too, which will increase the load inertia force and reduce the load stability.Therefore, load displacement acceleration can be regarded as another indicator of load stability.

Anti-Swaying Strategy
In anti-swaying control, in order to ensure the absolute stability of the high center of gravity load, it is necessary to keep it stationary.However, in the process of using a three DOF parallel platform in the wave compensation, if the platform is kept horizontal will inevitably lead to the additional displacement of the load, and if the center of gravity of the load is kept stationary, the contact surface between the load and the platform cannot be kept in the horizontal state all the time.Hence, it is essential to compromise the two control targets.
First, when the control target is top platform stabilization (control target 1), the ideal control effect under wave disturbance is shown in Figure 2b, and Figure 2a shows the platform state when control is not applied, and φ is the angle between the line connecting the load center of gravity c l and the platform center c p and the horizontal direction, which can be regarded as one of the indicators of load stabilization.For this control target, keeping the load contact surface level will cause additional displacement d, and when the angular acceleration of the base platform caused by the excitation is large, the lateral acceleration of the load a l will be large too, which will increase the load inertia force and reduce the load stability.Therefore, load displacement acceleration can be regarded as another indicator of load stability.

Anti-Swaying Strategy
In anti-swaying control, in order to ensure the absolute stability of the high center of gravity load, it is necessary to keep it stationary.However, in the process of using a three DOF parallel platform in the wave compensation, if the platform is kept horizontal will inevitably lead to the additional displacement of the load, and if the center of gravity of the load is kept stationary, the contact surface between the load and the platform cannot be kept in the horizontal state all the time.Hence, it is essential to compromise the two control targets.
First, when the control target is top platform stabilization (control target 1), the ideal control effect under wave disturbance is shown in Figure 2b, and Figure 2a shows the platform state when control is not applied, and  is the angle between the line connecting the load center of gravity  and the platform center  and the horizontal direction, which can be regarded as one of the indicators of load stabilization.For this control target, keeping the load contact surface level will cause additional displacement , and when the angular acceleration of the base platform caused by the excitation is large, the lateral acceleration of the load  will be large too, which will increase the load inertia force and reduce the load stability.Therefore, load displacement acceleration can be regarded as another indicator of load stability.When the control target is the load center of gravity acceleration equal to 0, then in the wave compensation process, the load center of gravity remains stationary (control target 2).
As shown in Figure 3, the load inclination will be increased, which also increases the risk of load overturning.
When the control target is the load center of gravity acceleration equal to 0, then in the wave compensation process, the load center of gravity remains stationary (control target 2).As shown in Figure 3, the load inclination will be increased, which also increases the risk of load overturning.Therefore, we propose a weighting coefficient, , 0 ≤  ≤ 1, for realizing the balance between the two control targets mentioned above, we show that as  moves closer to 0 the target moves closer to control target 1, and vice versa for control target 2.The weighted control target can be expressed as: where   is the control target for keeping the load contact surface level and   is the control target that ensures the load center of gravity with least movement.

System Control Strategy
The overall control strategy of the system is shown in Figure 4. First, the two control targets are determined separately according to the bottom disturbance, and then they are weighted to obtain the ideal control target   .After that, the control target is input into the control system to adjust the top platform position by the control force  to keep the load stable under wave disturbance.At the same time, the drive leg length  of the 3-RCU platform and its speed  are fed into the control system as feedback signals.

3-RCU Platform Analysis
The 3-RCU parallel platform has a simple structure and low cost.We first analyze it in terms of degrees of freedom; using the Grübler-Kutzbach formula [29] we obtain: Therefore, we propose a weighting coefficient, w, 0 ≤ w ≤ 1, for realizing the balance between the two control targets mentioned above, we show that as w moves closer to 0 the target moves closer to control target 1, and vice versa for control target 2.The weighted control target can be expressed as: where X 1 is the control target for keeping the load contact surface level and X 2 is the control target that ensures the load center of gravity with least movement.

System Control Strategy
The overall control strategy of the system is shown in Figure 4. First, the two control targets are determined separately according to the bottom disturbance, and then they are weighted to obtain the ideal control target X d .After that, the control target is input into the control system to adjust the top platform position by the control force τ to keep the load stable under wave disturbance.At the same time, the drive leg length l ri of the 3-RCU platform and its speed .l ri are fed into the control system as feedback signals.
Machines 2024, 12, x FOR PEER REVIEW 5 of 17 When the control target is the load center of gravity acceleration equal to 0, then in the wave compensation process, the load center of gravity remains stationary (control target 2).As shown in Figure 3, the load inclination will be increased, which also increases the risk of load overturning.Therefore, we propose a weighting coefficient, , 0 ≤  ≤ 1, for realizing the balance between the two control targets mentioned above, we show that as  moves closer to 0 the target moves closer to control target 1, and vice versa for control target 2.The weighted control target can be expressed as: where   is the control target for keeping the load contact surface level and   is the control target that ensures the load center of gravity with least movement.

System Control Strategy
The overall control strategy of the system is shown in Figure 4. First, the two control targets are determined separately according to the bottom disturbance, and then they are weighted to obtain the ideal control target   .After that, the control target is input into the control system to adjust the top platform position by the control force  to keep the load stable under wave disturbance.At the same time, the drive leg length  of the 3-RCU platform and its speed  are fed into the control system as feedback signals.

3-RCU Platform Analysis
The 3-RCU parallel platform has a simple structure and low cost.We first analyze it in terms of degrees of freedom; using the Grübler-Kutzbach formula [29] we obtain:

3-RCU Platform Analysis
The 3-RCU parallel platform has a simple structure and low cost.We first analyze it in terms of degrees of freedom; using the Grübler-Kutzbach formula [29] we obtain: where m = 3 is the DOFs of the platform; l = 8 is the number of rigid bodies of the platform (including the base); n = 9 is the number of joints; and d i is the number of DOFs of joint i, i.e., for the rotational joint d i = 1, for the cylindrical joint d i = 2, and for the universal joint d i = 2.And its three independent degrees of freedom are: translation along the z-axis and rotation around the x-axis and y-axis, as well as accompanying DOFs for translation along the x-axis and y-axis.Notably, the platform is constrained from rotating around the z-axis.Figure 5 shows three identical kinematic chains, each consisting of a rotational joint, a cylindrical joint (acting as the driving joint), and a universal joint.
where  = 3 is the DOFs of the platform;  = 8 is the number of rigid bodies of the platform (including the base);  = 9 is the number of joints; and  is the number of DOFs of joint , i.e., for the rotational joint  = 1, for the cylindrical joint  = 2, and for the universal joint  = 2 .And its three independent degrees of freedom are: translation along the z-axis and rotation around the x-axis and y-axis, as well as accompanying DOFs for translation along the x-axis and y-axis.Notably, the platform is constrained from rotating around the z-axis.Figure 5 shows three identical kinematic chains, each consisting of a rotational joint, a cylindrical joint (acting as the driving joint), and a universal joint.To describe the system, we define  ,  = 1,2,3 at the rotational joints and  ,  = 1,2,3 at the universal joints,  −    is the coordinate system fixed to the base of the hull, with the coordinate origin located at the center of the base,  is along the direction of   , and  is parallel to   . −    is the coordinate system fixed to the top platform,  is along the direction of   , and  is parallel to   .Besides that, a joint coordinate system  −    is established at the rotational joints,  is perpendicular to the rotation axis,  is along the rotation axis,  is along the direction of the kinematic chain,   is the direction vector of the constraint force, and   is the constraint torque.Since the platform has five DOFs, including three independent DOFs and two accompanying DOFs, and cannot rotate along the  [30], we established the Euler angles of  −  −  and obtained the corresponding rotation matrix: where s * denotes sin ( * ) and c * denotes cos ( * ), and  and  of the rotation matrix denote the bottom rotation angles due to disturbance, respectively.The platform has the following constraints: The inverse kinematics of the platform is solved to obtain the length of each chain with the position of the top platform known, while the forward kinematics is the other case.We set the radius of the circumference of the base as  , and the radius of the circumference of the top as  , then we can easily obtain the coordinates of  and  under  and  , respectively, and then we can obtain the coordinates of  under  : To describe the system, we define B i , i = 1, 2, 3 at the rotational joints and A i , i = 1, 2, 3 at the universal joints, O b − x b y b z b is the coordinate system fixed to the base of the hull, with the coordinate origin located at the center of the base, x b is along the direction of O b B 1 , and y b is parallel to B 2 B 3 .O t − x t y t z t is the coordinate system fixed to the top platform, x t is along the direction of O t A 1 , and y t is parallel to A 2 A 3 .Besides that, a joint coordinate system B i − x i y i z i is established at the rotational joints, x i is perpendicular to the rotation axis, y i is along the rotation axis, z i is along the direction of the kinematic chain, u i is the direction vector of the constraint force, and M Bi is the constraint torque.Since the platform has five DOFs, including three independent DOFs and two accompanying DOFs, and cannot rotate along the z [30], we established the Euler angles of X − Y − X and obtained the corresponding rotation matrix: where s * denotes sin( * ) and c * denotes cos( * ), and α and β of the rotation matrix denote the bottom rotation angles due to disturbance, respectively.The platform has the following constraints: The inverse kinematics of the platform is solved to obtain the length of each chain with the position of the top platform known, while the forward kinematics is the other case.We set the radius of the circumference of the base as r b , and the radius of the circumference of the top as r t , then we can easily obtain the coordinates of A i and B i under {O t } and {O b }, respectively, and then we can obtain the coordinates of A i under {O b }: Machines 2024, 12, 209 7 of 17 where p = x p y p z p T is the vector of {O b } pointing to {O t }.From Equation (5), we can obtain the constraint relationship between the DOFs of the platform: therefore, the rotation matrix is simplified to: Keep the load contact surface level: When keeping the top platform stable, that is, the target 1, at this time, the control quantity of the system is X 1 = −α −β T .Ideally, the closed vector method for inverse kinematics analysis can be utilized when the length of each driving leg is: Minimize the displacement of the load center of gravity: When the control target is center of gravity stabilization, which is target 2, the center of gravity of the load remains stationary and the control quantity is X 2 = α ′ β ′ T , at which time each driving leg length can be expressed as: where the parameters of the rotation matrix α ′ , β ′ can be expressed, respectively, as: where h is the height of the center of gravity of the load, H is the initial height of the platform, and sign( * ) denotes the sign function of * .
According to the definition of Euler's angle, we can obtain the angular velocity of the top as:

PDGC Controller
Gravity compensation means that the gravity force is dynamically distributed to each actuator through real-time and precisely compensates for the gravity force to offset or reduce the influence of the gravitational force applied to the load.This paper is aimed at the wave compensation control of the high center of gravity heavy load; therefore, the load will introduce large disturbances to the control of the three supporting chains during the motion process, which affects the control accuracy of the traditional PD controllers.In addition, gravity compensation can also reduce the dynamic variation range of the controller output force, increase system stability, and thus reduce the steady-state error.
To distribute the gravity of the top platform as well as the load dynamically to each joint space, we need to solve the full Jacobi matrix of the platform.Setting the platform's six generalized freedoms as X = x y z α β 0 T , the independent effective degrees of freedom is X e = z α β T , and the derivation of Equation ( 8) can be written as: .
where J α represents the relationship between the driving leg velocity and the generalized velocity of the top platform, it can be expressed as: B ŝi is the unit vector of the individual drive leg in the coordinate system {O b }.According to the relationship between generalized linear velocity versus generalized angular velocity and effective velocity, we obtain: .
where J v represents the relationship between the generalized linear velocity and the effective velocity, it can be expressed as: where J ω represents the relationship between the generalized angular velocity and the effective velocity, it can be expressed as: then, we obtain the relationship between the independent effective velocity and the generalized velocity as: finally, we obtain the full Jacobian matrix of the system as: Thus, the gravity of the platform and load on the system G = mg can be dynamically distributed to the three supporting chains to obtain the gravity compensation term under the joint space as: The PDCG control strategy proposed in this paper is shown in Figure 6.Dynamic gravity compensation is added based on the traditional PD controller.After the system is disturbed by the wave, it obtains the desired value X d of the top platform trajectory by weight calculation, and the ideal leg length of the 3-RCU parallel platform is output by the inverse kinematics.Then, the ideal leg length is compared with the actual one obtained by the feedback to obtain the output force of the PD controller.At the same time, forward kinematics are used to solve the real position X r of the top.To obtain the real-time position of the top platform, we need to analyze the forward kinematics of the platform, and since the analytical solution of the parallel platform cannot be obtained directly, we can obtain the unique solution by Newton's method.We set the positional attitude of the top to be X e = z α β T = x 1 x 2 x 3 T , then we obtain the vector p(x) as: by rewriting Equation ( 8), we can then obtain the set of equations that need to be solved numerically: Machines Therefore, the output force of the PDGC controller can be expressed as: where  = [    ] ,  =  −  is the leg length error.

Description of the Simulation System
To verify the effectiveness of the proposed controller compared to the traditional PD controller, as well as to analyze the control effect under different weighting coefficients .We built a simulation control model in MATLAB/Simulink.We first compared the control effects of the PDGG controller and the PD controller under target one using sinusoidal excitation.Then, the angle of the top platform and the displacement of the load center of gravity were analyzed for different  values.Finally, random excitations for class 4 sea state were generated by the MSS toolbox [2], and the ideal  value was determined by using the trial-and-error method.
In the simulation, we used the Simscape toolbox to build the model of 3-RCU, to achieve the motion of the top platform by applying the control force to the cylindrical joints, and then used the transformed sensor to detect the real-time position of the top.The specific simulation model is shown in Figure 7.In the case of the numerical computation of forward kinematics, too high a numerical solution accuracy can cause an increase in the iteration time, thus affecting the control timing.Due to the small angle value during the platform movement, we chose the initial value of iteration as 0, and then solved the iterative Jacobi matrix in a fixed form to avoid its repeated solution, and at the same time, the number of iterations was limited to less than 10 times, which can completely ensure real-time control.Therefore, the output force of the PDGC controller can be expressed as: where e = e 1 e 2 e 3 T , e i = l di − l ri is the leg length error.

Simulation Validation 4.1. Description of the Simulation System
To verify the effectiveness of the proposed controller compared to the traditional PD controller, as well as to analyze the control effect under different weighting coefficients w.We built a simulation control model in MATLAB/Simulink.We first compared the control effects of the PDGG controller and the PD controller under target one using sinusoidal excitation.Then, the angle of the top platform and the displacement of the load center of gravity were analyzed for different w values.Finally, random excitations for class 4 sea state were generated by the MSS toolbox [2], and the ideal w value was determined by using the trial-and-error method.
In the simulation, we used the Simscape toolbox to build the model of 3-RCU, to achieve the motion of the top platform by applying the control force to the cylindrical joints, and then used the transformed sensor to detect the real-time position of the top.The specific simulation model is shown in Figure 7.In the case of the numerical computation of forward kinematics, too high a numerical solution accuracy can cause an increase in the iteration time, thus affecting the control timing.Due to the small angle value during the platform movement, we chose the initial value of iteration as 0, and then solved the iterative Jacobi matrix in a fixed form to avoid its repeated solution, and at the same time, the number of iterations was limited to less than 10 times, which can completely ensure real-time control.

Performance under Sinusoidal Excitation
The PD controller is a commonly used feedback controller.Its proportional gain   determines the sensitivity of the response, but too large a value introduces overshoot and oscillations.Similarly, the differential gain   determines the response to the rate of change of the error, and too large a value will introduce noise [31,32].When adjusting parameters, start by gradually increasing the proportional gain (  ).Observe the system response and choose a larger one while avoiding excessive oscillation.Next, adjust the differential gain (  ) to suppress oscillations and reduce overshoot.Select a smaller one to ensure that the system response time is not adversely affected.
In this paper, we tried different gains and determined the parameters while ensuring the response speed, steady-state error, and oscillation avoidance.The specific parameters of the model are shown in Table 1.In this paper, the sinusoidal excitation consists of a combination of two directions, rotation around the x-axis and rotation around the y-axis, and based on the most frequent portion of the ocean wave excitation, we choose excitations that are, respectively. = 3sin0.2 = 2sin0.3 In the simulation, the load is a cube with a base side length of 0.2 m and a uniform mass distribution, and its inertia tensor can be expressed as: where, , , ℎ′ are the three side lengths of the load, respectively, so the inertia force due to rotation is: Considering the low-frequency disturbance, with the above excitation, the maximum value of the combined rotationally induced inertial force is about 2 × 10 N when the

Performance under Sinusoidal Excitation
The PD controller is a commonly used feedback controller.Its proportional gain K P determines the sensitivity of the response, but too large a value introduces overshoot and oscillations.Similarly, the differential gain K D determines the response to the rate of change of the error, and too large a value will introduce noise [31,32].When adjusting parameters, start by gradually increasing the proportional gain (K P ).Observe the system response and choose a larger one while avoiding excessive oscillation.Next, adjust the differential gain (K D ) to suppress oscillations and reduce overshoot.Select a smaller one to ensure that the system response time is not adversely affected.
In this paper, we tried different gains and determined the parameters while ensuring the response speed, steady-state error, and oscillation avoidance.The specific parameters of the model are shown in Table 1.In this paper, the sinusoidal excitation consists of a combination of two directions, rotation around the x-axis and rotation around the y-axis, and based on the most frequent portion of the ocean wave excitation, we choose excitations that are, respectively.
In the simulation, the load is a cube with a base side length of 0.2 m and a uniform mass distribution, and its inertia tensor can be expressed as: where, a, b, h′ are the three side lengths of the load, respectively, so the inertia force due to rotation is: Considering the low-frequency disturbance, with the above excitation, the maximum value of the combined rotationally induced inertial force is about 2 × 10 −4 N when the control force is applied to keep the platform flat.Its value is much less than the gravitational force of the load and is therefore neglected in the subsequent discussion.
The compensation performance of the PD controller and PDGC controller in both directions is shown in Figure 8.By analyzing both, we can conclude that the proposed controller outperforms the conventional PD controller in terms of compensation, both in the x-direction and in the y-direction.The compensation is more effective in the x-direction, where the RMS (root mean square) value of the residual motion is reduced by 65.23% compared to the PD controller, while in the y-direction, the RMS value is reduced by 37.31%.In low-frequency conditions, the system is more easily controlled because the driving force closely aligns with the dynamic force of gravity, resulting in a smaller output force from the PD controller.This alignment makes the system more manageable.Conversely, the inertial force caused by load motion at higher frequencies leads to greater overshooting and oscillations in the controller's output compared to lower frequencies.We applied excitations around the x-axis to the system with an amplitude of 3 • and frequency from 0.15 Hz to 0.3 Hz.The compensation performance of the gravity compensation controller is shown in Figure 9.Although the results show that the gravity compensation performance is negatively correlated with the frequency, the system has shown great performance at all the given disturbances.
Machines 2024, 12, x FOR PEER REVIEW 11 of 17 control force is applied to keep the platform flat.Its value is much less than the gravitational force of the load and is therefore neglected in the subsequent discussion.
The compensation performance of the PD controller and PDGC controller in both directions is shown in Figure 8.By analyzing both, we can conclude that the proposed controller outperforms the conventional PD controller in terms of compensation, both in the x-direction and in the y-direction.The compensation is more effective in the x-direction, where the RMS (root mean square) value of the residual motion is reduced by 65.23% compared to the PD controller, while in the y-direction, the RMS value is reduced by 37.31%.In low-frequency conditions, the system is more easily controlled because the driving force closely aligns with the dynamic force of gravity, resulting in a smaller output force from the PD controller.This alignment makes the system more manageable.Conversely, the inertial force caused by load motion at higher frequencies leads to greater overshooting and oscillations in the controller's output compared to lower frequencies.We applied excitations around the x-axis to the system with an amplitude of 3° and frequency from 0.15 Hz to 0.3 Hz.The compensation performance of the gravity compensation controller is shown in Figure 9.Although the results show that the gravity compensation performance is negatively correlated with the frequency, the system has shown great performance at all the given disturbances.Then, we verified the effectiveness of multi-target control of the system under the  excitation in Equation ( 26) applied separately.As shown in Figure 10, the weighting coefficient  takes values ranging from 0 to 1.When  is closer to 0, the residual angle of the top platform is smaller and the platform is more stable, and when  is closer to 1, the additional displacement of the load's center of gravity is smaller, and the residual angle control force is applied to keep the platform flat.Its value is much less than the gravitational force of the load and is therefore neglected in the subsequent discussion.
The compensation performance of the PD controller and PDGC controller in both directions is shown in Figure 8.By analyzing both, we can conclude that the proposed controller outperforms the conventional PD controller in terms of compensation, both in the x-direction and in the y-direction.The compensation is more effective in the x-direction, where the RMS (root mean square) value of the residual motion is reduced by 65.23% compared to the PD controller, while in the y-direction, the RMS value is reduced by 37.31%.In low-frequency conditions, the system is more easily controlled because the driving force closely aligns with the dynamic force of gravity, resulting in a smaller output force from the PD controller.This alignment makes the system more manageable.Conversely, the inertial force caused by load motion at higher frequencies leads to greater overshooting and oscillations in the controller's output compared to lower frequencies.We applied excitations around the x-axis to the system with an amplitude of 3° and frequency from 0.15 Hz to 0.3 Hz.The compensation performance of the gravity compensation controller is shown in Figure 9.Although the results show that the gravity compensation performance is negatively correlated with the frequency, the system has shown great performance at all the given disturbances.Then, we verified the effectiveness of multi-target control of the system under the  excitation in Equation ( 26) applied separately.As shown in Figure 10, the weighting coefficient  takes values ranging from 0 to 1.When  is closer to 0, the residual angle of the top platform is smaller and the platform is more stable, and when  is closer to 1, the additional displacement of the load's center of gravity is smaller, and the residual angle Then, we verified the effectiveness of multi-target control of the system under the α excitation in Equation ( 26) applied separately.As shown in Figure 10, the weighting coefficient w takes values ranging from 0 to 1.When w is closer to 0, the residual angle of the top platform is smaller and the platform is more stable, and when w is closer to 1, the additional displacement of the load's center of gravity is smaller, and the residual angle of the platform in this case is larger.When w changes from 0 to 0.4, the RMS value of the additional displacement of the center of gravity decreases by 39.54%, while the RMS value of the residual angle of the top platform increases by 0.70 degrees.When w continued to increase to 0.8, the RMS value of the additional displacement of the center of gravity decreased by 73.89% from the beginning, at which time the RMS value of the residual angle of the top platform increased by 1.42 • .

Optimal Weighting Coefficient
During motion compensation, changes in the angle of the top platform or the value of the load acceleration caused by the compensation can increase its overturning moment, thus increasing the instability of the load.Its overturning moment in a certain direction can be expressed as: where  is the load mass and  is the load acceleration.The larger the disturbance frequency, the larger the acceleration due to compensation.Different weighting coefficients  give different overturning moments.Therefore, we use genetic algorithm optimization to obtain several sets of optimal weight coefficients  under the conditions of single direction disturbance and frequency  from 0.2 Hz to 0.3 Hz, and the height of the center of mass from 1 m to 2 m, and the optimized objective function is the load overturning moment.The main parameters of the genetic algorithm are shown in Table 2 and the optimization results are shown in Table 3.

Optimal Weighting Coefficient
During motion compensation, changes in the angle of the top platform or the value of the load acceleration caused by the compensation can increase its overturning moment, thus increasing the instability of the load.Its overturning moment in a certain direction can be expressed as: where m is the load mass and a is the load acceleration.The larger the disturbance frequency, the larger the acceleration due to compensation.Different weighting coefficients w give different overturning moments.Therefore, we use genetic algorithm optimization to obtain several sets of optimal weight coefficients w under the conditions of single direction disturbance and frequency f from 0.2 Hz to 0.3 Hz, and the height of the center of mass from 1 m to 2 m, and the optimized objective function is the load overturning moment.The main parameters of the genetic algorithm are shown in Table 2 and the optimization results are shown in Table 3.With the above optimization results, we used the Curve Fitting Tool in MATLAB to fit the surface of the expression for the optimal weight coefficients, and since the disturbance frequency f and the height of the load center of mass h are non-correlated quantities, we used a polynomial fit with no cross-terms in the fitting, and the final result is obtained as follows: The goodness of fit is shown in Table 4, while the fitted surface is shown in Figure 11.With the above optimization results, we used the Curve Fitting Tool in MATLAB to fit the surface of the expression for the optimal weight coefficients, and since the disturbance frequency  and the height of the load center of mass ℎ are non-correlated quantities, we used a polynomial fit with no cross-terms in the fitting, and the final result is obtained as follows: The goodness of fit is shown in Table 4, while the fitted surface is shown in Figure 11.

Description of the Testing System
To verify the performance of the PDGC controller and the effectiveness of the antiswaying control strategy in real situations, we built a wave compensation test system, which is shown in Figure 12.The excitation is provided by the Stewart platform, and the Stewart platform is controlled by the NI-myRIO controller through the computer.For signal acquisition and measurement, we used an IMU (VN100) placed at the base of the parallel platform to acquire the angle of motion induced by the disturbance.The legs' length and motion speed of the 3-RCU parallel platform were calculated using the encoders in the motors of the electrical cylinders.A NI-myRIO was applied to implement the proposed controller based on the feedback.In order to observe the control effect, we also placed another IMU on top of the parallel platform, which does not participate in the closed-loop control.In addition, we used a NOKOV Mars2H motion-capture system to measure the motion of the center of gravity by placing the tracking markers on the load.The motion capture system comprises eight cameras, a tracking marker, and a computer.The motion capture system can capture the marker's displacement, velocity, and acceleration.We first established a world coordinate system at the center of the load's top while

Experimental Validation 5.1. Description of the Testing System
To verify the performance of the PDGC controller and the effectiveness of the antiswaying control strategy in real situations, we built a wave compensation test system, which is shown in Figure 12.The excitation is provided by the Stewart platform, and the Stewart platform is controlled by the NI-myRIO controller through the computer.For signal acquisition and measurement, we used an IMU (VN100) placed at the base of the parallel platform to acquire the angle of motion induced by the disturbance.The legs' length and motion speed of the 3-RCU parallel platform were calculated using the encoders in the motors of the electrical cylinders.A NI-myRIO was applied to implement the proposed controller based on the feedback.In order to observe the control effect, we also placed another IMU on top of the parallel platform, which does not participate in the closed-loop control.In addition, we used a NOKOV Mars2H motion-capture system to measure the motion of the center of gravity by placing the tracking markers on the load.The motion capture system comprises eight cameras, a tracking marker, and a computer.The motion capture system can capture the marker's displacement, velocity, and acceleration.We first established a world coordinate system at the center of the load's top while the base platform was stationary, and then we assumed the position of the load's center of gravity by placing the tracking marker at the center of the top of the load.The reason for this is firstly to facilitate the measurement, and secondly, because the displacement of the measurement point is consistent with the displacement of the center of gravity, so it is the center of the top of the load is not used as the measurement point out of generality.Both the above two signals are processed by the computer.

Performance of PDGC Controller under Marine Excitation
To verify the compensation performance of the system in real marine environments, we used the Stewart platform to generate a random motion under a class 4 sea state, and the control performance of the two controllers is shown in Figure 13.The RMS values of the residual angle around the x-axis are 0.077° and around the y-axis are 0.085° under the traditional PD controller, compared to 0.052° and 0.070° under the PDGC controller control, representing improvements of 32.2% and 17.6%, respectively.Therefore, the PDGC controller outperforms the PD controller under random excitation, which is consistent with the simulation.

Validation of Anti-Swaying Strategy
To verify the effectiveness of the anti-swaying strategy, we applied a unidirectional sinusoidal excitation in our experiments to compute the load overturning moment with different weighting factors.The height of the center of mass of the load in the experiment is 0.5 m.The optimal weight coefficients in the control are calculated from Equation ( 28) and have values of 0.0517 and 0.2140 at frequencies of 0.2 Hz and 0.3 Hz, respectively.The

Performance of PDGC Controller under Marine Excitation
To verify the compensation performance of the system in real marine environments, we used the Stewart platform to generate a random motion under a class 4 sea state, and the control performance of the two controllers is shown in Figure 13.The RMS values of the residual angle around the x-axis are 0.077 • and around the y-axis are 0.085 • under the traditional PD controller, compared to 0.052 • and 0.070 • under the PDGC controller control, representing improvements of 32.2% and 17.6%, respectively.Therefore, the PDGC controller outperforms the PD controller under random excitation, which is consistent with the simulation.

Performance of PDGC Controller under Marine Excitation
To verify the compensation performance of the system in real marine environments, we used the Stewart platform to generate a random motion under a class 4 sea state, and the control performance of the two controllers is shown in Figure 13.The RMS values of the residual angle around the x-axis are 0.077° and around the y-axis are 0.085° under the traditional PD controller, compared to 0.052° and 0.070° under the PDGC controller control, representing improvements of 32.2% and 17.6%, respectively.Therefore, the PDGC controller outperforms the PD controller under random excitation, which is consistent with the simulation.

Validation of Anti-Swaying Strategy
To verify the effectiveness of the anti-swaying strategy, we applied a unidirectional sinusoidal excitation in our experiments to compute the load overturning moment with different weighting factors.The height of the center of mass of the load in the experiment is 0.5 m.The optimal weight coefficients in the control are calculated from Equation ( 28) and have values of 0.0517 and 0.2140 at frequencies of 0.2 Hz and 0.3 Hz, respectively.The

Conclusions
Given that high center-of-mass loads can overturn during ocean transportation, this paper proposes a control strategy to improve the stability of such loads based on a gravitycompensated PD controller.Multi-target control is used to achieve a trade-off between the rotation angle of the 3-RCU platform and the plane displacement of the load's center of gravity, and an evaluation parameter T (which is the overturning moment of the load) is proposed to measure the stability of the load.This paper verified the effectiveness of the proposed controller by simulation under sinusoidal excitation and the feasibility of control using weighting coefficients.The optimal weight coefficients of the loads were then solved by a genetic algorithm at different frequencies.Finally, a testing system was built, and the control performance of the proposed controller was improved by 32.2% under random excitation in class 4 sea state.The load stability under the optimal w was also verified under experimental conditions, which is significant in guiding practical applications in the future.

Figure 1 .
Figure 1.Six-dimensional disturbance of the ocean.

Figure 1 .
Figure 1.Six-dimensional disturbance of the ocean.

Figure 1 .
Figure 1.Six-dimensional disturbance of the ocean.

Figure 4 .
Figure 4. Block diagram of system control strategy.

Figure 4 .
Figure 4. Block diagram of system control strategy.

Figure 4 .
Figure 4. Block diagram of system control strategy.

Figure 6 .
Figure 6.Block diagram of the PDGC controller scheme.

Figure 6 .
Figure 6.Block diagram of the PDGC controller scheme.

Figure 8 .
Figure 8. Residual motion on the top platform with PD and PDGC controllers.(a) RX direction; (b) RY direction.

Figure 9 .
Figure 9. Residual motion at different frequencies under PDGC controller.

Figure 8 .
Figure 8. Residual motion on the top platform with PD and PDGC controllers.(a) RX direction; (b) RY direction.

Figure 8 .
Figure 8. Residual motion on the top platform with PD and PDGC controllers.(a) RX direction; (b) RY direction.

Figure 9 .
Figure 9. Residual motion at different frequencies under PDGC controller.

Figure 9 .
Figure 9. Residual motion at different frequencies under PDGC controller.

Machines 2024 ,Figure 10 .
Figure 10.Residual angle of the top around x and additional displacement of the center of gravity along the y for different  conditions.(a) RX angle; (b) Y displacement

Figure 10 .
Figure 10.Residual angle of the top around x and additional displacement of the center of gravity along the y for different w conditions.(a) RX angle; (b) Y displacement.

Machines 2024 ,
12, x FOR PEER REVIEW 14 of 17 the center of the top of the load is not used as the measurement point out of generality.Both the above two signals are processed by the computer.

Figure 12 .
Figure 12.Wave compensation testing system.The blue arrow indicates the measuring sensor, the red arrow indicates the measurement signal, and the black arrow indicates the control signal.

Figure 12 .
Figure 12.Wave compensation testing system.The blue arrow indicates the measuring sensor, the red arrow indicates the measurement signal, and the black arrow indicates the control signal.

Machines 2024 ,
12, x FOR PEER REVIEW 14 of 17 the center of the top of the load is not used as the measurement point out of generality.Both the above two signals are processed by the computer.

Figure 12 .
Figure 12.Wave compensation testing system.The blue arrow indicates the measuring sensor, the red arrow indicates the measurement signal, and the black arrow indicates the control signal.

Table 1 .
Parameters of the simulation system.

Table 1 .
Parameters of the simulation system.

Table 2 .
Main parameters of the genetic algorithm.

Table 2 .
Main parameters of the genetic algorithm.

Table 3 .
Genetic algorithm optimized weights w.

Table 4 .
Goodness of fit.

Table 4 .
Goodness of fit.