You are on page 1of 7

Exercise No.

Fuzzy Logic

Consider a fuzzy logic application with the coefficients of a proportional integral


regulator adapted to it. The processes can be controlled classically; however we wish
to continually adapt the coefficients here. To do this, we recall the diagram of the
principle of an adaption loop that will lead to the exercise.

First let us consider an adaptation system uniquely related to the value of the error,
which is generated thanks to the difference between the set point and the measurement.

We will use membership functions formed by function segments. We distinguish


three membership functions for the error.

Hence for a “negative” error:


– μN () = 12 (1 − cos π) for  ∈ [−1.0, 0.0];
– μN () = 0.0 for  ∈ [0.0, +1.0]

and hence for a “zero” error:


– μZ () = 12 (1 + cos π) for  ∈ [−1.0, +1.0]

and hence for a “positive” error:


– μP () = 0.0 for  ∈ [−1.0, 0.0];
– μP () = 12 (1 − cos π) for  ∈ [0.0, +1.0].

1.1. Adaptive k and ki coefficients in function of the error

(A) Represent these three membership functions.

Handbook of Asynchronous Machine with Variable Speed Hubert Razik


© 2011 ISTE Ltd. Published 2011 by ISTE Ltd.

337
10.1002/9781118601037.oth1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/9781118601037.oth1 by EBMG ACCESS - ETHIOPIA, Wiley Online Library on [09/12/2023]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
338 Asynchronous Machine with Variable Speed

The values of the coefficients for the proportional action (k) and the integral action
(ki ) will be limited. We define the membership function in Dirac form (singletons)
whose limits will be:
– kmin < k < kmax ;
– ki min < ki < ki max .

(B) Represent these membership functions by taking the number 0.1 for the
minimum value and 0.9 for the maximum value.

Figure 1.1. Principle diagram of an adaptation loop

(C) Consider the following rules that will govern the adaptation system of the
regulator coefficients. They will be in the number of 2. Hence:
(1) if the error is large then k is large and ki is small;
(2) if the error small then k is small and ki is large.

By using the sum-product method, give the expression of μkP (), μkG (), μki P ()
and μki G ().

(D) Give the expression of the function governing coefficients k and ki as a


function of the error .

(E) Represent the two coefficients as a function of the error.

1.2. Adaptive k and ki coefficients in function of the error and its derivative

(A) Now we foresee the case of coefficient adaptation taking into account the error
() and its derivative (Δ).

The rules that will govern the adaptation of the coefficient of proportionality are:
– if the error is zero and the derivative is zero then k is small;
– if the error is not zero and the derivative is not zero then k is large.
10.1002/9781118601037.oth1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/9781118601037.oth1 by EBMG ACCESS - ETHIOPIA, Wiley Online Library on [09/12/2023]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Exercise No. 1 339

 
N Z P N Z P
N N P P P
Δ Z Δ E G P G
P P P P P
(a) adaptive version k (b) adaptive version ki

Table 1.1. Table of rules: (a) kmin = P and kmax = G; (b) ki min = P and ki max = G

Complete the table of rules (Table 1.1) representing these two angles, knowing that
we propose a table of rules for the adaptation of the integration coefficient. For that
purpose, give the rules governing the variation of ki .
(B) Give the expression of the membership functions of k, knowing that we will
adopt the sum-product method.
(C) Give the expression of k(, Δ).
(D) By using the above approach, give the expression of ki (, Δ).
(E) Represent the surface of k(, Δ) and ki (, Δ).

1.3. Answers
Part 1.1. Adaptive k and ki coefficients in function of the error

(A) and (B)


1.0
0.8
0.6
0.4
0.2
0.0
-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0

Figure 1.2. Fuzzy membership functions for “Negative” error

1.0
0.8
0.6
0.4
0.2
0.0
-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0

Figure 1.3. Fuzzy membership functions for “Zero” error


10.1002/9781118601037.oth1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/9781118601037.oth1 by EBMG ACCESS - ETHIOPIA, Wiley Online Library on [09/12/2023]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
340 Asynchronous Machine with Variable Speed

1.0
0.8
0.6
0.4
0.2
0.0
-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0

Figure 1.4. Fuzzy membership functions for “Positive” error

1.0
0.8
0.6
0.4
0.2
0.0
0.0 0.1 0.2 0.4 0.6 0.8 0.9 1.0

Figure 1.5. Fuzzy membership functions for k and ki

(C)

(1) μkG () = μZ () = 12 (1 + cos π);


(2) μkP () = 1 − μZ () = 12 (1 − cos π);
(3) μki G () = 1 − μZ () = 12 (1 − cos π);
(4) μki P () = μZ () = 12 (1 + cos π).

(D)

(1)

kmin · μkP () + kmax · μkG ()


k= ;
μkP () + μkG ()

(2)

ki min · μki P () + ki max · μki G ()


ki = .
μki P () + μki G ()
10.1002/9781118601037.oth1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/9781118601037.oth1 by EBMG ACCESS - ETHIOPIA, Wiley Online Library on [09/12/2023]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Exercise No. 1 341

Hence after some calculations:


(3)

k = kmin · μkP () + kmax · μkG ()


kmax + kmin kmax − kmin
= − cos π;
2 2
(4)

ki = ki min · μki P () + ki max · μki G ()


ki max + ki min ki max − ki min
= + cos π.
2 2

(E)

1.0
0.8
0.6
0.4
0.2
0.0
-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0

Figure 1.6. Value of proportionality coefficient as a function of the error:


ki min = 0.1 and ki max = 0.9

1.0
0.8
0.6
0.4
0.2
0.0
-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0

Figure 1.7. Value of the integration coefficient as a function of the error:


ki min = 0.1 and ki max = 0.9
10.1002/9781118601037.oth1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/9781118601037.oth1 by EBMG ACCESS - ETHIOPIA, Wiley Online Library on [09/12/2023]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
342 Asynchronous Machine with Variable Speed

Part 1.2. Adaptive k and ki coefficients in function of the error and its derivative

(A)

 
N Z P N Z P
N P P P N P P P
Δ Z P G P Δ E G P G
P P P P P P P P

(a) adaptive version k (b) adaptive version ki

Table 1.2. Table of rules: (a) kmin = P and kmax = G; (b) ki min = P and ki max = G

(B)

(1)

1 1
μkG (, Δ) = μZ () · μZ (Δ) = (1 + cos π) · (1 + cos πΔ);
2 2
(2)

μkP (, Δ) = μZ () + μZ (Δ) − μZ () · μZ (Δ)


1 1
= (1 − cos π) + (1 − cos πΔ)
2 2
1 1
− (1 − cos π) · (1 − cos πΔ).
2 2

(C)

From

kmax · μkG (, Δ) + kmin · μkP (, Δ)


k(, Δ) =   ,
μkP μkG (, Δ) + μkP , Δ

we obtain:
kmax − kmin
k(, Δ) = (1 + cos π)(1 + cos πΔ) + kmin .
4
10.1002/9781118601037.oth1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1002/9781118601037.oth1 by EBMG ACCESS - ETHIOPIA, Wiley Online Library on [09/12/2023]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Exercise No. 1 343

(D)

We obtain all calculations:


ki max − ki min
ki (, Δ) = (1 − cos π)(1 + cos πΔ) + ki min .
4

(E)

0.90
0.80
0.70
0.60
0.50
k
0.40
0.30
0.20
0.10 0.60
0.00 -0.20
tive
va
ri

-1.00
de

-0.50 0.00 -1.00


0.50
1.00
error

Figure 1.8. Value of the proportionality coefficient as a function of the error:


kmin = 0.1 and kmax = 0.9

0.90
0.80
0.70
0.60
0.50
ki
0.40
0.30
0.20
0.10 0.40
e v

0.00
ati

-0.30
riv

-1.00
de

-0.50 -1.00
0.00
0.50
1.00
error

Figure 1.9. Value of the integration coefficient as a function of the error:


ki min = 0.1 and ki max = 0.9

You might also like