Underwater unmanned ship hovering hybrid drive control method and device based on BP (Back Propagation) and PID (Proportion Integration Differentiation)
Through the BP neural network and PID hybrid controller, combined with Kalman filtering and incremental PID, the disturbance problem during the hovering process of underwater unmanned boats is solved, fast and accurate hover control is achieved, and the system's robustness and adaptability are enhanced.
Patent Information
- Application Number
- CN202510285525.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-07-29
AI Technical Summary
Underwater unmanned boats are susceptible to disturbances such as waves and ocean currents during hovering, and are difficult to hover accurately. Traditional PID controllers lack performance when facing time-varying uncertainty and nonlinear environments.
The BP neural network and PID hybrid controller are used to obtain attitude information using sensors, and the data is processed through Kalman filtering. Combined with incremental PID and BP neural network to predict the thruster speed, the second degree of freedom hover control of underwater unmanned boats is realized.
It realizes fast and stable hover control, reduces overshoot and adjustment time, enhances the robustness and adaptability of the system, and overcomes the shortcomings of traditional PID control.
Smart Images

Figure CN120386372A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of autonomous control, and particularly to a hovering hybrid drive control method for an underwater unmanned vehicle based on a BP neural network and PID. Background Art
[0002] The accurate hovering (two degrees of freedom, namely depth and heading) of an underwater unmanned vehicle in a certain posture at a certain position in the ocean space is the basis for it to complete underwater operations. However, the underwater unmanned vehicle is easily affected by the multi-disturbance environment such as waves, ocean currents, and the system itself, making accurate hovering always a difficult point in underwater robot technology. Summary of the Invention
[0003] The present disclosure provides a hovering hybrid drive control method for an underwater unmanned vehicle based on BP and PID, which uses a PID and BP hybrid controller to solve the underwater hovering of an inspection robot. Among them, BP can effectively suppress the PID control error, reduce the adjustment time of the system, and reduce the overshoot; the neural network has the ability of self-learning, and can overcome the performance deficiency of the traditional PID controller due to the time-varying uncertainty, nonlinearity of the controlled object and the difficulty in establishing an accurate mathematical model; at the same time, the neural network has strong robustness and adaptive ability. This method combines the advantages of the PID and BP algorithms to achieve a fast and stable control effect.
[0004] The hovering hybrid drive control method for an underwater unmanned vehicle based on BP and PID provided by the present disclosure includes the following steps:
[0005] S1. Real-time obtain the attitude information of the underwater unmanned vehicle underwater, including: depth information and heading information, and the obtained data are all the original data collected by sensors;
[0006] S2. Perform filtering processing on the original data of the obtained depth and heading;
[0007] S3. Use the PID control algorithm to control the depth and heading of the underwater unmanned vehicle: the input of PID is the depth value and the target depth at the current moment, or the heading value and the target heading, and the output is the control amount acting on the thrusters of the underwater unmanned vehicle;
[0008] S4. Use the BP neural network to predict the rotational speed of the thruster corresponding to the difference between the target depth and the depth value at the current moment, or the difference between the target heading and the heading value at the current moment;
[0009] S5. Add the output value of PID and the output value of the BP neural network, and act on the vertical thruster and the steering thruster to respectively control the depth and heading of the underwater unmanned vehicle, and realize the two-degree-of-freedom underwater hovering control of the underwater unmanned vehicle.
[0010] Further, in step S2, the original data of depth and heading obtained is processed by Kalman filtering.
[0011] Further, in step S3, incremental PID control is adopted.
[0012] Further, in step S4, the structure of BP includes an input layer, a hidden layer, and an output layer, where: there are 2 inputs, 20 hidden layer nodes, and 1 output;
[0013] The input values are the target depth and the real-time depth, or: the target heading and the real-time heading;
[0014] The output value is the propeller duty cycle error value.
[0015] Further, in step S4, the method for predicting the propeller speed corresponding to the difference between the target depth and the depth value at the current moment by using a BP neural network specifically includes:
[0016] Let the input value be x = [E value , R value T , where E value represents the expected depth, and R value represents the measured depth value processed by the filtering algorithm, and the output value y = DC error , where DC error is the propeller duty cycle error value;
[0017] Then the output calculation method is as follows:
[0018]
[0019] where B is the bias, Wi is the weight of the i-th node between the hidden layer and the output layer, H i is the value of the i-th node in the hidden layer, and the activation function is:
[0020]
[0021] The input value of the final vertical propeller is:
[0022] Y = u[k] + y[k]
[0023] where u[k] is the output value of PID, y[k] is the compensation value calculated by BP, and Y is the final input value of the propeller.
[0024] Further, in step S5, BP and PID hybrid control is implemented. The inputs of the controller are [d, d', ψ, ψ'], where d is the depth measurement value, d' is the target depth value, ψ is the heading measurement value, and ψ' is the target heading value; the output values of the system are [p1, p2, p3, p4], where p1 and p2 are the control signals for the vertical thrusters of the inspection robot, and p3 and p4 are the control signals for the steering thrusters of the inspection robot, ultimately achieving the hovering control of the underwater robot.
[0025] The hovering hybrid drive control device for an underwater unmanned boat based on BP and PID applying the above method includes: a sensor module, a data processing module, a PID control module, a BP neural network module, and a PID and BP fusion output module; where:
[0026] The sensor module includes a depth sensor and an inertial navigation sensor. The depth sensor is used to measure the depth data of the underwater unmanned boat in real time, and the inertial navigation sensor is used to measure the heading angle data of the underwater unmanned boat in real time;
[0027] The data processing module is used for filtering the raw data of the depth sensor and the inertial navigation sensor, removing the noise in the raw data, restoring the real data, and further improving the accuracy of control;
[0028] The PID control module is used to form a control quantity by linearly combining the proportional, integral, and differential of the depth and heading deviations of the underwater unmanned boat, and use this control quantity to perform hovering control on the underwater unmanned boat;
[0029] The BP neural network module includes an input layer, a hidden layer, and an output layer, and is used to predict the control quantity corresponding to the difference between the depth or heading of the underwater unmanned boat at the current moment and its target value;
[0030] The PID and BP fusion output module is used to add the output value of PID and the output value of BP, and act on the thrusters of the underwater unmanned boat to achieve the hovering control of the underwater unmanned boat.
[0031] Compared with the prior art, the beneficial effects of the present disclosure are: ① The BP neural network can effectively suppress the PID control error, reduce the adjustment time of the system, and reduce the overshoot; ② The neural network has the ability of self-learning and can overcome the performance deficiencies of the traditional PID controller due to the time-varying uncertainty, nonlinearity of the controlled object, and difficulty in establishing an accurate mathematical model; ③ The neural network has strong robustness and adaptive ability. This method combines the advantages of the PID and BP algorithms and can achieve a fast and stable control effect. Description of the Drawings
[0032] The above and other objects, features, and advantages of the present disclosure will become more apparent by describing the exemplary embodiments of the present disclosure in more detail in conjunction with the accompanying drawings, where, in the exemplary embodiments of the present disclosure, the same reference numerals generally represent the same components.
[0033] Figure 1 It is a structural diagram of an exemplary underwater unmanned vehicle hovering control system according to the present disclosure;
[0034] Figure 2 It is a schematic diagram of a depth and heading angle controller based on PID / BP. Specific Embodiments
[0035] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0036] The present disclosure proposes a hybrid control strategy based on BP neural network and PID to solve the perception, decision-making of the underwater unmanned vehicle in complex environmental states, and the precise hovering of the underwater unmanned vehicle.
[0037] Under an exemplary embodiment of the present disclosure, the structure of the underwater unmanned vehicle hovering control system is as shown in the attached Figure 1 figure, and includes: a sensor module, a data processing module, a PID control module, a BP neural network module, and a PID and BP fusion output module. Among them:
[0038] The sensor module includes: a depth sensor and an inertial navigation sensor. Among them, the depth sensor is used to measure the depth data of the underwater unmanned vehicle in real time, and the inertial navigation sensor is used to measure the heading angle data of the underwater unmanned vehicle in real time.
[0039] The data processing module is used for filtering the original data of the depth sensor and the inertial navigation sensor, removing the noise in the original data, restoring the real data, and further improving the accuracy of control.
[0040] The PID control module is mainly used to linearly combine the proportional, integral, and differential of the depth and heading deviation of the underwater unmanned vehicle to form a control quantity, and use this control quantity to perform hovering control on the underwater unmanned vehicle.
[0041] The BP neural network is used to predict the control quantity corresponding to the difference between the depth (or heading) of the underwater unmanned vehicle at the current moment and the target. In this embodiment, the BP neural network module has a three-layer structure, including an input layer, a hidden layer, and an output layer. BP can effectively suppress the PID control error, reduce the adjustment time of the system, and reduce the overshoot; the neural network has the ability of self-learning and can overcome the performance deficiency of the traditional PID controller due to the time-varying uncertainty, nonlinearity of the controlled object, and the difficulty of establishing an accurate mathematical model.
[0042] The PID and BP fusion output module is used to add the output value of PID and the output value of BP and act on the thruster of the underwater unmanned vehicle to realize the hovering control of the underwater unmanned vehicle.
[0043] In an exemplary embodiment, the hovering control method of the underwater unmanned vehicle based on PID and BP hybrid control, as shown in the appendix Figure 2 includes a data processing part and the design principle frameworks of PID and BP.
[0044] The hovering control method of the underwater unmanned vehicle based on PID and BP hybrid control provided in this embodiment is based on the above-mentioned embodiments. According to the data provided by the sensor, through preprocessing, the control algorithm finally outputs a control signal and inputs it to the thruster to realize the precise hovering of the underwater unmanned vehicle.
[0045] Step 1: Use the sensor module to obtain the attitude information of the underwater unmanned vehicle underwater in real time. Among them, the depth sensor obtains the depth information of the underwater unmanned vehicle, and the inertial navigation obtains the heading information of the robot. The obtained data are all raw data.
[0046] Step 2: Use the data processing module to process the raw data of the depth and heading obtained by the underwater unmanned vehicle with Kalman filtering to remove the noise in the complex underwater environment and obtain more accurate depth and heading data of the underwater unmanned vehicle.
[0047] Step 3: Use the PID control algorithm to control the depth and heading of the underwater unmanned vehicle to obtain a PID control quantity. In this system, incremental PID is adopted. The input of PID is the depth value (heading value) at the current moment and the target depth (target heading), and the output is the control quantity acting on the thruster of the underwater unmanned vehicle.
[0048] Step 4: Use the BP neural network to predict the thruster speed corresponding to the difference between the target depth (target heading) and the depth value (heading value) at the current moment. The structure of BP is 2 inputs, 20 hidden layer nodes, and 1 output. The input values are the target depth (heading) and the real-time depth (heading), and the output value is the duty cycle error value of the thruster. The predicted value of the BP neural network compensates the output of PID.
[0049] Step 5, the PID and BP fusion output module means that the output value of PID and the output value of the BP neural network are added and act on the vertical thruster (to control the depth of the underwater unmanned vehicle) and the steering thruster (to control the heading of the underwater unmanned vehicle), and finally realize the two-degree-of-freedom underwater hovering control of the underwater unmanned vehicle.
[0050] Specifically, in Step 2, there are large errors in the collected original sensor data, and the original sensor data needs to be preprocessed. Since the observed data includes the noise in the system and external interference, the optimal estimation can also be regarded as a filtering process.
[0051] First, the process model of the system is used to predict the system in the next state. The current system state is that, according to the system model, the current state can be predicted based on the previous state of the system:
[0052] X(k|k - 1) = AX(k - 1|k - 1) + BU(k) (1)
[0053] In formula (1), X(k|k - 1) is the result predicted using the previous state, X(k - 1|k - 1) is the optimal result of the previous state, A and B are both system parameters, and U(k) is the control quantity of the current state.
[0054] At this time, the system result has been updated, and next, the covariance of X(k|k - 1) is updated. Let P represent the covariance:
[0055] P(k|k - 1) = AP(k - 1|k - 1)A' + Q (2)
[0056] In formula (2), P(k|k - 1) is the covariance corresponding to X(k|k - 1), P(k - 1|k - 1) is the covariance corresponding to X(k - 1|k - 1), the input white noise Q = 1.1, and formulas (1) and (2) are the predictions of the system by the Kalman filter.
[0057] With the prediction result of the current state, then calculate the measurement value of the current state. Combining the predicted value and the measurement value, the optimal estimated value X(k|k) of the current state k can be obtained:
[0058] X(k|k) = X(k|k - 1) + Kg(k)(Z(k) - HX(k|k - 1)) (3)
[0059] Where Kg is the Kalman gain:
[0060] Kg(k) = P(k|k - 1)H' / (HP(k|k - 1)H' + R) (4)
[0061] The optimal estimated value X(k|k) in the k state has now been obtained, where the observation noise R = 0.15. The next step is to update the covariance of X(k|k) in the k state:
[0062] P(k|k) = (I - Kg(k)H)P(k|k - 1) (5)
[0063] where I is the identity matrix. When the system enters the k + 1 state, P(k|k) is P(k - 1|k - 1) in equation (2), and X(k|k) is X(k - 1|k - 1) in equation (1). The original data of the depth or heading angle collected by the sensor is optimized using the Kalman filter algorithm.
[0064] In step 3, the PID control algorithm is used to control the depth and heading of the underwater unmanned vehicle, and the depth and heading of the underwater unmanned vehicle are controlled.
[0065] The control formula of PID is:
[0066]
[0067] In this embodiment, the incremental PID is adopted. The determination of the control increment Δu(k) is only related to the recent 3 sampling values of the depth or heading angle, and it is easy to obtain a better control effect through weighted processing;
[0068] The general expression of the incremental PID is:
[0069] Δu(k) = u(k) - u(k - 1)
[0070] = K P [e(k) - e(k - 1)] + K I e(k) + K D [e(k) - 2e(k - 1) + e(k - 2)] (7)
[0071] It can be seen from the incremental PID according to formula (7) that once KP, KI, and KD are determined, only the deviations of the previous three measurements are used, and the control increment can be obtained from the formula. The obtained control quantity Δu(k) corresponds to the increment of the recent position errors, and it is easy to obtain a better control effect through weighted processing. Moreover, when problems occur in the system, the incremental type will not seriously affect the operation of the system.
[0072] After discretizing the continuous PID control by a certain discretization method, the digital PID control can be obtained. The discrete independent variable is k, and the discrete PID control can be expressed as:
[0073]
[0074] Where Kp, Ki, and Kd are the proportional, integral, and derivative coefficients respectively, and e is the error value (the expected depth value minus the depth value optimized by KF). u[k] is the output position of the PID controller. Due to the influence of integral saturation, the controller exits the saturation region for a long time, so the system generates a large overshoot. According to the above formula, write the control quantity at the k-1 moment:
[0075]
[0076] We get:
[0077] Δu[k] = K p {e[k] - e[k - 1]} + K i e[k] + K d {e[k] - 2e[k - 1] + e[k - 2]} (10)
[0078] In formula (10), e[k] is the error at the current moment, e[k - 1] is the error at the k - 1 moment, and e[k - 2] is the error at the k - 2 moment. The obtained control quantity Δu[k] corresponds to the increment of the recent position errors, and when there are problems in the system, the incremental formula will not seriously affect the operation of the system.
[0079] In summary, the output value of the PID controller can be calculated as follows:
[0080] u[k] = u[k - 1] + Δu[k] (11)
[0081] In step 4, when controlling the hovering of the inspection robot through the PID and KF algorithms, there are problems such as large fluctuations in the depth value. In this paper, a prediction model based on BP is designed. The input value x = [E value , R value T , where E value represents the expected depth, and R value represents the measured depth value processed by the KF algorithm of the depth sensor. The output value y = DC error , where DC error is the duty cycle error value of the thruster.
[0082] The output calculation method is as follows:
[0083]
[0084] Where W i is the weight of the i-th node between the hidden layer and the output layer, H i is the value of the i-th node in the hidden layer, and the activation function is:
[0085]
[0086] The input value of the final vertical thruster is as follows:
[0087] Y = u[k] + y[k] (14)
[0088] Where u[k] is the output value of the PID, y[k] is the compensation value calculated by BP, and Y is the final input value of the thruster.
[0089] In step 5, a hybrid control of BP and PID is implemented. The inputs of this controller are [d, d', ψ, ψ'], where d is the depth measurement value, d' is the target depth value, ψ is the heading measurement value, and ψ' is the target heading value. The output values of the system are [p1, p2, p3, p4], where p1 and p2 are the control signals for the vertical thrusters of the inspection robot, and p3 and p4 are the control signals for the steering thrusters of the inspection robot, ultimately achieving the hover control of the robot.
[0090] The experimental results show that the hybrid control based on BP and PID can complete hovering stably and accurately, verifying the effectiveness of the algorithm.
[0091] The above technical solutions are only exemplary embodiments of the present invention. For those skilled in the art, based on the disclosed application methods and principles of the present invention, it is very easy to make various types of improvements or deformations, not limited to the methods described in the above specific embodiments of the present invention. Therefore, the above-described manner is only preferred and does not have a restrictive meaning.
Claims
1. A hybrid drive control method for underwater unmanned vehicle hovering based on BP and PID, comprising the following steps: S1. Real-time obtain the attitude information of the underwater unmanned vehicle underwater, including depth information and heading information, and the acquired data are all the original data collected by sensors; S2. Perform filtering processing on the acquired original data of depth and heading; S3. Use the PID control algorithm to control the depth and heading of the underwater unmanned vehicle: the input of PID is the depth value and the target depth at the current moment, or the heading value and the target heading, and the output is the control amount acting on the underwater unmanned vehicle thruster; S4. Use the BP neural network to predict the thruster speed corresponding to the difference between the target depth and the depth value at the current moment, or the difference between the target heading and the heading value at the current moment; S5. Add the output value of PID and the output value of the BP neural network, and act on the vertical thruster and the steering thruster to control the depth and heading of the underwater unmanned vehicle respectively, so as to realize the two-degree-of-freedom underwater hovering control of the underwater unmanned vehicle.
2. The method according to claim 1, characterized in that In step S2, the acquired original data of depth and heading are processed by Kalman filtering.
3. The method according to claim 1, characterized in that, In step S3, incremental PID control is adopted.
4. The method according to claim 1, wherein In step S4, the structure of BP includes an input layer, a hidden layer and an output layer, where: there are 2 inputs, 20 hidden layer nodes, and 1 output; The input values are the target depth and the real-time depth, or: the target heading and the real-time heading; The output value is the duty cycle error value of the thruster.
5. The method according to claim 4, wherein In step S4, the method for using the BP neural network to predict the thruster speed corresponding to the difference between the target depth and the depth value at the current moment specifically includes: Let the input value be x = [E value , R value T , where E value represents the expected depth, and R value represents the measured depth value processed by the filtering algorithm. The output value y = DC error , where DC error is the duty cycle error value of the thruster; Then the output calculation method is as follows: where B is the bias, and W i is the weight of the i-th node between the hidden layer and the output layer, and H i is the value of the i-th node in the hidden layer, and the activation function is: The input value of the final vertical thruster is: Y = u[k] + y[k] where u[k] is the output value of PID, y[k] is the compensation value calculated by BP, and Y is the final input value of the thruster.
6. According to the method described in any one of claims 1-5, characterized in that, In step S5, BP and PID hybrid control is realized. The input of this controller is [d, d', ψ, ψ'], where d is the depth measurement value, d' is the target depth value, ψ is the heading measurement value, and ψ' is the target heading value; The output value is [p1, p2, p3, p4], where p1 and p2 are the control signals of the vertical thrusters of the inspection robot, and p3 and p4 are the control signals of the steering thrusters of the inspection robot, and finally the hovering control of the underwater robot is realized.
7. An underwater unmanned vehicle hovering hybrid drive control device based on BP and PID using any of the methods described in claims 1-6, characterized in that, Including: A sensor module, a data processing module, a PID control module, a BP neural network module, and a PID and BP fusion output module; where: The sensor module includes a depth sensor and an inertial navigation sensor. The depth sensor is used to measure the depth data of the underwater unmanned vehicle in real time, and the inertial navigation sensor is used to measure the heading angle data of the underwater unmanned vehicle in real time; The data processing module is used for filtering the original data of the depth sensor and the inertial navigation sensor, removing the noise in the original data, restoring the real data, and further improving the accuracy of control; The PID control module is used to linearly combine the proportional, integral and differential of the depth and heading deviations of the underwater unmanned vehicle to form a control amount, and use this control amount to perform hovering control on the underwater unmanned vehicle; The BP neural network module, including an input layer, a hidden layer and an output layer, is used to predict the control amount corresponding to the difference between the depth or heading of the underwater unmanned vehicle at the current moment and its target value; The PID and BP fusion output module is used to add the output value of PID and the output value of BP, and act on the thrusters of the underwater unmanned vehicle to realize the hovering control of the underwater unmanned vehicle.