An MPC-based unmanned sailboat heading control method and system
By combining MPC-based control methods with ship MMG separation modeling and sail force compensation, the multi-constraint nonlinear dynamic model problem in the heading control of unmanned sailboats was solved, achieving high-precision and fast-convergence heading control.
Patent Information
- Application Number
- CN202511086305.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-05
AI Technical Summary
Existing unmanned sailboat heading control methods are difficult to handle nonlinear dynamic models with multiple constraints and strong coupling, and are easily affected by wind and wave disturbances in the marine environment, resulting in large heading deviations, slow convergence speeds, and poor disturbance resistance.
A control method based on MPC is adopted, combined with ship MMG separation modeling, to establish a bow dynamics model of the unmanned sailboat. Taking into account the influence of wind force on the sail, heading control is achieved through feedforward control compensation and MPC control coordination.
It improves the accuracy of heading control, enables rapid convergence of the heading of the unmanned sailboat, reduces the number of servo motor movements, and enhances its anti-disturbance capability.
Smart Images

Figure CN120595811B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of ship heading control, in particular to an unmanned sailboat heading control method and system based on MPC (Model Predictive Control). BACKGROUND
[0002] An unmanned sailboat is a kind of ocean autonomous vehicle using wind energy as the main power, which has significant advantages in energy consumption and continuous operation compared with traditional water surface unmanned vehicles.
[0003] At present, the heading control of the unmanned sailboat uses some model-free control methods to control the heading of the sailboat during sailing, which is difficult to handle the multi-constraint, strong coupling and nonlinear dynamic model of the unmanned sailboat. At the same time, the random wind and wave disturbance in the ocean environment and the model parameter uncertainty easily lead to large heading deviation of the unmanned sailboat, slow convergence speed and poor disturbance rejection ability.
[0004] For example, using PID control heading, the current position and speed of the unmanned sailboat are obtained through sensors, and the heading is controlled according to the difference between the expected and actual values. This method has the advantages of simple structure, high stability, etc. However, since the precise model of the unmanned sailboat is not considered, it cannot handle multiple constraint variables and cannot effectively deal with the nonlinear and time-varying characteristics of the unmanned sailboat in motion, resulting in large heading control overshoot and poor precision. For example, fuzzy control is used to realize sailboat heading control. According to the sailing control experience of sailors, fuzzy control rules are written, and the sailboat controls the heading of the sailboat according to the fuzzy control rules. This method can effectively adapt to the nonlinear and time-varying characteristics of the dynamic model of the unmanned sailboat, but its control effect depends on the writing of fuzzy rules and depends on various ship types and steering experience. The model of the sailboat is not considered, and the control precision and dynamic quality are poor.
[0005] Some unmanned sailboat heading control methods using the model of the unmanned sailboat, for example, use the Nomoto second-order rudder model, which is convenient for engineering calculation but has poor environmental disturbance adaptability, is suitable for small amplitude rudder angle adjustment, and has obvious large amplitude steering error. The interaction of the rudder-hull-sail is not considered, and the robustness is poor. Moreover, most of the used unmanned sailboat models are integral models, which have high model complexity, large calculation amount (poor real-time performance) and weak physical interpretability, restricting the engineering application. SUMMARY
[0006] To solve the above technical problems, one of the purposes of the present application is to provide an unmanned sailboat heading control method based on MPC, which is based on ship MMG separation modeling, considers the coupling relationship between the parameters of the unmanned sailboat, takes the second-order yaw dynamics model of the unmanned sailboat as the MPC prediction model, and optimizes the hull heading control in real time; and considering the influence of sail force on the heading, the feedforward control compensation and the MPC control method are cooperated to realize the high-performance heading control of the unmanned sailboat.
[0007] To achieve the above application purposes, the present application adopts the following technical solutions:
[0008] The present application relates to an unmanned sailboat heading control method based on MPC, comprising:
[0009] Based on the ship MMG separation modeling idea, the forces of the hull, sail and rudder of the unmanned sailboat are analyzed, and the yaw dynamics model of the unmanned sailboat is established;
[0010] The second-order yaw dynamics model of the unmanned sailboat about yaw angle and yaw angle velocity is taken as the MPC prediction model, the control increment of the rudder angle at the current time is output, and the control amount at the current time is obtained after calculation;
[0011] Based on the wind field data, the yaw angle of the ship body affected by the sail force is obtained;
[0012] The yaw angle feedforward compensation is applied to the control amount at the current time, and the compensated control amount is applied to the rudder of the unmanned sailboat for heading control of the unmanned sailboat.
[0013] In some embodiments of the present application, based on the ship MMG separation modeling idea, the forces of the rudder, sail and hull of the unmanned sailboat are analyzed, and the yaw dynamics model of the unmanned sailboat is established, as follows:
[0014] ;
[0015] ;
[0016] ;
[0017] ;
[0018] Wherein, is the yaw angle, is the differential of the yaw angle, is the yaw angle velocity, is the differential of the yaw angle velocity, is the moment of inertia of the hull rotation, , and are the turning moments of the hull, the sail and the rudder, respectively;
[0019] is the ship speed, are the linear hydrodynamic forces and moments, are the nonlinear hydrodynamic forces and moments, , , , , and are coefficients;
[0020] and are the wind sail lift and drag forces, respectively, is the relative wind angle, and are the sailboat heading boost force and the side force perpendicular to the sailboat heading, respectively, and are the positions of the wind sail force center in the ship coordinate system, respectively, is the normal pressure of the rudder, is the rudder angle, is the water density, is the rudder area, is the rudder efficiency coefficient, is the effective velocity of the flow into the rudder;
[0021] , is the interference coefficient of the hull and the rudder, is the vertical distance between the rudder force center and the center of gravity of the hull, is the correction coefficient of the rudder movement to the turning moment of the hull.
[0022] In some embodiments of the present application, the specific process of establishing the MPC prediction model is as follows:
[0023] (1) Let the state quantity , the control quantity , and the linearization processing method is adopted, and the linearization state equation can obtain the system matrix A and the control matrix B of the control system;
[0024] (2) Discretization processing is performed on the state equation , and the discrete state expression is obtained as follows:
[0025] ;
[0026] ;
[0027] wherein, the coefficient matrix and are linear time-varying matrices after discretization, is a linear transformation matrix of state mapping output, is a discrete time step, is an identity matrix;
[0028] (3) Let the state variable , obtain a new state space model:
[0029] ;
[0030] wherein, ;
[0031] is a control increment, is an output variable, represents the state variable at the current k time, represents the control variable at the previous time;
[0032] (4) Set the prediction time domain as , the control time domain as , and , predict the future state variable and the output variable according to the new state space model, and obtain a prediction output expression:
[0033] ;
[0034] wherein , , , ;
[0035] (5) According to the expected heading and the prediction output, construct a target function with the state deviation and the control increment of the unmanned sailboat:
[0036] ;
[0037] wherein, the matrix and are a weight matrix of state error and a weight matrix of control increment respectively, is an expected state on the expected heading;
[0038] (6) Define a performance index function:
[0039] , ;
[0040] (7) Apply a constraint condition to the performance index function, and take a minimum value of the performance index function to solve an optimal control increment sequence ;
[0041] (8) According to the rolling optimization principle, the first element Δ *( u k ) is applied to the control system to compensate for the control quantity at the previous moment, and the control quantity at the current moment is obtained. u =△ k *( )+
[0042] In some embodiments of the present application, the performance index function is subjected to the following constraint condition:
[0043] ;
[0044] wherein and represent the minimum value set and the maximum value set of the control quantity in the control time domain, respectively, and represent the minimum value set and the maximum value set of the control increment in the control time domain, respectively.
[0045] In some embodiments of the present application, based on the wind field data, the yaw angle of the ship body heading affected by the force of the sail is obtained;
[0046] Based on the wind field data, the relative wind direction angle and the relative speed in the process of the unmanned sailboat running are obtained;
[0047] The sail is subjected to open-loop control, and the attack angle of the sail is obtained.
[0048] By using , the force of the sail is decomposed into the lateral driving force : ;
[0049] Let , , the yaw angle is calculated.
[0050] wherein is the horizontal distance from the sail area to the center of the ship body, K is the proportional gain coefficient, and the positive and negative signs of the yaw angle represent the direction of the force of the sail.
[0051] In some embodiments of the present application, a wind field sensor is arranged on the unmanned sailboat;
[0052] The wind field sensor detects the wind field and obtains the wind field data.
[0053] In some embodiments of the present application, a magnetometer and an inertial measurement unit are arranged on the unmanned sailboat;
[0054] The real-time rudder angle of the unmanned sailboat is identified through data fusion of the static rudder angle obtained by the magnetometer and the data obtained by the inertial measurement unit.
[0055] Some embodiments provided in the application relate to an unmanned sailboat heading control method based on MPC, which has the following advantages and beneficial effects:
[0056] (1) Based on the MMG separation modeling idea of the ship, the forces of the rudder, sail and hull of the unmanned sailboat are analyzed, the rudder rolling dynamics model of the unmanned sailboat is established, the coupling relationship between the parameters of the unmanned sailboat is considered, and the heading control accuracy is improved;
[0057] (2) The second-order rudder dynamics model of the unmanned sailboat about the rudder angle and the rudder angle velocity is used as the MPC prediction model, the sailboat is decoupled and controlled, the hull heading control is optimized in real time, and accurate heading control is realized;
[0058] (3) The influence of the force of the sail on the heading is considered, the control amount output by the MPC prediction control is feedforward compensated, the heading response speed of the unmanned sailboat is improved, the rapid convergence process of the heading is realized, the number of rudder movements is effectively reduced, and the high-performance heading control of the unmanned sailboat is realized by the cooperation of the feedforward compensation and the MPC prediction control.
[0059] Some embodiments of the application also relate to an unmanned sailboat heading control system based on MPC, comprising:
[0060] A model construction module is configured to analyze the forces of the hull, sail and rudder of the unmanned sailboat based on the MMG separation modeling idea of the ship, and establish a rudder rolling dynamics model of the unmanned sailboat;
[0061] An MPC prediction module uses the second-order rudder dynamics model of the unmanned sailboat about the rudder angle and the rudder angle velocity as the MPC prediction model, and outputs a control increment of the rudder angle at the current time, which acts on the control amount at the last time to obtain the control amount at the current time;
[0062] A feedforward compensation module obtains the yaw angle of the hull heading influenced by the force of the sail based on the wind field data.
[0063] The yaw angle feedforward compensates the control amount at the current time, and the compensated control amount acts on the rudder of the unmanned sailboat to control the heading of the unmanned sailboat.
[0064] In some embodiments of the application, the MPC prediction module comprises:
[0065] An MPC model establishment unit establishes the MPC prediction model through linearization and discretization processing;
[0066] a future output prediction unit configured to predict the future state variables and output variables according to the MPC prediction model, and obtain a predicted output expression;
[0067] a rolling optimization unit configured to solve an optimal control increment sequence in each control period, and apply a first element in the optimal control increment sequence to the control system.
[0068] Other features and advantages of the present application will become more apparent from the following detailed description of some embodiments of the present application, when read in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings described in the following are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort.
[0070] Figure 1 is a flow chart of the MPC-based unmanned sailboat heading control method embodiment proposed in the present application;
[0071] Figure 2 is a control principle block diagram related to the MPC-based unmanned sailboat heading control method embodiment proposed in the present application;
[0072] Figure 3 is a flow chart of obtaining the yaw angle in the MPC-based unmanned sailboat heading control method embodiment proposed in the present application. DETAILED DESCRIPTION
[0073] The technical solutions in the embodiments of the present application will be described clearly and completely in the following by combining the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, but not all the embodiments.
[0074] Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort are within the protection scope of the present application. In the description of the present application, it should be understood that the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only used to facilitate the description of the present application and simplify the description, and therefore cannot be understood as indicating or implying that the device or element must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application.
[0075] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connecting" should be understood in a broad sense, for example, it can be fixed connection, or detachable connection, or integrally connected. For those skilled in the art, the specific meaning of the above terms in the present application can be understood in specific circumstances. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0076] The terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more features. In the description of the present application, unless otherwise stated, the meaning of "multiple" is two or more.
[0077] In order to avoid the problem of large control deviation of the existing control method for controlling the heading of the unmanned sailboat, slow convergence speed and low heading control precision, see Figure 1 The present application relates to an unmanned sailboat heading control method based on MPC, which realizes precise heading control of the nonlinear dynamic model of the unmanned sailboat with multiple constraints and strong coupling.
[0078] Figure 1 A flowchart of the unmanned sailboat heading control method based on MPC is shown, Figure 2 A control principle block diagram of the unmanned sailboat heading control method based on MPC is shown, Figure 2 A flowchart of obtaining the yaw angle in the unmanned sailboat heading control method based on MPC is shown.
[0079] In combination Figures 1 to 3 The unmanned sailboat heading control method based on MPC is described in detail as follows.
[0080] S1: Based on the MMG separation modeling idea, the rudder, sail and hull of the unmanned sailboat are analyzed, and the bow swing dynamic model of the unmanned sailboat is established.
[0081] The MMG (mathematical modeling group model) separation modeling idea is a modeling method for ship motion. In some embodiments of the present application, the ship is an unmanned sailboat. Based on the MMG separation modeling idea, the forces and torques acting on the hull, sail and rudder and their mutual interaction are analyzed and modeled, thereby establishing the bow swing dynamic model of the unmanned sailboat.
[0082] This modeling idea decouples the sail rudder control, reduces the error of the coupling of various parameters of the unmanned sailboat, and facilitates the control of the rudder.
[0083] In some embodiments of the present application, the main parts of the unmanned sailboat include a rudder, a sail and a hull. The forces on the rudder, the sail and the hull are analyzed separately, and the roll motion of the unmanned sailboat around the X-axis of the boat coordinate is ignored. A yawing dynamics model of the unmanned sailboat is established as follows.
[0084] (1).
[0085] wherein, is the yaw angle, is the differential of the yaw angle, is the yaw angle velocity, is the differential of the yaw angle velocity, is the moment of inertia of the hull rotation, , and are the hull yawing moment, the sail yawing moment and the rudder yawing moment respectively.
[0086] As follows, , and will be represented respectively.
[0087] In some embodiments of the present application, the hull yawing moment is represented as follows:
[0088] .
[0089] wherein, is the ship speed, is the linear hydrodynamic force and moment, is the nonlinear hydrodynamic force and moment, , , , , and are all coefficients, which can be identified from the actual operation data of the hull, or can be approximately solved using empirical formula.
[0090] In some embodiments of the present application, the sail yawing moment is represented as follows:
[0091] .
[0092] wherein, and are the sail lift and the sail drag respectively, is the relative wind angle, and are the sailboat heading boost force and the side thrust perpendicular to the sailboat heading respectively, and respectively are the positions of the center of sail force in the ship coordinate system.
[0093] In some embodiments of the present application, in actual sailing, there is a disturbance interference action between the rudder and the hull, and the rudder turning moment is expressed as follows:
[0094] .
[0095] wherein, is the normal pressure of the rudder, is the rudder angle, is the water density, is the rudder area, is the rudder efficiency coefficient, is the effective speed of flow into the rudder (which can be the actual ship speed).
[0096] In the prior art (referring to the invention patent with application number 202010969127.X), , is the interference coefficient of the hull and the rudder, is the vertical distance between the rudder force center and the center of gravity of the hull, is the correction coefficient of the rudder movement on the turning moment of the bow of the hull.
[0097] wherein, the interference coefficient and The approximate calculation formula can be as follows:
[0098] .
[0099] wherein, C b is the square coefficient of the ship design, L is the ship length.
[0100] S2: Taking the second-order turning dynamics model of the unmanned sailboat about the turning angle of the bow and the turning speed of the bow as the MPC prediction model, outputting the control increment of the rudder angle at the current time, and calculating to obtain the control amount at the current time.
[0101] In some embodiments of the present application, the MPC prediction algorithm is used to predict the model first and then control, which is suitable for the multi-constrained, strongly coupled nonlinear model of the unmanned sailboat.
[0102] In some embodiments of the present application, the working process of MPC prediction includes: establishing a prediction model, predicting future states, and rolling optimization.
[0103] As follows, each part of the working process of MPC prediction will be described respectively.
[0104] (1) Establishing a prediction model
[0105] In order to facilitate the processing of the nonlinear model of the unmanned sailboat, a linearization processing method is used to process the nonlinear model into a linear model, and then the linear model is used to solve the optimal control sequence by using the linear model predictive control theory.
[0106] In some embodiments of the present application, the linearization processing method can use Taylor expansion or working point linearization to convert the original nonlinear model into a linear model.
[0107] In some embodiments of the present application, let the state quantity , the control quantity , and the state equation of the control system can be set as .
[0108] The Taylor expansion is used to linearize the nonlinear model, which can be performed by selecting a point on the desired heading for Taylor expansion, retaining the first order term and ignoring the high order term, to obtain:
[0109] .
[0110] is the deviation of the actual state of the sailboat from the desired state, is the deviation of the actual control quantity of the sailboat from the desired control quantity.
[0111] Based on the state space model, the system matrix A and the control matrix B of the control system can be obtained:
[0112] .
[0113] In this way, the linear model after linear processing can be obtained.
[0114] In order to facilitate processing, in some embodiments of the present application, a bilinear transformation method is used to discretely process the linearized model to obtain a discretized state space model:
[0115] .
[0116] wherein the coefficient matrix and are the discretized linear time-varying matrices, is a linear transformation matrix of the state mapping output, is a discrete time step (i.e. the time interval from one control period to the next control period), is an identity matrix, is an output quantity.
[0117] The model can be used as a prediction model of MPC prediction algorithm, and then the prediction model can be used for multi-step state prediction and output prediction.
[0118] (2) Predicting future state
[0119] For the physical property constraints and actual operation rules in the heading control of unmanned sailboat, the control quantity is limited as follows:
[0120] .
[0121] and are the minimum and maximum values of the control quantity in the control time domain, and are the minimum and maximum values of the control increment in the control time domain, and the specific parameters can be determined according to the actual rudder type.
[0122] In order to meet the constraint conditions at the same time, a new state variable is defined, and a new state space model is obtained: .
[0123] Among them, , represents the state variable at the current time, represents the control variable at the last time, is the control increment, is the output variable.
[0124] The prediction time domain is set as , the control time domain is , and , the future state variable and the output variable are predicted according to the new state space model as follows:
[0125] .
[0126] For the purpose of simplifying the operation, it is assumed that in the prediction time domain , , , i =1,2,... .
[0127] Therefore, the new prediction output expression is: .
[0128] Among them, , , , .
[0129] (3) Rolling optimization
[0130] The process of rolling optimization can be described as follows: after predicting the future output of the system as above, by comparing with the expected output of the control system, the future control increment is found by solving an optimization problem to minimize the difference between the predicted output and the expected output, the first element of the future control increment is applied to the control amount at the last time, and for each control period, the control amount is input to the rudder and the current state is updated, the optimization problem is refreshed and re-solved.
[0131] The process of rolling optimization can be described as follows: after predicting the future output of the system as above, by comparing with the expected output of the control system, the future control increment is found by solving an optimization problem to minimize the difference between the predicted output and the expected output, the first element of the future control increment is applied to the control amount at the last time, and for each control period, the control amount is input to the rudder and the current state is updated, the optimization problem is refreshed and re-solved.
[0132] In some embodiments of the present application, a target function is constructed with the state deviation and control increment of the unmanned sailboat, and the target function is designed as follows:
[0133] (2).
[0134] Wherein, the matrix and are the weight matrix of state error and the weight matrix of control increment, and , the weight size in the weight matrix can be changed according to the parameters and the sailing environment of the actual sailboat, is the expected state in the expected direction.
[0135] In order to facilitate the solution of the target function, for formula (2), the term irrelevant to the control increment is removed, and a standard quadratic target function is obtained as follows as a performance index function.
[0136] .
[0137] Wherein, .
[0138] At this time, the heading control problem of the unmanned sailboat becomes a quadratic optimal value problem, and the optimization target is to reduce the tracking error and optimize the change amplitude of the control input, to ensure the stability of the sailing.
[0139] In order to solve the optimal value problem, a constraint condition is introduced, which can be a constraint condition of the control amount, a constraint condition of the control increment, a constraint condition of the output variable, and / or a constraint condition of the intermediate variable.
[0140] In some embodiments of the present application, the constraint condition includes the constraint condition of the control amount and the constraint condition of the control increment as follows in formula (3), which is used to limit the rudder angle and the rudder angle change speed, to avoid the instability of the unmanned sailboat caused by too large rudder angle and too fast rotation frequency.
[0141] (3).
[0142] wherein, and respectively represent a minimum value set and a maximum value set of the control quantity in the control time domain, and respectively represent a minimum value set and a maximum value set of the control increment in the control time domain.
[0143] The performance index function is subjected to the constraint condition as shown in equation (3), and the minimum value of the performance index function is taken to solve the optimal control increment sequence .
[0144] According to the rolling optimization principle, the first element △ of u is applied to the input of the control system, and is superimposed with the control quantity k at the previous time to obtain the control quantity at the current time = + △ u (remember k ( u ) k = ), which is used as the control input of the control system.
[0145] In each control period, an is calculated, and then is input to the rudder and the current state is updated, and the optimization problem is refreshed, so as to repeat the above steps to realize the dynamic real-time heading control of the unmanned sailboat.
[0146] In some embodiments of the present application, when solving the optimal problem of the quadratic form, the objective function contains a quadratic penalty term of the rudder angle φ and the rudder angle velocity r, which can suppress the sharp rudder angle of the sailboat and ensure the smooth sailing.
[0147] S3: Based on the wind field data, the yaw angle of the ship body affected by the wind sail force is obtained.
[0148] In some embodiments of the present application, during the sailing of the unmanned sailboat, the wind sail force also affects the heading, therefore, the influence of the wind sail force on the rudder angle is considered, and the control input of the rudder of the unmanned sailboat is compensated, which can make the heading of the unmanned sailboat quickly converge to the expected heading, reduce the heading deviation overshoot, and effectively reduce the number of rudder movements.
[0149] Referring to Figure 2 , in some embodiments of the present application, the yaw angle of the ship body affected by the wind sail force is obtained in combination with the wind field data , and the yaw angle As a feedforward compensation angle, the control quantity at the current moment is compensated, so that the ship body heading quickly converges to the desired heading.
[0150] S31: Based on the wind field data, the relative wind direction angle and the relative speed of the unmanned sailboat during the running process are obtained.
[0151] Wind is the source of force of the sail, therefore, it is necessary to obtain data related to wind.
[0152] The wind field data can be detected by the wind field sensor, and according to the detected wind field data, the relative wind direction angle and the relative speed of the unmanned sailboat during the running process can be obtained.
[0153] The relative wind direction angle and the relative speed are the data basis of the open-loop control of the sail.
[0154] The open-loop control of the sail is a conventional control technology of the sail, based on the relative wind direction angle and the relative speed, the existing sail control strategy (for example, the speed optimization method, the optimal sail attack angle strategy) is used to control the sail.
[0155] S32: The wind valve is open-loop controlled to obtain the sail attack angle .
[0156] According to the sail open-loop control rule, based on the relative wind direction angle and the relative speed, the existing sail control strategy (for example, the speed optimization method, the optimal sail attack angle strategy) is used to control the sail open-loop to obtain the sail attack angle .
[0157] S33: By , the sail force is decomposed into a lateral driving force : .
[0158] The sail lateral driving force has an impact on the rudder heading, therefore, the sail attack angle is used to obtain this force .
[0159] Wherein, and are the sail lift and the sail drag respectively, is the horizontal distance from the sail area to the center of the ship body.
[0160] S34: Let , , calculate the yaw angle .
[0161] Wherein, is the normal pressure of the rudder, is the rudder angle, is the water density, is the rudder area,K is a proportional gain coefficient, is an effective flow rate of the rudder.
[0162] The sign of the calculated yaw angle indicates the direction of the sail force.
[0163] S4: The yaw angle feedforward compensation is used to compensate the control quantity at the current time, and the compensated control quantity is applied to the rudder of the unmanned sailboat.
[0164] The yaw angle as described above As a feedforward compensation angle, it is used to compensate the MPC prediction output That is, the control input of the control system is and The sum of delta = + , the and cooperate to achieve high-precision heading control of the unmanned sailboat, and the compensated control input can achieve fast convergence of the heading control.
[0165] In the actual heading control process of the unmanned sailboat, the yaw angle and the yaw angle speed need to be obtained in real time. Such data acquisition means belongs to the routine technology of those skilled in the art, and can be obtained by using the sensors (including magnetometers, inertial measurement units and gyroscopes) configured on the unmanned sailboat.
[0166] The magnetometer can obtain the static yaw angle. However, the ship body will also affect the yaw angle when moving or disturbed by wind and waves, so the data obtained by the inertial measurement unit is also fused to identify the final yaw angle as the real-time obtained yaw angle.
[0167] The yaw angle speed can be directly measured by a gyroscope (such as a FOG / MEMS gyroscope).
[0168] The unmanned sailboat heading control method based on MPC disclosed in the present application cooperates the feedforward compensation and the MPC prediction algorithm to control the rudder angle of the rudder, optimizes the heading control of the ship body in real time, improves the heading response speed of the unmanned sailboat, realizes the rapid convergence of the heading to the expected heading, and improves the accuracy of the heading control.
[0169] In some embodiments of the present application, an unmanned sailboat heading control system (not shown) based on MPC is also involved, which is used to realize the unmanned sailboat heading control method based on MPC as described above.
[0170] The unmanned sailboat heading control system comprises a model construction module (not shown), an MPC prediction module (not shown) and a feedforward compensation module (not shown), and is applied to the rudder of the unmanned sailboat to realize sailboat heading control.
[0171] The model construction module is used for force analysis of the rudder, the sail and the hull of the unmanned sailboat based on the MMG separation modeling idea of the ship, and a yawing dynamics model of the unmanned sailboat is established. The specific implementation process is described above and will not be repeated here.
[0172] The MPC prediction module is used for performing MPC prediction and outputting at each control cycle. Specifically, the MPC prediction module comprises an MPC model establishment unit, a future output prediction unit and a rolling optimization unit.
[0173] The MPC model establishment unit establishes an MPC prediction model through linearization and discretization processing. The future output prediction unit predicts future state variables and output variables according to the MPC prediction model to obtain a prediction output expression. The rolling optimization unit repeatedly solves an optimal control increment sequence at each control cycle and applies the first control increment to the control system. The specific implementation is described above and will not be repeated here.
[0174] The feedforward compensation module is used for obtaining a feedforward compensation angle and compensating for the control input of the rudder of the unmanned sailboat to realize sailboat heading control. The feedforward compensation angle is obtained as described above and will not be repeated here.
[0175] The MPC-based unmanned sailboat heading control system described in the present application uses feedforward compensation and MPC prediction algorithm to cooperatively control the rudder angle, optimizes the heading control of the hull in real time, improves the heading response speed of the unmanned sailboat, realizes rapid convergence of the heading to the desired heading, and improves the heading control accuracy.
[0176] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features. Such modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions claimed by the present application.
Claims
1. A method for heading control of an unmanned sailboat based on MPC, characterized in that, Comprise: Based on the MMG separation modeling idea of ship, the force analysis of the hull, sail and rudder of the unmanned sailboat is carried out, and the yawing dynamics model of the unmanned sailboat is established, that is, the second-order yawing dynamics model of the unmanned sailboat about the yaw angle and the yaw angle velocity, which is as follows: ; ; ; ; wherein, is the rudder angle, is the differential of the rudder angle, is the rudder angle velocity, is the differential of the rudder angle velocity, is the moment of inertia of the hull rotation, , and are the hull turning moment, the sail turning moment and the rudder turning moment, respectively; is the ship speed, is the sum of the linear hydrodynamic force and moment, is the sum of the nonlinear hydrodynamic force and moment, , , , , and are coefficients; and are the wind sail lift and the wind sail drag, respectively, is the relative wind angle, and are the sailboat heading boost force and the side force perpendicular to the sailboat heading, respectively, and are the positions of the wind sail action force center in the ship coordinate system, respectively, is the normal pressure of the rudder, is the rudder angle, is the water density, is the rudder area, is the rudder efficiency coefficient, is the inflow rudder effective velocity; x R + α H x H , α H is the interference coefficient of the hull and the rudder, x R is the vertical distance between the rudder force action center and the hull gravity center, x H is the correction coefficient of the rudder movement to the hull turning moment; Based on the second-order yawing dynamics model of the unmanned sailboat about the yaw angle and the yaw angle velocity, the MPC prediction is carried out, the control increment of the rudder angle at the current time is output, and the control quantity at the current time is obtained through calculation; Based on the wind field data, the yaw angle of the ship course affected by the force of the sail is obtained; The yaw angle feeds back the control quantity at the current time, and the compensated control quantity is applied to the rudder of the unmanned sailboat for the course control of the unmanned sailboat.
2. The MPC-based unmanned sailboat course control method of claim 1, wherein, The specific process of MPC prediction is as follows: (1) For the bow shaking dynamic model of the unmanned sailboat, let the state quantity , the control quantity , adopt the linearization processing method, and linearize the state equation to obtain the system matrix and the control matrix of the control system; (2) Discretization of the state equation The discretized state equation is obtained as follows: ; ; wherein the coefficient matrix and are discretized linear time-varying matrices, is a linear transformation matrix of the state mapping output, is a discrete time step, is an identity matrix; (3) Let the state quantity , obtain a new state space model: ; wherein ; to control the increment, to output the quantity, denotes the state quantity at the current k time instant, denotes the control quantity at the previous time instant; (4) Set the prediction time domain as , the control time domain as , and , predict the future state quantity and the output quantity according to the new state space model, and the prediction output expression can be obtained as ; wherein , , , ; (5) According to the expected course and the prediction output, the target function is constructed with the state deviation and the control increment of the unmanned sailboat: ; wherein the matrix And are a weight matrix for the state error and a weight matrix for the control increment, respectively, is the desired state on the desired heading. (6) Define the performance index function: , ; (7) applying a constraint condition to the performance index function and taking a minimum value of the performance index function to solve an optimal control increment sequence ; (8) Based on the principle of rolling optimization, obtain The first element △ u *( k This is applied to the control system to compensate for the control quantity at the previous moment. To obtain the control quantity at the current moment =△ u *( k )+ .
3. The course control method of the unmanned sailboat based on MPC according to claim 2, wherein, The performance index function is subjected to the following constraint condition: ; wherein and respectively denote a minimum value set and a maximum value set of the control quantity in the control time domain, and respectively denote a minimum value set and a maximum value set of the control increment in the control time domain.
4. The MPC-based unmanned sailboat course control method of claim 1, wherein, Based on the wind field data, the yaw angle of the ship course affected by the force of the sail is obtained; Based on the wind field data, the relative wind direction angle and the relative speed of the unmanned sailboat during the running process are obtained; Open-loop control is performed on the sail to obtain a sail angle of attack ; Utilizing The sail force is decomposed into a lateral driving force : ; Let , , calculate the yaw angle ; wherein, is the horizontal distance of the sail area to the center of the hull, K is the proportional gain coefficient, the sign of the yaw angle indicates the direction of the sail force.
5. The course control method of the unmanned sailboat based on MPC according to claim 4, wherein, The wind field sensor is arranged on the unmanned sailboat; The wind field sensor detects the wind field and obtains the wind field data.
6. The course control method of the unmanned sailboat based on MPC according to claim 1, wherein, A magnetometer and an inertial measurement unit are arranged on the unmanned sailboat; The real-time yaw angle of the unmanned sailboat is identified by data fusion of the static yaw angle obtained by the magnetometer and the data obtained by the inertial measurement unit.
7. An MPC-based unmanned sailboat heading control system, characterized in that, Comprise: The model construction module is used for force analysis of the hull, sail and rudder of the unmanned sailboat based on the MMG separation modeling idea of ship, and the yawing dynamics model of the unmanned sailboat is established, that is, the second-order yawing dynamics model of the unmanned sailboat about the yaw angle and the yaw angle velocity, which is as follows: ; ; ; ; wherein, is the rudder angle, is the differential of the rudder angle, is the rudder angle velocity, is the differential of the rudder angle velocity, is the moment of inertia of the hull rotation, , and are the hull turning moment, the sail turning moment and the rudder turning moment, respectively; is the ship speed, is the linear hydrodynamic force and moment, is the sum of the nonlinear hydrodynamic force and moment, , , , , and are coefficients; and are the wind sail lift and the wind sail drag, respectively, is the relative wind angle, and are the sailboat heading boost force and the side force perpendicular to the sailboat heading, respectively, and are the positions of the wind sail action force center in the ship coordinate system, respectively, is the normal pressure of the rudder, is the rudder angle, is the water density, is the rudder area, is the rudder efficiency coefficient, is the inflow rudder effective velocity; = x R + α H x H , α H is the interference coefficient of the hull and the rudder, x R is the vertical distance between the rudder force action center and the hull gravity center, x H is the rudder motion correction coefficient of the hull turning moment; The MPC prediction module is used for MPC prediction based on the second-order yawing dynamics model of the unmanned sailboat about the yaw angle and the yaw angle velocity, and the control increment of the rudder angle at the current time is output, the control increment of the rudder angle at the current time is applied to the control quantity at the last time, and the control quantity at the current time is obtained; The feedforward compensation module is used for obtaining the yaw angle of the ship course affected by the force of the sail based on the wind field data; The yaw angle feeds back the control quantity at the current time, and the compensated control quantity is applied to the rudder of the unmanned sailboat for the course control of the unmanned sailboat.
8. The MPC-based unmanned sailboat heading control system of claim 7, wherein, The MPC prediction module comprises: The MPC model establishment unit linearizes and discretizes the yawing dynamics model of the unmanned sailboat to establish the MPC prediction model; The prediction future output unit predicts the future state quantity and output quantity according to the MPC prediction model to obtain the prediction output expression; a rolling optimization unit that, at each control period, solves for an optimal control increment sequence and applies a first element of the optimal control increment sequence to the control system.
Citation Information
Patent Citations
A method for determining maximum speed based on the sail angle of attack of an unmanned sailboat
CN113408097B
Course control method and system for sail navigation aid ship
CN103558854A
Ship course intelligence controller based on incomplete recursive branch-set dynamic neural network
CN105446136A