Top Banner
35
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 10.1.1.5.341

A New Approa h to Fuzzy Modeling and Control ofDis rete-Time SystemsMi hael Margaliot and Gideon Langholz�Abstra tWe present a new approa h to fuzzy modeling and ontrol of dis rete-time sys-tems whi h is based on the formulation of a novel state-spa e representation usingthe hyperboli tangent fun tion. The new representation, designated the hyperboli model, ombines the advantages of fuzzy system theory and lassi al ontrol theory.On the one hand, the hyperboli model is easily derived from a set of Mamdani-typefuzzy rules. On the other hand, lassi al ontrol theory an be applied to design on-trollers for the hyperboli model that not only guarantee stability and robustness butare themselves equivalent to a set of Mamdani-type fuzzy rules. Thus, this new ap-proa h ombines the best of two worlds: It enables linguisti interpretability of boththe model and the ontroller, and guarantees losed-loop stability and robustness.Keywords: Non-linear optimal ontrol, repeated s alar nonlinearities, diagonal stability,linear matrix inequality, linguisti interpretability.�The authors are with the Dept. of Ele tri al Engineering-Systems, Tel Aviv University, Tel Aviv,Israel 69978. Email: fmi haelm,langholzg�eng.tau.a .il

Page 2: 10.1.1.5.341

1 Introdu tionFuzzy system theory enables us to utilize qualitative, linguisti information about a systemto onstru t a mathemati al model for it. For many real-life systems, whi h are highly omplex and inherently non-linear, onventional approa hes to modeling often annot beapplied whereas the fuzzy approa h might be the only viable alternative.Having a fuzzy model for the plant, we also need systemati pro edures to designfor it fuzzy ontrollers and to analyze them. These pro edures must guarantee stabilityand robustness of the losed-loop system. Unfortunately, despite mu h resear h, su happroa hes are only beginning to emerge. The main diÆ ulty in the mathemati al analysisof fuzzy models is that they are inherently non-linear and, therefore, lassi al ontrol theorywith its emphasis on linear systems annot be applied.Another question on erns what makes a system a fuzzy system. A ording to Duboiset al. [6℄, the advantage of fuzzy logi in modeling and ontrol is in the ability to ombinemodeling ( onstru ting a fun tion that a urately mimi s given data) and abstra ting (ar-ti ulating knowledge from the data). Therefore, we an de�ne a fuzzy system as a systemthat is equivalent to a set of linguisti rules.Most of the existing methods for the design and analysis of ontrollers for fuzzy models an be roughly divided into two groups. In the �rst group we have methods that use fuzzyinformation to onstru t a model of the plant and, from this point on, utilize ( onventional)non-linear ontrol theory to synthesize a ontroller. For example, Wang [19℄ uses a Lya-punov synthesis approa h that allows analysis of the losed-loop system, but the resulting2

Page 3: 10.1.1.5.341

ontroller annot be interpreted as a set of linguisti rules and, therefore, it is not a fuzzy ontroller a ording to the above de�nition.Methods in the se ond group treat the fuzzy model lo ally: The If-part of ea h ruledes ribes a lo al region and the Then-part des ribes the model of the plant in the vi inityof this region. The fuzzy ontroller is then designed using this partition of the state-spa einto lo al regions. If the exa t equations of the system are known, then it is possible to onstru t a fuzzy model that approximates the system to any degree of a ura y (see, forexample, [18℄). However, the fuzzy membership fun tions required turn out to be very ompli ated and, therefore, their linguisti interpretability is lost. It is also possible to usesimple membership fun tions and simple lo al models (e.g., linear) and to design a simplesuitable ontroller for ea h region (e.g., [3℄[17℄). Thus, lo al ontrollers are designed and ombined into a fuzzy system, however, analyzing the losed-loop system is usually diÆ ultand/or restri tive be ause the ombined fuzzy system is non-linear.Re ently, Margaliot and Langholz [13℄ developed a new approa h for the analysis of ontinuous-time fuzzy ontrollers. They formulated an optimal ontrol problem based on anew state-spa e model (designated the hyperboli state-spa e model) and a new ost fun -tional, and showed that the optimal ontroller that solves the problem is a fuzzy ontroller.This approa h was extended [12℄[14℄ to fuzzy modeling and ontrol of ontinuous-timesystems.In this paper, we onsider dis rete-time nonlinear systems with a spe ial stru ture,referred to as systems with repeated s alar nonlinearities (SRSN) [4℄[5℄ (see also [10℄).In these studies, Chu and Glover provide solutions for lassi al problems su h as model3

Page 4: 10.1.1.5.341

redu tion and ontroller synthesis for SRSN. In parti ular, they showed how to design a ontroller, whi h is by itself an SRSN and guarantees losed-loop stability and robustness.However, a major obsta le in applying their results to real-life systems remains: It is not lear how to onstru t a model in the form of an SRSN.We show that SRSN are equivalent to a set of linguisti rules. This allows us todevelop a new approa h to fuzzy modeling and ontrol of dis rete-time systems based onthe following paradigm: (1) Use linguisti information to derive a SRSN model of the plant,and (2) given the model, design a ontroller (whi h is also an SRSN) for it.This approa h has two important advantages. First, it guarantees stability and ro-bustness of the losed-loop system. Se ond, sin e the resulting ontroller is an SRSN it isequivalent to a set of linguisti rules, that is, it is a fuzzy ontroller. This enables a verbalunderstanding of the ontrol strategy.The rest of this paper is organized as follows. Se tion 2 presents the model and Se tion 3analyses its approximation apabilities. Its derivation from linguisti information on ern-ing the plant is detailed in Se tion 4, whereas in Se tion 5 we present an approa h forestimating its parameters online. Se tion 6 dis usses the design and analysis of ontrollersfor the SRSN model. We present three methods: A stabilizing ontroller, H2 ontroller,and an H1 ontroller. All these ontrollers guarantee losed-loop stability and robustnessand are also fuzzy ontrollers. Se tion 7 shows that the design pro edures yield linearmatrix inequalities (LMI's), hen e, it is easy to determine whether or not the the designis feasible, and if it is, to �nd it using very eÆ ient polynomial-time algorithms.4

Page 5: 10.1.1.5.341

2 The ModelConsider the dis rete-time system:0BBBBBBBB� x1(k + 1)...xn(k + 1)1CCCCCCCCA = A0BBBBBBBB� �(x1(k))...�(xn(k))

1CCCCCCCCA+B 0BBBBBBBB� u1(k)...um(k)1CCCCCCCCA (1)

where �(�) is a s alar fun tion, and A and B are onstant matri es of appropriate dimen-sions. We refer to (1) as a system with a repeated s alar nonlinearity (SRSN) be ause thenonlinear fun tion on ea h state omponent is identi al. Re ently, Chu and Glover [4℄[5℄studied this system extensively and des ribed several methods for designing ontrollers forit. However, it is diÆ ult to apply their results to real-life problems be ause it is not learhow to obtain for a given system a model in the form of SRSN.Consider now the following dis rete-time system:0BBBBBBBB� x1(k + 1)...xn(k + 1)1CCCCCCCCA = A0BBBBBBBB� tanh(s1x1(k))...tanh(snxn(k))

1CCCCCCCCA+B 0BBBBBBBB� u1(k)...um(k)1CCCCCCCCA (2)

where the si's are positive onstants. To simplify the notation, let S = diag(s1; :::; sn) andrewrite (2) in the more ompa t form:x(k + 1) = Atanh(Sx(k)) +Bu(k) (3)5

Page 6: 10.1.1.5.341

We refer to (3) as the hyperboli state-spa e model.The following observations are immediate: (a) Sin e tanh(z) = z � z33 + 2z515 :::, thenfor small values of jxi(k)j, i = 1; :::; n, the hyperboli model spe ializes into the linearmodel: x(k + 1) � ASx(k) + Bu(k); (b) If we start with the hyperboli model andde�ne new state variables and inputs by ~xi(t) = eixi(t) and ~uj(t) = pjuj(t), where eiand pi are onstants, then ~x(k + 1) = EAtanh(SE�1~x(k)) + EBP�1~u(k), where E =diag(e1; : : : ; en) and P = diag(p1; ; : : : pm). Thus, s aling the variables in the hyperboli model leads to a new hyperboli model. In parti ular, we an use this s aling property ofthe hyperboli model to obtain the one in whi h S = I. For this ase, we get tanh(Sx(k)) =(tanh(x1(k); : : : ; tanh(xn(k)))T so (3) spe ializes into a SRSN.In the following se tions we will show that the hyperboli model is a fuzzy system, thatis, it an be easily derived from linguisti information on erning the plant, and developpowerful methods for designing and analyzing fuzzy ontrollers for the hyperboli model.3 Approximation CapabilityConsider the dynami al system z(k + 1) = f(z(k);u(k)) (4)with z 2 R l, and u 2 Rm, and f : S � U ! R l a ontinuous ve tor-valued fun tion with S(U) an open set in R l (Rm). We are interested in showing that there exists a hyperboli 6

Page 7: 10.1.1.5.341

model whose output approximates z(k). Thus, we add an output fun tion to the hyperboli model, and onsider the modelx(k + 1) = Atanh(x(k)) +Bu(k) (5)y(k) = Ctanh(x(k))Theorem 1 Consider the dynami al system (4). Let Ds 2 S and Du 2 U be ompa t setsand assume that z(0) 2 Ds. Then, for any � > 0, any integer I > 0, and any input u :[0;1) ! Du, there exists a hyperboli model (5) with appropriate initial state x(1) 2 Rnsu h that jjz(k)� y(k)jj < � for all k 2 [1; I℄: (6)Proof. See the Appendix.Note that the order n of the approximating hyperboli model will in general be greaterthan l. Note also that, in the terminology of [9℄, the theorem implies that the hyperboli model is a universal approximator of dis rete-time dynami al systems on the segment k 2[1; I℄.4 The Modeling Pro essTo show that the hyperboli model an be easily derived from linguisti information on- erning the plant, let us begin with a simple example relating the fun tion tanh(�) to afuzzy rule-base. Consider the following rule-base:7

Page 8: 10.1.1.5.341

� If x(k) is positive Then x(k + 1) = a� If x(k) is negative Then x(k + 1) = �awhere the linguisti terms positive and negative are modeled using the Gaussian mem-bership fun tions: �pos(z) = e� 12 (z�s)2 and �neg(z) = e� 12 (z+s)2 with s > 0. Applying theprodu t-inferen e rule, singleton fuzzi�er, and the enter of gravity defuzzi�er, we get:x(k + 1) = a�pos(x(k)) + (�a)�neg(x(k))�pos(x(k)) + �neg(x(k))= ae� 12 (x(k)�s)2 � ae� 12 (x(k)+s)2e� 12 (x(k)�s)2 + e� 12 (x(k)+s)2= aesx(k) � ae�sx(k)esx(k) + e�sx(k)= a tanh(sx(k))whi h is in the form (3). Hen e, the rule-base yields the hyperboli model.We an now generalize by relating the fun tion: f(z1; z2; :::; zm) = mXi=1ai tanh(sizi)(where the si's are positive) to a fuzzy rule-base.De�nition 1 A fuzzy rule-base will be alled a hyperboli mapping from fz1; :::; zmg to fif: � Every input variable zi is hara terized by two linguisti terms: positivezi and negativezi.� Every fuzzy rule is in the form:If z1 is pnz1 and z2 is pnz2 ... and zn is pnzn Then f = �a1 � a2:::� am8

Page 9: 10.1.1.5.341

where the ai's are onstants and pnzi stands for either the linguisti term positivezi ornegativezi, and � stands for either the plus or the minus sign. The a tual signs in theThen-part are determined in the following manner: If the term hara terizing zi inthe If-part is positivezi then in the Then-part, ai appears with a plus sign; otherwise aiappears with a minus sign.� The rule-base ontains exa tly 2m rules spanning, in their If-part, all the possible sign ombinations of z1; :::; zm.Lemma 1 Let F be a fuzzy rule-base that is a hyperboli mapping from fz1; ::zmg to f . Forea h i, de�ne the membership fun tions for the linguisti terms positivezi and negativeziby: �poszi(y) = e� 12 (y�si)2 �negzi(y) = e� 12 (y+si)2 (7)where si is a positive onstant for every i. Then, applying the produ t-inferen e rule,singleton fuzzi�er, and the enter of gravity defuzzi�er to F yieldsf = mXi=1 ai tanh(sizi): (8)Proof. See the Appendix.De�nition 2 Consider a system with n state-variables x(k) = (x1(k); :::; xn(k))T andm in-puts u(k) = (u1(k); :::um(k))T . A fuzzy rule-base asso iated with the system is alled ad-missible if the following hold: 9

Page 10: 10.1.1.5.341

� Every fuzzy rule des ribing the dynami s is in the form:Rule Rl: If [x1(k) is pnx1 ℄ and [x2(k) is pnx2 ℄ ... and [xn(k) is pnxn℄and [u1(k) is pnu1 ℄ and [u2(k) is pnu2℄... and [um(k) is pnum℄Then xi(k + 1) = alwhere pnz stands for the term positivez or negativez, and square bra kets indi atean optional term. Note that ea h state and input variable is des ribed by two fuzzyterms only (positive and negative).� For ea h i, let Fi be the set of rules in the rule-base that ontain xi(k + 1) intheir Then-part. Then, Fi is a hyperboli mapping from some subset of fx(k);u(k)gto xi(k + 1).We an now state the main proposition of this se tion.Lemma 2 Given an admissible fuzzy rule-base, de�ne the terms positivez, negativez(where z is any of the state or input variables) using:�posz(y) = e� 12 (y�sz)2 �negz(y) = e� 12 (y+sz)2 (9)with sz > 0. Then, inferen ing the rule-base yields a model in the form:x(k + 1) = A tanh(Sxx(k)) + C tanh(Suu(k)) (10)where Sx = diag(sx1; :::; sxn), and Su = diag(su1; :::; sum).10

Page 11: 10.1.1.5.341

Proof. See the Appendix.Consequently, we an derive the hyperboli model (3) by linearizing (10) in u; namely:x(k + 1) = A tanh(Sxx(k)) + CSuu(k):Note that if we are interested in des ribing not only the state-spa e equations of the model,but also its output y(k), then we an use another set of linguisti statements that form ahyperboli mapping from the xi(k)'s to the output, and obtain a model in the form (5).The following example demonstrates the pro edure of deriving the hyperboli modelfor a given system.Example 1 Consider the inverted pendulum system depi ted in Fig 1. The pendulum's_�um

Figure 1: Inverted pendulum systemangle and its angular velo ity are � and _�, respe tively, and the system's ontinuous-time11

Page 12: 10.1.1.5.341

dynami equation is given by [16℄:�� = f(�; _�) + g(�; _�)u (11)where: f(x; y) = 9:8 sinx�mly2 os x sinxm +ml( 43�m os2 xm +m ) and g(x; y) = os xm +ml( 43�m os2 xm +m ) . m is the mass of the art,m is the mass of the pole, 2l is the pole's length, and u is the applied for e ( ontrol). Inthe simulations presented later in this paper, where we ompare the behavior of the a tualsystem to that of its hyperboli model, we use the following parameter values:m = 1kg; m = 0:1kg; and l = 0:5m (12)We are going to use a simple dis retized model of (11) that is given by [8℄:�(k + 1) = �(k) + �0(k)h�0(k + 1) = �0(k) + ( f(�(k); �0(k)) + g(�(k); �0(k))u(k) )h (13)where �(k) and �0(k) are the dis rete-time versions of �(t) and _�(t), respe tively, and h =0:01.Note that (13) is not an SRSN model and, therefore, the te hniques developed in [4℄[5℄ annot be applied to design for it an appropriate ontroller u(k). To over ome this diÆ ulty,we would like to obtain a hyperboli model for this system. However, it is important to notethat we have provided the pendulum's equations for referen e only and that in onstru ting12

Page 13: 10.1.1.5.341

the hyperboli model, we assume the exa t equations (13) unknown and that we have onlythe following partial knowledge about the plant (see Fig. 1):1. The system has two degrees of freedom � and _�, referred to in the dis rete-timemodel as x1(k) and x2(k), respe tively, and therefore, the di�eren e x1(k+1)�x1(k)is proportional to x2(k).2. The di�eren e x2(k + 1)� x2(k) is proportional to u(k).It is quite lear that this knowledge an be easily derived from physi al intuition. For exam-ple, the se ond statement follows from the fa t that the angular a eleration is proportionalto the applied for e.To onstru t the hyperboli model for the pendulum system, we begin by transformingthe linguisti information into an admissible rule-base:� Rule M1: If x1(k) is positive1 and x2(k) is positive2 Then x1(k + 1) is 1 + 2� Rule M2: If x1(k) is positive1 and x2(k) is negative2 Then x1(k + 1) is 1 � 2� Rule M3: If x1(k) is negative1 and x2(k) is positive2 Then x1(k + 1) is � 1 + 2� Rule M4: If x1(k) is negative1 and x2(k) is negative2 Then x1(k + 1) is � 1 � 2� Rule M5: If x2(k) is positive2 and u(k) is positiveu Then x2(k + 1) is d1 + d2� Rule M6: If x2(k) is positive2 and u(k) is negativeu Then x2(k + 1) is d1 � d2� Rule M7: If x2(k) is negative2 and u(k) is positiveu Then x2(k + 1) is �d1 + d213

Page 14: 10.1.1.5.341

� Rule M8: If x2(k) is negative2 and u(k) is negativeu Then x2(k + 1) is �d1 � d2Note that rules M1�M4 onstitute a hyperboli mapping from fx1(k); x2(k)g to x1(k+1),and rules M5 �M8 onstitute a hyperboli mapping from fx2(k); u(k)g to x2(k + 1).Next, we model the fuzzy terms positive1, negative1, positive2, negative2, positiveu,and negativeu using Gaussians entered at sx1, �sx1 , sx2, �sx2 , su, and �su, respe tively(see (7)), and apply the produ t-inferen e rule, singleton fuzzi�er, and the enter of gravitydefuzzi�er to obtainx1(k + 1) = 1 tanh(sx1x1(k)) + 2 tanh(sx2x2(k))x2(k + 1) = d1 tanh(sx2x2(k)) + d2 tanh(suu(k))Finally, linearizing these equations in u yields the hyperboli modelx1(k + 1) = 1 tanh(sx1x1(k)) + 2 tanh(sx2x2(k))x2(k + 1) = d1 tanh(sx2x2(k)) + d2suu(k) (14)As we an see, the hyperboli model an be derived fairly easily from the linguisti information on erning the plant by onverting this information into the form of an admis-sible rule-base. If the linguisti information is a ompanied by a omplete hara terizationof the fuzzy sets des ribing the linguisti terms, then the model's parameters (the matri esA, B, and S in (3)) follow immediately; otherwise, these parameters must somehow beestimated, as we do in the next se tion. 14

Page 15: 10.1.1.5.341

5 On-Line Parameter EstimationIn this se tion we apply a standard pro edure to estimating the parameters of the hy-perboli model. We assume that the matrix S is known so we must identify only thematri es A and B. Thus, the model isx(k + 1) = A tanh(Sx(k)) +Bu(k) (15)where S is a known diagonal matrix, and A and B are onstant, yet unknown, matri es.We also assume that x(k) and u(k) are a essible for measurement for all k. Our goal isto obtain on-line estimates of the matri es A and B.We an rewrite (15) as a set of n equations:xi(k + 1) = (�i)T�(k); i = 1; : : : ; n (16)where �i is a ve tor ontaining the unknown parameters we are trying to estimate (that is,entries of the matri es A and B). For example, the se ond-order hyperboli model:x1(k + 1) = a11 tanh(s1x1(k)) + a12 tanh(s2x2(k)) + b1u(k)x2(k + 1) = a21 tanh(s1x1(k)) + a22 tanh(s2x2(k)) + b2u(k)15

Page 16: 10.1.1.5.341

will be rewritten as: xi(k + 1) = (ai1 ai2 bi)0BBBBBBBB� tanh(s1x1(k))tanh(s2x2(k))u(k)1CCCCCCCCA ; i = 1; 2, whi h is in theform (16).Hen e, we would like to design an estimator �̂(k) that estimates the unknown ve tor ��in x(k + 1) = (��)T�(k) (17)so that the estimation error: ~�(k) = �̂(k)� �� (18)will onverge to zero as k ! 11. To do so, we use the re ursive least squares (RLS)method with onstant forgetting fa tor [11℄, given by�̂(k + 1) = �̂(k) + F (k + 1)�(k)e0(k + 1)F (k + 1) = 1�1 F (k)� F (k)�(k)�T (k)F (k)�1 + �T (k)F (k)�(k)! (19)e0(k + 1) = x(k + 1)� �̂T (k)�(k)where e0(k + 1) is the a-priori predi tion error (that is, the di�eren e between x(k + 1)and the a-priori predi tion ~x(k + 1) = �̂T (k)�(k)); F (k) is a gain matrix, initializedwith F (0) > 0; and �1 2 (0; 1) is a forgetting fa tor.1Note however that ~�(k) annot be al ulated be ause �� is unknown.

16

Page 17: 10.1.1.5.341

Theorem 2 [11℄. For the model (17), the estimation s heme (19) yields:limN!1 NXk=0(e0(k1))2 < C <1limN!1 e0(k1) = 0limk!1(�̂(k + 1)� �̂(k)) = 0In other words, the a-priori predi tion error onverges to zero and the estimator �̂(k) isguaranteed to onverge2.Example 2 Consider the model (14) whi h we derived for the inverted pendulum sys-tem (13). We assume that sx1 = sx2 = su = 1 and apply the RLS algorithm3 to obtainon-line estimates for the other parameters ̂1(k), ̂2(k), d̂1(k), and d̂2(k). In the simula-tions we have set �(0) = :3491 (� 20Æ), �0(0) = 0, u(k) = �25�(k)� �0(k) + 0:2 os(2�50k),�1 = :95 and F (0) = 1000I, and the initial onditions x1(0) = x2(0) = ̂1(0) = ̂2(0) =d̂1(0) = d̂2(0) = 0.Fig. 2 shows the behavior of �(k) in (13) and x1(k) in the hyperboli model (14). Itmay be seen that, as k in reases, the dynami behaviors of the model and the real systembe ome very similar. Note that the di�eren e between x1(k) and �(k) onverges to �0:0247and not to zero be ause of the errors a umulated during the estimation pro ess and thefa t that the real system (13) has a more omplex stru ture than the model (14).2This does not ne essarily imply that �̂(k) ! ��. Proving that �̂(k) ! �� an be done only if we addsome assumptions on the input signal u.3Note that we use the pendulum's angle �(k) as the input to the algorithm, that is, in Eq. (19), x(k+1) =�(k + 1) 17

Page 18: 10.1.1.5.341

0 200 400 600 800 1000 1200 1400 1600−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

kFigure 2: The pendulum's a tual angle �(k) (solid line) and the model's x1(k) (dashed line)Figs. 3 and 4 depi t the estimated parameters ̂1(k) and d̂1(k), and ̂2(k) and d̂2(k) asfun tions of k. As k in reases, the estimated parameters onverge to the following values: ̂1(k)! 1 = 1 ; ̂2(k)! 2 = 0:01d̂1(k)! d1 = 1:0002 ; d̂2(k)! d2 = 0:01330 (20)6 ControlHaving derived a hyperboli model (3) for the plant, the next step is to design a on-troller u(k) that satis�es some ontrol obje tive. We assume that the variables were18

Page 19: 10.1.1.5.341

0 200 400 600 800 1000 12000

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

kFigure 3: The estimated parameters ̂1(k) (solid line) and d̂1(k) (dashed line)res aled (if ne essary) so that S = I, namely, the hyperboli model is given by:x(k + 1) = Atanh(x(k)) +Bu(k) (21)and we would like to design for it a ontroller in the form:u(k) = Gtanh(x(k)) (22)Su h ontroller has three important properties: (a) Sin e ea h ui(k) is a linear ombinationof (tanh(x1(k)); :::; tanh(xn(k))), it is equivalent, by Lemma 1, to a set of fuzzy rulesand, therefore, it is a fuzzy ontroller; (b) jui(k)j � nXj=1jgijj, where gij are the entries of19

Page 20: 10.1.1.5.341

0 500 1000 1500−0.025

−0.02

−0.015

−0.01

−0.005

0

0.005

0.01

0.015

0.02

0.025

kFigure 4: The estimated parameters ̂2(k) (solid line) and d̂2(k) (dashed line)the matrix G (note that this bound does not depend on x); and ( ) when u(k) = 0,equation (21) be omes x(k + 1) = Atanh(x(k))whereas with the ontroller (22), the losed-loop equation is given by:x(k + 1) = A ltanh(x(k)); A l = A+BG (23)As we an see, the same format in both ases, namely, the system an be des ribed inlinguisti terms with or without the ontroller. In addition, the designed ontroller should20

Page 21: 10.1.1.5.341

also guarantee global asymptoti stability and robustness of the losed-loop system (23).In the sequel, we will present three designs of fuzzy ontrollers for the model (21): Astabilizing ontroller, H2 ontroller, and an H1 ontroller. To do so, we need the followingde�nition and lemmas.De�nition 3 [4℄ A square matrix P is said to be positive diagonally dominant (PDD) if Pis symmetri , positive-de�nite, and row diagonally dominant, that is, for all ijpiij �Xj 6=i jpijj: (24)Lemma 3 [4℄ Let P be a PDD and �ij, i = 1; : : : ; n, j = 1; : : : ; n, be a set of s alars thatsatisfy for all i; j j�ij + �jij � �(�ii + �jj) (25)then nXi=1 nXj=1 pij�ij � 0: (26)Note that if P is diagonal, then the sum in (26) redu es to nXi=1 pii�ii, whi h is non-negativebe ause pii > 0 (sin e P > 0), and �ii � 0 (from (25)). If P is not diagonal, then moreterms are in luded in the sum, but (24) and (25) guarantee that these terms annot makethe sum positive.Lemma 4 If P is PDD, then for all x 6= 0:tanhT (x)P tanh(x) � xTP tanh(x) (27)21

Page 22: 10.1.1.5.341

tanhT (x)P tanh(x) < xTPx: (28)Proof. See the Appendix.6.1 Stabilizing ontrollerTheorem 3 If there exist a PDD matrix P and a matrix G that satisfy the (dis rete-time)Lyapunov equation (A+BG)TP (A+BG)� P � 0 (29)then (23) is asymptoti ally stable.Proof. Denote A l = A + BG. Consider the Lyapunov fun tion andidate V (x) = xTPx,thenV (x(k + 1))� V (x(k))= tanhT (x(k))AT lPA ltanh(x(k))� xT (k)Px(k)= tanhT (x(k))(AT lPA l � P )tanh(x(k)) + tanhT (x(k))P tanh(x(k))� xT (k)Px(k)� tanhT (x(k))P tanh(x(k))� xT (k)Px(k)< 0where the last step follows from (28). 2Example 3 Consider the hyperboli model (14) we obtained for the inverted pendulum22

Page 23: 10.1.1.5.341

system x(k + 1) = Atanh(x(k)) + bu(k)with the parameters derived using the RLS algorithm (20):A = 0BBB� 1 :010 1:0002 1CCCA ; b = 0BBB� 0:0133 1CCCAIt an be veri�ed that for u(k) = gtanh(x(k)); g = �(15 15) (30)and P = 0BBB� 1 :85:85 1 1CCCA, equation (29) holds. Hen e, the ontroller (30) stabilizes thehyperboli model.Note that u is a fuzzy ontroller sin e it is equivalent to the four linguisti rules� If x1(k) is positivex1(k) and x2(k) is positivex2(k) Then u(k) = �30� If x1(k) is positivex1(k) and x2(k) is negativex2(k) Then u(k) = 0� If x1(k) is negativex1(k) and x2(k) is positivez2 Then u(k) = 0� If x1(k) is negativex1(k) and x2(k) is negativex2(k) Then u(k) = 30with the membership fun tions�posxi(k)(y) = e� 12 (y�1)2 �negxi(k)(y) = e� 12 (y+1)2 ; i = 1; 223

Page 24: 10.1.1.5.341

0 200 400 600 800 1000 12000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

kFigure 5: The pendulum's angle �(k) (in rad.) for four initial onditions (�(0); 0)(see Lemma 1). The fa t that u is a fuzzy ontroller allows easy intuitive understandingof its behavior. Indeed, the �rst rule states that if both the pendulum's angle and angularvelo ity are positive, then a negative ontrol must be applied. The se ond rule orrespondsto the ase where the pendulum's angle is positive and the velo ity is negative, that is, thependulum is moving towards its desired state and, therefore, no ontrol is needed.Fig. 5 depi ts the behavior of the losed-loop system (the inverted pendulum system (13)and the ontroller u(k) = �15 tanh(�(k)) � 15 tanh(�0(k)). It may be seen that for suf-� iently small initial onditions, the ontroller drives the pendulum to the upright posi-tion �(k) ! 0. Thus, lo al asymptoti stability of the losed-loop system was obtained.24

Page 25: 10.1.1.5.341

6.2 H2 optimal ontrollerThe inverse optimal ontrol problem for fuzzy ontrollers of ontinuous-time systems wasposed and solved in [13℄ (see also [15℄). This was done by formulating a new ost-fun tional in whi h the term tanhT (x(t))Q tanh(x(t)) repla es xT (t)Qx(t) in the onven-tional quadrati ost-fun tional. Here, we use the same idea to synthesize optimal, fuzzy ontrollers for dis rete-time systems.Theorem 4 Consider the system (21), and let Q � 0 and R > 0 be two symmetri matri es. If there exists a PDD matrix P that satis�esP = Q+ ATPA� ATPB(R+BTPB)�1BTPA (31)then the ontroller that minimizes the ost fun tional4J(x(0);u(�)) = 1Xk=0 htanhT (x(k))Q tanh(x(k)) + xT (k)Px(k)� tanhT (x(k))P tanh(x(k))+uT (k)Ru(k)iis: u(k) = G tanh(x(k)) with G = �(R +BTPB)�1BTPA.Proof. See the Appendix.Note that (31) is the same equation en ountered in lassi al quadrati -linear optimal on-trol [1℄, however, in the hyperboli ase, we require a solution P with a spe ial stru ture,namely, a positive diagonally dominant (PDD) matrix.4Note that Eq. (28) implies that the ost-fun tional J is meaningful25

Page 26: 10.1.1.5.341

6.3 H1 ontrollerWe now design a ontroller that attenuates the e�e t of disturban es on the system'soutput. We assume that the system's hyperboli model is given byx(k + 1) = Atanh(x(k)) +B1w(k) +B2u(k)y(k) = Ctanh(x(k)) +D1w(k) +D2u(k) (32)wherew(k) = (w1(k); : : : ; wr(k))T is a deterministi , yet unknown, disturban e, and y(k) =(y1(k); : : : ; yp(k))T is the system's output. It is easy to see that we an obtain this modelfrom a linguisti des ription of the system.Our goal is to design a fuzzy ontroller u = Gtanh(x), guaranteeing that the losed-loopsystem x(k + 1) = A ltanh(x(k)) +B1w(k)y(k) = C ltanh(x(k)) +D1w(k) (33)with A l = A+B2G and C l = C +D2G, will satisfy:jjyjj2 � 2jjwjj2 (34)where is some real number and jjzjj2 = limN!1 NXk=0 zT (k)z(k).Theorem 5 Assume that x(0) = 0, and that there exist a matrix G, a PDD matrix P ,26

Page 27: 10.1.1.5.341

and a real number su h that0BBB� A l B1C l D1 1CCCAT 0BBB� P 00 Ip 1CCCA0BBB� A l B1C l D1 1CCCA� 0BBB� P 00 2Ir 1CCCA � 0 (35)Then, equation (34) holds for any disturban e w satisfying jjwjj2 <1.Proof. The proof follows immediately from Proposition 4 in [4℄.7 Computational IssuesIn the previous se tion we suggested three design pro edures for synthesizing fuzzy on-trollers for the hyperboli model. In this se tion we analyze some of the omputationalissues asso iated with these designs. For the sake of ompleteness, we begin with a shortreview of linear matrix inequalities (LMI) following the ex ellent exposition in [2℄.Re all that a (stri t) linear matrix inequality has the following form: Given symmetri matri es Fi 2 Rn�n, i = 0; : : : ; m, �nd a ve tor x 2 Rm su h thatF (x) = F0 + mXi=1 xiFi > 0 (36)For example, if n = 1 (so the matri es Fi be ome s alars fi), then the LMI is just: Find xsu h that f0 + x1f1 + : : : fmxm > 0. If n > 1, A 2 Rn�n is a given matrix and wede�ne F0 = 0, Fi = ATPiA� Pi, i = 1; : : : ; r, where the matri es Pi provide a base for theset of symmetri n � n matri es (so r = n(n + 1)=2), then the LMI (36) is equivalent to:27

Page 28: 10.1.1.5.341

Find a symmetri matrix P su h that ATPA� P > 0.Two ru ial observations: (1) The set fx 2 RmjF (x) > 0g is a onvex set; and(2) Multiple LMI's: F 1(x) > 0; : : : ; F j(x) > 0 an be expressed as the single LMI:diag(F 1(x); : : : F j(x)) > 0. The �rst observation implies that LMI's an be solved numer-i ally in a very eÆ ient manner using algorithms that solve onvex optimization problems.The se ond observation implies that the problem: Find a symmetri matrix P > 0 su hthat ATPA� P > 0 an be ast as a single LMI.Finally, re all that adding the requirement that P is a PDD is also an LMI [4℄.Lemma 5 [4℄ P is PDD if and only if P > 0 and there exists a symmetri matrix R = frijgsu h that for all i: pii � Pj 6=i(pij + 2rij); and for all i 6= j: rij � 0, pij + rij � 0.Thus, the requirement that P will be PDD amounts to adding �(n2) variables rij to theve tor of unknowns x and �(n2) linear inequalities whi h, as we have already seen, areeasily represented as LMI's. Thus, it is easy to determine numeri ally if a PDD solution Pexists, and if so to al ulate it eÆ iently.8 SummaryWe presented a novel approa h to fuzzy modeling and ontrol of dis rete-time systems,based on a nonlinear state-spa e model whi h we all the hyperboli model. When S = I,the hyperboli model spe ializes to a SRSN model and, therefore, allows the developmentof SRSN models for real-life systems using linguisti information. The new model ombinesthe advantages of fuzzy system theory and lassi al ontrol theory. On the one hand, the28

Page 29: 10.1.1.5.341

model is equivalent to a set of fuzzy rules and, therefore, it an be easily derived fromlinguisti data on erning the plant. On the other hand, design methods from lassi al ontrol theory an be used to synthesize ontrollers for the hyperboli model. The resulting ontrollers not only guarantee analyti al properties, su h as global asymptoti stability androbustness of the losed-loop system, but are themselves fuzzy ontrollers.AppendixProof of Theorem 1. Fix � > 0, � > 0, and an integer I > 0. By Theorem 2 in [9℄ thereexists a dynami re urrent neural network in the form5x0(k + 1) = Atanh ( x0(k) +Bu(k) ) (37)y0(k) = Cx0(k)with an appropriate initial value x0(0) su h that jjz(k)� y0(k)jj < �2 for all k 2 [0; I℄.Let A =M�1TM , with T upper-triangular and M unitary [7℄. Note that the diagonalentries of T are the eigenvalues of A. Let ~T be a slight perturbation of T , in whi h onlythe diagonal entries of T are being modi�ed (if ne essary) to make them di�erent fromzero, and let ~A = M�1 ~TM so ~A is invertible.5A tually, the model studied in [9℄ is slightly di�erent: The equation for the state evolution is x0(k+1) =��x0(k)+A0 tanh ( x0(k) +B0u(k) ), but a areful examination of the proof shows that we an take � = 0.

29

Page 30: 10.1.1.5.341

Now, onsider the dynami al system:~x(k + 1) = ~Atanh ( ~x(k) +Bu(k) ) (38)~y(k) = C~x(k)with ~x(0) = x0(0). It follows from Lemma 2 in [9℄ that we an �nd a perturbation ~T su hthat jj~y(k)� y0(k)jj < �2 for all k 2 [0; I℄.Finally, de�ne: x(k) = tanh�1( ~A�1~x(k)) and y(k) = ~y(k). Note that x(k) is well-de�ned for all k 2 [1; I℄. It follows from the de�nition that:x(k + 1) = ~Atanh(x(k)) +Bu(k)y(k) = C ~Atanh(x(k))whi h is in the form (5) and satis�es (6). 2Proof of Lemma 1. Rewrite (8) as:f = mXi=1 ai esizi � e�siziesizi + e�sizi= mXi=1 aie� 12 (zi�si)2 � aie� 12 (zi+si)2e� 12 (zi�si)2 + e� 12 (zi+si)2= mXi=1 ai�poszi(zi)� ai�negzi(zi)�poszi(zi) + �negzi(zi) (39)where the last step follows from the de�nition of the membership fun tions (7). Now, (39)30

Page 31: 10.1.1.5.341

an be written as f = N=D, whereN = (a1 + a2 + � � �+ am)�posz1 (z1)�posz2(z2) � � ��poszm (zm)+(a1 � a2 + � � �+ am)�posz1(z1)�negz2(z2) � � ��poszm (zm)� � �+ (�a1 � a2 � � � � � am)�negz1(z1)�negz2(z2) � � ��negzm(zm)D = �posz1(z1)�posz2(z2) � � ��poszm (zm)+�posz1(z1)�negz2(z2) � � ��poszm (zm)� � �+ �negz1(z1)�negz2 (z2) � � ��negzm(zm)Both N and D in lude 2m terms spanning all the sign ombinations of (z1; :::; zm), and itis easy to see that N=D is just the result of inferen ing the fuzzy rule-base F . 2Proof of Lemma 2. De�nition 2 and Lemma 1 imply that xi(k+1) is a linear ombination ofthe elements of the ve tor [tanh(sx1x1(k)); : : : ; tanh(sxnxn(k)); tanh(su1u1(k)); : : : ; tanh(sumum(k))℄T .The matrix form (10) follows immediately. 2Proof of Lemma 4. Let �ij = tanh(xi) tanh(xj)� xi tanh(xj). ThentanhT (x)P tanh(x)� xTP tanh(x) = Xi;j [tanh(xi)pij tanh(xj)� xipij tanh(xj)℄= Xi;j pij�ij31

Page 32: 10.1.1.5.341

It is easy to verify that for all xi and xj,(tanh(xi) + tanh(xj))2 � (xi + xj)(tanh(xi) + tanh(xj)) (40)that is 2 tanh(xi) tanh(xj)� xi tanh(xj)� xj tanh(xi)� xi tanh xi � tanh2(xi) + xj tanh(xj)� tanh2(xj) (41)Similarly, by substituting xj with �xj in (40), we get�2 tanh(xi) tanh(xj) + xi tanh(xj) + xj tanh(xi)� xi tanh xi � tanh2(xi) + xj tanh(xj)� tanh2(xj) (42)Now (41) and (42) yield (25) and using Lemma 3 we get (27). To prove (28), let x 6=0. Using the fa t that P > 0, we get (tanh(x) � x)TP (tanh(x) � x) > 0, that is,xTPx� xTP tanh(x) > xTP tanh(x)� tanhT (x)P tanh(x). Now (27) implies that xTPx�xTP tanh(x) > 0, and the proof is ompleted. 2Proof of Theorem 4. We begin by showing that u asymptoti ally stabilizes the system.Letting M = R + BTPB, note that M > 0 and, therefore, M�1 exists. The losed-loopsystem is x(k + 1) = A ltanh(x(k)), with A l = A�BM�1BTPA, andAT lPA l � P = ATPA+ ATPBM�1BTPBM�1BTPA� 2ATPBM�1BTPA� P32

Page 33: 10.1.1.5.341

= ATPA� ATPBM�1BTPA� P + ATPBM�1(BTPB �M)M�1BTPA= �Q� ATPBM�1RM�1BTPAwhere the last equation follows from (31). Sin e Q � 0 and R > 0, Theorem 3 implies thatthe losed-loop system is asymptoti ally stable.We now show that u is the optimal ontroller for the ost-fun tional J . Denot-ing V (x) = xTPx, we haveV (x(k + 1))� V (x(k)) + uT (k)Ru(k)= (Atanh(x(k)) +Bu(k))TP (Atanh(x(k)) +Bu(k))� xT (k)Px(k) + uT (k)Ru(k)= tanhT (x(k))Ztanh(x(k))� xT (k)Px(k) + (u(k)� u(k))TM(u(k)� u(k))where Z = AT (P � PBM�1BTP )A. Summing both sides from k = 0 to k = N andusing (31), yieldsV (x(N + 1))� V (x(0)) + NXk=0 huT (k)Ru(k)i= NXk=0 htanhT (x(k))(P �Q)tanh(x(k))� xT (k)Px(k) + (u(k)� u(k))TM(u(k)� u(k))iand rearranging terms, we get:V (x(0))� V (x(N + 1)) + NXk=0(u(k)� u(k))TM(u(k)� u(k))33

Page 34: 10.1.1.5.341

= NXk=0 htanhT (x(k))Q tanh(x(k)) + xT (k)Px(k)� tanhT (x(k))P tanh(x(k)) + uT (k)Ru(k)iNow, for any ontroller u that asymptoti ally stabilizes the system, we an let N ! 1and get: V (x(0)) +P1k=0(u(k)�u(k))TM(u(k)�u(k)) = J(x(0);u(�)), and sin e M > 0,we see that J(x(0);u(�)) is minimal for u(k) = u(k). 2Referen es[1℄ B. D. O. Anderson and J. B. Moore. Optimal Control: Linear Quadrati Methods. Prenti e-Hall, 1990.[2℄ S. Boyd, L. El Ghaoui, E. Feron, and V. Balakrishnan. Linear Matrix Inequalities in Systemand Control Theory. SIAM Studies in Applied Mathemati s, Vol. 15, SIAM, 1994.[3℄ S. G. Cao, N. W. Rees, and G. Feng. Analysis and design for a lass of omplex ontrolsystems part II: fuzzy ontroller design. Automati a, 33(6):1029{1039, 1997.[4℄ Y.-C. Chu and K. Glover. Bounds of the indu ed norm and model redu tion errors forsystems with repeated s alar nonlinearities. IEEE Transa tions on Automati Control,44(3):471{483, 1999.[5℄ Y.-C. Chu and K. Glover. Stabilization and performan e synthesis for systems with repeateds alar nonlinearities. IEEE Transa tions on Automati Control, 44(3):484{496, 1999.[6℄ D. Dubois, H. T. Nguyen, H. Prade, and M. Sugeno. Introdu tion: the real ontributionof fuzzy systems. In H. T. Nguyen and M. Sugeno, editors, Fuzzy Systems: Modeling andControl, pages 1{17. Kluwer, 1998.[7℄ J. H. Hubbard and B. H. West. Di�erential Equations: A Dynami al Systems Approa h,Part II: Higher-Dimensional Systems. Springer-Verlag, 1995.[8℄ J. S. R. Jang, C. T. Sun, and E. Mizutani. Neuro-Fuzzy and Soft Computing: A Computa-tional Approa h to Learning and Ma hine Intelligen e. Prenti e-Hall, 1997.[9℄ L. Jin, P. N. Nikiforuk, and M. M. Gupta. Approximation of dis rete-time state-spa etraje tories using dynami re urrent neural networks. IEEE Transa tions on Automati Control, 40(7):1266{1270, 1995.[10℄ E. Kaszkurewi z and A. Bhaya. Matrix Diagonal Stability in Systems and Computation.Birkh�auser, 1999.[11℄ I. D. Landau, R. Lozano, and M. M'Saad. Adaptive Control. Springer-Verlag, 1998.[12℄ M. Margaliot and G. Langholz. Hyperboli approa h to fuzzy modeling and ontrol. InPro . 8th IEEE International Conferen e on Fuzzy Systems (FUZZ-IEEE'99), pages 893{897, Seoul, Korea, 1999.[13℄ M. Margaliot and G. Langholz. Hyperboli optimal ontrol and fuzzy ontrol. IEEE Trans-a tions on Systems, Man, and Cyberneti s: Part A, 29(1):1{10, 1999.34

Page 35: 10.1.1.5.341

[14℄ M. Margaliot and G. Langholz. New Approa hes to Fuzzy Modeling and Control - Designand Analysis. World S ienti� , 2000.[15℄ M. Margaliot and G. Langholz. Some nonlinear optimal ontrol problems with losed-formsolutions. Int. J. Robust Nonlinear Control, 11:1365{1374, 2001.[16℄ J. J. E. Slotine and W. Li. Applied Nonlinear Control. Prenti e Hall, 1991.[17℄ K. Tanaka and M. Sugeno. Stability analysis and design of fuzzy ontrol systems. FuzzySets and Systems, 45:135{156, 1992.[18℄ K. Tanaka and H. O. Wang. Fuzzy Control Systems Design and Analysis: A Linear MatrixInequality Approa h. John Wiley & Sons, 2001.[19℄ L. X. Wang. A Course in Fuzzy Systems and Control. Prenti e Hall, 1997.

35