Full text
(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization. AIAA Atmospheric Flight Mechanics Conference and Exhibit 6-9 August 2001 Montreal, Canada A01-37266 AIAA-2001-4257 NONLINEAR FLIGHT CONTROL SYSTEM WITH NEURAL NETWORKS Sergio Esteban* and Dr. S. N. Balakrishnan1^ Department of Mechanical and Aerospace Engineering and Engineering Mechanics University of Missouri-Rolla, Missouri 65401 Abstract In this study an adaptive critic based neural network controller is developed to obtain near optimal control1 laws for a nonlinear automatic flight control system. The adaptive critic approach consists of two neural networks. The first network, called the critic, captures the mapping between the states of a dynamical system and the co-states that arise in an optimal control problem. The second network, called the action network, maps the states of a system to the control. This study uses nonlinear aircraft models in the stall regions from a paper (Garrad and Jordan2^ to develop optimal neural controllers for an aircraft; we then compare the results with singular perturbation based nonlinear controllers developed in the literature. The results show that with the neural controllers the aircraft can operate in a broader region of angles of attack beyond stall as compared to other linear and nonlinear controllers. Introduction Neural networks have gained a lot of attention in the field of control in the last ten years. There are many reasons for this phenomenon. In many fields, including aerospace, engineering systems whose response we want to control are becoming more and more complex. An example is the dynamics of an aircraft at high angles of attack. With dwindling funds for development of new aircraft, missile, space systems etc., activities have increased in using currently existing systems in more stressed environments. A basic requirement for good performance or even stable performance in such situations is the development of proper control systems. Traditional control designs based on classical control theory have proved to be inadequate in such situations. Although a huge amount of time and studies over the past twenty years have been devoted to linear system based robust control, there hardly exists any actual system with robust controllers obtained from norm based theories. Nonlinearities of many dynamic systems have generated interest in the studies beyond the linearized notions in their development. This sets the stage for the field of neural networks (NN), which are basically nonlinear mappings, to offer some solutions. [3"8] In recent years, many papers have been published in neural network controllers. According to Werbos7, these fall under five classes: 1. Supervised Control. 2. Direct Inverse Control. 3. Neural Adaptive Control. 4. Back Propagation Through Time. 5. Adaptive Critic Methods. Adaptive critic designs include a large family of methods, which attempt to approximate dynamic programming in general case. Werbos concludes that the fifth method mimics the working of human brain more than any other technique. The purpose of this study is to demonstrate that for such complex problems, as the aircrafts operating in high angles of attack or near and beyond the stall regions, the use of proper trained adaptive critic based neural networks can effectively produce the control that can keep the aircraft stable for a wider range of initial conditions. This paper is organized as follows; Introduction to the dynamics of the problem is given in Section I. A fairly general optimal control problem is formulated in Section II. The Adaptive Critic Neural Network (ACNN) ant their architecture are introduced in the Graduate Student f Profesor, Associate Fellow, AIAA Copyright © 2001 by Balakrishnan. Published by The American Institute of Aeronautics and Astronautics Inc. with permission 1 American Institute of Aeronautics and Astronautics
(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization. third section. Numerical results from using the ACNN and comparison with some other existing controllers are presented in fourth section. Models to test the robustness characteristics of the ACNN are presented in Serction V. Results from the robustness study are discussed in section VI. Conclusions and future work are presented in sections Section VII. *, X2 *3 = "- 0.877 0 1 T*,~ 0 0 1 *2 -4.208 0 -0.396j_*3_ + " -0.215" 0 _-20.967_ (8) The optimal linear control law1 (to minimize the cost in Eq.(6))is obtained through solving an associated matrix Riccati equation Section I: Nonlinear Automatic Flight Control Systems Garrad and Jordan2 express the nonlinear equations of motion to describe the longitudinal motion of the F-8 Crusader as X = AX + (t>(X) + b^t (1) where X describes the states of the system, X = [x (2) where KI is the angle of attack, x2 is the pitch angle, and x3 is the pitch rate. The matrix A represents the linearized plant of the system: A = (3) -0.877 0 1 0 0 1 -4.208 0 -0.396_ and b represents the control derivative matrix of the system, b = -0.215 0 (4) -20.967 The nonlinear aerodynamics due to high angles of attack are embedded in the extra term -jt,;c3 -O. 0.019;c22 + 0.47*,2 + 3.S46*,3 (5) The control problem is to minimize the quadratic performance index given by (6) where the state weights are, "0.25 0 0 0 0.25 0 0 0 0.25 and the controller weight r is set at 1. The linearized model of the equations to obtain a linear control law is Ai, - -0.053*, + 0.5jt2 + 0.521*3 (9) This linear control and two other nonlinear controllers2 will be used for comparison with the neurocontrollers developed in this study. Garrard and Jordan2 obtain second and third order controllers to help reduce the loss of attitude when the angle of attack exceeds the stall limit. These controllers are designed using singular perturbations to solve the Hamiltonian-Jacobi partial differential equation2 dV1 dVT • dVT dX dx dX with j/(0) = 0 • As demonstrated by Lee and Markus9, the unique optimal feedback control is 0°) _lLr = —r lb —— 2 dX (11) Using singular perturbations of order two and three, they obtain two controllers A*2 = -0.053*, + 0.5*2 + 0.521*3 + 0.04*,2 - 0.048*,*2 (12) jU3 = -0.053*, + 0.5*2 + 0.521*3 + 0.04*,2 - (13) 0.048*,*2 +0.374*,3 -0.312*,2*2 Section II: Optimal Control Formulation We use Neural Network (NN) based architectures and Hamiltonian formulation to develop near optimal control laws for the aircraft problem outlined in Section I. The Hamiltonian for this optimal control problem1 is H = y2XTQX + y2uTRu + tf[AX + $(X) + bu] (I4) The differential equations of the co-states of the system are defined by M-T (ax) (15) (7) Expanding the right hand side of Eq. (15): • r^T-f ( \ A, - —— - -0.25*, - A,(- 0.877 - 2*,*3 - 0.088*3 + 0.94* +11.538*,2) a*, - A,(-4.208- 0.94*, -10.692*,2) =- ——= -(0.25*2 + A2(-2(0.019*2))) dx2 (16) (17) American Institute of Aeronautics and Astronautics
(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization. - 0.088*, )+A2+-A3 0.396) (18) The necessary condition for optimal control1 is dH_ du = 0 Eq. (19) leads to (19) (20) Section III: Neurocontroller Development The Adaptive Critic Neural Network is a feed forward back-propagation architecture consisting of an Action Neural Network (ANN) and a Critic Neural Network (CNN). Each network has its own independent characteristics but at the same time their intrinsic relationship is a key point for obtaining the near optimal control law for a given system. In our problem we have chosen both the ANN and CNN to consist of two hidden layers with hyperbolic tangent sigmoid transfer function, and an output layer with a linear transfer function. The general structure of a neural network used in this study is given in Figure 1. The output for both networks can be defined such: a3 =W3f\W2f\Wlp + bl) + b2) + b3 (21) where the superscript represents each one of the neural network layers, p is the input to the neural network, a is the output of each NN, W is the weight associated with the given layer, b is the bias associated with the weightinput combination and / is the transfer function associated with the layer. The ANN architecture is N3j661 ,i.e. 3 neurons corresponding to the three state inputs, 1 neuron corresponding to the single control output and 6 neurons for the first and second hidden layers. The CNN architecture is N356,6,3 4-e. 3 neurons corresponding to the three states as inputs and three costates as outputs and 6 neurons for the first and second hidden layers. The training algorithm is implemented in MATLAB using the Neural Network Toolbox. Training of the Action and Critic Neural Networks Two networks, the ANN and the CNN, are randomized and trained using the following steps: Training of the ANN 1) The initial CNN is assumed to be optimal. 2) The initial output uft), is obtained by feeding random values of the states Xft), to the ANN. 3) The continuous time nonlinear equations of motion (1) are used to integrate the next state 4) 6) X(t) using the states Xft) and the initial output u(t) of the ANN. The Critic NN is feed the output form step 3, X(t), to calculate The ANN is then trained using Xft) as input and the optimal control, u(t) * (20), as target. Steps 1 through 5 are repeated until the desired level of accuracy for the ANN is achieved. For our problem the level of accuracy is reached when the norm of the errors between the current ANN outputs and the previous trained outputs is below 0.08. iilBillilB^^^^^ l|ii||f^ Figure 1. General Structure of aNN Training of the CNN 1) 2) 3) 4) 5) The ANN is assumed to be optimal. The initial output uft), is obtained by feeding random values of the states Xft), to the of the ANN. The continuous time nonlinear equations of motion (1) and the correspondent co-state differential equations are integrated to obtain The CNN is then trained using Xft) as input and A(Jf(0)* fr°m step 3 as target. Steps 1 through 4 are repeated until the desired level of accuracy for the CNN is achieved. For our problem the level of accuracy is reached when the norm of the errors between the current CNN outputs and the previous trained outputs is below 0.08. Step 5 in the CNN training marks the end of one training cycle for both the ANN and CNN. Training cycles are continued until there is no acceptable change in the outputs of the ANN between cycles. For our problem the level of accuracy required to terminate the training cycles is reached when the norm of the errors between the current ANN outputs and the previous American Institute of Aeronautics and Astronautics
(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization. cycle outputs is below 0.08. At this point the output u(t) * of the Action NN is considered to be optimal. Section IV: Analysis of Numerical Results The response of the aircraft to the three different controllers derived by Garrard and Jordan2 (jUj ,/^2andju3, Eqs. (9), (12) and (13) respectively) were tested against the NN optimal control solutions. At the flight conditions considered for this paper, Mach=0.85 and 30,000 feet (9000 m), the F-8 stalls when the angle of attack is 23.5°. Figure 2 shows the time response of the three states and the elevator deflection for an initial angle of attack of 25.69°, and a pitch angle and pitch rate of 0° and 0°/sec respectively. The initial angle of attack of Figure 2 corresponds to the maximum angle for which the ju1 controller can effectively recover from stall. Beyond this angle the controller cannot effectively recover from stall. The NN solution reaches equilibrium faster than any of the three compared controllers. Figure 3 shows the cost associated to recover from stall for each one of the different controllers. It can be seen that the NN solution has the smallest cost. After these initial results, the initial angle of attack is increased and since the maximum permissible initial value of the angle of attack at which the p,} controller can effectively recover was surpassed, only the ^2 and ju3 controllers are compared with our NN solution. Figure 4 shows the histories of the three states and the elevator deflection for an initial angle of attack of 25.9°, and a pitch angle and pitch rate of 0° and 0°/sec respectively. The initial angle of attack of Figure 4 corresponds to the highest value for which the second order controller ju2 can recover from stall. Once again it can be seen that the NN solution reaches equilibrium faster than any of the two remaining controllers, and it has the smallest cost associated as seen in Figure 5. The initial value of angle of attack is increased until 27°> At this value, out of the three controllers proposed by Garrad and Jordan2, only the ju3 controller can effectively recover from stall. Figure 6 shows the time response for the three states and the elevator deflection for an initial angle of attack of 27°, and a pitch angle and pitch rate of 0° and 0°/sec respectively. Again it can be observed that the NN solution performs better by reaching equilibrium faster. Figure 7 shows the cost associated to recover from stall for the ju3 controller and the NN solution and again it can be seen that the NN controller has the smaller cost. After this initial angle of attack of 27°, none of the three controllers presented by Garrad and Jordan2 can recover from stall. In order to test the limits of our NN solution, we decided to further increase the initial value of angle of attack. Figure 8 shows the results for an initial angle of attack of 30°, and a pitch angle and pitch rate of 0° and 0°/sec respectively. The NN is still able to recover from stall at this angle of attack. Figure 9 shows the cost associated to recover from stall for the NN controller and needs to be noted that even at an initial value of angle of attack of 30°, the cost associated with the NN is smaller than the one from the ju3 controller at 27°. With these results in mind, the initial angle of attack was further increased. Figure 10 shows the time response of the states and the controller history for an initial angle of attack of 35°, and a pitch angle and pitch rate of 0° and 0°/sec respectively. The NN solution is still able to recover from stall, but as seen in Figure 11 the cost associated to recover from stall jumped by an order of magnitude of approximately 5. Beyond an initial angle of attack of 35°, the NN controller was still able to recover from stall but not without exceeding the maximum deflection of 25° that we imposed on the controllers. Section V: Robustness of the Neurocontroller to Model Uncertainties In this section, we formulate the perturbation to the control derivative matrix to study the robustness of the neurocontrollers to model/input uncertainties. Two types of unmodeled uncertainties are studied here in the formulation of the problem: time lag between commanded and actual input control, and inaccurate control effectiveness derivatives. The time lag between commanded and actual input control is modeled with a first order lag as and the controller becomes (22) M (0 = uNN(t) + e~(p(t -1) - uNN(t)) (23) where ju(/)is the elevator deflection, Um(t)^ the ANN commanded control, ju(f-l) is the elevator deflection in the previous step time, and T is the elevator time constant. In this study 1 is varied from 0.1 to 0.01. This type of modeled uncertainties relate to those generated by the physical limitations of actuating a control surface. Unless electrical actuators are used, the hydraulic actuators commonly used in the control surfaces tend to generate a time lag between the American Institute of Aeronautics and Astronautics
(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization. commanded control deflection and the actual control seen by the control surfaces. The study of this type of uncertainties is important since the time constants are difficult to estimate accurately. The second type of uncertainties addressed in this study is inaccurate control effectiveness derivatives. These uncertainties can be encountered in two situations: inaccurate prediction of the elevator control surfaces derivatives, CL5e and CMSe, or in the event of the loss of a percentage of the control surface. This uncertainty can be modeled as: X = AX + (j>(X) + b(\ - Dun )n (24) where Dm is the percentage of decrease in elevator effectiveness (for example Dm =0.15 represents a loss of 75% in the elevator effectiveness). In this study Dun is varied from 0.0 to 0.75 (i.e. a decrease in elevator effectiveness of 75%). Section VI: Analysis of Robustness' Results In order to analyze the inherent robustness of this controller to model uncertainties, several cases were studied by varying the elevator time constant r and the elevator effectiveness Dm and are compared with the desired ACNN solution free of model uncertainties. All simulations have an initial pitch angle 9=5° and an initial pitch rate g=5°/sec. In the first part of the analysis, only T and a(0) are varied. After that, the robustness to elevator effectiveness variation is analyzed by varying Dm and a(0). Finally both 1 and Dun , along with the initial value of the angle of attack are varied. Figure 12 shows the time response for the states and Figure 13 shows the control history with a time lag model uncertainty where x=0.1 and a(0)=3Q°. From Figure 12, we observe that the response of the states and reaching equilibrium is slower as compared to the no-lag case, but the NN solution with time lag is still able to recover from stall at these initial conditions. Figure 13 shows that the elevator deflection response for the NN solution with time lag uncertainties is slower as expected than the desired ACNN control. Figures 14 and 15 are representative cases of elevator effectiveness model uncertainties, with Dm =0.75 (i.e. 75% decrease in elevator effectiveness) and a(0)=3Q°. The model uncertainties introduced in the elevator effectiveness produce a smaller available control deflection as seen by Figure 15, and the states require longer time to recover from the initial perturbation of the states but the NN solution with model uncertainties is still able to recover from stall at these initial conditions. Next stage of analysis involved testing the robustness with the neurocontrollers when uncertainties exist in both time lag and elevator effectiveness. Figure 16 shows the time response for the following initial conditions: Dun=Q.75, i=0.1 and a(0)=3Q°. Figure 16 shows that despite the slower response of the elevator deflection, the NN controller with model uncertainties is still able to recover from stall after decreasing the elevator effectiveness by 75% and with a T=Q.l The influence of the reduction of the elevator effectiveness and the time lag can be seen in Figure 17 when compared with the desired NN elevator deflection. After these results it was decided to further stress the aircraft by starting with a high initial value of the angle of attack, a(0)=35°. The model uncertainties were the same as the previous case: Dw/7=0.75 and i=0.1. The time response of the states is shown in Figure 18, and it can be seen that they are slower than those of the desired ACNN solution. Figure 19 shows that the elevator deflection requires more control but is still able to recover from stall even with such extreme model uncertainties. Section VII: Conclusions A dual NN solution for nonlinear optimal control problems has been presented. The neuro-controller extends the stable region of operations for the aircraft considered considerably. Further it has been shown that the dual NN controller posses inherent robustness characteristics that allow the aircraft to operate with high levels of model uncertainties. Future Work We have derived some analytical expressions for robustness for unmodeled to input uncertainties using extra control formulation10. It is expected that using such expression the stability derivatives uncertainties and input uncertainties such as those derived from time lag can further be increased. Acknowledgement This study was supported in part by a grant from National Science Foundation ECS-9976588 and a by a U.S. Army Space and Missile Defense Command Grant No. DAS60-99-C-0069. American Institute of Aeronautics and Astronautics
(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization. References 1. A. E Bryson and Y. Ho, "Applied Optimal Control," Hemisphere Publishing Co., 1975, pp. 128-211 2. W. L. Garrard and M. Jordan, "Design of Nonlinear Automatic Flight Control Systems." Automatica. Vol 13, pp 497-505, 1977 3. D.A. White and D.A. and Sofge, "Handbook of Intelligent Control", Van Nostrand Reinhold, New York, 1992, Ch. 3,5,8,12,13 4. S. N. Balakrishnan and V. Biega, "Adaptive Critic Based Neural Networks for Aircraft Optimal Control," Journal of Guidance, Control and Dynamics, Vol. 19, No. 4, July-August 1996, pp. 893-898 5. S.N. Balakrishnan and G. Saini, "Adaptive Critic based Neurocontroller for Autolanding of Aircraft with Varying Glideslopes," Proceedings of IEEE International Conference on Neural Networks, vol.4, 1997, pp. 2288-2291 6. C.W. Anderson, "Learning to Control an Inverted Pendulum using Neural Networks," IEEE Control Systems Magazine, April 1998, Vol. 9, pp. 33-37 7. P.W. Werbos, "Neurocontrol and Supervised Learning: An Overview and Evaluation," Handbook of Intelligent Control, Van Nostrand Reinhold, 1992 8. M. T. Hagan, H. B. Demuth, and M. Beale, "Neural Network Design," PWS Publishing Company, 1998, Boston. 9. E.B. Lee and L. Markus, "Foundations of Optimal Control Theory." John Wiley, New York, 1967 10. S.N. Balakrishnan and Zhongwu Huang, "Robust Adaptive Critic Neurocontrollers For Systems With Input Uncertainties", Proceedings to the IEEE conference 2000. 6 American Institute of Aeronautics and Astronautics
(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization. Figure 2. States & Control History for a(0) =25.69° Figure 5. Cost History for a(0) =25.9° Figure 3. Cost History for a(0) =25.69° Figure 6. States & Control History for a(0) =21° ""^ ••- ^Order - • Neural Network -^, ——— ,.„_, 11 mi mtmm illis [•• '/' ^ /'.'''' 1 •>/•--'' l /' :.;TV:-,^——— — - ^Order •"• Border -- Neural Network Figure 4. States & Control History for a(0) =25.9 . '/' .--?-•**- — ' ——— - •••- ^Order ^Order - - Neural Network Figure 7. Cost History for a(0) =27° American Institute of Aeronautics and Astronautics
(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization. Figure 8. States & Control History for a(0) =30' Figure 11. Cost History for a(0) =35° Figure 9. Cost History for a(0) =30° Figure 12. State History for 1=0.1 and a(i9; =30° Figure 10. States & Control History for a(0) =35° isired control - |xd levator deflection with model uncertainties - Figure 13. Control History for 1=0.1 anda(0;=30° American Institute of Aeronautics and Astronautics
(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization. Figure 14. State History for Dm =0.15 (75% decrease in elevator effectiveness) and a(0) =30° —— Desired control - u.d ..... Elevator deflection with model uncertainties - u. Figure 17 Control History for Dun =0.75,1=0.1 a(0)=30° —— Desired control - u.d ---- Elevator deflection with model uncertainties - u. Figure 15 Control History for Dm =0.75 (75% decrease in elevator effectiveness) and a(0) =30° Figure 18. State History for ^=0.75,1=0.1 arc; =35° Figure 16. Robustness State History for 1^=0.75,1=0.1 Desired control - |id Elevator deflection with model uncertainties - u. Figure 19. Robustness Control History for Dun -0.75,1=0.1 a(0)=35° American Institute of Aeronautics and Astronautics