IRJET- Design and Analysis of Fuzzy and GA-PID Controllers for Optimized Perf...
Β
Project_Report_Debargha
1. Design of adaptive PID controller with fuzzy
rule base for different type and different order
process by using MATLAB Simulink
Project Report submitted in partial fulfilment of
the
requirement for the degree of
Bachelor of Technology
In
Instrumentation and Control Engineering
By
Debargha Chakraborty
Under the supervision of
Mrs. Pubali Mitra Paul
Calcutta Institute of Engineering and Management
24/1A Chandi Ghosh Road Kolkata-40
Under
Maulana Abul Kalam Azad University of Technology
2015
2. ~ ii ~
DECLARATION
I, Debargha Chakraborty declare that this report entitlted βDesign of
adaptive PID controller with fuzzy rule base for different type and
different order process by using MATLAB Simulinkβ which is submitted by
me comprises only of my original work and due acknowledgement has been
made in the text to all other material used. I took reasonable care to ensure
that the work is original and to best of my knowledge does not breach any
copyright law, and has not been taken from other sources except where such
work has been citied and acknowledged within the text.
Date: 02/12/2015 Debargha Chakraborty
3. ~ iii ~
CERTIFICATE OF APPROVAL
The project report entitled βDesign of adaptive PID controller with fuzzy
rule base for different type and different order process by using MATLAB
Simulinkβ submitted by Debargha Chakraborty is hereby approved and
certified as a creditable study for Bachelor of Technology in Instrumentation
and Control Engineering.
It is understood that by the approval the undersigned doesnβt necessarily
endorse or approve any statement made, opinion expressed or conclusion
drawn therein, but approve the report only for the purpose for which it has
been submitted.
Date: 02/12/2015 Pubali Mitra Paul
4. ~ iv ~
ACKNOWLEDGEMENT
I have taken efforts in this project. However, it would not have been possible
without the kind support and help of many individuals and organizations. I
would like to extend my sincere thanks to all of them.
I am highly indebted to Mrs. Pubali Mitra Paul for his guidance and constant
supervision as well as for providing necessary information regarding the
project and also support in completing the project.
My thanks and appreciations also go to my friends and classmates in
developing the project and people who have willingly helped me out with
their abilities.
5. ~ v ~
CONTENTS
Abstractβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦...β¦01
1. Introductionβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦.02
2. Literature Reviewβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦...05
3.1 Closed loop control systemβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦...08
3.2 PID Controllerβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦.09
3.3 Fuzzy Basicsβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦10
3.3.1 Fuzzy Sets, Membership Functions and Logical Operatorsβ¦.10
3.3.2 Linguistic Variables and Rule Basesβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦12
3.3.3 Fuzzy Modellingβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦13
3.3.4 Mamdani Modellingβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦..14
3.3.5 Overlap and Sensitivityβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦...16
3.4 Proposed Methodβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦17
3.4.1 Scaling Factorsβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦...β¦....18
3.4.2 The Self-Tuning Mechanismβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦.β¦β¦...20
4. Results and Discussionβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦.β¦β¦β¦β¦β¦β¦β¦β¦.23
5. Conclusionβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦..30
6. Scope of the workβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦....31
Bibliographyβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦....33
Appendicesβ¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦β¦..35
6. ~ vi ~
LIST OF TABLES AND FIGURES
List of Tables
Sl. No. Table Page No.
1. Rule Base for the Membership Functions 19
2. The Ultimate Cycle Methods Tuning Chart 23
3. Time domain specification of system 1 26
4. Performance indices of system 1 26
5. Time domain specification of system 2 26
6. Performance indices of system 1 29
List of Figures
Sl. No. Figure Page No.
1. Basic Closed Loop System 08
2. Boolean Operations on Fuzzy Logic 12
3. Block Diagram of the System 17
4. Fuzzy Membership functions for e and Ξe 18
5. Fuzzy Membership Function for Ξ± 18
6. Variation of Ξ± with e and Ξe 21
7. Comparison of Zeigler-Nichols and proposed
Method for System 1
24
8. Comparison of Tyreus-Luyben and proposed
Method for System 1
24
9. Comparison of Astrom-Hagglund and proposed
Method for System 1
25
10. Comparison of Modified Zeigler-Nichols and
proposed Method for System 1
25
11. Comparison of Zeigler-Nichols and proposed
Method for System 2
27
12. Comparison of Tyreus-Luyben and proposed
Method for System 2
27
13. Comparison of Astrom-Hagglund and proposed
Method for System 2
28
14. Comparison of Modified Zeigler-Nichols and
proposed Method for System 2
28
7. 1
ABSTRACT
A simple auto-tuning scheme of PID controllers is proposed here. The most
primitive type of control was done manually by operator. This scheme is
similar but made automated by the use of fuzzy logic. In this paper the
scheme described is far from the related paper published which combines the
effectiveness of fuzzy logic and the widespread use PID controllers. This in
effect produces a slight modification from the conventional controllers used.
This adaptive scheme discussed here can be stated as a modified gain
scheduling approach since the gain of the closed loop is modified by changing
the gain of the PID controller. The fuzzy logic also takes a scaling factor for
both the error and change of error which is taken as input to the fuzzy logic
controller and the output of the fuzzy logic controller along with a positive
constant drift is used as to vary the gain of proportional and integral
parameter of the PID controller. Though the output alpha is non-linear of
error and change of error it is independently linear i.e. it obeys superposition
and homogeneity theorem. But the modifying factor is not linear. This
provides an optimized solution to combine the traditional PID control with
the soft computing fuzzy approach.
8. 2
1. Introduction
To overcome the limitations of the open-loop controller, control theory
introduces feedback. A closed-loop controller uses feedback to
control states or outputs of a dynamical system. Its name comes from the
information path in the system: process inputs (e.g., voltage applied to
an electric motor) have an effect on the process outputs (e.g., speed or torque
of the motor), which is measured with sensors and processed by the
controller; the result (the control signal) is "fed back" as input to the process,
closing the loop. Closed-loop controllers have the following advantages
over open-loop controllers:
ο disturbance rejection (such as hills in the cruise control example above)
ο guaranteed performance even with model uncertainties, when the
model structure does not match perfectly the real process and the
model parameters are not exact
ο unstable processes can be stabilized
ο reduced sensitivity to parameter variations
ο improved reference tracking performance
ο In some systems, closed-loop and open-loop control are used
simultaneously. In such systems, the open-loop control is termed feed
forward and serves to further improve reference tracking performance.
ο Most common closed-loop controller architecture is the PID controller.
The PID controller is probably the most-used feedback control design. PID is
an acronym for Proportional-Integral-Derivative, referring to the three terms
operating on the error signal to produce a control signal. If u(t) is the control
signal sent to the system, y(t) is the measured output and r(t) is the desired
output, and tracking error e(t) = r(t) β y(t), a PID controller has the general
form:
9. 3
π’ π‘ = πΎπ π π‘ + πΎπΌ π π ππ
π‘
0
+ πΎ π·
π
ππ‘
π(π‘)
The desired closed loop dynamics is obtained by adjusting the three
parameters Kp, KI and KD, often iteratively by "tuning" and without specific
knowledge of a plant model. Stability can often be ensured using only the
proportional term. The integral term permits the rejection of a step
disturbance (often a striking specification in process control) and elimination
of offset. The derivative term is used to provide damping or shaping of the
response. PID controllers are the most well established class of control
systems: however, they cannot be used in several more complicated cases,
especially if MIMO systems are considered.
Fuzzy logic is a form of many-valued logic in which the truth values of
variables may be any real number between 0 and 1. By contrast, in Boolean
logic, the truth values of variables may only be 0 or 1. Fuzzy logic has been
extended to handle the concept of partial truth, where the truth value may
range between completely true and completely false. Furthermore,
when linguistic variables are used, these degrees may be managed by specific
functions. The term fuzzy logic was introduced with the 1965 proposal of fuzzy
set theory by Lotfi A. Zadeh. Fuzzy logic has been applied to many fields,
from control theory to artificial intelligence. Fuzzy logic had however been
studied since the 1920s, as infinite-valued logicβnotably
by Lukasiewicz and Tarski.
Fuzzy logic has been available as a control methodology for over three
decades and its application to engineering control systems is well proven. In a
sense fuzzy logic is a logical system that is an extension of multi-valued logic
although in character it is quite different. It has become popular due to the
fact that human reasoning and thought formation is linked very strongly with
10. 4
the ways fuzzy logic is implemented. Far β ranging applications exist
including space-rocket control, advanced in-car control systems, and not to
mention the myriad of potential industrial applications. In more recent years
the use of fuzzy logic in combination with neuro-computing and genetic
algorithms has become popular in control system design. The purpose of this
amalgamation of methods is to produce systems whoseMIQ (Machine IQ) is
considerably higher than those developed using conventional methods.
11. 5
2. Literature Review
Kiran K. Raut and Dr. S. R. Vaishnav analyses and compares performance of
six PID tuning techniques based on time response specifications [4]. Along
with that the paper takes a qualitative look at six PID tuning methods, with
comparison of accuracy and effectiveness with a Second order system is
selected for study [1].
The ability of proportional integral (PI) and proportional integral derivative
(PID) controllers to compensate many practical industrial processes has led to
their wide acceptance in industrial applications. The requirement to choose
either two or three controller parameters is perhaps most easily done using
tuning rules. A summary of tuning rules for the PI and PID control of single
input, single output (SISO) processes with time delay are provided in the
report by A. OβDwyer. *2+
A simple method has been developed for PID controller tuning of an
unidentified process using closed-loop experiments. The proposed method
requires one closed-loop step set-point response experiment using a
proportional only controller, and it mainly uses information about the first
peak [3]. The tuning method proposed by Mohammad Shamsuzzoha, Sigurd
Skogestad was originally derived for first-order with delay processes. But it
has been tested on a wide range of other processes typical for process control
applications and the results are comparable with the SIMC tunings using the
open-loop model.
This paper explores the potential of using soft computing methodology in
controllers and their advantages over conventional methods. [5] The main
focus of this paper is to apply soft computing technique that is fuzzy logic to
design and tuning of PID controller to get better dynamic and static
12. 6
performance at the output. This paper also discusses the benefits the soft
computing methods.
In this paper by Zulfatman and M.F. Rahman, self-tuning fuzzy PID
controller is developed to improve the performance of the electro-hydraulic
actuator. The controller is designed based on the mathematical model of the
system which is estimated by using system identification technique. [6]
This paper introduces a MIMO-FLC applied on speeds of electric vehicle, the
electric drive consists of two directing wheels and two rear propulsion wheels
equipped with two light weight induction motors. [7]
Rajani K. Mudi and Nikhil R. Pal propose a simple but robust model
independent self-tuning scheme for fuzzy logic controllers. The output scaling
factor is adjusted on-line by fuzzy rules according to the current trend of the
controlled process. The rule base for tuning the output scaling factor is
defined on error (e) and change of error (Ξe) of the controlled variable using
the most natural and unbiased membership functions. The proposed self
tuning technique is applied to both PI- and PD-type FLCβs to conduct
simulation analysis for a wide range of different linear and nonlinear second-
order processes including a marginally stable system Performances of the
proposed self-tuning FLCβs are compared with those of their corresponding
conventional FLCβs in terms of several performance measures, in addition to
the responses due to step set-point change and load disturbance and, in each
case, the proposed scheme shows a remarkably improved performance over
its conventional counterpart. [8]
The project will focus on design and development of water controller for
small scale hydro generating units based on fuzzy logic approach. Fuzzy logic
is a problem solving methodology that lends itself to implementation system
ranging from simple, small, embedded micro controller to large, networked
13. 7
and controllable system. In this project, method of fuzzy logic will be applied
to water level controller for small scale hydro generating units. [9]
This report investigates a promising method of control engineering, fuzzy
logic modelling. [10] It sets out to evaluate the usefulness of genetic
algorithms in aiding the control process. The strengths of genetic algorithms
and fuzzy logic are explained with the express purpose of proposing how,
when combined, a useful and workable method of control may result. The
testing of each controller in the process of the design has been carefully
documented throughout the report.
14. 8
3.1 Closed-loop transfer function
The output of the system y(t) is fed back through a sensor measurement F to
the reference value r(t). The controller C then takes the error e (difference)
between the reference and the output to change the inputs u to the system
under control P. This is shown in the figure. This kind of controller is a
closed-loop controller or feedback controller.
This is called a single-input-single-output (SISO) control system; MIMO (i.e.,
Multi-Input-Multi-Output) systems, with more than one input/output, are
common. In such cases variables are represented through vectors instead of
simple scalar values. For some distributed parameter systems the vectors may
be infinite-dimensional (typically functions).
Figure 1: Basic Closed Loop System
If we assume the controller C, the plant P, and the
sensor F are linear and time-invariant (i.e., elements of their transfer
function C(s), P(s), and F(s) do not depend on time), the systems above can be
analysed using the Laplace transform on the variables. This gives the
following relations:
π π = π π π π
π π = πΆ π πΈ(π )
πΈ π = π π β πΉ π π(π )
Solving for Y(s) in terms of R(s) gives:
15. 9
π π =
π π πΆ π
1 + πΉ π π π πΆ π
π π = π» π π (π )
The expression
π» π =
π π πΆ(π )
1 + πΉ π π π πΆ(π )
is referred to as the closed-loop transfer function of the system. The numerator
is the forward (open-loop) gain from r to y, and the denominator is one plus
the gain in going around the feedback loop, the so-called loop gain.
If π π πΆ(π ) β« 1 i.e., it has a large norm with each value of s, and if πΉ(π ) β 1
then Y(s) is approximately equal to R(s) and the output closely tracks the
reference input.
3.2 PID Controller
The PID controller is probably the most-used feedback control design. PID is
an acronym for Proportional-Integral-Derivative, referring to the three terms
operating on the error signal to produce a control signal. If π’(π‘) is the control
signal sent to the system, π¦(π‘) is the measured output and π(π‘) is the desired
output, and tracking error π π‘ = π π‘ β π¦(π‘), a PID controller has the general
form
π’ π‘ = πΎπ π π‘ + πΎπΌ π π ππ
π‘
0
+ πΎ π·
π
ππ‘
π(π‘)
The desired closed loop dynamics is obtained by adjusting the three
parameters Kp, KI and KD, often iteratively by "tuning" and without specific
knowledge of a plant model. Stability can often be ensured using only the
proportional term. The integral term permits the rejection of a step
disturbance (often a striking specification in process control). The derivative
term is used to provide damping or shaping of the response. PID controllers
are the most well established class of control systems: however, they cannot
16. 10
be used in several more complicated cases, especially if MIMO systems are
considered.
Applying Laplace transformation results in the transformed PID controller
equation
π’ π = πΎπ π π + πΎπΌ
1
π
π π + πΎ π· π π(π )
π’ π = πΎπ + πΎπΌ
1
π
+ πΎ π· π π(π )
with the PID controller transfer function
πΆ π =
π πΎπ + πΎπΌ + π 2
πΎ π·
π
In few cases the transfer function is written as:
πΆ π = πΎπ π(π ) 1 +
1
ππΌ π
+ π π· π
ππΌ = π ππ ππ‘ ππππ; π π· = π·ππππ£ππ‘ππ£π ππππ
3.3 Fuzzy Basics
The primary objective of fuzzy logic is to map an input space to an output
space. The way of controlling this mapping is to use if-then statements known
as rules. The order these rules are carried out in is insignificant since all rules
run concurrently. The following sections will present and develop ideas such
as sets, membership functions, logical operators, linguistic variables and rule
bases.
3.3.1 Fuzzy Sets, Membership Functions and Logical Operators
Fuzzy sets are sets without clear or crisp boundaries. The elements they
contain may only have a partial degree of membership. They are therefore not
the same as classical sets in the sense that the sets are not closed. Some
examples of vague fuzzy sets and their respective units include the following.
ο Loud noises (sound intensity)
17. 11
ο High speeds (velocity)
ο Desirable actions (decision of control space)
Fuzzy sets can be combined through fuzzy rules to represent specific
actions/behaviour and it is this property of fuzzy logic that will be utilised
when implementing a fuzzy logic controller.
A membership function is a curve that defines how each point in the input
space is mapped to the set of all real numbers from 0 to 1. This is really the
only stringent condition brought to bear on a membership function.
A classical set may be for example written as:
π΄ = π₯ π₯ > 3}
Now if X is the universe of discourse with elements x then a fuzzy set A in X is
defined as a set of ordered pairs:
π΄ = π₯, π π΄ π₯ π₯ π π}
Note that in the above expression Β΅A the membership function of x in A and
that each element of X is mapped to a membership value between 0 and 1.
Typical membership function shapes include triangular, trapezoidal and
gaussian functions. The shape is chosen on the basis of how well it describes
the set it represents.
Fuzzy logic reasoning is a superset of standard Boolean logic yet it still needs
to use logical operators such as AND, OR and NOT. Firstly note that fuzzy
logic differs from Boolean yes/no logic, although TRUE is given a numerical
value β1β and FALSE a numerical value β0β, other intermediate values are also
allowed. For example the values 0.2 and 0.8 can represent both not-quite-false
and not-quite-true respectively. It will be necessary to do logical operations
on these values that lie in the [0,1] set, but two-valued logic operations
18. 12
like AND, OR and NOT are incapable of doing this. For this functionality, the
functions min, max and additive complement will have to be used.
π΄ πππ π΅ = minβ‘(π΄, π΅)
π΄ ππ π΅ = maxβ‘(π΄, π΅)
π΄ = 1 β π΄
Figure 2: Boolean Operations on Fuzzy Logic
3.3.2 Linguistic Variables and Rule Bases
Linguistic variables are values defined by fuzzy sets. A linguistic variable
such as βHigh Speedsβ for example could consist of numbers that are equal to
or between 50km/hr and 80km/hr. The conditional statements that make up
the rules that govern fuzzy logic behaviour use these linguistic variables and
have an if-then syntax. These if-then rules are what make up fuzzy rule bases.
A sample if-then rule where A and B represent linguistic variables could be:
19. 13
if x is A then y is B
The statement is understood to have both a premise, if βx is Aβ, and a
conclusion, then βy is Bβ. The premise also known as the antecedent returns a
single number between 0 and 1 whereas the conclusion also known as the
consequent assigns the fuzzy set B to the output variable y. Another way of
writing this rule using the symbols of assignment β=β and equivalence β==β is:
if x == A then y = B
Interpreting these rules involves a number of distinct steps.
1. Firstly, the inputs must be fuzzified. To do this all fuzzy statements in the
premise are resolved to a degree of membership between 0 and 1. This can be
thought of as the degree of support for the rule. At a working level this means
that if the antecedent is true to some degree of membership, then the
consequent is also true to that same degree.
2. Secondly, fuzzy operators are applied for antecedents with multiple parts
to yield a single number between 0 and 1. Again this is the degree of support
for the rule.
3. Thirdly, the result is applied to the consequent. This step is also known as
implication. The degree of support for the entire rule is used to shape the
output fuzzy set. The outputs of fuzzy sets from each rule are aggregated into
a single output fuzzy set. This final set is evaluated (or defuzzified) to yield a
single number.
3.3.3 Fuzzy Modelling
Fuzzy logic systems are tolerant of imprecise data. When considered this suits
many real-world applications well because as real-world systems become
increasingly complex often the need for highly precise data decreases. The
20. 14
rules that govern the mapping from input space to output space via a black
box modelling can be acquired through two methods. The first is a method
called the direct approach and the second is by using system identification.
The direct approach involves the manual formulation of linguistic rules by a
human expert. These rules are then converted into a formal fuzzy system
model. The problem with this approach is that unless the human expert
knows the system well it is very difficult to design a fuzzy rule base and
inference system that is workable, let alone efficient. For complex systems
(non-linear for example) tuning these membership functions would require
the adjustment of many parameters simultaneously. Understandably no
human expert could accomplish this.
Fuzzy models that are designed using system identification are based on the
use of input output data. System identification was introduced to overcome
the difficulties involved in the direct approach of choosing the fuzzy setβs
membership functions using a search/optimisation technique to aid the
selection.
All of the previous elements of fuzzy logic that have been discussed up to this
point are put together to form a fuzzy inference system (FIS). Two main types
of fuzzy inference system exist β the Mamdani and Sugeno type. Since
Mamdani Inference System is employed in the project, only Mamdani
Modelling is described.
3.3.4 Mamdani Modelling
Owing its name to Ebrahim Mamdani the Mamdani model was the first
efficient fuzzy logic controller designed and was introduced in 1975. The
controller consists of a fuzzifier, fuzzy rule base, an inference engine and a
defuzzifier.
21. 15
Conventional control systems require crisp outputs to result from crisp
inputs. The above representation shows how a crisp input in R can be
operated on by a fuzzy logic system to yield a crisp output in Q. This
Mamdani controller is realised using the following steps.
A. Fuzzification of Inputs
The fuzzifier maps crisp input numbers into fuzzy sets. The value between 0
and 1 each input is given represents the degree of membership that input has
within these output fuzzy sets. Fuzzification can be implemented using
lookup tables or as in this report, using membership functions.
B. Application of Fuzzy Operators
In the case where multiple statements are used in the antecedent of a rule, it is
necessary to apply the correct fuzzy operators. This allows the antecedent to
be resolved to a single number that represents the strength of that rule.
C. Application of Implication Method
This part of the Mamdani system involves defining the consequence as an
output fuzzy set. This can only be achieved after each rule has been evaluated
and is allowed contribute its βweightβ in determining the output fuzzy set.
D. Aggregation of all Outputs
The fuzzy outputs of each rule need to be combined in a meaningful way to
be of any use. Aggregation is the method used to perform this by combining
each output set into a single output fuzzy set. The order of rules in the
aggregation operation is unimportant as all rules are considered. The three
methods of aggregation available for use include sum (sum of each rules
output set), max (maximum value of each rule output set) and the
probabilistic OR method (the algebraic sum of each rules output set).
22. 16
E. Defuzzification of Aggregated Output
The aggregated fuzzy set found in the previous step is the input to the
defuzzifier. The aggregated fuzzy set in Q is mapped to a crisp output point
in Q. This crisp output is a single number that can usefully be applied in
controlling the system. A number of methods of defuzzification are possible
and these include the mean of maximum, largest of maximum, smallest of
maximum and centroid (centre of area) methods.
3.3.5 Overlap and Sensitivity
The overlap is the point of crossover between successive triangles. As the
overlap is varied the fuzzification of the input space is changed. Actually,
zero overlap is not desirable because there are regions where no strong rules
can make a decision. In fact at a point of crossover, there is no rule which is
fired. As a result, it is seen that from the there is a sudden drop in the output
response. There is an improvement in performance when the overlap is
increased to 0.5 because in the mid-range (at the point of crossover), certain
strong rules can fire a valid decision. Finally a further increase in the overlap
to say 0.75 results in the degradation of the performance. This is because now
the triangles almost merge with each other that there is a clash among them
over supremacy in taking decision for a particular situation.
This is one more area where we can modify the shape of a membership
function and observe the effect on the performance of the controller.
Sensitivity is actually making the fuzzy engine more sensitive to smaller
changes in the input variables. This can be incorporated by making the width
of the membership function narrow in the midrange around zero and broader
as we move away from zero. So if the system operating at large values of
error or error change coarse action is taken, but as soon as the values enter
within a band the fine control is activated. As a result of this the rule base
23. 17
which previously acted over the entire range now would act only on a
narrower range and this small range in turn has all the definitions that were
applicable in the large range just multiplied by a proportional constant.
3.4 Proposed Method
The method proposed here is self tuning PI+D controller. The Proportional
and Integral gain are automatically tuned depending on the process
parameters, but the derivative gain is kept fixed. The varying of derivative
gain with process parameter is usually avoided since that may result in
driving the system to instability. The method proposed here is completely
system independent. Self-tuning FLC is an adaptive controller but, there is no
consensus in the literature on the terminology used in describing adaptive
controllers. We call an FLC adaptive if any one of its tunable parameters
(scaling functions, membership functions and rules) changes when the
controller is being used, otherwise it is a non-adaptive or conventional FLC.
An adaptive FLC that ο¬ne tunes an already working controller by modifying
either its membership functions or scaling functions or both of them is called
a self-tuning FLC. On the other hand, when a FLC is tuned by automatically
changing its rules then it is called a self-organizing FLC.
Figure 3: Block Diagram of the System
Input PID Controller Process Output
Delay -
+
Scaling
Block
Scaling
Block
Fuzzy Logic PID
Parameter Estimate
24. 18
3.4.1 Scaling Factors
The membership functions for scaled inputs of the controller have been
defined on the common interval [-1, 1]. The values of the actual inputs and are
mapped onto [-1, 1] by the input scaling function. Selection of suitable values
for and are made based on the knowledge about the process to be controlled
and sometimes through trial and error to achieve the best possible control
performance. This is so because, unlike conventional non-fuzzy controllers to
date, there is no well-defined method for good setting of SFβs for FLCβs.
Figure 4: Fuzzy Membership functions for e and Ξe
NB = Negative Big; NM = Negative Medium; NS = Negative Small; ZE = Zero
PS = Positive Small; PM = Positive Medium; PB = Positive Big
Figure 5: Fuzzy Membership Function for Ξ±
ZE = Zero; VS = Very Small; S = Small; SB = Small Big; MB = Medium Big;
B = Big; VB = Very Big
25. 19
We propose to compute on-line using a model independent fuzzy rule base
defined in terms of e and Ξe. The relationships between the SFβs and the input
and output variables of the self-tuning FLC are as follows:
Ξee NB NM NS ZE PS PM PB
NB VB VB VB B SB S ZE
NM VB VB B B MB S VS
NS VB MB B VB VS S VS
ZE S SB MB ZE MB SB S
PS VS S VS VB B MB VB
PM VS S MB B B VB VB
PB ZE S SB B VB VB VB
Table 1: Rule Base for the Membership Functions
With a view to improving the overall control performance, we use the rule
base in Table 1 for computation of Ξ±. Some of the important considerations
that have been taken into account for determining the rules are as follows:
1) To make the controller produce a lower overshoot and reduce the settling
time (but not at the cost of increased rise time) the controller gain is set at a
small value when the error is big (it may be positive or negative), but e and Ξe
are of opposite signs. For example, if e is PB and Ξe is NS then Ξ± is VS or if e is
NM and Ξe is PM then Ξ± is S. To minimize the effects of delayed control
action due to inherent process dead time or measuring lag such small gain is
essential to maintain the controller performance within the acceptable limit,
especially when the process dead time becomes considerably large. Observe
that when the error is big but and are of the same sign (i.e., the process is now
not only far away from the set point but also it is moving farther away from
it), the gain should be made very large to prevent from further worsening the
situation. This has been realized by rules of the form: IF e is PB and Ξe is PS
THEN Ξ± is VB or IF e is NM and Ξe is NM THEN Ξ± is VB.
2) Depending on the process trend, there should be a wide variation of the
gain around the set point (i.e., when e is small) to avoid large overshoot and
undershoot. For example, overshoot will be reduced by the rule IF e is ZE and
Ξe is NM THEN Ξ± is B. This rule indicates that the process has just reached
the set point but it is moving away upward from the set point rapidly. In this
situation, large gain will prevent its upward motion more severely resulting
in a smaller overshoot. Similarly, a large under shoot can be avoided using
26. 20
the rules of the form: IF e is NS and Ξe is PS THEN Ξ± is VS. This type of gain
variation around the set point will also prevent excessive oscillation and as a
result the convergence rate of the process to the set point will be increased.
Note that unlike conventional FLCβs, here the gain of the proposed controller
around the set point may vary considerably depending on the trend of the
controlled process. Such a variation further justiο¬es the need for variable
scaling function.
3) Practical processes or systems are often subjected to load disturbances. A
good controller should provide regulation against changes in load; in other
words, it should bring the system to the stable state within a short time in the
event of load disturbance. This is accomplished by making the gain of the
controller as high as possible. Hence, to improve the control performance
under load disturbance, the gain should be sufficiently large around the
steady-state condition. For example, IF e is PS and Ξe is PM THEN Ξ± is B or
IF e is NS and Ξe is NM THEN Ξ± is B. Note that immediately after a large load
disturbance, may be small but will be sufficiently large (they will be of same
sign) and, in that case, is needed to be large to increase the gain. At steady
state (i.e., e β 0 and Ξe β 0) controller gain should be very small (e.g., IF e is ZE
and Ξe is ZE THEN Ξ± is 0) to avoid chattering problem around the set point.
Further modiο¬cation of the rule base for may be required, depending on the
type of response the control system designer wishes to achieve. It is very
important to note that the rule base for computation of will always be
dependent on the choice of the rule base for the controller.
3.4.2 The Self-Tuning Mechanism
The parameters of the PID controller i.e. KP, KI and KD are kept constant in a
conventional PID controller. Initially the parameters are kept fixed after
calculating it using Modified Zeigler-Nichols tuning method. But the
parameters of our self-tuning PID controller does not remain fixed while it is
in operation (except KD), rather it is modified in each sampling time by the
gain updating factor Ξ±, depending on the trend of the controlled process
output.
The reason behind this on-line gain variation is to make the controller
respond according to the desired performance specifications. We already
explained how the desired variation in can be achieved using the rule base in
27. 21
Table 1. Thus, the proposed controller is basically an adaptive feedback loop
controller. The functional relationship of can be viewed as:
πΌ π = π(π π , βπ π )
where, f is a nonlinear function (computational algorithm) of e and Ξe, which
is described by the rule base shown in Table 1 and the associated inferencing
scheme.
Figure 6(a): Variation of Ξ± with e and Ξe
Figure 6(b): Variation of Ξ± with e and Ξe
The variation of Ξ± with e and Ξe is shown in Figure 6, which is seen to be
highly nonlinear. Figure 6 depicts the desirable characteristics of Ξ± as a
function of e and Ξe. For example, if error is positive big and change of error
is negative big then the system is moving fast toward the set point and, hence,
should be kept very small to avoid possible large overshoot. Fig. 4 indeed
reο¬ects this. Fig. 6(b), a rotated version of Fig. 6(a) is provided for a better
visual representation. As far as real time implementation is concerned
28. 22
smoothness of the control surface is highly desirable due to the limited speed
of the actuator response and to avoid the chattering of gears for the plant to
be controlled. In the proposed self-tuning scheme the controller output Fig. 6
is generated by the continuous and nonlinear variation of Ξ±. The most
important point to note is that Ξ± is not dependent in any way, on any process
parameter. The value of depends only on the instantaneous process states.
Hence, the proposed self-tuning scheme is model independent.
Therefore the net control action from the self-tuned PID controller tuned
using the parameter Ξ± as estimated from fuzzy logic block is:
πΆ π = (1 + πΌ)πΎπ π π + (1 + πΌ)πΎπΌ
1
π
π π + πΎ π· π π(π )
This system clearly depicts the auto-tuning mechanism. The results evaluated
implementing this technique is discussed in the next section.
The controller implementation is done in steps discussed below:
Step 1: The Ultimate Cycling Method is run as in conventional PID closed
control loops to determine the Ultimate Gain and Ultimate Period.
Step 2: The PID parameters are calculated according to Modified ZN Method
as given in Table 2.
Step 3: The loop as shown in Figure 1 is designed and then the calculated
parameters are fixed into place.
Step 4: For the fuzzy logic unit, the input e and Ξe are scaled according to the
method. Though they can be fine tuned, they are taken as Ge = 1 and GΞe = 0.5.
Step 4: The fuzzy logic estimated output parameter Ξ± is fed to the PID
controller which modifies the PID parameters as follows:
πΎπ βΆ= (1 + πΌ)πΎπ
πΎπΌ βΆ= (1 + πΌ)πΎπΌ
Thus the parameters that are modified are on KP and KI hence it is termed as
PI + D controller, since the derivative gain of the controller is not tuned
automatically but kept fixed.
29. 23
4. Results and Discussion
For a scheme to be accepted and implemented, it must show improved
performance better than the available methods. A quantitative analysis of the
proposed scheme is analysed quantitatively based on time domain
specifications and performance indices.
Two sample systems are chosen as follows:
a.
πβ0.2π
(π +1)2
b.
πβ0.3π
π (π +1)
These systems are simulated using MATLAB Simulink, with the solution set
to Runge-Kutta method and sample time taken as 0.1
System A is a Second Order Critically Damped System with Dead Time.
System B is a First Order Integrating Process with Dead Time. This system has
a pole at origin, thus is at the verge of its stability.
Since it is a method derived from Ultimate Cycle Method it is also compared
with the existing Ultimate Cycle Methods.
The following table lists the various tuning methods.
KU = Ultimate Gain; PU = Ultimate Period
Method Proportional Gain Integral Time Derivative Time
Zeigler-Nichols 0.6*KU PU/2 PU/8
Tyreus-Luyben 0.45*KU PU/2.2 PU/6
Astrom-Hagglund 0.47*KU 0.45*PU 0.11*PU
Modified ZN 0.33*KU PU/2 PU/3
Table 2: The Ultimate Cycle Methods Tuning Chart
The output of the systems are analysed and evaluated below:
πβ0.2π
(π + 1)2
Ku= 9.27; Pu = 2.25;
30. 24
Figure 7: Comparison of Zeigler Nichols and proposed Method for System 1
Figure 8: Comparison of Tyreus Luyben and proposed Method for System 1
31. 25
Figure 9: Comparison of Astrom Hagglund and proposed Method for System
1
Figure 10: Comparison of Modified Zeigler Nichols and proposed Method for
System 1
32. 26
Proposed Method (with Ge = 1 and Gοe = 0.5):
Proportional Gain: 3.0591; Integral Gain: 2.0394; Derivative Gain: 1.14716
Comparison based on Time Domain Specifications:
Method Used Rise Time Overshoot Settling Time
Zeigler-Nichols 0.8652seconds 88.8% 13.1 seconds
Tyreus-Luyben 1.054 seconds 41.1% 4.8 seconds
Astrom-Hagglund 0.9501seconds 94.9% 35.7 seconds
Modifed ZN 1.3 seconds 27.6% 6.6 seconds
Proposed Method 0.9954 seconds 1.02% 13.1 seconds
Table 3: Time domain specification of system 1
Performance base on Performance Indices:
Method Used IAE ITAE ISE ITSE
Zeigler-Nichols 3.9439 52.7035 1.6152 8.1744
Tyreus-Luyben 1.7028 21.0256 0.8045 3.2815
Astrom-Hagglund 8.7117 169.7452 3.2522 29.6668
Modifed ZN 1.9063 21.9914 0.8577 2.9370
Proposed Method 2.2045 45.1735 0.7031 2.1976
Table 4: Performance Indices of system 1
πβ0.3π
π (π + 1)
Ku = 3.158; Pu = 4;
Proposed Method (with Ge = 1 and Gοe = 0.5):
Comparison based on Time Domain Specifications:
Method Used Rise Time Overshoot Settling Time
Zeigler-Nichols 1.5 seconds 69.9% 9.9seconds
Tyreus-Luyben 2seconds 40.6% 8seconds
Astrom-Hagglund 1.7seconds 82.8% 20.8seconds
Modified ZN 2.5seconds 50.7% 20.2seconds
Proposed Method 2.5 seconds 18.5% 22.1 seconds
Table 5: Time domain specifications of system 2
33. 27
Proportional Gain: 1.04214; Integral Gain: 0.52107; Derivative Gain:
1.38952
Figure 11: Comparison of Zeigler Nichols and proposed Method for System 2
Figure 12: Comparison of Tyreus Luyben and proposed Method for System 2
34. 28
Figure 13: Comparison of Zeigler Nichols and proposed Method for System 2
Figure 14: Comparison of Modified Zeigler Nichols and proposed Method for
System 2
35. 29
Comparison based on Performance Indices:
Method Used IAE ITAE ISE ITSE
Zeigler-Nichols 4.2577 69.1672 2.0131 17.7058
Tyreus-Luyben 3.8811 63.8199 1.7022 15.0782
Astrom-Hagglund 7.5152 150.1520 3.2930 39.3175
Modified ZN 6.1180 108.1778 2.3527 20.3501
Proposed Method 4.7184 102.6099 1.4160 11.3104
Table 6: Performance Indices of system 2
The disturbance of a pulse of unit amplitude was applied for 1 second. The
pade order for delay was taken as 1 for linearization. The numerical method
used for integrating the performance indices is trapezoidal rule. The upper
limit was taken as the final simulation time, truncating the steady state error.
36. 30
5. Conclusion
A simple model independent self-tuning scheme for PID controller using
Fuzzy Logic is proposed here. Here the output Ξ±, which is used for tuning the
PID parameters on-line by fuzzy rules deο¬ned on e and Ξe.
The most important feature of the proposed scheme is that it does not depend
on the process being controlled. Conceptually, this scheme differs from others
in the literature as it attempts to implement the operatorβs strategy while
running a plant. For example, some of the existing schemes attempt to attain
targeted levels for some of the performance indexes like overshoot and/or
undershoot, while in the present case the objective is to mimic the operatorβs
action which in turn is expected to result in the desired levels for various
performance indexes. The proposed self-tuning scheme was applied to PID
for a wide range of different linear processes. Performances of self-tuning
scheme were also compared with those of their corresponding conventional
PID controllers with respect to several indices such as peak overshoot, settling
time, rise time, IAE, ITAE, ISE, ITSE in addition to the responses due to set-
point change and load disturbance and, in most cases, the proposed scheme
was found to outperform its conventional counterpart.
Another outstanding feature of the proposed scheme is that the most widely
used PID controller has not to be replaced by any other controller. Here only
the PID gains are changed on-line by the use of fuzzy logic, which is a soft
computing part. Since it is model independent and does not depend on
process parameters, it is adaptive in spite of the gain scheduling approach.
The approach of fuzzy controller to tune the process is similar to an
experienced operator trying to vary the gain of PID by tuning manually
observing and manipulating the error obtained in the process. This approach
of imprecision of data makes fuzzy logic a powerful tool for future use.
The approach is even useful to tune higher order systems, even fourth order
system has been found to stabilize using minimum delay. The adaptive
schemes have tended to be a niche application rather than pervasively in
industrial applications. But this method proposed here has found to be much
more applicable in industries since it does not at all posses the concern that it
can lead to unstable operation or unsafe operating condition.
37. 31
6. Scope of the Work
PID controllers are the oldest functional units of a working system which is
presently irreplaceable in the industries. But the digital systems are finding
widespread application due to their flexibility, computational power, cost
effectiveness and noise cancellation.
Controller tuning inevitably involves a trade-off between performance and
robustness. The performance goals of excellent set point tracking and
disturbance rejection should be balanced against the robustness goal of stable
operation over a wide range of conditions. This is exactly where the proposed
control strategy fits perfectly.
The best criterion of the method is imprecision of data. It mimics the
operation of a human operator trying to set the PID parameters i.e. tuning the
controller by viewing and judging the error and the rate of change of the
error. This is very much intuitive field of the control theory. Here even the
controller settings do not have to be precisely determined. A small change in
a controller setting from its best value (for example a deviation of 10%) has a
little effect on the closed loop responses.
On the contrary process control problem requires on-line tuning of the
controller setting to achieve satisfactory degree of control. For most plants, it
is not feasible to manually tune each controller. Each control specialist
(engineer or technician) or plant operator is typically responsible for 300 to
1000 loops, is not feasible to tune every controller. Therefore they typically
operate using the preliminary settings from the control system design.
Using this method would keep the parameters unchanged in general, the
tuning parameter using fuzzy logic change on the basis of error of the system;
therefore it is easy to calculate. Now this calculated parameter by the digital
38. 32
computer is easily to multiply with the KP and KD. Moreover it is the simple
since only one parameter is changing.
This method is adaptive hence frequent and significant change in operating
condition or environment retunes the controller automatically. This adjusts
the controller parameter automatically to compensate for changing process
condition.
Finally, it is a simple and elegant way of tuning the PID controller gain
without the complete process knowledge. It does not depend on the process
parameters, hence unlike gain scheduling approach, we need not find any
auxillary variable that relates to the change of process parameter, error along
with the rate of change of error and a variable scaling function does the job.
Though the input scaling functions have been kept constant process
knowledge can be used to fine tune them. The system becomes more flexible
with the use of adaptive fuzzy logic controller or self-organizing fuzzy logic
controller.
39. 33
Bibliography
1. Raut Kiran H., Dr. S.R. Vaishnav, βA Study on Performance of Different PID
Tuning Techniquesβ
2. OβDwyer A., βPI and PID controller tuning rules for time delay processes: a
summaryβ Technical Report AOD-00-01, Edition 1
3. Shamsuzzoha Mohammad, Sigurd Skogestad, βThe setpoint overshoot
method: A simple and fast closed-loop approach for PID tuningβ
4. Raut Kiran H., Dr. S.R. Vaishnav, βPerformance Analysis of PID Tuning
Techniques based on Time Response specificationβ International Journal
Of Innovative Research In Electrical, Electronics, Instrumentation And
Control Engineering, Vol. 2, Issue 1, January 2014
5. P. Venugopal, Ajanta Ganguly, βDesign of tuning methods of PID controller
using fuzzy logicβ International Journal of Emerging trends in Engineering
and Development Issue 3, Vol.5 (September 2013) ISSN 2249-6149
6. Zulfatman and M.F. Rahamat, βApplication of self-tuning fuzzy pid controller
on industrial hydraulic actuator using system identification approachβ
International Journal On Smart Sensing And Intelligent Systems, Vol. 2,
No. 2, June 2009
7. Gasbaoui Brahim, Chaker Abdelkader, Laoufi Adellah, βMulti-input
multi-output fuzzy logic controller for utility electric vehicleβ Archives Of
Electrical Engineering Vol.
60(3), pp. 239-256 (2011)
8. Mudi Rajani K., Nikhil R. Pal, βA Robust Self-Tuning Scheme for PI- and PD-
Type Fuzzy Controllersβ IEEE Transactions On Fuzzy Systems, Vol. 7, No. 1,
February 1999
40. 34
9. Abdullah Ahmad Hatta Bin, βDesign And Development Of Fuzzy Logic Based
Level Controllerβ May 2008
10. Jeffers Malcolm, βA Genetic Algorithm based Fuzzy Logic Controllerβ April,
2001
11. Nagrath I.J., M. Gopal, βControl Systems Engineeringβ New Age
International Publishers ISBN 978-81-224-2008-1
12. Seborg Dale E., Thomas F. Edgar, Duncan A. Mellichamp, βProcess
Dynamics and Controlβ John Wiley & Sons. Inc ISBN ISBN 0-471-00077-9
13. Munsinghe Rohan, βClassical Control Systems Design and Implementationβ
Narosa Publishing House Pvt. Ltd. ISBN 978-81-8487-194-4
41. 35
Appendices
Appendix I: Continuous Cycling Method
For practical systems continuous cycling method is described as:
Step 1: After the process has reached steady state eliminate the integral
and derivative control action by setting KI = KD = 0.
Step 2: Set KP equal to a small value and place the controller in automatic
mode.
Step 3: Introduce a small momentary set point change so that the
controller variable moves away from the set point. Gradually increase KP
in small increments until continuous cycling occurs. The term continuous
cycling refers to a sustained oscillation with constant amplitude. The
numerical value of KP that produces continuous cycling (i.e. Proportional
action only) is called ultimate gain KU. The period of the corresponding
sustained oscillation is referred to as ultimate period PU.
Step 4: Calculate the PID controller setting using various relevant values
from the table.
Step 5: Evaluate the controller settings by introducing a small set-point
change and observing the closed loop response.
Appendix II: Runge Kutta Method
In numerical analysis, the RungeβKutta methods are an important family
of implicit and explicit iterative methods, which are used for the
approximation of solutions of ordinary differential equations. These
techniques were developed around 1900 by the German
mathematicians C. Runge and M. W. Kutta. Runge Kutta method is a
family of methods of which classical method or Runge Kutta of order 4 is
the most common. It begins with the initial value problem:
ππ¦
ππ‘
= π π‘, π¦ πππ π¦ π‘0 = π¦0
42. 36
Here, y is an unknown function (scalar or vector) of time t which we would
like to approximate; we are told that the rate at which y changes, is a function
of t and of y itself. At the initial time t0 the corresponding y-value is y0. The
function f and the data t0, y0 are given.
Now pick a step-size h>0 and define
π¦ π+1 βΆ= π¦π +
π
6
π1 + 2π2 + 2π3 + π4
π‘ π+1 βΆ= π‘ π + π
π β π ππ‘ ππ πππ ππ‘ππ£π πππ‘πππππ
π1 = π(π‘ π, π¦π)
π2 = π(π‘ π +
π
2
, π¦π +
π
2
π1)
π3 = π(π‘ π +
π
2
, π¦π +
π
2
π2)
π4 = π(π‘ π + π, π¦π + ππ3)
Here yn+1 is the RK4 approximation of y(tn+1), and the next value (yn+1) is
determined by the present value (yn) plus the weighted average of four
increments, where each increment is the product of the size of the interval, h,
and an estimated slope specified by function f on the right-hand side of the
differential equation.
The RK4 method is a fourth-order method, meaning that the local truncation
error is on the order of h5
, while the total accumulated error is order h4
Appendix III: Trapezoidal Rule
In numerical analysis, the trapezoidal rule (also known as the trapezoid
rule or trapezium rule) is a technique for approximating the definite integral
π π₯ ππ₯
π
π
43. 37
The trapezoidal rule works by approximating the region under the graph of
the function f(x) as a trapezoid and calculating its area. It follows that
π π₯ ππ₯
π
π
β (π β π)
π π + π(π)
2
For a domain discretized into N equally spaced panels, or N+1 grid
points a = x1 < x2 < ... < xN+1 = b, where the grid spacing is h = (b-a)/N, the
approximation to the integral becomes
π π₯ ππ₯
π
π
β
(π β π)
2
(π π₯ π+1 + π(π₯ π))
π
π=1