PLACE N RETURN BOX to removo this checkout from your rooocd. TO AVOID FINES return on or baton dd. duo. =——_—__———_1 DATE DUE DATE DUE DATE DUE "a c 5 «w: ‘ MAY 2 0 2801 3W 62521101 L we»: I7 002002 PP I [fifil MSU Is An Affirmative AMqual Opponunfly Institution ADAPTIVE CONTROL OF NONLINEAR SYSTEMS USING NEURAL NETWORKS By Fu-Chuang Chen A DISSERTATION Submitted to Michigan State University in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY Department of Electrical Engineering 1990 ABSTRACT ADAPTIVE CONTROL OF NONLINEAR SYSTEMS USING NEURAL NETWORKS By Fu-Chuang Chen Layered neural networks are used in the adaptive control of nonlinear discrete-time systems. The control algorithm is described and two convergence results are provided. The first result shows that the plant output converges to zero in the adaptive regulation system. The second result shows that the error between the plant output and the reference command converges to a bounded ball in the adaptive tracking system. Computer simulations verify the theoretical results at the end of this thesis. 11 To my parents, Chan-Chwang Chen and Hu Li-Shueh Chen and my wife Hway-Ming Ker iii ACKNOWLEDGEMENTS I wish to thank Dr. Hassan K. Khalil for his Patience and Guidance; and my committee members, Dr. R. O. Barr, Dr. P. M. FitzSimons, Dr. C. R. MacCluer, Dr. F. M. A. Salam, and Dr. R. Schlueter, for their help and valuable suggestions. 1v TABLE OF CONTENTS . LIST OF FIGURES ............................................ vii 1. INTRODUCTION ............................................ 1 1.1 Neural Computing Research ............................... 2 1.2 Neural Networks in Control ............................... 3 1.3 Feedback Linearization of Minimum Phase Nonlinear Discrete-Time Systems ........................... 9 2. LINEARIZING FEEDBACK CONTROL ......................... 12 3. ADAPTIVE CONTROL USING NEURAL NETWORKS ............. 20 3.1 Method 1 ............................................ 20 3.1.1 Control Law for Method 1 ......................... 23 3.1.2 Updating Rule for Method 1 ....................... 25 3.2 Method 2 ............................................ 26 3.2.1 Control Law for Method 2 ......................... 27 3.2.2 Updating Rule for Method 2 ....................... 27 3.3 Comparison between Method 1 and Method 2 ................ 28 4. CONVERGENCE RESULT: PART ONE ......................... 29 5. CONVERGENCE RESULT: PART TWO ......................... 40 6. SIMULATION .............................................. 56 6.1 Identification ......................................... 57 6.2 Regulation using Neural Networks without Bias Weights ......... 63 6.3 Regulation using Neural Networks with Bias Weights ........... 71 6.4 Tracking: 1. The Plant is Stable ........................... 78 6.5 Tracking: 2. The Plant is Unstable ......................... 85 6.6 Controlling a Relative-Degree-Two System: 1. The Pendulum ..... 92 6.7 Controlling a Relative-Degree-Two System: 2. The Inverted Pendulum ............................. 96 V 7. CONCLUSION ............................................ 100 REFERENCE ............................................... 102 v1 LIST OF FIGURES Figure 1.1 .................................................... 3 Figure 1.2 .................................................... 6 Figure 1.3 .................................................... 7 Figure 1.4 .................................................... 8 Figure 3.1 ................................................... 21 Figure 3.2 ................................................... 23 Figure 3.3 ................................................... 24 Figure 3.4 ................................................... 26 Figure 5.1 ................................................... 42 Figure 5.2 ................................................... 44 Figure 6.1 ................................................... 56 Figure 6.2 ................................................... 60 Figure 6.3 ................................................... 61 Figure 6.4 ................................................... 62 Figure 6.5 ................................................... 66 Figure 6.6 ............... ‘ .................................... 67 Figure 6.7 ................................................... 68 Figure 6.8 ................................................... 69 Figure 6.9 ................................................... 70 Figure6.10............ ....................................... 73 Figure 6.11 ................................................... 74 Figure 6.12 ................................................... 75 Figure 6.13 ................................................... 76 Figure 6.14 ................................................... 77 Figure 6.15 ................................................... 79 Figure 6.16 ................................................... 80 V11 Figure 6.17 ................................................... 81 Figure 6.18 ................................................... 82 Figure 6.19 ................................................... 83 Figure 6.20 ................................................... 84 Figure 6.21 ................................................... 86 Figure 6.22 ................................................... 87 Figure 6.23 ................................................... 88 Figure 6.24 ................................................... 89 Figure 6.25 ................................................... 90 Figure 6.26 ................................................... 91 Figure 6.27 ................................................... 92 Figure 6.28 ................................................... 94 Figure 6.29 ................................................... 95 Figure 6.30 ................................................... 97 Figure 6.31 ................................................... 98 Figure 6.32 ................................................... 99 viii 1 Introduction Linearization by feedback [15] is a promising approach to the control of nonlinear systems. The essence of the idea is to transform a state space model of the plant into new coordinates where nonlinearities can be canceled (fully or partially) by feedback. The major challenge in performing such cancellation is the need to know precise models of the nonlinearities. One approach to address this challenge is to use adaptive control where the controller learns the nonlinearities on line. This idea has been investigated for continuous-time systems [17,18] assuming that the nonlinearities can be parametrized linearly in some unknown parameters. In this thesis we investigate a similar scheme for discrete-time systems, but we do not assume that the nonlinearities depend linearly on unknown parameters. Instead, we explore the use of layered neural networks to model the nonlinearities. In the discrete-time self-tuning adaptive control scheme, the linearizing control is generated from the information provided by the neural network. Then, the observed error is used to train the neural network to improve its approximation of the unknown nonlinear plant. A review of neural network research is given in sections 1.1 and 1.2 in chapter 1. Section 1.3 provides some background for feedback linearization. In chapter 2 we derive output feedback linearizing control for a discrete-time non- linear system represented by an input-output model. The relative degree of the system could be higher than one. In chapter 3, a neural network architecture is suggested for modeling nonlinear systems. We will describe two different methods for apply- ing layered neural networks to adaptive control problems and provide the associated learning rules. The theoretical results of this research are presented in chapters 4 and 5. In these two chapters, we show local convergence properties based on differ- ent network models and different learning rules. Simulation results are provided in 1 INTRODUCTION 2 chapter 6. Chapter 7 is the conclusion. 1.1 Neural Computing Research Theoretical brain research has been published in the contexts of theoretical biology, mathematical psychology, cybernetics, pattern recognition, the theories of adaptive systems, and others. Recently the terms “neural computing” and “neural networks” have been adopted to address more practical issues such as vision, sensory-motor control, associative memory, supervised learning, unsupervised learning, robotics, etc. Although these studies have rather diverse origins, they often have one common objective : to implement new types of computers. Traditional digital computers do very well on tasks which we know how to proceed to solve. However, it is very difficult to program a digital computer to solve problems such as vision and speech recognition. The reasons are: first, we do not have enough information about how these tasks are actually done in the brain; second, even if suf- ficient knowledge is available about the function of the brain, it may be incomputable by digital computers. The result of decades of research in artificial intelligence may justify the arguments above. The most successful subfield in A1 is expert system. Ex- pert systems are programs whichsolve specific problems using information collected from domain experts. In contrast, the results are much more limited when applying AI techniques to vision and language understanding problems. Artificial neural networks are networks of processing elements (i.e., “neurons”) that are interconnected. Each neuron can have multiple input signals, but only one output signal. Different interconnection topologies and learning rules determine dif- ferent neural network paradigms. Artificial neural networks are considered models of the brain, and they are intended to interact with the real world in the same way as the biological nervous systems do (at least for the original purpose). Most existing 1 INTRODUCTION 3 neural network architectures are constructed to reproduce specific brain functions. Since our knowledge about how brain functions is still very limited, existing artificial neural networks may be too simple compared with their biological counterpart. How- ever, as our knowledge and experience increase, new and more sophisticated neural network models will replace the old ones. “Neural computing” became a very hot research area starting from the mid 80’s. Not all research efforts in this field are biologically motivated. In particular, in engi- neering applications, artificial neural networks can be viewed as some new tools which seem able to attack traditionally difficult problems. Historical reviews and current developments in neural computing can be found in [20,21,22]. 1.2 Neural Networks in Control Figure 1.1 A layered neural network with two nonlinear hidden layers 1 INTRODUCTION 4 In this section we concentrate on the discussion of layered neural networks, since they are the most prevailing network architecture studied for identification and control ap- plications. A layered neural network, shown in Figure 1.1, consists of an input layer, an output layer, and at least one layer of nonlinear neurons. The nonlinear neu- rons sum incoming signals and generate output signals according to some predefined functions. The neurons are interconnected layer by layer. The output of one neuron multiplied by a weight becomes the input of adjacent neurons of next layer. Layered neural networks have good potentials for control applications because they can approximate nonlinear functions. it was noted more than two decades ago by Minsky and Papert [23] that by inserting “nonlinear hidden neurons” between the input layer and the output layer, the XOR mapping (which is a nonlinear mapping) can be represented by the network. Recently, it is shown by Funahashi [24], Cybenko [25], Hornik et a1. [26], and Hecht-Nielson [3], using different techniques, that layered neural networks can approximate any “well-behaved” nonlinear function to any de- sired accuracy. The theorem shown by Funahashi is quoted here. Theorem Let ¢(:r) be a nonconstant, bounded and monotonically increasing continuous func- tion. Let K be a compact subset of R" and f(:c1, . . . ,mn) be a real valued continuous function on K. Then for any 6 > 0, there exists an integer N and real constants Cg, 0,-(i=1,...,N), w,j(i= 1,...,N,j = 1,...,n) such that N n f(xl,...,xn) = gagging-x,- —o,-) (1) i=1 j=l <6. satisfies maxzex |f(:r:1, . . . , xn) - flxl, . . . , at“) In other words, given any function f (1:1, . . . , it“) and any arbitrary e > 0, there exists a three-layer network f(:r:1,. . . ,2") with linear input and output layers and with a hidden layer whose output functions are 49(2), such that 1 INTRODUCTION 5 maxzex ]f(a:1, . . . ,zn) — f(xl, . . . , :rn)] < 6. Similar result for neural networks with more than one hidden layer can be derived from the theorem above or be shown from scratch [24]. Notice that the theorem is an existence result. It does not give an estimate of the number of neurons needed to approximate a nonlinear function given a specified error bound, nor does it say how to choose the weights. In control applications some ad hoc procedures are used to determine a suitable size of the network. The next crucial issue is to train the network to approximate a given function. The back propagation algorithm [1] is a widely accepted method to train a neural network to approximate a function. If there is difference between the function output and the network output for the same input, the difference can be used in the back propagation algorithm to adjust the weights in the neural network in order to reduce the error. The training is usually a time consuming process, and researchers are suggesting modifications to the original back propagation algorithm to increase the learning speed [32,33]. There is no theoretical result available yet about the convergence of the training. However, many applications reported in the literature have confirmed the value of applying layered neural networks to various problems, e.g. [1 - 14]. Some recent papers on the application of neural networks to control and identifi- cation problems are reviewed in the following examples. Example 1.1 : [4,5,6] If the input vector U (k) of a nonlinear system can be uniquely determined by its output vector Y(k) through a static mapping U(k) = f(Y(k)), then layered neural networks can be used to learn this mapping and generate controls. 1 INTRODUCTION 6 For example, the dynamical equations of robotics can be rearranged into UUC) = f(q(k),€l(k), (b) “—3 Neural Net K I —_—————-—————— \ Figure 1.2 See Example 1.1 of Section 1.2 for description. 1 INTRODUCTION 7 Example 1.2 : [7] Consider a dynamical system $(k +1) = f1(x(k),U(k))- Assume that the order of the plant (i.e., the number of the states) is known, say n, and that the states are physically measurable. The states at k + 2 are 9506+?) = f1($(k+1),U(k+1)) = f1(f1($(k),U(k)),U(k+1)) = f2($'(k),U(k),U(k+1))- Repeating the process, one concludes that the states at time k + n is determined by the state at time k and the controls from time k to (k + n — 1), i.e., $(k + n) = fn(1‘(k),U), (2) where U = [u(k),u(k +1),...,u(k + n —1)]T. Assume that equation (2) is uniquely invertible for U. Then U can be solved as U = 902(k), 2(k + n))- (3) x(kl E II, Uc Neural, Net ———> ___) I X(k+nl j u—uc Figure 1.3 See Example 1.2 of Section 1.2 for description A layered neural network, as shown in Figure 1.3, can be used to approximate (3). U. = éizik), mu: + n). W) At each time step k the training of the neural network can be described as follows: 1 INTRODUCTION 8 0 Input the states :c(k — n) and :c(n) to the neural network. 0 The error (U — Uc) is used to update the weights of the neural network. It was suggested to implement this learning and control scheme on line. C) Example 1.3 : [8,9] Dynamical Systems Identification. Layered neural networks can be used to iden- tify a class of unknown nonlinear functions y(k+ 1) = f(y(k)vy(k_1)1°"3y(k_n+1)au(k)au(k —1),...,u(k—m+ 1))3 where n _>_ m. As depicted in Figure 1.4(a), this is essentially a function approxima- tion problem. At each time step k, the control u(k) as well as all of the relevant past inputs and outputs are applied to the neural network input layer. The error between the output of the neural network and the plant output y(k + l) is used to train the network. u(k) ' (k) Neural Network 7% + (a) Ym Model [9‘ " l' 9 e N Neural Net (N) : C>————>° i it? + U + Controller Plant y (b) FigLre 1.4 See Example 1.3 of Section 1.2 for description. 1 INTRODUCTION 9 Adaptive Control. For a special class of nonlinear unknown systems such as y(k+1) = f(y(k),y(k-1),-u,y(k-n+1))+9(y(k),y(k-1),.-.,y(k-n+1))u(k). where the control u(k) appears linearly, layered neural networks can be used in the Self-Tuning framework (Figure 1.4(b), with the Model block as l) or in the Model Reference framework (Figure 1.4(b)) to adaptively control the system. The neural network is used to learn the characteristics of the plant on line and generate appro- priate controls to be applied to the plant in order to cancel the plant (self-tuning) or control the closed-loop system to follow the output of a desired model (model reference). Details about neural-network-based self-tuning adaptive control will be provided in chapter 3. D There are other approaches suggested in recent papers. In [10] and [2], neural nets are used directly as controllers, but this approach bears a less direct connection to traditional control design methods. Other works include the application of the CMAC neural networks to robotics control problems [11] and the Reinforcement Learning Problems [12]. Favorable simulation results related to these techniques are available in the references listed. The research in applying neural networks to control problems is still at the stage of proposing ways to incorporate neural networks into control systems. Few theoretical results are available to date, although there have some attempts to obtain theoretical results [13,14]. 1.3 Feedback Linearization of Minimum-Phase Nonlinear Discrete Time Systems The concept of zero dynamics and the minimum phase property for nonlinear continuous- time systems were introduced by Isidori and coworkers [15]. They were adapted to the discrete-time case by Monaco and Normand-Cyrot [16]. Consider a single- 1 INTRODUCTION 10 input / single-output system of the form: $(k+1) = f($(k),U(k)) (4) 3106) = h(3:06)) with x(k) E R", u(k) E R, y(k) E R, and f and h analytic functions on their domains. Denoting by fo the undriven state dynamics f(-,0) and by f3 the j-times iterated composition of f0. The system is said to be of relative degree d if 6h 0 f: o f(:r,u) Bu 50 OSk 1. Second, since f0 and go depend on past inputs, the system may become internally unstable after the feedback control, if it exists, cancels the plant dynamics. These two issues are well known for linear discrete-time systems [19,27]. Especially it is shown in [27] that the system (10) can be Converted into 13-] m+d—l yk+d = Zaiyk—i‘l' 2 dark-.- i (11) i=0 i=0 2 LINEARIZING FEEDBACK CONTROL 13 11-1 m+d-1 = [Z aiyk—i + Z fltuk—i] + flour: i=0 {:1 Then the control uk in (11) can be determined in terms of past inputs and past outputs to cancel the plant dynamics, and the effect of the control uk will show up at the plant output d steps later. The purpose of this section is to derive the nonlinear counterpart of (11) for the nonlinear system (9) and to define the zero dynamics associated with (9). The work of Monaco and Normand-Cyrot [16] suggests that important properties of system (9) may be revealed if the system is put into state space form and some suitable coordinate transformation is performed on the model. We select the state variables as the current output and all past inputs and outputs up to the most delayed input or output on the right—hand side of (9), i.e., 171(k) = Inc-n+1 $n-l(k) = yk-l 311(k) = yk tin-HUB) = uk—d-m+l $n+m+1(k) = Uk-d+1 zn+m+d-l(k) = uk-l: Let x(k) be the state vector. A state space model of (9) is constructed accordingly as 131(19‘1’1) = 332(k) 2 LINEARIZING FEEDBACK CONTROL 14 x..-,(k+1) = 2:..(k) (12) xn(k+1) = f0(xn(k)axn-l(k)v”'731(k):xn+m(k)axn+m-l(k)a'°-axn+l(k)) +go($n(k),---,$1(k),xn+m(k),---,xn+1(k))$n+m+1(k) = f0(xl(k)a”"xn+m(k))+90(x1(k)i'°-a$n+m(k))$n+m+l(k) xn+1(k+1) = $n+2(k) $n+m+l(k+1) : xn+m+2(k) $n+m+d-l(k+l) = "4: 3106) 2.06)- There are (n + m + d — 1) states. The state space representation (12) is, in general, a nonminimal realization. However, no difficulty arises from working with this non- minimal realization since the redundant dynamics are stable (for linear systems the uncontrollable/ unobservable eigenvalues are at the origin). In the following we derive a transformation that transformssystem (12) into the form ( 7). zn(k+2) = y(k+2) :: fo($1(k+l),...,$n(k+1),c-o,xn+m(k+1)) (13) +go(a:i(k +1)....,x.(k +1),-..,zn+m(k +1))xn+m+1(k +1)- After substituting (12) into (13), we have :rn(k + 2) y(k + 2) = fl($1(k)a ° - - a3n+m+l(k)) '1' 910510;), ' ° ° i xn+m+l(k))$n+m+2(k)° 2 LINEARIZING FEEDBACK CONTROL By applying the same technique recursively, one gets 15 a0: + 3) = f2($1(k)7°-°a$n+m+2(k))+g2($1(k)a°°-axn+m+2(k))xfl+m+3(k)' $n(k+d"1) = fd-2(xl(k):°-°ixn+m+d-2(k)) + 9d-2(371(k)a - - - a $n+m+d—2(k))$n+m+d—1(k). Then the following state transformation is suggested, 211(k) 21,..(k) zl,n+1(k) zik) = a zl,n+d-l(k) 221(k) L 2%n(k) 1 .l P 31(k) xn(k) $n(k+1) xn(k+d-l) $n+1(k) $n+m(k) fo(°) + go(-)$n+m+1(k) v-20) + g.-2i-)x..-+.-.