Method for maintaining posture and tracking trajectory of unmanned ship on water surface under complex sea conditions
By employing online sea state recognition and hierarchical composite control methods, combined with spectral feature analysis and deep reinforcement learning, the problems of attitude instability and trajectory tracking accuracy of unmanned surface vessels under complex sea conditions were solved. This achieved synergistic optimization of attitude stability and trajectory accuracy, enhancing the system's adaptability and safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- OCEAN UNIV OF CHINA
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-10
AI Technical Summary
Existing unmanned surface vessels suffer from unstable attitude and reduced trajectory tracking accuracy in complex sea conditions, and their control parameters are difficult to adjust adaptively, resulting in reduced mission execution accuracy and safety.
A hierarchical composite control method based on online sea state identification is adopted, which combines spectral feature analysis and deep reinforcement learning to achieve real-time estimation and dynamic compensation of multi-source disturbances. Through frequency domain analysis and state fusion estimation, control parameters are dynamically adjusted to improve attitude stability and trajectory tracking accuracy.
It achieves stable attitude maintenance and high-precision trajectory tracking under complex sea conditions, enhances the system's adaptability, reduces energy consumption and wear of actuators, and improves the safety and efficiency of mission execution.
Smart Images

Figure CN121934603B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of ship automatic control and intelligent navigation technology, and in particular relates to a method for attitude maintenance and trajectory tracking control of unmanned surface vessels under complex sea conditions. Background Technology
[0002] With the increasing demand for marine resource development, maritime inspection, environmental monitoring, and surface engineering operations, unmanned surface vessels (USVs) are gradually becoming an important platform for maritime operations due to their unmanned, intelligent, and highly maneuverable advantages. USVs can replace manual labor in tasks such as patrol monitoring, water quality sampling, marine mapping, port inspection, and emergency rescue, reducing human risk while improving operational efficiency. Therefore, ensuring the stable navigation and high-precision trajectory tracking capabilities of USVs under complex sea conditions is an important research direction in the fields of marine engineering and intelligent control.
[0003] However, in real-world marine environments, ship operations are typically affected by a combination of external disturbances, including waves, wind loads, and ocean currents. These disturbances are characterized by high randomness and significant time-varying properties. Especially in medium to high sea states, wave excitation can cause coupled oscillations in the ship's roll, pitch, and yaw motions, leading to attitude instability, increased trajectory deviations, and even affecting mission accuracy. For unmanned vessels requiring fixed-point operations or precise trajectory control, attitude maintenance and trajectory tracking performance are directly related to operational safety and quality.
[0004] Existing control methods for unmanned surface vessels mainly include proportional-integral-derivative (PID) control, sliding mode control, adaptive control, and model predictive control. PID control is simple in structure and easy to implement, but its fixed parameters make it difficult to balance speed and stability in complex sea states, and its disturbance rejection capability is limited. Sliding mode control has strong robustness, but it is prone to chattering problems, which may cause frequent thruster movements under high-frequency wave interference, increasing energy consumption and mechanical wear. Adaptive control methods can handle model uncertainty to some extent, but their ability to identify external random disturbances in real time is insufficient. Although model predictive control can optimize control performance under constraints, its performance is highly dependent on model accuracy. When external disturbances change drastically, the prediction model error will lead to a decrease in control effectiveness. On the other hand, complex sea states themselves have obvious spectral characteristics, and the dominant wave frequency and energy distribution vary significantly under different sea state conditions. However, most existing control methods do not fully utilize sea state frequency domain information, and control parameters are usually fixed or empirically tuned, lacking active perception and online adjustment mechanisms for environmental changes. When sea states change abruptly, the control system often cannot adjust the control strategy in time, resulting in prolonged attitude recovery time or increased trajectory error. Furthermore, traditional disturbance rejection methods often rely on passive robust design, which enhances disturbance rejection capability by increasing control gain. However, this approach may lead to excessive control input under strong disturbance environments, affecting system stability and energy consumption. How to achieve active estimation and real-time compensation of external disturbances while ensuring system stability remains a pressing problem in the field of unmanned vessel control. Summary of the Invention
[0005] To address the aforementioned issues, this invention proposes a method for attitude maintenance and trajectory tracking control of unmanned surface vessels in complex sea conditions. This method enables online sea state identification, adaptive disturbance estimation, and dynamic scheduling of control parameters under multi-source disturbances. It improves trajectory tracking accuracy while ensuring attitude stability, and also considers control smoothness and energy consumption optimization requirements, thereby enhancing the autonomous operation capability and safety reliability of unmanned surface vessels in complex marine environments.
[0006] This invention provides a method for attitude maintenance and trajectory tracking control of unmanned surface vessels under complex sea conditions, comprising the following steps:
[0007] S1: Collect the original position and attitude information and velocity information of the hull, and perform preprocessing to obtain a time-aligned smooth data set;
[0008] A three-degree-of-freedom planar motion mathematical model is established, and pose and velocity state estimates are obtained by combining the state fusion estimation method.
[0009] S2 calculates the lateral acceleration and yaw rate based on the estimated values of attitude and velocity, then performs frequency domain analysis to extract the dominant wave frequency and spectral structure factor, and constructs a comprehensive disturbance intensity index by weighted fusion of attitude disturbance intensity index and water flow wave intensity, and performs online sea state determination and outputs the corresponding sea state level.
[0010] S3. The trajectory tracking error is calculated based on the pose and velocity state estimates and the desired trajectory. The sea state level, spectral structure factor and trajectory tracking error are extracted and mapped into a high-dimensional state constraint feature vector through a sea state feature encoding network. The high-dimensional state constraint feature vector is input into a prediction parameter generation network based on deterministic policy gradient to generate control adjustment coefficients. The finite-time domain performance index function is dynamically reconstructed using the control adjustment coefficients and a rolling solution is performed to obtain the baseline control component. The compensation control output is obtained by superimposing the fast compensation gain coefficient and the fast compensation control term.
[0011] Preferably, it also includes the S4 process:
[0012] The closed-loop control system of the unmanned surface vessel is constructed as an interactive environment. The comprehensive disturbance intensity index, spectral structure factor, and dominant wave frequency are extracted from S2, and the trajectory tracking error is extracted from S3. These are sequentially spliced to form a state space vector. Next, the action space vector is defined. The continuous strategy output vector, which includes longitudinal disturbance compensation thrust, lateral disturbance compensation thrust, and yaw disturbance compensation torque, is defined as the action space vector. Finally, feedforward compensation is performed. The state space vector is input into the disturbance compensation thrust dynamic generation network, and the output action space vector is mapped to form a dynamic feedforward compensation control term. The compensation control output from S3 is fused with the dynamic feedforward compensation control term by vector addition to output the final execution control command.
[0013] Preferably, the position and attitude information includes an eastward position. Northward position and heading angle measurement value ;
[0014] The speed information includes the ship's speed relative to a geographic reference coordinate system. yaw rate lateral acceleration and the longitudinal velocity of the ship relative to the water. ;
[0015] The above data is time-aligned and smoothed to obtain a smoothed dataset. .
[0016] Preferably, the process of obtaining the pose and velocity state estimates is as follows:
[0017] Define position and attitude state vectors for:
[0018] ;
[0019] Define the velocity state vector for:
[0020] ;
[0021] For position and attitude state vectors With velocity state vector Perform joint estimation:
[0022] Using heading angle Construct the rotation matrix according to the coordinate transformation relationship of a planar rigid body. , These represent the sine and cosine values of the heading angle, respectively, used to map the velocity vector from the ship's coordinate system to the geographic coordinate system; then, With velocity state vector Multiply to get And then Perform discrete integration to obtain the updated position and attitude state vectors. ,and ;in, This represents the estimated eastward position; similarly, the other parameters are also their corresponding estimated values.
[0023] Longitudinal velocity lateral velocity yaw rate Longitudinal acceleration Based on the previous moment The estimated value is given a perturbation term and summed to perform discrete prediction, thus obtaining the corresponding predicted value. ,in It includes predicted values of lateral velocity, yaw rate, longitudinal acceleration, and longitudinal velocity at the current moment. These are estimates from the previous moment, including estimates of the lateral velocity, yaw rate, longitudinal acceleration, and longitudinal velocity at the previous moment. The combined disturbance term includes disturbances in lateral velocity, yaw rate, longitudinal acceleration, and longitudinal velocity; subsequently combined with... The actual measured values of the corresponding parameters are used to calculate their relationship with the predicted values. The difference between them forms an error vector. and the error vector With fusion weight coefficient Compared with the predicted value Summing yields the weighted result, which in turn provides the estimate for the current time step, ultimately resulting in the final estimate. ;in, This represents the estimated lateral velocity. This represents the estimated yaw rate. This represents the estimated longitudinal acceleration. This represents the estimated longitudinal velocity; ultimately, stable and continuous pose and velocity state estimates are obtained. .
[0024] Preferably, the extraction of the dominant wave frequency and spectral structure factor in step S2 is specifically as follows:
[0025] At the present moment Based on the estimated longitudinal acceleration Calculate the lateral acceleration sequence Based on the estimated yaw rate Calculate the yaw rate sequence Based on the estimated longitudinal velocity Calculate the longitudinal velocity sequence of the water body ,in, This represents the number of sampling points within the window.
[0026] Secondly, the transverse acceleration sequence Perform a discrete Fourier transform to obtain the frequency domain representation. , For discrete frequency components, For frequency index; calculate the lateral acceleration sequence In frequency Power spectral density value at Next, the periodic frequency characteristics of the lateral excitation of the ship by the waves are calculated and defined as the dominant frequency characteristic quantity. ;
[0027] The frequency range is divided into low frequency bands. High frequency band ;in, This is the low-frequency boundary point, and its value is determined based on long-term statistical sea state spectrum distribution experience. The Nyquist frequency is used to calculate low-frequency energy. High-frequency energy ;
[0028] Finally, construct the spectral structure factor. ;in To prevent tiny constants with a denominator of zero.
[0029] Preferably, the construction of the comprehensive disturbance intensity index specifically includes:
[0030] Based on yaw rate sequence Performing a Fast Fourier Transform yields its discrete frequency domain representation. And calculate the power spectrum Define the total energy of attitude response. Thus, an attitude disturbance intensity index is constructed. The unit is radians per second;
[0031] For the longitudinal velocity sequence of water body Calculate the standard deviation , This indicates the intensity of water flow fluctuations; the larger the value, the more severe the flow field disturbance.
[0032] Based on spectral structure factor Attitude disturbance intensity index and water flow fluctuation intensity Weighted fusion is performed to construct a comprehensive disturbance intensity index. ;in, , , These are the weighting coefficients.
[0033] Preferably, the step of performing online sea state determination and outputting the corresponding sea state level specifically includes:
[0034] set up The threshold for mild perturbation. The threshold for complex sea states, the threshold for slight disturbances and complex sea state threshold Data obtained through sea trials of unmanned vessels is used to distinguish between stable sea states, moderately disturbed sea states, and complex sea state environments; it meets the following requirements:
[0035] 1) 1) The sea state is stable; 2) : This scenario represents a moderate disturbance; 3) The scenario is a complex sea state; the sea state level is stored in the form of codes, with 001 for stable sea state, 010 for moderate disturbance, and 011 for complex sea state.
[0036] Preferably, the sea state feature encoding network in S3 consists of a cascaded feature extraction layer and a semantic mapping layer; firstly, a normalized environmental state feature vector is obtained, which is composed of sea state level, spectral structure factor, etc. The numerical values and trajectory tracking error The feature values are concatenated sequentially. The environmental state feature vector is input into the feature extraction layer, which consists of three fully connected layers and a modified linear unit activation function. By performing linear weighting and nonlinear transformation on the environmental state feature vector, the inherent coupling relationship and constraint mechanism between multi-source disturbances and tracking deviation are explored, and the mixed state features are output. Then, the mixed state features are input into the semantic mapping layer, which projects the low-dimensional environmental data into the high-dimensional feature space and outputs a high-dimensional state constraint feature vector rich in semantic information.
[0037] Preferably, the prediction parameter generation network based on deterministic policy gradient in S3 adopts a deep feedforward mapping architecture, including a latent space projection layer, cascaded hidden layer mapping modules, and a parameter boundary output layer. First, the high-dimensional state constraint feature vector is input into the latent space projection layer, which is composed of a single linear fully connected network responsible for aligning the feature dimensions and reshaping the space of the input high-dimensional state constraint feature vector, outputting the initial latent variable matrix after dimension reconstruction. Second, the initial latent variable matrix is input into the cascaded hidden layer mapping modules, which are composed of three sequentially connected fully connected operation layers and a modified linear unit activation function stacked on top of each other. During feature propagation, the initial latent variable matrix is used to dynamically activate hidden layer nodes after linear weighting by a weight matrix. Through layer-by-layer nonlinear feature extraction and dimensionality compression, a deep latent feature vector containing control parameters adjusting the distribution trend is output. Finally, the deep latent feature vector is input into the parameter boundary output layer, which uses a hyperbolic tangent activation function to map the feature values in the unbounded deep latent feature vector to a normalized boundary interval, outputting a state error weight adjustment coefficient for the current continuous perturbation state. Control penalty weight adjustment coefficient With fast compensation gain coefficient .
[0038] Preferably, the finite-time domain performance index function is defined as:
[0039] ;
[0040] in, For trajectory tracking error, Here is the state error weight matrix. To control the input penalty matrix, Indicates at time The future number is predicted based on the current estimated state. The deviation between the current state and the desired trajectory To predict the first in the time domain The control input variables to be optimized in the next step;
[0041] The specific operation process of the dynamic reconstruction is as follows: Calculate the state error weight adjustment coefficient. Comprehensive Disturbance Intensity Index The product of these values yields the error enhancement scalar. Arranging these error enhancement scalars sequentially along the main diagonal elements generates the state error weight matrix. ; Calculate the spectral structure factor The reciprocal of the result and multiplied by the generated control penalty weight adjustment coefficient Obtain the penalty modulation scalar, and arrange the penalty modulation scalar in sequence along the main diagonal to generate the control input penalty matrix. Then the state error weight matrix is... With control input penalty matrix Substitute into the finite-time performance index function In the rolling solution;
[0042] Within the current control period, the updated finite-time performance index function is used. Using the objective function, the three-degree-of-freedom planar motion mathematical model of the unmanned surface vessel constructed by S1 as the equality constraint, and the maximum physical force extremum of the propulsion actuator as the inequality constraint, the inputs are fed into a quadratic programming solver for online optimization. By solving the optimization problem with a quadratic objective function and linear constraints, the optimal control sequence is obtained, i.e., the optimal control sequence covering the finite future prediction time domain. The first control execution element in the optimal control sequence is extracted as the reference control component at the current moment. And in the next control cycle, the prediction time domain will be shifted forward by one time step and the above process will be repeated;
[0043] Extract the trajectory tracking error at the current moment This is compared with the generated fast compensation gain coefficient. Perform multiplication to obtain the fast compensation control term , will quickly compensate control items With reference control component Superimposed and fused data on the corresponding data channels, output compensation control output. The compensation control output includes longitudinal propulsion compensation value, lateral control force compensation value and yaw control torque compensation value acting on the bottom actuator of the unmanned surface vessel.
[0044] Compared with the prior art, the present invention has the following innovative features:
[0045] First, a sea state online identification mechanism based on wave spectrum characteristics is proposed, which directly introduces the frequency domain analysis results into the control decision layer, realizes the automatic scheduling of control parameters as the environment changes, and breaks through the limitation of parameter dependence on manual tuning in traditional control methods.
[0046] Second, a hierarchical composite control framework combining predictive optimization control and rapid attitude compensation is designed to enable the system to have finite-time attitude recovery capability while ensuring trajectory tracking accuracy, effectively coping with sudden surge impacts.
[0047] Third, an end-to-end dynamic disturbance rejection compensation model based on deep reinforcement learning is constructed, establishing an end-to-end mapping relationship from multi-source environmental disturbance characteristics to disturbance rejection compensation thrust, which increases robustness to complex time-varying disturbances.
[0048] The beneficial effects of this invention include:
[0049] First, by using the online identification of sea state and the dynamic adjustment mechanism of control parameters, the adaptability of unmanned surface vessels under different sea state conditions is improved, and the environmental adaptability of the system is significantly enhanced.
[0050] Second, the hierarchical composite control structure achieves synergistic optimization of trajectory tracking accuracy and attitude stability performance, and can maintain a small lateral deviation and heading error even under complex sea conditions.
[0051] Third, through the end-to-end thrust feedforward compensation mechanism, the direct impact of waves and wind loads on attitude stability is effectively reduced, and the attitude recovery time is shortened.
[0052] Fourth, by controlling the dynamic adjustment mechanism of weights and the reinforcement learning constraint of the optimal energy consumption distribution law, the problem of increased energy consumption and wear of actuators caused by single high-gain control is avoided. Attached Figure Description
[0053] Figure 1 This is a flowchart illustrating the overall technical route of the present invention.
[0054] Figure 2 Adaptive generation model structure diagram for sea state-driven predictive control parameters.
[0055] Figure 3 This is a diagram of the adaptive perturbation estimation structure for deep reinforcement learning.
[0056] Figure 4 This is a composite result diagram of multi-state fusion and data resampling in the embodiment.
[0057] Figure 5 The image shows the response results in the example.
[0058] Figure 6 The control input curve and error energy diagram are shown in the embodiment. Detailed Implementation
[0059] This invention discloses a method for attitude maintenance and trajectory tracking control of unmanned surface vessels under complex sea conditions. The invention aims to address the problems of attitude instability, decreased trajectory tracking accuracy, and difficulty in adaptive adjustment of control parameters for unmanned surface vessels under multi-source coupled disturbances such as waves, wind loads, and ocean currents. It achieves coordinated control of stable attitude maintenance and high-precision trajectory tracking under complex sea conditions. This method is based on online sea state identification, a hierarchical composite control strategy, and end-to-end dynamic disturbance rejection compensation, enabling proactive perception and dynamic adjustment of environmental changes, such as… Figure 1 As shown, the specific steps include the following:
[0060] S1, Multi-source data acquisition and fusion modeling; This step aims to construct a multi-source sensor data acquisition and fusion modeling framework to provide a continuous, smooth, and accurate state reference for subsequent control; The specific process is as follows: First, real-time acquisition of multi-source sensor data is performed, acquiring the position, speed, attitude, angular velocity, and water flow velocity information of the unmanned surface vessel through multiple types of sensors to obtain the raw data set. Secondly, data synchronization and preprocessing are performed on the original dataset. By performing uniform time alignment, low-pass filtering, and outlier removal, a smoothed dataset is obtained. Finally, a mathematical model of the three-degree-of-freedom planar motion of the unmanned surface vessel was constructed and its state was fused and estimated using a smoothed dataset. The system is jointly estimated by combining the extended state fusion estimation method, and the output pose and velocity state estimates are obtained. ;
[0061] S2, Complex Sea State Identification and Disturbance Feature Extraction; This step aims to quantify the degree of environmental disturbance based on the state estimation results, achieving a precise mapping from raw motion data to macroscopic environmental disturbance features; the specific process is as follows: First, a sliding window is constructed and frequency domain features are extracted, and the pose and velocity state estimates output from S1 are... As input, a sliding time window is constructed under a unified time reference to study the lateral acceleration. With yaw rate Perform frequency domain analysis to extract wave frequencies. With spectral structure factor Secondly, a fusion evaluation of attitude response and flow field disturbance intensity is performed, combining attitude response energy. Intensity of water flow fluctuations and attitude disturbance intensity index A comprehensive disturbance intensity index is constructed through weighted fusion. Further sea state determination is performed, and the comprehensive disturbance intensity index is adjusted according to a preset threshold range. Perform online assessment and output sea state level;
[0062] S3, Sea State-Driven Hierarchical Composite Control Decision; This step aims to dynamically adjust the controller weights using sea state characteristics, establish a mapping from macroscopic sea state characteristics to microscopic control parameters, and superimpose fast compensation to achieve coordinated optimization of trajectory tracking and attitude recovery; The specific process is as follows: First, trajectory error construction is performed, based on the pose and velocity state estimates output by S1. Calculate the trajectory tracking error with the expected trajectory And construct a finite-time performance index function that includes the state error weight matrix and the control input penalty matrix. Secondly, predictive control parameters are adaptively generated, and the sea state level and spectral structure factor output by S2 are extracted. The trajectory tracking error forms an environmental state feature vector, which is mapped into a high-dimensional state constraint feature vector by a sea state feature encoding network. Then, the high-dimensional state constraint feature vector is input into a prediction parameter generation network based on deterministic policy gradients to output state error weight adjustment coefficients. Control penalty weight adjustment coefficient and fast compensation gain coefficient Finally, the compensation control output prediction for multi-target trajectory tracking is performed, and the finite-time performance index function is updated using the aforementioned adjustment coefficients. The baseline control components are obtained by performing a rolling solution. Track tracking error With fast compensation gain coefficient Multiplication yields fast compensation control terms , will quickly compensate control items With reference control component Superimpose data across the corresponding data dimensions to output compensation control output. ;
[0063] S4, Adaptive Disturbance Estimation and Feedforward Compensation using Deep Reinforcement Learning: First, an interactive environment and state-action mapping mechanism are constructed, making the entire closed-loop control system of the unmanned surface vessel an interactive environment. The comprehensive disturbance intensity index and spectral structure factor output by S2 are extracted, the dominant wave frequency output by S2 is extracted, and the trajectory tracking error output by S3 is extracted. These four feature parameters are sequentially concatenated to form a state space vector. Second, an action space vector is defined, where the continuous strategy output vector containing longitudinal disturbance compensation thrust, lateral disturbance compensation thrust, and yaw disturbance compensation torque is defined as the action space vector. Finally, feedforward compensation is performed, where the state space vector is input into the disturbance compensation thrust dynamic generation network, and the output action space vector is mapped to form a dynamic feedforward compensation control term. The compensation control output from S3 and the dynamic feedforward compensation control term are fused by vector addition to output the final execution control command.
[0064] The specific implementation process of the present invention will be described in detail below with reference to specific embodiments.
[0065] S1. Multi-source data acquisition and fusion modeling
[0066] First, a multi-source sensor data acquisition and fusion modeling framework is constructed to obtain the original dataset. Secondly, regarding the original dataset... A smoothed dataset is obtained by performing unified time synchronization and preprocessing. Finally, a three-degree-of-freedom planar motion mathematical model is established, and combined with the extended state fusion estimation method, continuous, stable, and physically consistent pose and velocity state estimates are obtained. Specifically, it includes the following steps:
[0067] S1-1 Real-time acquisition of multi-source sensor data. Within each control cycle, this invention uses multiple types of sensors to collect real-time data on the operational status of the unmanned vessel.
[0068] First, the ship's position coordinates and speed information in the geographic coordinate system are obtained through the navigation satellite system, including its eastward position. Northward position and heading angle measurement value And obtain the velocity relative to the geographic reference coordinate system. The above data is used to characterize the absolute motion state of the ship in the geographic coordinate system.
[0069] Secondly, the ship's attitude and angular velocity information, including yaw rate, is collected through the inertial measurement unit. lateral acceleration The lateral acceleration It will be used for sea state spectral feature extraction in subsequent steps.
[0070] Next, the longitudinal velocity relative to the water body is collected using a ship speedometer. It is used to distinguish the influence of water flow and improve the accuracy of velocity estimation.
[0071] The raw data set is obtained through the aforementioned sensors. .
[0072] S1-2 Data Synchronization and Preprocessing. Due to differences in sampling frequencies and time bases among different sensors, this invention performs data synchronization and preprocessing on the original dataset. All data in the dataset undergoes time alignment, aligning all sensor data to discrete time points using timestamps. Data filtering and outlier removal are then performed. This invention employs a low-pass filtering method and uses an exponentially weighted moving average method to process the original dataset. All parameters are smoothed; the operation of the exponentially weighted moving average method is as follows: the filtered output result of the parameter to be processed at the previous sampling time and the original data value at the current sampling time are weighted and summed according to the ratio to achieve data smoothing.
[0073] In addition, anomaly detection is performed on the data using a sliding time window statistical method: when the deviation of a sampled value from its historical mean exceeds a preset range, it is identified as an outlier and corrected using a nearby time interpolation method.
[0074] Finally, the original dataset After processing all parameters, a smoothed data set is obtained. ,in, Indicates to The result after parameter processing (other parameter symbols are similarly the same) (The symbols in the middle correspond to the symbols).
[0075] S1-3 Three-DOF Planar Motion Mathematical Model Construction for Unmanned Surface Vessel. Based on the main motion characteristics of the unmanned surface vessel in the plane, this invention uses a three-DOF model to describe its motion state. Position and attitude state vectors are defined. for:
[0076] ;
[0077] Define the velocity state vector for:
[0078] .
[0079] S1-4 state fusion estimation. Specifically, the smoothed dataset obtained after preprocessing will be used. Define system state . This represents the complete pose and velocity state description at the current moment.
[0080] State fusion aims to integrate position and attitude state vectors. With velocity state vector Joint estimation is performed to achieve an integrated state representation of pose and velocity. Specifically:
[0081] Using heading angle Construct the rotation matrix according to the coordinate transformation relationship of a planar rigid body. , These represent the sine and cosine values of the heading angle, respectively, used to map the velocity vector from the ship's coordinate system to the geographic coordinate system; then, With velocity state vector Multiply to get And then Perform discrete integration to obtain the updated position and attitude state vectors. ,and ;in, This represents the estimated eastward position; similarly, the other parameters are also their corresponding estimated values.
[0082] Longitudinal velocity lateral velocity yaw rate Longitudinal acceleration Based on the previous moment The estimated value is given a perturbation term and summed to perform discrete prediction, thus obtaining the corresponding predicted value. ,in It includes predicted values of lateral velocity, yaw rate, longitudinal acceleration, and longitudinal velocity at the current moment. These are estimates from the previous moment, including estimates of the lateral velocity, yaw rate, longitudinal acceleration, and longitudinal velocity at the previous moment. The combined disturbance term includes disturbances in lateral velocity, yaw rate, longitudinal acceleration, and longitudinal velocity; subsequently combined with... The actual measured values of the corresponding parameters are used to calculate their relationship with the predicted values. The difference between them forms an error vector. and the error vector With fusion weight coefficient Compared with the predicted value Summing yields the weighted result, which in turn provides the estimate for the current time step, ultimately resulting in the final estimate. .in, This represents the estimated lateral velocity. This represents the estimated yaw rate. This represents the estimated longitudinal acceleration. This represents the estimated longitudinal velocity.
[0083] Finally, stable and continuous pose and velocity state estimates are obtained. .
[0084] S2. Complex Sea State Identification and Disturbance Feature Extraction
[0085] S2-1 Sliding Window Construction and Frequency Domain Feature Extraction. First, at the current time... Based on pose and velocity state estimates In Calculate the lateral acceleration sequence ,based on Calculate the yaw rate sequence ,based on Calculate the longitudinal velocity sequence of the water body ,in, This represents the number of sampling points within the window.
[0086] Secondly, the transverse acceleration sequence Perform a discrete Fourier transform to obtain the frequency domain representation. , For discrete frequency components, This is the frequency index. Further, the lateral acceleration sequence is calculated. In frequency Power spectral density value at Next, the periodic frequency characteristics of the lateral excitation of the ship hull by the ocean waves are calculated and defined as the dominant frequency characteristic quantity. .
[0087] To differentiate the energy distribution characteristics under sea states of varying complexity, the frequency range is divided into a low-frequency band. High frequency band .in, This is the low-frequency boundary point, and its value is determined based on long-term statistical sea state spectrum distribution experience. This is the Nyquist frequency. Low-frequency energy is calculated based on this. High-frequency energy ;
[0088] Finally, construct the spectral structure factor. .in To prevent the use of tiny constants with a denominator of zero. When sea states are calm, low-frequency energy dominates. The value is relatively large; when sea conditions are complex, the high-frequency components are enhanced, leading to... The value decreases. Therefore, the spectral structure factor... It can reflect the structure of wave energy distribution.
[0089] S2-2 Attitude response and flow field disturbance intensity fusion evaluation. This is achieved by obtaining the spectral structure factor. Subsequently, to avoid making judgments based on a single signal, this invention further combines the ship's attitude response intensity and water flow fluctuations to construct a multi-source disturbance fusion evaluation mechanism.
[0090] First, based on the yaw rate sequence Performing a Fast Fourier Transform yields its discrete frequency domain representation. And calculate the power spectrum Define the total energy of the attitude response. According to Parseval's theorem, It is proportional to the energy of the time-domain signal, thus comprehensively reflecting the attitude oscillation intensity per unit time. The final attitude disturbance intensity index is constructed. The unit is radians per second. Since external waves, wind loads, and flow field disturbances directly increase the amplitude of yaw rate oscillations, the overall power spectrum in the frequency domain rises when the disturbance intensifies, leading to... Increase, thus Increase.
[0091] Secondly, the intensity of water flow disturbance waves is calculated. This is based on the longitudinal velocity sequence of the water body. Calculate the standard deviation The unit is meters per second. This indicates the intensity of water flow fluctuations; the larger the value, the more severe the flow field disturbance.
[0092] Finally, a comprehensive assessment of disturbance intensity and sea state determination are conducted, based on the spectral structure factor. Attitude disturbance intensity index and water flow fluctuation intensity Perform weighted fusion to construct a comprehensive disturbance intensity index. .in, , , This is the weighting coefficient. Based on a preset threshold range, [the following is applied]... The mapping is to the corresponding sea state level to achieve online sea state determination.
[0093] Specifically, setting The threshold for mild perturbation. The threshold for complex sea states, the threshold for slight disturbances and complex sea state threshold This data, obtained through statistical analysis of unmanned surface vessel (USV) sea trial data, is used to distinguish between stable sea states, moderately disturbed sea states, and complex sea state environments. It meets the following requirements:
[0094] 1) 1) The sea state is stable; 2) : This scenario represents a moderate disturbance; 3) This scenario involves complex sea conditions. Based on the current... The sea state level is determined by the range in which the sea state is located. The sea state level is stored in the form of a code: 001 for stable sea state, 010 for moderate disturbance sea state, and 011 for complex sea state.
[0095] S3, Sea State-Driven Hierarchical Composite Control Decision
[0096] S3-1 Trajectory Error Construction. First, construct the error expression between the desired trajectory and the current state. Let the desired trajectory be... The trajectory is obtained based on the pre-set path of the mission, describing the expected position, heading, and speed of the unmanned surface vessel at various times. Specifically, it includes preset longitudinal speed, preset lateral speed, preset yaw rate, preset longitudinal acceleration, preset eastward position, preset northward position, and preset heading angle. The estimated current pose and speed are... Define trajectory tracking error .
[0097] Secondly, construct a finite-time performance index function. :
[0098] ;
[0099] The first term measures the trajectory and attitude tracking error; the second term constrains the control input amplitude and rate of change. Here is the state error weight matrix. To control the input penalty matrix, Indicates at time The future number is predicted based on the current estimated state. The deviation between the current state and the desired trajectory To predict the first in the time domain The control input variables to be optimized in the next step. The step size is for prediction; T is the transpose of the matrix.
[0100] S3-2 Constructing an adaptive generative model for predictive control parameters driven by sea state; such as Figure 2 As shown, this step aims to establish an inverse mapping relationship from the macroscopic complex sea state multi-source disturbance characteristics to the microscopic predictive controller operating weights; firstly, a sea state feature encoding network is built, which includes sea state level, spectral structure factor, etc. and trajectory tracking error The environmental state feature vector is mapped to a hidden high-dimensional state constraint feature vector. Next, a prediction parameter generation network based on deterministic policy gradients is constructed. The high-dimensional state constraint feature vector is used to perform layer-by-layer feature modulation on the hidden layers of the network, generating state error weight adjustment coefficients that meet the adaptive compensation requirements of the current sea state. Control penalty weight adjustment coefficient and fast compensation gain coefficient .
[0101] The sea state feature encoding network consists of cascaded feature extraction layers and semantic mapping layers. First, a normalized environmental state feature vector is obtained, which consists of sea state level and spectral structure factor. The numerical values and trajectory tracking error The feature values are concatenated sequentially. The environmental state feature vector is input into the feature extraction layer, which consists of three fully connected layers and a modified linear unit activation function. By performing linear weighting and nonlinear transformation on the environmental state feature vector, the inherent coupling relationship and constraint mechanism between multi-source disturbances and tracking deviation are explored, and the mixed state features are output. Then, the mixed state features are input into the semantic mapping layer, which projects the low-dimensional environmental data into a high-dimensional feature space and outputs a high-dimensional state constraint feature vector rich in semantic information. This vector serves as the conditional control signal for the subsequent generator network and determines the parameter distribution trend of the controller weight matrix.
[0102] The predictive parameter generation network based on deterministic policy gradients employs a deep feedforward mapping architecture, specifically comprising a latent space projection layer, cascaded hidden layer mapping modules, and a parameter boundary output layer. First, the high-dimensional state constraint feature vector is input into the latent space projection layer, which consists of a single linear fully connected network responsible for aligning the feature dimensions and reshaping the space of the input high-dimensional state constraint feature vector, outputting an initial latent variable matrix after dimensional reconstruction. Second, the initial latent variable matrix is input into the cascaded hidden layer mapping modules, which consist of three sequentially connected fully connected operation layers and a modified linear unit activation function stacked on top of each other. During feature propagation, the initial latent variable matrix is linearly weighted by a weight matrix to dynamically activate hidden layer nodes. Through layer-by-layer nonlinear feature extraction and dimensionality compression, a deep latent feature vector containing control parameters adjusting the distribution trend is output. Finally, the deep latent feature vector is input into the parameter boundary output layer, which uses a hyperbolic tangent activation function to map the feature values in the unbounded deep latent feature vector to a normalized boundary interval, outputting a state error weight adjustment coefficient for the current continuous perturbation state. Control penalty weight adjustment coefficient With fast compensation gain coefficient .
[0103] S3-3 Prediction of Compensated Control Output for Multi-Target Trajectory Tracking;
[0104] First, a dynamic reconstruction calculation of the state error weight matrix and the control input penalty matrix is performed; the specific operation process of the dynamic reconstruction is as follows: calculate the state error weight adjustment coefficient. Comprehensive Disturbance Intensity Index The product of these values yields the error enhancement scalar. Arranging these error enhancement scalars sequentially along the main diagonal elements generates the state error weight matrix. ; Calculate the spectral structure factor The reciprocal of the result and multiplied by the generated control penalty weight adjustment coefficient Obtain the penalty modulation scalar, and arrange the penalty modulation scalar in sequence along the main diagonal to generate the control input penalty matrix. Then the state error weight matrix is... With control input penalty matrix Substitute into the finite-time performance index function In the rolling solution;
[0105] The specific operation process of the rolling solution is as follows: within the current control cycle, using the updated finite-time performance index function... Using the objective function, the three-degree-of-freedom planar motion mathematical model of the unmanned surface vessel constructed by S1 as the equality constraint, and the maximum physical force extremum of the propulsion actuator as the inequality constraint, the inputs are fed into a quadratic programming solver for online optimization. By solving the optimization problem with a quadratic objective function and linear constraints, the optimal control sequence is obtained, i.e., the optimal control sequence covering the finite future prediction time domain. The first control execution element in the optimal control sequence is extracted as the reference control component at the current moment. In the next control cycle, the prediction time domain is shifted forward by one time step, and the above sequence solving and first element extraction process is repeated to complete the closed-loop rolling solution operation.
[0106] Finally, extract the trajectory tracking error at the current moment. This is compared with the generated fast compensation gain coefficient. Perform multiplication to obtain the fast compensation control term , will quickly compensate control items With reference control component Superimposed and fused data on the corresponding data channels, output compensation control output. The compensation control output includes longitudinal propulsion compensation value, lateral control force compensation value and yaw control torque compensation value acting on the bottom actuator of the unmanned surface vessel.
[0107] S4. Construct an adaptive perturbation estimation and feedforward compensation model based on deep reinforcement learning.
[0108] Figure 3 The structure diagram of the adaptive perturbation and feedforward compensation model for deep reinforcement learning is shown below, specifically including:
[0109] S4-1 Construction of Reinforcement Learning Interactive Environment and State-Action Mapping Mechanism: First, the interactive environment for reinforcement learning is defined, and the entire closed-loop control system of the unmanned vessel is constructed as the interactive environment. Second, the state space vector is defined, and the comprehensive disturbance intensity index and spectral structure factor output by S2 are extracted, the dominant wave frequency output by S2 is extracted, and the trajectory tracking error output by S3 is extracted. The above four feature parameters are sequentially concatenated to form the state space vector. Finally, the action space vector is defined, and the continuous strategy output vector containing longitudinal disturbance compensation thrust, lateral disturbance compensation thrust, and yaw disturbance compensation torque is defined as the action space vector. The physical meaning of this action space vector is the physical compensation output by the agent to counteract the effects of wind, waves, and current in response to environmental disturbances in different directions.
[0110] S4-2 Feedforward Compensation: The state space vector is input into a dynamic anti-disturbance thrust generation network consisting of a fully connected layer and a hyperbolic tangent activation function, directly mapping and outputting the action space vector; the longitudinal anti-disturbance compensation thrust, lateral anti-disturbance compensation thrust, and yaw anti-disturbance compensation torque are extracted from the action space vector to form a dynamic feedforward compensation control term; the compensation control output from S3 is output... The dynamic feedforward compensation control term is fused with the vector addition on the corresponding physical channel to output the final execution control command. Issued to the lower-level implementing agencies; It includes longitudinal propulsion, lateral control force, and yaw control torque. The longitudinal propulsion controls the unmanned vessel to move forward or decelerate; the lateral control force controls the unmanned vessel to translate left and right or make lateral corrections; and the yaw control torque controls the unmanned vessel to rotate its course, thus comprehensively achieving attitude maintenance and trajectory tracking.
[0111] S5. Experimental Analysis
[0112] Figure 4 The blue curve represents the smoothed velocity data after moving average filtering, the red dashed line represents the actual velocity, and the cyan dots represent the original simulation data with measurement noise. It can be seen that the filtering process significantly removes high-frequency noise while maintaining the overall dynamic trend of the velocity data.
[0113] Figure 5 This demonstrates the response of the method described in this patented paper to a three-degree-of-freedom ship dynamics system. The blue curve represents the real-state signal, including the longitudinal velocity. lateral velocity and yaw rate The red curve represents the observer's estimate. As can be observed from the figure, the estimated longitudinal velocity closely follows the actual signal; even when the disturbance oscillates over time, the estimation converges quickly with minimal error. For lateral velocity, the method of this invention can also capture the dynamic changes of lateral disturbances; the red curve largely overlaps with the blue curve, indicating that the gain is sufficient to respond to the combined disturbance. For yaw angular velocity, after estimation, the red curve closely matches the actual signal, verifying the ability to capture disturbances in the rotational degree of freedom. Overall analysis shows that the method of this invention can achieve fast and accurate state and disturbance estimation under continuous time-varying disturbances, demonstrating that the adaptive gain design has good robustness to high-frequency disturbances and complex coupled dynamics.
[0114] Figure 6 The results plot shows the changes in the three-degree-of-freedom control input and closed-loop prediction error energy over time. The blue curve represents the reference control output. The red curve represents the fast compensation control item. The yellow curve represents the control output that ultimately acts on the system. It is the superposition of the first two. During the simulation, when the system state deviates significantly, A peak occurs to accelerate attitude recovery, while This system smoothly integrates the effects of predictive control and rapid compensation, achieving a hierarchical control strategy that prioritizes trajectory tracking during stable navigation phases and rapidly recovers attitude during sudden disturbances. (Closed-loop predictive error energy) The rapid decrease and maintenance of the data over time demonstrates that the synergistic effect of the disturbance observer, feedforward compensation, and sea state-driven adaptive weight adjustment effectively suppresses external disturbances while ensuring stable operation of the hull along the desired trajectory. Overall, this reflects the robustness and rapid response capability of the control method proposed in this patent under complex sea conditions.
[0115] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
[0116] While the specific embodiments of the present invention have been described above, they are not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for attitude maintenance and trajectory tracking control of an unmanned surface vessel under complex sea conditions, characterized in that, Includes the following steps: S1: Collect the original position and attitude information and velocity information of the hull, and perform preprocessing to obtain a time-aligned smooth data set; A three-degree-of-freedom planar motion mathematical model is established, and pose and velocity state estimates are obtained by combining the state fusion estimation method. S2 calculates the lateral acceleration and yaw rate based on the estimated values of attitude and velocity, then performs frequency domain analysis to extract the dominant wave frequency and spectral structure factor, and constructs a comprehensive disturbance intensity index by weighted fusion of attitude disturbance intensity index and water flow wave intensity, and performs online sea state determination and outputs the corresponding sea state level. S3. The trajectory tracking error is calculated based on the pose and velocity state estimates and the desired trajectory. The sea state level, spectral structure factor and trajectory tracking error are extracted and mapped into a high-dimensional state constraint feature vector through a sea state feature encoding network. The high-dimensional state constraint feature vector is input into a prediction parameter generation network based on deterministic policy gradient to generate control adjustment coefficients. The finite-time domain performance index function is dynamically reconstructed using the control adjustment coefficients and a rolling solution is performed to obtain the baseline control component. The compensation control output is obtained by superimposing the fast compensation gain coefficient and the fast compensation control term. S4 constructs the overall closed-loop control system of the unmanned surface vessel as an interactive environment, extracts the comprehensive disturbance intensity index, spectral structure factor, and dominant wave frequency from S2, and extracts the trajectory tracking error from S3, and sequentially splices them to form a state space vector; next, it defines an action space vector, defining the continuous strategy output vector containing longitudinal disturbance compensation thrust, lateral disturbance compensation thrust, and yaw disturbance compensation torque as the action space vector; finally, it performs feedforward compensation, inputs the state space vector into the disturbance compensation thrust dynamic generation network, maps the output action space vector to form a dynamic feedforward compensation control term, and performs vector addition fusion of the compensation control output from S3 with the dynamic feedforward compensation control term to output the final execution control command.
2. The method for attitude maintenance and trajectory tracking control of an unmanned surface vessel under complex sea conditions as described in claim 1, characterized in that: The position and attitude information includes an eastward position. Northward position and heading angle measurement value ; The speed information includes the ship's speed relative to a geographic reference coordinate system. yaw rate lateral acceleration and the longitudinal velocity of the ship relative to the water. ; The above data is time-aligned and smoothed to obtain a smoothed dataset. .
3. The method for attitude maintenance and trajectory tracking control of an unmanned surface vessel under complex sea conditions as described in claim 1, characterized in that: The process for obtaining the estimated pose and velocity states is as follows: Define position and attitude state vectors for: ; Define the velocity state vector for: ; For position and attitude state vectors With velocity state vector Perform joint estimation: Using heading angle Construct the rotation matrix according to the coordinate transformation relationship of a planar rigid body. , These represent the sine and cosine values of the heading angle, respectively, used to map the velocity vector from the ship's coordinate system to the geographic coordinate system; then, With velocity state vector Multiply to get And then Perform discrete integration to obtain the updated position and attitude state vectors. ,and ;in, This represents the estimated eastward position; similarly, the other parameters are also their corresponding estimated values. Longitudinal velocity lateral velocity yaw rate Longitudinal acceleration Based on the previous moment The estimated value is given a perturbation term and summed to perform discrete prediction, thus obtaining the corresponding predicted value. ,in It includes predicted values of lateral velocity, yaw rate, longitudinal acceleration, and longitudinal velocity at the current moment. These are estimates from the previous moment, including estimates of the lateral velocity, yaw rate, longitudinal acceleration, and longitudinal velocity at the previous moment. The combined disturbance term includes disturbances in lateral velocity, yaw rate, longitudinal acceleration, and longitudinal velocity; subsequently combined with... The actual measured values of the corresponding parameters are used to calculate their relationship with the predicted values. The difference between them forms an error vector. and the error vector With fusion weight coefficient Compared with the predicted value Summing yields the weighted result, which in turn provides the estimate for the current time step, ultimately resulting in the final estimate. ;in, This represents the estimated lateral velocity. This represents the estimated yaw rate. This represents the estimated longitudinal acceleration. This represents the estimated longitudinal velocity; ultimately, stable and continuous pose and velocity state estimates are obtained. .
4. The method for attitude maintenance and trajectory tracking control of an unmanned surface vessel under complex sea conditions as described in claim 1, characterized in that: The dominant wave frequency and spectral structure factor are extracted in S2 as follows: At the present moment Based on the estimated longitudinal acceleration Calculate the lateral acceleration sequence Based on the estimated yaw rate Calculate the yaw rate sequence Based on the estimated longitudinal velocity Calculate the longitudinal velocity sequence of the water body ,in, This represents the number of sampling points within the window. Secondly, the transverse acceleration sequence Perform a discrete Fourier transform to obtain the frequency domain representation. , For discrete frequency components, For frequency index; calculate the lateral acceleration sequence. In frequency Power spectral density value at Next, the periodic frequency characteristics of the lateral excitation of the ship by the waves are calculated and defined as the dominant frequency characteristic quantity. ; The frequency range is divided into low frequency bands. High frequency band ;in, This is the low-frequency boundary point, and its value is determined based on long-term statistical sea state spectrum distribution experience. The Nyquist frequency is used to calculate low-frequency energy. High-frequency energy ; Finally, construct the spectral structure factor. ;in To prevent tiny constants with a denominator of zero.
5. The method for attitude maintenance and trajectory tracking control of an unmanned surface vessel under complex sea conditions as described in claim 4, characterized in that: The construction of the comprehensive disturbance intensity index is specifically as follows: Based on yaw rate sequence Performing a Fast Fourier Transform yields its discrete frequency domain representation. And calculate the power spectrum Define the total energy of attitude response. Thus, an attitude disturbance intensity index is constructed. The unit is radians per second; For the longitudinal velocity sequence of water body Calculate the standard deviation , This indicates the intensity of water flow fluctuations; the larger the value, the more severe the flow field disturbance. Based on spectral structure factor Attitude disturbance intensity index and water flow fluctuation intensity Weighted fusion is performed to construct a comprehensive disturbance intensity index. ;in, , , These are the weighting coefficients.
6. The method for attitude maintenance and trajectory tracking control of an unmanned surface vessel under complex sea conditions as described in claim 5, characterized in that: The process of online sea state determination and corresponding sea state level output is as follows: set up The threshold for mild perturbation. The threshold for complex sea states, the threshold for slight disturbances and complex sea state threshold Data obtained through sea trials of unmanned vessels is used to distinguish between stable sea states, moderately disturbed sea states, and complex sea state environments; it meets the following requirements: 1) 1) For stable sea conditions; 2) : is a moderate disturbance; 3) : This indicates complex sea state; sea state levels are stored in the form of codes, with 001 for stable sea state, 010 for moderate disturbance, and 011 for complex sea state.
7. The method for attitude maintenance and trajectory tracking control of an unmanned surface vessel under complex sea conditions as described in claim 4, characterized in that: The sea state feature encoding network in S3 consists of a cascaded feature extraction layer and a semantic mapping layer. First, a normalized environmental state feature vector is obtained, which consists of the sea state level and spectral structure factor. The numerical values and trajectory tracking error The feature values are concatenated sequentially; the environmental state feature vector is input into the feature extraction layer, which consists of three fully connected layers and a modified linear unit activation function. By performing linear weighting and nonlinear transformation on the environmental state feature vector, the inherent coupling relationship and constraint mechanism between multi-source disturbances and tracking deviation are explored, and the mixed state features are output. The state-mixed features are then input into the semantic mapping layer, which projects the low-dimensional environmental data into a high-dimensional feature space, outputting a high-dimensional state-constrained feature vector rich in semantic information.
8. The method for attitude maintenance and trajectory tracking control of an unmanned surface vessel under complex sea conditions as described in claim 7, characterized in that: The predictive parameter generation network based on deterministic policy gradient in S3 adopts a deep feedforward mapping architecture, which includes a latent space projection layer, cascaded hidden layer mapping modules, and a parameter boundary output layer. First, the high-dimensional state constraint feature vector is input into the latent space projection layer, which is composed of a single linear fully connected network. It is responsible for aligning the feature dimensions and reshaping the space of the input high-dimensional state constraint feature vector, and outputting the initial latent variable matrix after dimension reconstruction. Second, the initial latent variable matrix is input into the cascaded hidden layer mapping module, which is composed of three fully connected operation layers and a modified linear unit activation function stacked in series. During feature propagation, the hidden nodes are dynamically activated by linearly weighting the initial latent variable matrix using a weight matrix. Through layer-by-layer nonlinear feature extraction and dimensionality compression, a deep latent feature vector containing control parameters that adjust the distribution trend is output. Finally, the deep latent feature vector is input into the parameter boundary output layer. The parameter boundary output layer uses a hyperbolic tangent activation function to map the feature values in the unbounded deep latent feature vector to a normalized boundary interval, outputting a state error weight adjustment coefficient for the current continuous perturbation state. Control penalty weight adjustment coefficient With fast compensation gain coefficient .
9. The method for attitude maintenance and trajectory tracking control of an unmanned surface vessel under complex sea conditions as described in claim 8, characterized in that: The finite-time domain performance index function is defined as follows: ; in, For trajectory tracking error, The prediction step size; T is the transpose of the matrix; Here is the state error weight matrix. To control the input penalty matrix, Indicates at time The future number is predicted based on the current estimated state. The deviation between the current state and the desired trajectory To predict the first in the time domain The control input variables to be optimized in the next step; The specific operation process of the dynamic reconstruction is as follows: Calculate the state error weight adjustment coefficient. Comprehensive Disturbance Intensity Index The product of these values yields the error enhancement scalar. Arranging these error enhancement scalars sequentially along the main diagonal elements generates the state error weight matrix. ; Calculate the spectral structure factor The reciprocal of the result and multiplied by the generated control penalty weight adjustment coefficient Obtain the penalty modulation scalar, and arrange the penalty modulation scalar in sequence along the main diagonal to generate the control input penalty matrix. Then the state error weight matrix is... With control input penalty matrix Substitute into the finite-time performance index function In the rolling solution; Within the current control period, the updated finite-time performance index function is used. Using the objective function, the three-degree-of-freedom planar motion mathematical model of the unmanned surface vessel constructed in S1 as the equality constraint, and the maximum physical force extremum of the propulsion actuator as the inequality constraint, the inputs are fed into a quadratic programming solver for online optimization. The optimal control sequence is obtained by solving the optimization problem with a quadratic objective function and linear constraints. The first control execution element in the optimal control sequence is extracted as the reference control component at the current moment. And in the next control cycle, the prediction time domain will be shifted forward by one time step and the above process will be repeated; Extract the trajectory tracking error at the current moment This is compared with the generated fast compensation gain coefficient. Perform multiplication to obtain the fast compensation control term , will quickly compensate control items With reference control component Superimposed and fused data on the corresponding data channels, output compensation control output. The compensation control output includes longitudinal propulsion compensation value, lateral control force compensation value and yaw control torque compensation value acting on the bottom actuator of the unmanned surface vessel.