online tuning of fuzzy logic controller using kalman algorithm for ... · tuning of fuzzy logic...

12
Available online at www.sciencedirect.com Journal of Applied Research and Technology www.jart.ccadet.unam.mx Journal of Applied Research and Technology 15 (2017) 492–503 Original Online tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan , P. Aarthy Department of EIE, Bannari Amman Institute of Technology, Sathyamangalam, India Received 8 September 2016; accepted 24 May 2017 Available online 7 November 2017 Abstract In a non-linear process like conical tank system, controlling the liquid level was carried out by proportional integral derivative (PID) controller. But then it does not provide an accurate result. So in order to obtain accurate and effective response, intelligence is added into the system by using fuzzy logic controller (FLC). FLC which helps in maintaining the liquid level in a conical tank has been developed and applied to various fields. The result acquired using FLC will be more precise when compared to PID controller. But FLC cannot adapt a wide range of working environments and also there is no systematic method to design the membership functions (MFs) for inputs and outputs of a fuzzy system. So an adaptive algorithm called Kalman algorithm which employs fuzzy logic rules is used to adapt the Kalman filter to accommodate changes in the system parameters. The Kalman algorithm which employs fuzzy logic rules adjust the controller parameters automatically during the operation process of a system and controller is used to reduce the error in noisy environments. This technique is applied in a conical tank system. Simulations and results show that this method is effective for using fuzzy controller. © 2017 Universidad Nacional Autónoma de México, Centro de Ciencias Aplicadas y Desarrollo Tecnológico. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). Keywords: Fuzzy logic controller; Proportional integral derivative controller; Kalman algorithm; Matlab 1. Introduction In all process industries measurements of level, temperature, pressure and flow parameters are very vital. Real time systems provide many challenging control problems due to their dynamic behavior, uncertainty and time varying parameters, constraints on manipulated variables, dead time on input and measurements, interaction between manipulated and controlled variables and unmeasured frequent disturbances. Because of the inherent non- linearity, most of the chemical process industries are in need of modern control techniques. Nonlinear systems like conical tanks find wide applications in gas plants and petrochemical industries. They are preferred because of the advantages like better disposal of solids, easy mixing and complete drainage of solvents such as viscous liquids in industries. In conical tank non-linearity exists Corresponding author. E-mail addresses: [email protected] (G.M. Tamilselvan), [email protected] (P. Aarthy). Peer Review under the responsibility of Universidad Nacional Autónoma de México. due to its variation in cross-sectional area. Because of the non- linearity, level control is a challenging task in conical tank and its demands for implementation in real time. The nonlinearities also exists due to the saturation-type introduced by maximum or minimum allowed level in tanks, valve geometry, flow dynamics, pumps and valves. The most basic and pervasive control algo- rithm used in the feedback control is the proportional, integral and derivative (PID) control algorithm. PID control is a widely used control strategy to control most of the industrial automa- tion processes because of its remarkable efficiency, simplicity of implementation and broad applicability. The long history of its practical use and proficient working dynamics are some of the pivotal reasons behind the large acceptance of the PID con- trol. A PID controller attempts to correct the error between a measured process variable and a desired set point by calculat- ing and then providing a corrective action that can adjust the process accordingly. In this paper, the modeling of the system, calibration of various transmitters associated with the conical tank system, tuning of PID parameters for the level control of a conical tank setup is considered. The open loop test is performed to obtain process reaction curve and mathematical model of the http://dx.doi.org/10.1016/j.jart.2017.05.004 1665-6423/© 2017 Universidad Nacional Autónoma de México, Centro de Ciencias Aplicadas y Desarrollo Tecnológico. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).

Upload: others

Post on 31-May-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

A

BfracTat©t

K

1

ppboiulmfiTov

a

M

1C

Available online at www.sciencedirect.com

Journal of Applied Researchand Technology

www.jart.ccadet.unam.mxJournal of Applied Research and Technology 15 (2017) 492–503

Original

Online tuning of fuzzy logic controller using Kalman algorithmfor conical tank systemG.M. Tamilselvan ∗, P. Aarthy

Department of EIE, Bannari Amman Institute of Technology, Sathyamangalam, India

Received 8 September 2016; accepted 24 May 2017Available online 7 November 2017

bstract

In a non-linear process like conical tank system, controlling the liquid level was carried out by proportional integral derivative (PID) controller.ut then it does not provide an accurate result. So in order to obtain accurate and effective response, intelligence is added into the system by using

uzzy logic controller (FLC). FLC which helps in maintaining the liquid level in a conical tank has been developed and applied to various fields. Theesult acquired using FLC will be more precise when compared to PID controller. But FLC cannot adapt a wide range of working environments andlso there is no systematic method to design the membership functions (MFs) for inputs and outputs of a fuzzy system. So an adaptive algorithmalled Kalman algorithm which employs fuzzy logic rules is used to adapt the Kalman filter to accommodate changes in the system parameters.he Kalman algorithm which employs fuzzy logic rules adjust the controller parameters automatically during the operation process of a system

nd controller is used to reduce the error in noisy environments. This technique is applied in a conical tank system. Simulations and results showhat this method is effective for using fuzzy controller.

2017 Universidad Nacional Autónoma de México, Centro de Ciencias Aplicadas y Desarrollo Tecnológico. This is an open access article underhe CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).

alma

dliamprautoittmi

eywords: Fuzzy logic controller; Proportional integral derivative controller; K

. Introduction

In all process industries measurements of level, temperature,ressure and flow parameters are very vital. Real time systemsrovide many challenging control problems due to their dynamicehavior, uncertainty and time varying parameters, constraintsn manipulated variables, dead time on input and measurements,nteraction between manipulated and controlled variables andnmeasured frequent disturbances. Because of the inherent non-inearity, most of the chemical process industries are in need of

odern control techniques. Nonlinear systems like conical tanksnd wide applications in gas plants and petrochemical industries.hey are preferred because of the advantages like better disposalf solids, easy mixing and complete drainage of solvents such asiscous liquids in industries. In conical tank non-linearity exists

∗ Corresponding author.E-mail addresses: [email protected] (G.M. Tamilselvan),

[email protected] (P. Aarthy).Peer Review under the responsibility of Universidad Nacional Autónoma de

éxico.

pctct

http://dx.doi.org/10.1016/j.jart.2017.05.004665-6423/© 2017 Universidad Nacional Autónoma de México, Centro de CienciasC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).

n algorithm; Matlab

ue to its variation in cross-sectional area. Because of the non-inearity, level control is a challenging task in conical tank andts demands for implementation in real time. The nonlinearitieslso exists due to the saturation-type introduced by maximum orinimum allowed level in tanks, valve geometry, flow dynamics,

umps and valves. The most basic and pervasive control algo-ithm used in the feedback control is the proportional, integralnd derivative (PID) control algorithm. PID control is a widelysed control strategy to control most of the industrial automa-ion processes because of its remarkable efficiency, simplicityf implementation and broad applicability. The long history ofts practical use and proficient working dynamics are some ofhe pivotal reasons behind the large acceptance of the PID con-rol. A PID controller attempts to correct the error between a

easured process variable and a desired set point by calculat-ng and then providing a corrective action that can adjust therocess accordingly. In this paper, the modeling of the system,alibration of various transmitters associated with the conical

ank system, tuning of PID parameters for the level control of aonical tank setup is considered. The open loop test is performedo obtain process reaction curve and mathematical model of the

Aplicadas y Desarrollo Tecnológico. This is an open access article under the

Page 2: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

lied R

pPwsmpoTr(litotevFootoilu

cchl

ufitm

hbdmefdd

tciriit

aii

wwcii

teTslptmc

spfbft

ionfi

rtsaulfie

osoKIistKapp

ct

G.M. Tamilselvan, P. Aarthy / Journal of App

rocess. Based on the mathematical model, gain tuning of theID controller is done using the Cohen Coon tuning methodhich is implemented in the real time system to get optimum

ettling time and rise time. Fuzzy control, an intelligent controlethod imitating the logical thinking of human and being inde-

endent on an accurate mathematical model of the controlledbject, can overcome some shortcomings of the traditional PID.he controller designed using fuzzy logic implements human

easoning that has been programmed into fuzzy logic languagemembership functions, rules and the rules interpretation). Fuzzyogic is a form of many values logic which deals with reason-ng that is approximate rather than fixed and exact. Comparedo traditional binary sets (where variables may take on truer false values), fuzzy logic variables may have a truth valuehat ranges in degree between 0 and 1. Fuzzy logic has beenxtended to handle the concept of partial truth, where the truthalues may range between completely true and completely false.uzzy logic has been applied to many fields from control the-ry to artificial intelligence. Fuzzy logic has rapidly becomene of the most successful technologies for developing sophis-icated control systems. It is interesting to note that the successf fuzzy logic control is largely due to the awareness to its manyndustrial applications. But the fuzzy algorithm cannot adapt forarge range of working environments. So Kalman algorithm issed.

Some related researches study this problem of tuning PIDontrollers. Models enable predictions about how a process willhange when perturbed or modified. Many different approachesave been proposed for using local models to approximate non-inear systems.

Ahn and Truong (2009) presented a novel online methodsing a robust extended Kalman filter to optimize a Mamdaniuzzy PID controller. The robust extended Kalman filter (REKF)s used to adjust the controller parameters automatically duringhe operation process of any system applying the controller to

inimize the control error.Alleyne, Lui, and Wright (1998) presented a new kind of

ydraulic load simulator for conducting performance and sta-ility tests for control forces of hydraulic hybrid systems. In theynamic loading process, disturbance makes the control perfor-ance (such as stability, frequency response, loading sensitivity,

tc.) decrease or turn bad. In order to improve the control per-ormance of a loading system and to eliminate or reduce theisturbance, an online self-tuning fuzzy proportional-integral-erivative (PID) controller is designed.

Sakthivel, Anandhi, and Natarajan (2011) designed a realime fuzzy logic controller based on Mamdani type model forontrolling the liquid level in a spherical tank. Since the processs non-linear, the model is designed at three different operatingegions (at level 30 cm, 45 cm, and 60 cm). The process models experimentally determined from step response analysis and isnterfaced to spherical tank in real time using VAMT-01 modulehrough MATLAB.

Cheng, Zhong, Li, and Xu (1996) designed a high-accuracynd high-resolution fuzzy controller to stabilize a double-nverted pendulum at an upright position successfully. A newdea of dealing with multivariate systems is described.

sutg

esearch and Technology 15 (2017) 492–503 493

Fukami, Mizumoto, and Tanaka (1980) proposed a methodhich involves an inference rule and a conditional propositionhich contains fuzzy concepts. And also pointed out that the

onsequence inferred by their methods does not always fit ourntuitions and suggested the improved methods which fit ourntuitions under several criteria.

Garcia-Benitez, Yurkovich, and Passino (1993) proposed awo level hierarchical control strategy to achieve an accuratendpoint position of a planar two-link flexible manipulator.he upper level consists of a feedforward rule-based supervi-ory controller that incorporates fuzzy logic, whereas the lowerevel consists of conventional controllers that combine shaftosition-endpoint acceleration feedback for disturbance rejec-ion properties and shaping of the (joint) actuator inputs to

inimize the energy transferred to the flexible modes duringommanded movements.

Guo, Zhou, and Cui (2004) introduced a hybrid fuzzy controlystem of the furnace. Applied the fuzzy control strategy to shorteriod prediction of the furnace temperature and Combininguzzy control with PID control, the heavy oil flux is achievedy using the on-line self-adjusting capability of the harmoniousactor. And the self-optimization fuzzy control of the ratio of airo fuel becomes realized.

Jwo and Wang (2007) used the traditional approach for select-ng the softening factors heavily relies on personal experiencer computer simulation. In order to resolve this shortcoming, aovel scheme called the adaptive fuzzy strong tracking Kalmanlter (AFSTKF) is carried out.

Kobayashi, Cheok, and Watanabe (1995) described a fuzzyule-based Kalman filtering technique which employs an addi-ional accelerometer to complement the wheel-based speedensor, and produce an accurate estimation of the true speed of

vehicle. The Kalman filters are used to deal with the noise andncertainties in the speed and acceleration models, and fuzzyogic to tune the covariances and reset the initialization of thelter according to slip conditions detected and measurement-stimation condition.

Kwon (2006) suggested a robust Kalman filtering methodf adopting a perturbation estimation process which is to recon-truct total uncertainty with respect to the nominal state equationf a physical system. The predictor and corrector of the discretealman filter are reformulated with the perturbation estimator.

n succession, the state and perturbation estimation error dynam-cs and the covariance propagation equations are derived. In theequel, the recursive algorithm of combined discrete Kalman fil-er and perturbation estimator is obtained. The proposed robustalman filter has the property of integrating innovations and the

daptive capability of the time-varying uncertainties. An exam-le of application to a mobile robot is shown to validate theerformance of the proposed scheme.

Wang and Yuan (2012) developed a self-tuning fuzzy PIDontrol method of grate cooler pressure based on Kalman filtero overcome the frequent varying working condition and worse

ignal-to-noise radio of pressure signals. Based on dynamic sim-lation and characteristics analysis of the clinker cooling system,he system variables were determined, then the control model ofrate cooler was obtained by system identification.
Page 3: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

4 lied R

wsa

tPttif

ittaptatptriiK

2

oticctflpaple(rhT

6m2Tcali

Eo

3

3

f(mam

G

K

G

f

3

t

4

pnipTd

stFt

94 G.M. Tamilselvan, P. Aarthy / Journal of App

Gaeid (2013), designed an appropriate Kalman filter (KF)ith optimal gain as well as the two degree of freedom compen-

ator for the DC motor and verified the stability of the proposedlgorithm and the noise sensitivity.

Muniandy, Samin, and Jamaluddin (2015) explains howhe derivative kick problem arises due to the nature of theID controller as well as the conventional fuzzy PID con-

roller in association with an AARB. The authors proposedwo types of controllers: self-tuning fuzzy proportional-ntegral–proportional-derivative (STF PI–PD) and PI–PD-typeuzzy controller.

The Kalman filter provides an effective means of estimat-ng the state of a system from noisy measurements, given thathe system parameters are completely specified. The innova-ions sequence for a properly specified Kalman filter will be

zero-mean white noise process. However, when the systemarameters change with time, the Kalman filter has to be adaptedo compensate for the changes. Traditionally, this has beenccomplished by using nonlinear filtering, parallel Kalman fil-ering and covariance matching techniques. These methods haveroduced good results at the expense of large amounts of compu-ational time. An adaptive algorithm which employs fuzzy logicules is used to adapt the Kalman filter to accommodate changesn the system parameters. The adaptive algorithm examines thennovations sequence and makes the appropriate changes in thealman filter model.

. Conical tank setup

The real time system consists of one input (inflow) and oneutput (level of the tank). The inflow is taken from a reservoirank through a centrifugal pump with single phase motor. Thenlet pipe has a Rota meter, Electromagnetic type flow meteralled as flow transmitter (FT1), air-to-open type pneumaticontrol valve (CV) and a hand valve to monitor and controlhe flow rate. The outlet has a hand valve, Electromagnetic typeow meter called as flow transmitter (FT2) and air-to-open typeneumatic CV. The tank level is measured using a DPT, calleds level transmitter (LT). The level in the tank is directly pro-ortional to the pressure created by liquid in it. LT measures theevel by measuring pressure at bottom of the tank with refer-nce to the atmosphere and coverts into an electrical quantity4–20 mA). The LT is energized with 24 V DC source and lowerange value (LRV) and upper range value (URV) are set using aighway addressable remote transducer (HART) communicator.he layout of the conical tank setup is shown in Fig. 1.

The system is interfaced to the computer through NI USB211 data acquisition card (NI DAQ) and it can handle a maxi-um of 10 V, so the DPT outputs (4–20 mA) are converted into

–10 V using a 500 � resistances and scaled up using LabView.he controller signals (0–10 V) from computer via NI DAQ are

onverted into 4–20 mA using a voltage to current convertornd given to current to pressure (E/P) convertor. The pneumaticine from the compressor is connected to an air regulator andts output is given as constant inputs (20 psi) for two different

aalt

esearch and Technology 15 (2017) 492–503

/P converters. The CVs are operated based on the pneumaticutputs from E/Ps.

. Estimation of transfer function and PID gain

.1. Transfer function for the system

The open loop response is plotted and the values obtainedrom the plot like percentage change in level (Q %), delay timetd), the time taken by the level are used for getting mathematicalodel of the conical tank. The model of first order process is

s in Eq. (1). The first order process with time delay (FOPTD)odel is,

(s) = Kpe−tds

τs + 1(1)

Time constant τ = 960 s.

p = % change in output

% change in input= Q

P= 64.08

(s) = 64.08 e−11s

960s + 1(2)

Eq. (2) indicated above is the obtained mathematical modelor the entire operating range of the conical tank system.

.2. PID gains for the system

The proportional gain, integral gain and derivative gains forhe system is as in Eqs. (3)–(5).

Proportional gain, Kc = 1

K

τ

τd

(4

3+ τd

4τd

)(3)

Integral gain, τI = τd

32 + 6(τd /τ)

13 + 8(τd /τ)(4)

Derivative gain, τD = τd

4

11 + 2(τd /τ)(5)

. Fuzzy controller

Fuzzy control has been widely used in industrial controls,articularly in situations where conventional control design tech-iques have been difficult to apply. Number of fuzzy rules is verymportant for real time fuzzy control applications. This paperroposes a novel approach called block based fuzzy controllers.his study is motivated by the increasing need in the industry toesign highly reliable, efficient and low complexity controllers.

The proposed block based fuzzy controller is constructed byeveral fuzzy controllers with less fuzzy rules to carry out con-rol tasks. The fuzzy logic controller involves four main stages:uzzification, rule base, inference mechanism and defuzzifica-

ion. For the systems where the physical modeling is difficult

nd information regarding the model is inadequate for applyingny control action, Fuzzy logic actions are applied over it. Fuzzyogic systems are based on logical reasoning along with abilityo fuzzify any system which helps in easy implementation. In
Page 4: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

G.M. Tamilselvan, P. Aarthy / Journal of Applied Research and Technology 15 (2017) 492–503 495

f conical tank system.

mtpmFsbc|otnf

Teimocbrfn

Data base

(Known states andderived information)

(Quantitative knowledgeand heuristics)

Inference (composition)

PlantQuantizer

Referenceinput

∆ Error

Error

Error

Fuzzy rule base

DefuzzificationFuzzification

Fig. 2. Structure of typical FLC.

Fig. 1. Layout o

any industrial processes, fuzzy logic controllers are used dueo which takes the control action like human and the controllingrocess is simple once it is designed. Mainly FLC are imple-ented on non-linear systems which yield for better results.or designing the controller number of parameters needs to beelected and then Membership Function and rules are selectedased on heuristic knowledge. There are two inputs to the fuzzyontrollers: absolute error |e(t)| and absolute derivative of errorde(t)|. The ranges of these inputs are from 0 to 1, which arebtained from the absolute values of system error and its deriva-ive through scale factors chosen from the specification of theonlinear system. For each input variable, triangle membershipunctions (MFs) are requested to use.

In practice, fuzzy control is applied using local inferences.hat means each rule is inferred, and the results of the infer-nces of individual rules are then aggregated. The most commonnference methods are: the max–min method, the max–productethod and the sum–product method, where the aggregation

perator is denoted by either max or sum, and the fuzzy impli-ation operator is denoted by either min or prod. Fig. 2 shows theasic fuzzy structure. Especially the max–min calculus of fuzzy

elations offers a computationally nice and expressive settingor constraint propagation. Finally, a defuzzification method iseeded to obtain a crisp output from the aggregated fuzzy result.
Page 5: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

4 lied Research and Technology 15 (2017) 492–503

Pawniiffd

4

loaAtte

4

ti

mpaet

F(

96 G.M. Tamilselvan, P. Aarthy / Journal of App

opular defuzzification methods include maximum matchingnd centroid defuzzification. The centroid defuzzification isidely used for fuzzy control problems where a crisp output iseeded, and maximum matching is often used for pattern match-ng problems where we need to know the output class. Hence,n this study, the fuzzy reasoning results of outputs are gainedrom aggregation operation of fuzzy sets of inputs and designeduzzy rules, where max–min aggregation method and centroidefuzzification method are used.

.1. FIS editor

Two inputs are defined for the fuzzy controller. One is theevel of the liquid in the tank denoted as “level” and the otherne is the rate of change of liquid level in the tank denoteds “rate”. Both of these inputs are applied to the rule editor.ccording to the rules written in the rule Editor the controller

akes the action and governs the opening of the valve which ishe output of the controller and is denoted by “valve”. The FISditor is shown in Fig. 3.

.2. Membership function editor

The membership function editor shares some features withhe FIS editor. In fact, all of the five basic GUI tools have sim-lar menu options, status lines and help and close buttons. The

iaFo

ig. 4. (a) Membership editing of the first input variable. (b) Membership editing ofd) Membership editing of the second output variable.

Fig. 3. FIS editor.

embership editor shown in Fig. 4 is the tool that lets you dis-lay and edits all of the membership functions associated withll of the input and output variables for the entire fuzzy infer-nce system. When you open the membership function editoro work on a fuzzy inference system that does not already existn the workspace, there are not yet any membership functions

ssociated with the variables that you have just defined by theIS editor. The membership editing is done for every input andutput variables. For the first input variable named error, the

the second input variable. (c) Membership editing of the first output variable.

Page 6: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

G.M. Tamilselvan, P. Aarthy / Journal of Applied Research and Technology 15 (2017) 492–503 497

Table 1Rule table.

Error RCE

HN MN SN ZERO SP MP HP

HN Kp = decKi = dec

Kp = decKi = med

Kp = decKi = inc

Kp = decKi = dec

Kp = decKi = inc

Kp = decKi = med

Kp = decKi = dec

MN Kp = medKi = med

Kp = medKi = med

Kp = medKi = inc

Kp = decKi = inc

Kp = decKi = inc

Kp = decKi = inc

Kp = decKi = inc

SN Kp = decKi = dec

Kp = decKi = med

Kp = decKi = inc

Kp = decKi = med

Kp = decKi = inc

Kp = decKi = med

Kp = decKi = inc

ZERO Kp = medKi = dec

Kp = medKi = med

Kp = medKi = inc

Kp = medKi = med

Kp = medKi = inc

Kp = medKi = med

Kp = medKi = med

SP Kp = decKi = dec

Kp = incKi = inc

Kp = medKi = med

Kp = medKi = med

Kp = medKi = med

Kp = medKi = med

Kp = decKi = dec

MP Kp = medKi = dec

Kp = incKi = inc

Kp = incKi = inc

Kp = incKi = dec

Kp = incKi = inc

Kp = medKi = med

Kp = incKi = med

HP Kp = incKi = dec

Kp = incKi = med

Kp = incKi = inc

Kp = medKi = med

Kp = incKi = med

Kp = incKi = med

Kp = incKi = inc

inc, increase; dec, decrease; med, medium.

reton0oapc

4

eoSfossiTsbT

tpFHFtFo

aautudmPtv

dctofss

5

suabeev

ange for the input variable is from −7 to +51. The membershipditing for the second input variable named rce ranges from −15o +15. Similarly the membership editing carried out for the firstutput variable ranges from 0 to 2 for the first output variableamed Kp. The second output variable named Ki range is from

to 0.6. For the level control of conical tank process, input andutput membership functions are designed as shown in Fig. 4nd both inputs and outputs consist of seven functions. The out-ut variables from FLC Kp and Ki will be used to tune the PIDontroller for better performance.

.3. Rule viewer

The rule viewer allows you to interpret the entire fuzzy infer-nce process at once. The rule viewer also shows how the shapef certain membership functions influences the overall result.ince it plots every part of every rule, it can become unwieldyor particularly large systems, but for a relatively small numberf inputs and outputs it performs well (depending on how muchcreen space you devote to it) with up to 49 rules. The rule viewerhows one calculation at a time and in great detail. In this sense,t presents a sort of micro view of the fuzzy inference system.o observe the entire output surface of the system and the entirepan of the output set, based on the entire span of the input set,y open up the surface viewer. The rules formed are shown inable 1.

Obtained FLC simulation results are plotted against withhat of conventional controller PID controller for comparisonurposes. The simulation results are obtained using a 49 ruleLC. Rules shown in the rule editor provide the control strategy.ere these rules are implemented in the above control system.

or comparison purposes, simulation plots include a conven-

ional PID controller and the fuzzy algorithm. As expected,LC provides good performance in terms of oscillations andvershoot in the absence of a prediction mechanism. The FLC

Kmms

lgorithm adapts quickly to longer time delays and provides stable response while the PID controllers, drives the systemnstable due to mismatch error generated by the inaccurateime delay parameter used in the plant model. From the sim-lations in the presence of unknown or possibly varying timeelay, the proposed FLC shows a significant improvement inaintaining performance and preserving stability over standardID method. To strictly limit the overshoot using Fuzzy con-

rol can achieve greater control effect. Fig. 5 shows the ruleiewer.

In this paper, liquid level is taken and MATLAB is used toesign a fuzzy control. Then we analyze the control effect andompare it with PID control. Especially it can give more atten-ion to various parameters such as the time of response, the errorf steadying and overshoot. Comparison of the control resultsrom these two systems indicated that the fuzzy logic controllerignificantly reduced steady state error. The surface viewer ishown in Fig. 6

.

. The Kalman algorithm

The need for accurate state estimates often arises in controlystems applications. The performance of a state estimator issually judged by two criteria. First, the estimator needs to beccurate. Therefore, the mean error should be as small as possi-le, ideally zero. The estimator also needs to provide a precisestimate of the current state. Therefore, the covariance of therror should be small. The optimal estimate based on the errorariance criterion is called the minimum variance estimate. The

alman filter provides an effective means of solving the mini-um variance estimation problem for a linear system with noisyeasurements linearly related to the states. A linear discrete

ystem can be described by the following set of equations.

Page 7: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

498 G.M. Tamilselvan, P. Aarthy / Journal of Applied Research and Technology 15 (2017) 492–503

Fig. 5. Rule viewer.

x

wR

y

wR

c

MeasurementInnovations sequence

Kalman gain

Correction

K K+1

Prediction

Initial conditions

Fig. 7. Block diagram of Kalman filter algorithm.

Fig. 6. Surface viewer.

System model

(k + 1) = Ax(k) + Ww(k) (6)

here w(k) is a zero mean white process noise with covariancew.

Measurement model

(k) = Cx(k) + v(k) (7)

here v(k) is a zero mean white process noise with covariancev.

The Kalman filter algorithm can be viewed as a predictororrector algorithm as shown in Fig. 7.

Page 8: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

G.M. Tamilselvan, P. Aarthy / Journal of Applied Research and Technology 15 (2017) 492–503 499

Table 2Properties of properly specified Kalman filter.

1 Innovations sequence is zero-mean.2 Innovations sequence is white.3 Innovations sequence is un correlated in time.4 Innovations sequence lies within the confidence interval

constructed from Re of the Kalman filter algorithm. Theinnovations sequence will have a normal distribution. Therefore,less than five percent of the innovations will be outside twoestimated standard deviations. The confidence interval is thenconstructed using the following equations.Upper limit = 2.0 sqrt (Re)Lower limit = −2.0 sqrt (Re)

5 The actual variance of the innovations sequence will be reasonablyclose to the estimated variance, Re.

6 The error estimation lies within the confidence limits constructedfrom the estimated error covariance, p̃, of the Kalman filteralgorithm. The estimation error will have a normal distribution.Therefore, less than five percent of the estimated errors will beoutside two estimated standard deviations. The confidence limitswill be constructed using the following equations.Upper limit = 2.0 sqrt( p̃)Lower limit = −2.0 sqrt( p̃)

7 The actual error variance is close to the estimated variance.

tcifiieteSiNlm

Koeospt

6

ldcmt

Initial conditions

Prediction

MeasurementK K+1 Innovations sequence

Correction

Gain

Fuzzy logic adaptivealgorithm

Fig. 8. Block diagram of fuzzy logic adaptive Kalman algorithm.

(staf

7

f

8

aiftoP

uaatrtr

The Kalman filter algorithm shown in Fig. 7 assumes thathe system state transition matrix, measurement model and theovariance’s of the plant and measurement noise are known. Thiss rarely the case in the real world. A properly specified Kalmanlter will have the properties given in Table 2. Adaptive filtering

s an online process of trying to identify unknown system param-ters based on the measurements and innovations sequence ashey occur in real time. The innovations sequence of a prop-rly specified Kalman filter should be a purely random process.everal techniques have been suggested for dealing with filter-

ng problems when the system contains unknown parameters.onlinear filtering has been successfully applied to the prob-

em of system identification (i.e. state transition matrix and/oreasurement model contain unknowns).As shown in Fig. 8, the proposed method uses the standard

alman filter equations and adapts the system parameters basedn the innovations sequence. The fuzzy logic adaptive algorithmxamines the innovations sequence and determines what typef change in model parameters is necessary to insure that theequence is a zero mean white process. A certain amount of ariori information about the system is necessary in constructinghe control rules for adapting the filter parameters.

. Simulink model of fuzzy and PID controller

Simulink is a Matlab toolbox designed for the dynamic simu-ation of linear and nonlinear systems as well as continuous andiscrete-time systems. It can also display information graphi-

ally. Matlab is an interactive package for numerical analysis,atrix computation, control system design, and linear sys-

em analysis and design available on most CAEN platforms

tti

Macintosh, PCs, Sun, and Hewlett-Packard). In addition to thetandard functions provided by Matlab, there exist a large set ofoolboxes, or collections of functions and procedures, availables part of the Matlab package. Fig. 9 shows the Simulink modelor fuzzy and PID controller.

. Simulink model of fuzzy with Kalman algorithm

The Simulink model of the Kalman algorithm along withuzzy controller and plant is as shown in Fig. 10.

. Results and discussion

The response obtained from the plant model by using FLCnd PID controller is as shown in Fig. 11. From the response,t can be clearly seen that the response obtained from theuzzy controller is more accurate and precise when comparedo conventional controller. Parameters like response time, peakvershoot, settling time are fast, less and accurate compared toID controller.

In this research work, the liquid level is taken and MATLAB issed to design a fuzzy control. Then we analyze the control effectnd compare it with PID control. Especially it can give morettention to various parameters such as the time of response,he error of steadying and overshoot. Comparison of the controlesults from these two systems indicated that the fuzzy logic con-roller significantly reduced steady state error. Even though theesponse of the fuzziness is more accurate and precise than PID,

he plant is still sensible to external noise. In order to removehat noise and make the system change its parameters accord-ngly, Kalman algorithm is used here. Kalman algorithm is used
Page 9: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

500 G.M. Tamilselvan, P. Aarthy / Journal of Applied Research and Technology 15 (2017) 492–503

Mathfunction

Integrator Display

Scope2

Scope Scope1

Scope3

Scope4

Integrator1Mathfunction1

Step PID controller Transfer fon

Transfer fon1

Product

Display1

Product1Derivative

du/dt

Fuzzy logiccontroller

with ruleviewer

X

X

Transfer delay

Transfer delay1

64.08

64.08

980s+1

980s+1

+

++

+

-

-

PID(s)

1s

1s

u2

u2

Fig. 9. Fuzzy and PID simulink model.

100-99z-1

100z-99

0-2z+0.8

Discrete filter

Fuzzy logiccontroller

with ruleviewer

Discretetransfer fon

Transportdelay

ScopeStep

+- 1+-0.8z

-20.2z

-3

brfi

pmMNcw

80

20

10

0 100 200 400 500450350300250150

Time offset: 0

PID

FUZZY

500

30

40

50

60

70

Fig. 11. Response of fuzzy and PID controller.

Fig. 10. Simulink model of Kalman algorithm with fuzzy controller.

ecause of its ability to provide the quality of the estimate and itselatively low complexity. The result obtained by using Kalmanlter is as shown in Fig. 12

.Figs. 13 and 14 show the front panel and block diagram

anel of a LabView simulator of a level estimator. The fuzzyodel is developed using Matlab simulink. On the Simulinkodel toolbar, NORMAL simulation is changed as EXTER-

AL simulation. The simulation configuration parameters arehanged. Then the model is built. In LabView new VI is builtith the desired indicators and controls. The simulink model
Page 10: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

G.M. Tamilselvan, P. Aarthy / Journal of Applied R

atgNaDiWwabp

ctcpt

sliiotcsTt

Tttfc

9

tuipmpcptiPID design method in terms of oscillations produced and over-

Fig. 12. Response of fuzzy using Kalman algorithm.

nd Labview VI are saved in same location. In SIT Connec-ion manager the correct Simulink parameter is selected thatoes along with the LABVIEW LABEL and TYPE. Then theI DAQ and mappings are configured. This is where the input

nd output channels are selected. Select an input or output fromAQ CHANNELS that is being used. Select the correspond-

ng Simulink input/output from MODEL INPUTS/OUTPUTS.hen both boxes contain a highlighted item, select ADD. Thisill map the input/output. Make sure that all desired indicators

re present. Connect a wire from the SIGNALS input of thelock to the wire that goes into the desired indicator. Now therogram can be executed.

Fig. 15 shows the real time experimental setup of a coni-al tank process. The level process station was used to conducthe experiments and collect the data. The computer acts as a

ontroller. It consists of the software used to control the levelrocess station. The setup consists of a process tank, reservoirank, control valve, I to P converter, level sensor and pneumatic

scs

Fig. 13. LabView implement

esearch and Technology 15 (2017) 492–503 501

ignals from the compressor. When the set up is switched on,evel sensor senses the actual level values initially then signals converted to current signal in the range 4–20 mA. This signals then given to computer through data acquisition cord. Basedn the values entered in the controller settings and the set pointhe computer will take control action and the signal sent by theomputer is taken to the station again through the cord. Thisignal is then converted to pressure signal using I to P converter.hen the pressure signal acts on a control value which controls

he flow of water into the tank there by controlling the level.The servo response obtained from the real time conical tank

a experimental setup is shown in Fig. 16. The results showhe comparison of servo response by the FLC and PID con-roller with setpoint. From the response, it is apparent that theuzzy controller provides better results when compared to theonventional PID controller.

. Conclusions

Unlike some fuzzy controllers with hundreds or evenhousands of rules running on dedicated computer systems anique FLC using a small number of rules and straightforwardmplementation is proposed to solve a class of level controlroblems with unknown dynamics or variable time delays com-only found in industry. Additionally the FLC can be easily

rogrammed into many currently available industrial processontrollers. The FLC simulated on a level control problem withromising results can be applied to an entirely different indus-rial level controlling apparatus. The result shows significantmprovement in maintaining performance over the widely used

hoot. As seen from the graph the rise time in case of PIDontroller is less, but oscillations produced and overshoot andettling time is more. But in case of fuzzy logic controller,

ation of Kalman filter.

Page 11: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

502 G.M. Tamilselvan, P. Aarthy / Journal of Applied Research and Technology 15 (2017) 492–503

Fig. 14. Block diagram panel view of LabView simulator for level estimator.

Fig. 15. Conical tank experimental setup.

00 300 400200

Set point

Fuzzy

PID

Process time in seconds

Tank

leve

l in

mm

100

20

40

60

80

100

120

140

160

180

200

occsasoidfm

Fig. 16. Servo response of conical tank system.

scillations and overshoot and settling time are low, so FLCan be applied where oscillations cannot be tolerated in the pro-ess. The FLC also exhibits robust performance for plants withignificant variation in dynamics. Here FLC and PID both arepplied to the same exacting modeled level control system andimulation results are obtained. PID would not have taken caref the unknown dynamics or variable time delays in the system,f the techniques been applied to a system whose exact system

ynamics were not known, Fuzzy logic provide a completely dif-erent, unconventional way to approach a control problem. Thisethod focuses on what the system should do rather than trying
Page 12: Online tuning of fuzzy logic controller using Kalman algorithm for ... · tuning of fuzzy logic controller using Kalman algorithm for conical tank system G.M. Tamilselvan∗, P. Aarthy

lied R

tptcpubc

C

R

A

A

C

F

G

G

G

J

K

K

S

M

G.M. Tamilselvan, P. Aarthy / Journal of App

o understand how it works. One can concentrate on solving theroblem rather trying to model the system mathematically, ifhat is even possible. This almost invariably leads to quicker,heaper solutions. And also using Kalman filter provides morerecise results so that controller with Kalman algorithm can besed in noisy environments. This research work can be extendedy using the robust extended Kalman filter to effectively use theontroller in noisy environments.

onflict of interest

The authors have no conflicts of interest to declare.

eferences

hn, K. K., & Truong, D. Q. (2009). Online tuning fuzzy PID controllerusing robust extended Kalman filter. Journal of Process Control, 19(6),1011–1023.

lleyne, A., Liu, R., & Wright, H. (1998). On the limitations of force trackingcontrol for hydraulic active suspensions. In American control conference,1998. Proceedings of the 1998 (Vol. 1, pp. 43–47), IEEE.

heng, F., Zhong, G., Li, Y., & Xu, Z. (1996). Fuzzy control of a double-invertedpendulum. Fuzzy Sets and Systems, 79(3), 315–321.

ukami, S., Mizumoto, M., & Tanaka, K. (1980). Some considerations on fuzzyconditional inference. Fuzzy Sets and Systems, 4(3), 243–273.

W

esearch and Technology 15 (2017) 492–503 503

aeid, K. S. (2013). Optimal gain Kalman filter design with Dc motorspeed controlled parameters. Journal of Asian Scientific Research, 3(12),1157–1172.

arcia-Benitez, E., Yurkovich, S., & Passino, K. M. (1993). Rule-based super-visory control of a two-link flexible manipulator. Journal of Intelligent &Robotic Systems, 7(2), 195–213.

uo, J., Zhou, J., & Cui, T. (2004). The application of the hybrid fuzzy controlof the furnace. The Information of Microcomputer, 21, 106–109.

wo, D. J., & Wang, S. H. (2007). Adaptive fuzzy strong tracking extendedKalman filtering for GPS navigation. IEEE Sensors Journal, 7(5),778–789.

obayashi, K., Cheok, K. C., & Watanabe, K. (1995). Estimation of absolutevehicle speed using fuzzy logic rule-based Kalman filter. In Proceedings ofthe American control conference (Vol. 5, pp. 3086–3090), IEEE.

won, S. J. (2006). Robust Kalman filtering with perturbation estimation processfor uncertain systems. IEEE Proceedings – Control Theory and Applications,153(5), 600–606.

akthivel, G., Anandhi, T. S., & Natarajan, S. P. (2011). Design of fuzzylogic controller for a spherical tank system and its real time implementa-tion. International Journal of Engineering Research and Applications, 1(3),934–940.

uniandy, V., Samin, P. M., & Jamaluddin, H. (2015). Application of a self-tuning fuzzy PI–PD controller in an active anti-roll bar system for a passengercar. Vehicle System Dynamics, 53(11), 1641–1666.

ang, Z., & Yuan, M. (2012). A self-tuning fuzzy PID control method ofgrate cooler pressure based on Kalman filter. In International conferenceon computer science and information processing (CSIP), (pp. 257–260),IEEE http://dx.doi.org/10.1109/CSIP.2012.6308843