Ship autopilot control method based on PID parameter real-time adjustment
Through the ship automatic rudder control method based on real-time adjustment of PID parameters, the traditional automatic rudder system has solved the problems of low control accuracy, slow response speed and poor system stability when facing complex sea conditions, and achieved higher navigation safety and efficiency .
Patent Information
- Application Number
- CN202411755709.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When facing complex and changing sea breezes, waves and currents, the control accuracy is not high, the response speed is slow, the system is poor, and it is prone to out of control or unstable conditions.
The ship's automatic rudder control method based on real-time adjustment of PID parameters is adopted to adjust the PID control parameters to ensure the stable navigation of the ship by detecting and responding to changes in external interference factors such as sea breeze, waves and currents in real time.
It has achieved rapid response to interference factors such as sea breeze, waves and currents, improved the navigation safety and navigation efficiency of ships, reduced energy consumption, and improved the reliability and stability of the automation system.
Smart Images

Figure CN119472249A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned ships, and in particular to a ship automatic rudder control method based on real-time adjustment of PID parameters. Background Art
[0002] In the field of ship navigation control, the autopilot technology has experienced a development process from simple to complex, from single to multiple. In the early days, the autopilot was mainly used to keep the ship's heading stable. With the continuous advancement of technology, the autopilot system has gradually acquired multiple functions such as heading keeping, heading change, and track keeping. Especially after entering the 21st century, with the development of electronics and servo mechanism theory, as well as the application of adaptive theory and computer technology, ship autopilot technology has developed rapidly and formed a variety of advanced control methods.
[0003] Sea breeze, waves and currents are important factors that affect ship navigation. Among them, sea breeze affects the ship's course and speed by changing the force applied to the ship; waves may cause the ship to shake and bump, increasing the instability of navigation; and currents will have a direct impact on the ship's navigation trajectory. The existence of these interfering factors requires ships to constantly adjust their course and speed during navigation to ensure navigation safety and efficiency.
[0004] Although the traditional autopilot system can realize automatic control of ships to a certain extent, its control effect is often unsatisfactory when facing complex and changeable interference factors such as sea wind, waves and currents. This is mainly manifested in the following aspects: first, the control accuracy is not high, which is difficult to meet the needs of high-precision navigation; second, the response speed is slow and cannot respond to changes in external interference in time; third, the system stability is poor, and it is easy to lose control or become unstable. Summary of the invention
[0005] To solve the above problems, the present invention proposes a ship autopilot control method based on real-time adjustment of PID parameters. In view of the problem that natural factors such as sea wind, waves and currents cause ships to deviate from the scheduled route and increase the risk of collision, the present invention adjusts the PID control parameters in real time, so that the autopilot system can respond to these interferences more quickly and correct the heading and speed in time, thereby improving the navigation safety of the ship. The specific steps are as follows, which are characterized by:
[0006] Step 1, establish the hull coordinate system and the navigation coordinate system: set the origin of the hull coordinate system to the bow, and determine the long axis, horizontal axis and vertical axis respectively, and set the origin of the navigation coordinate system to the starting point of the unmanned ship's navigation;
[0007] Step 2, establishing a mathematical model of the unmanned ship's plane motion: Substitute the ship's forward movement, sideways movement, and yaw into the unmanned ship's plane motion model to establish a mathematical model of the unmanned ship's plane motion;
[0008] Step 3, adding sea breeze, waves and current interference into the mathematical model of the unmanned ship's plane motion;
[0009] Step 4: Establish a control model of the unmanned ship PID based on the unmanned ship planar motion model.
[0010] Furthermore, the process of establishing the hull coordinate system in step 1 can be expressed as:
[0011] Set the origin of the hull coordinate system to the bow, and then determine the major axis, horizontal axis and vertical axis; the major axis is the x-axis parallel to the centerline of the ship, pointing to the bow direction, the horizontal axis is the y-axis perpendicular to the centerline of the ship, pointing to the starboard side of the ship; the vertical axis is the z-axis perpendicular to the centerline of the ship, pointing to the positive direction of the ship; the origin of the navigation coordinate system is set to the starting point of the unmanned ship's navigation, the x-axis points to the east, the y-axis points to the north, and the z-axis points to the sky.
[0012] Furthermore, the process of establishing the mathematical model of the unmanned ship planar motion in step 2 can be expressed as follows:
[0013] The motion of the unmanned ship on the horizontal plane can be simplified into a three-degree-of-freedom model, namely: forward direction, lateral displacement direction, and yaw angle. The motion equation can be expressed as:
[0014] m*(u'-vr)=X u +Y v +N r
[0015] m*v'+mu*r=X u +Y v +N r
[0016] l z *r'=X u +Y v +N r
[0017] Where m is the mass of the unmanned ship, u' is the derivative of the forward velocity, v is the lateral velocity, r is the yaw angular velocity, and X u , Y v 、N r They are the longitudinal force, transverse force, and bow moment of the hydrodynamic force and moment acting on the unmanned ship, which are estimated based on the actual conditions such as the shape, size, mass distribution, and propeller type of the unmanned ship. v' is the derivative of the lateral velocity, u is the forward velocity, and l z is the moment of inertia of the unmanned ship around the vertical axis, and r' is the derivative of the yaw angular velocity.
[0018] Furthermore, the process of adding sea breeze, waves and current interference to the mathematical model of the unmanned ship's plane motion in step 3 can be expressed as follows:
[0019] X u =X H +X wind +X current +X wave
[0020] Y v =Y H +Y wind +Y current +Y wave
[0021] N r =N H +N wind +N current +N wave
[0022] Where, X H , Y H 、N H are the longitudinal force, transverse force and yaw moment generated by the propeller, X wind , Y wind 、N wind are the longitudinal force, transverse force and yaw moment caused by sea breeze disturbance, X current , Y current 、N current are the longitudinal force, transverse force and yaw moment caused by the current disturbance, X wave , Y wave 、N wave They are respectively the longitudinal force, transverse force and yaw moment generated by wave interference.
[0023] Furthermore, the process of establishing the control model of the unmanned ship PID according to the unmanned ship planar motion model in step 4 can be expressed as follows:
[0024] According to the derivation of step 2, the planar motion model parameters of the unmanned ship can be established by detecting the position, speed, heading, and attitude of the unmanned ship, detecting the wind speed, wind direction, wave parameters, and current parameters in the environmental parameters, and detecting the propeller speed and rudder angle of the unmanned ship. Therefore, the control parameters in the control system of the unmanned ship can be simplified to the forward speed u of the unmanned ship and the steering angle R of the rudder.
[0025] The PID control algorithm for the forward speed u can be described as:
[0026] O u =k p1 e u (k)+k i1 ∫e u (k)+k d1 (e u (k)-e u (k-1))
[0027] In the formula, O u is the PID controller output of the forward speed u, k p1 , k i1 , k d1 are the proportional parameter, integral parameter, and differential parameter of the PID controller for the forward speed u, e u (k) is the error between the forward speed command value and the feedback value at time k, e u (k-1) is the error between the forward speed command value and the feedback value at time k-1;
[0028] The PID control algorithm of the steering angle R of the servo can be described as:
[0029] O R =k p2 e R (k)+k i2 ∫e R (k)+k d2 (e R (k)-e R (k-1))
[0030] In the formula, O R is the PID controller output of the steering gear steering angle R, k p2 , k i2 , k d2 are the proportional parameter, integral parameter, and differential parameter of the PID controller of the steering gear steering angle R, e R (k) is the error between the steering angle command value and the feedback value at time k, e R (k-1) is the error between the steering angle command value and the feedback value at time k-1.
[0031] The present invention provides a ship automatic steering control method based on real-time adjustment of PID parameters, and the beneficial effects are as follows:
[0032] 1. The present invention can detect and respond to changes in external interference factors such as sea wind, waves and currents in real time, and ensure stable navigation of the ship through real-time adjustment of PID parameters;
[0033] 2. The present invention can reduce unnecessary course corrections and speed adjustments, thereby reducing energy consumption and improving navigation efficiency;
[0034] 3. The present invention not only reduces the workload of the crew, but also improves the reliability and stability of the entire ship automation system;
[0035] 4. The present invention enables the autopilot system to have stronger robustness and stability when facing complex and changeable sea conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a flow chart of the present invention; DETAILED DESCRIPTION
[0037] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments:
[0038] The present invention proposes a ship autopilot control method based on real-time adjustment of PID parameters. The invention flow chart is as follows: Figure 1 As shown, the following structure and flow chart describe the steps of the present invention in detail.
[0039] Step 1, establish the hull coordinate system and the navigation coordinate system: set the origin of the hull coordinate system to the bow, and determine the long axis, horizontal axis and vertical axis respectively, and set the origin of the navigation coordinate system to the starting point of the unmanned ship's navigation;
[0040] Set the origin of the hull coordinate system to the bow, and then determine the major axis, horizontal axis and vertical axis; the major axis is the x-axis parallel to the centerline of the ship, pointing to the bow direction, the horizontal axis is the y-axis perpendicular to the centerline of the ship, pointing to the starboard side of the ship; the vertical axis is the z-axis perpendicular to the centerline of the ship, pointing to the positive direction of the ship; the origin of the navigation coordinate system is set to the starting point of the unmanned ship's navigation, the x-axis points to the east, the y-axis points to the north, and the z-axis points to the sky.
[0041] Step 2, establishing a mathematical model of the unmanned ship's plane motion: Substitute the ship's forward movement, sideways movement, and yaw into the unmanned ship's plane motion model to establish a mathematical model of the unmanned ship's plane motion;
[0042] The motion of the unmanned ship on the horizontal plane can be simplified into a three-degree-of-freedom model, namely: forward direction, lateral displacement direction, and yaw angle. The motion equation can be expressed as:
[0043] m*(u'-vr)=X u +Y v +N r
[0044] m*v'+mu*r=X u +Y v +N r
[0045] l z *r'=X u +Y v +N r
[0046] Where m is the mass of the unmanned ship, u' is the derivative of the forward velocity, v is the lateral velocity, r is the yaw angular velocity, and X u , Y v 、N rThey are the longitudinal force, transverse force, and bow moment of the hydrodynamic force and moment acting on the unmanned ship, which are estimated based on the actual conditions such as the shape, size, mass distribution, and propeller type of the unmanned ship. v' is the derivative of the lateral velocity, u is the forward velocity, and l z is the moment of inertia of the unmanned ship around the vertical axis, and r' is the derivative of the yaw angular velocity.
[0047] Step 3, adding sea breeze, waves and current interference into the mathematical model of the unmanned ship's plane motion;
[0048] The process of adding sea breeze, waves and current interference to the mathematical model of unmanned ship planar motion can be expressed as follows:
[0049] X u =X H +X wind +X current +X wave
[0050] Y v =Y H +Y wind +Y current +Y wave
[0051] N r =N H +N wind +N current +N wave
[0052] Where, X H , Y H 、N H are the longitudinal force, transverse force and yaw moment generated by the propeller, X wind , Y wind 、N wind are the longitudinal force, transverse force and yaw moment caused by sea breeze disturbance, X current , Y current 、N current are the longitudinal force, transverse force and yaw moment caused by the current disturbance, X wave , Y wave 、N wave They are respectively the longitudinal force, transverse force and yaw moment generated by wave interference.
[0053] Step 4: Establish a control model of the unmanned ship PID based on the unmanned ship planar motion model.
[0054] According to the derivation of step 2, the planar motion model parameters of the unmanned ship can be established by detecting the position, speed, heading, and attitude of the unmanned ship, detecting the wind speed, wind direction, wave parameters, and current parameters in the environmental parameters, and detecting the propeller speed and rudder angle of the unmanned ship. Therefore, the control parameters in the control system of the unmanned ship can be simplified to the forward speed u of the unmanned ship and the steering angle R of the rudder.
[0055] The PID control algorithm for the forward speed u can be described as:
[0056] O u =k p1 e u (k)+k i1 ∫e u (k)+k d1 (e u (k)-e u (k-1))
[0057] In the formula, O u is the PID controller output of the forward speed u, k p1 , k i1 , k d1 are the proportional parameter, integral parameter, and differential parameter of the PID controller for the forward speed u, e u (k) is the error between the forward speed command value and the feedback value at time k, e u (k-1) is the error between the forward speed command value and the feedback value at time k-1;
[0058] The PID control algorithm of the steering angle R of the servo can be described as:
[0059] O R =k p2 e R (k)+k i2 ∫e R (k)+k d2 (e R (k)-e R (k-1))
[0060] In the formula, O R is the PID controller output of the steering gear steering angle R, k p2 , k i2 , k d2 are the proportional parameter, integral parameter, and differential parameter of the PID controller of the steering gear steering angle R, e R (k) is the error between the steering angle command value and the feedback value at time k, e R (k-1) is the error between the steering angle command value and the feedback value at time k-1.
[0061] The above description is only a preferred embodiment of the present invention and does not constitute any other form of limitation to the present invention. Any modification or equivalent change made based on the technical essence of the present invention still falls within the scope of protection required by the present invention.
Claims
1. A ship autopilot control method based on real-time adjustment of PID parameters, the specific steps are as follows, characterized in that: Step 1: Establish the hull coordinate system and navigation coordinate system: The origin of the hull coordinate system is set to the bow, and the long axis, horizontal axis and vertical axis are determined respectively. The origin of the navigation coordinate system is set to the starting point of the unmanned ship's navigation; Step 2: Establish the mathematical model of the unmanned ship's planar motion: Substitute the forward movement, sideways displacement and yaw of the ship into the unmanned ship planar motion model to establish the unmanned ship planar motion mathematical model; Step 3, adding sea breeze, waves and current interference into the mathematical model of the unmanned ship's plane motion; Step 4: Establish a control model of the unmanned ship PID based on the unmanned ship planar motion model.
2. A ship automatic pilot control method based on real-time adjustment of PID parameters according to claim 1, characterized in that: The process of establishing the hull coordinate system in step 1 is expressed as: Set the origin of the hull coordinate system to the bow, and then determine the major axis, horizontal axis and vertical axis; the major axis is the x-axis parallel to the centerline of the ship, pointing to the bow direction, the horizontal axis is the y-axis perpendicular to the centerline of the ship, pointing to the starboard side of the ship; the vertical axis is the z-axis perpendicular to the centerline of the ship, pointing to the positive direction of the ship; the origin of the navigation coordinate system is set to the starting point of the unmanned ship's navigation, the x-axis points to the east, the y-axis points to the north, and the z-axis points to the sky.
3. A ship automatic pilot control method based on real-time adjustment of PID parameters according to claim 1, characterized in that: The process of establishing the mathematical model of the unmanned ship's planar motion in step 2 is expressed as follows: The motion of the unmanned ship on the horizontal plane is simplified into a three-degree-of-freedom model, namely: forward direction, lateral displacement direction, and yaw angle. The motion equation can be expressed as: m*(u'-vr)=X u +Y v +N r m*v'+mu*r=X u +Y v +N r l z *r'=X u +Y v +N r Where m is the mass of the unmanned ship, u' is the derivative of the forward velocity, v is the lateral velocity, r is the yaw angular velocity, and X u , Y v 、N r They are the longitudinal force, transverse force, and bow moment of the hydrodynamic force and moment acting on the unmanned ship, which are estimated based on the actual conditions such as the shape, size, mass distribution, and propeller type of the unmanned ship. v' is the derivative of the lateral velocity, u is the forward velocity, and l z is the moment of inertia of the unmanned ship around the vertical axis, and r' is the derivative of the yaw angular velocity.
4. A ship automatic pilot control method based on real-time adjustment of PID parameters according to claim 1, characterized in that: The process of adding sea breeze, waves and current interference to the unmanned ship planar motion mathematical model in step 3 is expressed as follows: X u =X H +X wind +X current +X wave AND v =And H +Y wind +Y current +Y wave N r =N H +N wind +N current +N wave Where, X H , Y H 、N H are the longitudinal force, transverse force and yaw moment generated by the propeller, X wind , Y wind 、N wind are the longitudinal force, transverse force and yaw moment caused by sea breeze disturbance, X current , Y current 、N current are the longitudinal force, transverse force and yaw moment caused by the current disturbance, X wave , Y wave 、N wave They are respectively the longitudinal force, transverse force and yaw moment generated by wave interference.
5. The ship automatic pilot control method based on real-time adjustment of PID parameters according to claim 1, characterized in that: The process of establishing the control model of the unmanned ship PID according to the unmanned ship planar motion model in step 4 is expressed as follows: According to the derivation of step 2, by detecting the position, speed, heading, and attitude of the unmanned ship, detecting the wind speed, wind direction, wave parameters, and current parameters in the environmental parameters, detecting the propeller speed and rudder angle of the unmanned ship, the planar motion model parameters of the unmanned ship are established. Therefore, the control parameters in the control system of the unmanned ship can be simplified to the forward speed u of the unmanned ship and the steering angle R of the rudder; The PID control algorithm for the forward speed u can be described as: O u =k p1 e u (k)+k i1 ∫e u (k)+k d1 (e u (k)-e u (k-1)) In the formula, O u is the PID controller output of the forward speed u, k p1 , k i1 , k d1 are the proportional parameter, integral parameter, and differential parameter of the PID controller for the forward speed u, e u (k) is the error between the forward speed command value and the feedback value at time k, e u (k-1) is the error between the forward speed command value and the feedback value at time k-1; The PID control algorithm of the steering angle R of the servo is described as: O R =k p2 e R (k)+k i2 ∫e R (k)+k d2 (e R (k)-e R (k-1)) In the formula, O R is the PID controller output of the steering gear steering angle R, k p2 , k i2 , k d2 are the proportional parameter, integral parameter, and differential parameter of the PID controller of the steering gear steering angle R, e R (k) is the error between the steering angle command value and the feedback value at time k, e R (k-1) is the error between the steering angle command value and the feedback value at time k-1.
Citation Information
Patent Citations
Method for implementing straight-line trajectory tracking of unmanned inspection cruiser under ocean current influence
CN108803612A
Automatic rudder control method and system based on unmanned ship
CN116382259A
Experimental platform system of intelligent unmanned ship
CN117492434A
Course keeping and path tracking control method for ship in limited water area
CN117873103A
Unmanned ship track tracking control method based on LADRC algorithm
CN118192259A