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 [18]. 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 [913], PSO [1419], 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 [2228]. 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 [3136], 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.

The system model can be represented by the following differential equation: where 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, is the liquid level (the output of the plant), is the cross-sectional area of the tank, is gravity, and 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.

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: is the error which is the difference between set value and process value and is the differential of 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(i)if is positive and is positive then output is increased.(ii)if is positive and is negative, then output is increased.(iii)if is negative and is positive, then output is decreased.(iv)if is negative and is negative, then output is decreased.

The final output of the system is the weighted average of all outputs, which is computed by where compute from if part and is output membership function of the th 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.

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].

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.

We define a cost function according to (3) as where sse is sum squared error performance function, is reference step input and 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.

6. Simulation Results

In Figures 7 and 8, the simulation results without COA are shown. The level has been set to 30 cm at and 40 cm at and then the level has been set to 50 cm at .

In Figures 9, 10, and 11, the simulation results using COA and PSO are shown.

Table 2 shows the values of the optimal output membership functions parameters of Sugeno fuzzy controller using COA and PSO algorithm.

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.