Cuckoo optimization algorithm (COA) is one of the latest evolutionary algorithms. Finding the best optimal point, rapid convergence, and simplicity in determining algorithm parameters are some merits of COA. In this paper, COA is applied to tuning optimal fuzzy parameters for Sugeno-type fuzzy logic controllers (S-FLCs) which are used for liquid level control. A programmable logic controller (PLC) is used with fuzzy controller. For this purpose, a liquid level control set and PLC have been assembled together. MATLAB/Simulink program has been used to achieve the optimal parameters of the membership functions. The results show clearly that the optimized FLC using COA has better performance compared to manually adjustments of the system parameters for different datasets.
1. Introduction
FLC is a popular technique that has seen increasing interest in the past decades since it has a linguistic based structure and its performance is quite robust for nonlinear systems. Takagi-Sugeno (T-S) fuzzy models represent fuzzy dynamic models or fuzzy systems [1–8]. This brings a twofold advantage. First, any model-based technique (including a nonlinear one) can be applied to the fuzzy dynamic models. Second, the controller itself can be considered as a fuzzy system. Since the fuzzy model of the nonlinear process is usually based on a set of local linear models which are smoothly merged by the fuzzy model structure, a natural and straightforward approach is to design one local controller for each local model of the process. However, FLC including some parameters such as linguistic control rules and limits and type of membership functions has to be tuned for a given system. A major drawback of FLC is that the tuning process becomes more difficult and very time consuming when the number of the system inputs and outputs is increased. Evolutionary algorithms regarding tuning the membership function parameters of FLC have been studied extensively in the literature. These studies can be divided into three groups as genetic algorithm [9–13], PSO [14–19], and ant algorithm [20, 21].
In many industrial processes, control of liquid level is required. Several researchers have investigated the problem of controlling liquid flow [22–28]. A constrained predictive control algorithm based on feedback linearization applied to a coupled tank apparatus is given in [29]. In [30], several sliding mode control schemes for the coupled tanks system and liquid level control are proposed. Fuzzy logic is as a powerful problem-solving methodology with a great number of applications in level control. Intelligent control including fuzzy control [31–36], neural network control [37], and genetic algorithms [38] has also been applied to liquid level system.
PLCs have been commonly used in manufacturing and industrial process applications. Main advantages of PLCs are simplicity, flexibility, reliability, and easy system configuration with low cost, low maintenance, and running cost. For this reason, complicated technology is shifted to the PLC process control system. Furthermore, PLC-based process control system enables easy operation and engineering [39]. The right choice of an optimization algorithm can be crucially important in finding the right solutions for a given optimization problem. There exist a diverse range of algorithms for optimization. One of the latest and most powerful optimization algorithms is cuckoo optimization algorithm (COA) [40, 41]. The ability of COA to find the best optimal point, rapid convergence, and simplicity in determining algorithm parameters and to handle any type of cost function for large scale problems makes it a better tool than the traditional gradient descent algorithms, genetic algorithm (GA) and particle swarm optimization (PSO) algorithm [42].
In this paper, fuzzy controller (Takagi-Sugeno type) with PLC to control of liquid level in tanks is used. According to the characteristics of PLC, the fuzzy control is used with PLC. We present optimization of Takagi-Sugeno-type fuzzy regulator parameters using COA. MATLAB software is used for designing and simulating. This paper is organized as follows. In Section 2, system model is presented. In Section 3, the controller design based on Takagi-Sugeno system is given. In Section 4, COA is presented. In Section 5, determination of Takagi-Sugeno controller parameters based on COA is considered and comparison to PSO is discussed. Finally, the results and advantages of the method are illustrated.
2. System of Liquid Level
In this system, the flowing of water has been supplied via a pump from a storage tank, and the flowing water rate has been adjusted with an actuator. This actuator operates with an electropneumatic positioner. A PLC (S7-200) has been used to control of the liquid level system. The level of the liquid has been measured through a pressure transmitter. The transmitted pressure data is transferred to PLC by using an analog input module [39]. This data which is between the ranges of 4–20 mA have been converted to mBar, and this mBar values come up to liquid level of tank in cm (0–60 cm). The system used in this work has been shown in Figure 1.
Schematic diagram of the liquid level control system.
The system model can be represented by the following differential equation:
(1)dh(t)dt=-c2gh(t)A(h(t))+1A(h(t))u(t),
where u(t) is the input flow (control input), which can be positive or negative; that is, it can both pull liquid out of the tank and put it in, h(t) is the liquid level (the output of the plant), A(h(t)) is the cross-sectional area of the tank, g=9.8m/s is gravity, and c is the known cross-sectional area of the output pipe [43]. The block diagram of the water tank which is obtained by (1) is shown in Figure 2.
Block diagram of the water tank.
3. Controller Design
Fuzzy parameters of the membership functions have been determined using MATLAB/Simulink program. Triangular-shaped built-in membership functions have been used in the Sugeno-type fuzzy algorithm. This fuzzy controller has two input variables: e(t) is the error which is the difference between set value and process value and de(t)/dt is the differential of e(t) and an output variable which is the control signal of the actuator [39]. Output variable (stimulus control signal) includes two acts that increase and decrease. Output membership functions have three parameters. Linear-type output membership functions have been used in fuzzy rule base which has four fuzzy rules. Fuzzy rules are as follows
if e is positive and de is positive then output is increased.
if e is positive and de is negative, then output is increased.
if e is negative and de is positive, then output is decreased.
if e is negative and de is negative, then output is decreased.
The final output of the system is the weighted average of all outputs, which is computed by
(2)Y=∑i=1nμimfi∑i=1nμi,
where μi compute from if part and mfi is output membership function of the ith fuzzy rule.
The fuzzy controller output is applied to the actuator in order to control of water level. Then, the required flow of water has been adjusted to obtain the desired level. The flowchart of PLC program is shown in Figure 3. Simulation of the control system is realized in MATLAB/Simulink, which is shown in Figure 4.
Flowchart of the PLC program.
Simulation of the control system.
4. Cuckoo Optimization Algorithm (COA)
COA is inspired by the life of a bird family which is called cuckoo. Special lifestyle of these birds and their characteristics in egg laying and breeding has been the basic motivation for development of this new evolutionary optimization algorithm. The cuckoo population, in different societies, is in two types: mature cuckoos and eggs. The effort to survive among cuckoos constitutes the basis of COA. During the survival competition, some of the cuckoos or their eggs demise. The survived cuckoo societies immigrate to a better environment and start reproducing and laying eggs. Cuckoos’ survival effort hopefully converges to a state in which there is only one cuckoo society, all with the same profit values. Figure 5 depicts flowchart of COA [44].
Flowchart of COA.
Like other evolutionary algorithms, the COA starts with an initial population of cuckoos. These initial cuckoos have some eggs to lay in some host birds’ nests. Some of these eggs which are more similar to the most bird’s eggs have the opportunity to grow up and become a mature cuckoo. Other eggs are detected by host birds and are killed. The grown eggs reveal the suitability of the nests in that area. The more eggs survive in an area, the more profit is gained in that area. Hence, the position in which more eggs survive will be the term that COA is going to optimize. Cuckoos search for the most suitable area to lay eggs in order to maximize their eggs survival rate. After the remained eggs grow and turn into a mature cuckoo, they make some societies. Each society has its habitat region to live in. The best habitat of all societies will be the destination for the cuckoos in other societies. Considering the number of eggs each cuckoo has and also the cuckoo’s distance to the goal point (best habitat), some egg laying radii are dedicated to it. Then they immigrate toward this best habitat. They will inhabit somewhere near the best habitat. Then, cuckoo starts to lay eggs in some random nests inside her egg laying radius. This process continues until the best position with maximum profit value is obtained and most of the cuckoo population is gathered around the same position. More details regarding the COA can be found in [44].
5. Fuzzy Controller and COA Parameters
Output membership functions parameters of Sugeno fuzzy controller included 6 parameters, that is, three parameters related to the increase and three parameters related to the decrease. These parameters are determined using COA. Interval variables of the controller parameters are selected in the range of −10 to 500. In Table 1, the parameters of COA are presented.
Values of COA parameters.
Number of optimization variables
6
Number of initial population
5
Minimum number of eggs for each cuckoo
2
Maximum number of eggs for each cuckoo
3
Maximum iterations of the cuckoo algorithm
100
Number of clusters that we want to make
2
Maximum number of cuckoos
8
Population variance
1e-3
We define a cost function according to (3) as
(3)Cost=sse(y-y^)+100×Overshoot,
where sse is sum squared error performance function, y is reference step input and y^ is output of the Simulink model. Cost function received COA maximum population matrix, and then set the parameters of controller. After setting, the parameters of the controller are called the simulink model and output is shown using the scope in Simulink. Figure 6 shows diagram of the reduction of the cost function.
Diagram of the cost function reduction.
6. Simulation Results
In Figures 7 and 8, the simulation results without COA are shown. The level has been set to 30 cm at t=0s and 40 cm at t=10s and then the level has been set to 50 cm at t=20s.
A view of the oscilloscope screen without optimization (level set: 30, 40, 50 cm).
Response of the manually tuning controller parameter.
Level set: 30
level set: 40
Level set: 50
In Figures 9, 10, and 11, the simulation results using COA and PSO are shown.
Response of fuzzy controller tuned using COA and PSO (set level = 30 cm at t=0s).
Response of fuzzy controller tuned using COA and PSO (level set: 40 cm at t=10s).
Response of fuzzy controller tuned using COA and PSO (level set: 50 cm at t=20s).
Table 2 shows the values of the optimal output membership functions parameters of Sugeno fuzzy controller using COA and PSO algorithm.
Optimal parameters values of fuzzy controller.
Level set: 30 cm
Level set: 40 cm
Level set: 50 cm
Using COA
Using PSO
Using COA
Using PSO
Using COA
Using PSO
Best parameters to decrease
138.6451
500
313.1306
500
407.4101
500
-9.3154
-10
-7.5503
−10
-5.8901
-10
30.4182
106.9814
48.0356
−10
54.4692
135.3138
Best parameters to increase
179.0782
500
126.3613
500
274.8582
500
-5.1364
-10
-6.1710
−10
-7.0941
-7.016766
66.5813
−10
63.9597
121.9906
70.7508
−10
Comparison between the control results obtained from FLC (manually adjustments) and optimized FLC clearly shows that optimized FLC has more accurate and acceptable results rather than manually adjustments of the system parameters for different datasets. The results show that tuned controller using COA is better and even superior to tuned controller using PSO.
7. Conclusion
In this paper, an efficient and effective tuning approach-based COA is presented to obtain the optimal Sugeno fuzzy controller parameters for control liquid level. Despite the fuzzy controller, the controller is ideal for liquid level control, and the results show that it can improve the performance of fuzzy controller by optimizing the parameters. Simulation results show clearly that the optimized controller parameters have better performance compared with manually adjustments of the system parameters for different datasets and COA could demonstrate its capability to tune up fuzzy controller parameters promptly with uppermost level of accuracy.
MännleM.FTSM-fast Takagi-Sugeno fuzzy modelingProceedings of the Fault Detection, Supervision and Safety for Technical Processes (SAFEPROCESS '00)June 2000Budapest, Romaina663668SalaA.GuerraT.M.BabuškaR.Perspectives of fuzzy systems and controlChadliM. KarimiH.R.Robust observer design for unknown inputs Takagi-Sugeno modelsChadliM.GuerraT-MLMI solution for robust static output feedback control of Takagi-Sugeno fuzzy modelsAouaoudaS.ChadliM.KhadirM.T.BouararT.Robust fault tolerant tracking controller design for unknown inputs T-S models with unmeasurable premise variablesChadliM.AouaoudaS.KarimiH.R.ShiP.Robust fault tolerant tracking controller design for a VTOL aircraftKarimiH.R.ChadliM.Robust observer design for Takagi-Sugeno fuzzy systems with mixed neutral and discrete delays and unknown inputsSaifiaD.ChadliM.LabiodS.GuerraT-M.Robust H∞ static output feedback stabilization of T-S fuzzy systems subject to actuator saturationChiouY.-C.LanL. W.Genetic fuzzy logic controller: an iterative evolution algorithm with new encoding methodLengG.McGinnityT. M.PrasadG.Design for self-organizing fuzzy neural networks based on genetic algorithmsHomayouniS. M.HongT. S.IsmailN.Development of genetic fuzzy logic controllers for complex production systemsMengD.PeiZ.Extracting linguistic rules from data sets using fuzzy logic and genetic algorithmsMontazeri-GhM.SafariA.Tuning of fuzzy fuel controller for aero-engine thrust regulation and safety considerations using genetic algorithmShoorehdeliM. A.TeshnehlabM.SedighA. K.Novel hybrid learning algorithms for tuning ANFIS parameters using adaptive weighted PSOProceedings of the IEEE International Conference on Fuzzy Systems, (FUZZ-IEEE '07)July 2007London, UK2-s2.0-5024910798410.1109/FUZZY.2007.4295571ChatterjeeA.WatanabeK.An optimized Takagi-Sugeno type neuro-fuzzy system for modeling robot manipulatorsParrottD.LiX.Locating and tracking multiple dynamic optima by a particle swarm model using speciationMukherjeeV.GhoshalS. P.Intelligent particle swarm optimized fuzzy PID controller for AVR systemChatterjeeA. D.PulasingheK.WatanabeK.IzumiK.A particle-swarm-optimized fuzzy-neural network for voice-controlled robot systemsWongC. C.WangH. Y.LiS. A.PSO-based motion fuzzy controller design for mobile robotsJuangC. F.LoC.Fuzzy systems design by clustering-aided ant colony optimization for plant controlJuangC. F.LoC.Zero-order TSK-type fuzzy system learning using a two-phase swarm intelligence algorithmKhanM. K.SpurgeonS. K.Robust MIMO water level control in interconnected twin-tanks using second order sliding mode controlPanH.WongH.KapilaV.de QueirozM. S.Experimental validation of a nonlinear backstepping liquid level controller for a state coupled two tank systemVisioliA.A new design for a PID plus feedforward controllerMurray-SmithD. J.KocijanJ.GongM.A signal convolution method for estimation of controller parameter sensitivity functions for tuning of feedback control systems by an iterative processTanK. K.HuangS.FerdousR.Robust self-tuning PID controller for nonlinear systemsWuK.-L.YuC.-C.ChengY.-C.A two degree of freedom level controlKwokK. E.PingM. C.LiP.Model-based augmented PID algorithmPoulsenN. K.KouvaritakisB.CannonM.Constrained predictive control and its application to a coupled-tanks apparatusAlmutairiN. B.ZribiM.Sliding mode control of coupled tanksNiimuraT.YokoyamaR.Water level control of small-scale hydro-generating units by fuzzy logicProceedings of the IEEE International Conference on Systems, Man and CyberneticsOctober 1995248324872-s2.0-0029546154KorbaP.BabuskaR.VerbruggenH.B.FrankP.M.Fuzzy gain scheduling: controller and observer design based on Lyapunov method and convex optimizationRojasI.AnguitaM.PomaresH.PrietoA.Analysis and electronic implementation of a fuzzy system for the control of a liquid tankProceedings of the 6th IEEE International Conference on Fussy SystemsJuly 1997154115472-s2.0-0030652318GhwanmehS. H.JonesK. O.WilliamsD.On-line performance evaluation of a self-learning fuzzy logic controller applied to non-linear processesProceedings of the 5th IEEE International Conference on Fuzzy SystemsSeptember 19963943992-s2.0-0030377592SainiJ.S.SinghY.P.Use of causal knowledge in a real-time fuzzy logic controllerKorbaP.FrankP. M.Applied optimization-based gain-scheduled fuzzy control5Proceedings of the American Control ConferenceJune 2000Chicago, Ill, USA338333872-s2.0-0034539541EvansJ. T.GommJ. B.WilliamsD.LisboaP. J. G.Implementation and performance evaluation of an on-line neural network control scheme1Proceedings of the International Conference on Control (Control '94)March 19946296332-s2.0-0028058566NgK. C.LiY.Murray-SmithD. J.SharmanK. C.Genetic algorithms applied to fuzzy sliding mode controller designProceedings of the 1st IEE/IEEE International Conference on Genetic Algorithms in Engineering Systems: Innovations and Applications (GALESIA '95)September 19952202252-s2.0-0029191112AydogmusZ.Implementation of a fuzzy-based level control using SCADAYangX.-S.DebS.Multiobjective cuckoo search for design optimizationWaltonS.HassanO.MorganK.BrownM. R.Modified cuckoo search: a new gradient free optimization algorithm ChaosAghaeiA.AzadiS.Optimizing Azadi Controller with COAM. PassinoK.YurkovichS.RajabiounR.Cuckoo optimization algorithm