Based on PID controller and the attitude control method of L1 adaptive controller
Technical field
The present invention relates to aircraft manufacturing technology technology, particularly relate to a kind of based on PID controller and L1 Self Adaptive Control
The attitude control method of device.
Background technology
Unmanned plane is primarily referred to as unpiloted aircraft.Unmanned plane has obtained extensively in terms of military and civilian at present
General application, such as, military investigation, air patrol and search and rescue, the transport of urgent material and input, urban planning, meteorological observation, gloomy
Woods is prevented fires, agricultural plant protection, and power circuit is patrolled and examined with petroleum pipeline, and video display are taken photo by plane, amusement etc..Owing to need not drive on unmanned plane
The person of sailing can avoid performing the casualties in task process completely, and operator can check unmanned plane in ground control centre
Transmit the image returned and status information in real time, detect the progress of unmanned plane tasks carrying and complete effect.Along with unmanned plane
Developing rapidly, Ge great colleges and universities and scientific research institution launch the most one after another to unmanned aerial vehicle (UAV) control and the research of application.
Can the gesture stability problem of unmanned plane be to concern its root problem applied in real life that reliable and stable,
Owing to the mathematical model of unmanned plane has strong nonlinearity, and we cannot obtain its accurate parameter actually, but also
There is the system model that a part cannot model.In the case of cannot obtaining accurate mathematical model, tradition gamma controller exists
In actual application, in the case of there is external disturbance, particularly it is extremely difficult to preferably control effect.
Summary of the invention
The purpose of the present invention is that to solve above-mentioned outside cannot obtaining the most complete mathematical model and existing
The problem of gesture stability during disturbance and provide at the model bias of the compensation system utilizing adaptive strategy real-time online and outer
Realize while boundary's disturbance stability contorting to attitude of flight vehicle system based on PID controller and the appearance of L1 adaptive controller
State control method.
The present invention is achieved through the following technical solutions above-mentioned purpose:
1, a kind of based on PID controller with the attitude control method of L1 adaptive controller, by PID controller to expectation
In the case of the stability contorting of attitude of flight vehicle system, recycling L1 adaptive controller estimates that the disturbance in attitude system is by mistake in real time
Difference, and the agitation error estimated quickly is compensated, comprise the following steps,
(1) expectation Eulerian angles and a certain moment iT are obtainedsActual attitude angle, and calculate the error originated from input of PID controller
Vector, it is thus achieved that the control output signal of PID controller, its computing formula is:
Wherein, the computing formula of error originated from input vector is: ηe=ηd-η;
In formula: ηdIt is the i-th TsMoment desired Eulerian angles, η is 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
Control feedback factor matrix and be positively definite matrix;
(2) according to a upper moment (i-1) TsControl output, update iTsThe state estimation of the L1 adaptive controller in moment
The state value of device, its computing formula is:
In formula: J=diag (Jx,Jy,Jz) it is the moment of inertia matrix of aircraft;
It is 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) TsThe perturbation vector that moment L1 adaptive controller is calculated;
ApBe one for the Hurwitz matrix defining estimation difference convergence property;
(3) by 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 computing formula is:
Wherein: the computing formula of estimation difference vector is:
In formula:It is the i-th TsThe state vector of moment state estimator;
ω is the i-th TsThe angular velocity vector of moment attitude system;
TsThe time interval run for control algolithm;
(4) by low pass filter, the agitation error of L1 adaptive controller being carried out smooth output, its computing formula is:
In formula:Bandwidth for low pass filter;
σ (t) is the input signal of low pass filter, i.e. at the i-th TsMoment agitation error;
τL1Output signal for low pass filter;
(5) the i-th T is calculatedsMoment PID controller and the total output signal of L1 adaptive controller, and by total output signal
Inputting the attitude of the attitude system control aircraft to aircraft, its computing formula is:
τ(iTs)=τPID-τL1
The beneficial effects of the present invention is:
Present invention attitude control method based on PID controller and L1 adaptive controller utilizes PID controller and L1 certainly
Adaptive controller compensates the external disturbance produced aircraft due to internal disturbance and the flight environment of vehicle of modeling error introducing, permissible
Aircraft accurate mathematical model cannot obtained, in the case of there is external disturbance, it is achieved the stability contorting to attitude of flight vehicle,
There is higher robustness.
Accompanying drawing explanation
Fig. 1 is the overall control of attitude control method based on PID controller and L1 adaptive controller of the present invention
Block diagram;
Fig. 2 is the structural representation of quadrotor in detailed description of the invention;
Fig. 3 is that in detailed description of the invention, quadrotor system runs block diagram;
Fig. 4 is the external disturbance that in detailed description of the invention, quadrotor is subject to;
When Fig. 5 is that in detailed description of the invention, quadrotor exists external disturbance, single PID controller roll angle controls effect
Really;
When Fig. 6 is that in detailed description of the invention, quadrotor exists external disturbance, single PID controller angle of pitch controls effect
Really;
When Fig. 7 is that in detailed description of the invention, quadrotor exists external disturbance, the disturbance that L1 Self Adaptive Control compensates
Signal;
When in Fig. 8 detailed description of the invention there is external disturbance in quadrotor, PID controller and L1 adaptive controller
Control roll angle and control effect;
When Fig. 9 is that in detailed description of the invention, quadrotor exists external disturbance, PID controller and L1 Self Adaptive Control
Device controls the angle of pitch and controls effect;
Detailed description of the invention
The invention will be further described below in conjunction with the accompanying drawings:
As it is shown in figure 1, each physical quantity refers to respectively, the expectation reference input vector of system is ηd=(ψd,θd,φd)T, ψd
For desired yaw angle, θdFor the desired angle of pitch, φdFor desired roll angle;η is the actual Eulerian angles vector of aircraft;
τPIDOutput vector is controlled for PID controller;τL1For L1 adaptive controller control output vector after too low filtering;τ=
τPID+τL1Master control for attitude system inputs;ω is the actual angular speed value of attitude system;ωpFor L1 adaptive controller
The state of state estimator.
By desired attitude angle ηdDo difference with actual attitude angle η detected of attitude system at that time, and be sent to PID control
Device processed obtains the output τ of PID controllerPID;Then, exported according to the control in a upper moment, angular velocity and the disturbance of estimation, more
The state value of the state estimator of new L1 adaptive controller obtains ωp;State value ω followed by state estimatorpWith appearance
The magnitude of angular velocity ω of state system calculates and estimates disturbance;Then by low pass filter, the disturbance filtering estimated is obtained τL1;Finally
Calculate PID+L1 adaptive controller output τ=τPID-τL1, it is input in attitude system carry out the gesture stability of aircraft.
In self adaptation feedback circuit, introduce low pass filter, compensate the bandwidth of low pass filter in loop by regulation
Can regulate robustness and the dynamic characteristic of system easily, the bandwidth improving low pass filter can improve the response of system
Speed but also can reduce the robustness of system, although and reducing the bandwidth of low pass filter and can improve stablizing of system simultaneously
Property but simultaneously also can reduce the system rejection ability to disturbance.Both can protect by regulating suitable low pass filter bandwidth
Card system stability improves the rejection ability of system external circle disturbance while avoiding producing high frequency oscillation.
As a example by " cross structure " four rotor wing unmanned aerial vehicle shown in Fig. 2, this unmanned plane includes four motors, and No. 1 motor
In front, in the wings, No. 2 and No. 4 motors lay respectively at the left side and the right of aircraft to No. 3 motors.No. 1 and No. 3 motors are with timing
Clock direction rotates, and No. 2 and No. 4 motors are with counterclockwise rotation.Lift upwards all can be produced during four electric machine rotations, No. 1
With No. 3 motors exist lift poor time aircraft can be made to do elevating movement, No. 2 with No. 4 motors exist lift poor time aircraft can be made to roll
Transhipment is dynamic, can be to aircraft one reverse torsion of generation when No. 1 and No. 3 electric machine rotations, and No. 2 and meeting during No. 4 electric machine rotations
Aircraft produces the torsion of a forward, and when the two torsion is unequal, aircraft can do yawing rotation.
As it is shown on figure 3, four rotor unmanned control systems mainly include several part: remote-control receiver, sensor and attitude
Fusion Module, PID+L1 adaptive control algorithm module and power distribution and execution module.
Remote-control receiver receives control instruction and is converted into corresponding expectation attitude angle and passes to adaptive control algorithm, appearance
State Fusion Module is by gathering the sensing datas such as acceleration, gyroscope, magnetometer and utilizing Kalman's attitude blending algorithm meter
Calculate and export Eulerian angles and the angular velocity of four rotor wing unmanned aerial vehicles.
PID+L1 adaptive control algorithm controls according to the input of desired state and actual attitude state computation PID at that time
Device output, update state estimator, calculate the estimation disturbance after the estimation of disturbance, Filtering Processing smooth, calculating PID
+ L1 adaptive controller exports.
Power distribution and execution module are then that the output according to gesture stability algorithm is calculated four electron speed regulators
Input quantity, and change motor speed control aspect change.
According to the type of four rotor wing unmanned aerial vehicles in this example, we can obtain following relation:
Wherein τ=(τx,τy,τz)TFor the output moment of torsion of attitude controller, τ1,τ2,τ3,τ4It is that four motors rotate generation
Moment of torsion, f1, f2, f3, f4Being lift produced by four motors, L is the aircraft center distance to motor center, and F produces for expectation
The total life of four propellers.Measured we can to obtain a motor defeated with electron speed regulator with the lift that oar produces
Enter the Proportional coefficient K of pwm signalf, and the ratio system of the moment of torsion that produces with oar of motor and electron speed regulator input pwm signal
Number Kτ.And then above-mentioned relation can be converted into:
The pwm control signal P of four motors i.e. can be obtained by resolving above-mentioned system of linear equations1,P2,P3,P4。
When Fig. 4 to Fig. 9 is for only use PID controller when there is external disturbance, the control effect of roll angle and the angle of pitch and
When utilizing PID+L1 adaptive controller, roll angle and the control effect of the angle of pitch.
Fig. 4 is effect disturbance on both axes, and wherein solid line is that to act on amplitude on roll angle be 0.1N*m, and frequency is
The sinusoidal perturbation signal of 2rad/s, dotted line is 0.1N*m for acting on amplitude on the angle of pitch, and frequency is the sinusoidal perturbation of 6rad/s
Signal.Disturbing signal is all effect in the 10th second aboard.
Fig. 5 Yu Fig. 6 is respectively and only utilizes PID controller to control effect, and solid line is desired attitude angle, and dotted line is that aircraft is real
The attitude angle on border.It appeared that when within first 10 seconds, not having external disturbance to affect, the tracking effect of two attitude angle of aircraft is the most not
Mistake, but due to the impact 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, and can compare with Fig. 4 and understand, L1 adaptive algorithm
The disturbance compensated all is very close in amplitude with frequency with actual external disturbance.
Fig. 8 Yu Fig. 9 is respectively roll angle and the angle of pitch under PID+L1 adaptive controller effect external disturbance
In the case of control effect, contrast with Fig. 5, Fig. 6 respectively, the rejection ability of the method for present invention disturbance to external world has had and has substantially carried
High.
The robustness of this example explanation present invention, and the quick rejection ability of disturbance to external world, it is ensured that aircraft exists
Steady normal flight it also is able under the influence of external disturbance.
Technical scheme is not limited to the restriction of above-mentioned specific embodiment, every does according to technical scheme
The technology deformation gone out, within each falling within protection scope of the present invention.