**2.1 Fuzzy controllers with dynamics**

The basic structure of the fuzzy controllers with dynamics is presented in Fig. 1.

Fig. 1. The block diagram of a fuzzy controller with dynamics

So, the following fuzzy controllers, with dynamics, have, as a central part a fuzzy block FB, an input filter and an output filter. The two filters give the dynamic character of the fuzzy controller. The fuzzy block has the well-known structure, from Fig. 2.

Fig. 2. The structure of fuzzy block

The fuzzy block does not treat a well-defined mathematical relation (a control algorithm), as a linear controller does, but it is using the inference with many rules, based on linguistic variables. The inference is treated with the operators of the fuzzy logic. The fuzzy block from Fig. 2 has three distinctive parts, in Mamdani type: fuzzyfication, inference and defuzzification. The fuzzy controller is an inertial system, but the fuzzy block is a noninertial system. The fuzzy controller has in the most common case two input variables *x*<sup>1</sup> and *x*2 and one output variable *u*. The input variables are taken from the control system. The inference interface of the fuzzy block releases a treatment by linguistic variables of the input variables, obtained by the filtration of the controller input variables. For the linguistic treatment, a definition with membership functions of the input variable is needed. In the interior of the fuzzy block the linguistic variables are linked by rules that are taking account of the static and dynamic behavior of the control system and also they are taking account of the limitations imposed to the controlled process. In particular, the control system must be stable and it must assure a good amortization. After the inference we obtain fuzzy information for the output variable. The defuzzification is used because, generally, the actuator that follows the controller must be commanded with a crisp value *u*d,. The command variable *u*, furnished by the fuzzy controller, from Fig. 1, is obtained by filtering the defuzzified variable *u*d. The output variable of the controller is the command input for the process. The fuzzification, the inference and the defuzzification bring a nonlinear behavior of the fuzzy block. The nonlinear behavior of the fuzzy block is transmitted also to the fuzzy PID controllers. By an adequate choosing of the input and output filters we may realize different structures of the fuzzy controllers with imposed dynamics, as are the general PI, PD and PID dynamics.

Tuning Fuzzy PID Controllers 175

For the transfer function of the linear PI controller with scaling coefficients the following

11 1 ( ) . ( ) . . .( ) *l ll R R du e de R H s K s Kc c c s sT s*

In the place of the summation block from Fig. 4 the fuzzy block BF from Fig. 2 is inserted. The derivation and integration are made in discrete time and specific scaling coefficients are there introduced. The saturation elements are introduced because the fuzzy block is

The filter from the controller input, placed on the low channel, takes the operation of digital

<sup>1</sup> () () ( ) ( ) *d z de t e t de z e z dt hz*

where *h* is the sampling period. In the domain of discrete time the derivative block has the

1 1 *de t h e t h e t* ( ) ( ) () *h h*

That shows us that the digital derivation is there accomplished based on the information of

( )

*e ek h*

The error *e* and its derivative *de* are scaled with two scaling coefficients *c*e and *c*de, as it

The variables *x*e and *x*de from the inputs of the fuzzy block FB are obtained by a superior limitation to 1 and an inferior limitation to –1, of the scaled variables *e* and *de*. This limitation is introduced because in general case the numerical calculus of the inference is

(( 1) )

1

~

~

*e e kh*

*k k*

So, the digital equipment is making in fact the substraction of the two values.

(3)

(4)

(5)

(6)

() () *<sup>e</sup> et cet* (7)

() () *de de t c de t* (8)

Fig. 5. The block diagram of the linear PI controller with scaling coefficients

relation may be written:

input-output model:

follows:

working on scaled universes of discourse [-1, 1].

error at the time moments *t*=*tk*=*k.h* and *t*k+1=*t*k+*h*:

made only on the scaled universe of discourse [-1, 1].

derivation; at its output we obtain the derivative *de* of the error *e*:

#### **2.2 Fuzzy PI controller**

The structure of a PI fuzzy controller with integration at its output (FC-PI-OI) is presented in Fig. 3.

Fig. 3. The block diagram of the fuzzy PI controller

The controller is working after the error *e* between the input variable reference and the feedback variable *r*. In this structure we may notice that two filter were used. One of them is placed at the input of the fuzzy block FB and the other at the output of the fuzzy block. In the approach of the PID fuzzy controllers the concepts of integration and derivation are used for describing that these filters have mathematical models obtained by discretization of a continuous time mathematical models for integrator and derivative filters.

The structure of the linear PI controller may be presented in a modified block diagram from Fig. 4.

Fig. 4. The modified block diagram of the linear PI controller

For this structure the following modified form of the transfer function may be written:

$$\mathbf{u}(s) = \mathbf{K}\_R \frac{1}{s} (\mathbf{s} + \frac{1}{T\_R}) \mathbf{e}(s) = \mathbf{K}\_R \frac{1}{s} \mathbf{x}\_t(s) \tag{1}$$

where

$$\begin{aligned} x\_t &= \stackrel{\sim}{e} + \stackrel{\sim}{de} \\ \stackrel{\sim}{e} &= \frac{1}{T\_R}e \\ \stackrel{\sim}{de} &= s.e \end{aligned} \tag{2}$$

In the next paragraph we shall show that the fuzzy block BF may be described using its input-output transfer characteristics, its variable gain and its gain in origin, as a linear

function around the origin ( ~ ~ 0, 0, 0 *<sup>d</sup> e de u* ).

The block diagram of the linear PI controller may be put similar as the block diagram of the fuzzy PI controller as in Fig. 5.

The structure of a PI fuzzy controller with integration at its output (FC-PI-OI) is presented in

The controller is working after the error *e* between the input variable reference and the feedback variable *r*. In this structure we may notice that two filter were used. One of them is placed at the input of the fuzzy block FB and the other at the output of the fuzzy block. In the approach of the PID fuzzy controllers the concepts of integration and derivation are used for describing that these filters have mathematical models obtained by discretization of

The structure of the linear PI controller may be presented in a modified block diagram from

For this structure the following modified form of the transfer function may be written:

~

*t*

~

0, 0, 0 *<sup>d</sup> e de u* ).

11 1 () ( )() () *<sup>R</sup> R t R us K s es K x s sT s*

~ ~

1

*e e T*

*de s e*

*x e de*

.

In the next paragraph we shall show that the fuzzy block BF may be described using its input-output transfer characteristics, its variable gain and its gain in origin, as a linear

The block diagram of the linear PI controller may be put similar as the block diagram of the

*R*

(1)

(2)

a continuous time mathematical models for integrator and derivative filters.

Fig. 4. The modified block diagram of the linear PI controller

**2.2 Fuzzy PI controller** 

Fig. 3. The block diagram of the fuzzy PI controller

Fig. 3.

Fig. 4.

where

function around the origin ( ~ ~

fuzzy PI controller as in Fig. 5.

Fig. 5. The block diagram of the linear PI controller with scaling coefficients

For the transfer function of the linear PI controller with scaling coefficients the following relation may be written:

$$\mathbf{r}\,H\_R\,\mathrm{(s)} = \mathbf{K}\_R.\frac{1}{\mathrm{s}}\mathrm{(s+\frac{1}{T\_R})} = \mathbf{K}.\mathbf{c}\_{du}^l.\frac{1}{\mathrm{s}}.\mathrm{(c}\_e^l + \mathrm{c}\_{de}^l\mathbf{s})\tag{3}$$

In the place of the summation block from Fig. 4 the fuzzy block BF from Fig. 2 is inserted. The derivation and integration are made in discrete time and specific scaling coefficients are there introduced. The saturation elements are introduced because the fuzzy block is working on scaled universes of discourse [-1, 1].

The filter from the controller input, placed on the low channel, takes the operation of digital derivation; at its output we obtain the derivative *de* of the error *e*:

$$de(t) = \frac{d}{dt}e(t) \circ - \bullet \ de(z) = \frac{z-1}{hz}e(z) \tag{4}$$

where *h* is the sampling period. In the domain of discrete time the derivative block has the input-output model:

$$d\,dc(t+h) = \frac{1}{h}e(t+h) - \frac{1}{h}e(t) \tag{5}$$

That shows us that the digital derivation is there accomplished based on the information of error at the time moments *t*=*tk*=*k.h* and *t*k+1=*t*k+*h*:

$$\begin{aligned} e\_k &= e(kh) \\ e\_{k+1} &= e((k+1)h) \end{aligned} \tag{6}$$

So, the digital equipment is making in fact the substraction of the two values. The error *e* and its derivative *de* are scaled with two scaling coefficients *c*e and *c*de, as it follows:

$$
\tilde{\mathbf{c}}e(t) = \mathbf{c}\_e e(t) \tag{7}
$$

$$
\tilde{dc}(t) = c\_{de}dc(t) \tag{8}
$$

The variables *x*e and *x*de from the inputs of the fuzzy block FB are obtained by a superior limitation to 1 and an inferior limitation to –1, of the scaled variables *e* and *de*. This limitation is introduced because in general case the numerical calculus of the inference is made only on the scaled universe of discourse [-1, 1].

The fuzzy block offers the defuzzified value of the output variable *u*d. This value is scaled with an output scaling coefficient *c*du:

$$
\tilde{\boldsymbol{\mu}}\_d = \mathbf{c}\_{d\mu} \boldsymbol{\mu}\_d \tag{9}
$$

Tuning Fuzzy PID Controllers 177

~ ~ <sup>1</sup> ( ) [ ( ) ( )] *u u* ( ) *e de e de*

<sup>~</sup> ( ) <sup>1</sup> ( ) ( ) *RF <sup>u</sup> e de u z <sup>z</sup> H z cc c*

In this case the derivation and integration is made at the input of the fuzzy bock, on the

The transfer function of the PID controller is obtained considering a linearization of the fuzzy block BF around the origin, for *x*e=0, *x*ie=0, *x*de=0 şi *u*d=0 with a relation of the

A relation, as the fuzzy block from the PID controller - which has 3 input variables - may

( ; , 0) , 0 *<sup>d</sup> BF t de ie t*

*<sup>u</sup> K xx x x*

The value *K*0 is the limit value in origin of the characteristics of the function:

*t*

*e z hz*

*uz c x z x z c c c ez*

*z*

*hz* (14)

(15)

*H s K Ts RG RG D* () 1 (16)

0( ) *u Kx x x d e ie de* (17)

*<sup>x</sup>* (18)

*t e ie de xxx x* (19)

For the fuzzy controller FC-PD there is obtained the following relation in the z-domain:

In this case the derivation is made at the input of the fuzzy bock, on the error *e*.

With this relation the transfer function results:

**2.4 Fuzzy PID controller** 

following form:

describe, is:

where:

For the PD linear controller we take the transfer function:

The structure of the fuzzy PID controller is presented in Fig. 7.

error *e*. The fuzzy block has three input variables *x*e, *x*ie and *x*de.

Fig. 7. The block diagram of the fuzzy PID controller

In the case of the PI fuzzy controller with integration at the output the scaled variable <sup>~</sup> *ud* is the derivative of the output variable *u* of the controller. The output variable is obtained at the output of the second filter, which has an integrator character and it is placed at the output of the controller:

$$
\mu u(t) = \int\_0^t \mu\_d(\tau) d\tau \circ \cdots \bullet u(z) = \frac{z}{z-1} \tilde{\mu}\_d(z) \tag{10}
$$

The input-output model in the discrete time of the output filter is:

$$
\mu(t+1) = \mu(t) + \tilde{\mu}\_d(t+1) \tag{11}
$$

The above relation shows that the output variable is computed based on the information from the time moments *t* and *t*+*h*:

$$\begin{aligned} \mu\_{k+1} &= \mu((k+1)h) \\ \mu\_k &= \mu(kh) \\ \tilde{\mu}\_{dk+1} &= \tilde{\mu}\_d((k+1)h) \end{aligned} \tag{12}$$

From the above relations we may notice that the "integration" is reduced in fact at a summation:

$$
\mu\_{k+1} = \mu\_k + \tilde{\mu}\_{dk+1} \tag{13}
$$

This equation could be easily implemented in digital equipments.

Due to this operation of summation, the output scaling coefficient *c*du is called also the increment coefficient.

*Observation:* The controller presented above could be called "fuzzy controller with summation at the output" and not with "integration at the output".

#### **2.3 Fuzzy PD controller**

The structure of the fuzzy PD controller (RF-PD) is presented in Fig. 6.

Fig. 6. The block diagram of the fuzzy PD controller with scaling coefficients

The fuzzy block offers the defuzzified value of the output variable *u*d. This value is scaled

*u cu <sup>d</sup> du d* (9)

(10)

*ut ut u t* ( 1) ( ) ( 1) *<sup>d</sup>* (11)

*u uu k k* <sup>1</sup> *dk*1 (13)

(12)

*ud* is

~

0

The input-output model in the discrete time of the output filter is:

This equation could be easily implemented in digital equipments.

summation at the output" and not with "integration at the output".

The structure of the fuzzy PD controller (RF-PD) is presented in Fig. 6.

Fig. 6. The block diagram of the fuzzy PD controller with scaling coefficients

*t*

 

1

*k k* ~ ~ 1

*u u kh*

*dk d*

( )

*u uk h*

From the above relations we may notice that the "integration" is reduced in fact at a

Due to this operation of summation, the output scaling coefficient *c*du is called also the

*Observation:* The controller presented above could be called "fuzzy controller with

*u uk h*

In the case of the PI fuzzy controller with integration at the output the scaled variable <sup>~</sup>

the derivative of the output variable *u* of the controller. The output variable is obtained at the output of the second filter, which has an integrator character and it is placed at the

~ ~

*d d <sup>z</sup> ut u d uz u z <sup>z</sup>*

~

(( 1) )

(( 1) )

~

() ( ) () ( ) <sup>1</sup>

The above relation shows that the output variable is computed based on the information

with an output scaling coefficient *c*du:

output of the controller:

from the time moments *t* and *t*+*h*:

summation:

increment coefficient.

**2.3 Fuzzy PD controller** 

In this case the derivation is made at the input of the fuzzy bock, on the error *e*. For the fuzzy controller FC-PD there is obtained the following relation in the z-domain:

$$\mu(z) = \tilde{c}\_{\text{\textquotedblleft}}[\mathbf{x}\_e(z) + \mathbf{x}\_{de}(z)] = \tilde{c}\_{\text{\textquotedblleft}}\left[c\_e + c\_{de}\frac{z-1}{hz}\right]e(z)\tag{14}$$

With this relation the transfer function results:

$$H\_{RF}(z) = \frac{\mu(z)}{e(z)} = \stackrel{\sim}{c}\_{\mu} \left( c\_e + c\_{de} \frac{z-1}{hz} \right) \tag{15}$$

For the PD linear controller we take the transfer function:

$$H\_{RG}(\mathbf{s}) = K\_{RG} \left( \mathbf{1} + T\_D \mathbf{s} \right) \tag{16}$$

### **2.4 Fuzzy PID controller**

The structure of the fuzzy PID controller is presented in Fig. 7.

In this case the derivation and integration is made at the input of the fuzzy bock, on the error *e*. The fuzzy block has three input variables *x*e, *x*ie and *x*de.

Fig. 7. The block diagram of the fuzzy PID controller

The transfer function of the PID controller is obtained considering a linearization of the fuzzy block BF around the origin, for *x*e=0, *x*ie=0, *x*de=0 şi *u*d=0 with a relation of the following form:

$$
\mu\_d = K\_0(\mathcal{X}\_e + \mathcal{X}\_{ie} + \mathcal{X}\_{de}) \tag{17}
$$

A relation, as the fuzzy block from the PID controller - which has 3 input variables - may describe, is:

$$\mathcal{K}\_{BF}(\mathbf{x}\_t; \mathbf{x}\_{de}, \mathbf{x}\_{ie} = \mathbf{0}) = \frac{\boldsymbol{\mu}\_d}{\mathbf{x}\_t}, \mathbf{x}\_t \neq \mathbf{0} \tag{18}$$

where:

$$
\boldsymbol{\omega}\_t = \boldsymbol{\omega}\_e + \boldsymbol{\omega}\_{ie} + \boldsymbol{\omega}\_{de} \tag{19}
$$

The value *K*0 is the limit value in origin of the characteristics of the function:

$$K\_0 = \lim\_{\mathbf{x}\_t \to 0} K\_{BF}(\mathbf{x}\_t; \mathbf{x}\_{de'}, \mathbf{x}\_{ie} = \mathbf{0}) \tag{20}$$

Tuning Fuzzy PID Controllers 179

with *x*de as a parameter. The passing from a frequency model to the parameter model is reduced to the determination of the parameters of the transfer impedance. The steps in such identification procedure are: organization and obtaining of experimental data on the transducer, interpretation of measured data, model deduction with its structure definition and model validation. Using the above translated characteristics we may obtain the

( , ) ( , ).

*x*e *NB ZE* PB

*NB NB NB ZE ZE NB ZE PB PB ZE PB PB*

<sup>0</sup> <sup>0</sup> lim ( ; ), 0

This value may be determined with a good approximation, at the limit, from the gain

We show here an example of the above characteristics for the fuzzy block with max-min inference, defuzzification with center of gravity, were the variables have the 3x3 primary

The MISO transfer characteristic of the fuzzy block may be written as follows:

The value *K*0 is the value at the limit, in origin of the characteristic *K*BF(*x*t; *x*de):

*e*

*u* 

rule base from Tab. 1 and three membership values from Fig. 8.

*xde*

Table 1. The 3x3 (primary) rule base

Fig. 8. Membership functions

characteristics.

.( ) ( ; ). *d FB e de FB e de e de FB t de t u f xx K xx x x K xx x* 

If the fuzzy bloc is linearized around the point of the origin, in the permanent regime: *x*e=0,

( ; ) ( ; )/ , 0 *K xx fxx x x FB t de t t de t t* (30)

(31)

0( ) *u Kx x d e de* (32)

*FB t de de <sup>x</sup> K K xx x* (33)

characteristic of the variable gain of the fuzzy block:

*x*de=0 and *u*d=0, the following relation will be obtained:

Taking account of the correction made on the fuzzy block with the incremental coefficient *c*u, the characteristic of the fuzzy block corrected and linearized around the origin is given by the relation:

$$
\mu = \mathfrak{c}\_{\mu} \mathcal{K}\_0 (\mathfrak{x}\_{\mathfrak{e}} + \mathfrak{x}\_{\mathfrak{ie}} + \mathfrak{x}\_{\text{de}}) \tag{21}
$$

We are denoting:

$$
\tilde{\mathcal{L}}\_{\mu} = \mathcal{c}\_{\mu} \mathcal{K}\_0 \tag{22}
$$

For the fuzzy controller RF-PID, with the fuzzy block BF linearized, the following inputoutput relation in the *z* domain may be written:

$$\mu(z) = \tilde{c}\_{\text{ul}}[\mathbf{x}\_{\varepsilon}(z) + \mathbf{x}\_{\text{ic}}(z) + \mathbf{x}\_{\text{de}}(z)] = \tilde{c}\_{\text{ul}}\left[c\_{e} + c\_{\text{ie}}\frac{z}{z-1} + c\_{\text{de}}\frac{z-1}{hz}\right] \mathbf{e}(z) \tag{23}$$

With these observations the transfer function of the fuzzy ID controller becomes:

$$H\_{RF}(z) = \frac{\mu(z)}{e(z)} = c\_{\mu} \left( c\_e + c\_{ie} \frac{z}{z-1} + c\_{de} \frac{z-1}{hz} \right) \tag{24}$$

For the linear PID controller, the following relation for the transfer function is considered:

$$H\_{RG}(\mathbf{s}) = K\_{RG} \left( 1 + T\_D \mathbf{s} + \frac{1}{T\_I s} \right) \tag{25}$$

#### **3. Pseudo-equivalence**

#### **3.1 Fuzzy block description using I/O transfer characteristics. Linearization**

The fuzzy block has a MISO transfer characteristic:

$$\mu\_d = f\_{\rm FB}(\mathbf{x}\_{e'}, \mathbf{x}\_{de}), \mathbf{x}\_{e'}, \mathbf{x}\_{de} \in [-a, a] \tag{26}$$

From this transfer characteristic, a SISO transfer characteristic may be obtained:

$$
\mu\_d = f\_e(\mathbf{x}\_e; \mathbf{x}\_{de})\_\prime \propto\_e [-a\_\prime a] \tag{27}
$$

where *x*de is a parameter.

We introduce a composed variable:

$$\mathbf{x}\_t = \mathbf{x}\_e + \mathbf{x}\_{de} \tag{28}$$

Using this new, composed variable, a family of translated characteristics may be obtained:

$$\mathbf{u}\_d = f\_t(\mathbf{x}\_t; \mathbf{x}\_{de}), \mathbf{x} \in [-2a, 2a] \tag{29}$$

<sup>0</sup> <sup>0</sup> lim ( ; , 0)

Taking account of the correction made on the fuzzy block with the incremental coefficient *c*u, the characteristic of the fuzzy block corrected and linearized around the origin is given by

~

With these observations the transfer function of the fuzzy ID controller becomes:

For the fuzzy controller RF-PID, with the fuzzy block BF linearized, the following input-

~ ~ <sup>1</sup> ( ) [ ( ) ( ) ( )] ( ) <sup>1</sup> *u u e ie de e ie de*

<sup>~</sup> ( ) <sup>1</sup> ( ) ( ) <sup>1</sup> *RF <sup>u</sup> e ie de u z z z H z cc c c*

For the linear PID controller, the following relation for the transfer function is considered:

<sup>1</sup> () 1 *RG RG D*

*H s K Ts*

**3.1 Fuzzy block description using I/O transfer characteristics. Linearization** 

From this transfer characteristic, a SISO transfer characteristic may be obtained:

Using this new, composed variable, a family of translated characteristics may be obtained:

*e z z hz* 

*I*

( , ), , [ , ] *u f x x x x aa d FB e de e de* (26)

( ; ), [ , ] *u f x x x aa d e e de e* (27)

( ; ), [ 2 ,2 ] *u fxx x a a d t t de* (29)

*t e de xxx* (28)

*T s*

 

*uz c x z x z x z c c c c ez*

*BF t de ie <sup>x</sup> K K xx x* (20)

0( ) *u cK x x x u e ie de* (21)

*z z*

*z hz*

*<sup>u</sup> <sup>u</sup>* <sup>0</sup> *c cK* (22)

(23)

(24)

(25)

*t*

the relation:

We are denoting:

**3. Pseudo-equivalence** 

where *x*de is a parameter.

We introduce a composed variable:

output relation in the *z* domain may be written:

The fuzzy block has a MISO transfer characteristic:

with *x*de as a parameter. The passing from a frequency model to the parameter model is reduced to the determination of the parameters of the transfer impedance. The steps in such identification procedure are: organization and obtaining of experimental data on the transducer, interpretation of measured data, model deduction with its structure definition and model validation. Using the above translated characteristics we may obtain the characteristic of the variable gain of the fuzzy block:

$$\mathcal{K}\_{FB}(\mathbf{x}\_{\mathbf{t}};\mathbf{x}\_{\mathrm{de}}) = f\_{\mathbf{t}}(\mathbf{x}\_{\mathbf{t}};\mathbf{x}\_{\mathrm{de}}) / \,\,\mathbf{x}\_{\mathbf{t}}\,\,\mathbf{x}\_{\mathbf{t}} \neq \mathbf{0} \tag{30}$$

The MISO transfer characteristic of the fuzzy block may be written as follows:

$$\begin{aligned} \mu\_d &= f\_{FB}(\mathbf{x}\_{e'}, \mathbf{x}\_{de}) = K\_{FB}(\mathbf{x}\_{e'}, \mathbf{x}\_{de}). \\ \mathbf{x}\_e(\mathbf{x}\_e + \mathbf{x}\_{de}) &= K\_{FB}(\mathbf{x}\_t; \mathbf{x}\_{de}). \mathbf{x}\_t \end{aligned} \tag{31}$$

If the fuzzy bloc is linearized around the point of the origin, in the permanent regime: *x*e=0, *x*de=0 and *u*d=0, the following relation will be obtained:

$$
\mu\_d = \mathcal{K}\_0(\mathfrak{x}\_e + \mathfrak{x}\_{de}) \tag{32}
$$

The value *K*0 is the value at the limit, in origin of the characteristic *K*BF(*x*t; *x*de):


Table 1. The 3x3 (primary) rule base

$$K\_0 = \lim\_{\mathbf{x}\_\varepsilon \to 0} K\_{FB}(\mathbf{x}\_t; \mathbf{x}\_{de}), \mathbf{x}\_{de} = 0 \tag{33}$$

This value may be determined with a good approximation, at the limit, from the gain characteristics.

We show here an example of the above characteristics for the fuzzy block with max-min inference, defuzzification with center of gravity, were the variables have the 3x3 primary rule base from Tab. 1 and three membership values from Fig. 8.

Fig. 8. Membership functions

Tuning Fuzzy PID Controllers 181

~ ~ <sup>1</sup> ( ) ( ( ) ( )) ( ) 1 1 *du du e de z zz u z c e z de z c c c e z z z hz*

> <sup>~</sup> ( ) <sup>1</sup> ( ) () 1 *RF du e de uz z <sup>z</sup> Hz c cc*

A pseudo-equivalence may be made for the fuzzy controller with a linear PI controller in the continuous time, used in common applications. The equivalence is a false one, because the

( ) <sup>1</sup> ( ) <sup>1</sup>

We use the quasi-continual form of the transfer function, obtained by the conversion from

1 /2 1 /2 *sh*

*sh*

~

We notice that the above transfer function matches the general transfer function of the linear

From the identification of the coefficients of the two transfer functions, the following

( ) 2 ( /2)

2

2 *de e*

*h c c*

*e*

*c* 

From relation (41) we may notice that the value of the gain coefficient *K*RG of the PI fuzzy controller depends on the all three scaling coefficients, and what it is the most important, it

And from the relation (42) we may notice that the time constant *T*RG depends only on the scaling coefficients *c*e and *c*de from the inputs of the fuzzy block. At the limit, for *h*0, the

*e s <sup>h</sup> c ch s*

*e s sT*

( ) *RG RG*

*z*

1 /2 1 /2 ( ) ( ) ( ) <sup>1</sup>

*du <sup>e</sup> sh RF RF de e <sup>z</sup> sh de e u s c h <sup>c</sup> Hs Hz c c*

~

*RG*

*T*

depends on the gain in the origin of the fuzzy block.

gain coefficient of the fuzzy controller has the value

*du RG de e c h K cc h*

where *h* is the sampling period for the conversion of the transfer function:

*u s Hs K*

*ez z hz*

The transfer function of the PI fuzzy controller with integration at the output becomes:

fuzzy controller is not linear, so we use the word "pseudo".

the discrete time in the continuous time with the transformation:

The PI controller has the general transfer function:

PI controller.

relations results:

(36)

*RG*

(37)

(39)

(41)

(42)

*K c Kc h RG de du* <sup>0</sup> / (43)

(38)

(40)

The MISO characteristic is presented in Fig. 9.a). The SISO characteristics are presented in Fig. 9.b). The translated characteristics are presented in Fig. 9.c). The characteristics of the variable gain are presented in Fig. 9.d).

Fig. 9. Transfer characteristics: a) MISO transfer characteristic b) SISO transfer characteristic c) Translated transfer characteristic d) Gain characteristic

From the Fig. 9.d) we may notice that the value of the gain in origin is *K*0 1,2. Taking account of the correction made upon the fuzzy block with the scaling coefficient *c*du, the characteristic of the fuzzy bloc around the origin is given by the relation:

$$
\tilde{\boldsymbol{\mu}}\_d = \mathbf{c}\_{d\mu} \mathbf{K}\_0(\mathbf{x}\_e + \mathbf{x}\_{de}) \tag{34}
$$

We use:

$$
\tilde{\mathcal{L}}\_{du} = \mathcal{c}\_{du} \mathcal{K}\_0 \tag{35}
$$

#### **3.2 Pseudo-equivalence of the fuzzy PI controller**

For the fuzzy controller with the fuzzy block BF linearized around the origin, we may write the following input-output relation in the *z*-domain:

The MISO characteristic is presented in Fig. 9.a). The SISO characteristics are presented in Fig. 9.b). The translated characteristics are presented in Fig. 9.c). The characteristics of the

a) b)

c) d) Fig. 9. Transfer characteristics: a) MISO transfer characteristic b) SISO transfer characteristic

Taking account of the correction made upon the fuzzy block with the scaling coefficient *c*du,

For the fuzzy controller with the fuzzy block BF linearized around the origin, we may write

0( ) *u cKx x d du e de* (34)

*du du* <sup>0</sup> *c cK* (35)

From the Fig. 9.d) we may notice that the value of the gain in origin is *K*0 1,2.

the characteristic of the fuzzy bloc around the origin is given by the relation:

~

~

c) Translated transfer characteristic d) Gain characteristic

**3.2 Pseudo-equivalence of the fuzzy PI controller** 

the following input-output relation in the *z*-domain:

We use:

variable gain are presented in Fig. 9.d).

$$u(z) = \frac{z}{z-1}\tilde{c}\_{du}(e(z) + de(z)) = \frac{z}{z-1}\tilde{c}\_{du}\left[c\_e + c\_{de}\frac{z-1}{hz}\right]e(z) \tag{36}$$

The transfer function of the PI fuzzy controller with integration at the output becomes:

$$H\_{RF}(z) = \frac{\mu(z)}{e(z)} = \frac{z}{z-1} c\_{d\mu} \left( c\_e + c\_{d\epsilon} \frac{z-1}{\hbar z} \right) \tag{37}$$

A pseudo-equivalence may be made for the fuzzy controller with a linear PI controller in the continuous time, used in common applications. The equivalence is a false one, because the fuzzy controller is not linear, so we use the word "pseudo". The PI controller has the general transfer function:

$$H\_{RG}(\mathbf{s}) = \frac{\mu(\mathbf{s})}{e(\mathbf{s})} = K\_{RG} \left( 1 + \frac{1}{sT\_{RG}} \right) \tag{38}$$

We use the quasi-continual form of the transfer function, obtained by the conversion from the discrete time in the continuous time with the transformation:

$$z = \frac{1 + sh\,\,/\,\,\,2}{1 - sh\,\,/\,\,2} \tag{39}$$

where *h* is the sampling period for the conversion of the transfer function:

$$H\_{RF}(\mathbf{s}) = \frac{\mathbf{u}(\mathbf{s})}{\mathbf{e}(\mathbf{s})} = H\_{RF}(\mathbf{z})\Big|\_{\mathbf{z}} \mathbf{1} + \operatorname{sh}/2 = \frac{\mathbf{\tilde{c}}\_{du}}{h} \Big(\mathbf{c}\_{de} + \frac{h}{2}\mathbf{c}\_{e}\Big) \Big[\mathbf{1} + \frac{\mathbf{c}\_{\varepsilon}}{\mathbf{(c}\_{de} + \mathbf{c}\_{\varepsilon}h \text{ / } \mathbf{2})\mathbf{s}}\Big] \tag{40}$$

We notice that the above transfer function matches the general transfer function of the linear PI controller.

From the identification of the coefficients of the two transfer functions, the following relations results:

$$K\_{RG} = \frac{\tilde{\mathbf{c}}\_{du}}{h} \left( \mathbf{c}\_{de} + \frac{h}{2} \mathbf{c}\_{e} \right) \tag{41}$$

$$T\_{RG} = \frac{c\_{dc} + \frac{h}{2}c\_e}{c\_e} \tag{42}$$

From relation (41) we may notice that the value of the gain coefficient *K*RG of the PI fuzzy controller depends on the all three scaling coefficients, and what it is the most important, it depends on the gain in the origin of the fuzzy block.

And from the relation (42) we may notice that the time constant *T*RG depends only on the scaling coefficients *c*e and *c*de from the inputs of the fuzzy block. At the limit, for *h*0, the gain coefficient of the fuzzy controller has the value

$$\mathbf{K}\_{\rm RG} = \mathbf{c}\_{de} \mathbf{K}\_0 \mathbf{c}\_{du} \;/\; \text{h} \tag{43}$$

and the time constant of the fuzzy controller has the value

$$T\_{RG} = c\_{de} \; / c\_e \tag{44}$$

Tuning Fuzzy PID Controllers 183

This structure is different from the first structure. Because of the integration block, a feedback is made with the anti-wind-up circuit AW. The circuit is needed because the

To assure stability to control systems using fuzzy PI controllers, we need a correction in order to modify the input-output transfer characteristic and a quasi-fuzzy controller results,

output of the controller is limited at maximum and minimum values +/-UM.

**3.4 Correction of the fuzzy block** 

with the structure from Fig. 11.

rd quadrants, like in Fig. 12.

The limitations are imposed by the maximum value of the command *u* of the process.

Fig. 11. The structure of the fuzzy PI controller (RFC) with an anti-wind-up circuit

Fig. 12. The translated characteristics with a correction of Kc = 0,1

As in the case of the fuzzy PI controller, a quasi-continual form is obtained:

introduced, the correction will be nonlinear.

**3.5 Pseudo-equivalence of the fuzzy PD controller** 

The characteristic of the nonlinear part of the control system is placed only in the I-st and III-

With the correction circuit from Fig. 11, the correction command is given by the relation:

~ ~

Even if the quasi-fuzzy structure in parallel with the fuzzy block BF a linear structure is

[( ) ( )] *u K e de e de c c* (47)

*Observations:* A great value of *c*e insures a small value of time constant of the fuzzy controller based on the relation (42). The value *c*e=1/*e*M, were *e*M is the superior limit of the universe of discourse of the variable *e* and it insures a dispersion of the values from the input *e* of the fuzzy block on the entire universe of discourse, without limitation for large variations of the error *e*. A great value of *c*de makes a great value for the time constant of the controller. A small value of *c*de makes smalls values for the time constant and also for the gain. But, by increasing *c*du , we may compensate the decreasing of the gain due to the decreasing of *c*de.

Chosen of other fuzzy block with other membership functions and inference method is equivalent to the chosen of other *K*0, greater or smaller.

From these relations we obtain the relation for designing the scaling coefficients based on the parameters of the linear PI controller:

$$c\_e = \frac{hK\_{RG}}{c\_{du}K\_0T\_{RG}}\tag{45}$$

$$
\mathcal{L}\_{de} = \mathcal{c}\_e (T\_{RG} - h \,/\, \mathcal{D}) \tag{46}
$$

We may notice the influence of the gain in origin on *c*e and also *c*de.

The linear PI controller may be designed with different methods taken from the linear control theory.

Because the gain in origin is the main issue in this equivalence, we present the algorithm of computation of the gain in origin is:


#### **3.3 Anti-wind-up circuit**

As in the case of the analogue linear PI controllers for the digital fuzzy controllers with integration, there is needed an anti-wind-up circuit. For the PI controller with integration at the output, an equivalent anti-wind-up circuit may be implemented as it is shown in Fig. 10.

Fig. 10. The structure of the fuzzy PI controller with an anti-wind-up circuit

*Observations:* A great value of *c*e insures a small value of time constant of the fuzzy controller based on the relation (42). The value *c*e=1/*e*M, were *e*M is the superior limit of the universe of discourse of the variable *e* and it insures a dispersion of the values from the input *e* of the fuzzy block on the entire universe of discourse, without limitation for large variations of the error *e*. A great value of *c*de makes a great value for the time constant of the controller. A small value of *c*de makes smalls values for the time constant and also for the gain. But, by increasing *c*du , we may compensate the decreasing of the gain due to the decreasing of *c*de. Chosen of other fuzzy block with other membership functions and inference method is

From these relations we obtain the relation for designing the scaling coefficients based on

*c*

We may notice the influence of the gain in origin on *c*e and also *c*de.

1. Obtaining the MIMO transfer characteristic of the fuzzy block.

compound variable as summation of the two input variables.

Fig. 10. The structure of the fuzzy PI controller with an anti-wind-up circuit

using one of the input variables as a parameter.

0 *RG <sup>e</sup> du RG hK*

The linear PI controller may be designed with different methods taken from the linear

Because the gain in origin is the main issue in this equivalence, we present the algorithm of

2. Obtaining the family of SISO transfer characteristics from the MIMO characteristic,

3. Obtaining the family of translated characteristic from the SISO characteristic, using a

4. Obtaining the gain characteristic by dividing the translated characteristic to the

5. Obtaining the gain in origin by computing the limit in origin of the families of gain

As in the case of the analogue linear PI controllers for the digital fuzzy controllers with integration, there is needed an anti-wind-up circuit. For the PI controller with integration at the output, an equivalent anti-wind-up circuit may be implemented as it is shown in Fig. 10.

*T cc RG de e* / (44)

*c KT* (45)

( /2) *c cT h de e RG* (46)

and the time constant of the fuzzy controller has the value

equivalent to the chosen of other *K*0, greater or smaller.

the parameters of the linear PI controller:

computation of the gain in origin is:

compound variable.

characteristics.

**3.3 Anti-wind-up circuit** 

control theory.

This structure is different from the first structure. Because of the integration block, a feedback is made with the anti-wind-up circuit AW. The circuit is needed because the output of the controller is limited at maximum and minimum values +/-UM.

The limitations are imposed by the maximum value of the command *u* of the process.

## **3.4 Correction of the fuzzy block**

To assure stability to control systems using fuzzy PI controllers, we need a correction in order to modify the input-output transfer characteristic and a quasi-fuzzy controller results, with the structure from Fig. 11.

Fig. 11. The structure of the fuzzy PI controller (RFC) with an anti-wind-up circuit

The characteristic of the nonlinear part of the control system is placed only in the I-st and IIIrd quadrants, like in Fig. 12.

Fig. 12. The translated characteristics with a correction of Kc = 0,1

With the correction circuit from Fig. 11, the correction command is given by the relation:

$$
\mu\_c = K\_c \left[ (\tilde{e} + \tilde{de}) - (\tilde{e} + d\tilde{e}) \right] \tag{47}
$$

Even if the quasi-fuzzy structure in parallel with the fuzzy block BF a linear structure is introduced, the correction will be nonlinear.
