Upload
ashar-ahmad
View
26
Download
4
Tags:
Embed Size (px)
Citation preview
Fuzzy Control in Engineering Applications
Abstract This article presents the various issues regarding Fuzzy control .We begin by simulation studies in
tuning a Fuzzy controller .We look at the various parameters required to optimize a fuzzy controller.
This is done by comparative studies to the traditional PID type controller. Then we look at an
academic problem of designing a fuzzy controller for the inverted pendulum-cart system .We
formulate a methodology to designing a rule based fuzzy controller and comparing its performance
with a conventional controller. In the final part of this article we look at an engineering problem
related to temperature regulation. We analyse the drawbacks of the conventional controller in the
case of variable time delays and put forward a fuzzy type controller and using simulation tools make a
comparison between the two controller designs.
Section 1:Tuning a Fuzzy controller This study was based on the simulations done by Jelena Godjevac from EPFL Lausanne [1].
The objectives of this simulation is to control the position of a servomotor based on the use of a direct
current motor with separated excitation [2]. The purpose of the regulation is to keep process
variables close to specified values in spite of process disturbances. In the servo problem, the task is to
make the process variables respond to changes in a command signal in a given way, where the
command signal must be known. One way to express how the system should respond to a command
signal is to give a model of the desired response. This can be done in specifying a desired transfer
function from the command signal to the process variables. We will mention here only the time
domain specifications Figure 1
Figure 1
They are:
Rise time Tr
Overshoot M
Settling time Ts (time before the step response is within ±p from its steady state value)
Steady-state error e0
This system can be represented by a diagram in Figure 2, where:
Figure 2
u is an input voltage (control variable)
y observed output
τe - electrical time constant (0.0028 sec)
τm mechanical time constant (0.28sec)
K static gain of the motor (K=0.25)
As τe << τm, the equivalent transfer function will be:
Equation 1
Reference signal is a step function shown in Figure 3
Figure 3
Classical control approach
The control problem presented here is simple problem and can be handled very well by PID control.
PID is very well known and proved as very efficient. The textbook version of the algorithm is:
∫
Equation 2
There are three parameters to adjust Kp, Ki and Kd. One of the most used method for the adjustment of
parameters for PID controller is Ziegler-Nichols method [3]. The response of the system with the
controller in the closed loop is given in the Figure 4
Figure 4
Fuzzy Controller
A basic structure of a system controlled by the fuzzy controller is presented in Figure 2. Input
variables, or process states in the fuzzy controller are:
• Error e(k)
• Change in error e(k) = e(k) - e(k-1)
Since the inputs in this controller are the same as for one PD controller, we can consider that the fuzzy
controller simulated here corresponds to the classical PD controller. The design of fuzzy controller is
related with a choice of following parameters:
1. Knowledge base
• the rule base (choice of input and control variables and control rules)
• the universe of dicourse for every process state (choice of membership functions with their
parameters and shapes)
2. Decision making logic
• definition of fuzzy implication
• interpretation of the terms and and also (choice of the type of fuzzy reasoning)
3. Defuzzification mechanism: In this simulation, we partitioned a space of input and output variables
into 7 fuzzy subsets.
• Negative Big (NB)
• Negative Medium (NM)
• Negative Small (NS)
• Close to Zero (ZR)
• Positive Small (PS)
• Positive Medium (PM)
• Positive Big (PB)
The rule base that we have taken the rule base proposed by Mamdani [4] for the simulation
of PD controller. These rules are shown in the Table 1.
Table 1
Influence of the parameters of the membership functions
The first experiment is a test of the influence of the parameters of membership functions. Once they
are adjusted, we can proceed to test the influences of other factors to the quality of the system
response. Membership functions for inputs ant output are symmetrical, triangular or bell shaped and
uniformly distributed as in the Figure 5. We test the sensibility of the controlled system to three
parameters: limits for the universe of discourse for e, for e and for u and we will denote them with
emax, emax and umax respectively.
Figure 5: a) Triangular and b) Bell shaped Membership functions
Figure 6
Responses of the system with fuzzy controller, emax = 3, emax = 1
A. umax = 18, B. umax = 14, C. umax = 12, D. umax = 5, E. umax = 1
a) triangular membership functions
b) bell-shaped membership functions
Dashed lines represent the step response with the PID controller
Figure 7
Responses of the system with fuzzy controller, umax = 14, emax = 1
A. emax = 0.5, B. emax = 1.1, C. emax = 3, D. emax = 7, E. emax = 10
a) triangular membership functions
b) bell-shaped membership functions
Figure 8
Responses of the system with fuzzy controller, umax = 14, emax = 3
A. emax = 0.1, B. emax = 0.5, C. emax = 1, D. emax = 2, E. emax = 5
a) triangular membership functions
b) bell-shaped membership functions
From the results shown in the Figure 7 and Figure 8, we can conclude that the choice of emax and
emax corresponds to the choice of constants Kp and Kd .The changes of the emax have the same
effect to the quality of the response as the changes of the constant Kd and the changes of the emax have
the same effect to the quality of the response as the changes of the constant Kp which prove that this
controller corresponds to the classical PD controller.
As we can see in the Figures 8 the response is not very sensitive to the changes of emax if emax is
bigger that 0.5. It is due to the fact that the most of the time the changes of the error signal are very
close to zero . The shape of the membership functions is not an important parameter, but we can
observe that the triangular functions give the slightly better result. Specially, the rise time and setting
time are shorter when triangular functions are used. For the limits of u, the best choice is to take the
range of control signal same as for the PID controller, since the response of the fuzzy controlled
system is very sensitive to this parameter.
From this experiment, we noticed that the best results were received with the following parameters for
membership functions
emax = 3
Δemax = 1
u = 14
One other experiment were performed .It was done by varying the distribution and overlap of the
membership functions. The results are shown below:
Figure 9
Figure 10
Figure 11
We can notice that the system is very sensible to the distribution of the membership functions. So the
controller is adjusted again with the new membership functions.
It is interesting to notice that the overlap of the functions is very important. If there is no overlap as in
the Figure 10D, the system cannot reach the set point. It is due to the fact that two rules can’t be
activated in the same time. Moreover, if the distribution is quite uniform and the membership
functions NS and PS don’t touch as in the Figure 10C, it is impossible to reach the set point. The
reason is that for the very small values of the error and the change of the error, only one rule is
activated and the control signal has always the same value.
Section 2: Fuzzy controller for inverted cart-pendulum problem
This study was based on the simulation experiments done by Akole & Tyagi from IIT Roorkee [5]. In
this work two fuzzy logic controllers have been designed for Cart and Pendulum, separately. Twin
controller is useful in controlling the Cart and Pendulum independently. The simulation results of
fuzzy logic controller are compared with conventional PID type controller.
Figure 12: Inverted Pendulum Cart System
Figure 13: Block Diagram for fuzzy controller
In Fig.13 inverted pendulum-cart system is controlled by two separate controllers, pendulum angle
controller and cart position controller. From the dynamic equations of this system, it is found that
there are two dynamic objects in the inverted pendulum-cart system. One is the pendulum and the
other is the cart. If we consider the control of the pendulum and cart separately, it would be easier for
the design of a controller with the rule base mechanism.
However, there is only one control action which is allowed for the inverted pendulum–cart system.
Therefore, the control action Fp for the pendulum subsystem and the control action Fc for the cart
subsystem need to be combined into one control action F for the inverted pendulum-cart system. It
can be seen that to provide a control action to push the cart toward left-hand side will move the
pendulum to the right-hand side. This instinctive knowledge indicates that the control actions to move
the cart and pendulum to the same direction have opposite sign . Since the main purpose for the
position control of the inverted pendulum-cart system is to balance the pendulum at the straight
upward direction, the combination of Fp and Fc is defined as F=Fp - Fc.
Figure 14: Membership Functions for Pendulum Controller
Table 2:Fuzzy rule base for Pendulum controller
Simulations were carried out by giving an external signal of 1*10-6
. Following results were obtained:
Simulation Results
Figure 15: PID response to 0.000001
Figure 16: Fuzzy response to 0.000001
Figure 17: PID control for 0.000001
Figure 18:Fuzzy control for 0.000001
Figure 19: PID response for 0.001 disturbance
Figure 20: Fuzzy response for 0.001 disturbance
Oscillations in the pendulum angle at upright position are shown in Fig.15 and 16.
Comparing these figures it is clear that the oscillations are much smaller in case of the fuzzy
controller. Figure 17 and 18 show the cart position with PID and FLC. Comparing Fig. 17 and 18 it is
clear that cart moves more smoothly towards its reference position with fuzzy logic controller. Figure
19 and 20 show pendulum angle oscillation, when pendulum-cart system is disturbed by a larger
amplitude signal (0.001 unit). Comparing in the case of pendulum angle it is clear that FLC response
is better than the PID.
Section3: Fuzzy Logic Control System for Industrial Temperature
Regulation
The studies are adapted from the simulations done by Trautzsch & Dawson [6].Currently, the classical
PID control is widely used with its gains manually tuned based on the thermal mass and the
temperature set point. Equipment with large thermal capacities requires different PID gains than
equipment with small thermal capacities. In addition, equipment operation over wide ranges of
temperatures (140º to 500º), for example, requires different gains at the lower and higher end of the
temperature range to avoid overshoots and oscillation. This is necessary since even brief temperature
overshoots, for example, can initiate nuisance alarms and costly shut downs to the process being
controlled. Generally, tuning the Proportional, Integral, and Derivative constants for a large
temperature control process is costly and time consuming. The difficulty in dealing with such
problems is compounded with variable time delays.
A number of time delay compensation and prediction schemes have been developed.The performance
of Smith Predictor Control (SPC) was studied experimentally in [7]. It shows that the system performs
well if the process model is accurate, but that performance degrades rapidly with inaccuracy in the
process parameters and time delay. Clearly for an unknown or variable time delay, Smith predictive
compensation is no longer a viable technique. Hence there is a need for Intelligent controllers like the
fuzzy controller.
The FLC developed here is a two-input single-output controller. The two inputs are the deviation from
setpoint error, e(k), and error rate, Δe(k). The FLC is implemented in a discrete-time form as shown
in Figure 21.
Figure 21: FLC
Figure 22: Membership Functions
The FLC’s rules are developed based on the understanding of how a conventional controller works for a system
with a fixed time delay. The rules are separated into two layers: the first layer of FLC rules mimics what a
simple PID controller would do when the time delay is fixed and known; the second
rule layer deals with the problem when the time delay is unknown and varying.
In developing the first layer rules, consider the first order plant, G(s)e-τs
, where G(s)=a/(s+a). In the PID design,
the following assumptions are made:
The time delay τis known
The rise time, tτ, or equivalently, the location of the pole is known.
tτis significantly smaller than τ
The sampling interval is Ts
The conventional PI-type controller in incremental form is given by:
u(k)= u(k - 1)+Δu(k )
where Δu(k) =f(e,Δe) is computed by a discrete-time PI algorithm. This control algorithm was applied to a first
order plant with delay. Initial tuning of PI parameters was carried out by using the Ziegler-Nichols method. The
step response obtained has about a 20% overshoot for a fixed time delay.
Next a fuzzy logic control law was set up where
Δu(k) =F(e,Δe), the output of the FLC for the kth sampling interval, replaces f(e,Δe) in the incremental
controller. The rules and membership functions of the FLC were developed using an intuitive understanding of
what a PI controller does for a fixed delay on a first order system.
They generalized what a PI controller does for each combination of e and Δe in 12 rules as shown in Table 3.
Table 3
After tuning the membership functions given constant time delays we begin the task of self tuning. It
is achieved as follows : It was observed that the maximum gain or control action is inversely
proportional to the time delay. Therefore, if the delay increases, we should decrease the FLC gain to
reduce the control action, and vice versa. Based on this relationship, the system performance can be
monitored by a second layer of rules that adapts the output membership functions of the first layer of
rules to improve the performance of the fuzzy controller. These rules adjust the FLC output based on
rise time and overshoot. The overshoot is monitored and classified as large(L), medium (M), and
small (S). It is observed that changes in overshoot is indicative of a change in time delay. A longer
delay results in a larger overshoot. Such effects can be alleviated by reducing the output scaling factor
appropriately. Rise time performance is classified as Very Slow (VS), Medium Slow (MS), and
Slightly Slow (SS), and an increase in the output scaling factor can help to speed up the response.
They monitor the plant response and reduce or increase the FLC controller output universe of
discourse. Table 4: Fuzzy rules for Self -tuning
Simulation results
Figure 23
Figure 24
Figure 25
For comparison purposes, simulation plots include a conventional PID controller, a Smith Predictor
Control (SPC), and the fuzzy algorithm. The PID, SPC, and FLC were tuned on the plant with a 10
secondtime delay with the response shown Figure 23. As expected, the SPC has the fastest response in
the presence of an accurate plant model and a known time delay, but the PID and FLC provide good
performance in terms of rise time and overshoot in the absence of a prediction mechanism. Figures 24
& 25 show how the controllers react as the true system time delay increases from the nominal 10
second delay used to tune the controllers. The FLC algorithm adapts quickly to longer time delays and
provides a stable response while the PID controller drives the system unstable and the SPC oscillates
around a final value. Hence, FLC shows a significant improvement in maintaining performance
and preserving stability over standard SPC and PID methods.
Conclusion
The paper examined simulation studies from three research papers. These were put in a logical order
,the first being the preparation of FLC , second being its implementation in a known academic
problem while the third being the actual implementation in an industrial setting with uncertainties
about the model (time delays). The second and the third papers provide comparative studies between
the conventional and Fuzzy methodologies, ultimately proving the superiority of the Fuzzy Logic
controller. Further work is to personally implement the controller simulation by codifying it and cross
checking the results of the research.
Bibliography [1]J. Godjevac, Comparative study of Fuzzy Control, Neural Network Control and Neuro-Fuzzy
Control
[2] S. Boverie, B. Demaya, A. Titli, Fuzzy Logic Control Compared with Other Automatic
Control Approaches, 30th IEEE-CDC, Conf. on Decision and Control, Brighton, Dec. 1991
[3] K. J. Astrom, B. Wittenmark, Adaptive control, Addison-Wesley Publishing Company,
1989
[4] E. H. Mamdani, S. Assilian, An Axperiment in Linguistic Synthesis With a Fuzzy Logic
Controller, Int. Journal of Man-Machine Studies, Vol. 7, no. 1, 1975, p. 1-13
[5] Mohan Akole and Barjeev Tyagi, "Design of Fuzzy Logic Controller for Nonlinear Model of
Inverted Pendulum - Cart System". XXXII NATIONAL SYSTEMS CONFERENCE, NSC 2008,
December 17-19, 2008.
[6] Trautzsch, T. A., & Dawson, J. G. (2002). A stable self-tuning fuzzy logic control system for
industrial temperature regulation. IEEE Transactions on Industry Applications, 38(2), 414-424.
[7] O.J.M. Smith, "A Controller to Overcome Dead Time" ISA Journal, No. 2,28, February 1959.