Fuzzy PID controller: Design, performance evaluation, and stability analysis

Fuzzy PID controller: Design, performance evaluation, and stability analysis

Information Sciences 123 (2000) 249±270 www.elsevier.com/locate/ins Fuzzy PID controller: Design, performance evaluation, and stability analysis Jam...

339KB Sizes 3 Downloads 173 Views

Information Sciences 123 (2000) 249±270

www.elsevier.com/locate/ins

Fuzzy PID controller: Design, performance evaluation, and stability analysis James Carvajal a, Guanrong Chen b, Haluk Ogmen a

b,*

National Aeronautics and Space Administration, Johnson Space Center, Mail Code ER2, Houston, TX 77058-3696, USA b Department of Electrical and Computer Engineering, University of Houston, Houston, TX 77204-4793, USA

Received 8 November 1998; received in revised form 22 May 1999; accepted 29 October 1999

Abstract This paper presents a design for a new fuzzy logic proportional-integral-derivative (PID) controller. The main motivation for this design was to control some known nonlinear systems, such as robotic manipulators, which violate the conventional assumption of the linear PID controller. This controller is developed by ®rst describing the discrete-time linear PID control law and then progressively deriving the steps necessary to incorporate a fuzzy logic control mechanism into the modi®cations of the PID structure. The ®nal version of this new fuzzy PID controller is a computationally ecient analytic scheme suitable for implementation in a real-time closed-loop digital control. Numerous computer simulations are included to demonstrate the e€ectiveness of the controller for both linear and nonlinear systems. Finally, a brief analysis is presented to prove that the controller has bounded-input/bounded-output (BIBO) stability. Ó 2000 Elsevier Science Inc. All rights reserved. Keywords: Fuzzy control systems; PID controllers; Stability analysis

*

Corresponding author. Fax: +1-713-743-4444. E-mail address: [email protected] (H. Ogmen).

0020-0255/00/$ - see front matter Ó 2000 Elsevier Science Inc. All rights reserved. PII: S 0 0 2 0 - 0 2 5 5 ( 9 9 ) 0 0 1 2 7 - 9

250

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

1. Introduction There are many systems, such as robotic manipulators, which have some unique physical characteristics that are dicult to address mathematically. The natural dynamics of a robotic manipulator are coupled nonlinear equations subject to complicated friction and damping e€ects [4]. For example, the inertia terms of a robot arm are functions of the con®guration of each joint and are coupled. The basic kinematic terms for revolute joints have coupled and transcendental terms. The Coriolis and centrifugal acceleration terms produce nonlinear velocity terms. Even the simplest Coulomb friction model is nonlinear and dicult to model mathematically. Moreover, the physical parameters are time-varying as the components wear out or the sensors drift away from their expected operating characteristics. The main task of a controller is to ®nd a suitable set of commands that can cause the system to smoothly reach the desired state with minimal deviations. For many complex systems, the governing equations are coupled nonlinear equations subject to various dampings. As such, the controlled system equations for the general case are complex, and, therefore, the controller must be able to e€ectively incorporate nonlinear properties and unmodeled e€ects into its basic design. The most common industrial controllers are the proportional-integral-derivative (PID) controllers [3]. They have well understood properties and mature design methods. The classical PID control law provides the basis for the design technique developed in this paper. Since the implementation of most modern control systems is in a computer processor, the conventional PID control law must be converted into a digital version in applications. The general continuous-time PID controller has the expression Z _ …1:1† u…t†cmd ˆ KP e…t† ‡ KI e…t† dt ‡ KD e…t†; where e…t† ˆ r…t† ÿ y…t† is the tracking error signal between the reference r…t† and the controlled system output y…t†, and KP , KI , and KD are constant P, I, and D control gains, respectively. This is ®rst converted into the frequency domain to get U …s†cmd ˆ KP E…s† ‡ KI

E…s† ‡ KD sE…s†; s

…1:2†

where the capital variable is used to indicate the corresponding Laplace transform. This equation can then be converted into the discrete-frequency domain with the variable z, using the bilinear transform sˆ

2 1 ÿ zÿ1 ; T 1 ‡ zÿ1

…1:3†

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

251

_ where T > 0 is the sampling period, and the substitution of E…z† for sE…s†, to produce U …z†cmd ˆ KP E…z† ‡ KI

T 1 ‡ zÿ1 _ E…z† ‡ KD E…z†: 2 1 ÿ zÿ1

…1:4†

Eliminating the denominator yields U …z†cmd …1 ÿ zÿ1 † ˆ KP E…z†…1 ÿ zÿ1 † ‡ KI  …1 ÿ zÿ1 †:

T _ …1 ‡ zÿ1 †E…z† ‡ KD E…z† 2 …1:5†

This equation can be converted back to the discrete-time domain using the inverse z transformation to produce u…nT †cmd ÿ u…nT ÿ T †cmd ˆ KP …e…nT † ÿ e…nT ÿ T †† ‡ KI _ † ‡ e…nT ÿ T †† ‡ KD …e…nT _ ÿ e…nT ÿ T ††;

T …e…nT † 2 …1:6†

where n ˆ 0; 1; 2; . . . By rearranging terms, this equation can be expressed as T T e…nT † ‡ 2KI e…nT † 2 2 T ÿ …KP e…nT ÿ T † ÿ KI e…nT ÿ T †† 2 _ _ † ÿ e…nT ÿ T ††: ‡ KD …e…nT

u…nT †cmd ÿ u…nT ÿ T †cmd ˆ KP e…nT † ÿ KI

…1:7†

Let TKI ; K~P ˆ KP ÿ 2

…1:8†

K~I ˆ KI T ;

…1:9†

so that Eq. (1.7) can be expressed as u…nT †cmd ˆ u…nT ÿ T †cmd ‡ K~I e…nT † ‡ K~P …e…nT † ÿ e…nT ÿ T †† _ _ † ÿ e…nT ÿ T ††: ‡ KD …e…nT

…1:10†

This is the ®nal discrete controller equation to be used below. A special fuzzy logic form of Eq. (1.10) will be developed later to yield a more powerful and robust controller for various systems in which the plant is not actually linear. If a problem is not well understood and cannot be precisely described mathematically, but has good general ``rules-of-thumb'' on how to control it, a fuzzy logic controller often works well [9]. The design engineer ®rst determines the membership functions and linguistic de®nitions to capture the desired

252

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

dynamics. Once these are determined, the implementation of the controller is achieved by directly applying existing techniques. However, the determination of these rules and de®nitions are not obvious for complex systems, but they are critical to the performance of the controller. Fuzzy logic controllers are intrinsically nonlinear, yet do allow direct insight into their behavior [1]. Unlike other methods, such as neural networks, it is usually easy to determine what action a fuzzy controller will take for a given situation since fuzzy controllers generally have analytic structures. Fuzzy logic is encoded in simple rules with a structure such as ``if this antecedent situation is encountered, then take that consequence action''. The implication of the relationship between the physical world and the fuzzy rules is dicult to capture, but the ®nal action of the controller is easy to determine. Fuzzy logic controllers are normally built with three distinct components, as shown in Fig. 1 [5]. A fuzzy rule base is constructed in the linguistic form ``if x is true then do y''. This rule base is built on general observations and knowledge of

Fig. 1. Structure of a typical fuzzy logic controller.

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

253

the problem, and is usually straightforward to design. However, the other two components are not as so. A fuzzi®cation unit is used to transform the numerical input signal into some fuzzy values, while a defuzzi®cation step is used to transform the ®nal fuzzy value into an output signal from the controller. These two processes require heuristic rules and membership functions to encode the desired system response characteristics and controller dynamics. It is not obvious what these fuzzy transformations should be based upon only some basic understanding of the physical system. This is a signi®cant problem in the design of various fuzzy controllers, and is the basic justi®cation for the reason of using the well-known PID controller as the underlying structure for our new design. This is to be further discussed in Section 2. Di€ering from the existing fuzzy PI [11], PD [7], PI + D [8], PD + I [6], and (PI + D)2 [10], herewith we develop a full-scale fuzzy PID controller of the same type, with its control performance evaluation and stability analysis given altogether in the paper. 2. Derivation of the nonlinear fuzzy PID controller As stated previously, a fuzzy controller has fuzzi®cation, rule base, and defuzzi®cation components. The ®rst problem is how to formulate the fuzzi®cation process using the common triangular and trapezoidal functions. Recall that the general PID controller equation is given by Eq. (1.10). Let eI ˆ K~I e…nT †;

…2:1†

eP ˆ K~P …e…nT † ÿ e…nT ÿ T ††;

…2:2†

_ _ † ÿ e…nT ÿ T †† eD ˆ KD …e…nT

…2:3†

represent the tracking error, change in error, and change in error rate, respectively. Eq. (1.10) is then written as Ducmd ˆ eI ‡ eP ‡ eD ;

…2:4†

and the incremental control output is Ducmd ˆ ucmd …nT † ÿ ucmd …nT ÿ T †:

…2:5†

The three error terms are comparable to the input signals shown in Fig. 1. As presented in Fig. 2, the simplest input membership function used for eI , eP , and eD in the fuzzi®cation process are the same, and have two straight lines followed by constant hold when the values exceed some predetermined threshold. The threshold parameter, L, is speci®ed to de®ne the maximum and minimum values for the fuzzi®cation process. For example, for an input value

254

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

Fig. 2. The input membership functions.

greater than )L, the positive membership value function (designated by p) starts at a small value, goes to a value of one half at 0, and ®nally goes to 1 when the input value is greater that L. The negative membership function (designated by n) is the opposite. The output membership functions are not as simple since there are more possible outcomes. In our case, there are also two crossing straight lines followed by constant holds, but there are two extra triangular membership functions. These are shown in Fig. 3. As before, the parameter, L, de®nes the minimum and maximum outputs, but there are two new output terms centered at L=3, respectively. Given these membership functions, it is now possible to present the inference composition rules. These can be expressed as follows: …R1† IF eP 2 eP  n & eI 2 eI  n & eD 2 eD  n Then Du 2 Du  n` …R2† IF eP 2 eP  n & eI 2 eI  n & eD 2 eD  p Then Du 2 Du  n

Fig. 3. The output membership functions.

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

255

…R3† IF eP 2 eP  p & eI 2 eI  n & eD 2 eD  n Then Du 2 Du  n …R4† IF eP 2 eP  p & eI 2 eI  n & eD 2 eD  p Then Du 2 Du  p …R5† IF eP 2 eP  n & eI 2 eI  p & eD 2 eD  n Then Du 2 Du  n …R6† IF eP 2 eP  n & eI 2 eI  p & eD 2 eD  p Then Du 2 Du  p …R7† IF eP 2 eP  p & eI 2 eI  p & eD 2 eD  n Then Du 2 Du  p …R8† IF eP 2 eP  p & eI 2 eI  p & eD 2 eD  p Then Du 2 Du  p` where the & symbol represents the fuzzy ``and'' operation, and the 2 symbol means ``is a member of'', and the  symbol represents the combination. Note the ` symbol represents the ``large'' value in the corresponding direction of either positive (p) or negative (n). This notation can be interpreted as follows: if the antecedents memberships having been combined with the ``and'' function are true to some degree, then the consequences memberships must also be true to some degree. For example, rule R1 can be stated as ``if the integral term is a member of the negative set, and the proportional term is a member of the negative set, and the velocity term is a member of the negative set, then the output is a member of the negative large set''. The output from rule R2 is also a member of the negative set, but not as large as rule R1, so its output will not be ``as true as'' rule R1. For the defuzzi®cation process, the most commonly used formula is the center of gravity, or Sugeno method. This is expressed as P fmembership…inputi †  outputi g ; …2:6† Ducmd ˆ i P i fmembership…inputi †g where i is the number of rules. For our controller design, this formula reduces to Ducmd ˆ

l…R1†  n` ‡ l…R2†  n ‡    ‡ l…R7†  p ‡ l…R8†  p` ; l…R1† ‡ l…R2† ‡ l…R3† ‡    ‡ l…R6† ‡ l…R7† ‡ l…R8† …2:7†

where l…R1† is the degree (membership value) from rule R1, and so on. As there are three di€erent input components in the control law corresponding to the proportional, integral, and di€erential terms, it is necessary to view all the possible combinations as a cube with a limiting edge value of L. Fig. 4 represents the three-dimensional cube with the boundaries drawn at the value of L. As shown in Fig. 5, the defuzzi®cation rules will be constructed by dividing the cube into 48 sectors with known characteristics (note that there are some sectors on the back sides of the cube which cannot be seen from the front of the ®gure). Fig. 6 shows a single sector of the fuzzy cube labeled Sector 1. In Sector 1, the following boundaries can be seen: 0 6 eP 6 L;

…2:8†

256

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

Fig. 4. The fuzzy membership function domain cube.

Fig. 5. Sector de®nitions of the fuzzy membership cube.

0 6 eD 6 L;

…2:9†

0 6 eI 6 L:

…2:10†

Furthermore, the corresponding error relations are:

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

257

Fig. 6. Sector 1 of the fuzzy membership cube.

eD 6 eP ;

…2:11†

eD 6 eI ;

…2:12†

eI 6 eP :

…2:13†

By using Fig. 2 and the mathematical formulas for the straight lines that de®ne the memberships functions, the individual membership functions can be expressed as eP  n ˆ

ÿeP ‡ L ; 2L

…2:14†

eI  n ˆ

ÿeI ‡ L ; 2L

…2:15†

eD  n ˆ

ÿeD ‡ L ; 2L

…2:16†

eP  p ˆ

eP ‡ L ; 2L

…2:17†

eI  p ˆ

eI ‡ L ; 2L

…2:18†

eD ‡ L : 2L

…2:19†

eD  p ˆ

258

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

By examining the regions de®ned by Sector 1 from Fig. 6, along with Fig. 2, it is clear that all the negative terms are less than 1/2 and all the positive terms are greater than 1/2. The positive membership relationships can now be expressed as 1=2 6 eD  p 6 eP  p;

…2:20†

1=2 6 eD  p 6 eI  p;

…2:21†

1=2 6 eI  p 6 eP  p:

…2:22†

Furthermore, by observing that a larger negative number subtracted from L is less than a smaller negative number subtracted from L, the negative relationships can be stated as 1=2 P eD  n P eP  n;

…2:23†

1=2 P eD  n P eI  n;

…2:24†

1=2 P eI  n P eP  n:

…2:25†

It is now possible to evaluate Eq. (2.7) for a control output. By using the minimum function for the fuzzy ``and'' (t-norm) operation, the result from each rule is expressed in Table 1. By summing the equations in the third column of Table 1 for the denominator and the ®fth column for the numerator, the incremental control formula for Sector 1 is obtained as Ducmd ˆ

L…4eP ‡ 2eD † : 3…8L ÿ 4eP ÿ 2eI †

…2:26†

As the maximum value that the eI , eP or eD term can have is L, the limiting value for this control action is L. This is what would be expected from the fuzzi®cation functions. Table 1 The fuzzy PID control values for Sector 1 Rule

Minimum of rule

Membership equation

Output

Numerator

(R1) (R2) (R3) (R4) (R5) (R6) (R7) (R8)

eP  n eP  n eI  n eI  n eP  n eP  n eD  n eD  p

ÿeP =2 ‡ L=2 ÿeP =2 ‡ L=2 ÿeI =2 ‡ L=2 ÿeI =2 ‡ L=2 ÿeP =2 ‡ L=2 ÿeP =2 ‡ L=2 ÿeD =2 ‡ L=2 eD =2 ‡ L=2

ÿL ÿL=3 ÿL=3 L=3 ÿL=3 L=3 L=3 L

eP L=2 ÿ L2 =2 eP L=6 ÿ L2 =6 eI L=6 ÿ L2 =6 ÿeI L=6 ‡ L2 =6 eP L=6 ÿ L2 =6 ÿeP L=6 ‡ L2 =6 ÿeD L=6 ‡ L2 =6 eD L=2 ‡ L2 =2

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

259

Since this case was for Sector 1, the procedure needs to be repeated for all of the cases similar to it. Altogether, there are eight cases out of 48 where the eP is greater than either of the other two terms. Although similar, they are not quite the same. Four more sectors are necessary to be discussed in detail, and the rest can be omitted as they produce the same results as the others. The next region to be analyzed is Sector 2. As seen in Fig. 7, the boundaries are de®ned as 0 6 eP 6 L;

…2:27†

0 6 eD 6 L;

…2:28†

0 6 eI 6 L:

…2:29†

For Sector 2, the membership relationships are 0 6 eP  n 6 eD  n 6 eI  n 6 1=2;

…2:30†

1=2 6 eI  p 6 eD  p 6 eP  p 6 1:

…2:31†

By using these relationships, the result from each rule is expressed in Table 2. By summing the formulas in the third column of Table 2 for the denominator and the ®fth column for the numerator, the control formula for Sector 2 is obtained as Ducmd ˆ

L…4eP ‡ 2eI † : 3…8L ÿ 4eP ÿ 2eD †

Fig. 7. Sector 2 of the fuzzy membership cube.

…2:32†

260

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

Table 2 The fuzzy PID control values for Sector 2 Rule

Minimum of rule

Membership equation

Output

Numerator

(R1) (R2) (R3) (R4) (R5) (R6) (R7) (R8)

eP  n eP  n eD  n eI  n eP  n eP  n eD  n eI  p

ÿeP =2 ‡ L=2 ÿeP =2 ‡ L=2 ÿeD =2 ‡ L=2 ÿeI =2 ‡ L=2 ÿeP =2 ‡ L=2 ÿeP =2 ‡ L=2 ÿeD =2 ‡ L=2 eI =2 ‡ L=2

ÿL ÿL=3 ÿL=3 L=3 ÿL=3 L=3 L=3 L

eP L=2 ÿ L2 =2 eP L=6 ÿ L2 =6 eD L=6 ÿ L2 =6 ÿeI L=6 ‡ L2 =6 eP L=6 ÿ L2 =6 ÿeP L=6 ‡ L2 =6 ÿeD L=6 ‡ L2 =6 eI L=2 ‡ L2 =2

The procedure will now be repeated for Sector 3. In this sector, the boundaries and the membership relationships are de®ned as 0 6 eP 6 L;

…2:33†

0 6 eD 6 L;

…2:34†

ÿL 6 eI 6 0;

…2:35†

0 6 eP  n 6 eD  n 6 eI  p 6 1=2;

…2:36†

1=2 6 eI  n 6 eD  p 6 eP  p 6 1:

…2:37†

By using these relationships, the result from each rule in Sector 3 is expressed in Table 3. For this sector, incremental control formula is obtained as Ducmd ˆ

L…4eP ‡ 2eI † : 3…8L ÿ 4eP ÿ 2eD †

…2:38†

Note that this is the same as Eq. (2.26) and a pattern is beginning to develop. The procedure will now be repeated for Sector 4. In this sector, the boundaries and membership relationships are de®ned as 0 6 eP 6 L;

…2:39†

0 6 eD 6 L;

…2:40†

ÿL 6 eI 6 0;

…2:41†

0 6 eP  n 6 eI  p 6 eD  n 6 1=2;

…2:42†

1=2 6 eD  p 6 eI  n 6 eP  p 6 1:

…2:43†

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

261

Table 3 The fuzzy PID control values for Sector 3 Rule

Minimum of rule

Membership equation

Output

Numerator

(R1) (R2) (R3) (R4) (R5) (R6) (R7) (R8)

eP  n eP  n eD  n eI  n eP  n eP  n eD  n eI  p

ÿeP =2 ‡ L=2 ÿeP =2 ‡ L=2 ÿeD =2 ‡ L=2 ÿeI =2 ‡ L=2 ÿeP =2 ‡ L=2 ÿeP =2 ‡ L=2 ÿeD =2 ‡ L=2 eI =2 ‡ L=2

ÿL ÿL=3 ÿL=3 L=3 ÿL=3 L=3 L=3 L

eP L=2 ÿ L2 =2 eP L=6 ÿ L2 =6 eD L=6 ÿ L2 =6 ÿeI L=6 ‡ L2 =6 eP L=6 ÿ L2 =6 ÿeP L=6 ‡ L2 =6 ÿeD L=6 ‡ L2 =6 eI L=2 ‡ L2 =2

By using these relationships, the result from each rule in Sector 4 is expressed in Table 4. For this case, the control formula is obtained as Ducmd ˆ

L…4eP ‡ 4eI ‡ 2eI † : 3…8L ÿ 4eP ‡ 2eI †

…2:44†

This equation is quite di€erent than the previous ones. The procedure will now be repeated for the other sectors. For Sector 5, the incremental control formula is Ducmd ˆ

L…4eP ‡ 4eI ‡ 2eD † ; 3…8L ÿ 4eP ‡ 2eI †

…2:45†

for Sectors 6 and 7 is Ducmd ˆ

L…4eP ‡ 4eD ‡ 2eI † ; 3…8L ÿ 4eP ‡ 2eD †

…2:46†

Table 4 The fuzzy PID control values for Sector 4 Rule

Minimum of rule

Membership equation

Output

Numerator

(R1) (R2) (R3) (R4) (R5) (R6) (R7) (R8)

eP  n eP  n eD  n eD  p eP  n eP  n eP  p eI  p

ÿeP =2 ‡ L=2 ÿeP =2 ‡ L=2 ÿeD =2 ‡ L=2 eD =2 ‡ L=2 ÿeP =2 ‡ L=2 ÿeP =2 ‡ L=2 eI =2 ‡ L=2 eI =2 ‡ L=2

ÿL ÿL=3 ÿL=3 L=3 ÿL=3 L=3 L=3 L

eP L=2 ÿ L2 =2 eP L=6 ÿ L2 =6 eD L=6 ÿ L2 =6 eD L=6 ‡ L2 =6 eP L=6 ÿ L2 =6 ÿeP L=6 ‡ L2 =6 eI L=6 ‡ L2 =6 eI L=2 ‡ L2 =2

262

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

and for Sector 8 is Ducmd ˆ

L…4eP ‡ eD † : 3…8L ÿ 4eP ‡ 2eI †

…2:47†

As it turns out, the general formula for all sectors can be expressed in one of two possible formulas, which are functions of the maximum, minimum, and median of the magnitudes. If the maximum and the median have the same sign, the incremental control formula is Ducmd ˆ

L…4Max…eP ; eI ; eD † ‡ 2Min…eP ; eI ; eD †† ; 3…8L ÿ 4j Max…eP ; eI ; eD † j ÿ 2j Med…eP ; eI ; eD † j†

…2:48†

and if they have di€erent signs, Ducmd ˆ

L…4Max…eP ; eI ; eD † ‡ 4Med…eP ; eI ; eD † ‡ 2Min…eP ; eI ; eD †† : 3…8L ÿ 4j Max…eP ; eI ; eD † j ÿ 2j Med…eP ; eI ; eD † j† …2:49†

Note that the Max, Min, and Med functions used here only examine the magnitude of the input values to determine the functions value, but they do retain the sign information. For instance, for the vector of ‰ÿ5; 4; 2Š, the Max is ÿ5, the Min is 2, and the Med is 4. Also, the ranges of magnitudes of the eI , eP , or eD terms are limited to L to ensure that their maximum magnitudes are constrained. This is not the standard mathematical de®nition of the three functions. 3. Computer simulation results This new fuzzy PID controller is now examined for its ability to control linear and nonlinear plants, and to evaluate its performance in comparison with the corresponding conventional PID controller tuned by trial and error. The ®rst system to be tested is a third-order linear system with a transfer function H …s† ˆ

s‡1 : s3 ‡ 9s2 ‡ 26s ‡ 24

This system can be converted into a state±space representation as 2 3 2 3 0 1 0 0 x_ ˆ 4 0 0 1 5x ‡ 4 0 5u; ÿ24 ÿ 26 ÿ 9 1 y ˆ ‰1

1

0 Šx

and simulated using the MATLAB language.

…3:1†

…3:2† …3:3†

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

263

To convert the continuous gains to discrete ones, the formulas KP ˆ …KPc ÿ KIc  T =2†;

…3:4†

KI ˆ KIc  T ;

…3:5†

KD ˆ KDc =T

…3:6†

were employed to account for changes in the sampling time. For this system, our best choice of continuous PID controller gains are 0.78 for the proportional term, 120 for the integral term, and 0.0002 for the derivative term. The sampling time is 0.01 s and the desired setpoint value is ÿ4:0. Next, the fuzzy PID system is simulated using the same PID gains with a single fuzzy controller gain of 4.5 and the threshold parameter L of 780 found by trial and error. The ®rst plot shown in Fig. 8 presents the results from these two simulations. As expected, both controllers produce excellent trajectories. To investigate the robustness of the two controllers, the cases were redone with the value for the integral gain is reduced by one tenth. This represents an implementation error in the hardware (Fig. 9). The fuzzy controller reached the desired setpoint an order of magnitude faster than the linear controller, implying that the fuzzy controller is more robust in terms of hitting the setpoint in a reasonable amount of time. Since the PID controller is known to perform well for regular lower-order linear systems, an unstable third-order nonminimum phase system with a transfer function of

Fig. 8. Simulation of a third-order system (demonstrates tracking).

264

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

Fig. 9. Simulation of a third-order system (demonstrates robustness).

H …s† ˆ

s2 ÿ s ÿ 2 s3 ‡ 3s2 ÿ 10s ÿ 24

…3:7†

was then examined. Simulated as before, our best choice of gains are 10.5 for the proportional term, 20 000 for the integral term, and 0.0005 for the der-

Fig. 10. Simulation of a non-minimum phase system.

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

265

rivative term. Since this is more sensitive to time changes, the time step is set at T ˆ 0:001 s. The desired setpoint value is 10.0 and the threshold parameter L is 780. Fig. 10 presents the output from this simulation. As seen, the fuzzy PID controller did produce a good trajectory. On the contrary, the conventional linear controller could not produce reasonable results and is not presented in the example. Next, three nonlinear systems are simulated using trapezoidal integration. These cases progress from simple functions to more complex ones, and the time step is ®xed to be 0.1 s. For all the cases, the fuzzy PID controller does produce good trajectories but no set of grains were found for the conventional PID controllers which could track the setpoint, hence, no results are presented here. The ®rst, and very simple nonlinear system is _ ˆ 0:0001j y…t† j ‡ u…t†: y…t†

…3:8†

For this equation, the desired setpoint value is ÿ5:0 and the threshold parameter L ˆ 10. The best controller gains found by trial and error tuning are 0.7 for the proportional term, 1.3 for the integral term, and 0.01 for the derivation term. Fig. 11 presents the output from this simulation. Next, a nonlinear system is p _ ˆ ÿy…t† ‡ j y…t† j ‡ u…t†: y…t† …3:9† The desired setpoint value is 6.0 and the threshold parameter L ˆ 350. Using trial and error tuning, the best controller gains for this simulation are 2 for the

Fig. 11. Simulation of absolute value non-linearity.

266

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

Fig. 12. Simulation of square-root non-linearity.

proportional term, 5 for the integral term, and 0.0002 for the derivative term. Fig. 12 presents the output from this simulation. Note how this system converges to the set point in very few iterations, and it was quite easy to ®nd gain combinations that worked to produce an acceptable response. For this example, the system was surprisingly insensitive to a range of gain combinations. The last and most complex nonlinear case investigated is p _ ˆ y…t† ‡ sin2 j y…t† j ‡ u…t†: …3:10† y…t† The desired setpoint value is 4.0 and the threshold parameter L ˆ 500. The best choice of controller gains for this simulation are 1.8 for the proportional term, 1.8 for the integral term, and 0.008 for the derivative term. Fig. 13 presents the output from this simulation. Unlike the previous cases, ®nding a set of gains that worked for this case was not easy, and the fuzzy PID system required careful tuning to get the solution presented here. 4. Stability analysis The BIBO stability of various types of fuzzy PID controllers is analysis by numerous authors [3,7,8,12]. This analysis is based upon the response of the control system to a bounded input and uses the small gain theorem to ensure the output is also bounded.

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

267

Fig. 13. Simulation of complex non-linearity.

Consider the nonlinear feedback system shown in Fig. 14. This system can be expressed as e1 ˆ u1 ÿ S2 …e2 †;

…4:1†

e2 ˆ u2 ÿ S1 …e1 †;

…4:2†

where the error terms are bounded, admissible, causal functions. This generally requires that the in®nite integral of the function raised to some power is ®nite. Suppose there exist constants L1 , L2 , M1 , and M2 , such that kS1 …e1 †k 6 M1 ‡ L1 ke1 k;

…4:3†

kS2 …e2 †k 6 M2 ‡ L2 ke2 k;

…4:4† R1 p 1=p where kf k denotes either the function ‰ 0 j f …t† jdtŠ with 1 6 p < 1, or the function is the superium for p ˆ 1. The small gain theorem states that if the product of L1 L2 is less than 1, then the following error bounds are true: ke1 k 6 …1 ÿ L1 L2 †ÿ1 …ku1 k ‡ L2 ku2 k ‡ M2 ‡ L2 M1 †;

Fig. 14. Non-linear feedback control system.

…4:5†

268

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

ke2 k 6 …1 ÿ L1 L2 †ÿ1 …ku2 k ‡ L1 ku1 k ‡ M1 ‡ L1 M2 †;

…4:6†

so that a bounded input yields a bounded output. Let the plant be de®ned as N. The fuzzy PID control system equations can be expressed in the notation used previously as e1 …nT † ˆ e…nT †;

…4:7†

e2 …nT † ˆ u…nT †;

…4:8†

u1 …nT † ˆ r…nT †;

…4:9†

u2 ˆ ÿu…nT ÿ T †;

…4:10†

S1 …e1 …nT †† ˆ KPID Du…nT †;

…4:11†

S2 …e2 † ˆ N …e2 …nT ††:

…4:12†

The controller equations are examined next. First, by examining the equations for Sector 1, with the condition of 0 6 eD 6 eI 6 eP 6 L, Eq. (4.11) can be written as

L…4eP ‡ 2eD †

; …4:13† kS1 …e1 …nT ††k 6 KPID 3…8L ÿ 4e ÿ 2e † P

I

and Eq. (4.12) as kS2 …e2 †k ˆ kN kj…e2 …nT ††j:

…4:14†

Next, let the values Me, Mr, and Ma be de®ned as the superium of the absolute value of the error, the error rate, and the error acceleration signals. Namely, Me ˆ sup j e…nT † j;

…4:15†

Mr ˆ sup j e…nT † ÿ e…nT ÿ T † j;

…4:16†

_ _ † ÿ e…nT ÿ T † j: Ma ˆ sup j e…nT

…4:17†

nP0

nP0

nP0

These new values can be applied to the initial de®nitions of the controller terms to produce the bounds j eI j 6 K~I Me 6 K~I L;

…4:18†

j eP j 6 K~P Mr 6 2K~P L;

…4:19†

j eD j 6 KD Ma 6 2KD L;

…4:20†

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

269

where the conditions from Eqs. (2.27)±(2.29) have been used. Next, Eq. (4.9) is rearranged to produce KPID L…4K~P † kS1 …e1 …nT ††k 6 3…8L ÿ 8K~P L ÿ 4K~I L†   4KD  je1 …nT †j ÿ je1 …nT ÿ T †j ‡ L : …4:21† 4K~P Note that this equation can be written in a form similar to Eq. (4.3) with the ®rst term de®ned as KPID K~P …4:22† L1 ˆ ; 6…2L ÿ 2K~P ÿ K~I † and the rest of the constant terms grouped into M1 . Eq. (4.10) can also be written as L2 ˆ kN k:

…4:23†

By applying the small gain theorem, the stability condition for Sector 1 can be found as KPID K~P …4:24† kN k < 1: 6…2L ÿ 2K~P ÿ K~I † This process is repeated for the other sectors to yield the combined condition set as KPID K~P …4:25† kN k < 1; 6…2L ÿ 2K~P ÿ min…K~I ; KD †† KPID K~I kN k < 1; 6…2L ÿ 2K~I ÿ min…K~P ; KD ††

…4:26†

KPID KD kN k < 1: 6…2L ÿ 2KD ÿ min…K~I ; K~P ††

…4:27†

The value of the plant output kN k must also be bounded, so the given nonlinear system has a ®nite gain. Conditions (4.25)±(4.27) together provide the BIBO stability criteria for the fuzzy PID controller design for a given bounded system.

270

J. Carvajal et al. / Information Sciences 123 (2000) 249±270

5. Conclusions The fuzzy PID controller derived in this paper successfully demonstrated better performance than the conventional PID controller for many cases, particularly for nonlinear plants. The fuzzy PID controller is also able to tolerate many poor selections or inadequate implementations of the controller gains which would make most conventional controllers unstable. Since nonlinear e€ects will be encountered in many complex systems, such as robotic manipulators, the ability of the fuzzy PID controller to tolerate these unmodeled nonlinear and gain-value variation factors is a substantial improvement over conventional linear PID controllers in real-world applications.

References [1] M. Brown, C. Harris, Neurofuzzy Adaptive Modeling and Control, Prentice-Hall, Englewood Cli€s, NJ, 1994. [2] G. Chen, Conventional and fuzzy PID controllers: an overview, International Journal of Intelligent and Control Systems 1 (1996) 235±246. [3] G. Chen, H. Ying, BIBO stability of nonlinear fuzzy PI control systems, Journal of Intelligent and Fuzzy Systems 5 (1997) 245±256. [4] J. Craig, Adaptive Control of Mechanical Manipulators, Addison-Wesley, Reading, MA, 1988. [5] C. Harris, C. Moore, M. Brown, Intelligent Control: Aspects of Fuzzy Logic and Neural Nets, World Scienti®c, River Edge, NJ, 1993. [6] H. Malki, D. Feigenspan, D. Misir, G. Chen, Fuzzy PID control of a ¯exible-joint robot arm with uncertainties from time-varying loads, IEEE Transactions on Control Systems Technology 5 (1997) 371±378. [7] H. Malki, H. Li, G. Chen, New design and stability analysis of a fuzzy proportional-derivative control system, IEEE Transactions on Fuzzy Systems 2 (1995) 245±254. [8] D. Misir, H. Malki, G. Chen, Design and analysis of a fuzzy proportional-integral-derivative controller, International Journal of Fuzzy Sets and Systems 79 (1996) 297±314. [9] W. Pedrycz, Fuzzy Control and Fuzzy Systems, second ed., Wiley, New York, NY, 1993. [10] P. Sooraksa, G. Chen, Mathematical modeling and fuzzy control for ¯exible link robots, Mathematical and Computer Modeling, vol. 27 (1998) 73±93. [11] H. Ying, W. Siler, J. Buckley, Fuzzy control theory: a nonlinear case, Automatica 26 (1990) 513±520. [12] P. Sooraksa, G. Chen Fuzzy (Pl + D)2 Control for ¯exible robot arms, Proc. IEEE Int. Conf. on Control Appl., Deerborn, MI, Sept. 15±18, pp. 536±541, 1996.