Disclosure of Invention
The invention provides an ESO-based underwater robot fuzzy PID motion control method, which aims to solve the problems in the prior art and provides fuzzy logic control based on ESO and PID to make up the defects that the prior PID control technology cannot adjust parameters in a complex marine environment, estimate and compensate motion postures and environmental interference of an underwater vehicle under the condition of external environmental interference, and finally realize the motion posture stability of the underwater vehicle in the complex marine environment.
In order to achieve the design purpose, the underwater robot fuzzy PID motion control method based on the ESO comprises the following steps:
(1) information acquisition and demand analysis
Acquiring AUV attitude information and depth information through a carried sensor, and sending AUV expected course and depth information by a user on a shore-based interface to analyze work requirements;
(2) system state prediction and interference compensation
After receiving the user demand information, the AUV end carries out system state prediction and interference compensation operation through the course and depth information fed back in real time by the ESO;
(3) PID parameter self-adjustment and AUV motion control
The fuzzy PID adjusts the PID coefficient according to the error of the attitude information and the error change rate, and realizes the self-adjustment of the parameters;
the vertical rudder and the horizontal rudder of the AUV realize the control of the course, the pitch angle and the depth of the AUV according to the result calculated by the controller, and the task requirement of the AUV on working in the marine environment is met.
As the basic design concept, the present application proposes a method for implementing rapidity, stability and robustness of AUV motion control by using an ESO-based fuzzy PID controller (FPID + ESO).
In order to improve the attitude and depth control performance of the AUV, fuzzy control and PID control are combined on the basis of an ESO (extended state observer) which is a core control element of an active disturbance rejection controller.
The traditional PID control has the advantages of simpler control structure, easy operation, better stability and the like, and is widely applied. But in the actual production process, due to the nonlinearity and time-varying property of the system; the performance of the PID controller is variable and cannot cope with the problem of updating the PID parameters due to environmental changes. The fuzzy controller is a control mode which integrates the control experience and strategy of a person into the controller; no accurate mathematical model is required; the method has the characteristics of strong anti-interference capability, high response speed and capability of timely processing system parameter changes. From the aspect of improving the working performance of the fuzzy controller, the fuzzy controller has the characteristics of self-adjustment, modification and improvement of parameters or rules of the fuzzy controller, so that the system has the characteristics of autonomy and self-adaptation, the constant performance of the control system is ensured, and a better control effect is realized.
However, the conventional fuzzy control rule table is summarized through experimental research, and the table is looked up through the error of the system control quantity and the error change rate to obtain the corresponding control output to realize the system control; the control mode can not change the control rule under the condition of factors such as environment change and the like, and the control effect is difficult to ensure; therefore, when the conventional fuzzy control acts on the motion process of the underwater robot in the conditions of complex environment, large interference, lag and the like, and the controlled object is controlled, the phenomena of slow response speed, overlarge overshoot, even oscillation and the like of the controlled object can occur. Therefore, the adaptive Fuzzy PID (FPID) control is provided to realize online correction of control parameters, so that the underwater robot can adapt to complex marine environment.
Although the adaptive fuzzy PID controller realizes the parameter adjustment problem under different marine environments, the interference of the external environment is not controlled, so that the interference estimation is carried out in real time by an Extended State Observer (ESO) while the fuzzy PID parameter adjustment is carried out, and the disturbance estimation value is compensated to the system, thereby solving the problem of the external disturbance.
For stage (2) in the above method, the following further refinements and preferences can be taken:
the ESO carries out system state prediction and interference estimation through real-time feedback course, pitching and depth information;
after AUV attitude change information is obtained through ESO prediction, the AUV attitude change information is fed back to the input end of the AUV controller to be compared with an expected target value to obtain an attitude error (e);
ESO predicts the amount of error change (z)2) And feeding back to the system and generating a feedback error change rate (ec).
For stage (3) in the above method, the following further refinements and preferences can be taken:
the fuzzy PID controller calculates and adjusts PID coefficients through fuzzy reasoning according to the attitude error (e) and the error change rate (ec) so as to realize the self-adjustment of PID parameters;
obtaining the adjusted parameters of the AUV, and obtaining the expected values u of the vertical rudder and the horizontal rudder angle of the AUV through PID calculation0(t);
ESO interference estimation to control and compensate AUV control quantity (z)3And/b) obtaining the actual control quantity u (t) of the AUV.
In conclusion, the application has the advantages and beneficial effects that:
1. attitude information, interference estimation and prediction compensation are carried out on the AUV through the ESO, so that the anti-interference capability of the AUV can be improved;
2. the fuzzy logic control realizes the self-adjustment of PID parameters through the system state estimation and interference compensation feedback of ESO and the change condition of the actual attitude information and the control quantity of the AUV, thereby improving the stability and the anti-interference capability of the AUV control system.
3. The rapidity, stability and robustness of AUV motion control are really realized.
Detailed Description
The present application is further described below with reference to the accompanying drawings and examples.
In embodiment 1, as shown in fig. 1, to implement the fuzzy PID motion control method for the underwater robot based on ESO, the following motion control system is proposed:
a classical PID controller; and the number of the first and second groups,
the fuzzy control module integrated with fuzzy logic control adjusts PID control parameters through AUV real-time attitude information, improves the adaptability of the control parameters in different environments, and improves the control stability of the AUV;
and the extended state observer ESO performs attitude observation and interference estimation through the course or pitch information fed back by the AUV and the AUV control information, and performs attitude feedback compensation and control compensation on the AUV. Namely, the attitude error predicted by the ESO and the compensation quantity of the error change rate are fed back to the system input, and the interference prediction compensation quantity is fed back to the control output end, so that the control effect of the fuzzy PID controller is improved, the AUV is enabled to process the environmental interference, the anti-interference capability is higher, and the attitude stability control is realized.
As shown in fig. 2, in the method for controlling the fuzzy PID motion of the underwater robot based on the ESO, the heading angle, the pitch angle and the depth information are obtained through a sensor carried by the AUV, the extended state observer performs attitude and interference estimation to dynamically compensate the AUV through the obtained attitude information, the AUV performs subtraction on the feedback information through control input settings such as an expected heading and an expected pitch, and the attitude error and the error change rate after the ESO prediction compensation are obtained; and finally, the PID controller calculates according to the PID parameters obtained by real-time adjustment to obtain controller output, and compensates the interference compensation value obtained by ESO calculation to the output quantity of the PID controller to finally obtain the control output quantity of the AUV.
The method comprises the following stages:
(1) information acquisition and demand analysis
The AUV acquires information such as course, pitching and depth of the AUV through sensors such as an AHRS and the like; a user sends AUV expected course and depth information on a shore-based interface to analyze the working requirement;
(2) system state prediction and interference compensation
And after receiving the user demand information, the AUV end carries out system state prediction and interference compensation operation by the ESO through the real-time feedback course and depth information. Specifically, the method comprises the following implementation steps:
in the step 2.1, the method comprises the following steps of,
the ESO performs attitude state observation and interference compensation operation on the course, pitch and depth information obtained by AUV feedback, the attitude observed value and the input expected attitude (course or pitch) are subjected to difference to obtain an attitude error e, and the differential value observed by the ESO is fed back to the system attitude error change rate to obtain a system attitude error change rate ec; the invention adopts a three-order extended state observer, and the expression of the three-order extended state observer is as follows:
e1=z1-y;
in the formula: e.g. of the type1Systematic error of observation for ESO; z is a radical of1,z2,z3Is the extended state observer output; as shown in FIG. 1, z1Pose observations, z, for ESO2Observed value of attitude error change rate, z, for ESO observation3Carrying out interference observation on the compensation value of system control input for the ESO; delta is a linear interval; beta is a1,β2,β3Outputting error weight factors for the extended state observer; b is a compensation coefficient, and the value of b is 0.01; alpha is alpha1And alpha2Typically taken at 0.5 and 0.25; the fal (x, α, δ) function is expressed as follows:
in the step 2.2, the step of the method,
the system attitude error e ═ r (t) — z is obtained from the above
1-y (t); rate of change of system attitude error
(3) PID parameter self-adjustment and AUV motion control
The fuzzy PID adjusts the PID coefficient according to the error of the attitude information and the error change rate, and realizes the self-adjustment of the parameters;
the vertical rudder and the horizontal rudder of the AUV realize the control of the course, the pitch angle and the depth of the AUV according to the result calculated by the controller, and the task requirement of the AUV on working in the marine environment is met. Specifically, the method comprises the following steps:
in the step 3.1, the step of the method,
fuzzification processing of system input quantity and output quantity; and converting the course (pitching) error e and the course (pitching) error change rate ec into matched language values in a fuzzy mode. e and ec are input quantities of the controller, and fuzzification is carried outObtaining a fuzzy subset of { negative large, negative medium, negative small, zero, positive small, positive medium, positive large }, and correspondingly recording { NB, NM, NS, ZO, PS, PM, PB }. in the invention, the course (pitch) control error is in a range of (-2 pi, 2 pi), the course (pitch) control error change rate is in a range of (-2, 2), and the attitude deviation e and the error change rate ec are quantized to { -3, -2, -1, 0, 1, 2, 3 }. Similarly, the variable Δ k will be outputp,Δki,ΔkdAnd the fuzzy is fuzzy subset { negative large, negative medium, negative small, zero, positive small, positive medium, positive large }, which is marked as { NB, NM, NS, ZO, PS, PM, PB }, and quantized to be within the domain of discourse of { -3, -2, -1, 0, 1, 2, 3 }.
In the step 3.2, the step of the method,
establishing a fuzzy control rule, namely establishing a fuzzy rule base through rules obtained by expert experience and experiments, and realizing the self-adjustment of PID parameters when environmental changes exist. Considering the aspects of system stability, response speed, overshoot, stability error and the like, k is controlled in the control processp,ki,kdThe adjustment rules of (2) are as follows:
(1) when the error | e | is larger, in order to make the system have better fast tracking performance, the larger k should be taken no matter how the variation trend of the error ispAnd smaller kdMeanwhile, in order to avoid the system response from generating larger overshoot, the integral action is limited, and a smaller k is takeniA value;
(2) when the error | e | is at a medium magnitude, k is a small overshoot for the system responsepShould be made smaller, and k is the response speed of the systemiAnd kdModerate size, wherein k isdThe value of (a) has a large influence on the system response;
(3) when the error | e | is smaller, k is set to ensure that the system has better steady-state performancepAnd kiShould be taken to be larger, and simultaneously, in order to avoid the system from oscillation near the set value and considering the anti-interference performance of the system, when | ec | is smaller, k is smallerdCan be larger; when | ec | is large, kdIt should be taken to be smaller.
The tuning of the PID parameters must simultaneously take into account the influence of the 3 control parameters on the control effect in different situations and their interaction. Based on the expert experience summarized in the test and a large number of simulation experiments, the following fuzzy control rule table can be obtained, as shown in table 1:
TABLE 1 kp,ki,kdParameter control adjustment rules
In the step 3.3, the step of the method,
fuzzy inference, fuzzy rules, Ifeis A, andecis B, then k, can be obtained from Table 1
pis C,k
iis D,k
dis E et al 49, where the Mandani algorithm is used, the overall fuzzy relation is:
where Ri represents each fuzzy rule of the control system.
In the step 3.4, the step of the method,
the deblurring process needs to be deblurred to convert the fuzzy control reasoning result into an accurate quantity which can be executed by an actuator because the fuzzy control reasoning result is a fuzzy value and cannot be directly applied to a controlled object. The invention adopts a gravity center method to carry out ambiguity resolution operation, and the calculation formula is as follows:
in the formula, z
*In order to be an accurate value,
is degree of membership, omega
jAre domains of discourse. Wherein degree of membership
The method is obtained by calculating a membership function, and the triangular membership function is adopted to calculate the membership degree.
In the step 3.5, the step of the method,
after fuzzification, fuzzy reasoning and deblurring processes, the final kp,ki,kd(ii) a The specific adjustment formula is as follows:
kp=k′p+{e,ec}*Kp=k′p+Δkp
ki=k′i+{e,ec}*ki=k′i+Δki
kd=k′d+{e,ec}*kd=k′d+Δkd
in the step 3.6, the step of the method,
the steering angle u controlled by AUV is obtained by output after calculation of a fuzzy PID controller0(t), at this time at u0(t) adding ESO to carry out interference estimation calculation to obtain compensation quantity z of system disturbance3And b, finally obtaining the final control output quantity u (t) of the system, namely the expected rudder angle value required by the AUV during attitude control. The calculation formula is as follows:
u(t)=u0(t)-z3/b;
the results of the MATLAB experiment are shown in fig. 3, 4, 5 and 6. The result shows that the method has better control stability and better anti-interference capability in the aspect of attitude control of the AUV.
It will be understood that modifications and variations can be made by persons skilled in the art in light of the above teachings and all such modifications and variations are intended to be included within the scope of the invention as defined in the appended claims.