Active wave motion compensation trestle control method based on LSTM pose prediction and MPC optimization control
By combining an inner and outer layer compensation architecture with a laser displacement sensor, an LSTM model, and a gyroscope inertial navigation system, along with MPC optimized control, the compensation error and delay problems of the shipborne pier platform in complex marine environments were solved, achieving high-precision, fast-response, and stable wave motion compensation.
Patent Information
- Application Number
- CN202511206261.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2026-01-16
AI Technical Summary
In the existing technology, when facing complex marine environments, shipborne pier platforms rely on the ship's own propulsion to eliminate the effects of sway and pitch, which has large errors and insufficient safety. The inertial navigation system has slow feedback speed, and single sensors have delays or insufficient accuracy. Traditional prediction methods have limitations in terms of stability and convergence speed, and cannot adjust the control strategy in real time.
The system employs a dual-layer compensation architecture. The inner layer uses a laser displacement sensor and an LSTM model to predict heave motion in real time, while the outer layer combines a gyroscope inertial navigation system and MPC optimization control to generate global pose prediction data. Through kinematic calculation and model prediction controller, compensation commands for the joints are generated, achieving high-frequency and global compensation for six-degree-of-freedom coupled motion.
It improves heave compensation accuracy to within ±3cm, reduces the risk of collision between piers and ships, increases response speed to 10ms level, reduces energy redundancy consumption by 20%, maintains compensation stability under complex sea conditions, and can adaptively adjust control strategies.
Smart Images

Figure CN121341338A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ocean wave compensation control technology, and in particular to an active wave motion compensation trestle control method based on LSTM pose prediction and MPC optimization control. Background Technology
[0002] In practical applications, shipborne pier platforms face challenges due to the complex and ever-changing marine environment, particularly the impact of wind and waves. The mother ship and the pier's gangway may be subjected to wave impacts from different directions, causing movements such as rolling, pitching, and bowing. This can lead to misalignment of the connection between the boarding gangway and the docking platform, affecting not only the normal transport of personnel but also posing safety hazards. Therefore, ensuring a stable connection between the boarding gangway and the platform has become a crucial design issue for shipborne pier platforms.
[0003] Due to their large loads and inertia, offshore work platforms may encounter motion delays when performing active wave compensation, and the inertial navigation system (INS) has a compensation window period when feeding back ship attitude, which significantly weakens the compensation effect. To improve this situation and enhance the accuracy of compensation, it is necessary to implement short-term predictions of relevant ship motion quantities. By pre-estimating the dynamic trends of ship motion, corresponding compensation adjustments can be made more promptly and effectively.
[0004] Patent document CN111738478A discloses a wave compensation prediction method based on a random forest algorithm and an Adam neural network. Random forests may suffer from overfitting when dealing with noisy data, especially when the number and depth of trees are excessive. Furthermore, they perform worse than long short-term memory neural networks or recurrent neural networks when handling extremely complex nonlinear dynamics. While the Adam optimizer can optimize the training process of the neural network, if the network design is unreasonable, such as being too shallow or lacking sufficient nonlinear transformations, it may fail to accurately capture the complex dynamics of wave motion, potentially leading to slow convergence or local optima and increased computational overhead. In addition, random forests may face stability issues when the data dimensionality is too high or the training data contains noise, resulting in fluctuating prediction results. Although the Adam optimizer helps improve training stability, its parameter update strategy may also lead to convergence difficulties or instability in certain situations, especially when the dataset is imbalanced or overly complex.
[0005] The paper "An Active Wave Compensation Method for Boarding Trenchs" proposes a compensation control system built around a high-speed digital signal processor. It utilizes a Motion Reference Unit (MRU) to measure the attitude and heave changes of the maintenance vessel in real time, calculates the required stroke of the hydraulic cylinders based on a compensation model, and controls the hydraulic system to compensate for roll, pitch, and heave, ensuring relative stability between the trestle end and the tower base. However, this compensation system relies heavily on the MRU for attitude input and on the maintenance vessel constantly pressing against the wind turbine tower base to eliminate the effects of roll and pitch. This results in significant compensation errors and compromises safety.
[0006] Existing problems: 1. Relying on the ship's own propulsion to eliminate the effects of sway and pitch has significant offset errors and cannot guarantee safety. Furthermore, most current shipborne inertial navigation systems suffer from slow feedback speeds, delays or inaccuracies in feedback from single sensors, especially lag in heave compensation, resulting in low accuracy of the sensed heave information. 2. Traditional prediction methods mainly rely on physical models or empirical statistical methods, which have limitations in terms of stability and convergence speed, cannot capture the long-term dependence of data, and cannot adjust the control strategy in real time when faced with complex control tasks. Summary of the Invention
[0007] The main technical problem this invention aims to solve is that relying on the ship's own propulsion to eliminate the effects of sway and pitch has a large offset error and cannot guarantee safety. Furthermore, most current shipborne inertial navigation systems have slow feedback speeds, and single sensor feedback is delayed or inaccurate, especially in heave compensation, resulting in low accuracy of the sensed heave information. Traditional prediction methods mainly rely on physical models or empirical statistical methods, which have limitations in terms of stability and convergence speed, cannot capture the long-term dependence of data, and cannot adjust the control strategy in real time when facing complex control tasks. In order to overcome the above-mentioned defects of the existing technology, this invention provides an active wave motion compensation trestle control method based on LSTM pose prediction and MPC optimization control.
[0008] The technical solution adopted by this invention to solve its technical problem is: An active wave motion compensation trestle control method based on LSTM pose prediction and MPC optimization control includes the following steps: S1: A dual-layer compensation architecture combining an inner and outer layer with a neural network model LSTM is used to predict the ship's attitude. The inner control loop collects real-time ship heave displacement data based on laser displacement sensors and directly inputs it into the LSTM model with high-frequency feedback to predict the short-term heave motion trend. The prediction result generates vertical compensation commands for the actuator joints through kinematic calculations and directly drives the hydraulic-electric actuators of the trestle, prioritizing the resolution of high-frequency disturbances in the heave direction. The outer control loop uses the gyroscope inertial navigation system to obtain the ship's six-degree-of-freedom pose, and combines the timing prediction capability of LSTM to generate global pose prediction data. After the outer prediction results are fused with the inner heave compensation signal, they are input into the model predictive controller (MPC). Through rolling optimization calculation, the future multi-step control sequence is generated to generate the optimal trajectory command for the execution joint, thereby realizing global compensation of the six-degree-of-freedom coupled motion. S2: Based on the pose prediction output of the LSTM model, the heave displacement data is used to predict the short-term heave motion trend in the future with high-frequency feedback. The prediction result is used to generate vertical compensation commands for the execution joints through kinematic calculation. The six-degree-of-freedom pose of the ship is obtained using the gyroscope inertial navigation system to obtain global pose prediction data. The end point transformation matrix is solved using the wave-compensated trestle kinematic model, and then the motion trajectory of each execution joint of the trestle in the joint space is obtained. This motion compensation trajectory is used as the reference trajectory of the MPC model. S3: The dynamic model of the offshore trestle is used to provide the state-space equation for the MPC algorithm, and a model predictive controller with state constraints is designed based on this mathematical model. S4: Input the reference trajectory into MPC, solve the objective function under constraints to obtain the optimal motion compensation trajectory of each joint of the trestle system under optimal control input. The inner layer heave prediction data is used as the priority weight term of the MPC algorithm. The penalty coefficient for heave direction compensation is set higher in the optimization objective to ensure that the execution joint action of MPC output prioritizes the suppression of heave disturbance. The timestamp synchronization technology is used to solve the problem of feedback frequency difference between the two-ring sensors, and the inner and outer layer data are aligned in real time to avoid phase delay of the compensation signal.
[0009] Furthermore, the specific implementation method of step S1 includes the following steps: S1.1: Use a gyroscope inertial navigation system (INS) and a laser displacement sensor to collect current ship motion attitude information, including pitch, roll, speed, position, attitude angular rate, and heave information; S1.2: The initial period of feedback from the INS and laser displacement sensors respectively. and the period after The pose information within each set constitutes a set of motion information. At least 300 sets of historical motion information are collected to construct a motion pose dataset. The data is arranged in chronological order, cleaned, and the ship pose data corresponding to the sampling frequency of 10Hz is retained. Outliers and missing values are removed, and the data is normalized. Furthermore, the normalization formula is as follows: In the formula, The original ship attitude data, The minimum value in the data sequence. The maximum value in the data sequence; S1.3: Divide the motion dataset into training and test sets proportionally, for model training and prediction result validation, respectively. The normalized motion dataset is as follows: The training set is The test set is ; S1.4: The ship pose of the previous time period in the training set is used as the input of the LSTM model, and the pose information of the next time period is used as the output of the LSTM model. The neural network LSTM model is trained to obtain the mapping relationship between the two, that is, the motion trend and law of the ship under the influence of waves in the state of no power input. S1.5: Build an LSTM network, set the structural parameters of the LSTM network, and then input the training set and test set obtained in step S1.3 into the LSTM network for training using a window sliding prediction method. The LSTM unit layer consists of a forget gate, an input gate and an output gate. The loop output of the forget gate is expressed as follows: The loop output of the input gate is: The loop output of the output gate is: in, , Forget gate weight parameters, Forget gate bias parameters; , For the input gate weight parameters, For input gate bias parameters; , For output gate weight parameters, These are the output gate bias parameters; For output of the hidden layer, Let be the excitation function; S1.6: Set up the input layer, LSTM layer, fully connected layer, dropout layer, and output layer of the LSTM network. Select the ReLU activation function to learn the feature representation and the Sigmoid activation function to learn the probability distribution of the data. Set the optimizer to the SGD optimizer. S1.7: The mean squared error (MSE) is used to measure the difference between the model's predicted values and the true values. Its loss function formula is as follows: ,in, This represents the true pose value. To predict pose values, the weights in the LSTM model are updated using the backpropagation algorithm and the SGD optimizer to minimize the loss function; S1.8: The motion data obtained in step S1.3 is segmented according to the defined window length and then input into the LSTM network to obtain the trained LSTM network. Throughout the training process, the model parameters are continuously adjusted until the model converges. As training progresses, the loss function should gradually decrease, indicating that the model is gradually learning and optimizing its prediction ability. S1.9: After evaluation on the validation and test sets, the ship pose feedback from the inner and outer ring INS and the laser displacement sensor during the current time period is input into the trained LSTM model, and the predicted ship pose is output as the input to the compensated pier kinematics model. Furthermore, when conflicts arise between the inner and outer loop data, the inner loop prioritizes heave parameters, while the outer loop prioritizes other parameters. When the conflict occurs in heave data, the inner loop's laser sensor is trusted first and given a higher weight. Conversely, if the conflict occurs in other parameters, such as roll or pitch, the outer loop's gyroscope is given a higher weight. After redistributing the weights, the fused measured sensor data is compared with the sensor data predicted by LSTM based on historical data to verify data consistency. The weights are dynamically adjusted based on the deviation value to ensure the system's reliability and accuracy.
[0010] Furthermore, the specific implementation method of step S2 includes the following steps: S2.1: Establish the joint coordinate system of the motion compensation trestle using the DH matrix parameter method, describe the spatial pose between adjacent joints using matrix transformation, and obtain the kinematic model of the trestle through coordinate transformation. Furthermore, the position and attitude of the lander at the end of the motion-compensated trestle are solved to obtain the relative pose of the end point of the trestle channel in a coordinate system with the center of the trestle base as the origin; S2.2: Determine the reference coordinate system of the motion-compensated trestle coordinate system group and fix it on the motion-compensated trestle base, which remains stationary. Name it the base coordinate system. Establish a coordinate system on the lander at the end of the motion-compensated bridge. Establish a coordinate system at each joint i. By utilizing the pose transformation between adjacent coordinate systems, the pose of other parts can be derived from a certain pose. S2.3: Based on the DH matrix parameter method, a coordinate system is established for the motion compensation trestle. The center of the bottom of the trestle is set as the origin of coordinate system {0}. The contact point between the trestle base and the fixed channel is set as the origin of coordinate systems {1} and {2}. The contact point between the trestle telescopic channel and the trestle pitch system is set as the origin of coordinate system {3}. The end point of the trestle telescopic channel is set as the origin of coordinate system {4}. Furthermore, a coordinate system for the motion-compensated trestle is established based on the matrix parameter method, wherein, , , , In the axial direction, The axis rotates outward, and the direction is determined by the right-hand rule. The Cartesian coordinate system definition method is adopted, and the positive direction of the coordinate system axis rotation is determined based on the right-hand rule. S2.4: Determine the range and parameters of joint variables based on the structural technical parameter requirements; S2.5: The homogeneous transformation matrix from coordinate system {i-1} to coordinate system {i} is obtained using the rotation and translation matrices, as shown in the following equation: S2.6: Substitute the parameters from S2.4 into the homogeneous transformation matrix in S2.5 to obtain the homogeneous transformation matrix of the rotation joint coordinate system {1} relative to the base coordinate system {0}: Similarly, the transformation matrices of the rotational joint coordinate system {2} relative to the rotational joint coordinate system {1}, the sliding joint coordinate system {3} relative to the rotational joint coordinate system {2}, and the terminal lander coordinate system {4} relative to the sliding joint coordinate system {3} are respectively: Multiplying the above four matrices in sequence yields the homogeneous transformation matrix of the joint coordinate system {4} relative to the foundation coordinate system {0} of the trestle base, as shown in the formula: This matrix represents the pose of the end point of the trestle channel relative to the base coordinate system {0} of the trestle base. The rotation matrix represents the rotational attitude of the end point of the trestle channel, and the position matrix represents the position of the end point of the trestle channel. Let the position coordinates of the end point in the base coordinate system be... As shown in the following formula: This equation is the solution equation for the forward kinematics of the motion-compensated trestle; S2.7: Solving the formula for the positive solution in S2.6 using algebraic methods yields: By further solving the above equation using trigonometric identities, we can obtain: This equation is the inverse kinematics solution equation for the motion-compensated trestle; S2.8: Since the ship moves with the waves on the sea surface, a transformation matrix is needed to represent the influence of the ship's own motion on the base coordinate system. Assuming the ship is stationary (i.e., the base coordinate system is fixed), while the target point moves in the opposite direction relative to the ship, the pier end tracks its spatial trajectory. Motion parameters are fed back by a fiber optic gyroscope inertial navigation system and a laser displacement sensor, mainly including heading angle, roll angle, pitch angle, and vertical offset. Controlling the correct response of each joint of the pier to track this trajectory achieves stability. The ship rotates around three axes under the action of the waves, with clockwise rotation along the axes as positive, and translates along the three axes. Now, taking the inverse variables as parameters, the transformation matrix is set as follows: The rotation matrix about the x-axis is: The rotation matrix about the y-axis is: The rotation matrix about the z-axis is: The translation matrices along the three axes are: The overall transformation matrix is: Let the ship's position coordinates before it began to move be (a, b, c), that is... After the ship's pose changes under the influence of waves, the new coordinates of the target point are: Expanded to: This formula is the coordinate solution for the new target point. By substituting the six motion feedback parameters and the position coordinates of the three initial target points, the new coordinates can be obtained. Substituting the new coordinates into the inverse solution formula in S2.7, the required rotation angle and displacement can be obtained. S2.9: After the control system drives the actuator joint to reach the target position, the base coordinate system coincides with the world coordinate system. The ship's initial attitude is roll angle U=0°, pitch angle V=0°, and yaw angle W=180°. The current position DPOS of the drive motor related to the actuator joint is converted into the actuator joint motion, i.e., rotation angle. Pitch angle and elongation Substituting these values into the forward formula in S2.6, we obtain the coordinates of the target point. The pose change parameters U, V, W, XP, YP, and ZP are obtained from the LSTM ship pose prediction output in S1.9. After forming the transformation matrix T, it is applied to the initial target point. The coordinates of the target point in the world coordinate system are obtained using the point-finding formula in S2.8. Transformed coordinate values in the current real-time coordinate system And its position coincides with the target point in the world coordinate system; S2.10: Calculate the coordinates of the compensation points. Substituting the equations into the inverse equation in S2.7, we can obtain the motion of the relevant joints, i.e., the rotation angle. Pitch angle and elongation The motion compensation trajectory is used as the reference trajectory for the MPC model.
[0011] Furthermore, the specific implementation method of step S3 includes the following steps: S3.1: The trestle can be equivalent to a three-degree-of-freedom robotic arm system, with the rotational angular velocity of its rotary joint being: The pitch angular velocity of the pitch joint is The moving speed of the telescopic joint is ;point This refers to the position of the center of mass of the linkage structure between joint one and joint two. and The trestle bridges are located at points. The velocity vector and angular velocity vector at point . , as well as The meaning can be deduced by analogy; S3.2: Furthermore, any point on the three-degree-of-freedom shipboard boarding bridge... The pose transfer matrix is denoted as: In the formula, Here is a rotation matrix, representing the pose. This is a position matrix, representing positions; points. The Jacobian velocity matrix and Jacobian angular velocity matrix are: In the formula, the direction vector is S3.3: From the pose transfer matrix, Jacobian velocity matrix, and Jacobian angular velocity matrix in S3.2, the point can be obtained. The Jacobian matrix is: Similarly, point , The Jacobian matrices are as follows: In the formula, S3.4: Further, the joint variable matrix of the stack is defined as follows: The joint variable velocity matrix is The pier is at point The velocity and angular velocity at a point can be expressed as: S3.5: The sum of the translational kinetic energy generated by the linear velocity and the rotational kinetic energy generated by the angular velocity at the center of mass of each joint arm in the trestle bridge is: Its expression is: In the formula, For the first Equivalent mass at the joint center of mass For the first The inertia tensor matrix of the joint. Joint variables The inertia matrix; S3.6: The sum of the gravitational potential energy of the center of mass of each joint arm of the trestle is... Its expression is: In the formula, It is the acceleration due to gravity. For the first The height of the joint's center of mass relative to point O in the direction of gravity; S3.7: Combining the total kinetic energy and total potential energy from S3.5 and S3.6, according to the Euler-Lagrange equations for mechanical systems, the dynamic equation of the wave-compensated trestle can be expressed as: In the formula, For Lagrange functions, ; The joint variable matrix Q is the first... item, For generalized torque; S3.8: Furthermore, due to Therefore, the dynamic equations in S3.7 can be simplified to: Record the potential energy of the system For joint variables The partial derivative matrix is: remember Inertia matrix If the elements in the equation are such that the matrix in the kinetic equation consists of eccentric terms and Coriolis terms, then... The elements in can be represented as: In the formula, Coriolis force term, For the centripetal force term, This refers to the angular velocity and inertia term. S3.9: In summary, the dynamic state equation of the shipboard boarding bridge is: , In the formula, To execute the velocity vector of the joint variables, To execute the acceleration vector of the joint variables, For torque, The inertia matrix, The Coriolis force and centrifugal force are vectors. This is the gravity vector.
[0012] Furthermore, in step S4, the joint compensation trajectory obtained through dynamic modeling in S3.9 and kinematic prediction in S2.10 is used as the reference trajectory input for MPC. The specific implementation method of step S4 includes the following steps: S4.1: Define state variables for the dynamic model of offshore trestle Define the control variable as , where is the torque of the articulated arm, and the output variable is defined as . To implement joint variables, the state-space equations of the offshore trestle are as follows: S4.2: The trestle system is linearized using the Jacobian matrix linearization method. Let the desired equilibrium state of the system be (0,0), i.e. Then, each term of the state-space equation in S4.1 is linearized at the desired point (0,0); Furthermore, a constant matrix A is constructed using partial differential derivatives. right The Jacobian matrix at (0,0) is represented by the partial differential derivatives forming a constant matrix B. right The Jacobian matrix at (0,0) is given by the formula: In the formula, A is a 6×6 matrix, where 6 is the system dimension, and B is a 6×3 matrix, where 3 is the input dimension; S4.3: Further, the original nonlinear dynamic system in S4.2 is linearized: S4.4: Further, let the sampling period be T, and the sampling time be... The linear formula in S4.3 is discretized using the Taylor formula, and the state variables are discretized as follows: The discretized state-space equations of the offshore trestle are as follows: In the formula, A is the system matrix, B is the control matrix, G is the parameter matrix, and H is the output matrix. The formulas are as follows: , , S4.5: Using the linearized and discretized dynamic models from S4.3 and S4.4 as the control model, the prediction time domain is... The processed state variables are: The control variables are: S4.6: Based on the state equation of the model in the prediction time domain as described in S4.5, the prediction equation can be obtained as follows: = , = , = S4.7: Furthermore, in order to select the optimal input under constraints so that the system output can track the desired output, for the optimization of the deviation of the system state variables and the control quantity, the minimum distance is used as the objective optimization function J, which is the difference between the predicted trajectory and the desired trajectory, i.e., the tracking error. and predict input To solve for the constraints, the formula is: In the formula, This indicates that the prediction model predicts the trajectory. Represents the expected trajectory. Indicates the input of the prediction system Furthermore, the objective function for trajectory tracking error is: In the formula, and Let represent the weight matrices respectively; further, let: The objective optimization function can be expressed as: S4.8: Substituting the state constraints and input constraints of the offshore trestle, the optimization problem of minimizing the offshore trestle error is transformed into a quadratic programming problem: Using this equation, for the prediction time domain is Internal control variable sequence Perform prediction and solution: , This is the actual control input increment; The first optimized input in the optimized input sequence is passed to the system, and the optimization function is searched again at the next moment. This process is repeated until the system reaches stability. S4.9: The current ship attitude is fed back through joint feedback of INS and laser displacement sensor. INS provides information on roll, pitch, bow, sway, and pitch, while heave information, which has a higher priority for compensation, is fed back by laser displacement sensor with higher measurement accuracy, through a laser beam vertically projected onto a fixed horizontal reference plane. By hierarchically fusing multi-source information from laser displacement sensor and gyroscope inertial navigation system, high-precision and high-response forward compensation of ship motion is achieved. The attitude information of the previous period is input into LSTM model to predict the ship attitude of the next period. The predicted value is input into kinematic model to obtain the motion of the pier's joints and is used as a reference trajectory input into MP. In the C model, after rolling optimization, the first control input u in the optimal control sequence is selected for model control. It is determined whether the motion of the joint exceeds the travel of the mechanism. If it does not exceed the travel, the motion of the joint is converted into the motion of the motor. The motor is then moved to the compensation point through absolute control to achieve wave compensation. After obtaining the motor motion, it is compared with the current position DPOS of the motor shaft to adjust the speed of the joint. If the motor rotation is too large, the motor speed is increased; otherwise, the speed is decreased. By fixing the motion execution cycle, the three drive motors start and end at the same time, making the overall compensation action of the mechanism platform coherent and unified, and reducing errors.
[0013] The beneficial effects of this invention are: 1. To address the slow feedback speed and low accuracy of heave information obtained from gyroscopes, a laser displacement sensor is used in conjunction with a gyroscope to provide feedback on the ship's attitude information. Heave information with higher compensation priority is fed back by the laser displacement sensor, which uses a laser beam vertically projected onto a fixed horizontal reference plane, thereby improving the accuracy and speed of feedback on changes in motion attitude. By using the high-frequency feedback of heave displacement information from the laser displacement sensor, combined with the LSTM model's ability to learn wave period characteristics, advanced compensation for the heave direction is achieved (prediction time window can reach 2-3 wave cycles), improving the vertical compensation accuracy to within ±3cm (compared to ±15cm using traditional methods), significantly reducing the risk of collision between the pier and the ship.
[0014] 2. To address the latency in platform motion compensation and the window period in inertial navigation system feedback, the LSTM model is utilized to effectively capture long-term dependencies in time series data for ship motion prediction. It maintains the stability of the output model and ensures prediction accuracy even under certain levels of noise and interference. The inner control loop is dedicated to high-frequency heave compensation, achieving a response speed of 10ms, significantly reducing compensation lag compared to traditional single-loop control (50-100ms). The outer layer optimizes the allocation efficiency of global pose compensation resources through MPC, reducing redundant energy consumption in multi-degree-of-freedom coupled motion (energy saving approximately 20%).
[0015] 3. By inputting the LSTM model prediction results into MPC for control optimization, dynamic adaptive control can be achieved. The control strategy is dynamically adjusted based on the real-time changes in pose prediction results, enabling the control system to more accurately cope with complex ship navigation environments. Combined with feedback information from gyroscopes and laser displacement sensors, corresponding trajectory points are generated by motion learning, allowing for pre-emptive compensation actions to compensate for errors incurred during intervals. When predicting ship motion, LSTM can adapt to changes in sea state (such as sudden winds or surges), dynamically adjusting prediction weights by memorizing historical data. Combined with MPC's rolling optimization to correct interference errors, the system can maintain compensation stability even at wave heights of 3-4 meters (the traditional method's safety limit is 2.5 meters). Attached Figure Description
[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0017] Figure 1 A schematic diagram of an active wave motion compensation trestle bridge; Figure 2 A flowchart illustrating the training process for an LSTM model; Figure 3 A schematic diagram defining the coordinate system; Figure 4 A schematic diagram defining the positive direction of rotation of the coordinate axes; Figure 5 A flowchart illustrating the process for verifying compensation results; Figure 6 A flowchart illustrating the process of motion compensation for the platform; Figure 7 This is a velocity distribution diagram of the center of mass of the connecting rods of the trestle bridge joint; Figure 8 A flowchart illustrating the training process for the MPC model; Figure 9 A flowchart illustrating the overall compensation principle; Figure 10 A flowchart illustrating the process of adjusting joint speed.
[0018] Explanation of the labels in the diagram: 1. The wave compensation platform consists of a rotation module; 2. a pitch module; 3. a telescopic module; 4. a trestle; 5. a laser displacement sensor; 6. a gyroscope inertial navigation system; 7. a column; and 8. a support base. Detailed Implementation
[0019] The present invention will be further described below with reference to specific embodiments. The illustrative embodiments and descriptions herein are used to explain the present invention, but are not intended to limit the present invention.
[0020] like Figure 1As shown, the wave compensation platform consists of a rotation module 1, a pitch module 2, a telescopic module 3, a trestle 4, a laser displacement sensor 5, a gyroscope inertial navigation system 6, a column 7, and a support base 8. The rotation module comprises a rotation platform as its actuator, the pitch module comprises an electric cylinder as its actuator, and the telescopic module comprises a linear module as its actuator. The sensing module includes a gyroscope and a laser displacement sensor. Its telescopic stroke is 1m, and its average telescopic speed is... Pitch angle Mean pitch angular velocity Rotation angle Average rotational speed To achieve a 1m telescopic movement, a linear module is used, with a top plate equipped with railings installed on the linear module; the pitch movement requires the implementation of rotation. An electric cylinder is used to achieve this. The base of the electric cylinder is mounted on the column via a hinge support, and the Y-shaped connector at the end of the piston rod is connected to a single-ear seat on the bottom support plate of the linear module. The rotary motion requires rotation. A hollow rotating platform is used, with its bottom fixed to a base by screws. A column base is mounted on the rotating platform. A gyro inertial navigation system combined with a laser displacement sensor provides feedback on the ship's heading, pitch, roll, speed, position, attitude angular rate, and heave changes. This information is input to the control terminal, which then controls the movement angles of three servo motors. This allows the platform on the pier to flexibly achieve three degrees of freedom of movement—extension, pitch, and rotation—maintaining the stability of the pier's end position.
[0021] This invention discloses an active wave motion compensation trestle control method based on LSTM pose prediction and MPC optimization control, comprising the following steps: S1: As Figure 2 As shown, a dual-layer compensation architecture combining an inner and outer layer with a neural network model LSTM is used to predict the ship's attitude. The inner control loop collects real-time ship heave displacement data based on laser displacement sensors and directly inputs it into the LSTM model with high-frequency feedback (millisecond level) to predict the short-term heave motion trend. The prediction result generates vertical compensation commands for the actuator joints through kinematic calculation and directly drives the hydraulic-electric actuators of the trestle, prioritizing the resolution of high-frequency disturbances in the heave direction.
[0022] The outer control loop uses a gyroscope inertial navigation system to acquire the ship's six-degree-of-freedom pose (roll, pitch, bow, etc.) and combines it with the timing prediction capability of LSTM to generate global pose prediction data. After fusing the outer prediction results with the inner heave compensation signal, the data is input into the model predictive controller (MPC). Through rolling optimization calculation, the MPC generates the optimal trajectory command for the joints, achieving global compensation for the six-degree-of-freedom coupled motion.
[0023] Furthermore, the specific implementation method of step S1 includes the following steps: S1.1: Use a gyroscope inertial navigation system (INS) and a laser displacement sensor to collect current ship motion attitude information, including pitch, roll, speed, position, attitude angular rate, heave, etc. S1.2: The initial period of feedback from the INS and laser displacement sensors. and the period after The pose information within each set constitutes a set of motion information. At least 300 sets of historical motion information are collected to construct a motion pose dataset. The data is arranged in chronological order, cleaned, and the ship pose data corresponding to the sampling frequency of 10Hz is retained. Outliers and missing values are removed, and the data is normalized. Furthermore, the normalization formula is as follows: In the formula, The original ship attitude data, The minimum value in the data sequence. The maximum value in the data sequence; S1.3: Divide the motion dataset into training and test sets in an 8:2 ratio, used for model training and prediction result validation respectively. The normalized motion dataset is as follows: The training set is The test set is ; S1.4: The ship pose of the previous time period in the training set is used as the input of the LSTM model, and the pose information of the next time period is used as the output of the LSTM model. The neural network LSTM model is trained to obtain the mapping relationship between the two, that is, the motion trend and law of the ship under the influence of waves in the state of no power input. S1.5: Build the LSTM network, set the structural parameters of the LSTM network, and then input the training set and test set obtained in step S1.3 into the LSTM network for training using a sliding window prediction method. An LSTM unit layer consists of a forget gate, an input gate, and an output gate.
[0024] The loop output of the forget gate is expressed as follows: The loop output of the input gate is: The loop output of the output gate is: in, , Forget gate weight parameters, Forget gate bias parameters; , For the input gate weight parameters, For input gate bias parameters; , For output gate weight parameters, These are the output gate bias parameters; For output of the hidden layer, Let be the excitation function; S1.6: Set up the input layer, LSTM layer, fully connected layer, dropout layer, and output layer of the LSTM network. Select the ReLU activation function to learn the feature representation and the Sigmoid activation function to learn the probability distribution of the data. Set the optimizer to the SGD optimizer. S1.7: The Mean Squared Error (MSE) is used to measure the difference between the model's predicted values and the actual values. Its loss function formula is as follows: ,in, This represents the true pose value. To predict the pose value, the weights in the LSTM model are updated using the backpropagation algorithm and the SGD optimizer to minimize the loss function. S1.8: The motion data obtained in step S1.3 is segmented according to the defined window length of 10, and then input into the LSTM network to obtain the trained LSTM network. Throughout the training process, the model parameters are continuously adjusted until the model converges. As training progresses, the loss function should gradually decrease, indicating that the model is gradually learning and optimizing its prediction ability. S1.9: After evaluation on the validation and test sets, the current ship pose fed back by the INS and laser displacement sensors is input into the trained LSTM model, and the predicted ship pose is output as the input to the compensated pier kinematics model. Furthermore, when conflicts arise between the inner and outer loop data, the inner loop prioritizes heave parameters, while the outer loop prioritizes other parameters. When the conflict occurs in heave data, the inner loop's laser sensor is given higher weight; conversely, if the conflict involves other parameters such as roll or pitch, the outer loop's gyroscope is given higher weight. After redistributing the weights, the fused measured sensor data is compared with the sensor data predicted by LSTM based on historical data to verify data consistency. The weights are dynamically adjusted based on the deviation to ensure the system's reliability and accuracy.
[0025] S2: Based on the pose prediction output of the LSTM model, the heave displacement data is used to predict the short-term heave motion trend in the future with high-frequency feedback. The prediction result is used to generate vertical compensation commands for the execution joints through kinematic calculation. The six-degree-of-freedom pose of the ship is obtained using the gyroscope inertial navigation system to obtain global pose prediction data. The end point transformation matrix is solved using the wave-compensated trestle kinematic model, and then the motion trajectory of each execution joint of the trestle in the joint space is obtained. This motion compensation trajectory is used as the reference trajectory of the MPC model. Furthermore, the specific implementation method of step S2 includes the following steps. S2.1: Establish the joint coordinate system of the motion compensation trestle using the DH matrix parameter method, describe the spatial pose between adjacent joints using matrix transformation, and obtain the kinematic model of the trestle through coordinate transformation. Furthermore, the position and attitude of the lander at the end of the motion-compensated trestle are solved to obtain the relative pose of the end point of the trestle channel in a coordinate system with the center of the trestle base as the origin; S2.2: Determine the reference coordinate system of the motion-compensated trestle coordinate system group and fix it on the motion-compensated trestle base, which remains stationary. Name it the base coordinate system. Establish a coordinate system on the lander at the end of the motion-compensated bridge. Establish a coordinate system at each joint i. By utilizing the pose transformation between adjacent coordinate systems, the pose of other parts can be derived from a certain pose. S2.3: Based on the DH matrix parameter method, a coordinate system is established for the motion compensation trestle. The center of the bottom of the trestle is set as the origin of coordinate system {0}. The contact point between the trestle base and the fixed channel is set as the origin of coordinate systems {1} and {2}. The contact point between the trestle telescopic channel and the trestle pitch system is set as the origin of coordinate system {3}. The end point of the trestle telescopic channel is set as the origin of coordinate system {4}. Furthermore, a schematic diagram of the motion-compensated trestle coordinate system established based on the matrix parameter method is shown below. Figure 3 As shown, where, , , , In the axial direction, The axis rotates outwards, and its direction is determined by the right-hand rule. The Cartesian coordinate system definition method is used, and the positive direction of rotation of the coordinate system axis is determined based on the right-hand rule, such as... Figure 4 As shown, these represent the positive rotation directions of the X-axis, Y-axis, and Z-axis, respectively. S2.4: Based on the structural technical parameter requirements, determine the joint variable range and parameter tables as shown in Table 1 and Table 2. Table 1 Range of variables for each joint pitch angle With variables The relationship is: °.
[0026] Table 2 DH Parameter Table in , , The fixed structural parameters are 822.47mm, 1153mm, and 110.95mm respectively.
[0027] S2.5: The homogeneous transformation matrix from coordinate system {i-1} to coordinate system {i} is obtained using the rotation and translation matrices, as shown in the following equation: S2.6: Substitute the parameters from Table 2 in S2.4 into the homogeneous transformation matrix in S2.5 to obtain the homogeneous transformation matrix of the rotation joint coordinate system {1} relative to the base coordinate system {0}: Similarly, the transformation matrices of the rotational joint coordinate system {2} relative to the rotational joint coordinate system {1}, the sliding joint coordinate system {3} relative to the rotational joint coordinate system {2}, and the terminal lander coordinate system {4} relative to the sliding joint coordinate system {3} are respectively: Multiplying the above four matrices in sequence yields the homogeneous transformation matrix of the joint coordinate system {4} relative to the foundation coordinate system {0} of the trestle base, as shown in the formula: This matrix represents the pose of the end point of the trestle channel relative to the base coordinate system {0} of the trestle base. The rotation matrix represents the rotational attitude of the end point of the trestle channel, and the position matrix represents the position of the end point of the trestle channel. Let the position coordinates of the end point in the base coordinate system be... As shown in the following formula: This equation is the solution equation for the forward kinematics of the motion-compensated trestle; S2.7: Solving the formula for the positive solution in S2.6 using algebraic methods yields: By further solving the above equation using trigonometric identities, we can obtain: This equation is the inverse kinematics solution equation for the motion-compensated trestle; S2.8: Since the ship moves with the waves on the sea surface, a transformation matrix is needed to represent the influence of the ship's own motion on the base coordinate system. Assuming the ship is stationary (i.e., the base coordinate system is fixed), while the target point moves in the opposite direction relative to the ship, the pier end tracks its spatial trajectory. Motion parameters are fed back by a fiber optic gyroscope inertial navigation system and a laser displacement sensor, mainly including heading angle, roll angle, pitch angle, and vertical offset. Controlling the correct response of each joint of the pier to track this trajectory achieves stability. The ship rotates around three axes under the influence of the waves, with clockwise rotation along the axes being positive, and translates along the three axes. Now, taking the inverse variables as parameters, the transformation matrix is set as follows: The rotation matrix about the x-axis is: The rotation matrix about the y-axis is: The rotation matrix about the z-axis is: The translation matrices along the three axes are: The overall transformation matrix is: Let the ship's position coordinates before it began to move be (a, b, c), that is... After the ship's pose changes under the influence of waves, the new coordinates of the target point are: Expanded to: This formula is the coordinate solution for the new target point. Substituting the six motion feedback parameters and the position coordinates of the three initial target points into the formula yields the new coordinates. Substituting these new coordinates into the inverse solution formula in S2.7 gives the required rotation angle and displacement. Figure 5 As shown, the results of the compensation point coordinates are verified. S2.9: After the control system drives the actuator joint to reach the target point, the base coordinate system coincides with the world coordinate system, and the ship's initial attitude is roll angle U=0°, pitch angle V=0°, and yaw angle W=180°. For example... Figure 6 As shown, the current position DPOS of the joint-related drive motor is converted into the joint motion, i.e., the rotation angle. Pitch angle and elongation Substituting these values into the forward formula in S2.6, we obtain the coordinates of the target point. The pose change parameters U, V, W, XP, YP, and ZP are obtained from the LSTM ship pose prediction output in S1.9. After forming the transformation matrix T, it is applied to the initial target point. The coordinates of the target point in the world coordinate system are obtained using the point-finding formula in S2.8. Transformed coordinate values in the current real-time coordinate system Furthermore, its position coincides with the target point in the world coordinate system.
[0028] S2.10: Calculate the coordinates of the compensation points. Substituting the equations into the inverse equation in S2.7, we can obtain the motion of the relevant joints, i.e., the rotation angle. Pitch angle and elongation The motion compensation trajectory is used as the reference trajectory for the MPC model. S3: The dynamic model of the offshore trestle is used to provide the state-space equation for the MPC algorithm, and a model predictive controller with state constraints is designed based on this mathematical model. Furthermore, the specific implementation method of step S3 includes the following steps. S3.1: The trestle can be equivalent to a three-degree-of-freedom robotic arm system, with the rotational angular velocity of its rotary joint being: The pitch angular velocity of the pitch joint is The moving speed of the telescopic joint is ;like Figure 7 As shown, point This refers to the position of the center of mass of the linkage structure between joint one and joint two. and The trestle bridges are located at points. The velocity vector and angular velocity vector at point . , as well as The meaning can be deduced by analogy; S3.2: Furthermore, any point on the three-degree-of-freedom shipboard boarding bridge... The pose transfer matrix is denoted as: In the formula, Here is a rotation matrix, representing the pose. This is a position matrix, representing positions; points. The Jacobian velocity matrix and Jacobian angular velocity matrix are: In the formula, the direction vector is S3.3: From the pose transfer matrix, Jacobian velocity matrix, and Jacobian angular velocity matrix in S3.2, the point can be obtained. The Jacobian matrix is: Similarly, point , The Jacobian matrices are as follows: In the formula, S3.4: Further, the joint variable matrix of the stack is defined as follows: The joint variable velocity matrix is The pier is at point The velocity and angular velocity at a point can be expressed as: S3.5: The sum of the translational kinetic energy generated by the linear velocity and the rotational kinetic energy generated by the angular velocity at the center of mass of each joint arm in the trestle bridge is: Its expression is: In the formula, For the first Equivalent mass at the joint center of mass For the first The inertia tensor matrix of the joint. Joint variables The inertia matrix; S3.6: The sum of the gravitational potential energy of the center of mass of each joint arm of the trestle is... Its expression is: In the formula, It is the acceleration due to gravity. For the first The height of the joint's center of mass relative to point O in the direction of gravity; S3.7: Combining the total kinetic energy and total potential energy from S3.5 and S3.6, according to the Euler-Lagrange equations for mechanical systems, the dynamic equation of the wave-compensated trestle can be expressed as: In the formula, For Lagrange functions, ; The joint variable matrix Q is the first... item, For generalized torque; S3.8: Furthermore, due to Therefore, the dynamic equations in S3.7 can be simplified to: Record the potential energy of the system For joint variables The partial derivative matrix is: remember Inertia matrix If the elements in the equation are such that the matrix in the kinetic equation consists of eccentric terms and Coriolis terms, then... The elements in can be represented as: In the formula, Coriolis force term, For the centripetal force term, This refers to the angular velocity and inertia term. S3.9: In summary, the dynamic state equation of the shipboard boarding bridge is: , In the formula, To execute the velocity vector of the joint variables, To execute the acceleration vector of the joint variables, For torque, The inertia matrix, The Coriolis force and centrifugal force are vectors. It is the gravity vector; S4: Through dynamic modeling in S3.9, such as Figure 8 As shown, based on this model and combined with the joint compensation trajectory obtained from the kinematic prediction in S2.10, the reference trajectory input for MPC is used. Under constraints, the objective function is solved to obtain the optimal motion compensation trajectory of each joint of the trestle system under optimal control input. The inner layer heave prediction data is used as the priority weight term of the MPC algorithm. A higher penalty coefficient for heave direction compensation is set in the optimization objective to ensure that the joint actions output by MPC prioritize suppressing heave disturbances. Timestamp synchronization technology is used to solve the problem of feedback frequency difference between the two-ring sensors, real-time alignment of inner and outer layer data, and avoidance of compensation signal phase delay. Furthermore, the specific implementation method of step S4 includes the following steps. S4.1: Define state variables for the dynamic model of offshore trestle Define the control variable as , where is the torque of the articulated arm, and the output variable is defined as . To implement joint variables, the state-space equations of the offshore trestle are as follows: S4.2: The trestle system is linearized using the Jacobian matrix linearization method. Let the desired equilibrium state of the system be (0,0), i.e. Then, each term of the state-space equation in S4.1 is linearized at the desired point (0,0); Furthermore, a constant matrix A is constructed using partial differential derivatives. right The Jacobian matrix at (0,0) is represented by the partial differential derivatives forming a constant matrix B. right The Jacobian matrix at (0,0) is given by the formula: In the formula, A is a 6×6 matrix, where 6 is the system dimension, and B is a 6×3 matrix, where 3 is the input dimension; S4.3: Further, the original nonlinear dynamic system in S4.2 is linearized: S4.4: Further, let the sampling period be T, and the sampling time be... The linear formula in S4.3 is discretized using the Taylor formula, and the state variables are discretized as follows: The discretized state-space equations of the offshore trestle are as follows: In the formula, A is the system matrix, B is the control matrix, G is the parameter matrix, and H is the output matrix. The formulas are as follows: , , S4.5: Using the linearized and discretized dynamic models from S4.3 and S4.4 as the control model, the prediction time domain is... The processed state variables are: The control variables are: S4.6: Based on the state equation of the model in the prediction time domain as described in S4.5, the prediction equation can be obtained as follows: = , = , = S4.7: Furthermore, in order to select the optimal input under constraints so that the system output can track the desired output, for the optimization of the deviation of the system state variables and the control quantity, the minimum distance is used as the objective optimization function J, which is the difference between the predicted trajectory and the desired trajectory, i.e., the tracking error. and predict input To solve for the constraints, the formula is: In the formula, This indicates that the prediction model predicts the trajectory. Represents the expected trajectory. Indicates the input of the prediction system Furthermore, the objective function for trajectory tracking error is: In the formula, and Let represent the weight matrices respectively; further, let: The objective optimization function can be expressed as: S4.8: The working range limitations of each joint of the offshore trestle are as follows: Table of Working Range Limitations for Each Joint of Offshore Trench By transforming and substituting the state and input constraints of the offshore trestle, the optimization problem of minimizing the error of the offshore trestle is transformed into a quadratic programming problem: Using this equation, for the prediction time domain is Internal control variable sequence Perform prediction and solution: , This is the actual control input increment; The first optimized input in the optimized input sequence is passed to the system, and the optimization function is searched again at the next moment. This process is repeated until the system reaches stability. S4.9: For example Figure 9As shown, the current ship attitude is fed back through a combination of an INS (Inertial Navigation System) and a laser displacement sensor. The INS provides information on roll, pitch, bow, sway, and heave, while the heave information, which has a higher priority for compensation, is fed back by a laser displacement sensor with higher measurement accuracy, which projects a laser vertically onto a fixed horizontal reference plane. By layering and fusing multi-source information from the laser displacement sensor and the gyroscope inertial navigation system, high-precision and high-response forward-looking compensation of ship motion is achieved. The attitude information of the previous period is input into the LSTM model to predict the ship's attitude in the next period. The predicted value is then input into the kinematic model to obtain the motion of the trestle's joints, which is used as a reference trajectory input into the MPC model. After rolling optimization, the first control input u in the optimal control sequence is selected for model control. It is determined whether the motion of the joint exceeds the mechanism's stroke. If not, the motion of the joint is converted into motor motion, and the movement is controlled to the compensation point to achieve wave compensation. Figure 10 As shown, after obtaining the motor's motion amount, it is compared with the current position DPOS of the motor shaft to adjust the speed of the actuator joint. If the motor rotation amount is too large, the motor speed is increased, and vice versa. By fixing the motion execution cycle, the three drive motors start and end at the same time, so that the overall compensation action of the mechanism platform is smooth and unified, and the error is reduced.
[0029] The purpose of this invention is to address the aforementioned shortcomings of existing technologies by proposing a method that combines an inertial navigation system (INS) with a laser displacement sensor and a long short-term memory (LSTM) model to predict the motion and attitude of a ship. By hierarchically fusing multi-source information from the laser displacement sensor and the INS, high-precision, high-response forward-looking compensation for ship motion is achieved. The prediction results are then used as input to a kinematic model to derive the motion of the compensation pier's actuator joints. This motion is then used as a reference trajectory input to a model predictive control (MPC) algorithm, which adjusts the control strategy in real time through control optimization. After obtaining the optimal actuator variables under the optimal control input, the corresponding actuators are driven to perform compensation, adjusting the attitude and position of the offshore gangway in real time to counteract or reduce the swaying and vibration caused by wind and waves, thereby reducing or eliminating the dynamic impact of sea waves on the mother ship and the offshore gangway.
[0030] Considering the impact of wave motion on the relative displacement of the ship's compensation mechanism and the offshore platform, heave compensation has higher priority and safety requirements during wave compensation. Therefore, a dual-layer compensation system with inner and outer rings is adopted. The inner layer uses a laser displacement sensor to provide heave information, offering high response speed and accuracy. Compared to the outer layer, the outer layer's gyroscope provides more comprehensive pose data, but at a lower frequency. By the time the outer layer completes one compensation cycle, the inner layer has already completed multiple cycles. This dual-layer compensation system improves the timeliness of heave compensation, reduces delays, and ensures the vertical stability of the pier, thereby enhancing the overall system performance. The dual-ring structure, combined with LSTM prediction, enables proactive compensation by anticipating motion trends, rather than passively responding.
[0031] Due to differences in sensor error accuracy and sampling frequency, when data conflicts occur between the inner and outer loop sensors on the same parameters, the inner loop prioritizes processing high-frequency heave motion, while the outer loop prioritizes processing other pose data, in order to ensure the reliability and accuracy of the system.
[0032] The layered compensation architecture, combined with a heave information priority fusion mechanism, leverages the time-series prediction capabilities of LSTM and the optimization control capabilities of MPC to achieve the dual objectives of precise high-frequency disturbance suppression and multi-degree-of-freedom global optimization in active wave compensation systems. This makes it suitable for high-sea-state operations of marine engineering equipment. The advantage of layered compensation lies in the inner layer's high-frequency heave processing and the outer layer's comprehensive processing of other poses, thus balancing response speed and accuracy. Furthermore, the optimization capabilities of MPC allow for real-time adjustments that consider future conditions, improving the foresight and overall efficiency of the compensation, and enhancing safety and reliability in harsh sea conditions.
[0033] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention shall still fall within the scope of the technical solution of the present invention.
Claims
1. An active wave motion compensation gangway control method based on LSTM pose prediction and MPC optimization control, characterized in that, Comprise the following steps: S1: using the inner and outer double-layer compensation architecture combined with neural network model LSTM to predict the ship pose, the inner control loop is based on laser displacement sensor to collect ship heave displacement data in real time, with high frequency feedback directly input LSTM model, predict the future short heave motion trend, the prediction result is generated by kinematics calculation execution joint vertical compensation instruction, and directly drive the liquid electric actuator of stack bridge, priority to solve the heave direction high frequency disturbance problem, The outer control loop uses the gyroscope inertial navigation system to obtain the six degree of freedom pose of the ship, and combines the time series prediction ability of LSTM to generate global pose prediction data. The outer prediction result and the inner heave compensation signal are fused and input into the model predictive controller MPC. Through the rolling optimization calculation of future multi-step control sequence, the optimal trajectory instruction of the execution joint is generated, and the global compensation of six degree of freedom coupling motion is realized; S2: according to the pose prediction output value of LSTM model, the heave displacement data is used to predict the future short heave motion trend with high frequency feedback. The prediction result is generated by kinematics calculation execution joint vertical compensation instruction, the six degree of freedom pose of the ship is obtained by using the gyroscope inertial navigation system, and the global pose prediction data is obtained. The end point transformation matrix is solved by using the wave compensation stack bridge kinematics model, and then the corresponding motion trajectory of each execution joint of the stack bridge in the joint space is obtained. The motion compensation trajectory is used as the reference trajectory of the MPC model; S3: use the dynamics model of marine stack bridge to provide state space equation for MPC algorithm, design model predictive controller with state constraint based on the mathematical model; S4: input the reference trajectory into MPC, solve the objective function under the constraint condition to obtain the optimal motion compensation trajectory of each joint of the stack bridge system under the optimal control input. The inner heave prediction data is used as the priority weight item of MPC algorithm, and the penalty coefficient of heave direction compensation is set higher in the optimization target to ensure that the execution joint action output by MPC can preferentially suppress heave disturbance; The time stamp synchronization technology is used to solve the frequency difference problem of double-loop sensor feedback, and the inner and outer layer data are real-time aligned to avoid phase delay of compensation signal.
2. The active wave motion compensation gangway control method based on LSTM pose prediction and MPC optimization control according to claim 1, characterized in that, The specific implementation method of step S1 comprises the following steps: S1.1: use the gyroscope inertial navigation system INS and the laser displacement sensor to collect the current ship motion attitude information, including longitudinal and lateral roll, speed, position, attitude angular rate, heave information; S1.2: The initial period of feedback from the INS and laser displacement sensors respectively. and the period after The pose information within each set constitutes a set of motion information. At least 300 sets of historical motion information are collected to construct a motion pose dataset. The data is arranged in chronological order, cleaned, and the ship pose data corresponding to the sampling frequency of 10Hz is retained. Outliers and missing values are removed, and the data is normalized. Further, the normalization formula is , wherein, is the original ship pose data, is the minimum value in the data sequence, is the maximum value in the data sequence; S1.3: The motion dataset is divided into training set data and test set data in proportion, respectively for model training and prediction result verification, the normalized motion dataset is , the training set is , and the test set is ; S1.4: use the ship pose in the previous time period of the adjacent time period in the training set as the input of the LSTM model, and use the pose information in the next time period as the output of the LSTM model. Train the neural network LSTM model to obtain the mapping relationship between the two, that is, the motion trend and its law of the ship under the influence of waves without power input; S1.5: build LSTM network, set the structure parameters of LSTM network, then input the training set and test set obtained in step S1.3 into LSTM network in a window sliding prediction mode for training. The LSTM unit layer is composed of forget gate, input gate and output gate; The recurrent output of the forget gate is: The recurrent output of the input gate is: The cyclic output of the output gate is: wherein, , is a forget gate weight parameter, is a forget gate bias parameter; , is an input gate weight parameter, is an input gate bias parameter; , is an output gate weight parameter, is an output gate bias parameter; is a hidden layer output, is an activation function; S1.6: Set the input layer, LSTM layer, full connection layer, dropout layer, and output layer of the LSTM network, select the activation function ReLU for learning feature representation, select the activation function Sigmoid for learning the probability distribution of data, and set the optimizer as the SGD optimizer; S1.7: The mean square error (MSE) is used to measure the difference between the model prediction value and the true value, and the loss function formula is wherein, is the true pose value, is the predicted pose value, and the weights in the LSTM model are updated by the back propagation algorithm and the optimizer SGD so that the loss function is minimized; S1.8: The motion data obtained in step S1.3 is segmented according to the defined window length, and then input into the LSTM network to obtain the trained LSTM network. During the entire training process, the parameters of the model are continuously adjusted until the model converges. As the training proceeds, the loss function should gradually decrease, indicating that the model is gradually learning and optimizing the prediction ability; S1.9: After evaluation by the validation set and the test set, the current period ship pose fed back by the inner and outer ring INS and the laser displacement sensor is input into the trained LSTM model, and the predicted ship pose is output as the input of the compensation stack bridge kinematics model; Further, when the inner and outer ring data conflict, the inner ring prioritizes processing the heave parameter, and the outer ring prioritizes processing other parameters. When the conflict occurs in the heave data, the inner ring laser sensor is prioritized and given a higher weight ratio. Conversely, if it is other parameters, such as roll or pitch, the outer ring gyroscope is given a higher weight ratio. After reassigning the weight ratio, the fused measured sensor data is compared with the LSTM-based historical data prediction to verify the consistency of the data, and the weight ratio is dynamically adjusted based on the deviation value to ensure the reliability and accuracy of the system.
3. The active heave compensation gangway control method based on LSTM pose prediction and MPC optimization control according to claim 2, characterized in that, The specific implementation method of step S2 includes the following steps: S2.1: Establish the joint coordinate system of the motion compensation stack bridge using the D-H matrix parameter method, describe the spatial pose between adjacent joints using matrix transformation, and obtain the kinematics model of the stack bridge through coordinate transformation; Further, the position and attitude of the motion compensation stack bridge end lander are solved, and the relative pose of the stack bridge channel end point in the coordinate system with the stack bridge base center as the origin is obtained; S2.2: Determine the reference coordinate system of the group of motion compensation stack bridge coordinate systems, and fix it on a motion compensation stack bridge base that remains stationary at all times, named the base coordinate system , establish a coordinate system on the motion compensation stack bridge end lander , establish a coordinate system at each joint i , the pose of other parts can be derived from a certain pose by using the pose transformation between adjacent coordinate systems; S2.3: Establish the coordinate system of the motion compensation stack bridge based on the D-H matrix parameter method, set the center of the stack bridge bottom as the coordinate origin of the coordinate system {0}, set the contact point of the stack bridge base and the fixed channel as the coordinate origin of the coordinate systems {1} and {2}, set the contact point of the stack bridge telescopic channel and the stack bridge pitch system as the coordinate origin of the coordinate system {3}, and set the end point of the stack bridge telescopic channel as the coordinate origin of the coordinate system {4}; Further, a motion compensation stack bridge coordinate system is established based on a matrix parameter method, wherein, , , , axially inward, axially outward, the direction is determined according to the right-hand rule, a Cartesian coordinate system definition method is adopted, and the positive direction of the rotation of the coordinate system axis is determined based on the right-hand rule; S2.4: Determine the joint variable range and parameters according to the structural technical parameter requirements; S2.5: Obtain the homogeneous transformation matrix from coordinate system {i-1} to coordinate system {i} using the rotation matrix and the translation matrix, as shown in the following formula: S2.6: Substitute the parameters in S2.4 into the homogeneous transformation matrix in S2.5 to obtain the homogeneous transformation matrix of the rotating joint coordinate system {1} relative to the base coordinate system {0}: Similarly, the transformation matrices of the rotating joint coordinate system {2} relative to the rotating joint coordinate system {1}, the sliding joint coordinate system {3} relative to the rotating joint coordinate system {2}, and the end lander coordinate system {4} relative to the sliding joint coordinate system {3} are respectively: The above four matrices are multiplied in turn to obtain the homogeneous transformation matrix of joint coordinate system {4} relative to the pier base coordinate system {0} as follows: The matrix represents the pose of the end point of the bridge channel relative to the bridge base coordinate system {0}, wherein the rotation matrix represents the rotation pose of the end point of the bridge channel, and the position matrix represents the position of the end point of the bridge channel. It is assumed that the coordinate of the end point position is in the base coordinate system As shown in the following formula: The equation is the forward kinematics equation of the motion compensation pier; S2.7: The forward kinematics equation of the motion compensation pier is obtained by solving the forward kinematics equation of the motion compensation pier. Further solving the above equation by using the triangular identity transformation can obtain: The equation is the inverse kinematics equation of the motion compensation pier; S2.8: Since the ship will move with the waves on the sea surface, a transformation matrix is needed to replace the influence of the ship's own motion on the base coordinate system. Assuming that the ship is stationary, i.e. the base coordinate system is not moving, and the target point moves in the opposite direction relative to the ship, the pier end tracks its spatial trajectory, and the motion parameters are fed back by the fiber-optic gyroscope inertial navigation system and the laser displacement sensor, including the heading angle, the roll angle, the pitch angle, and the vertical displacement. Controlling the pier joints to correctly respond to the tracking of this trajectory can achieve a stable effect. The ship body rotates around the three axes under the action of the waves, with the clockwise rotation of the axes as positive, and translates along the three axes. The inverse variables are taken as parameters, and the transformation matrix is set as follows: The rotation matrix around the x-axis is: The rotation matrix around the y-axis is: The rotation matrix around the z-axis is: The movement matrix along the three axes is: The overall transformation matrix is: Let the position coordinates of the ship before the motion occur be (a, b, c), i.e. Then the new target point position coordinates are: Expanding it gives: The equation is the coordinate solving equation of the new target point. Substituting the six motion feedback parameters and the three initial target point position coordinates into the equation can obtain the new coordinates. Substituting the new coordinates into the inverse solution equation in S2.7 can obtain the required rotation angle and displacement; S2.9: When the control system drives the execution joint to reach the target point position, the base coordinate system coincides with the world coordinate system, the initial pose of the ship is the roll angle U=0°, the pitch angle V=0°, and the yaw angle W=180°, and the current position DPOS of the execution joint related drive motor is converted into the execution joint motion amount, i.e. the rotation angle , the pitch angle and the elongation , which are substituted into the positive solution formula in S2.6 to obtain the target point coordinates , the pose change parameters U, V, W, XP, YP and ZP are obtained through the LSTM ship pose prediction output value in S1.9, and the transformation matrix T is formed to act on the initial target point , the target point coordinates in the world coordinate system are obtained by the point formula in S2.8 , and the conversion coordinate value in the current real-time coordinate system , and it coincides with the target point position in the world coordinate system; S2.10: Calculate the coordinates of the compensation points. Substituting the equations into the inverse equation in S2.7, we can obtain the motion of the relevant joints, i.e., the rotation angle. Pitch angle and elongation The motion compensation trajectory is used as the reference trajectory for the MPC model.
4. The active heave compensation gangway control method based on LSTM pose prediction and MPC optimization control according to claim 3, characterized in that, The specific implementation method of step S3 includes the following steps: S3.1: The trestle is equivalent to a three-degree-of-freedom mechanical arm system, the rotation angular velocity of the rotation joint is , the pitch angular velocity of the pitch joint is , and the moving velocity of the stretch joint is ; point is the mass center position of the connecting rod structure between joint one and joint two, and are the velocity vector and angular velocity vector of the trestle at point , and the meanings of points , and are the same; S3.2: Further, the pose transfer matrix of any point on the three-DOF ship-borne embarkation pier is denoted as: is denoted as: wherein is a rotation matrix, representing the pose, is a position matrix, representing the position; point The Jacobian velocity matrix and the Jacobian angular velocity matrix of are: In the formula, the direction vector is S3.3: The point from the pose propagation matrix and the Jacobian velocity matrix and the Jacobian angular velocity matrix in S3.2 is The Jacobian matrix is: By the same token, the Jacobian matrices of the points , are respectively In the formulae, S3.4: Further, define the joint variable matrix of the gantry as , the joint variable velocity matrix as , the velocity and angular velocity of the gantry at point can be expressed as: S3.5: The sum of the translational kinetic energy and the rotational kinetic energy generated by the linear and angular velocities at the center of mass of each jointed arm in the staging bridge is The expression for which is: wherein is the first equivalent mass at the joint center of mass, is the first is the inertia tensor matrix of the joint, is the inertia matrix of the joint variable . S3.6: The sum of the gravitational potential energy of each of the joints of the bridge with respect to the centroid of the bridge is whose expression is: wherein is the gravitational acceleration, is the first is the height of the joint center relative to point O in the direction of gravity; S3.7: According to the Euler-Lagrange equation of the mechanical system, the dynamics equation of the wave compensation pier can be expressed as: wherein is the Lagrangian function, ; is the i-th element of the joint variable matrix Q, , is the generalized moment; S3.8: Further, since Thus, the kinetic equation in S3.7 can be simplified as: Potential energy of the system The partial derivative matrix of the joint variables is: Recall is the element in the inertia matrix is the element in the inertia matrix The element in the matrix consisting of the centrifugal and Coriolis terms in the dynamic equation can be expressed as wherein is the Coriolis force term, is the centripetal force term, is the angular velocity inertia term; S3.9: As described above, the dynamics state equation of the ship-mounted embarkation pier is: , wherein is the velocity vector of the joint variable, is the acceleration vector of the joint variable, is the moment, is the inertia matrix, is the Coriolis and centrifugal force vector, is the gravity vector.
5. The active heave compensation gangway control method based on LSTM pose prediction and MPC optimization control according to claim 4, characterized in that, In step S4, the execution joint compensation trajectory obtained by the kinematics prediction in S2.10 is used as the reference trajectory input of MPC. The specific implementation method of step S4 includes the following steps: S4.1: Define state variables for the offshore jetty dynamics model , define control variables as , joint arm torques, define output variables as , execute joint variables, the offshore jetty state space equation is: S4.2: Linearization of the stacker system by means of linearization of the Jacobian matrix, with the desired equilibrium state of the system being (0,0), i.e. and the linearization of each term of the state space equation in S4.1 at the desired point (0,0). Further, the partial derivative Jacobian matrix A is represented by a constant matrix For The Jacobian matrix at (0, 0) is represented by a partial derivative Jacobian matrix B For The Jacobian matrix at (0, 0) is represented by a partial derivative Jacobian matrix B In the formula, A is a 6×6 matrix, 6 is the system dimension, B is a 6×3 matrix, and 3 is the input dimension; S4.3: Further, the original nonlinear dynamics system in S4.2 is linearized: S4.4: Further, let the sampling period be T and the sampling time be , the linear formula in S4.3 is discretized using Taylor formula, and the state variable after discretization is: After the state space equation of the offshore pier is discretized, it is: In the formula, A is the system matrix, B is the control matrix, G is the parameter matrix, H is the output matrix, and the formulas are respectively: , , S4.5: Take the linearized and discretized dynamics model in S4.3 and S4.4 as the control model, and predict the time domain , and the processed state variable is: The control variable is: S4.6: According to the state equation of the model in the prediction time domain in S4.5, the prediction equation is: = , = , = S4.7: Further, in order to select the optimal input to make the system output track the desired output under the constraints, the optimization of the deviation of the system state variable and the control variable is performed, with the minimum distance as the target optimization function J, to the difference between the predicted trajectory and the desired trajectory, i.e. the tracking error and the predicted input The constraint solution is as follows: wherein, represents a predicted trajectory by the prediction model, represents a desired trajectory, represents a predicted system input Further, the target function of the trajectory tracking error is: wherein and denote weight matrices, respectively; further, let: The objective optimization function can be expressed as: S4.8: Substituting the state constraint conditions and input constraint conditions of the offshore pier, the optimization problem of minimizing the error of the offshore pier is converted into a quadratic programming problem: Using this equation, the prediction horizon is The sequence of control variables is solved by prediction: , is the actual control input increment; The first optimization input in the optimization input sequence is selected to be transmitted to the system, and the optimization function is optimized and solved again at the next time. This process is repeated until the system reaches stability. S4.9: The current ship pose is fed back by the combination of INS and laser displacement sensor. The roll, pitch, yaw, and sway and surge information is fed back by INS, while the heave information with higher priority is fed back by laser displacement sensor with higher measurement accuracy by laser vertical shooting on the fixed horizontal reference surface. Through the hierarchical fusion of multi-source information of laser displacement sensor and gyroscopic inertial navigation system, high-precision and high-response ship motion proactive compensation is realized. The pose information in the previous period of time is input into the LSTM model to predict the ship pose in the next period of time. The predicted value is input into the kinematics model to obtain the motion amount of the stack bridge execution joint, which is input into the MPC model as the reference trajectory. After rolling optimization, the first control input u in the optimal control sequence is selected for model control. It is judged whether the execution joint motion amount exceeds the mechanism motion stroke. If not, the execution joint motion amount is converted into motor motion amount, and the absolute control motion is performed to the compensation point to achieve the purpose of wave compensation. After obtaining the motor motion amount, it is compared with the current position DPOS of the motor shaft to adjust the speed of the execution joint. If the motor rotation amount is too large, the motor motion speed is accelerated, otherwise the motion speed is slowed down. Through fixed motion execution cycle, the three drive motors start and end at the same time, so that the overall compensation action of the mechanism platform is coherent and unified, and the error is reduced.
Citation Information
Patent Citations
Wave compensation prediction method based on random forest algorithm and Adam neural network
CN111738478A
