Paper Number 05WAC-73
Adaptive Autopilot System for Small Fixed Wing UAVs Steve Rogers, Steve Yokum, Kristian Hammaker Institute for Scientific Research Copyright Š 2005 SAE International
ABSTRACT Small low cost UAV autopilot systems (research and fielded platforms) in use today are severely restricted in their operational capability and quite costly with respect to their operational capability. The size of the UAV introduces unique problems in the development of Guidance, Navigation, and Control (GNC) algorithms since aerodynamic models of the vehicle are difficult to define and are specific to each airframe. These low Reynolds number vehicles are subjected to varying environmental flight conditions during flight that must be addressed. Constructing a small footprint flight computing system is difficult due to the limited availability of low cost small footprint computing systems with the computational power, memory, and interfaces to support a variety of applications and research. This paper presents a low cost adaptive GNC system and an adaptive control law. The system is named Reconfigurable Autopilot for Vehicles with Enhanced Navigation (RAVEN), which addresses these issues.
handled by Kalman filters and our system is no exception. The equations of motion of the airframe must be formulated in such a way as can be accommodated by the Kalman filter. Small low cost airframes are subject to various disturbances, including wind gusts, effects of different flight conditions, fuel consumption, and non-avionics sensor package change out between missions. The flight control system must adjust to the varying dynamics caused by these disturbances. Numerous adaptive control laws, including model-reference adaptive control (MRAC) have been developed and implemented 7, 8 over the past decades . One of the MRAC methods will be outlined in this paper and 10 applied to an aerosonde model.
INTRODUCTION The RAVEN is a low cost adaptive autopilot flight control system that can be reconfigured to support a variety of applications for man portable class UAV systems. The system architecture of the RAVEN is a modular approach that decouples the flight processing functions from the sensor Digital Acquisition (SDAQ) functions by utilizing two dedicated micro-processing units, Flight Processing Unit (FPU) and a Sensor DAQ (SDAQ). A low cost Ground Control Station (GCS) was also developed to control and monitor the RAVEN via a full-duplex 115 Kbps RF data link. The System Architecture in Figure 1 depicts the processing functions that occur in the FPU, SDAQ, and the GCS. Since low cost sensors are used, data fusion is necessary on all but short missions due to sensor drift and bias. Much sensor fusion is
Figure 1 RAVEN System Architecture
AUTOPILOT One of the research activities of RAVEN is to develop the low-level autopilot compensation. Within this activity there are major tasks including data fusion of sensors and a direct adaptive proportional integral controller. The RAVEN sensor suite consists of accelerometers,
gyros, GPS, and compass (option). Low cost sensor suites do not directly provide roll, pitch, and yaw angles. These must be derived using the standard aerodynamic translation, kinematical, and navigation equations, as shown 1-5 below .
u& = − g sin θ + A x + vr − wq v& = g sin φ cos θ + A y − ur + wp w& = g cos φ cos θ + A z + uq − vp
φ& = p + q sin φ tan θ + r cos φ tan θ θ& = q cos φ − r sin φ ϕ& = q sin φ sec θ + r cos φ sec θ
described by
y p =G p ( s ) u p = k p
Z p (s)
u Rp (s) p
, where the
number of poles is one greater than the number of zeros, i.e., the relative degree of the plant is one. A reference model is
Z (s) y m =Wm ( s ) r = k m m r Rm ( s )
and is chosen to have the same relative degree as the plant. It is assumed that Z p (s) is stable. A 7
control law without adaptation is : w&1 = Fw1 + gu p , w1(0) = 0 w& 2 = Fw2 + gy p , w2 (0) = 0 up = θTw
[
w = w1T , w2T , u p , y p
]
x& cosθ cosϕ (sinφ sinθ cosϕ − cosφ sinϕ) (cosφ sinθ cosϕ + sinφ sinϕ)u & y = cosθ sinφ (sinφ sinθ sinϕ + cosφ cosϕ) (cosφ sinθ sinϕ − sinφ cosϕ)v z& − sinθ w sinφ cosθ cosφ cosθ
In the above equations, Ai are the linear accelerometer measurements, [u, v, w] are the UAV body velocities, [x, y, z] are the navigation positions, and [p, q, r] are the angular rates as given by the on-board rate gyros. The compass measures roll, pitch, and yaw angles with a magnetic bias. Also, the body angles may be approximated by accelerometers. An extended Kalman Filter may be constructed with [Ai, p, q, r, x, y, z] as the measurement vector and [u, v, w, φ, θ, ψ] as the estimated state vector. The autopilot, as shown within Control Law CSC in Figure 2, is intended to receive guidance set points and provide stability for roll, pitch, and yaw. Heading, altitude, and airspeed set points will also be tracked with the intention of providing various maneuvers. Since a variety of airframes may be used and the airframe parameters are normally time varying the autopilot must adjust accordingly. Consequently, it was decided early on to develop an adaptive control law architecture. The autopilot was coded in simulink and the overall simulink diagram for the autopilot is shown below. This portion of the simulink diagram is autocoded for download to the target RAVEN processor. The adaptive control portion is based on 78 Ioannou’s update laws . Consider a plant
Figure 2 simulink Control Law CSC The above approach can be supplemented with the measurement rate as: w&1 = Fw1 + gu p , w1(0) = 0 w& 2 = Fw2 + gy p , w2 (0) = 0 w& 3 = Fw3 + gy& p , w2 (0) = 0 up = θTw
[
w = w1T , wT2 , w3T , u p , y p , y& p
]
In both cases above the coefficient vector θ is estimated according to an update law. Adding the rate term permits the control law to handle non-minimum phase plants and plants with relative degree two by providing a lead term. The 78 coefficient vector θ may be updated by :
SIMULATION
kp m .
θ& = −Γe1w sgn (ρ ) = −Γe1w sgn k e1 = y p − y m
78
The above strategy is a direct MRAC scheme . Examples of the strategy follow. Consider the plant
yp =
(s
k p (s + b0 ) 2
+ a1 s + a 0
)
up .
The reference model may be specified as
ym =
1 r. (s + a m )
In order to test the direct adaptive control 10 concept a simulation of the aerosonde prebuilt model was modified slightly for use. The aerosonde UAV 6DOF simulink model is included in the AeroSim blockset. It is a small autonomous airplane designed for weatherreconnaissance and remote-sensing missions. The existing PID control laws were replaced with adaptive control laws given above. The control laws were coded using the embedded matlab function in order to use the autocode function. The embedded matlab function allows the user to utilize basic matlab scripts in an autocodable environment. The architecture is shown in Figure 3.
The control law then becomes
w& 1 = Fw1 + gu p , w1 (0) = 0 w& 2 = Fw2 + gy p , w2 (0) = 0 up = θT w
θ = [θ 1 , θ 2 , θ 3 , θ 4 ]
[
w = w1T , w2T , u p , y p
]
T
F = −2, g = 1 θ&i = −γ i e1 wi , i = 1, K ,4 e1 = y p − y m normally works well for typical small stable UAV’s. Note that the coefficient update law is decoupled. If we add the lead term we have
w& 1 = Fw1 + gu p , w1 (0) = 0 w& 2 = Fw2 + gy p , w2 (0) = 0 w& 3 = Fw3 + gy& p , w2 (0) = 0 up
=θT w
θ = [θ 1 , θ 2 , θ 3 , θ 4 , θ 5 , θ 6 ] T & w = w1T , wT 2 , w3 , u p , y p , y p F = −2, g = 1 θ&i = −γ i e1 wi , i = 1, K ,6 e1 = y p − y m The above control system with a lead term will accommodate non-minimum phase systems that are also unstable.
Figure 3 Direct Adaptive Controller with Lead The matlab script is shown below in Figure 4. function [y1,y2] = MRAC(yp,ypdot,ym,gam,... up,w,th) wvec = zeros(3,1); thet = zeros(6,1); Ts = 1/20; err = (yp - ym)/(1 + w'*w); F = -1; g = -F; thet = [th(1:6)]; wvec = w + Ts*(F*w + g*[up;yp;ypdot]); wv = [wvec',yp,ypdot,ym]; thet = thet - (diag([gam])*err*wv'); up = wv*thet; y1 = [up;wvec]; y2 = [thet];
Figure 4 Embedded matlab function script
The wind disturbances in the aerosonde model are set at north wind speed = 10 m/s and east wind speed = 5 m/s. Two of the control channels will be shown in this paper – bank angle and airspeed. The bank angle setpoint is 0 radians and is controlled by the aileron differential position. The airspeed setpoint is varied between 19 and 24 m/s and the airspeed is controlled by elevator position. The results are shown in Figure 5. The results indicate gradual improvement as is expected from an adaptive system. There is some excessive noise in the elevator command signal, although it gradually improves. The following adaptive gains were determined through optimization, [-5.7952e-007 6.3132e-007 1.1818e-005 5.7335e-008 5.0338e-003 -1.3772e-009]. The adaptive gains are called gam in Figure 4 above.
Figure 5 Simulation results for MRAC control
CONCLUSION The RAVEN is a low cost adaptive autopilot flight control system that can be reconfigured to support a variety of applications for man portable class UAV systems. The system architecture of the RAVEN was presented. A direct adaptive MRAC approach to autopilot control was presented. A simulation against a commonly used 6 DOF small UAV model was implemented that show results that warrant further investigation. Future research will include finding ways to reduce the noise in the command signals and flight-testing integrated into the RAVEN with various airframes and weight configurations.
ACKNOWLEDGMENTS This research activity is supported by internal funding from the Institute for Scientific Research.
REFERENCES 1. Ridgely, D., ‘The Full Linear Equations of Motion for a Rigid Missile’, Raytheon Systems Company Internal Report, Tucson, AZ, March 2, 2000. 2. Roskam, J., Airplane Flight Dynamics and Automatic Flight Controls, 1995, DARcorporation, ISBN 1-884885-17-9 3. Nelson, R., Flight Stability and Automatic nd Control, 2 Edition, 1998, McGraw-Hill, ISBN 0-07-046273-9. 4. Stevens, B., and Lewis, F., Aircraft Control and Simulation, 1992, Wiley, ISBN 0-47161397-5. 5. Kingston, D., etal, ‘Autonomous Vehicle Technologies for Small Fixed Wing UAVs’, 2nd AIAA "Unmanned Unlimited" Conf. and Workshop and Exhibit, San Diego, California, Sep. 15-18, 2003 AIAA-20036559. 6. Widrow, B. and Walach, E., Adaptive Inverse Control, 1996, Prentice Hall, ISBN 0-13-005968-4. 7. Ioannou, P. and Sun, J. Robust Adaptive Control, 1996, Prentice Hall, ISBN 0-13439100-4. 8. Tao, G. etal, Adaptive Control of Systems With Actuator Failures, 2004, ISBN 185233-788-5. 9. Sundararajan, N. etal, Fully Tuned Radial Basis Function Neural Networks for Flight Control, 2002, Springer, ISBN 07923-7518-1 10. Unmanned Dynamics, ‘Aerosim Aeronautical Simulation Blockset Users Guide,’ version 1.1, http://www.u-dynamics.com
CONTACT Steve Rogers, srogers@isr.us Steve Yokum, syokum@isr.us Kristian Hammaker, khammaker@isr.us