Attitude control method based on PID controller and L1 adaptive controller
Technical field
The present invention relates to aircraft manufacturing technology technologies, more particularly to one kind to be based on PID controller and L1 self adaptive control
The attitude control method of device.
Background technique
Unmanned plane is primarily referred to as unpiloted aircraft.Unmanned plane has obtained in terms of military and civilian extensively at present
General application, for example, military investigation, air patrol and search and rescue, the transport and dispensing of urgent substance, urban planning, meteorological observation are gloomy
Woods fire prevention, agricultural plant protection, the inspection of power circuit and petroleum pipeline, video display are taken photo by plane, amusement etc..Due to not needing to drive on unmanned plane
The person of sailing can completely avoid the casualties during execution task, and operator can check unmanned plane in ground control centre
The image and status information that real-time transmission is returned detect the progress of unmanned plane task execution and complete effect.With unmanned plane
Also research of all numerous and confused expansion to unmanned aerial vehicle (UAV) control and application of rapid development, major colleges and universities and scientific research institution.
The gesture stability problem of unmanned plane be concerning its can be reliable and stable the root problem applied in real life,
Since the mathematical model of unmanned plane has strong nonlinearity, and actually we can not obtain its accurate parameter, but also
The system model that can not be modeled in the presence of a part.In the case where that can not obtain accurate mathematical model, traditional gamma controller exists
In practical application, ideal control effect is extremely difficult in the case where ought especially having external disturbance.
Summary of the invention
The object of the invention is that in order to solve above-mentioned not obtain accurate complete mathematical model and exist external
The problem of gesture stability when disturbance and provide in the model bias of the compensation system using adaptive strategy real-time online and outer
The appearance based on PID controller and L1 adaptive controller to the stability contorting of attitude of flight vehicle system is realized while boundary disturbs
State control method.
The present invention through the following technical solutions to achieve the above objectives:
1, a kind of attitude control method based on PID controller and L1 adaptive controller, by PID controller to expectation
In the case of attitude of flight vehicle system stability contorting, recycle L1 adaptive controller real-time estimation attitude system in disturbance miss
Difference, and the agitation error estimated is quickly compensated, include the following steps,
(1) expectation Eulerian angles and a certain moment iT are obtainedsPractical attitude angle, and calculate the error originated from input of PID controller
Vector obtains the control output signal of PID controller, its calculation formula is:
Wherein, the calculation formula of error originated from input vector are as follows: ηe=ηd-η;
In formula: ηdFor the i-th TsMoment desired Eulerian angles, η are the i-th TsThe attitude vectors of moment aircraft;
Kp=diag (Kp1,Kp2,Kp3), Ki=diag (Ki1,Ki2,Ki3), Kd=diag (Kd1,Kd2,Kd3), respectively PID
It controls feedback factor matrix and is positively definite matrix;
(2) according to last moment (i-1) TsControl output, update iTsThe state estimation of the L1 adaptive controller at moment
The state value of device, its calculation formula is:
In formula: J=diag (Jx,Jy,Jz) be aircraft moment of inertia matrix;
For the i-th TsThe state vector of the state estimator of moment L1 adaptive controller;
ω is (i-1) TsThe angular velocity vector of moment attitude system;
τ is (i-1) TsThe master control input vector of moment aircraft;
σ is (i-1) TsMoment L1 adaptive controller perturbation vector calculated;
ApIt is used to define the Hurwitz matrix of evaluated error convergence property for one;
(3) pass through the i-th TsThe state value of moment state estimator and the magnitude of angular velocity of attitude system calculate the i-th TsMoment disturbs
Dynamic error, its calculation formula is:
Wherein: the calculation formula of evaluated error vector are as follows:
In formula:For the i-th TsThe state vector of moment state estimator;
ω is the i-th TsThe angular velocity vector of moment attitude system;
TsFor the time interval of control algolithm operation;
(4) agitation error of L1 adaptive controller is smoothly exported by low-pass filter, its calculation formula is:
In formula:For the bandwidth of low-pass filter;
σ (t) is the input signal of low-pass filter, i.e., in the i-th TsMoment agitation error;
τL1For the output signal of low-pass filter;
(5) the i-th T is calculatedsThe total output signal of moment PID controller and L1 adaptive controller, and by total output signal
It is input to the posture of the attitude system control aircraft of aircraft, its calculation formula is:
τ(iTs)=τPID-τL1
The beneficial effects of the present invention are:
The present invention is based on the attitude control methods of PID controller and L1 adaptive controller to utilize PID controller and L1 certainly
The external disturbance that the internal disturbance and flight environment of vehicle that adaptive controller compensation is introduced due to modeling error generate aircraft, can be with
Aircraft accurate mathematical model can not obtained there are in the case where external disturbance, realizing the stability contorting to attitude of flight vehicle,
With higher robustness.
Detailed description of the invention
Fig. 1 is the whole control of the attitude control method of the present invention based on PID controller and L1 adaptive controller
Block diagram;
Fig. 2 is the structural schematic diagram of quadrotor in specific embodiment;
Fig. 3 is that quadrotor system runs block diagram in specific embodiment;
Fig. 4 is the external disturbance that quadrotor is subject in specific embodiment;
Fig. 5 is that quadrotor there are when external disturbance, imitate by single PID controller roll angle control in specific embodiment
Fruit;
Fig. 6 is that quadrotor there are when external disturbance, imitate by single PID controller pitch angle control in specific embodiment
Fruit;
Fig. 7 is that there are the disturbances that when external disturbance, L1 self adaptive control is compensated for quadrotor in specific embodiment
Signal;
Quadrotor is there are when external disturbance in Fig. 8 specific embodiment, PID controller and L1 adaptive controller
Control roll angle control effect;
Fig. 9 is that quadrotor is there are when external disturbance in specific embodiment, PID controller and L1 self adaptive control
Device controls pitch angle control effect;
Specific embodiment
The present invention will be further explained below with reference to the attached drawings:
As shown in Figure 1, each physical quantity respectively refers to, the expectation reference input vector of system is ηd=(ψd,θd,φd)T, ψd
For desired yaw angle, θdFor desired pitch angle, φdFor desired roll angle;η is the practical Eulerian angles vector of aircraft;
τPIDOutput vector is controlled for PID controller;τL1The control output vector for being L1 adaptive controller after too low filtering;τ=
τPID+τL1It is inputted for the master control of attitude system;ω is the actual angular speed value of attitude system;ωpFor L1 adaptive controller
The state of state estimator.
By desired attitude angle ηdIt is made the difference with the practical attitude angle η of attitude system at that time detected, and is sent to PID control
Device processed obtains the output τ of PID controllerPID;Then, it is exported according to the control of last moment, the disturbance of angular speed and estimation, more
The state value of the state estimator of new L1 adaptive controller obtains ωp;Followed by the state value ω of state estimatorpWith appearance
The magnitude of angular velocity ω of state system calculates estimation disturbance;Then it filters to obtain τ by disturbance of the low-pass filter to estimationL1;Finally
It calculates PID+L1 adaptive controller and exports τ=τPID-τL1, it is input to the gesture stability that aircraft is carried out in attitude system.
Low-pass filter is introduced in adaptive feedback loop, by the bandwidth for adjusting low-pass filter in compensation circuit
Can easily regulating system robustness and dynamic characteristic, the response of system can be improved in the bandwidth for improving low-pass filter
Speed still can also reduce the robustness of system simultaneously, and although the stabilization of system can be improved in the bandwidth for reducing low-pass filter
Property but simultaneously can also reduce system to the rejection ability of disturbance.It can both have been protected by adjusting suitable low-pass filter bandwidth
Card system stability improves the rejection ability of system external circle disturbance while avoiding generating high frequency oscillation.
By taking " cross structure " quadrotor drone shown in Fig. 2 as an example, which includes four motors, and No. 1 motor
In front, for No. 3 motors at rear, No. 2 and No. 4 motors are located at the left side and the right of aircraft.No. 1 and No. 3 motors are with timing
The rotation of clock direction, No. 2 and No. 4 motors are rotated with counterclockwise.It can all generate upward lift when the rotation of four motors, No. 1
With No. 3 motors there are aircraft can be made to do pitching movement when lift difference, No. 2 there are aircraft can be made to roll when lift difference with No. 4 motors
Transhipment is dynamic, can generate a reverse torsion to aircraft when No. 1 and No. 3 motors rotations, and meeting when No. 2 and No. 4 motors rotate
One positive torsion is generated to aircraft, aircraft can do yawing rotation when the two torsion are unequal.
As shown in figure 3, quadrotor unmanned control system mainly includes several parts: remote-control receiver, sensor and posture
Fusion Module, PID+L1 adaptive control algorithm module and power distribution and execution module.
Remote-control receiver, which receives control instruction and is converted into corresponding expectation attitude angle, passes to adaptive control algorithm, appearance
State Fusion Module is by sensing datas such as acquisition acceleration, gyroscope, magnetometers and utilizes Kalman's posture blending algorithm meter
Calculate and export the Eulerian angles and angular speed of quadrotor drone.
PID+L1 adaptive control algorithm is inputted according to desired state and practical posture state at that time calculates PID control
Device output, update state estimator, calculating are to the estimation of disturbance, the estimation disturbance being filtered after obtaining smoothly, calculating PID
The output of+L1 adaptive controller.
Power distribution and execution module are then that four electron speed regulators are calculated according to the output of gesture stability algorithm
Input quantity, and change motor speed control aspect variation.
Our available following relationships according to the type of quadrotor drone in this example:
Wherein τ=(τx,τy,τz)TFor the output torque of attitude controller, τ1,τ2,τ3,τ4It is generated for four motor rotations
Torque, f1, f2, f3, f4For lift caused by four motors, L is distance of the aircraft center to motor center, and F is that expectation generates
Four propellers total life.It is defeated by measuring lift that our available motor and paddle generate and electron speed regulator
Enter the Proportional coefficient K of pwm signalfAnd the ratio system of the torque and electron speed regulator input pwm signal of a motor and paddle generation
Number Kτ.And then above-mentioned relation can convert are as follows:
The pwm control signal P of four motors can be obtained by resolving above-mentioned system of linear equations1,P2,P3,P4。
Fig. 4 to Fig. 9 is when only using PID controller when there are external disturbance, the control effect of roll angle and pitch angle and
When using PID+L1 adaptive controller, the control effect of roll angle and pitch angle.
Fig. 4 is the disturbance of effect on both axes, and it is 0.1N*m that wherein solid line, which is the amplitude on roll angle that acts on, and frequency is
The sinusoidal perturbation signal of 2rad/s, dotted line are that the amplitude on pitch angle that acts on is 0.1N*m, and frequency is the sinusoidal perturbation of 6rad/s
Signal.Disturbing signal was acted on aboard at the 10th second.
Fig. 5 and Fig. 6 is respectively only to utilize PID controller control effect, and solid line is desired attitude angle, and dotted line is that aircraft is real
The attitude angle on border.It can be found that the tracking effect of two attitude angles of aircraft is very not when influencing without external disturbance within first 10 seconds
Mistake, but due to the influence of external disturbance after 10 seconds, the effect in two angles is decreased obviously.
Fig. 7 is the external disturbance that L1 adaptive algorithm is estimated and compensated, can be compared with Fig. 4 it is found that L1 adaptive algorithm
The disturbance of compensation and practical external disturbance are all very close in amplitude and frequency.
Roll angle and pitch angle are having external disturbance to Fig. 8 and Fig. 9 respectively under the effect of PID+L1 adaptive controller
In the case of control effect, respectively with Fig. 5, Fig. 6 compare, method of the invention, which has the rejection ability of external disturbance, obviously to be mentioned
It is high.
This example illustrates robustness of the invention, and the quick rejection ability to external disturbance, it is ensured that aircraft exists
It also being capable of steady normal flight under the influence of external disturbance.
The limitation that technical solution of the present invention is not limited to the above specific embodiments, it is all to do according to the technique and scheme of the present invention
Technology deformation out, falls within the scope of protection of the present invention.