Вы находитесь на странице: 1из 24

Seminar Report’03 PH Control Technique using

Fuzzy Logic

INTRODUCTION

Fuzzy control is a practical alternative for a variety of challenging


control applications since it provides a convenient method for constructing
non-linear controllers via the use of heuristic information. Since heuristic
information may come from an operator who has acted as “a human in the
loop” controller for a process. In the fuzzy control design methodology, a set
of rules on how to control the process is written down and then it is
incorporated into a fuzzy controller that emulates the decision making
process of the human. In other cases, the heuristic information may come
from a control engineer who has performed extensive mathematical
modelling, analysis and development of control algorithms for a particular
process. The rest of the process is the same as the earlier case. The ultimate
objective of using fuzzy control is to provide a user-friendly formalism for
representing and implementing the ideas we have about how to achieve high
performance control. Apart from being a heavily used technology these
days, fuzzy logic control is simple, effective and efficient. In this paper, the
structure, working and design of a fuzzy controller is discussed in detail
through an in-depth analysis of the development and functioning of a fuzzy
logic pH controller.

Dept. of AEI 1 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

FUZZY CONTROL - The Basics

The primary goal of control engineering is to distill and apply


knowledge about how to control a process so that the resulting control
system will reliably and safely achieve high performance operation. Here,
the effort made is to show how fuzzy logic provides a methodology for
representing and implementing our knowledge about how best to control a
process.

Figure 1. Fuzzy Controller

The general block diagram of a fuzzy controller is shown in figure 1.


The controller is composed of four elements, viz

• A Rule Base
• An Inference Mechanism
• A Fuzzification Interface
• A Defuzzification Interface

Dept. of AEI 2 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

RULE BASE

This is a set of “If ……..then…..” rules which contains a fuzzy logic


quantification of the expert’s linguistic description of how to achieve good
control.

INFERENCE MECHANISM

This emulates the expert’s decision making in interpreting and


applying knowledge about how best to control the plant.

FUZZIFICATION INTERFACE

This converts controller inputs into information that the inference


mechanism can easily use to activate and apply rules.

DEFUZZIFICATION INTERFACE

It converts controller inputs into information that the inference


mechanism into actual inputs for the process.

SELECTION OF INPUTS AND OUTPUTS

It should be made sure that the controller will have the proper
information available to be able to make good decisions and have proper
control inputs to be able to steer the system in the directions needed to be
able to achieve high-performance operation.

Dept. of AEI 3 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

The fuzzy controller is to be designed to automate how a human


expert who is successful at this task would control the system. Such a fuzzy
controller can be successfully developed using high-level languages like C,
Fortran, etc. Packages like MATLAB® also support Fuzzy Logic.

CRISP SETS Vs FUZZY SETS

CRISP SETS

The word ‘crisp sets’ denote ordinary sets or classical sets. Examples
for crisp sets are set of natural numbers ‘N’, set of all real numbers ‘R’, etc.

FUZZY SETS AND MEMBERSHIP FUNCTIONS

Given a linguistic variable Ui with a linguistic value Aij and


membership function μ Aij(Ui) that maps Ui to [0,1], a ‘fuzzy set is defined as

Aij= {(Ui, μ Aij (Ui)); Ui ε υi}

The above written concept can be clearly understood by going


through the following example. Suppose we assign Ui=“temperature” and
linguistic value A11=“hot”, then A11 is a fuzzy set whose membership
function describes the degree of certainty that the numeric value of the
temperature, Ui ε υi, possesses the property characterized by A11. This is
made even clearer by the figure 2.

Dept. of AEI 4 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

Figure 2: Membership Function of Temperature.

In the above example, the membership function chosen is triangular.


There are some other membership functions lime Gaussian, Trapezoidal,
Sharp peak, Skewed triangle, etc. Depending on the application and choice
of the designer, the required one can be chosen.

Dept. of AEI 5 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

Figure 3: 1)Triangular, 2)Trapezoidal, 3)Skewed triangular, 4)Sharp peak

PH CONTROL

To illustrate the application of fuzzy logic, the remaining section of


the paper is directed towards the design and working of a pH control system
using fuzzy logic.

PH is an important variable in the field of production especially in


chemical plants, sugar industries, etc. PH of a solution is defined as the
negative of the logarithm of the hydrogen ion concentration, to the base 10.
I.e., PH= -log 10 [H+]

Dept. of AEI 6 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

Figure 4: Block Diagram of pH Control System

Let us consider the stages of operation of a sugar industry, where PH


control is required. The main area of concern is the clarification of raw juice
of sugarcane. The raw juice will be having a PH of 5.1 to 5.5. The clarified
juice should ideally be neutral. I.e., the set point should be a PH of 7. The
process involves addition of lime and SO2 gas for clarifying the raw juice.
The addition of these two are called liming and sulphitation respectively.
Since the process involves continuous addition of lime and SO2 ; lime has a
property of increasing the PH of the clarified juice. This is the principle used
for PH control in sugar industries. The PH of the raw juice is measured and
this value is compared to the set point and this is further used for changing
the diameter of the lime flow pipe as per the requirement. The block diagram
of the process is given in figure 1.

The whole process can be summarised as follows. The PH sensor


measures the PH. This reading is amplified and recorded. The output of the
amplifier is also fed to the PH indicator and interface. The output of this
block is fed to the fuzzy controller. The output of fuzzy controller is given to

Dept. of AEI 7 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic
the stepper motor drive. This inturn adjusts the diameter of lime flow pipe as
per the requirement. Thus, the input to the fuzzy controller is the PH reading
of the raw juice. The output of the fuzzy controller is the diameter of the
lime flow pipe valve or a quantity that controls the diameter of the lime flow
pipe valve like a DC current, voltage, etc. The output obtained from the
fuzzy controller is used to drive a stepper motor which inturn controls the
diameter of the value opening of the lime flow pipe. This output tends to
maintain the pH value of sugar juice to a target value. A detailed description
of the design and functioning of the fuzzy controller is given in the following
section.

The different sections in the fuzzy controller used in this PH


controller are
• Fuzzification Section
• Rule Base
• Inference Mechanism
• Defuzzification Section

FUZZIFICATION SECTION

The variables ‘PH’ and ‘LFPD’ or Lime-flow-pipe-diameter are


selected for Fuzzification. In this section, the action performed is obtaining a
value of the input variable and finding the numerical values of the
membership function defined for that variable. As a result of Fuzzification,
the situation currently sensed (input) is converted into such a form that, it can
be used by the inference mechanism to trigger the rules in the rule base.

As explained earlier, the set point for the process is normally 7. Let the
diameter set point be 15mm and this corresponds to a pH of 7. Let the input

Dept. of AEI 8 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic
range be taken from 4 to 10 and other variable, ie.output range from 1 to
18mm.

After fuzzification, the fuzzy sets obtained are labelled using the
following term set, T={LAD, MAD, SAD, SP, SAL, MAL, LAL, LDD,
MDD, SDD, SD, SID, MID, LID}

LAD = large acidic


MAD = medium acidic
SAD = small acidic
SP = set point pH
SAL = small alkaline
MAL = medium alkaline
LAL = large alkaline
LDD = large decrease diameter
MDD = medium decrease diameter
SDD = small decrease diameter
SD = set diameter
SID = small increase diameter
MID = medium increase diameter
LID = large increase diameter

The membership functions of input variable PH and output variable


LFPD is shown in figures 5 and 6 respectively. μi is the membership
function of output. Here, we use triangular membership functions.

Dept. of AEI 9 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

Figure 5: Membership Function of pH

Figure 6: Membership Function of LFPD

As a result of Fuzzification, we get the names of fuzzy sets to which the


input belongs and to what extend they belong to these sets i.e., their
membership functions.

RULE BASE

Dept. of AEI 10 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic
Rule base stores the different rules that are to be fired or used according
to the input. These rules are either gathered from experienced human
operator or from careful study of existing pH control systems. The rule base
thus represents the control strategy employed in the pH control. Table 1
gives the set of fuzzy action rules in our particular application.

Table 1: The Rule Base

The incoming pH value from sensor fires the rules from rule-base. This
is done by the inference mechanism.

INFERENCE MECHANISM

The inference mechanism employed in pH control is based on


individual rule firing. In this scheme, contribution of each rule is evaluated
and overall decision is derived.

During inference process, each rule that is fired by a crisp value pf pH is


summed up after giving the weightages decided by the fuzzification unit.
This weightage is called degree of satisfaction (DoS). DoS is decided by the
fuzzification module. The process of inference is illustrated in figure below.

Dept. of AEI 11 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

Figure 7: Inference Mechanism and Defuzzification

In the above drawn case, the input pH is 6.25. The set point pH is 7.
After fuzzification, we understand that the input belongs to the fuzzy set
SAD with a degree of membership DoM=0.7 and at the same time, it belongs
to SP with a DoM=0.3. Since the membership function chosen is symmetric
(triangular), the DoS=DoM. The work until now was done by the
fuzzification module. Now, the control switches to the inference mechanism.

In the inference mechanism, depending on which all fuzzy sets the input
belongs to, the corresponding rules are fired. This describes the functioning
of the three out of four blocks in the fuzzy controller. Now comes the
defuzzification section.

DEFUZZIFICATION SECTION

Dept. of AEI 12 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic
This section performs the task of converting the output of inference
mechanism, i.e., the rules that are fired, and the DoS given by the
fuzzification module into a crisp value of LFPD. For this, it uses “height
defuzzification” which is computationally simple and fast. The crisp rate of
lime flow depends on the crisp value of lime flow pipe diameter LFPD,
which is given by the formula

LFPD=(P1H1+P2H2) / (H1+H2)

In our example, a maximum of two sets are clipped simultaneously.


The resulting LFPD will be LFPD=(15X0.3 +16X0.7)/ (0.3+0.7)
= 15.7 mm

PRACTICAL CONTROL CHARACTERISTICS

Practically, the above-described method is an iterative method. After a


certain period of damped oscillations, the pH tends to maintain the desired
value.

Dept. of AEI 13 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

SUGAR PLANT WITH AND WITHOUT AUTOMATIC


pH CONTROL

In sugar plants, pH control is achieved either manually or automatically.


A comparative study is given below.

MANUAL CONTROL

These are many strategies used in manual pH control, out of which a


couple are explained below. One of them is that the operator keeps the juice
flow and SO2 gas flow rates constant and adjusts the lime control value to get
the desired value of pH. The lime flow rate is adjusted by changing the
diameter of an outlet pipe of lime milk tank. This adjustment is based on the
operator’s experience. In such a control, the pH of clear juice obtained is in
the range 6.9 to 7.2. This is observed using pH indicator paper.

In another method, the lime is added to heated raw juice until the pH is
9.5 to 10.5. By maintaining the juice flow constant. Here, lime flow rate is
varied manually. By adjusting the airflow to the Sulphur burner, SO2 gas is
passed through limed juice and pH is maintained in the range 6.9 to 7.1.
Here also, pH is observed using pH indicator paper.

AUTOMATIC CONTROL

The earlier discussed fuzzy logic pH control technique can be used for
sugar factory automatic. To implement this controller, many methods can be
adopted. It may be implemented using a PC, a microprocessor, or a micro
controller. The first two methods are discussed in brief and we focus on the

Dept. of AEI 14 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic
third method in detail. In the first two methods, a program is written down
based on the fuzzy algorithm. If we are using a PC, any high level language
can be used. If we are using a microprocessor, we have to either write the
program in a high level language provided, we have a compiler to convert
this program into the assembly language of the microprocessor or the
program has to be written down in the assembly language itself. In these two
methods, the input values and output values are taken in and given out
through the ports of the μp or pc.

In the third method, we are using a microcontroller of PIC series. We


are using the μc PIC 16F73 chip, to be specific. In addition to this μc, we are
using an USART, input buffer, output latches, etc. A block diagram of the
whole system is given below.

Dept. of AEI 15 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

HARDWARE BLOCK DIAGRAM

Figure 8: Hardware Block Diagram

PIC MICROCONTROLLER

The PIC Microcontroller that is used here to realize the


fuzzy controller is a general-purpose eight-bit microcontroller
developed by the MICROCHIP INC. The programming of this
microcontroller can be done in two ways. One is by
assembly language programming of the micro controller.
The other is by using a compiler MPLAB for converting the
high-level language program written by the programmer into
the assembly language of the microcontroller.

INPUT UNITS

Dept. of AEI 16 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic
The inputs to the microcontroller are crisp values of pH
measured by the sensors. This input can be either digital or
analog. Separate units are provided for analog and digital
inputs. Buffer is used for holding the input for sampling.
Buffer holds the input only for a small period. According to
the required accuracy, the inputs are taken i.e., sampled
from the input terminal continuously since the buffer can
hold only for a fraction of time. If less accuracy is needed,
sampling rate is decreased.

OUTPUT UNITS

The output of our fuzzy logic controller is crisp value of


lime flow pipe diameter. This output is obtained through the
output latch. The latch used here is 74373.

USART AND MAX232

USART or universal synchronous receiver transmitter is


used for communicating with the computer. MAX232 is used
for converting TTL level data to RS232 level.

OTHER APPLICATIONS OF FUZZY LOGIC

• Modern consumer goods like washing machine, owen,


etc.
• Expert systems
• Fault tolerant aircraft control

Dept. of AEI 17 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic
• Genetic engineering

Fuzzy logic also finds application in the fields of Robotics,


civil engineering, industrial engineering, mechanical
engineering, economics, medicine, etc.

MERITS OF FUZZY LOGIC CONTROLLER

• The main advantage of a fuzzy controller is that a


model is not required to develop such a controller.
• The method of using rule base is more lucid and
natural t o people.
• Fussy logic methods can be used for tuning of
conventional PID controllers.

DEMERITS OF FUZZY LOGIC CONTROLLER

• Since the fuzzy controllers have no mathematical


model, it is difficult to analyse the system.
• The working of the controller heavily depends on the
judgement of the human expert who formulated the rules.

Dept. of AEI 18 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

CONCLUSION

Fuzzy logic is a relatively new technology, which is increasingly


finding applications in the present scenario. With its ability to simulate a
human decision making process, the technology seems to be lucid and
natural to the human. In short, fuzzy logic is a car with an engineer in its
driver’s seat. With proper design of its four components along with a wisely
chosen set of rules, fuzzy control is all set to crack the most complex of
control problems- thanks to Lotfi A. Zedah who is regarded as the father of
Fuzzy logic.

Dept. of AEI 19 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

BIBLIOGRAPHY

1. B. T. JADHAV, R.R. MUDHOLKAR & S.R. SAWANT,


“FUZZY LOGIC pH CONTROL TECHNIQUE”,
INDUSTRIAL AUTOMATION- APRIL 2003, pp 42-46.

2. KEVIN M. PASINO & STEPHEN YURKOVICH,


“FUZZY CONTROL”
ADDISON WESLEY, pp 21-65

3. GEORGE J. KLIR & BO YUAN,


“FUZZY SETS AND FUZZY LOGIC-THEORY AND APPLICATION”,
PHI, pp 1-32.

Dept. of AEI 20 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

ABSTRACT

Fuzzy logic, a relatively new cutting edge technology, is nowadays


gaining popularity. Fuzzy control is a practical alternative for a variety of
challenging control applications since it provides a convenient method for
constructing no-linear controllers via the use of heuristic information. Such
heuristic information may come from an operator who has acted as a “human
in the loop” controller for a process. A fuzzy controller emulates human
decision-making process. Fuzzy control provides a user-friendly formalism
for representing and implementing the ideas we have about how to achieve
high performance control. This paper discusses the automation of sugar
factory by the use of fuzzy controller for controlling the pH of sugar
solution. The structure, working, and design of a fuzzy controller for this
purpose is very well dealt with in this paper. With its ability to simulate a
human decision making process, the technology seems to be lucid and
natural to the human. In short, fuzzy logic is a car with an engineer in its
driver’s seat. With proper design of its four components along with a wisely
chosen set of rules, fuzzy control is all set to crack the most complex of
control problems- thanks to Lotfi A. Zedah, who is regarded as the father of
Fuzzy Logic.

Dept. of AEI 21 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

ACKNOWLEDGEMENT

I extend my sincere gratitude towards Prof . P.Sukumaran Head of


Department for giving us his invaluable knowledge and wonderful technical
guidance

I express my thanks to Mr. Muhammed kutty our group tutor and


also to our staff advisor Ms. Biji Paul for their kind co-operation and
guidance for preparing and presenting this seminar.

I also thank all the other faculty members of AEI department and my
friends for their help and support.

Dept. of AEI 22 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

CONTENTS
1. INTRODUCTION 1
2. FUZZY CONTROL - The Basics 2
RULE BASE
INFERENCE MECHANISM
FUZZIFICATION INTERFACE
DEFUZZIFICATION INTERFACE
SELECTION OF INPUTS AND OUTPUTS
3. CRISP SETS Vs FUZZY SETS 4
CRISP SETS
FUZZY SETS AND MEMBERSHIP FUNCTIONS
4. PH CONTROL 6
FUZZIFICATION SECTION
RULE BASE
INFERENCE MECHANISM
DEFUZZIFICATION SECTION
PRACTICAL CONTROL CHARACTERISTICS
5. SUGAR PLANT WITH AND WITHOUT
AUTOMATIC pH CONTROL 13
MANUAL CONTROL
AUTOMATIC CONTROL
6. HARDWARE BLOCK DIAGRAM 15
PIC MICROCONTROLLER
INPUT UNITS
OUTPUT UNITS
USART AND MAX232
7. OTHER APPLICATIONS OF FUZZY LOGIC 16
8. MERITS OF FUZZY LOGIC CONTROLLER 17
9. DEMERITS OF FUZZY LOGIC CONTROLLER 17
10. CONCLUSION 18
11. BIBLIOGRAPHY 19

Dept. of AEI 23 MESCE Kuttippuram


Seminar Report’03 PH Control Technique using
Fuzzy Logic

Dept. of AEI 24 MESCE Kuttippuram

Вам также может понравиться