Mooring trajectory tracking control method applied to double-pod ship
By designing a mooring trajectory tracking control method suitable for double pod ships, the problem of difficult to effectively control the trajectory tracking of double pod ships in the prior art is solved, and the stability of high-precision trajectory tracking and manipulation instructions is achieved.
Patent Information
- Application Number
- CN202510179239.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-02-18
AI Technical Summary
The prior art is difficult to effectively realize the tracking control of double pod ships, and the engineering realization is poor.
A control strategy that takes into account engineering practicality and high precision control is designed through steps such as error calculation and processing, planning of expected heading, calculating commanded forward thrust and bow torque, and dividing grid search.
Accurate control of the ship's position and heading during the mooring process, ensuring the smoothness of trajectory tracking and manipulation instructions that conform to navigation practices, and improving the feasibility and safety of control.
Smart Images

Figure CN120044951A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship trajectory tracking control and automatic berthing control, and particularly relates to a berthing trajectory tracking control method applied to a twin-pod ship. Background Art
[0002] With the rapid development of the shipping industry in recent years, the applicable scenarios requirements for autonomous ship navigation have been deepened and improved. A basic technology of autonomous navigation is trajectory tracking, that is, the ship arrives at the end point from the initial position according to the planned route, which is further divided into trajectory tracking and path tracking. Path tracking is geometric position tracking without considering time, and the requirement is only the convergence of the deviation between the ship and the planned route, without closed-loop control of the ship speed. In contrast, the requirement of trajectory tracking is that the ship should have a specified speed and reach a specific position on the route at a specific time, so the implementation difficulty is generally greater than that of path tracking.
[0003] Generally, the path tracking method is adopted for autonomous ship navigation, which is sufficient for navigation tasks in open waters and without strict time limits; but in task scenarios such as navigating in traffic control areas, taking advantage of the rising tide in shallow waters, and picking up and dropping off pilots when entering and leaving ports, where time requirements are relatively strict, trajectory tracking control needs to be adopted. In particular, in the task of a ship approaching a berth from an anchorage (referred to as berthing), due to the extremely low speed in the port area, the berthing path is mostly a continuous and smooth curve, and the control accuracy requirements for position and speed are high, so it is suitable to adopt trajectory tracking control.
[0004] Twin-pod ships are a relatively new type of ship, which are characterized by using two pod-type full-rotation electric propulsion devices to provide power and not equipped with a stern rudder. They have high flexibility, sensitive steering, and can make the ship have good full-drive characteristics under certain conditions. At the same time, their motion mechanism and control method are significantly different from those of conventional ships. Because their steering and forward motion are highly coupled and the forward thrust must decrease when steering, the difficulty of trajectory tracking control increases.
[0005] Some of the trajectory tracking control schemes proposed by the prior art only consider the control to the dynamics level, and the control variables are thrust and torque. Based on advanced control strategies such as backstepping / RBF network adaptive control / sliding mode adaptive control, a high-precision controller is designed to prove the stability / adaptive ability. However, on the one hand, due to the large number of internal parameters of the controller and the unclear physical meaning of the parameters, it is particularly difficult to adjust the parameters according to the ship motion situation during the actual ship deployment, and basically only rely on the parameters during the simulation test; on the other hand, the control variables are not the manipulation instructions for the actuator, which limits their practicality.
[0006] A small part of the existing technologies goes further, and their solutions use manipulation instructions as control variables. The control objects of these solutions are mostly small unmanned surface vessels (USVs) or conventional stern-steered ships. The forward navigation and steering of such control objects are not coupled, and the rotational speed and rudder angle are not included in each other in their dynamic mathematical expressions. Therefore, the control laws for rotational speed / rudder angle can be designed separately, or the rotational speed / rudder angle can be simply calculated from the thrust / moment. However, as mentioned above, dual-pod ships are not within the scope of application of such solutions.
[0007] Among the existing solutions, the solution of Qingdao University of Science and Technology not only considers that the control variable should be the actuator state combination, but also selects the reduced model of the dual-pod ship as the control object, which is worthy of detailed elaboration. It first obtains the ship motion model by training the RNN network, and then implements MPC control by using the multi-step prediction (calculating the outputs at multiple future moments) of the RNN. In MPC, this solution first designs an objective function that takes into account the tracking error, actuator wear (chattering), and actuator action energy consumption (where the time series of the actuator state combination is used as the independent variable / decision variable), then uses PSO to find the optimal time series, and finally only takes the first state combination in the optimal time series according to the MPC convention.
[0008] The output of this solution is the ship manipulation instruction of {rotational speed * 3, turning angle * 2}, which is in line with the engineering reality in this regard; however, due to the generally low hardware performance of on-board controllers and the lack of common neural network toolboxes or machine learning libraries in simulations, it is particularly difficult to deploy and train a 3-layer RNN model in them, that is, the engineering feasibility is poor; in addition, MPC requires the time series of the control variable (rather than the control variable at a certain moment), so the optimization problem in this solution has a higher dimension, a more significant non-linearity of the objective function, and a larger computational amount compared with the common thrust allocation optimization problem. Inevitably, the particle swarm is larger and more likely to fall into local optimum, which also brings potential problems to the controller performance. Summary of the Invention
[0009] In order to solve the technical problems in the existing technologies that for dual-pod ships, traditional trajectory tracking algorithms cannot effectively realize the trajectory tracking control of the ships and the engineering feasibility is poor, the present invention proposes a berthing trajectory tracking control method applied to dual-pod ships, enabling the actual ship to more smoothly track the reference trajectory, considering the feasibility and safety in actual control, and finally the accuracy of the obtained solution can meet the control requirements of actuators in real ships, comprehensively taking into account the engineering practicability and high control accuracy.
[0010] The technical solution of the present invention is as follows:
[0011] A berthing trajectory tracking control method applied to dual-pod ships, comprising:
[0012] Step S1, Error Calculation and Processing: Calculate the position error between the ship and the berthing reference trajectory and transform it to the body coordinate system;
[0013] Step S2, Planning the Desired Heading and Calculating the Heading Error: Use a guidance law that combines the virtual ship leader method and the improved integral line-of-sight method to plan the desired heading that enables the lateral position error to converge; Calculate the heading error based on the desired heading; Smooth the error signal using a tracking differentiator and extract its derivative; The virtual ship leader method obtains the track deviation in the guidance law through projection conversion by constructing a virtual ship; The improved integral line-of-sight method resets the integral term in the guidance law when the actual ship distance trajectory is too far;
[0014] Step S3, Calculating the Command Forward Thrust: Based on the ship dynamics model, construct a longitudinal tracking control law, and use the algorithm of estimated reference value + feedback correction value to calculate the command forward thrust that enables the longitudinal position error to converge;
[0015] Step S4, Calculating the Command Yawing Moment: With the heading error described in Step S1 as the input, construct a heading control law based on the PID algorithm, calculate the command yawing moment that enables the heading error to converge, and limit it within a safe range;
[0016] Step S5, Instruction Resolution: Establish a ship dynamics model, construct a trajectory tracking control law based on the command forward thrust described in Step 3 and the command yawing moment described in Step 4. The trajectory tracking control law controls the ship's heading and longitudinal movement, and combines the characteristics of real ship maneuvering to establish a constrained optimization problem; Perform grid search based on the strategy of divide and conquer first and then local optimization to solve the constrained optimization problem and obtain the optimal maneuvering instructions, namely the twin propeller speeds and the turning angles.
[0017] Preferably, Step S1 includes:
[0018] Step S11, Calculate the actual position (x, y) of the ship and the error between the desired position (x i , y i ) in the earth coordinate system; Define the position error (E X , E Y ) in the earth coordinate system as:
[0019]
[0020] Step S12, According to the current ship heading ψ, transform the position error (E X , E Y ) in the earth coordinate system to the position error (e x , e y ) in the body coordinate system, and the expression is:
[0021]
[0022] Preferably, step S2 includes:
[0023] Step S21, lateral error conversion: Using e in the position error y , the current heading ψ, and the heading ψ of the reference trajectory i , based on the virtual ship leading method, that is, through the position and angle relationship between the actual ship and the virtual ship for projection conversion, the track deviation is obtained
[0024] Step S22, forward-looking vector calculation: Given three parameters e band , K l , K u ; According to the current track deviation to obtain a dynamically adjusted forward-looking vector Δ(e y );
[0025]
[0026] where ι ∈ [0, 1]; Δ min = K l L, Δ max = K u L, where it is required that K u ≥ K l > 0; In the embodiment, the deviation threshold e band = L / 3; The length of the forward-looking vector Δ > 0;
[0027] Step S23, integral term update: Using the integral algorithm, given the parameter σ, calculate the change amount of the integral term from and Δ;
[0028]
[0029] where σ > 0 is the integral term gain, which is a parameter to be tuned; When the actual ship is too far from the trajectory the integral term is extremely easy to saturate. To prevent overshoot, it is directly reset;
[0030] Step S24, desired heading calculation: Based on ψ i in the reference trajectory, calculate the line-of-sight angle θ for correction to obtain the desired heading ψ d ;
[0031] Step S25, calculate the current heading error: For heading-keeping control, based on the desired heading ψ d ; Define the heading error as e ψ = ψ d - ψ, calculate the current heading error;
[0032] Step S26, smooth the error and extract its differential: For the position error \(e\) x and the heading error \(e\) ψ , perform the tracking differentiator algorithm on each of them to obtain the smoothed error \(z\) x , \(z\) ψ , and the extracted differentials
[0033] Preferably, step S3 includes:
[0034] Step S31, calculate the desired speed
[0035] where \(u\) i is the longitudinal speed of the virtual ship; \(u\) d is the desired speed of the real ship, is the cosine value of the bow angle between the two ships;
[0036] Step S32, based on the dynamic model of the ship, calculate the estimated reference value d matching the desired speed \(u\)
[0037] Step S33, calculate the feedback correction value \(X\) corr ;
[0038] Specifically, its calculation formula is:
[0039]
[0040] where \(K\) Xp , \(K\) Xi , \(K\) Xd ≥0 are the longitudinal PID coefficients to be tuned; \(z\) x is the error used for longitudinal PID calculation, and the error differential is
[0041] Step S34, use the estimated reference value + feedback correction value to obtain the commanded forward thrust \(X\) c ;
[0042] Step S35, construct the safety thrust threshold for different ships to limit \(X\) c to the safe range.
[0043] Preferably, step S4 includes:
[0044] Step S41, calculate the commanded turning moment \(N\) c output by the controller based on the heading error;
[0045] Step S42, set the safety turning moment threshold for different real ships and limit \(N\) based on the ship typec To the safe range.
[0046] Preferably, step S5 includes:
[0047] Step S51, establish an optimization problem: Substitute the water speed u measured by the sensor, X calculated by the controller c , N c , the given weight parameter λ into the objective function J; and set the solution space range, including: the safe and feasible range of the rotational speed n of the actual ship, the safe and feasible range of the turning angle α.
[0048] Step S52, block division: Divide the search space of n c equally spaced into 20 blocks, and also divide the search space of α c equally spaced into 20 blocks, and record the side length of the blocks.
[0049] Step S53, determine the optimal block: Determine the center point of the block that minimizes the value of J, and record the block it is in as the optimal block.
[0050] Step S54, local optimization: Only perform a grid search within the optimal block obtained in step S53 to obtain the final numerical solution (n c * , α c * ).
[0051] Preferably, in step S51, the constructed objective function J is:
[0052]
[0053] Where: λ ∈ (0, 1) is the weight parameter; J i ∈ (-1, +1) is the normalized result of the L i , R i numerical deviation, the minimum quantity ε = 2 × 10 -16 can prevent the divisor from being zero; the independent variables of J are u, n c , α c , X c , N c , λ; the remaining variables are all coefficients of the twin-pod ship dynamics model.
[0054] Preferably, in step S53, the method for determining the optimal block is:
[0055] Visit each block one by one, but only substitute the center point of the block (n mid , α mid ) into the objective function given in S51, and calculate the objective function value J(n mid , α mid ). If J(nmid , α mid ), if it is lower than the historical optimal value, then the current block is considered the optimal block, the historical optimal value is updated, and the calculation, comparison, and update are repeated until all blocks have been visited.
[0056] Preferably, the method of performing grid search in step S54 is that for each grid point, using the objective function given in S51, calculate the objective function value J(n c , α c ); if it is lower than the historical optimal value, then record this grid point as the optimal (n c * , α c * ) and at the same time update the historical optimal value; until all grid points are processed, the (n c * , α c * ) that makes the J value the lowest is the required maneuvering instruction.
[0057] Compared with the prior art, the present invention has the following beneficial effects:
[0058] The berthing trajectory tracking control method for dual-pod ships provided by the present invention mainly takes into account the highly coupled characteristics of the forward motion and the turning motion of dual-pod ships, and solves the problem that it is difficult to apply existing conventional trajectory tracking control methods. Secondly, considering that the method should be concise and intuitive, that is, for practical engineering applications, it is necessary to design an implementable solution that takes into account both engineering practicability and high control precision. By executing this control method, it is possible to obtain smooth and navigation-practice-compliant maneuvering instructions during the berthing process, and to control the actual position and heading of the ship more precisely.
[0059] The present invention proposes a berthing trajectory tracking control method for dual-pod ships. Among them, steps S3 and S4 together solve the problem of control law design; specifically,
[0060] In step 1, error calculation processing is performed to convert the position error in the earth coordinate system into the position error in the body coordinate system, which is convenient for the design of the trajectory tracking control law. In step 2, the improved ILOS method is used to plan the desired heading that can make the lateral position error converge. In the improved ILOS method, by combining with the virtual ship leading method, the calculation steps of the track deviation are simplified; through the proposed function, the fixed Δ in the classical ILOS method is improved to be variable, and when the actual ship is too far from the track, the integral term is reset, so as to dynamically adjust the length of the forward-looking vector to adapt to the current deviation, achieve faster convergence while reducing oscillation, and make the actual ship track the reference track more smoothly. Using the tracking differentiator technology, effective differential information can be extracted from the noisy signal, and the signal can be smoothed at the same time, and finally higher-quality input can be provided for the controller.
[0061] In steps 3 and 4, through the design of the trajectory tracking control law, the commanded forward thrust and the commanded yaw moment are calculated. Specifically, the longitudinal tracking control law is constructed by using error feedback and the ship dynamics model to obtain the commanded thrust that can make the longitudinal position error converge, and the yaw control law is constructed to obtain the commanded yaw moment that can make the yaw error converge. Considering the actuator capacity constraint, the calculation results are limited, so as to ensure the feasibility and safety in actual control.
[0062] In step 5, the divide-and-conquer grid search is adopted to solve the problem of actual maneuvering instruction calculation. The search space is divided into multiple blocks, first determine the block where the optimal solution is located, and then implement the grid search algorithm in this local block, which greatly reduces the overall calculation cost. This design not only has high calculation efficiency, but also the accuracy of the solution can meet the control requirements of the actuators in real ships.
[0063] In summary, for the control method of the present invention, the physical meanings of the parameters are basically clear and certain specific adjustments are allowed, which ensures the scalability of the method and enables it to adapt to the maneuverability and actuator capabilities of different real ships. At the same time, the present invention also provides a reference for the development of the unmanned ship control system under complex scenarios, narrow waters, and limited time conditions. Description of the Drawings
[0064] Figure 1 It is a flowchart of a berthing trajectory tracking control method applied to a twin-pod ship in the embodiment.
[0065] Figure 2 It is a specific flowchart of step S1 in the control method.
[0066] Figure 3 It is a specific flowchart of step S2 in the control method
[0067] Figure 4It is the guidance principle diagram corresponding to step S2 in the control method.
[0068] Figure 5 It is the result example diagram of step S2 in the control method.
[0069] Figure 6 It is the specific flowchart of step S3 in the control method.
[0070] Figure 7 It is the block diagram of the speed control system corresponding to step S3 in the control method.
[0071] Figure 8 It is the specific flowchart of step S4 in the control method.
[0072] Figure 9 It is the block diagram of the heading control system related to steps S1, S2, and S4 in the control method.
[0073] Figure 10 It is the specific flowchart of step S5 in the control method.
[0074] Figure 11 It is the result diagram of the effectiveness test of the control method. Specific implementation method
[0076] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0077] In a preferred embodiment of the present invention, in view of the above problems existing in the prior art, a berthing trajectory tracking control method for a twin-pod ship is provided, as Figure 1 shown, including:
[0078] Step S1, error calculation and processing: Calculate the position error between the ship and the berthing reference trajectory and convert it to the body coordinate system;
[0079] Step S2, planning the desired heading and calculating the heading error: Use a guidance law that combines the virtual ship leader method and the improved integral line-of-sight method to plan the desired heading that makes the lateral position error converge; Calculate the heading error based on the desired heading; Use a tracking differentiator to smooth the error signal and extract its derivative; The virtual ship leader method obtains the track deviation in the guidance law through projection conversion by constructing a virtual ship; The improved integral line-of-sight method resets the integral term in the guidance law when the actual ship distance trajectory is too far;
[0080] Step S3, calculating the commanded forward thrust: Based on the ship dynamics model, construct a longitudinal tracking control law, and use an algorithm of estimated reference value + feedback correction value to calculate the commanded forward thrust that makes the longitudinal position error converge;
[0081] Step S4, calculate the command yaw moment: The input is the heading error described in step S1. Based on the PID algorithm, construct a heading control law, calculate the command yaw moment that makes the heading error converge, and limit it within the safe range;
[0082] Step S5, instruction resolution: Establish a ship dynamics model. Based on the command forward thrust described in step 3 and the command yaw moment described in step 4, construct a trajectory tracking control law. The trajectory tracking control law controls the ship's heading and longitudinal motion, and combines the characteristics of real ship maneuvering to establish a constrained optimization problem; Based on the strategy of dividing and conquering first and then local optimization, perform a grid search to solve the constrained optimization problem and obtain the optimal maneuvering instructions, namely the rotational speeds of the two propellers and the angle of rotation.
[0083] In a preferred embodiment of the present invention, as Figure 2 shown, step S1 includes:
[0084] Step S11, calculate the error between the actual position (x, y) of the ship and the desired position (x i , y i ) in the earth coordinate system; Specifically, define the position error in the earth coordinate system as:
[0085]
[0086] In this embodiment, the desired position (x i , y i ) is derived from the existing planned reference trajectory η d , and is time-varying;
[0087] Step S12, convert the position error in the earth coordinate system to the position error in the body-fixed coordinate system according to the current ship's heading ψ;
[0088] Specifically, the expression is:
[0089]
[0090] In this embodiment, converting the position error to the body-fixed coordinate system is a requirement for the design of the trajectory tracking control law. This approach makes it easier to design control algorithms and guidance algorithms using position error feedback;
[0091] In a preferred embodiment of the present invention, as Figure 3 shown, step S2 includes:
[0092] Step S21, lateral error conversion: Use e in the position error y , the current heading ψ, and the heading ψ of the reference trajectory i , and based on the virtual ship leader method, that is, perform projection conversion through the position and angle relationship between the real ship and the virtual ship, to obtain the track deviation
[0093] Specifically, the following convenient conversion (projection) method is used
[0094]
[0095] wherein is the distance perpendicular to the track segment and can be approximately used as the track deviation; ψ i comes from the existing reference track;
[0096] In this embodiment, in the virtual ship leading method, the aforementioned e y is only the lateral position error between the ship and the virtual ship in the appendage coordinate system, rather than the "cross-track error" required by the ILOS method, so conversion is needed;
[0097] In this embodiment, S21 obtains the track deviation, and its calculation steps are significantly simpler than those of the classical ILOS method because it skips the calculation of some intermediate variables;
[0098] In this embodiment, this embodiment uses Figure 4 as the schematic diagram of the principle, which describes e y , ψ, ψ i geometric relationship; Figure 4 also schematically shows the principle of other steps in S2 (such as S23, etc.), which is conducive to understanding the geometric relationship of the key variables (the physical meanings of these variables are all lengths or angles);
[0099] Step S22, forward-looking vector calculation: Given three parameters e band , K l , K u ; According to the current track deviation obtain the dynamically adjusted forward-looking vector Δ(e y );;
[0100] Specifically, the forward-looking vector length algorithm is designed as:
[0101]
[0102] where ι ∈ [0, 1]; Δ min = K l L, Δ max = K u L, where it is required that K u ≥ K l > 0; In the embodiment, the deviation threshold e band = L / 3;
[0103] In this embodiment, the setting of the forward-looking vector length Δ>0 is particularly important. In the classical method, the forward-looking vector is a fixed value, expressed as a multiple of the ship length L. When Δ is large, the actual ship turns smoothly, but the deviation convergence speed is slow; when Δ is small, the actual ship turns aggressively, the deviation convergence speed is fast, but it is prone to oscillation;
[0104] In this embodiment, the improved method dynamically adjusts Δ according to the current deviation, providing an adaptive ability, which helps to converge faster while reducing oscillation, enabling the actual ship to track the reference trajectory more smoothly. When the actual ship is far from the reference trajectory, increases. At this time, to make it converge as soon as possible, Δ should be reduced to make the actual ship turn faster; conversely, when is small, Δ should be increased to make the actual ship finely adjust the heading smoothly;
[0105] In this embodiment, analyzing the proposed function shows that if it indicates that the deviation is too large, and Δ should take the minimum value Δ min . Conversely, if then the variable Δ is calculated based on the cosine decay function according to the relative size of the deviation. When it should be Δ = Δ max . Therefore, the function meets the design intention;
[0106] In this embodiment, since the reference trajectory starts from the initial coordinates of the ship, during normal control, the track deviation throughout the process should have a relatively small magnitude. From this, it can be known that Δ min is allowed to be less than L. This is significantly different from the traditional LOS / ILOS method used for path tracking: in the classical method, the minimum forward-looking vector is generally set to L;
[0107] Step S23, update the integral term. Using the integral algorithm proposed by , given the parameter σ, calculate the change in the integral term from and Δ; update the integral term selectively on the premise of preventing the integral term from being too large (which will cause overshoot);
[0108] In this embodiment, the following integral term calculation method is given in this embodiment:
[0109]
[0110] where σ>0 is the integral term gain, which is a parameter to be tuned; when the actual ship is too far from the trajectory the integral term is extremely easy to saturate. To prevent overshoot, it is directly reset;
[0111] In this embodiment, in practical applications, accumulation is used instead of integral operation, so the algorithm needs to set I e = 0 at the beginning;
[0112] Step S24, desired heading calculation. Based on ψ in the reference trajectory, calculate the line-of-sight angle θ for correction to obtain the desired heading ψ i ; d Specifically, the algorithm (guidance law) for calculating ψ
[0113] is as follows: d In this embodiment, ε is the track deviation adjusted by the integral term I
[0114]
[0115] ; the desired heading ψ e is corrected by the line-of-sight angle θ jointly determined by ε and Δ based on the existing ψ d ; the significance of the correction is to make the deviation converge and counter the possible existing continuous lateral disturbance (the integral term is used to compensate for the steady-state deviation); i As a supplementary explanation for step S2, although the ILOS method has been proven to be stable for small disturbances and can make the lateral position error converge, in practical applications, the deviation convergence effect still highly depends on parameter tuning and the ship navigation environment. To ensure the applicability and robustness of the algorithm, parameters need to be tuned in experiments.
[0116]
[0117] Step S25, for heading-keeping control, define the heading error as e ψ = ψ d - ψ, and calculate the current heading error;
[0118] In this embodiment, the desired heading ψ d has been planned and given in S24; this error definition can make the proportional term coefficient in the subsequent PID control law positive;
[0119] Step S26, smooth the error and extract its differential: Perform the tracking differentiator algorithm processing on the error signals e x , e ψ respectively to obtain the smoothed error z x , z ψ and the extracted differential
[0120] In this embodiment, the differential of e x , e ψ is needed in the subsequent control law (but the differential of e y is not needed, and the differential of e y has been used in step S21). The signals e x , e ψIn practice, there is noise, which may include measurement noise or random disturbances caused by gusts and high-frequency waves. Generally, the differentiation of discrete signals is approximated by differences. However, this is unreasonable for noisy signals and will amplify the high-frequency components of the noise in the signal, resulting in inaccurate or even distorted results.
[0121] In this embodiment, a Tracking Differentiator (TD) can be used to extract the differentiation from a noisy signal. It simultaneously realizes high-frequency noise suppression and signal change response, and is suitable for control systems with high real-time requirements. The tracking differentiator was first proposed by Han Jingqing in the 1990s and is one of the three core components of Active Disturbance Rejection Control (ADRC). A typical linear second-order TD is as follows:
[0122]
[0123] where e is the original noisy error signal, specifically e x or e ψ ; γ > 0 is an adjustable TD parameter, specifically γ x or γ ψ ; z 1 is the smoothed error signal after passing through the TD; z 2 is the differentiation extracted by the TD
[0124] In this embodiment, in order to apply the above second-order TD in the embodiment, its discrete form is given as:
[0125]
[0126] where t c is the control period. In this embodiment, t c = 1s; [k - 1] represents the past value. At the initial moment, all past values are set to zero; [k] represents the current value. In this embodiment, this formula is used for TD processing.
[0127] As a supplementary explanation of step S26, in this embodiment, taking Figure 5 as an example, the result obtained by executing S26 is shown. In this example, let x i = y i = ψ d = 0, γ x = 0.7, γ ψ= 0.6, where x, y, and ψ are all sine signals. The amplitudes of x and y are 10 m and contain white noise with a variance of 1 m. The amplitude of ψ is 10 deg and contains white noise with a variance of 1 deg. The signal sampling rate is 1 Hz, and the total simulation time is 80 s (4 cycles, 20 s per cycle). Figure 5 The results show the effectiveness of the linear second-order TD in S26. Among them, diff e y is the difference of the noisy signal e y . Comparing it with shows that the derivative extracted by TD is more accurate.
[0128] In a preferred embodiment of the present invention, as Figure 6 shown, step S3 includes:
[0129] Step S31: Calculate the desired speed
[0130] Specifically, according to the virtual ship leading method, there is the following speed relationship:
[0131]
[0132] where u i is the longitudinal speed of the virtual ship (obtained by differentiating the reference trajectory and is a known quantity); u d is the desired speed of the real ship and is related to the headings ψ, ψ i of the two ships. The speed unit is m / s. From the above formula, we can get
[0133] Step S32: Calculate the estimated reference value d matching the desired speed u
[0134] Specifically, the calculation formula is K h is a gain coefficient to be tuned that is = 1 or ≈ 1. Its design purpose is to allow fine-tuning of the estimated reference value when the flow interference is severe (K h < 1 when sailing downstream, K h > 1 when sailing upstream); from the dynamic model, we can get u d the longitudinal fluid resistance D X on the hull at the speed;
[0135] In this embodiment, the physical meaning of is the opposite of the longitudinal fluid resistance D X . This design is equivalent to carrying out feedforward control based on u d ;
[0136] In this embodiment, D XIt is given by the fluid viscosity force model in the model, and the turning drag is ignored (during the low-speed berthing process, the absolute value of the angular velocity r is limited, which can ensure that it is small enough); in this embodiment, Different actual ships have D with similar forms but different specific coefficients X expression;
[0137] Step S33, calculate the feedback correction value X from the smooth longitudinal position error and its differential value corr ;
[0138] Specifically, its calculation formula is:
[0139]
[0140] where K Xp , K Xi , K Xd ≥0 are the longitudinal PID coefficients to be tuned;
[0141] In this embodiment, the design purpose of X corr is to make the longitudinal position error converge finally;
[0142] In this embodiment, X corr theoretically is obtained from e x , through the PID control law, and should be replaced by difference approximation; however, the error processing has been completed by S14 before, so the actual error used for longitudinal PID calculation is z x and the error differential is
[0143] Step S34, use the estimated reference value + feedback correction value to obtain the commanded forward thrust X c ;
[0144] Specifically, the commanded forward thrust output by the speed controller is:
[0145]
[0146] In this embodiment, since it has an estimated reference value, it is similar to feedforward control, and can achieve a relatively rapid control response and a very small overshoot; adopting PID control with high-quality differential signals aims to make the longitudinal position error converge and have a certain compensation ability for external disturbances;
[0147] Step S35, limit X c to the safe range;
[0148] Specifically, different actual ships have different safety thrust thresholds; in this embodiment, according to the thrust calculation model of a certain ship, when the two pods work synchronously and output at 80% power, the longitudinal thrust generated is about 4×10 5 N, so X c should be restricted to the interval of [0, 4×10 5 N;
[0149] As a supplementary explanation of step S3, a corresponding speed control system block diagram is given in this embodiment, as shown Figure 7 (this figure is also involved in the error calculation and processing of S1 and S26 and is input as a part of S3).
[0150] In a preferred embodiment of the present invention, as shown Figure 8 , step S4 includes:
[0151] Step S41, calculate the commanded yaw moment N output by the controller based on the heading error c ;
[0152] Specifically, the calculation expression is:
[0153]
[0154] where K Np , K Ni , K Nd ≥0 are the heading PID coefficients to be tuned;
[0155] In this embodiment, N c theoretically is obtained by the PID control law from the heading error e ψ and its differential; previously, the differential of the error was extracted and the error was smoothed in S14, so the actual error used for heading PID calculation is z ψ , and the differential is
[0156] Step S42, restrict N c to the safe interval;
[0157] Specifically, different actual ships have different safety yaw moment thresholds; in this embodiment, according to the moment calculation model of a certain ship, when the two pods work synchronously, considering the forbidden zone angle, and output at 80% power, the generated moment is about 1×10 7 Nm, so the calculated N c should be restricted to the interval of [-1×10 7 , +1×10 7 Nm, where positive / negative are clockwise / counterclockwise directions respectively;
[0158] As a supplementary description of step S4, the present embodiment gives the corresponding block diagram of the heading control system, as Figure 9 shown; however Figure 9 in addition to S4, it also involves S1 position error calculation, S2 planned desired heading and heading error calculation, and the processing of errors. The variables and processing procedures therein are connected together in the form of Figure 9 to jointly achieve the important goal of reducing the lateral error.
[0159] To sum up, in S1, two position errors e x , e y are calculated; in S2, according to the design idea of the indirect path-keeping controller, the desired heading ψ y that can make e d converge is planned, and the task of "converging e y " can be transformed into a heading-keeping control task; based on ψ d , the heading error e ψ can be calculated; to avoid directly taking the difference of the noisy errors e x , e ψ , TD is used for smoothing and at the same time extracting the differential signal to obtain z x , z ψ ,
[0160] In S3 and S4, based on the ship motion model, a trajectory tracking error feedback controller is designed to make the tracking error zero or converge to a very small neighborhood of zero; specifically, the speed controller outputs the command forward thrust X c , and the heading controller outputs the command yaw moment N c ; and limit according to the actual situation.
[0161] In a preferred embodiment of the present invention, as Figure 10 shown, step S5 includes:
[0162] Step S51, establish an optimization problem. Substitute the water speed u measured by the sensor, the X c , N c calculated by the controller, and the given weight parameter λ into the objective function J designed in this scheme; combined with the actual situation, determine the solution space range, that is, the safe and feasible interval of the rotational speed n of the actual ship and the safe and feasible interval of the turning angle α;
[0163] Specifically, the objective function J is constructed according to the following calculation formula:
[0164]
[0165] where: λ ∈ (0, 1) is the weight parameter; J i ∈ (-1, +1) is Li , R i The standardized result of the numerical deviation, with a minimum value ε = 2×10 -16 To prevent division by zero; the independent variables of J are u, n c , α c , X c , N c , λ; the remaining variables are all coefficients of the twin-pod ship dynamics model, which are different for different actual ships and are constants for a specific ship and are known in this embodiment. In S51, since u, X c , N c , λ are all assigned specific values, the value of J is determined by and only by the combination of n c , α c ;
[0166] Specifically, in this embodiment, according to the results of the speed performance test, when the ship speed is 4 kn and below, n ∈ [0, 100] rpm; when the twin pods work synchronously, α ∈ [-π / 2, +π / 2]; based on this, the range of the solution space is determined;
[0167] In this embodiment, the prototype of the above optimization problem is the following system of equations based on the twin-pod ship dynamics model and containing 2 non-linear equations:
[0168]
[0169] Among them, the commanded thrust X c , and the commanded yaw moment N c are known quantities, u and each model coefficient are also known, while the commanded rotational speed n c , and the commanded turning angle α c are unknowns to be solved and are actual manipulation instructions for the ship.
[0170] In this embodiment, if the above system of equations has a solution, then the solution is unique; if there is no solution, it is required in engineering that the second equation should be made to hold first (giving priority to realizing the yaw control); for this purpose, the design of the weight λ is introduced;
[0171] In this embodiment, to avoid the difficulty of finding the analytical solution of the non-linear system of equations, a numerical solution method is considered to obtain an approximate solution (instead of the analytical solution) of the system of equations that is sufficient to meet the accuracy requirements; following this idea, the problem of solving the system of equations is transformed into the constrained optimization problem described in S51, and optimization is performed through the subsequent steps S52 - S54.
[0172] Step S52, block division. Divide the search space of n c into 20 equal intervals, and divide the search space of α c into 20 equal intervals as well; therefore, the entire solution space is divided into 400 blocks; record the side length of the blocks;
[0173] In this embodiment, when the side length (division step) of the block is recorded and saved at this time, the boundaries and the center points of each block can be quickly located and accessed;
[0174] In this embodiment, in order to accelerate the optimization process, instead of performing a grid search on the entire solution space, the idea of divide and conquer is adopted. First, the entire solution space is reasonably divided into several blocks;
[0175] Step S53, determine the optimal block. Determine the center point of the block that minimizes the J value, and record the block where it is located as the optimal block.
[0176] Specifically, visit each block one by one, but only substitute the center point of the block (n mid ,α mid ) into the objective function given in S51 to calculate the objective function value J(n mid ,α mid ). If J(n mid ,α mid ) is lower than the historical optimal value, then consider the current block as the optimal block and update the historical optimal value. Repeat the calculation, comparison, and update until all blocks have been visited.
[0177] In this embodiment, S53 determines the optimal block through traversal, thus greatly reducing the area for performing the grid search. Therefore, this design improves the optimization efficiency;
[0178] Step S54, local optimization. Only perform a grid search within the obtained optimal block to obtain the final numerical solution (n c * ,α c * );
[0179] Specifically, in this embodiment, the feasible resolution of α c is 1deg, and the feasible resolution of n c is 1rpm (set according to the actual engineering situation); use the above feasible resolutions as the granularity of the grid to ensure that all feasible solutions within the optimal block can be accessed; for each grid point, use the objective function given in S51 to calculate the objective function value J(n c ,α c ); if it is lower than the historical optimal value, then record this grid point as the optimal (n c * ,α c * ) and update the historical optimal value at the same time; until all grid points have been processed, the (n c * ,α c *) is the required manipulation instruction;
[0180] In this embodiment, "local optimization" means performing grid search only within a given optimal block (rather than within the entire solution space); (n c * , α c * ) has an accuracy that can meet the control requirements of actuators in real ships, because the accuracy of the solution does not need to be higher than the feasible resolution;
[0181] As a supplementary explanation of step S5, if the grid search method is directly used and the grid granularity is refined to the same as the feasible resolution, it is of course possible to ensure that the global optimal solution will not be missed. However, when searching the entire solution space of this embodiment, a total of 180 * 100 = 18000 state combinations need to be tried, and the computational cost is obviously too high. And this solution reduces the number of state combinations to be tried to 400 + 18000 / 400 = 445 through divide and conquer, thus greatly reducing the computational cost. S5 calculates the manipulation instruction based on the ship dynamics model from the command force / moment given by the controller. Its importance lies in that the command rotational speed / turning angle is the real manipulation instruction applied to the twin-pod ship.
[0182] Verification of the effectiveness of the solution:
[0183] As a supplementary explanation of this embodiment, a simulation experiment is used to test the berthing trajectory tracking control method for twin-pod ships proposed in this solution.
[0184] Set the simulation conditions as follows: (1) Initial position and heading: The initial position of the ship is x 0 = x S - 12L, y 0 = y S + 7L, and the initial heading is ψ 0 = 0deg. Under this initial condition, according to the relevant berthing agreements, the ship's heading needs to decrease first and then increase, so the berthing reference trajectory is relatively complex and can fully test the effect of the heading controller; (2) Initial speed, rotational speed, turning angle: The initial speed of the ship is u 0 = 2.7 * 0.5144m / s, the initial rotational speed n 0 = 65rpm, and the initial turning angle α 0 = 0deg; (3) Ideal speed: Set the ideal speed as u i = 3 * 0.5144m / s, and u i and u 0 are deliberately distinguished; (4) Disturbance setting: Add disturbances to the position and heading. The standard deviation σ x and σ yis 0.25 m, and the standard deviation σ of the heading disturbance white noise ψ is 0.25 deg; (5) Time and period: The total simulation time t max is set to 600 s; The control period t c = 1 s, and the model self-update period t s = 0.2 s.
[0185] The values of each control parameter are taken as follows: Table 2 shows the tuning results of the trajectory tracking parameters;
[0186] Table 2
[0187]
[0188]
[0189] Result visualization: The test results are as Figure 11 shown. Figure 11 (a) shows the ship motion process (track chart) and the berthing reference trajectory; Print the time history curves of key variables, including Figure 11 (b) the speeds (u and u i ), Figure 11 (c) the headings (ψ, ψ i , ψ d ); The errors of the trajectory tracking control, including Figure 11 (d) the heading error shown, Figure 11 (e) the position error shown; Check whether the actuator state is normal, including Figure 11 (f) the pod rotation angle (distinguishing the command value from the actual value) shown, Figure 11 (g) the rotational speeds of the twin propellers (distinguishing the command value from the actual value) shown. Through comprehensive analysis of each test result, it can be judged that the proposed control method is effective.
[0190] It should be noted that the above specific embodiments can enable those skilled in the art to understand the present invention more comprehensively, but do not limit the present invention in any way. Therefore, although this specification has described the present invention in detail with reference to the drawings and embodiments, those skilled in the art should understand that the present invention can still be modified or equivalently replaced. In short, all technical solutions and their improvements that do not depart from the spirit and scope of the present invention should be covered by the protection scope of the patent of the present invention.
Claims
1. A berthing trajectory tracking control method applied to a double-pod ship, characterized in that: include: Step S1, error calculation and processing: calculate the position error between the ship and the berthing reference trajectory and convert it to the attached coordinate system; Step S2, planning the desired heading and calculating the heading error: using the guidance law combining the virtual ship leadership method and the improved integrated line of sight method, planning the desired heading that makes the lateral position error converge; calculating the heading error based on the desired heading; using the tracking differentiator to smooth the error signal and extract its differential; The virtual ship leadership method obtains the track deviation in the guidance law by constructing a virtual ship for projection conversion; the improved integral sight line method resets the integral term in the guidance law when the real ship is too far away from the track; Step S3, calculating the commanded forward thrust: based on the ship dynamics model, constructing the longitudinal tracking control law, using the algorithm of estimated reference value + feedback correction value, calculating the commanded forward thrust that makes the longitudinal position error converge; Step S4, calculating the commanded turning moment: the heading error described in step S1 is input, a heading control law is constructed based on the PID algorithm, and the commanded turning moment that makes the heading error converge is calculated and limited to a safe range; Step S5, command solution: establish a ship dynamics model, construct a trajectory tracking control law based on the command forward thrust described in step 3 and the command bow torque described in step 4, the trajectory tracking control law controls the bow and longitudinal motion of the ship, and combines the actual ship maneuvering characteristics to establish a constrained optimization problem; perform grid search based on the strategy of divide and conquer and then local optimization, solve the constrained optimization problem, and obtain the optimal maneuvering command, namely the propeller speed and the turning angle.
2. A berthing trajectory tracking control method for a double-pod ship according to claim 1, characterized in that: Step S1 includes: Step S11, calculate the actual position (x, y) and expected position (x i ,y i ) is the error between the two in the earth coordinate system; Define the position error in the earth coordinate system (E X ,E Y )for: Step S12: According to the current ship heading ψ, the position error (E X , E Y ) is converted into the position error in the attached coordinate system, and the expression is: Among them, (e x ,e y ) is the position error in the attached coordinate system, e x is the longitudinal error, e y is the lateral error.
3. A berthing trajectory tracking control method for a double-pod ship according to claim 1, characterized in that: Step S2 includes: Step S21, lateral error conversion: using the position error e y , current heading ψ, heading of reference trajectory ψ i Based on the virtual ship leadership method, the track deviation e is obtained by projecting the position angle relationship between the real ship and the virtual ship. y *; Step S22, forward-looking vector calculation: given three parameters e band ,K l ,K u ; Based on the current track deviation e y * , and obtain the dynamically adjusted forward-looking vector Δ(e y ); Among them, ι∈[0,1]; Δ min =K l L,Δ max =K u L, which requires K u ≥K l >0; Example takes deviation threshold e band =L / 3; the forward-looking vector length Δ>0 and variable; Step S23, integral item update: using Integration algorithm, given the parameter σ, is Calculate the change of the integral term with Δ; Among them, σ>0 is the integral gain, which is the parameter to be adjusted; when the actual ship is too far away from the track The integral term is reset; Step S24, calculation of expected heading: using ψ in the reference trajectory i Based on the calculation, the sight angle θ is corrected to obtain the desired heading ψ d ; Step S25, calculate the current heading error: for heading control, based on the desired heading ψ d , the heading error is defined as e ψ =ψ d -ψ, calculate the current heading error, ψ is the current heading of the ship; Step S26, smooth the error and extract its differential: the longitudinal error e x , heading error e ψ Each of them is processed by the tracking differentiator algorithm to obtain the smoothed error z x ,z ψ , the extracted differential 4. A berthing trajectory tracking control method for a double-pod ship according to claim 1, characterized in that: Step S3 includes: Step S31, calculate the expected speed according to the speed relationship between the two ships in the virtual ship leadership method Among them, u i is the longitudinal velocity of the virtual ship; u d is the expected speed of the actual ship, is the cosine of the angle between the two ships’ headings; Step S32, based on the ship's dynamic model, calculate the expected speed u d Estimated benchmark value for matching Step S33, calculating the feedback correction value X from the smoothed longitudinal position error and its differential value corr ; The calculation formula is: Among them, K Xp ,K Xi ,K Xd ≥0 is the longitudinal PID coefficient to be adjusted; z x is the error used in the longitudinal PID calculation; the error differential is Step S34, using the estimated reference value + feedback correction value, obtain the command forward thrust X c ; Step S35, constructing the safe thrust thresholds of different ships, limiting X c To the safe zone.
5. A berthing trajectory tracking control method for a double-pod ship according to claim 1, characterized in that: Step S4 includes: Step S41, based on the heading error, calculate the commanded turning moment N output by the controller c ; Step S42, setting the safe bow turning moment thresholds for different real ships, based on the ship model limit N c To the safe zone.
6. A berthing trajectory tracking control method for a double-pod ship according to claim 1, characterized in that: Step S5 includes: Step S51, establish an optimization problem: transform the water speed u measured by the sensor and the X calculated by the controller into c ,N c , the given weight parameter λ is substituted into the objective function J; and the solution space range is set, including: the safe and feasible range of the rotation speed n of the actual ship, and the safe and feasible range of the turning angle α; Step S52, block division: n c The search space is divided into 20 blocks at equal intervals, and α c The search space is also divided into 20 blocks at equal intervals, and the side lengths of the blocks are recorded; Step S53, determine the optimal block: determine the block center point that minimizes the J value, and record the block where it is located as the optimal block; Step S54, local optimization: perform grid search only in the optimal block obtained in step S53 to obtain the final numerical solution.
7. A berthing trajectory tracking control method for a double-pod ship according to claim 6, characterized in that: In step S51, the objective function J constructed is: Where: λ∈(0,1) is the weight parameter; J i ∈(-1,+1) is L i ,R i The normalized result of the numerical deviation is the minimum value ε = 2×10 -16 Prevents division by zero; the independent variables of J are u, n c ,α c ,X c ,N c ,λ;t p is the thrust reduction coefficient, ρ is the water density, D P is the propeller diameter, K T0 is the mooring thrust coefficient, K p is the longitudinal hydrodynamic coefficient of the pod, K q is the pod steering hydrodynamic coefficient, l x is the ordinate of the pod rotation axis in the hull coordinate system.
8. A berthing trajectory tracking control method for a double-pod ship according to claim 6, characterized in that: Step S53, the method for determining the optimal block is: Visit each block one by one, but only the center point of the block (n mid ,α mid ) is substituted into the objective function described in S51 to calculate the objective function value J(n) of the center point. mid ,α mid ). If J(n mid ,α mid ) is lower than the historical optimal value, the current block is considered to be the optimal block, the historical optimal value is updated, and the calculation, comparison and update are repeated until all blocks have been visited.
9. A berthing trajectory tracking control method for a double-pod ship according to claim 6, characterized in that: The method for performing grid search in step S54 is to calculate the objective function value J(n c ,α c ); if it is lower than the historical optimal value, then record this grid point as the optimal (n c * ,α c * ), and update the historical optimal value at the same time; until all grid points are processed, the one with the lowest J value (n c * ,α c * ) is the required operation instruction.
Citation Information
Patent Citations
Ship course adaptive control method based on improved particle swarm algorithm
CN117930844A
Automatic guiding method of vessel, automatic guiding program of vessel, automatic guiding system of vessel, and vessel
US20230192262A1