A ROBUSTNESS STUDY OF FUZZY CONTROL RULES Jan Jantzen Technical University of Denmark Dept. of Automation, Bldg 326, DK-2800 Lyngby, DENMARK Tel +45 4525 3561, Fax +45 4588 1295, E-mail
[email protected] ABSTRACT : This simulation study investigates how di¤erent types of rule bases a¤ect the control of di¤erent types of plant. In Simulink three nonlinear control surfaces have been tested and compared to a linear surface. It is recommended to be aware of the shape of the control surface, and carefully select a type that matches the type of plant to be controlled. 1. INTRODUCTION
A fuzzy control designer is inevitably faced with two questions: How does one determine the shape of the fuzzy sets, and how many sets are necessary and su¢cient? Commercial design tools often present an odd number of input sets as default, but there are cases where the default choice is unfortunate. Take for example the inverted pendulum problem, where all feedback gains must be nonzero in order to stabilise the system (e.g., Jorgensen, 1974); a rule base with an odd number of input sets most likely has an almost zero gain near the steady state which makes it unnecessarily di¢cult to stabilise the pendulum. The purpose of this study is to investigate how di¤erent types of rule bases a¤ect reference and load step responses. There are at least four di¤erent ways to determine the shape of the fuzzy sets in a controller (Takagi & Sugeno in Lee, 1990): based on expert experience and control engineering knowledge, based on the operators control actions, based on a fuzzy model of the process, and based on learning. On the other hand the manual for a commercial tool (Hill, Horstkotte & Teichrow, 1990) recommends the following: start with triangular sets, the overlap should be at least 50%, and start with three sets for each variable. In a more analytical way Driankov, Hellendoorn & Reinfrank (1993) investigate the rule base with respect to phase plane analysis and the relationships to PID control and sliding mode control. Harris and Moore (1992) uses a phase plane approach to study the response of a rule based system. Phase plane and sliding mode control are keywords, and Pok and Xu (1994) study robustness of a given rule base from these points of view. Grauel and Mackenberg (1997) study the input-output mapping of a Sugeno type controller, and they present rules for how di¤erent operators a¤ect the shape of the control surface. Although the literature contains some recommendations it is di¢cult to
nd recommendations on what shape the input-output mapping should have. 2. METHOD
With discrete input universes it is possible to calculate the consequent of all possible combinations of input values beforehand and arrange them in a table. The control surface is a plot of the table values against the two inputs, with the lookup values along a vertical axis (see for example Fig. 2.1). It is the control surface together with the gains that govern the dynamics of the closed loop system, and it is the shape of the control surface that is the focus of this study. The typical single-loop control problem is to regulate a control signal based on an error signal. The controller may need both the error, the change in error, and the accumulated error as inputs. We will disregard the last input and concentrate on two-input controllers. It is common practice to build a rule base from terms such as Pos, Zero, and Neg, representing labels of fuzzy sets. An input family may consist of those three terms. Consequently, with two inputs it is possible to build 3 £ 3 = 9 rules. Nine rules is a manageable amount often used in practice. The shape of the sets and the choice of rules a¤ect the control strategy and the dynamics of the closed loop system. There are essentially four characteristic shapes that the control surface can have. ² A linear surface (Fig. 2.1, left) results from the rules, 1. If error is Neg and change in error is Neg then output is ¡ 200
200
Table value
Table value
200
0
-200 100
0
-200 100
100 0 -100
Change in error
-100
0 -100
Change in error
Error
1
1
0.8
0.8
0.6
0.6
Membership
Membership
100 0
0
0.4 0.2
-100
Error
0
50
0.4 0.2
0 -100
-50
0
50
0 -100
100
Input family
-50
100
Input family
Figure 2.1: Linear surface (top left) and steep surface (top right) with the input families that generated them (bottom left and right respectively).
2. If 3. If 4. If 5. If 6. If 7. If 8. If 9. If
error error error error error error error error
change in error is Zero then output is ¡ 100 Neg and change in error is Pos then output is 0 Zero and change in error is Neg then output is ¡ 100 Zero and change in error is Zero then output is 0 Zero and change in error is Pos then output is 100 Pos and change in error is Neg then output is 0 Pos and change in error is Zero then output is 100 Pos and change in error is Pos then output is 200
is Neg and is is is is is is is
(2.1)
The surface in the
gure is actually equivalent to a summation of the two inputs (cp. the values on the axes). To obtain linearity several conditions must be ful
lled (Mizumoto, 1992): The input sets have to be linear as in the
gure, the
and
connective must be a multiplication, the
output singletons
must be
the sum of the peak positions of the input sets, and the aggregated output must be the weighted sum of the contributions from each rule (centre
of gravity
defuzzi
cation). Since the surface is equivalent to a
summation, the controller is equivalent to a PD controller.
²
The
steep
surface (Fig. 2.1, right) is built using only rules 1, 3, 7, and 9 together with the input sets
shown in the
gure; they are segments of cosine functions. Notice that the centre rule (no. 5) with zero
error
and zero
change in error
is absent. That surface has a steeper slope, or higher gain, near the centre
of the table compared to the linear surface, but they have the same values pairwise in the four corners.
²
gentle surface (Fig. 2.2, left) is built using the same four rules 1, 3, 7, and 9 but the input sets have 1 been reected. They are based on inverse trigonometric functions, i.e., P os(x) = 0:5 + sin (x=100) =¼; 1 and N eg ( x) = cos (x=100)=¼ . That surface has a more gentle slope, or lower gain, near the centre of The
¡
¡
the table compared to the linear surface; but it too has the same values pairwise in the four corners.
²
The
bumpy
surface (Fig. 2.2, right) is a blend of the previous two surfaces. It is built using the set of
nine rules (2.1) with nonlinear input sets as shown in the
gure. This is often the default. It has a at plateau near the centre and bumps in several other places. Even this surface has the same values as the other surfaces in the four corners.
It is di¢cult to make a stringent, fair and objective comparison of their control characteristics. The approach here is to use the linear surface as a reference, and then see how the response reacts to the nonlinear surfaces.
2
200
Table value
Table value
200
0
-200 100
0
-200 100
100 0 -100
Change in error
-100
0 -100
Change in error
Error
1
1
0.8
0.8
0.6
0.6
Membership
Membership
100 0
0
0.4 0.2
-100
Error
0
50
0.4 0.2
0 -100
-50
0
50
0 -100
100
-50
Input family
100
Input family
Figure 2.2: Gently sloping surface (top left) and bumpy surface (top right) with the input families that generated them (bottom left and right respectively). To make the study more interesting three test cases have been chosen that are known to be di¢cult to control with PID control (Astrom & Hagglund, 1995). For lack of an analytical approach, a practical approach has thus been chosen. ² The
rst case is a high order process with the transfer function ( ) = 1 ( + 1)3 . When the system is of a higher order than two, the control can be improved by a more complex controller than PID. ² The second case is a system with oscillatory modes. Adding an integrator makes it more oscillatory, ( ) = 1 ( + 1)3 With PID control it is di¢cult to dampen more than one oscillatory mode. ² The third case is a system with a long dead time. The transfer function has a signi
cant dead time of 5 seconds, ( ) = ¡5s ( + 1)3 Systems with a long dead time are notoriously di¢cult to control. The simulation environment is Matlab (v. 4.2.c.1) for Windows together with Simulink (v. 1.3c). The Fuzzy Logic Toolbox for use with Matlab is used to build the rule bases. The strategy is to tune a closed loop with a linear surface and afterwards insert nonlinear surfaces without changing anything (Fig. 2.3). In order to get an indication of the robustness, a time delay in the control signal path is increased from zero until the closed loop system enters a stable oscillation. The extra dead time at this point is called m Also, with the delay reset to zero, a gain in the control signal path is increased from one until m where the system enters a stable oscillation. Those measures indicate how far the system is from instability, much as the phase margin and gain margin known from linear control theory. Ideally one could test: 2 step responses (reference, load), 4 performance indicators (overshoot, decay ratio, m , m ), 3 plants, and 4 surfaces independently, which implies 2 ¤ 4 ¤ 3 ¤ 4 = 96 tests. In order to reduce that number, overshoot, decay, and the two step responses are collected in one plot at a time. So there are three test sequences, one for each plant, with four surfaces to test. At time = 0 the reference changes abruptly from 0 to 1 and after a number of seconds, a load of 1 unit is forced on the system. The system is hand-tuned to respond reasonably with a linear controller. The settings are such that saturation in the universes is avoided, even when the nonlinear surfaces are inserted (TABLE 2.1). The controller is of the incremental type (Fig. 2.4). Each rule base is converted into a 21 £ 21 lookup table with interpolation. The controller is incremental because the control action is the change in output rather than just a direct control signal, and it is integrated to produce the control signal The reason for the integrator is to remove any steady state error; when there is a load on the system it is necessary to maintain a sustained control signal, which can only come from the integrator, in order to balance the load. G s
G s
D
G
D
:
=s s
G s
= s
e
= s
:
:
;
G
t
U:
3
Load
Reference
FInc
Gm
Dm
Controller
1 (s+1)(s+1)(s+1)
+ Sum
1
Scope
Plant
y ToWs
Figure 2.3: Simulink model for testing step responses.
e
E GE CU
cu f ce
1/s
GCU
CE
U
GCE
Rule base
Figure 2.4: Fuzzy incremental controller.
3. RESULTS AND DISCUSSION
The step responses are collected and plotted in three
gures. There are four runs on each plot, one for each control surface. For the higher order system the simulation results are in Fig. 3.1. The overshoot in the reference step response is in the range
5 ¡ 20% for all surfaces. Notice that a small overshoot does not automatically imply a
small load dip; di¤erent tuning settings are required for optimal reference step response and load step response.
One response is more oscillatory than the linear, while the two remaining are more sluggish. The gentle surface has the best overall performance, except it does not catch the load dip quite as well as the linear and the steep surfaces do. The robustness measures (TABLE 3.1) indicate that the gentle surface is more robust than the rest; this is as expected, because it has a lower gain than all other tables. For the oscillatory system the simulation results are in Fig. 3.2. The steep surface is perhaps slightly better than the linear surface in the reference step response, and it catches the load step better, but the rest of the response is more oscillatory. The other two surfaces perform worse, and it seems that the linear surface is favourable. The robustness measures again show that the gentle surface is more robust than the rest, which is somewhat surprising, because it has the largest overshoot in the load step response. For the system with the long time delay the simulation results are in Fig. 3.3. This time the gentle surface performs best with no overshoot at all (the control looks slightly overdamped actually). Notice that the bumpy surface performs all right, contrary to the two previous cases. Again the gentle surface is the more robust according to the table, while the steep surface is clearly less robust than any of the others. The scope of these results is more or less limited to the three test cases and the chosen controller con
guration. But the results indicate in general, that relative to the linear surface, the steep surface provides a tighter control, the gentle surface provides a more robust control, and the bumpy surface can result in a rather unsteady system. Noise problems are omitted in this study; a noise study may well show that the bumpy surface suppresses noise in the steady state thereby stabilising a system with dead time.
Gain 1 ( + 1)3 1 ( + 1)3 = s
GE
GCE GCU
100 150 0 006 :
=s s
15 120 0 00125 :
¡5s =(s + 1)3
e
100 400 0 0010 :
Table 2.1: Gain settings in all tests
4
1.4 Bumpy Gentle
1.2
Steep
1
Linear
Process response
0.8
0.6
0.4
0.2
0 0
10
20
30
40
Time [s]
Figure 3.1: Reference and load step responses of 1=(s + 1)3 .
6
4
Bumpy
Steep
Process response
2
0
Linear
Gentle
-2
-4
-6 0
50
100
150
200
Time [s]
Figure 3.2: Reference and load step response of 1=s(s + 1)3 .
1.4 Bumpy
1.2 Linear
Steep
1
Gentle
Process response
0.8
0.6
0.4
0.2
0 0
50
100
150
200
Time [s]
Figure 3.3: Reference and load step responses of
5
¡5s =(s + 1)3 .
e
Surface Linear
¡5s =(s + 1)3
1=(s + 1)3
1=s(s + 1)3
e
D
D
D
m
m
G
1:2
m
m
G
m
m
G
3:0
1:8
2:8
10
2:0 1:1
Steep
0:4
1:7
0:8
1:5
2:2
Gentle
1:8
4:6
2:1
4:3
14
2:6
Bumpy
1:1
4:0
1:6
3:7
9
1:8
Table 3.1: Robustness assessment of surfaces
4. CONCLUSIONS
The study is an assessment of four types of control surfaces. Although the surfaces share the same corner points, the di¤erence in shape is enough to alter the step responses considerably. The study shows that it may pay to be conscious of what type of surface comes out of a given choice of rules and membership functions. Consequently one should select a type of surface that
ts the problem at hand. It is recommended to start a design procedure with the linear surface and tune the gains. Then, at least for systems covered by the study, a more gently sloping surface will make the design more robust. One could try a tighter control with the steep surface, but it will probably make the system more oscillatory, all other things equal. A bumpy surface, the default in many tools, may create oscillations or even limit cycling. References
Åström, K. J. and Hägglund, T. (1995).
PID controllers - theory, design, and tuning, second edn, Instrument
Society of America, 67 Alexander Drive, PO Box 12277, Research Triangle Park, North Carolina 27709, USA. Driankov, D., Hellendoorn, H. and Reinfrank, M. (1996). Verlag, Berlin.
An introduction to fuzzy control, second edn, Springer-
Grauel, A. and Mackenberg, H. (1997). Mathematical analysis of the sugeno controller leading to general design rules,
Fuzzy Sets and Systems 85: 165175.
Harris, C. and Moore, C. (1992). Phase plane analysis tools for a class of fuzzy control systems, pp. 511518. Hill, G., Horstkotte, E. and Teichrow, J. (1990).
in IEEE (1992),
Fuzzy-C development system user´s manual, Togai Infralogic,
30 Corporate Park, Irvine, CA 92714, USA. IEEE (ed.) (1992).
First Int. Conf. On Fuzzy Systems, number 92CH3073-4, The Institute of Electrical and
Electronics Engineers, Inc, San Diego.
Jorgensen, V. (1974). A ball-balancing system for demonstration of basic concepts in the state-space control theory,
Int.J.Elect.Enging Educ. 11: 367376.
Lee, C. C. (1990).
Fuzzy logic in control systems: Fuzzy logic controller,
Cybernetics 20(2): 404435.
IEEE Trans. Systems, Man &
in IEEE (1992), pp. 709715. Why is fuzzy control robust?, in IEEE (ed.), Third Int. Conf. On Fuzzy
Mizumoto, M. (1992). Realization of pid controls by fuzzy control methods, Pok, Y.-M. and Xu, J.-X. (1994).
Systems, Vol. 2, The Institute of Electrical and Electronics Engineers, Inc, Orlando, pp. 10181022.
6