A control method for a hydrofoil craft rudder

By combining a nonlinear feedforward controller and an extended state observer with a neural network compensator, the problems of nonlinear lift characteristics and external disturbances in the servo control of hydrofoils were solved, achieving high-precision, stable, and real-time motion control of hydrofoils.

CN122261136APending Publication Date: 2026-06-23HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610209065.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-12
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing hydrofoil servo control methods suffer from several problems during pitch and heave motions, including insufficient consideration of nonlinear lift characteristics, difficulty in real-time capture of external wave forces and modeling error disturbances, limitations of neural network compensator training paradigms, and intense competition for resources in embedded control systems. These issues result in insufficient control accuracy and stability.

Method used

A nonlinear feedforward controller based on a simplified hydrofoil dynamics model is adopted, combined with an extended state observer and a neural network compensator. The neural network is trained through reinforcement learning, and the task deployment is optimized using a heterogeneous multi-core processor to achieve high-precision control of the hydrofoil servo motor.

Benefits of technology

It achieves high-precision tracking control of the pitch and heave motion of the hydrofoil, effectively resists external disturbances, ensures system stability and safety, and takes into account both real-time control and computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122261136A_ABST
    Figure CN122261136A_ABST
Patent Text Reader

Abstract

The application relates to a control method of a hydrofoil craft rudder engine, which is operated on an embedded control system and is used for realizing the pitching and heaving motion control of a hydrofoil craft by controlling a hydrofoil rudder engine, and the method comprises the following steps: S1: acquiring the current motion state of the hydrofoil craft through a sensor and receiving a desired heaving height instruction and a desired pitching angle instruction; S2: inputting the desired heaving height instruction and the desired pitching angle instruction into a nonlinear feedforward controller based on a simplified model of hydrofoil dynamics, wherein the feedforward controller calculates a basic attack angle instruction of the hydrofoil rudder engine by solving an inverse dynamics problem containing the nonlinear lift characteristics of the hydrofoil; and S3: comparing the current motion state with the desired instruction to generate a heaving height error and a pitching angle error; the application can precisely control the pitching and heaving against disturbance, and improves the control effect of the hydrofoil craft.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of control methods, and more specifically to a control method for a hydrofoil boat rudder. Background Technology

[0002] In the field of hydrofoil servo control, achieving high-precision and high-stability control of pitch and heave motions faces multiple technical challenges. Existing control methods have several significant shortcomings: traditional controllers often rely on linear assumptions to build models, failing to fully consider the nonlinear lift characteristics of the hydrofoil during actual navigation. This leads to a mismatch between the basic angle-of-attack command and the actual operating state of the hydrofoil, easily causing initial control deviations and affecting the basic accuracy of motion control. Uncertain disturbances such as external wave forces and hydrodynamic modeling errors encountered during hydrofoil navigation are difficult to capture accurately in real time. Traditional disturbance handling methods lack effective quantitative estimation mechanisms, failing to provide a reliable basis for compensation control, resulting in insufficient system robustness and significantly increased control errors under complex sea conditions. Even when some methods attempt to handle disturbances, they often employ a single linear or nonlinear feedback law, making it difficult to balance the speed and stability of disturbance estimation, resulting in poor performance under large errors. Convergence lag and small errors can easily lead to chattering, affecting the stability of the compensator's input information. The training paradigm of neural network compensators has limitations; relying solely on supervised learning results in poor generalization ability, while reinforcement learning alone is inefficient. Furthermore, the reward function design fails to fully consider the effects of tracking error, control fluctuations, and disturbances, making it difficult to output accurate and stable dynamic corrections. Online parameter updates in neural networks lack targeted lightweight update mechanisms and effective safety constraints; improper parameter adjustments can easily lead to increased control deviations and even system instability, lacking a safety fallback. Embedded control systems often use a single-core architecture, with core control tasks, neural network inference tasks, and parameter update tasks sharing computing resources. This results in delayed response for control tasks with high real-time requirements, intense resource competition between tasks, and potential blocking, affecting the overall system's operational continuity and control real-time performance. These combined defects severely restrict the control effect of hydrofoil pitch and heave motions. Therefore, a control method for the hydrofoil's servo motor is proposed. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention provides a control method for a hydrofoil servo motor. This method operates within an embedded control system and is used to control the pitch and heave motion of the hydrofoil by controlling the hydrofoil servo motor. The method includes the following steps:

[0004] S1: Obtain the current motion state of the hydrofoil through sensors and receive the desired heave height and pitch angle commands;

[0005] S2: Input the desired heave height command and pitch angle command (desired motion command) into a nonlinear feedforward controller built based on a simplified hydrofoil dynamics model. The feedforward controller calculates the basic angle of attack command of the hydrofoil servo by solving the inverse dynamics problem that includes the nonlinear lift characteristics of the hydrofoil.

[0006] S3: Compare the current motion state with the desired command to generate heave height error and pitch angle error. Then, input the heave height error and pitch angle error together with an online estimated equivalent concentrated disturbance vector into a pre-trained neural network compensator. The neural network compensator outputs a dynamic correction amount for the basic angle of attack command.

[0007] S4: The basic angle of attack command is superimposed with the dynamic correction amount to generate the final hydrofoil angle of attack control command, and the angle of attack is adjusted by driving the servo actuator through the embedded control system.

[0008] S5: The neural network compensator is trained using a reinforcement learning paradigm. Its training process relies on a predefined reward function, which is used to evaluate the quality of control actions. In the embedded control system, a reward function calculation module is also established to calculate real-time rewards online and, in conjunction with the output of the neural network compensator, to adaptively update the connection weights of the output layer of the neural network compensator online.

[0009] Furthermore, in step S2, the specific calculation process of the nonlinear feedforward controller constructed based on the simplified hydrofoil dynamics model includes:

[0010] S21: Based on the desired motion command, the desired heave acceleration a is calculated through differentiation and filtering. z,d and the desired pitch acceleration α d ;

[0011] S22: Based on the hull mass, inertia and hydrofoil layout parameters, according to the Newton-Euler equations, the desired acceleration is mapped to the requirements for the total lift and total pitching moment generated by the hydrofoil system;

[0012] Specifically, the total lift requirement L total The force required to overcome the resultant force G of the boat's weight and static buoyancy, and to provide the force needed for the desired heave acceleration, is the total pitching moment requirement M. total The torque required to achieve the desired pitch angle acceleration needs to be provided, and its calculation expression is as follows:

[0013] ;

[0014] Where m is the mass of the hull, I yy The moment of inertia of the hull about the transverse axis;

[0015] S23: Based on total lift requirement L total Total pitching moment requirement M total By combining the fixed lever arms lf and lr from the front hydrofoil and the rear hydrofoil to the center of gravity of the boat, the required lift Lf and Lr distributed to the front hydrofoil and the rear hydrofoil can be calculated by solving the force balance equation and the moment balance equation simultaneously.

[0016] The force balance equations and the moment balance equations are as follows:

[0017] ;

[0018] Among them, the fixed lever arms lf and lr from the front hydrofoil and the rear hydrofoil to the center of gravity of the boat are the distances from the point of action of the hydrofoil lift to the center of gravity of the boat, and their values ​​are predetermined according to the layout design of the hull and the hydrofoil.

[0019] S24: Based on the nonlinear lift characteristic curves of each hydrofoil, the required lift Lf and Lr of the front and rear hydrofoils are solved in reverse to obtain the corresponding wing reference angle of attack using the inverse lookup and interpolation method. and ;

[0020] The nonlinear lift characteristic curve characterizes the angle of attack of a hydrofoil at a specific speed. Mapping relationship between the generated lift L and the The solution process is as follows:

[0021] For each desired lift value, find the two nearest known data points on the corresponding lift characteristic curve. and , making Then, the reference angle of attack is calculated using linear interpolation:

[0022] ;

[0023] L target It is either Lf or Lr, when L target When it is Lf, the calculated for When L target When it is Lr, the calculated for ;

[0024] The calculated reference angle of attack constitutes the basic angle of attack command.

[0025] Furthermore, in step S3, the online estimation process of the equivalent concentrated perturbation vector is implemented based on the extended state observer concept, specifically including:

[0026] S31: Establish a reduced-order extended state system model that treats various uncertainties such as external wave forces and modeling errors as total disturbances;

[0027] S32: A nonlinear feedback law is designed to construct a disturbance observer. The core calculation process is as follows: using the actual angle of attack of the servo motor and the hull's velocity as input, the acceleration is predicted through a simplified hydrofoil dynamics model and compared with the measured acceleration from the sensor. The difference is dynamically corrected and integrated through a feedback loop containing a nonlinear saturation function, thereby estimating in real time the equivalent concentrated disturbance d acting on the longitudinal and vertical planes of the hull. z and equivalent concentrated disturbance moment d θ ;

[0028] S33: The estimated equivalent concentrated perturbation d z and d θ As an additional input to a neural network compensator, it enables the compensator to learn and compensate for unknown disturbances in a targeted manner.

[0029] Furthermore, the design of the nonlinear feedback law in step S32 employs a piecewise linear combination function to balance the speed and stability of the disturbance estimation.

[0030] The piecewise linear combination function employs different processing methods based on the magnitude of the absolute value of the error: when the absolute value of the error exceeds a set switching threshold... When the error is large, a nonlinear function with a power less than 1 is used to accelerate the convergence speed.

[0031] When the absolute value of the error is less than or equal to When the error occurs, it switches to linear processing to smooth the output and suppress chattering when there is a small error.

[0032] Piecewise linear combination function The mathematical expression is:

[0033] ;

[0034] Where e is the difference between the model-predicted acceleration and the measured acceleration, and γ is a nonlinear factor between 0 and 1. This is the threshold for switching between linear and nonlinear intervals.

[0035] Furthermore, in step S5, the training of the neural network compensator adopts a hybrid paradigm combining imitation learning and reinforcement learning, specifically including:

[0036] In the first stage, supervised learning was performed using demonstration data generated by a nonlinear feedforward controller and a disturbance observer under various sea conditions to initialize the parameters of the neural network compensator.

[0037] In the second stage, a near-end policy optimization algorithm is used for reinforcement learning training in a simulation environment containing a high-fidelity model of a hydrofoil. During training, a neural network compensator serves as the policy network, and a predefined reward function guides its learning process. This reward function is designed to simultaneously minimize tracking error, control fluctuations, and disturbances to the system. Specifically, it is the negative of the weighted sum of squares of various penalties, expressed as follows:

[0038] ;

[0039] Among them, e z e θ These are the heave height error and the pitch angle error, respectively. and d represents the dynamic correction value output by the neural network compensator. z and d θ For the estimated equivalent concentrated perturbation, w1, w2, w3 and w4 are the weight coefficients of the corresponding terms.

[0040] Furthermore, in step S5, the output layer connection weights of the neural network compensator are updated adaptively online. The specific process is as follows:

[0041] S61: Fix all network parameters in the neural network compensator except for the output layer;

[0042] S62: In each control cycle, the instantaneous reward R is obtained through the reward function calculation module based on the real-time status. t And let the performance index to be optimized, J = -R t ;

[0043] S63: An update method based on gradient descent is used, with a weight update amount W. out The calculation is achieved by combining the chain rule with the first-order difference approximation;

[0044] Specifically, firstly, the change in performance index J is approximately calculated relative to the pre-activation value a of the neural network output layer. out gradient of change Multiply by a out For the output layer connection weights W out partial derivatives Finally, multiply by the negative learning rate η to obtain the weight update amount, and its approximate update formula is:

[0045] ;

[0046] Where η is the extremely small online learning rate.

[0047] Furthermore, the online adaptive update process is supervised by a security constraint mechanism; this mechanism monitors the dynamic correction amount of the neural network compensator output after the update in real time and calculates a performance evaluation index P based on the average reward value within the sliding time window.

[0048] If the performance evaluation metric P falls below the preset stability threshold, or the dynamic correction exceeds the preset safety boundary, the online adaptive update will be immediately paused, and the output layer connection weights W will be adjusted. out Roll back to the state before the safety constraint was triggered, and switch to a degraded mode that relies solely on a nonlinear feedforward controller and a neural network compensator with fixed parameters for control.

[0049] Furthermore, the embedded control system adopts a heterogeneous multi-core processor architecture. The computational tasks of the nonlinear feedforward controller and the equivalent lumped disturbance estimator are deployed on a first type of high real-time processor core and run in a first fixed cycle. The forward inference task of the neural network compensator is deployed on a second type of dedicated computing core and runs in a second fixed cycle, which is longer than the first fixed cycle. The online adaptive update task of the output layer connection weights is executed intermittently in the form of a background task during the system's idle period in a third cycle, which is not shorter than the second fixed cycle. The various tasks are synchronized and exchange data through shared memory and hardware semaphores.

[0050] The beneficial effects of this invention are reflected in:

[0051] By accurately solving the basic angle-of-attack command using a nonlinear feedforward controller, combined with online estimation of equivalent concentrated disturbances based on an extended state observer and dynamic correction by a neural network compensator, and with the neural network trained using a hybrid paradigm of imitation learning and reinforcement learning and supporting online adaptive updates of output layer weights, coupled with a safety constraint mechanism and task optimization deployment using a heterogeneous multi-core processor, high-precision tracking control of the hydrofoil's pitch and heave motion is achieved. This effectively resists uncertainties such as external wave forces and modeling errors, suppresses control fluctuations, and ensures the stability and safety of system operation, while also taking into account control real-time performance and computational efficiency. Attached Figure Description

[0052] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0053] Figure 1 This is a flowchart of the present invention. Detailed Implementation

[0054] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are merely illustrative of the technical solution of the present invention and are therefore intended to limit the scope of protection of the present invention.

[0055] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application should have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0056] like Figure 1 As shown, a control method for a hydrofoil servo motor is provided. This method operates within an embedded control system and is used to control the pitch and heave motion of the hydrofoil by controlling the hydrofoil servo motor. The method includes the following steps:

[0057] S1: Obtain the current motion state of the hydrofoil through sensors and receive the desired heave height and pitch angle commands;

[0058] S2: Input the desired heave height command and pitch angle command (i.e. the desired motion command) into a nonlinear feedforward controller built based on a simplified hydrofoil dynamics model. The feedforward controller calculates the basic angle of attack command of the hydrofoil servo by solving the inverse dynamics problem that includes the nonlinear lift characteristics of the hydrofoil.

[0059] S3: Compare the current motion state with the desired command to generate heave height error and pitch angle error. Then, input the heave height error and pitch angle error together with an online estimated equivalent concentrated disturbance vector into a pre-trained neural network compensator. The neural network compensator outputs a dynamic correction amount for the basic angle of attack command.

[0060] S4: The basic angle of attack command is superimposed with the dynamic correction amount to generate the final hydrofoil angle of attack control command, and the angle of attack is adjusted by driving the servo actuator through the embedded control system.

[0061] S5: The neural network compensator is trained using a reinforcement learning paradigm. Its training process relies on a predefined reward function, which is used to evaluate the quality of control actions. In the embedded control system, a reward function calculation module is also established to calculate real-time rewards online and, in conjunction with the output of the neural network compensator, to adaptively update the connection weights of the output layer of the neural network compensator online.

[0062] In step S2, the specific calculation process of the nonlinear feedforward controller constructed based on the simplified hydrofoil dynamics model includes:

[0063] S21: Based on the desired motion command, the desired heave acceleration a is calculated through differentiation and filtering. z,d and the desired pitch acceleration α d ;

[0064] S22: Based on the hull mass, inertia and hydrofoil layout parameters, according to the Newton-Euler equations, the desired acceleration is mapped to the requirements for the total lift and total pitching moment generated by the hydrofoil system;

[0065] Specifically, the total lift requirement L total The force required to overcome the resultant force G of the boat's weight and static buoyancy, and to provide the force needed for the desired heave acceleration, is the total pitching moment requirement M. total The torque required to achieve the desired pitch angle acceleration needs to be provided, and its calculation expression is as follows:

[0066] ;

[0067] Where m is the mass of the hull, I yy The moment of inertia of the hull about the transverse axis;

[0068] S23: Based on total lift requirement L total Total pitching moment requirement M total By combining the fixed lever arms lf and lr from the front hydrofoil and the rear hydrofoil to the center of gravity of the boat, the required lift Lf and Lr distributed to the front hydrofoil and the rear hydrofoil can be calculated by solving the force balance equation and the moment balance equation simultaneously.

[0069] The force balance equations and the moment balance equations are as follows:

[0070] ;

[0071] Among them, the fixed lever arms lf and lr from the front hydrofoil and the rear hydrofoil to the center of gravity of the boat are the distances from the point of action of the hydrofoil lift to the center of gravity of the boat, and their values ​​are predetermined according to the layout design of the hull and the hydrofoil.

[0072] S24: Based on the nonlinear lift characteristic curves of each hydrofoil, the required lift Lf and Lr of the front and rear hydrofoils are solved in reverse to obtain the corresponding hydrofoil reference angles of attack using a reverse lookup and interpolation method. and ;

[0073] The nonlinear lift characteristic curve characterizes the angle of attack of a hydrofoil at a specific speed. Mapping relationship between the generated lift L and the The solution process is as follows:

[0074] For each desired lift value, find the two nearest known data points on the corresponding lift characteristic curve. and , making Then, the reference angle of attack is calculated using linear interpolation:

[0075] ;

[0076] L target It is either Lf or Lr, when L target When it is Lf, the calculated for When L target When it is Lr, the calculated for ;

[0077] The calculated reference angle of attack constitutes the basic angle of attack command;

[0078] By constructing a nonlinear feedforward controller based on a simplified hydrofoil dynamics model and the Newton-Euler equations, the desired motion command is accurately mapped into total lift and total pitch moment requirements. Then, by rationally distributing the lift of the fore and aft hydrofoils through force balance and moment balance equations, and combining the back-lookup and interpolation methods of the nonlinear lift characteristic curve, a basic angle of attack command that fits the actual working characteristics of the hydrofoil can be output. This effectively avoids control deviations caused by linear assumptions, provides a precise initial basis for subsequent dynamic corrections, and ensures the initial accuracy and stability of the hydrofoil's pitch and heave motion control.

[0079] The parameters are set as follows: hull mass m = 60 kg, hull moment of inertia I about the transverse axis. yy =1500 kg·m 2 The resultant force of the boat's weight and static buoyancy is G = 1200 N, and the desired heave acceleration is a. z,d =1.8m / s 2 Desired pitch acceleration α d =0.4 rad / s 2 The fixed lever arm from the front hydrofoil to the center of gravity of the boat is lf = 2.5m, and the fixed lever arm from the rear hydrofoil to the center of gravity of the boat is lr = 3.2m.

[0080] The known data points for the nonlinear lift characteristic curve of the canard hydrofoil are: La=700N and Lb=1400N, the known data points for the nonlinear lift characteristic curve of the rear hydrofoil are: La=500N and ,Lb=1200N.

[0081] Calculate the total lift requirement and total pitch moment requirement according to the formula in step S22:

[0082] ;

[0083] ;

[0084] Based on the force balance equations and moment balance equations from step S23, solve simultaneously to obtain the lift required for the front and rear hydrofoils:

[0085] The force balance equation is The torque balance equation is: Substituting lf=2.5m and lr=3.2m into the equation, we get Lf=1440N and Lr=840N.

[0086] According to the linear interpolation formula in step S24 Calculate the reference angle of attack:

[0087] Reference angle of attack for the front hydrofoil:

[0088] ;

[0089] Reference angle of attack for rear hydrofoil:

[0090] ;

[0091] The above calculations yielded and It forms the basic angle of attack command, accurately matches the nonlinear lift characteristics of the front and rear hydrofoils, and provides a reliable initial input for the dynamic correction of the subsequent neural network compensator.

[0092] In step S3, the online estimation process of the equivalent concentrated perturbation vector is implemented based on the extended state observer concept, specifically including:

[0093] S31: Establish a reduced-order extended state system model that treats various uncertainties such as external wave forces and modeling errors as total disturbances;

[0094] S32: A nonlinear feedback law is designed to construct a disturbance observer. The core calculation process is as follows: using the actual angle of attack of the servo motor and the hull's velocity as input, the acceleration is predicted through a simplified hydrofoil dynamics model and compared with the measured acceleration from the sensor. The difference is dynamically corrected and integrated through a feedback loop containing a nonlinear saturation function, thereby estimating in real time the equivalent concentrated disturbance d acting on the longitudinal and vertical planes of the hull. z and equivalent concentrated disturbance moment d θ ;

[0095] S33: The estimated equivalent concentrated perturbation d z and d θ As an additional input to the neural network compensator, it enables the compensator to learn and compensate for unknown disturbances in a targeted manner.

[0096] Based on the concept of extended state observer, this system achieves online estimation of the equivalent lumped disturbance vector, enabling real-time capture of various uncertain disturbances such as external wave forces and modeling errors, and transforming them into quantifiable equivalent lumped disturbance d. z and equivalent concentrated disturbance moment d θAs an additional input to the neural network compensator, it enables the compensator to learn and compensate for unknown disturbances in a targeted manner, significantly improving the robustness of hydrofoil control, reducing the control deviations in heave height and pitch angle caused by disturbances, and ensuring the stability and accuracy of control under complex sea conditions.

[0097] Using the previous core hull parameters (hull mass m = 600 kg, hull moment of inertia I about the transverse axis) yy =1500 kg·m 2 The calculation process is as follows, assuming the hydrofoil is navigating in medium wave conditions:

[0098] A reduced-order extended state system model is established, and uncertainties such as external wave impact force and hydrofoil dynamics modeling error are uniformly regarded as the total disturbance, focusing on the two degrees of freedom of heave and pitch on the longitudinal vertical plane of the hull.

[0099] Key parameters were set: the actual angle of attack of the servo motor and the speed of the hull were calculated using a simplified hydrofoil dynamics model, and the acceleration 'a' was predicted by the heave direction model. z,pred =1.7m / s 2 The sensor measured the heave acceleration a z,meas =2.2m / s 2 Pitch direction model predicts angular acceleration α pred =0.35rad / s 2 The sensor measured the pitch acceleration α. meas =0.55rad / s 2 Switching threshold of nonlinear feedback law The nonlinear factor γ = 0.45 (between 0 and 1), the dynamic correction coefficient k = 0.08, and the integration time step are... ;

[0100] Calculate the difference between the model-predicted acceleration and the measured acceleration:

[0101] Heave direction difference:

[0102] ;

[0103] Pitch direction difference:

[0104] ;

[0105] Substitute into the piecewise linear combination function Calculate the feedback correction amount:

[0106] For e z , A nonlinear processing formula is used. The calculation yields:

[0107] ;

[0108] For e θ Linear processing formula is used. The calculation yields:

[0109] ;

[0110] The feedback correction is input into a feedback loop containing a nonlinear saturation function, and the disturbance is solved through dynamic correction and integral calculation:

[0111] Equivalent concentrated disturbance in the direction of heave:

[0112] ;

[0113] Equivalent concentrated disturbance moment in pitch direction:

[0114] ;

[0115] The estimated d z =-0.0062N / kg and The input is a neural network compensator, which outputs a dynamic correction for the heave direction and angle of attack. , Pitch direction angle of attack dynamic correction , ;

[0116] After the disturbance was estimated and compensated, the hydrofoil's heave height error decreased from before compensation. Reduced to The pitch angle error is from before compensation Reduced to This effectively offsets the disturbances caused by wave forces and modeling errors.

[0117] In step S32, the design of the nonlinear feedback law adopts a piecewise linear combination function to balance the speed and stability of the disturbance estimation.

[0118] The piecewise linear combination function employs different processing methods based on the magnitude of the absolute value of the error: when the absolute value of the error exceeds a set switching threshold... When the error is large, a nonlinear function with a power less than 1 is used to accelerate the convergence speed.

[0119] When the absolute value of the error is less than or equal to When the error occurs, it switches to linear processing to smooth the output and suppress chattering when there is a small error.

[0120] Piecewise linear combination function The mathematical expression is:

[0121] ;

[0122] Where e is the difference between the model-predicted acceleration and the measured acceleration, and γ is a nonlinear factor between 0 and 1. The threshold for switching between linear and nonlinear intervals;

[0123] By designing a nonlinear feedback law using piecewise linear combination functions, the processing mode is dynamically switched according to the absolute value of the difference between the model-predicted acceleration and the measured acceleration. When the error is large, a nonlinear function with a power less than 1 is used to accelerate the convergence speed, while when the error is small, linear processing is used to smooth the output and suppress chattering. This effectively balances the speed and stability of disturbance estimation, avoids estimation lag or output fluctuation problems caused by a single processing mode, and provides more accurate and stable disturbance input information for the neural network compensator, further improving the robustness and control quality of the hydrofoil control.

[0124] Using the previous core hull parameters (hull mass m = 600 kg, hull moment of inertia I about the transverse axis) yy =1500 kg·m 2 The key parameters are set as follows: Switching threshold The nonlinear factor γ = 0.45 (between 0 and 1), the dynamic correction coefficient k = 0.08, and the integration time step are... The calculation is performed under two error scenarios:

[0125] Scenario 1 (Large Error Scenario) ): Set the difference e between the predicted acceleration and the measured acceleration in the heave direction model. z1 =0.6m / s 2 , satisfying |e z1 |=0.6>=0.25, a nonlinear processing formula is used. ;

[0126] Calculation process: ,therefore ;

[0127] Substituting into the perturbation estimation formula, the equivalent concentrated perturbation in the heave direction is:

[0128] ;

[0129] In this scenario, nonlinear processing reduces the convergence time of perturbation estimation from 0.3s to 0.12s for single linear processing, enabling rapid capture of large perturbations.

[0130] Scenario 2 (Small Error Scenario) ): Set the difference between the pitch direction model's predicted acceleration and the measured acceleration. ,satisfy Linear processing formula is used ;

[0131] Calculation process: ,therefore ;

[0132] Substituting into the disturbance estimation formula, the equivalent concentrated disturbance moment in the pitch direction is:

[0133] ;

[0134] In this scenario, linear processing transforms the perturbation estimation output jitter amplitude from a single nonlinear processing step. Down to The output is more stable.

[0135] Overall effect: After processing with piecewise linear combination functions, the equivalent concentrated disturbance d z and equivalent concentrated disturbance moment d θ The estimation accuracy is improved by 30%. Based on this precise and stable disturbance input, the neural network compensator outputs a dynamic correction that more closely matches the actual disturbance situation, further reducing the hydrofoil's heave height error to [missing value]. The pitch angle error was reduced to This significantly improves stability and quality.

[0136] In step S5, the training of the neural network compensator adopts a hybrid paradigm combining imitation learning and reinforcement learning, specifically including:

[0137] In the first stage, supervised learning was performed using demonstration data generated by a nonlinear feedforward controller and a disturbance observer under various sea conditions to initialize the parameters of the neural network compensator.

[0138] In the second stage, a near-end policy optimization algorithm is used for reinforcement learning training in a simulation environment containing a high-fidelity model of a hydrofoil. During training, a neural network compensator serves as the policy network, and a predefined reward function guides its learning process. This reward function is designed to simultaneously minimize tracking error, control fluctuations, and disturbances to the system. Specifically, it is the negative of the weighted sum of squares of various penalties, expressed as follows:

[0139] ;

[0140] Among them, e z e θ These are the heave height error and the pitch angle error, respectively. and d represents the dynamic correction value output by the neural network compensator. z and d θ For the estimated equivalent concentrated perturbation, w1, w2, w3 and w4 are the weighting coefficients of the corresponding terms;

[0141] By training the neural network compensator using a hybrid paradigm combining imitation learning and reinforcement learning, the parameters are first quickly initialized using demonstration data under various sea conditions. Then, the near-end policy optimization algorithm is used for reinforcement training in a high-fidelity simulation environment. Combined with a predefined reward function that takes into account tracking error, control fluctuations, and disturbances, the compensator can quickly master the control laws under complex sea conditions and output accurate and stable dynamic corrections. This effectively improves the compensator's training efficiency, generalization ability, and compensation accuracy, further reducing the control error of the hydrofoil's pitch and heave motions and ensuring the stability and reliability of the control process.

[0142] Using the previous core hull parameters (hull mass m = 600 kg, hull moment of inertia I about the transverse axis) yy =1500 kg·m 2 The calculation and training process, including related perturbation and error data, is as follows:

[0143] Set the reward function weight coefficients as follows: w1=0.4 (heave height error weight), w2=0.3 (pitch angle error weight), w3=0.15 (control fluctuation weight), w4=0.15 (disturbance weight).

[0144] Input key state data: heave height error e z =0.09m, pitch angle error ;

[0145] The total dynamic correction of the front hydrofoil output by the neural network compensator Total dynamic correction of the rear hydrofoil ;

[0146] Equivalent concentrated disturbance d z =-0.0062N / kg, equivalent concentrated disturbance moment ;

[0147] The immediate reward is calculated using the reward function formula. Substituting the values, we get:

[0148] Error penalty items:

[0149] ;

[0150] Control fluctuation penalty items:

[0151] ;

[0152] Disturbance penalty items:

[0153] ;

[0154] Instant rewards:

[0155] ;

[0156] Neural network compensator training process:

[0157] Phase 1 (Imitation Learning): Collect 1000 sets of demonstration data (including expected commands, disturbance estimates, and optimal corrections) generated by the nonlinear feedforward controller and disturbance observer under five sea states (calm, moderate, and large waves). Initialize the compensator parameters through supervised learning to control the initial correction error within a specified range. within;

[0158] The second stage (reinforcement learning): In a simulation environment containing a high-fidelity model of a hydrofoil, a compensator is used as the policy network, and the training is guided by the reward function in step 3. The near-end policy optimization algorithm is used for 10,000 iterations, and the network policy is adjusted according to the immediate reward in each iteration.

[0159] Training Results: After training, the matching degree between the dynamic correction output of the compensator and the actual requirements increased from the initial 82% to 96%, and the hydrofoil heave height error was further reduced to [missing value]. The pitch angle error was reduced to It controls fluctuation amplitude by 25% and can still maintain a stable compensation effect even in unprecedented strong wave conditions.

[0160] In step S5, the output layer connection weights of the neural network compensator are updated adaptively online. The specific process is as follows:

[0161] S61: Fix all network parameters in the neural network compensator except for the output layer;

[0162] S62: In each control cycle, the instantaneous reward R is obtained through the reward function calculation module based on the real-time status. t And let the performance index to be optimized, J = -R t ;

[0163] S63: An update method based on gradient descent is used, with a weight update amount W. out The calculation is achieved by combining the chain rule with the first-order difference approximation;

[0164] Specifically, firstly, the change in performance index J is approximately calculated relative to the pre-activation value a of the neural network output layer. out gradient of change Multiply by a out For the output layer connection weights W out partial derivatives Finally, multiply by the negative learning rate η to obtain the weight update amount, and its approximate update formula is:

[0165] ;

[0166] Where η is the extremely small online learning rate;

[0167] By fixing the parameters of the neural network compensator except for the output layer, and based on the gradient descent principle combined with the first-order difference approximation, the performance index derived by instant reward is used to achieve online adaptive update of the connection weights of the output layer. Only a very small learning rate is required for smooth adjustment, which allows the compensator to adapt to changes in operating conditions and disturbances under complex sea conditions in real time without offline retraining. While ensuring control stability, it continuously optimizes the accuracy of dynamic correction and improves the system's adaptability to time-varying uncertainties.

[0168] Using the previous core parameters (hull mass m = 600 kg, hull moment of inertia I about the transverse axis) yy =1500 kg·m 2 Based on the above data, the key parameters are set as follows: online learning rate η = 0.001, and the pre-activation value a of the neural network output layer. out Real-time changes (Calculated from the real-time status of the system), a out For the output layer connection weights W out partial derivatives (Determined by network structure and activation function characteristics), the specific calculation process is as follows:

[0169] Based on previous calculations, the immediate reward for the current control period. Therefore, performance indicators ;

[0170] In the next control cycle, a new instantaneous reward is obtained based on sensor measurements and reward function calculations. Corresponding to the new performance indicators ;

[0171] Calculate the change in performance indicators:

[0172] ;

[0173] Approximate calculation of the gradient of the performance index with respect to the pre-activation values ​​of the output layer:

[0174] ;

[0175] Substituting into the weight update formula, we get:

[0176] ;

[0177] Perform weight update: update the original output layer connection weights W. out With update volume By superimposing the results, we obtain the updated weights. ;

[0178] Update Results: After weight adjustment, the dynamic correction value of the front hydrofoil output by the neural network compensator was optimized from 0.45° to 0.442°, and the dynamic correction value of the rear hydrofoil was optimized from 0.3° to 0.295°, further reducing the hydrofoil's heave height error to [missing value]. The pitch angle error was reduced to This enables real-time adaptation to subtle changes in sea conditions.

[0179] The online adaptive update process is supervised by a safety constraint mechanism; this mechanism monitors the dynamic correction amount of the neural network compensator output after the update in real time and calculates a performance evaluation index P based on the average reward value within the sliding time window.

[0180] If the performance evaluation metric P falls below the preset stability threshold, or the dynamic correction exceeds the preset safety boundary, the online adaptive update will be immediately paused, and the output layer connection weights W will be adjusted. out Roll back to the state before the safety constraint was triggered, and switch to a degraded mode that relies solely on a nonlinear feedforward controller and a neural network compensator with fixed parameters for control.

[0181] By monitoring the online adaptive update process of the neural network compensator in real time through a safety constraint mechanism, and by monitoring whether the dynamic correction exceeds the safety boundary and whether the performance evaluation index P corresponding to the average reward value within the sliding time window is lower than the stability threshold, abnormal parameter updates can be detected in a timely manner. The update can be quickly paused and the output layer connection weights can be rolled back, and the system can be switched to a degraded mode. This effectively avoids the expansion of control deviation or system instability caused by improper updates, ensuring the safety, continuity and reliability of the hydrofoil control process, and providing a safety net for online adaptive updates.

[0182] Using the previous core parameters (hull mass m = 600 kg, hull moment of inertia I about the transverse axis) yy =1500 kg·m 2 Based on the relevant data, the key parameters are set as follows:

[0183] The sliding time window length is N=10 control cycles, the preset stability threshold is P0=-0.05, and the safety boundary for the dynamic correction of the front hydrofoil is... Safety boundary for dynamic correction of aft hydrofoil The specific process is as follows:

[0184] Collect the instant reward Rt for 10 control cycles within the sliding time window, which are: -0.0473, -0.0465, -0.0481, -0.0478, -0.0512, -0.0523, -0.0531, -0.0545, -0.0552, -0.0567;

[0185] Calculate the performance evaluation metric P (average reward value within the sliding time window):

[0186]

[0187] Monitor the dynamic correction amount after update: After a certain online adaptive update, the dynamic correction amount of the hydrofoil before the output of the neural network compensator , and the dynamic correction amount of the rear hydrofoil ;

[0188] Safety constraint judgment: The performance evaluation index P = -0.0512 < P0 = -0.05, and the front hydrofoil , the rear hydrofoil , triggering a safety constraint;

[0189] Execute a safety response: Immediately pause the online adaptive update, and roll back the connection weight W of the output layer out to the state W before the constraint is triggered out,prev , switch to the degraded mode, and only rely on the non - linear feed - forward controller and the neural network compensator with fixed parameters for control;

[0190] Constraint effect: Before the constraint is triggered, due to abnormal parameter update, the heave height error has increased to , the pitch angle error has increased to . After switching to the degraded mode, the error quickly drops back to and , avoiding further instability of the system and ensuring the safety and continuity of control.

[0191] The embedded control system adopts a heterogeneous multi - core processor architecture. Among them, the computational tasks of the non - linear feed - forward controller and the equivalent concentrated disturbance estimator are deployed on the first type of high - real - time processor core and run at a first fixed period; the forward inference task of the neural network compensator is deployed on the second type of dedicated computing core and runs at a second fixed period, and the second fixed period is longer than the first fixed period; the online adaptive update task of the connection weight of the output layer is triggered intermittently in the idle period of the system in the form of a background task at a third period, and the third period is not shorter than the second fixed period; various tasks are synchronized and data - exchanged through shared memory and hardware semaphores;

[0192] By employing a heterogeneous multi-core processor architecture, control tasks are deployed and cycled in a differentiated manner. The nonlinear feedforward controller and equivalent lumped disturbance estimator, which have high real-time requirements, are deployed on the high real-time core, while the neural network forward inference is deployed on a dedicated core. The online adaptive update of weights is executed as an intermittent background task. Combined with shared memory and hardware semaphores, task synchronization is achieved. This ensures millisecond-level real-time response of the core control tasks, avoids resource contention between tasks, rationally allocates the computational load, improves the overall computational efficiency of the system, and reserves sufficient resources for background optimization tasks. This approach balances control real-time performance, parameter optimization continuity, and system stability, avoiding response lag or resource overload issues caused by a single architecture.

[0193] Using the previous core parameters (hull mass m = 600 kg, hull moment of inertia I about the transverse axis) yy =1500 kg·m 2 Based on the characteristics of the control tasks, the heterogeneous multi-core processor architecture parameters and task deployment are set as follows:

[0194] Processor architecture configuration: It adopts a dual-core heterogeneous processor. The first type of high real-time core (such as Cortex-R52) is responsible for high-priority tasks, and the second type of dedicated computing core (such as Cortex-A76) is responsible for neural network inference. Background tasks share the idle resources of the second type of core.

[0195] Task cycle settings: First fixed cycle T1 = 10ms (core control task cycle), second fixed cycle T2 = 20ms (neural network inference cycle), third cycle T3 = 50ms (background update cycle), satisfying T2 > T1 and T3 ≥ T2;

[0196] Task deployment and execution:

[0197] The first type of core task is the calculation of nonlinear feedforward controller (including lift, torque solution and angle of attack interpolation) and equivalent lumped disturbance estimation. The execution time of a single execution is about 6ms≤T1=10ms. Sensor data is read synchronously every 10ms and the basic angle of attack command and disturbance estimation value are output.

[0198] The second core task is forward inference of the neural network compensator. The single inference time is about 12ms≤T2=20ms. Every 20ms, the error signal and the disturbance estimate in the shared memory are read and the dynamic correction is output.

[0199] Background task: The weights of the neural network output layer are updated online adaptively. The calculation time for a single update is about 25ms≤T3=50ms. It is triggered every 50ms during the idle period of the second type of core. The instant reward and network state data in the shared memory are read, the weights are updated, and then written to the shared parameter area.

[0200] Task synchronization mechanism: Data partitions are divided by shared memory to store key data such as sensor raw data, error signals, disturbance estimates, basic angle of attack commands, and dynamic corrections. Hardware semaphores (such as GPIO interrupt signals) achieve mutual exclusion of data read and write, ensuring that the first type of core outputs the basic angle of attack command every 10ms and the second type of core outputs the correction value every 20ms. The two are superimposed within a 20ms period to generate the final control command.

[0201] Performance Verification: Under a single-core architecture, with all tasks sharing a 20ms cycle, the core control task response latency reached 15ms, with a peak CPU utilization of 92%, making task blocking prone to occur. After adopting a heterogeneous architecture, the response latency of the first type of core tasks stabilized at 8ms ≤ T1, the average CPU utilization of the second type of cores was 55%, background update tasks were unblocked, and the final control command output cycle stabilized at 20ms. The hydrofoil's heave height error stabilized within [specific parameters]. The pitch angle error is stable at The system operates continuously and stably with no packet loss or delay.

[0202] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.

Claims

1. A control method for a hydrofoil boat's steering gear, characterized in that, This method operates within an embedded control system and is used to control the pitch and heave motion of a hydrofoil by controlling its servo motor. The method includes the following steps: S1: Obtain the current motion state of the hydrofoil through sensors and receive the desired heave height and pitch angle commands; S2: Input the desired heave height command and pitch angle command into a nonlinear feedforward controller built based on a simplified hydrofoil dynamics model. The feedforward controller calculates the basic angle of attack command of the hydrofoil servo by solving the inverse dynamics problem that includes the nonlinear lift characteristics of the hydrofoil. S3: Compare the current motion state with the desired command to generate heave height error and pitch angle error. Then, input the heave height error and pitch angle error together with an online estimated equivalent concentrated disturbance vector into a pre-trained neural network compensator. The neural network compensator outputs a dynamic correction amount for the basic angle of attack command. S4: The basic angle of attack command is superimposed with the dynamic correction amount to generate the final hydrofoil angle of attack control command, and the angle of attack is adjusted by driving the servo actuator through the embedded control system. S5: The neural network compensator is trained using a reinforcement learning paradigm. Its training process relies on a predefined reward function, which is used to evaluate the quality of control actions. In the embedded control system, a reward function calculation module is also established to calculate real-time rewards online and, in conjunction with the output of the neural network compensator, to adaptively update the connection weights of the output layer of the neural network compensator online.

2. The control method for a hydrofoil boat steering gear according to claim 1, characterized in that: In step S2, the specific calculation process of the nonlinear feedforward controller constructed based on the simplified hydrofoil dynamics model includes: S21: The desired heave acceleration a is calculated by differentiating and filtering the desired motion command z,d and the desired pitch angle acceleration a d ; S22: Based on the hull mass, inertia and hydrofoil layout parameters, according to the Newton-Euler equations, the desired acceleration is mapped to the requirements for the total lift and total pitching moment generated by the hydrofoil system; Total lift demand L total Force required to overcome the combined weight and static buoyancy of the hull G and to provide the desired heave acceleration total Moment required to provide the desired pitch angle acceleration S23: Based on total lift requirement L total Total pitching moment requirement M total By combining the fixed lever arms lf and lr from the front hydrofoil and the rear hydrofoil to the center of gravity of the boat, the required lift Lf and Lr distributed to the front hydrofoil and the rear hydrofoil can be calculated by solving the force balance equation and the moment balance equation simultaneously. S24: Based on the nonlinear lift characteristic curves of each hydrofoil, the required lift Lf and Lr of the front and rear hydrofoils are solved in reverse to obtain the corresponding hydrofoil reference angles of attack using a reverse lookup and interpolation method. and ; The nonlinear lift characteristic curve characterizes the angle of attack of a hydrofoil at a specific speed. Mapping relationship between the generated lift L and the The solution process is as follows: For each desired lift value, find the two nearest known data points on the corresponding lift characteristic curve. and , making Then, the reference angle of attack is calculated using linear interpolation.

3. The control method for a hydrofoil boat steering gear according to claim 2, characterized in that: In step S3, the online estimation process of the equivalent concentrated perturbation vector is implemented based on the extended state observer concept, specifically including: S31: Establish a reduced-order extended state system model that treats all kinds of uncertainties as total disturbances, including external wave forces and modeling errors; S32: A nonlinear feedback law is designed to construct a disturbance observer. The core calculation process is as follows: using the actual angle of attack of the servo motor and the hull's velocity as input, the acceleration is predicted through a simplified hydrofoil dynamics model and compared with the measured acceleration from the sensor. The difference is dynamically corrected and integrated through a feedback loop containing a nonlinear saturation function, thereby estimating in real time the equivalent concentrated disturbance d acting on the longitudinal and vertical planes of the hull. z and equivalent concentrated disturbance moment d θ ; S33: The estimated equivalent concentrated perturbation d z and d θ As an additional input to a neural network compensator, it enables the compensator to learn and compensate for unknown disturbances in a targeted manner.

4. The control method for a hydrofoil boat steering gear according to claim 3, characterized in that: In step S32, the design of the nonlinear feedback law adopts a piecewise linear combination function to balance the speed and stability of the disturbance estimation. The piecewise linear combination function employs different processing methods based on the magnitude of the absolute value of the error: when the absolute value of the error exceeds a set switching threshold... When the error is large, a nonlinear function with a power less than 1 is used to accelerate the convergence speed. When the absolute value of the error is less than or equal to When the error occurs, it switches to linear processing to smooth the output and suppress chattering when there is a small error.

5. The control method for a hydrofoil boat steering gear according to claim 4, characterized in that: In step S5, the training of the neural network compensator adopts a hybrid paradigm combining imitation learning and reinforcement learning, specifically including: In the first stage, supervised learning was performed using demonstration data generated by a nonlinear feedforward controller and a disturbance observer under various sea conditions to initialize the parameters of the neural network compensator. In the second stage, a near-end policy optimization algorithm is used to perform reinforcement learning training in a simulation environment containing a high-fidelity model of a hydrofoil. During training, the neural network compensator serves as the policy network, and a predefined reward function is used to guide its learning process. The reward function is designed to simultaneously minimize tracking error, control fluctuations, and disturbances to the system, specifically by taking the negative of the weighted sum of squares of each penalty.

6. The control method for a hydrofoil boat steering gear according to claim 5, characterized in that: In step S5, the connection weights of the output layer of the neural network compensator are updated adaptively online. The specific process is as follows: S61: Fix all network parameters in the neural network compensator except for the output layer; S62: In each control cycle, the instantaneous reward R is obtained through the reward function calculation module based on the real-time status. t And let the performance index to be optimized, J = -R t ; S63: An update method based on gradient descent is used, with a weight update amount W. out The calculation is achieved by combining the chain rule with the first-order difference approximation; First, we approximate the change in performance metric J relative to the pre-activation value a of the neural network's output layer. out gradient of change Multiply by a out For the output layer connection weights W out partial derivatives Finally, multiply by the negative learning rate η to obtain the weight update amount.

7. The control method for a hydrofoil boat steering gear according to claim 6, characterized in that: The online adaptive update process is supervised by a safety constraint mechanism; this safety constraint mechanism monitors the dynamic correction amount of the neural network compensator output after the update in real time and calculates a performance evaluation index P based on the average reward value within the sliding time window. If the performance evaluation index P is lower than the preset stability threshold, or the dynamic correction exceeds the preset safety boundary, the online adaptive update will be immediately paused, the output layer connection weight Wout will be rolled back to the state before the safety constraint was triggered, and the system will switch to a degraded mode that relies solely on the nonlinear feedforward controller and the neural network compensator with fixed parameters for control.

8. The control method for a hydrofoil boat steering gear according to claim 7, characterized in that: The embedded control system adopts a heterogeneous multi-core processor architecture. The computational tasks of the nonlinear feedforward controller and the equivalent lumped disturbance estimator are deployed on the first type of high real-time processor core and run in a first fixed cycle. The forward inference task of the neural network compensator is deployed on the second type of dedicated computing core and runs in a second fixed cycle, which is longer than the first fixed cycle. The online adaptive update task of the output layer connection weights is executed intermittently in the form of a background task during the system idle period in a third cycle, which is not shorter than the second fixed cycle. The various tasks are synchronized and exchange data through shared memory and hardware semaphores.