A sea condition adaptive anti-disturbance nonlinear PID ship heading control method and device
Patent Information
- Application Number
- CN202611299274.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-10-09
AI Technical Summary
[0005]本发明公开了一种海况自适应的抗扰非线性PID船舶航向控制方法及装置,旨在解决海况扰动与船舶转艏惯性共同作用时,现有航向控制生成的舵令难以准确匹配船舶实际航向调节需求,导致航向控制稳定性不足的技术问题
1、通过基于船舶转艏动态模型从实测转艏率中分离得到浪致转艏率残差,并依据所述浪致转艏率残差估计波浪遭遇角频率,对航向误差进行针对性陷波处理,同时利用小误差区间内实际舵角的慢统计结果确定配平舵角,能够减弱波浪周期性偏航对航向控制的干扰,并对侧风、横流等持续环境扰动形成稳态补偿,从而提高复杂海况下航向控制的稳定性和抗扰能力。
Smart Images

Figure CN122884030A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ship automatic steering control technology, and in particular to a sea state adaptive disturbance-resistant nonlinear PID ship heading control method and device. Background Technology
[0002] Automatic steering systems typically generate rudder angle commands based on the deviation between the target course and the actual course, and then adjust the ship's course via steering gear. In actual navigation, the measured course and bow turning motion not only include the bow turning motion generated by the rudder angle action, but also the periodic yaw caused by waves and the continuous yaw caused by crosswinds and crosscurrents. At the same time, the bow turning process also has relatively obvious inertia and response lag.
[0003] Existing autopilots using PID control typically generate control inputs based on the current heading error, causing various motion components from different sources to participate in the generation of steering commands. However, periodic yaws caused by waves can lead to reciprocating movements in the steering gear that do not correspond to the ship's actual heading adjustment needs; heading offsets caused by continuous environmental factors usually rely on integral actions for gradual compensation; and during bow turns, the current heading error is difficult to reflect the subsequent trend of the ship's heading. Fixed-parameter control tends to chase wave frequency disturbances, while the steady-state rudder angle required by continuous wind and current can easily result in slow recovery when formed solely by integral actions.
[0004] In view of the above, this application is hereby submitted. Summary of the Invention
[0005] This invention discloses a sea state adaptive disturbance-resistant nonlinear PID ship heading control method and device, which aims to solve the technical problem that the rudder commands generated by existing heading control are difficult to accurately match the actual heading adjustment needs of the ship when sea state disturbances and the ship's turning inertia work together, resulting in insufficient heading control stability.
[0006] The first embodiment of the present invention provides a sea state adaptive disturbance-resistant nonlinear PID ship heading control method, comprising: The target heading, actual heading, measured turning rate, and actual rudder angle are obtained to determine the heading error. Based on the ship's turning dynamic model, the rudder-induced turning rate is predicted according to the historical value of the measured turning rate and the actual rudder angle. The wave-induced turning rate residual is determined according to the measured turning rate and the rudder-induced turning rate. The wave encounter frequency is estimated according to the wave-induced turning rate residual. The heading error is then subjected to a notch filter with the wave encounter frequency as the center to obtain the heading error after the notch filter. When the heading error after the notch meets the small error condition, the actual rudder angle within the statistical window is slowly statistically analyzed to obtain the trim rudder angle, and the wave severity is determined based on the wave-induced bow rate residual. The forward heading is predicted based on the actual heading, measured turning rate, actual rudder angle, and trim rudder angle. The predicted heading error is determined based on the heading error after the notch and the change in the forward heading relative to the actual heading. The nonlinear gain is determined based on the predicted heading error, and the rudder command to be updated is generated by combining PID control and the trim rudder angle. Adjust the action threshold according to the severity of the wave-induced error; when the change of the predicted heading error relative to the last rudder command update exceeds the action threshold, or when the time limit since the last rudder command update is reached, update the actual applied rudder command with the rudder command to be updated, otherwise maintain the actual applied rudder command; control the rudder gear to adjust the ship's rudder angle according to the actual applied rudder command.
[0007] The second embodiment of the present invention provides a sea state adaptive disturbance-resistant nonlinear PID ship heading control device, comprising: The wave-induced yaw processing unit is used to acquire the target heading, actual heading, measured turning rate, and actual rudder angle, and determine the heading error; based on the ship's turning dynamic model, it predicts the rudder-induced turning rate according to the historical value of the measured turning rate and the actual rudder angle; it determines the wave-induced turning rate residual based on the measured turning rate and the rudder-induced turning rate; it estimates the wave encounter angle frequency based on the wave-induced turning rate residual; and it applies a notch filter to the heading error with the wave encounter angle frequency as the center to obtain the notched heading error. The sea state determination unit is used to perform slow statistics on the actual rudder angle within the statistical window when the heading error after the notch meets the small error condition, to obtain the trim rudder angle, and to determine the wave severity based on the wave-induced bow rate residual. The forward control unit is used to predict the forward heading based on the actual heading, measured turning rate, actual rudder angle, and trim rudder angle; determine the predicted heading error based on the heading error after the notch and the change of the forward heading relative to the actual heading; determine the nonlinear gain based on the predicted heading error; and generate the rudder command to be updated by combining PID control and the trim rudder angle. The rudder command update unit is used to adjust the action threshold according to the wave-induced severity; when the change of the predicted heading error relative to the last rudder command update exceeds the action threshold, or when the time limit since the last rudder command update is reached, the rudder command to be updated is updated to actually apply the rudder command; otherwise, the actually applied rudder command is maintained; the rudder gear is controlled to adjust the ship's rudder angle according to the actually applied rudder command.
[0008] Beneficial effects: 1. By separating the wave-induced turning rate residual from the measured turning rate based on the ship's dynamic turning rate model, and estimating the wave encounter angular frequency based on the wave-induced turning rate residual, targeted notch processing is performed on the heading error. At the same time, the trim rudder angle is determined by using the slow statistical results of the actual rudder angle within the small error range. This can reduce the interference of the periodic yaw of waves on the heading control and form steady-state compensation for continuous environmental disturbances such as crosswinds and cross currents, thereby improving the stability and anti-disturbance capability of heading control under complex sea conditions.
[0009] 2. By combining the actual heading, measured turning rate, actual rudder angle, and trim rudder angle to predict the forward heading, and implementing nonlinear PID control based on the predicted heading error, the control process can take into account the ship's turning inertia and subsequent heading change trends. At the same time, the action threshold is adaptively adjusted according to the wave-induced severity, and the actual applied rudder command is updated using an event-triggered method. This can reduce unnecessary rudder actions while ensuring the heading control effect, thereby reducing rudder load and energy consumption. Attached Figure Description
[0010] Figure 1 This is a flowchart illustrating a sea state adaptive disturbance-resistant nonlinear PID ship heading control method provided in the first embodiment of the present invention. Figure 2 This is a block diagram of the system hardware composition provided by the present invention; Figure 3 This is a schematic diagram of the separation of rudder-induced and wave-induced yaw and self-locking notch wave provided by the present invention; Figure 4 This is a schematic diagram of forward heading prediction and event-triggered steering commands provided by the present invention; Figure 5 This is a schematic diagram of a sea state adaptive disturbance-resistant nonlinear PID ship heading control device provided in the second embodiment of the present invention. Detailed Implementation
[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0012] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0013] This invention discloses a sea state adaptive disturbance-resistant nonlinear PID ship heading control method and device, which aims to solve the technical problem that the rudder commands generated by existing heading control are difficult to accurately match the actual heading adjustment needs of the ship when sea state disturbances and the ship's turning inertia work together, resulting in insufficient heading control stability.
[0014] Please combine Figure 1 and Figure 2 The first embodiment of this invention provides a sea state adaptive, disturbance-resistant nonlinear PID ship heading control method. The ship heading control process runs in the microprocessor of the autopilot control system. The microprocessor receives the actual heading and measured turning rate output from the heading and turning rate sensors, the actual rudder angle output from the rudder angle feedback sensor, and the target heading set by the autopilot. It then generates the actual rudder command to be applied according to the following steps to control the rudder motor to adjust the ship's rudder angle. To ensure consistency in the meaning of parameters in each control cycle, the same positive directions for heading angle, turning rate, and rudder angle are used in all the following steps.
[0015] S1. Obtain the target heading, actual heading, measured turning rate, and actual rudder angle to determine the heading error; based on the ship's turning dynamic model, predict the rudder-induced turning rate according to the historical value of the measured turning rate and the actual rudder angle; determine the wave-induced turning rate residual based on the measured turning rate and the rudder-induced turning rate; estimate the wave encounter frequency based on the wave-induced turning rate residual; and apply a notch filter to the heading error with the wave encounter frequency as the center to obtain the heading error after notch filter application. Specifically, in this embodiment, the target heading, actual heading, measured turning rate, and actual rudder angle are obtained, and the heading error is obtained based on the directional difference between the target heading and the actual heading determined according to a preset positive angle. The ship's turning dynamics are approximated using a first-order Nomoto model. When it is necessary to characterize nonlinear turning characteristics, a Norrbin nonlinear term can be included. Its continuous model is as follows:
[0016] in, This indicates the actual heading. This indicates the measured turning rate. This indicates the actual rudder angle. Indicates the rudder effect gain. Represents the time constant. Represents the nonlinear coefficients. and These represent the measured turning rate and the derivative of the actual heading with respect to time, respectively.
[0017] For the separation of rudder-induced bow turn motion in step S1, the discrete form of the first-order Nomoto model is adopted. Based on the measured bow turn rate and actual rudder angle at the previous sampling time, the rudder-induced bow turn rate generated by the rudder angle at the current sampling time is predicted. Its expression is as follows:
[0018] in, This indicates the rudder-induced bow turning rate. This represents the measured turning rate at the previous sampling time. This indicates the actual rudder angle at the previous sampling time. and Represents the coefficients of the discrete model. Indicates the sampling period. This indicates the rudder effect gain. This represents the time constant. After obtaining the rudder-induced bow turn rate, the wave-induced bow turn rate residual is determined based on the difference between the measured bow turn rate at the current sampling time and the rudder-induced bow turn rate. Its expression is:
[0019] in, This indicates the wave-induced turning rate residual. This represents the measured turning rate at the current sampling time. This represents the rudder-induced bow turn rate. Therefore, the rudder-induced bow turn rate is directly used to separate the remaining disturbance component from the measured bow turn rate after deducting the bow turn component corresponding to the rudder angle effect, obtaining the wave-induced bow turn rate residual for subsequent wave encounter angle frequency estimation and wave-induced severity calculation.
[0020] After obtaining the wave-induced turning rate residual through continuous sampling, zero-crossing detection is performed on the wave-induced turning rate residual to determine the time interval between adjacent zero-crossing points. The wave encounter angular frequency is then estimated based on the time interval, expressed as:
[0021] in, This represents the time interval between adjacent zero-crossing points of the wave-induced turning rate residual. This represents the wave encounter angular frequency. To reduce the impact of a single zero-crossing interval fluctuation on the frequency estimation, multiple consecutively obtained adjacent zero-crossing time intervals can be subjected to slow averaging or median averaging, and the wave encounter angular frequency can be determined using the processed time interval.
[0022] After obtaining the wave encounter angular frequency, a second-order notch filter with a center frequency that varies with the wave encounter angular frequency is constructed. The transfer function of the second-order notch filter is:
[0023] in, This represents the transfer function of the second-order notch filter. Denotes the Laplace transform variable. This indicates the angular frequency at which the wave encounters the object. This represents the quality factor of the second-order notch filter. The heading error is input into the second-order notch filter, and the microprocessor performs discrete calculations on the second-order notch relationship according to the sampling period, suppressing the error component centered on the wave encounter angular frequency, and outputting the notch-filtered heading error.
[0024] Please see Figure 3 , Figure 3 The separation process of rudder-induced and wave-induced bow turning motions is illustrated, along with the frequency response relationship of notch wave analysis centered on the wave encounter angular frequency. Among these, Figure 3 (a) shows the relationship between the measured turning rate, the rudder-induced turning rate predicted based on the ship's turning dynamic model, and the wave-induced turning rate residual determined by the two; Figure 3 (b) shows the amplitude-frequency response of a second-order notch filter, whose notch center corresponds to the wave encounter angular frequency estimated based on the wave-induced turning rate residual. As the wave encounter angular frequency changes, the notch center of the second-order notch filter adjusts accordingly, thereby suppressing the wave frequency error component corresponding to the current sea state.
[0025] The heading error after the notch is provided to step S2 to determine the trim rudder angle and to step S3 to determine the predicted heading error; the wave-induced turning rate residual is also provided to step S2 to determine the wave-induced severity. Thus, the heading error after the notch and the wave-induced turning rate residual are respectively entered into the subsequent trim, look-ahead control and sea state assessment processes.
[0026] S2, when the heading error after the notch meets the small error condition, the actual rudder angle in the statistical window is slowly statistically analyzed to obtain the trim rudder angle, and the wave severity is determined according to the wave-induced bow rate residual. Specifically, in this embodiment, the notch-induced heading error and wave-induced turning rate residual output in step S1 are received, and the actual rudder angle at the sampling time corresponding to the notch-induced heading error is obtained. Since the notch-induced heading error has suppressed the error component centered on the current wave encounter angular frequency, it is used as the heading error characterization in subsequent control, and the ship is judged to be in a small error state accordingly. When the absolute value of the notch-induced heading error is less than a preset error threshold, the current sampling time is determined to meet the small error condition, and the actual rudder angle corresponding to the sampling time is included in the statistical window; for sampling times that do not meet the small error condition, the corresponding actual rudder angle is not used for the slow statistics of the current trim rudder angle, so as to reduce the impact of transient rudder angles during obvious turning or heading correction processes on the steady-state rudder angle estimation.
[0027] Within the statistical window, the actual rudder angles that meet the small error condition are processed using the sliding median to obtain the trim rudder angle, the expression of which is:
[0028] in, This indicates the trim rudder angle. This indicates the actual rudder angle. This represents the heading error after notch filtering obtained in step S1. This represents the error threshold used to define the small error condition. This refers to the statistical window. This indicates that the sliding median is processed within the statistical window. As new actual rudder angle sampling values enter the statistical window, the statistical window is updated and the sliding median is recalculated, so that the trim rudder angle changes according to a timescale slower than that of transient heading control. The trim rudder angle is used to characterize the steady-state rudder angle requirement maintained by the ship to compensate for continuous wind and current effects when the heading is basically stable, and is provided to step S3, on the one hand participating in the forward turning state prediction, and on the other hand participating as a feedforward quantity in the generation of the rudder command to be updated.
[0029] Simultaneously, the wave-induced severity is determined based on the wave-induced turn rate residual output in step S1. Specifically, the wave-induced turn rate residual is continuously acquired within a preset time window, the variance of the wave-induced turn rate residual within the preset time window is calculated, and the variance is normalized according to a preset normalization rule to obtain the wave-induced severity. The larger the variance of the wave-induced turn rate residual, the higher the corresponding wave-induced severity; the smaller the variance of the wave-induced turn rate residual, the lower the corresponding wave-induced severity. The normalization process is performed according to the system's preset normalization rule, converting the variances obtained from different time windows into wave-induced severity at a uniform scale. Thus, step S2 generates two outputs: the trim rudder angle and the wave-induced severity. The trim rudder angle is provided to step S3, and the wave-induced severity is provided to step S4, thereby participating in look-ahead control and event-triggered rudder command updates, respectively.
[0030] S3, predict the look-ahead heading based on the actual heading, measured turning rate, actual rudder angle, and trim rudder angle; determine the predicted heading error based on the heading error after the notch and the change in the look-ahead heading relative to the actual heading; determine the nonlinear gain based on the predicted heading error; and generate the rudder command to be updated by combining PID control and the trim rudder angle. Specifically, in this embodiment, the notch-filtered heading error obtained in step S1 and the trim rudder angle obtained in step S2 are received, and the actual heading, measured turning rate, and actual rudder angle at the current sampling time are obtained. To ensure that heading control takes into account the inertia and response lag of the ship's turning motion, the turning state after the look-ahead time is first predicted based on the measured turning rate, actual rudder angle, and trim rudder angle. For this look-ahead prediction process, a first-order Nomoto expression containing Norrbin nonlinear terms is used. The look-ahead turning rate is determined based on the current measured turning rate, actual rudder angle, and trim rudder angle, and its expression is:
[0031] in, This indicates the forward turn rate. This represents the measured turning rate at the current sampling time. This indicates the actual rudder angle at the current sampling time. This refers to the trim rudder angle obtained in step S2. Indicates the rudder effect gain. Represents the time constant. Represents the nonlinear coefficients. The difference between the actual rudder angle and the trim rudder angle is used to characterize the rudder angle effect that participates in the transient yaw prediction after deducting the steady-state trim amount corresponding to the continuous environmental effects, so that the trim rudder angle obtained in step S2 can be directly entered into the look-ahead prediction process.
[0032] After obtaining the forward turn rate, the forward heading is determined based on the current actual heading and the heading changes corresponding to the current measured turn rate and the forward turn rate within the forward time period. Its expression is as follows:
[0033] in, Indicates the forward heading. This indicates the actual heading at the current sampling time. This indicates the measured turning rate. This indicates the forward turn rate. The look-ahead time is represented by the average of the current measured turn rate and the look-ahead turn rate. The average turn rate within the look-ahead time is then represented by the average of the current measured turn rate and the look-ahead turn rate, thus obtaining the heading change from the current time to the look-ahead time. Further, the predicted heading error is determined based on the notch-filtered heading error obtained in step S1 and the heading change, and its expression is:
[0034] in, This indicates the predicted heading error. This represents the heading error after the notch. Therefore, by using a consistent heading angle and positive turning rate throughout the entire control process, the heading change can be corrected according to the same sign convention to obtain the predicted heading error corresponding to the look-ahead time. This predicted heading error is used for subsequent nonlinear PID control and also provides the basis for event triggering judgment in step S4.
[0035] After obtaining the predicted heading error, the nonlinear gain factor is determined based on its magnitude, and its expression is as follows:
[0036] in, This represents the nonlinear gain factor. This represents the gain coefficient in the small error range. This represents the gain coefficient in the large error range. This indicates the predicted heading error. This represents the gain transition scale. When the predicted heading error is small, the nonlinear gain factor approaches the gain coefficient of the small error segment; as the amplitude of the predicted heading error increases, the nonlinear gain factor gradually changes towards the gain coefficient of the large error segment, so that the predicted heading error of different amplitudes can obtain corresponding control effects.
[0037] After determining the nonlinear gain factor, proportional control is performed based on the nonlinear gain factor and the predicted heading error. The differential action is applied to the measured turning rate, and the trim rudder angle is superimposed to obtain the unlimited rudder command, the expression of which is:
[0038] in, This indicates that the rudder command was not limited. Indicates proportional gain. Indicates integral gain. Represents differential gain. This represents the nonlinear gain factor. This indicates the predicted heading error. Represents the integral term. This indicates the measured turning rate. The term "trimmed rudder angle" refers to the rudder angle required for steady-state operation under continuous environmental influence. The integral term is used to correct for small residuals remaining after trimming, and the measured turning rate is used to generate differential action, thereby enabling steady-state trimming and transient control to act on their respective time scales.
[0039] Considering the permissible rudder angle amplitude and rate of change of the rudder angle, the unlimited rudder command is sequentially limited in both amplitude and rate of change, and the processed rudder command is used as the rudder command to be updated. Simultaneously, based on the difference between the rudder command to be updated and the unlimited rudder command, the integral term is back-calculated to prevent integral saturation, thereby reducing control lag caused by continuous accumulation of integrals during the rudder command restriction period. The integral term is accumulated according to the sampling period with the predicted heading error, and back-calculated and corrected based on the difference when the rudder command is subject to amplitude or rate of change restrictions. The rudder command to be updated is denoted as... The actual rudder angle is denoted as The rudder command to be updated. and predicted heading error All are provided to step S4, where step S4 further determines whether to convert the rudder command to be updated into an actual rudder command to be applied.
[0040] S4, adjust the action threshold according to the severity of the wave-induced error; when the change of the predicted heading error relative to the last rudder command update exceeds the action threshold, or when the time limit since the last rudder command update is reached, update the actual applied rudder command with the rudder command to be updated, otherwise maintain the actual applied rudder command; control the rudder gear to adjust the ship's rudder angle according to the actual applied rudder command.
[0041] Specifically, in this embodiment, the wave-induced severity obtained in step S2 is received, along with the predicted heading error and the rudder command to be updated obtained in step S3. The wave-induced severity characterizes the current wave disturbance level, the predicted heading error characterizes the heading control deviation after considering the ship's forward turning trend, and the rudder command to be updated is a candidate control command that has undergone nonlinear PID control and constraint processing of rudder angle amplitude and rate of change. Step S4 does not directly apply the new rudder command to be updated to the steering gear in every control cycle, but instead determines whether to update the actually applied rudder command based on the current sea state and the change in the predicted heading error.
[0042] Please see Figure 4 , Figure 4 This illustrates the process of forward heading prediction and event-triggered rudder command update. Among other things, Figure 4 (a) illustrates the process of predicting the forward heading based on the current actual heading and the ship's turning position, and determining the predicted heading error based on the heading change corresponding to the forward heading; Figure 4 (b) illustrates the relationship between the rudder command to be updated and the actual rudder command applied, wherein the rudder command to be updated is continuously generated with each control cycle, while the actual rudder command applied is updated only when the rudder command update condition is met, and remains unchanged when the rudder command update condition is not met. Specifically, a baseline action threshold is determined based on a preset steering mode, and the baseline action threshold is adjusted according to the wave-induced severity to obtain the action threshold corresponding to the current control cycle, the expression of which is:
[0043] in, This represents the action threshold. This represents the reference action threshold corresponding to the preset steering mode. Indicates the sea state coefficient. This represents the wave-induced severity obtained in step S2. Different preset steering modes correspond to pre-configured baseline action thresholds; after the baseline action threshold is determined, as the wave-induced severity increases, the action threshold increases accordingly, thereby reducing the frequency of actual steering command updates triggered by small predicted heading error fluctuations.
[0044] In each control cycle, the current predicted heading error is compared with the predicted heading error recorded during the last actual rudder command update. Let the current predicted heading error be denoted as... Record the predicted heading error at the time of the last rudder command update as When the following equation is satisfied, it is determined that the change in the predicted heading error has reached the action trigger condition:
[0045] in, The predicted heading error represents the current control cycle. This indicates the predicted heading error recorded at the time of the last rudder command update. This indicates the action threshold. In addition to the action triggering conditions, the time elapsed since the last rudder command update is also recorded and compared with a set time limit. Comparison. When the change in the predicted heading error reaches the action trigger condition, or when the set time limit has elapsed since the last rudder command update. When the time comes, a rudder command update is triggered. The rudder command to be updated obtained in step S3 is taken as the new actual rudder command, and the current predicted heading error is recorded as the predicted heading error at the time of the last rudder command update, that is:
[0046] in, This indicates the actual application of the steering command. This refers to the rudder command to be updated obtained in step S3. This indicates the predicted heading error recorded at the time of the last rudder command update. This indicates the current predicted heading error. This indicates the set time limit. After the update is completed, the time elapsed since the last rudder command update is recalculated, ensuring that the set time limit is always compared to the most recent actual rudder command update.
[0047] When the change in the predicted heading error does not meet the trigger condition and the time since the last rudder command update has not reached the set time limit, the actual applied rudder command is not changed using the rudder command to be updated generated in the current control cycle, but the actual applied rudder command already applied to the servo in the previous control cycle is maintained. Therefore, step S3 can continuously calculate the predicted heading error and the rudder command to be updated according to the control cycle, and only when the corresponding trigger condition is met in step S4 is the rudder command to be updated converted into an actual applied rudder command.
[0048] After the actual rudder command is updated, it is sent to the rudder motor, which adjusts the ship's rudder angle accordingly. The adjusted actual rudder angle is reacquired by the rudder angle feedback sensor and used as input for the next control cycle step S1 for rudder-induced turn rate prediction and step S3 for look-ahead turn state prediction. The heading and turn rate sensors synchronously acquire the adjusted actual heading and measured turn rate, which are also used as input for the next control cycle. Thus, steps S1 to S4 form a closed-loop heading control process from ship status acquisition, wave-induced disturbance separation, trim and sea state determination, look-ahead nonlinear PID control, event-triggered rudder command update to rudder motor execution and status feedback.
[0049] Please see Figure 5 The second embodiment of the present invention provides a sea state adaptive disturbance-resistant nonlinear PID ship heading control device, comprising: The wave-induced yaw processing unit 201 is used to acquire the target heading, actual heading, measured turning rate, and actual rudder angle, and determine the heading error; based on the ship's turning dynamic model, it predicts the rudder-induced turning rate according to the historical value of the measured turning rate and the actual rudder angle; it determines the wave-induced turning rate residual based on the measured turning rate and the rudder-induced turning rate; it estimates the wave encounter angle frequency based on the wave-induced turning rate residual; and it applies a notch filter to the heading error with the wave encounter angle frequency as the center to obtain the notched heading error. The sea state determination unit 202 is used to perform slow statistics on the actual rudder angle within the statistical window when the heading error after the notch meets the small error condition, to obtain the trim rudder angle, and to determine the wave severity based on the wave-induced bow rate residual. The forward control unit 203 is used to predict the forward heading based on the actual heading, measured turning rate, actual rudder angle and trim rudder angle; determine the predicted heading error based on the heading error after the notch and the change of the forward heading relative to the actual heading; determine the nonlinear gain based on the predicted heading error; and generate the rudder command to be updated by combining PID control and the trim rudder angle. The rudder command update unit 204 is used to adjust the action threshold according to the wave-induced severity; when the change of the predicted heading error relative to the last rudder command update exceeds the action threshold, or when the time limit since the last rudder command update is reached, the rudder command to be updated is updated to actually apply the rudder command; otherwise, the actually applied rudder command is maintained; the rudder gear is controlled to adjust the ship's rudder angle according to the actually applied rudder command.
[0050] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A sea state adaptive disturbance-resistant nonlinear PID ship heading control method, characterized in that, include: The target heading, actual heading, measured turning rate, and actual rudder angle are obtained to determine the heading error. Based on the ship's turning dynamic model, the rudder-induced turning rate is predicted according to the historical value of the measured turning rate and the actual rudder angle. The wave-induced turning rate residual is determined according to the measured turning rate and the rudder-induced turning rate. The wave encounter frequency is estimated according to the wave-induced turning rate residual. The heading error is then subjected to a notch filter with the wave encounter frequency as the center to obtain the heading error after the notch filter. When the heading error after the notch meets the small error condition, the actual rudder angle within the statistical window is slowly statistically analyzed to obtain the trim rudder angle, and the wave severity is determined based on the wave-induced bow rate residual. The forward heading is predicted based on the actual heading, measured turning rate, actual rudder angle, and trim rudder angle. The predicted heading error is determined based on the heading error after the notch and the change in the forward heading relative to the actual heading. The nonlinear gain is determined based on the predicted heading error, and the rudder command to be updated is generated by combining PID control and the trim rudder angle. The action threshold is adjusted according to the severity of the wave-induced error; when the change of the predicted heading error relative to the last rudder command update exceeds the action threshold, or when the time limit since the last rudder command update is reached, the actual applied rudder command is updated with the rudder command to be updated; otherwise, the actual applied rudder command is maintained. The ship's rudder angle is adjusted by controlling the steering gear according to the actual rudder command applied.
2. The sea state adaptive disturbance-resistant nonlinear PID ship heading control method according to claim 1, characterized in that, The dynamic model for the ship's bow turning adopts a first-order Nomoto model containing Norrbin nonlinear terms, and its expression is as follows: in, This indicates the actual heading. This indicates the measured turning rate. This indicates the actual rudder angle. Indicates the rudder effect gain. Represents the time constant. The symbol represents the nonlinear coefficient, and the dot above the symbol indicates the derivative with respect to time.
3. The sea state adaptive disturbance-resistant nonlinear PID ship heading control method according to claim 1, characterized in that, The method based on the ship's dynamic turning model, predicts the rudder-induced turning rate based on the historical value of the measured turning rate and the actual rudder angle, and determines the wave-induced turning rate residual based on the measured turning rate and the rudder-induced turning rate, specifically: The rudder-induced turn rate at the current sampling time is predicted based on the measured turn rate and actual rudder angle at the previous sampling time. The wave-induced turn rate residual is determined based on the difference between the measured turn rate at the current sampling time and the rudder-induced turn rate, expressed as follows: The wave encounter angular frequency is determined based on the time interval between adjacent zero-crossing points of the wave-induced turning rate residual, and its expression is as follows: in, This indicates the rudder-induced bow turning rate. and These represent the measured turning rates at the current sampling time and the previous sampling time, respectively. This indicates the actual rudder angle at the previous sampling time. and Represents the coefficients of the discrete model. Indicates the sampling period. Indicates the rudder effect gain. Represents the time constant. This indicates the wave-induced turning rate residual. This represents the time interval between adjacent zero-crossing points of the wave-induced turning rate residual. This indicates the angular frequency at which the wave encounters the angular frequency.
4. The sea state adaptive disturbance-resistant nonlinear PID ship heading control method according to claim 1, characterized in that, The notch filtering of the heading error centered on the wave encounter angular frequency is specifically as follows: A second-order notch filter with the wave encounter angular frequency as its center frequency is constructed, and the heading error is input into the second-order notch filter to obtain the heading error after notching; the transfer function of the second-order notch filter is: in, This represents the transfer function of a second-order notch filter. Denotes the Laplace transform variable. Indicates the angular frequency at which the wave encounters. This represents the quality factor of the second-order notch filter.
5. The sea state adaptive disturbance-resistant nonlinear PID ship heading control method according to claim 1, characterized in that, When the heading error after the notch meets the small error condition, the actual rudder angle within the statistical window is slowly statistically analyzed to obtain the trim rudder angle, specifically as follows: When the absolute value of the heading error after the notch is less than the error threshold, the sliding median of the corresponding actual rudder angle within the statistical window is taken, and the expression for the trim rudder angle is: in, This indicates the trim rudder angle. This indicates the actual rudder angle. This indicates the heading error after the notch filter is applied. This represents the error threshold. This refers to the statistical window. This indicates that the sliding median processing is performed within the statistical window.
6. The sea state adaptive disturbance-resistant nonlinear PID ship heading control method according to claim 2, characterized in that, The method of predicting the look-ahead heading based on the actual heading, measured turning rate, actual rudder angle, and trim rudder angle, and determining the predicted heading error based on the heading error after the notch and the change in the look-ahead heading relative to the actual heading, specifically involves: The forward turning rate is determined based on the measured turning rate, actual rudder angle, and trim rudder angle, and its expression is as follows: The forward heading is determined based on the actual heading and the forward turning rate, and its expression is: The predicted heading error is determined based on the notch error and the change in the look-ahead heading relative to the actual heading, and its expression is as follows: in, This indicates the forward turn rate. This indicates the measured turning rate. This indicates the actual rudder angle. This indicates the trim rudder angle. Indicates the rudder effect gain. Represents the time constant. Represents the nonlinear coefficients. Indicates a forward-looking time period. This indicates the actual heading. Indicates the forward heading. This indicates the heading error after the notch filter is applied. This indicates the predicted heading error.
7. The sea state adaptive disturbance-resistant nonlinear PID ship heading control method according to claim 6, characterized in that, The step of determining the nonlinear gain based on the predicted heading error, and generating the updated rudder command in conjunction with PID control and the trim rudder angle, specifically involves: The nonlinear gain factor is determined based on the magnitude of the predicted heading error, and the expression for the nonlinear gain factor is as follows: The predicted heading error is proportionally controlled based on the nonlinear gain factor, the differential action is applied to the measured turning rate, and the trim rudder angle is superimposed to obtain the unlimited rudder command. The expression for the unlimited rudder command is: in, This represents the nonlinear gain factor. This represents the gain coefficient in the small error range. This represents the gain coefficient in the large error range. This indicates the predicted heading error. Indicates the gain transition scale. This indicates that the rudder command was not limited. , and These represent proportional gain, integral gain, and derivative gain, respectively. Represents the integral term. This indicates the measured turning rate. This indicates the trim rudder angle.
8. The sea state adaptive disturbance-resistant nonlinear PID ship heading control method according to claim 7, characterized in that, Also includes: The rudder angle amplitude and rudder angle change rate are limited on the unlimited rudder command to obtain the rudder command to be updated, and the integral term is back-calculated to prevent integral saturation based on the difference between the rudder command to be updated and the unlimited rudder command.
9. The sea state adaptive disturbance-resistant nonlinear PID ship heading control method according to claim 7, characterized in that, The step of adjusting the action threshold according to the wave-induced severity specifically involves: determining a baseline action threshold based on a preset steering mode, and adjusting the baseline action threshold according to the wave-induced severity. The expression for the action threshold is: When satisfied Or the set time limit has been reached since the last command update. If the actual rudder command is updated with the rudder command to be updated, the current predicted heading error is recorded as the predicted heading error at the time of the last rudder command update; otherwise, the actual rudder command is maintained. in, This represents the action threshold. This represents the reference action threshold corresponding to the preset steering mode. Indicates the sea state coefficient. This indicates the severity of the wave-induced damage. This indicates the current predicted heading error. This indicates the predicted heading error at the time of the last rudder command update.
10. A sea state adaptive, disturbance-resistant nonlinear PID ship heading control device, characterized in that, include: The wave-induced yaw processing unit is used to acquire the target heading, actual heading, measured turning rate, and actual rudder angle, and determine the heading error; based on the ship's turning dynamic model, it predicts the rudder-induced turning rate according to the historical value of the measured turning rate and the actual rudder angle; it determines the wave-induced turning rate residual based on the measured turning rate and the rudder-induced turning rate; it estimates the wave encounter angle frequency based on the wave-induced turning rate residual; and it applies a notch filter to the heading error with the wave encounter angle frequency as the center to obtain the notched heading error. The sea state determination unit is used to perform slow statistics on the actual rudder angle within the statistical window when the heading error after the notch meets the small error condition, to obtain the trim rudder angle, and to determine the wave severity based on the wave-induced bow rate residual. The forward control unit is used to predict the forward heading based on the actual heading, measured turning rate, actual rudder angle, and trim rudder angle; determine the predicted heading error based on the heading error after the notch and the change of the forward heading relative to the actual heading; determine the nonlinear gain based on the predicted heading error; and generate the rudder command to be updated by combining PID control and the trim rudder angle. The rudder command update unit is used to adjust the action threshold according to the wave-induced severity. When the change of the predicted heading error relative to the last rudder command update exceeds the action threshold, or when the time limit since the last rudder command update is reached, the rudder command to be updated is updated to actually apply the rudder command; otherwise, the actually applied rudder command is maintained. The ship's rudder angle is adjusted by controlling the steering gear according to the actual rudder command applied.