You are on page 1of 6

# Proceedings of 2015 International Conference on Fuzzy Theory and Its Applications (iFUZZY)

The Evergreen Resort Hotel (Jiaosi), Yilan, Taiwan, Nov. 18-20, 2015

## Design of Temperature Control System Using Conventional PID and

Intelligent Fuzzy Logic Controller
Jean Claude Mugisha, Bernard Munyazikwiye and Hamid Reza Karimi


Abstract In this paper, we present the design of temperature very effective at describing the complex nonlinear systems
control for industrial heat treating furnace by using Intelligent [3-5]. Other applications of fuzzy logic can be seen in [6-7].
Fuzzy Logic and PID controllers. Temperature control is
important in heating processes as it can disqualify materials in
terms of their physical properties when not well performed. II. FUZZY LOGIC CONTROLLER
Obviously PID temperature controller is the most used in
industries to control non-linear processes. Consequently, it has
The process of a fuzzy system has three steps.
been found that the output response from Fuzzy Logic is very
accurate in terms of overshoot and steady state error when Fuzzification, Rule Evaluation, and Defuzzification. In
compared to that of PID. Moreover, both temperature fuzzification, the input crisp values are transformed into
controllers are modeled and simulated using MATLAB degrees of membership in the fuzzy sets. The degree of
software. membership of each crisp value in each fuzzy set is
determined by plugging the value into the membership
KeywordsTemperature, Fuzzy Logic, PID, Controller, function associated with the fuzzy set.
Furnace.
In the rule evaluation step, each fuzzy rule is assigned
I. INTRODUCTION with a strength value. The strength is determined by the
degrees of memberships of the crisp input values in the fuzzy
Monitoring and control of the temperature is an sets of antecedent part of the fuzzy rule. The defuzzification
essential process in industries especially for those of stage transposes the fuzzy outputs into crisp values [8]. In
metallurgical ones. The process of heat treatment is carried this paper, a comparison between a conventional PID
out firstly by heating the metal after that cooling it in water, controller and Fuzzy logic controller of a furnace temperature
oil or air. Heat treatment is to enhance the transformation of is determined.
austenite to martensite i.e. (soft material to hard material), to
change the grain size, to modify the structure of the material
and relive the stress set up in the material [1]. A. Fuzzy logic toolbox

The processes involved in heat treatment demand the Fuzzy Logic Toolbox allows several things to be done,
stability of temperature inside the furnace in order to meet but the most important things are place where a fuzzy
uniform microstructure throughout the slab. Conventional inference system can be created or edited. These systems can
PID control technique has been utilized a long time ago to be created by using graphical tools or command-line
control processes and systems in industries. Its simplicity and functions. The fuzzy system that has been accessed to
low cost of design made it popular in earlier technological Simulink can be easily tested in a block diagram simulation
industries, but it is difficult to get the efficient control because environment. The toolbox also allows the stand-alone C
the PID gain setting is a challenging task. It is hard to control programs to be run without the need of Simulink [9]. This is
nonlinear processes with linear classic controllers. An made possible by a standalone Fuzzy Inference Engine that
interesting approach fuzzy logic controller is used to control reads the fuzzy systems saved from a MATLAB session [8].
nonlinear processes [2]. A number of publications can be Fuzzy Logic Toolbox, also known as Graphical User
found , where fuzzy logic is used for many applications. In Interface (GUI) tools are used to build and edit Fuzzy
general, among the available techniques used to model, Interface System (FIS). The five GUI tools for building,
analyze, control and design, the well-known TakagiSugeno editing and observing FIS are: Fuzzy Inference System (FIS)
(TS) fuzzy model approach has been recognized as being editor, Membership function editor, Rule editor, Rule viewer
and Surface viewer.

## Jean Mugisha is with the University of Rwanda, Rwanda (e-mail:

jmugisha23@gmail.com).
Bernard B. Munyazikwiye is with the Department of Engineering, Faculty of
Engineering and Science of the University of Agder, Grimstad, Norway
(e-mail: munybernard@gmail.com).
Hamid Reza Karimi is with the Department of Engineering, Faculty of
Engineering and Science of the University of Agder, Grimstad, Norway
(e-mail: hamid.r.karimi@uia.no).

## 978-1-4673-6570-3/15/\$31.00 2015 IEEE 50

D. Fuzzy Rules
In a Fuzzy Logic, a rule base is constructed to control the
output variable. A fuzzy rule is a simple IF-THEN rule with a
condition and a conclusion. The fuzzy rules determine the
link between the antecedent and the consequent fuzzy
variables, and are often defined using natural language
linguistic terms. For instance, a fuzzy rule can be if the
temperature is cold and the wind is strong then wear warm
clothes, where temperature and wind are antecedent fuzzy
variables, wear is a consequent fuzzy variable and cold,
strong and warm clothes are fuzzy sets [11].

## Fuzzification and defuzzification involve mapping the

Figure 1: Fuzzy Logic Toolbox [10] fuzzy variables of interest to "crisp" numbers used by the
control system. Fuzzification is the process of making a crisp
B. Fuzzy sets quantity fuzzy.
Fuzzification translates a numeric value for the input into a
The very basic notion of fuzzy systems is a fuzzy set. A linguistic value such as positive large, negative large, positive
fuzzy set is a set without a crisp. It can contain elements with small, negative small, zero,..with a membership grade.
only a partial degree of membership. In a fuzzy set, elements Defuzzification is to map fuzzy subsets of real numbers into
have their membership grade associated with them. For real numbers. In fuzzy inference system (FIS),
example set of HOT temperature is decide between 60< defuzzification is applied after aggregation [13].
TEMP< 80. If temperature is 60 degrees, then we say it does
not belong to HOT set but in fuzzy logic it belongs to the set III.PID CONTROLLER
but having membership grade 0. Similarly if temperature is
62 or 78 degrees, then it belongs to a fuzzy set with PID refers to the first letters of the names of the individual
membership grade 0.10 and 0.90 respectively [11]. This can terms that makeup the standard three-term controller. These
be done by allowing not only the (crisp) decision Yes/No, but are P for the proportional term, I for the integral term and D
also more flexible rules like fairly hot or cold. A fuzzy set for the derivative term. Three-term or PID controllers are
allows us to define such a notion. The aim in using fuzzy sets probably the most widely used industrial controller [14].The
is to make computers more intelligent. values of these three parameters interpreted in terms of time,
where,P depends on the present error, I on the
C. Membership Functions accumulation of past errors and D is a prediction of future
errors, based on current rate of change. By tuning the three
Implementation of membership function is vital in the parameters in the algorithm of PID controller, the controller
fuzzification and defuzzification steps of a Fuzzy Logic can provide control action designed for specific process
System in order to evaluate the non-fuzzy input values to requirements [15].The proportional, integral and derivative
fuzzy linguistic terms and vice-versa. A membership function terms are summed to calculate the output of the PID
is implemented to measure the linguistic term [11]. For any controller.
set X, a membership function on X is any function from X to de t
the real unit interval [0, 1]. The membership function which u t K P e t  Ki e t dt  K d [16] (1)
dt
represents a fuzzy set is usually denoted by A. For an
Where
element x of X, the value A(x) is called the membership
degree of x in the fuzzy set. The membership degree A(x) x K P proportional gain.
quantifies the grade of membership of the element x to the
fuzzy set. The value 0 means that x is not a member of the x K i integral gain.
fuzzy set; the value 1 means that x is fully a member of the x K d derivative gain.
fuzzy set. The values between 0 and 1 characterize fuzzy
members, which belong to the fuzzy set only partially [12]. x e Error present in the controller.

## A. Tuning of PID parameters

Tuning of a PID controller refers to the tuning of its
various parameters (P, I, D) to achieve an optimized value of
the desired response .The necessity of tuning of the parameter
of PID controller is very important. ZIEGLER-NICHOLS is

51
one of the mostly used tuning method of PID controller. Qi t is the heat input to the furnace (J/s)
Ziegler-Nichols proposed rules for determining the values of Qo t is the heat output from the furnace (J/s)
the proportional gain Kp, integral gain Ki and derivative gain
C is the thermal capacitance of the furnace (J/K)
Kd based on the transient response characteristics of a given
The heat output (removed) from the furnace is given by the
plant [17]. following expression:
TABLE 1: ZIEGLER - NICHOL'S TUNING RULES
To t  Ts t (3)
Qo t
R
Where
To t is the internal furnace temperature ( C)
o

o

## R is the thermal resistance of the walls.

 Therefore, the equation describing the dynamic behavior of
the furnace is obtained from replacing the equation (3) into
IV. METHODOLOGY equation (2):
dT
RQi t  Ts t To t  RC o (4)
The aim of this paper is to design a temperature control using dt
the intelligent fuzzy logic and conventional PID controllers. Assuming that RT Qi t  Ts t is equal to the variable T t will
Fuzzy logic toolbox (package of MATLAB) was used in the give us the open loop transfer function:
design of both controllers and the respective results were
shown. The collection of data was based on temperature To s 1 (5)
behavior in heating chamber of the furnace with respect to
T s 1  RCS
time and determining proper dimension of that chamber as
The transfer function of the fuel-air mixture control valve and
well as characteristics of furnace accessories like burner and
burner is given by:
valves which has been utilized in design processes. Three
dW i
variables namely error and error variation (inputs) of the Q t  Q t P t K K
i i v b
(6)
dt
temperature and energy supplied (output) to the heating
system (burner) have been used while designing Fuzzy Logic
(From RQi t  Ts t T t , Ts t is negligible,
Temperature Controller whereas PID controller had therefore Q t T t )
i
temperature error as input and energy supplied to the heating R
T t dW i
system as output. 1 P t K v K b
R dt
T s RK v K b (7)
V. FUZZY LOGIC TEMPERATURE P s W i s  1
CONTROLLER Where
3
K v is the valve constant ( m / sV )
To control temperature in the furnace, we have three 3
Kb is the burner constant ( Ws / m )
variables which are Error ( e ), Error variation ( 'e ) as inputs
and increase energy supplied to the heating system as output P s is the pressure of Air-fuel mixture.

variable. Mamdani based fuzzy inference system is used and By multiplying equation (5) and (7) we get the overall
it uses linear membership function for both inputs and output- dynamics equation of the system.
. Triangular membership functions are used for both input
To s T s RK v K b (8)
and output variables. G s *
T s P s 1  RCS 1  W i s
A. Mathematical model of the furnace 339.64
G s
106365s 2  7106 s  1
Considering a single heating chamber of the fuel fired
furnace with an oil-air mixture burner to heat the chamber,
the temperature and heat inside the chamber zone ultimately
managed by controlling fuel (oil) and air flow from the
external sources to the burner.
By applying the principal of energy balance:

## dTo [18] (2)

C Qi t  Qo t
dt
Where

52
TABLE 2: FURNACE ACCESSORIES' PARAMETERS C. Fuzzy Membership Functions for Outputs


B. Fuzzification of Input Figure 4: Triangular MF of Energy supplied (u) output

## x VHP: Very High Positive

x HP: High Positive
x MP: Medium Positive
x SP: Small Positive
x ZE: Zero
x SN: Small Negative
x MN: Medium Negative
x HN: High Negative.
x VHN: Very High Negative

## Figure 5: Rule viewer


Figure 6: Surface Viewer

## E. Simulation and Results

Figure 2: Triangular MF of Error (e) input

## The system was modeled and simulated using

Matlab/Simulink. The fuzzy logic inference system for the
fuzzy logic temperature controller contains a set of fuzzy
logic rules that define the behavior of the system in relation
between the error signal, error derivative signal and the
control signal of the controller.

## Figure 3: Triangular MF of Error Variation (e) input

53
Figure 8: Output response of conventional PID temperature
controller
Figure 7: Controlled with step input and uncontrolled plant
B. Results and discussion
The figure 7 shows the dynamic behavior of controlled (red) The PID parameters (signals) was calculated using
alongside with the uncontrolled (green) plant. Ziegler-Nichols tuning methods, these signals are fed into
PID simulation block and yield an output signal of the
It also shows the controlled response with step input of
controller as figure 8 shows.
1200oC, the dynamic behavior of the controlled plant shows
that there is no overshoot and steady state error in the plant VII. CONCLUSION
and in addition to that the settling time and rise time are
considerably small. In this paper we have been dealing with design of
VI. PID TEMPERATURE CONTROLLER temperature controller using the conventional PID controller
and intelligent Fuzzy Logic Controller. Both FLC and PID
A. Tuning of PID controller controllers were designed and implemented in
Generally tuning a system means adjusting it so that it can The intelligent FLC was performed using fuzzy inference
be suitable in a particular situation. Tuning a PID controller is system of Mamdani type. The PID controller was tuned using
the adjustment of its control parameters to the optimum values Ziegler-Nichols tuning method. For response of PID
in order to achieve the desired control response. In this paper, controller, it has been mentioned that the rise time and settling
we have used the Ziegler-Nichols tuning method. Basing on time are short when compared to those of fuzzy logic
table 1 which shows the Ziegler-Nichols tuning rules we first response where the signal from Fuzzy logic possess 0%
have to find out the ultimate gain ( K u ) and the ultimate overshoot and zero steady state error. This implies that, for
PID the reduction of both rise and settling times makes the
period( Tu ).The transfer function (T.F) will be: response to oscillate a bit around the step input and the
KG s (9)
TF
1  KG s H s
Where H s is the unit feedback TABLE 4: DYNAMIC CHARACTERISTIC OF BOTH FLC AND
PID
339.64 K u
TF
106365s  7106s  1  339.64 K u
2

## 1 . Then we proceeded with finding the natural

Ku
339.64
frequency Z . 106365 s 2  1  K 0  106365Z 2  2 0.
u
339.64 339.64
Z . , 2S ,
The reduction of rising time as well as settling time is
0.0043362631 07 rad / sec Z 2Sf Tu
Z necessary to get an outstanding performance of the controller
Tu 1448.251604 but this effect results the overshoot and steady state error, the
remedy of this should be the integration of fuzzy logic
Kp 0.001766576375 Ki 0.0000024395 98714 , techniques because it is a type of logic controller which will
successfully eliminate the whole overshoot and steady state
Kd 0.319805883
error from the output response. This is recommended for
further future works.

54
[10] Basu, Srismrita, "Realization of Fuzzy Logic Temperature Controller,"
International Journal of Emerging Technology and Advanced
Engineering, vol. 2, no. 6, June 2012).
[11] P.Singhala, D.N.Shah, B.Patel., "Temperature Control Using Fuzzy
Logic.," International Journal of Instrumentation and Control Systems
(IJJCS), vol. 4, no. 1, January 2014.
[12] Omar Adil M. Ali, Aous Y. Ali,Balasem Salem Sumait, "Comparison
between the Effects of Different Types of Membership Functions on
Fuzzy Logic Controller Performance," International Journal of
Emerging Engineering Research and Technology, vol. 3, no. 3,
pp.76-83, March,2015.
[13] Abraham, Eshetie Berhan and Ajith, "Hierarchical Fuzzy Logic
Figure 9: Simulink block diagram of FLTC together with PID System for Manuscript Evaluation.," Middle- East Journal of Scientific
Temperature Controller. Research, 2014.
14] Soniya Kocher, Dr. A.K. Kori, "PID Based Temperature Control of a
Plant Heat Exchanger System," International Journal of Novel
Research in Electrical and Mechanical Engineering, vol. 2, no. 2, pp.
43-47, May-August,2015.
[15] Ajanta Ganguly, Abinash Banerjee Lane, Shibpur, Howrah, "Design of
Tuning Methods of PID Controller Using Fuzzy Logic.," International
Journal of Emerging trends in Engineering and Development, vol. 5, no.
3, September, 2013.
[16] K.A Akpado, C.O Ezeagwu, A. Ejiofor, A.O Nwokeke, "Design,
Modeling and Simulation of a Microcontroller Based Temperature
Control in a Ventilation System," International Journal of Advanced
Research in Electrical, Electronics and Instrumentation Engineering,
vol. 2, no. 7, July 2013.
[17] Ajanta Ganguly, Abinash Banerjee Lane, Shibpur, Howrah, "Design of
Tuning Methods of PID Controller Using Fuzzy Logic.," International
Journal of Emerging trends in Engineering and Development, vol. 5, no.
3, September, 2013.
on direct gas-fired oven.," Int. Journal of Engineering Research and
Applications, vol. 4, no. 3, pp. 01-09, March 2014.

## Figure 10: Output responses of FLTC together with PID

Temperature Controllers.

REFERENCES
[1] MI Aye Su Khaing,Lu Hong, "Research on the Precision Straightening
Stroke of SAE 52100 Steel in Different Heat Treatments," American
Journal of Mechanical Engineering,, vol. 2, no. 2, pp. 41-46, 2014.
[2] Ashish Singh Thakur, Himmat Singh, Sulochana Wadhwani,
"Designing of Fuzzy Logic Controller for Liquid Level Controlling,"
International Journal of u- and e- Service, Science and Technology, vol.
8, no. 6, pp. 267-276, 2015.
[3] S. Bououden, M. Chadli, H. R. Karimi, An Ant colony
Optimization-based Fuzzy Predictive Control Approach for
Nonlinear Processes, Information Sciences 299 (2015) pp 143-158.

## [4] S. Bououden, M. Chadli, H.R. Karimi, Control of Uncertain Highly

Nonlinear Biological Process Based on Takagi-Sugeno Fuzzy Models,
Signal Processing, 108, 195-205, 2015,
DOI.10.1016/j.sigpro.2014.09.011.
[5] Huanqing Wang, Xiaping Liu, Kefu Liu, Hamid Reza Karimi,
Approximation-Based Adaptive Fuzzy Tracking Control for a Class of
Non-Strict-Feedback Stochastic Nonlinear Time- Delay Systems,
IEEE Trans. Fuzzy Systems, DOI: 10.1109/TFUZZ.2014.2375917
[6] BQ Sun, H Guo, HR Karimi, Y Ge, S Xiong, Prediction of stock index
futures prices based on fuzzy sets and multivariate fuzzy time series,
Neurocomputing, 151, 1528-1536, 2015.
[7] Y Kao, L Shi, J Xie, HR Karimi, Global exponential stability of delayed
Markovian jump fuzzy cellular neural networks with generally
incomplete transition probability, Neural Networks, Volume 63,
March 2015, Pages 18-30.
[8] Hassan, Mostaque Md.Morshedur, "Current Studies on Intrusion
Detection System, Genetic Algorithm and Fuzzy Logic," International
Journal of distributed and parallel systems (IJDPS), vol. 4, no. 2,
March, 2013.
[9] Mathworks, Fuzzy Logic Toolbox. User's guide, Mathworks, 2014.

55