Vous êtes sur la page 1sur 4

Design and Implementation of Fuzzy Logic

controller in PID using LabVIEW


Umesh C. Pati, Pragyan P. Kar and Priyam Saikia *
Department of Electronics and Communication Engineering,
National Institute of Technology,
Rourkela-769008, Odisha
E-mail: Pragyankar7@gmail.com , ucpati@nitrkl.ac.in , *saikia.ainu@gmail.com

Abstract – Fuzzy Logic Controller develops a more humanlike behavior in automatic control systems.
This paper provides an insight to the implementation of a fuzzy interference system in a control
system. The rule base interference system is designed in Fuzzy System Designer of Laboratory Virtual
Instrumentation Engineering Workbench (LabVIEW). However, it is difficult to replace the
predominantly used PID controllers in the industry by a new controller. In this paper, a Fuzzy logic
based PID controller is designed with a fuzzified weight for the proportional term. The weight is
based on the current error and change in error. A similar controller with a constant weight less than
one is also implemented and a performance comparison between the two is carried out. The fuzzy
based methodology used, reduces both the overshoot and the rise time in set-point tracking. It requires
just a little extra computational effort and the PID characteristic of the controller is also preserved.

Keywords- Fuzzy logic, Fuzzy System Designer, Set-point tracking

INTRODUCTION The performance of the fuzzy logic based PID


Fuzzy logic is an extension of boolean logic, controller is then compared with another
which incorporates partial values of truth. It controller in which a constant value for the
quantifies the vagueness or ambiguity weight, less than one, is multiplied to the
associated with any process. The utilization of proportional term .Six different set of
fuzzy logic algorithm in a controller helps us processes are considered for comparison of the
to convert an expert’s knowledge to an performance of the two controllers[1].
automatic control scheme. The fuzzy based FUZZY LOGIC CONTROLLER
system consists of sets of IF-THEN rules that
represent a control decision mechanism that Model Formulation
adjusts the system parameters automatically. The steps involved in creating a fuzzy logic
The paper implements a simple mamdani’s interference system includes: Creating the
fuzzy interference system using two input membership functions (fuzzify), Creating the
variables, error and change in error. Seven rule base table and Defuzzifying the result.
linguistic variables for both the two inputs and In this paper, two input variables are
also the output are defined and accordingly the considered i.e. error and change in error. The
rule base for the controller is designed. block diagram for a fuzzy logic controller is
It is well known that, although a number of presented in Fig. 1.
sophisticated controllers have been introduced,
“Proportional-Integral-Derivative” (PID)
controllers are still the most adapted
techniques in industries. The reason being it’s
easy to tune nature, simple structure and the
fact that it provides acceptable performance Figure 1: Block diagram of a Fuzzy Logic Control
for a large number of processes. System.

This paper implements a fuzzy logic based The linguistic variables given in TABLE I are
PID controller taking into consideration the used to create the membership functions of
current error and change in error to estimate a input variables - error and change in error and
fuzzified weight, which is then multiplied to the output variable-controller output. The rule
the proportional term of the PID controller.
base used for the interference system is
presented in TABLE II.

TABLE I
Linguistic variables
NB Negative Big
NM Negative Medium
NS Negative Small
Figure 3: Step responses Figure 4: Step response
ZO Zero
for for
PS Positive Small
PM Positive Medium
PB Positive Big IMPLEMENTATION OF FUZZY LOGIC BASED
PID CONTROLLER
TABLE II Model Formulation
Rule base For a basic PID controller,
e(t)
NB NM NS ZO PS PM PB (3)
NB NB NB NB NB NM NS ZO
NM NB NB NB NM NS ZO PS Where, = system error;
NS NB NB NM NS ZO PS PS
Control variable;
Δe(t)

ZO NB NM NS ZO PS PM PM
PS NM NS ZO PS PS PB PB Proportional gain;
PM NS ZO PS PM PB PB PB Derivative time constant;
PB ZO PS PM PB PB PB PB
Integral time constant.
Simulations and results
The idea of multiplying or weighting the set-
The paper develops a LabVIEW point value for the proportional action by a
implementation of the fuzzy logic controller. constant parameter (b<1), is effective in
The block diagram for the fuzzy logic reducing overshoot. The Block diagram is
controller is shown in Fig. 2 shown in Fig. 5.

Figure 5: Block Diagram of a constant weighted PID


Controller
Figure 2: LabVIEW implementation of a Fuzzy Logic
Control System. The following modified equation is obtained,

The transfer functions of the two processes (4)


used to analyze the Fuzzy logic controller are
provided in Eq. (1) and (2). such that,
(5)
(1)
and, (6)
(2)
However, this methodology suffers a
The step responses for the two processes, drawback of increased rise time since the
and are shown in Fig. 3 and effect of the proportional controller decreases.
Fig.4 respectively. To attain both reduction in overshoot as well
as rise time, a fuzzified weight (b(t)), based on
the current error and change in error, is
multiplied to the proportional term. The block
diagram of the fuzzy weighted modified PID ;
controller is shown in Fig. 6.
L=0, 0.1

The LabVIEW block diagram implementation


Figure 6: Block Diagram of a fuzzy weighted PID
for the methodology applied is shown below in
Controller Fig. 7

The linguistic variables used are given in


TABLE III. The rule base used for the
interference system is presented in TABLE IV.

TABLE III
Linguistic variables
NVB Negative Very Big
NB Negative Big
NM Negative Medium
NS Negative Small
Z Zero
Figure 7: LabVIEW implementation for comparison of
PS Positive Small fixed set point weighting and fuzzy set point weighting
PM Positive Medium for PID controller.
PB Positive Big
PVB Positive Very Big Simulations and results

TABLE IV The unit step response was obtained using


Rule base LabVIEW and Fuzzy System Designer for the
e(t) considered processes. The steps responses to
NB NS Z PS PB few of the six processes are shown in Fig. 8 to
NB NVB NB NM NS Z Fig. 19
NS NB NM NS Z PS
Δe(t)

ZO NM NS Z PS PM
PS NS Z PS PM PB
PB Z PS PM PB PVB

Six set of systems with different values for the


transfer function parameters are considered, to Figure 8 : Figure 9: , ξ=0.2
test the effectiveness of the methodology.
The following transfer functions [1] with the
indicated values of the parameters have been
considered:
;
, Figure 11: ,
T=1,L=0.1 T=1,L=0.4

; T = 1, 10; L = 0.1, 0.4, 0.8

; Figure 12: , Figure 13: ,


T=1, L=0.8 T=10, L=0.1
TABLE VI
Value of rise time using a fixed weight b and a
fuzzified weight b.

Transfer function
Fixed b Fuzzy b
Figure 14: Figure 15
T=10, L=0.4 T=10, L=0.8 , ξ=0.8 0.6 0.6
, ξ=0.2 1 0.9
0.5 0.5
, T=1, L=0.1 1.5 0.6
, T=1, L=0.4 1.4 2
, T=1, L=0.8 1 1.2
Figure 16: Figure 17: , T=10, L=0.1 0.2 0.1
, T=10, L=0.4 1.4 1.3
, T=10, L=0.8 0.5 0.7
2.5 2.6
, L=0 0.8 1.5
, L=0.1 1 1
Figure 18: , L=0 Figure 19 , L=0.1
1 1.5
In the figures above the dotted line is for fixed
CONCLUSION
b and the dashed line is for fuzzy b. A
comparison between the responses obtained The Fuzzy Logic Controller is a powerful tool
with a fixed value of the weight b and the and leads to more efficient, precise and
fuzzified b was made by evaluating the accurate controls. The benefits of Fuzzy Logic
overshoot percentage ( ) and rise time ( ). Controllers include more accuracy and
precision than their PID counterparts. It can be
The overshoot (%) and rise time (s) are seen from the TABLE V and VI that the rise
reported in TABLE V and VI for the two time decreases whilst the overshoot does not
controllers, respectively. significantly increase in fuzzified b with
respect to the fixed b. The use of the fuzzy set-
point weighting, in conjunction with the PID
TABLE V
method for the tuning of the proportional gain,
Value of overshoot (%) using a fixed weight b
and a fuzzified weight b. leads to a significant improvement in the step
response and preserves the good performances
Transfer function (In %) in the attenuation of the load disturbance
assured by PID controller.
Fixed b Fuzzy b
, ξ=0.8 10 1 REFERENCES
, ξ=0.2 0 0
[1] Antonio Visioli, “Fuzzy Logic Based Set-
10 2
Point Weight Tuning of PID Controllers”,
, T=1, L=0.1 0 2
IEEE transactions on systems, man, and
, T=1, L=0.4 8 3 cybernetics—Part A: systems and humans,
, T=1, L=0.8 1 0.5 Nov 1999, pp. 587-592
, T=10, L=0.1 15 0
, T=10, L=0.4 6 2 [2] S.R.Vaishnav, Z.J.Khan, “Design and
, T=10, L=0.8 3 0 Performance of PID and Fuzzy Logic
14 5 Controller with Smaller Rule Set for Higher
, L=0 7 0.5 Order System”, Proceedings of the World
Congress on Engineering and Computer Science
, L=0.1 3 0.5 2007, WCECS 2007, October 24-26, 2007,San
1 2.5 Francisco, USA

Vous aimerez peut-être aussi