Synthesis of fuzzy sliding mode controller for liquid level control in spherical tank

Spherical tanks are often used in process industries as storage or surge tank where control of level is essential. The liquid level in the spherical tank is modeled using first principle technique. A sliding mode controller (SMC) is designed initially to get the information of the stable closed loop process. Fuzzy-based SMC controller is developed by collecting the sliding surface data to reduce the chattering effect caused by SMC and to get the smooth sliding surface. The designed controller can drive the system states to the boundary layer. The performance of the proposed controller is compared with IMC based PI controller and the SMC. Proposed controller performance is encouraging and can be suggested for implementation in controlling the liquid level in spherical geometry. Subjects: Chemical Engineering; Dynamical Control Systems; Instrumentation, Measurement & Testing; Intelligent Systems; Process Control Chemical Engineering; Systems & Control Engineering; Systems & Controls


Introduction
Storage tanks are often used in chemical process industries. The liquid level in these tanks show nonlinear dynamical behavior and hence is difficult to control compared to other available containers. Vessels are of different geometry like cylindrical, conical or spherical in shapes. The spherical PUBLIC INTEREST STATEMENT Spherical storage tanks are widely used to store liquid under high pressure as it offers minimal stress concentration and occupies less surface area per unit volume than cylindrical container. The liquid level in these vessels needs to be controlled too. The relation between liquid height to inlet flow rate becomes non-linear and demands for better control techniques, namely, sliding model control (SMC), for tracking the set-point. However, it has been observed that the liquid level trembles around set value. This has been eliminated by adding rule-based action to the SMC control. Comparison of present technique with other available conventional strategies has revealed its superiority over others. This control technique can be implemented in larger storage tanks for commercial applications.
tanks are used to store compressed gas and liquids in process industries for inherent safety. For controlling level in tanks, a transient model is necessary to predict dynamics as well as to design a model based controller. Modeling of the liquid level in cylindrical or conical vessels is well known. But, the modeling of liquid in the spherical tank is a complicated process as it involves nonlinearity and needs precise modeling techniques. A PI controller (Rice & Cooper, 2008) was employed to control liquid level system that was modeled as FOPDT with an integrator structure. Their closed loop response showed some overshoot. Teng, Shieh, and Chen (2003) proposed an autotuning method for PI controller where the controller parameters were optimized using a genetic algorithm. In this case, though the overshoot was reduced, oscillations and chattering were observed in closed loop response. As overshoot and oscillations could be adjusted using fuzzy logic (FL), studies are undertaken to apply the technique in the present case of liquid level. The implementation of artificial neural networks (ANNs) and FL were introduced by McCulloch and Pitts (1943) and Zadeh (1965). The introduction of FL by Mamdani and Assilian (1975) formed the fundamentals of the FL. Takagi and Sugeno (1985) introduced a rule-based modeling technique. Nitya et al. (2008aNitya et al. ( , 2008b presented liquid level control problems in the spherical tank using model-based control laws and FL control using multi-model approach. Jadlovska, Kabakov, and Sarnovsky (2008) used a neural networkbased model of a nonlinear liquid level system and controlled the process using neuro controller. But these controllers lack in robustness. Kumar and Mittal (2009) proposed Fuzzy P-I-D controller on separate modes and tried to control the level. Giriraj kumar, Rakesh, and Anantharaman (2010), Prakash (2011) and Wang, Tong, and Li (2009) also presented Fuzzy and neural controls for level control systems. Fuzzy based Adaptive PI control strategy has been proposed by Ganesh Ram and Lincoln (2013) for the control of level in the spherical tank. With the proposed method, the author (Ganesh Ram & Lincoln, 2013) was able to achieve minimum overshoot and fast settling time even in the presence of disturbances. Kumar, Meenakshipriya, and Ram (2016) compared PID controller with the PSO-based I-PD controller for the non-linear interacting spherical tank process, where, later provided better result compared to the former controller. All the above synthesis showed either overshoot or chattering or oscillations in closed loop responses. Though the overshoot can be minimized by using a fuzzy mode or a setpoint filter, the results of the literature review reveal that the system (spherical liquid level) needs a robust controller that can tackle parametric variation and external disturbances. Hence, to get a smoother response, sliding mode controller (SMC) (Khandekar, Malwatkar, & Patre, 2013;Young, Utkin, & Ozguner, 1999) is designed for the liquid level system with nonlinear spherical geometry. However, these references have not provided stability analysis of a closed loop system. Fuzzy mode (Radu-Emil & Hellendoorn, 2011) is combined along with SMC that considers error (between measured variable and setpoint) and change in error as input (to the controller) and gives manipulated variable, u as output from the controller block to reduce the overshoot. Mohammad (2015) presented fuzzy based non-dominated sorting genetic algorithm (NSGA-2) for pumping system. Khandekar et al. (2013) in 2011 proposed a sliding mode control for the chemical process in which nonlinear system is linearized using Pade or Taylor series approximation. Wai (2007) proposed Adaptive fuzzy-SMC control strategy for the indirect field-oriented Induction Motor drive to obtain chattering free stable output. The performance of the proposed method was even proved with the sinusoidal input command. Wang, Shi, and Karimi (2014) designed Fuzzy SMC controller to reach the desired process output even in the presence of unknown disturbances. The developed control strategy is employed for different processes. Lin, Chang, and Hsu (2012) designed a type II fuzzy controller along with the SMC to track the desired trajectory of the nonlinear system. The stability of the system for the designed controller is checked using Lyapunov stability method. The parameters of the controller are tuned online using adaptive technology. Ponce, Ponce, Bastida, and Molina (2015) used the merits of fuzzy controller and artificial hydrocarbon network to form a fuzzy-molecular controller for the control of liquid level in coupled tank system. Başçi and Derdiyok (2016) proposed adaptive fuzzy controller for the control of the liquid level in a coupled tank system to change the gain of the controller automatically to the changes in the system. The same has been compared with the PI controller, and the robustness of the proposed controller seems to be good as it adapts to the external variations in the system. Second order SMC controller has been implemented by Khadra and Qudeiri (2015) to regulate the level of the tank in the coupled tank system. The performance of the proposed controller output was compared with the other controllers using rise time settling time and the IAE value. However, these controllers are designed for either linear or non-linear systems specifically and do not show good performances under disturbances. It has been felt that continuous and discontinuous actions of control can be combined through SMC for controlling processes with linearity and non-linearity to perform under model uncertainty.
The sliding surface is an Integro-differential equation acting upon error. This SMC has been applied for continuous yeast fermentation process, and the robustness of the proposed controller is proved to be the best. Performances of conventional SMC's show either overshoot or chattering. This initiates the motivation behind present work. A holistic approach is used to design and implement sliding mode based controllers (augmented by Fuzzy or PI) for controlling liquid levels in the spherical tanks to compensate the above drawbacks. The objective of this study is to design an SMC and fuzzybased-SMC using derived and validated model of the liquid level system for a spherical geometry and to review its performances. FL has been used to augment the control law to improve and attain the closed-loop specifications. Liquid level in spherical tank shows mostly non-linear characteristics and has been chosen for implementation.
The organization of this paper is as follows: the process model is derived from first-principle in Section 2. Section 3 defines the Experimental setup of the spherical tank. Section 4 explains the principles involved in designing SMC controller and fuzzy based SMC controller. Results and discussion are presented in Section 4 which comprises the performance analysis of the proposed controller, SMC controller, and IMC based PI controller. The conclusion is drawn in Section 6.

Process model and transfer function
Spherical tanks are used in many process industries as storage of cryogenic liquids, fuels, and other liquids also as surge tanks. Due to gravitation, liquid settles down in these tanks, where because of the presence of different rates of inlet and outlet streams the height (h) of stored fluid changes with time. A level sensor and a controller are needed to maintain the levels constant. If the level comes down to a low level or goes up to a high level, the process gets disturbed or overflows/spills out. The behavior of liquid height can be known by the proper mathematical model of the liquid level in the spherical tank.

Modeling of level dynamics using first principle laws
The liquid level system in spherical tank shown in Figure 1 can be mathematically modeled as follows. Let R be the radius of the tank. The liquid is entering the tank at a rate of F in lit/min and going out at F out lit/min respectively. The transient height 'h' of the liquid can be found by forming a transient mass balance in the tank as hence At steady state, Equation (1) becomes Subtracting Equations (1) and (4) From Equation (6) one can obtain If F in = 0 then the height of the liquid (h) can be determined by solving the following equation Integrating Equation (16) from t = 0 to t = t f or or Clearly, two cases may arise during solution of Equation (18) Case (1) The spherical tank exhibits a nonlinear behavior along the height of the tank. The transfer function is obtained from the open loop of the process curve as an input voltage of the system is varied, and the output data (level) is collected. Modified Zeigler and Nichols (reaction curve) method are used to obtain the time constant and time delay of an FOPDT model.

Experimental set-up of the process
The laboratory set up of the system consists of a spherical tank, water reservoir, pump, rotameter, pressure transmitter, electro-pneumatic converter (I/P converter), pneumatic control valve, interfacing module and Personal Computer (PC) as shown in Figure 2. According to the schematic described in this Figure 2, the pressure transmitter output is interfaced with the computer using RS-232 port of the PC. The programs written in script code using MATLAB software is then linked via the Real-time module interface Matlab data acquisition card (VMAT-01) & Digital controller (VDPID) are employed in the computer (PC). Figure 3 shows the real-time experimental setup of the spherical tank whose level is to be controlled. The pneumatic control valve is of type air to close and is used to adjust the flow of water (liquid) pumped to the spherical tank from the water reservoir. The level of the water in the tank is measured with the help of the pressure transmitter and is transmitted in the form of current (4-20 mA) to the interfacing module & thereby to the PC. After computing the control algorithm in the PC, the calculated control signal is transmitted through the I/P converter in the form of current signal (4-20 mA), that passes/allows the air signal to the pneumatic control valve. The pneumatic control valve is actuated by this signal to produce the required flow of water in that latter on goes out of the tank. Thus there is a steady stream of water in and out of the tank. The size of the tank is, diameter 50 cm, volume 65 liters and is made up of stainless steel ss-316. The level is generally operated at a height of 15 cm mark in the tank.  A step change in pump voltage (from 2.2 to 2.5 V) is given, and the change in level (new level measured from the steady state at 15 cm) is measured. The overall transfer function between the level and pump voltage is found to be Here K p = 1.07; τ p = 0.781; D p = 0.2. This set-up has been used for open-loop experiment and also to find closed-loop with PID controllers.

PI controller
A PI controller based on overall process model is synthesized using IMC-PI control law as described by Equation (21).
A PI controller is incorporated (Figure 4) for the system. Conventional PID controllers are widely used in process industry as they are easy to implement and maintain. There are some techniques for tuning the parameters of PID controllers. Among them the most effectively used tuning method is the IMC (internal model control) based PID method. The controller settings (K C , proportional constant; τ I , integral constant) can be calculated using tuning rules. We consider model based IMC-PID tuning because of their familiarity. PID settings for stable FOPDT process (K P , process gain; τ P , time constant and D P , dead time) based on IMC-PID-Laurent (Panda, 2008) are given as: where λ is user defined closed loop time constant and can be chosen using following rule = max(0.2 P , 1.7 D P ).
Based on λ values the system response can be faster or sluggish. Another parameter, β in the tuning equations can be determined using the following formula β = α(0.25) max(τ p , D p ) where α = 0.1.
The controller parameters are calculated as K C and τ I using these equations. In the expression of K C , process gain (K P ) appears in the denominator. The presence of λ in the denominator will also have an impact on bandwidth. Thus the time response to step change becomes faster. The closed loop response of the level process using PI controller is used to design FL as described below.
The controller parameters are given as K C = 1.4496 and τ I = 0.8376; the controller takes action and flow rate is adjusted by control valve so that the response (liquid level) tracks setpoint.

SMC controller
SMC is one of the robust control techniques that can be applied to both linear and nonlinear system. SMC is capable of changing the dynamic behavior of the system by allowing it to track the trajectory defined by the sliding surface. These are achieved by applying both continuous mode and discrete mode on the system. The SMC block diagram is given in Figure 5. Here, SMC controller will have an error (e) and process output (X) as an input vector and manipulated variable (u) as the output of the controller.
(20) The feature of present sliding surface s(t)is that it operates on the error signal, e(t), and the equation of the sliding surface is given as, where is the tuning parameter, e(t) is the difference between the set point and the process output (e(t) = R(t) − X(t)) and n is the order of the system. The objective of the SMC can be achieved if and only if the sliding surface satisfies the given condition, can be approximated as follows where K p = steady state gain, T p = time constant, D p = dead time, X(s) = process output, and U(s) = control input.

Equation (22) can be rewritten as
where Since the given FOPDT system is approximated as a second order system (n = 2) and the sliding surface can be expressed as By differentiating on both sides, s(t) =ë(t) + 2ė(t) + 2 e(t) = 0 We know, e(t) = R(t) − X(t), where R(t) is the constant set point. Therefore Equation (24) becomes, By combining Equations (25) and (28), if a 1 = 2 then Ẍ (t) will vanish. Hence the above equation will become, Discontinuous control signal as a function of sliding surface is given as Here k D is the tuning parameter to compensate for the model uncertainties.
By combining the above two equations, continuous control component (u c (t)) and discontinuous control component (u d (t)) of SMC, we obtain the control law u(t) as.

Control law is obtained from the equation,
δ is the tuning parameter to reduce chattering.
Therefore the controller parameters for the liquid level process are

Fuzzy-SMC controller
The FL controller is designed to eliminate over/undershoot and to reduce settling time. SMC controller discussed previously, gives chattering effect due to the presence of sliding surface in discontinuous control component. To enhance the performance of SMC controller, SMC is used along with the Fuzzy controller. In the proposed control technique, sliding surface of the discontinuous component in SMC is given through the fuzzy controller. This method can reduce the settling time and also can provide the smooth control output. Fuzzy-SMC structure is shown in Figure 6. The error (e) and change in error (de) is given as input to the Fuzzy controller and the sliding surface, s(t) from fuzzy is given to SMC controller. Finally, controller output or the manipulated output (u) is given to the process.
The Fuzzy controller comprises three main stages namely, fuzzification, rule evaluation, and defuzzification. Two inputs of the fuzzy controller are the error (e) and change of error (de) from the closed loop response and output from fuzzy is the sliding surface which in turn will be one of the inputs to SMC controller. In the fuzzification stage, the five triangular membership functions are given for the inputs (e and de) and output s(t). They are NL-negative low; L-low; M-medium; H-high; PH-positive high. In the rule evaluation stage, the IF-THEN based rules are framed with the number of inputs and outputs. The framed 30 rules are as shown in Table 1. In the last stage, the output, s(t) based on the rule set is given to the SMC controller.

Closed-loop performance
Figures 7a and 7b show the output trajectory of IMC-PI Controller, SMC controller and Fuzzy-SMC controller for the step input with setpoint as 15 cm and dynamic input with changing setpoint respectively. From the figure, we can infer that Fuzzy-SMC controller can track the set point smoother and faster without any overshoot compared to the SMC controller and IMC-PID controller. The controller performance of all the three control modes for two different input conditions is given in Table 2. It can be seen that the Fuzzy SMC tracks the setpoint well compared to the other controllers. There are many error criteria to measure the performance of a closed loop system. Closed loops with negative feedback use IAE, ISE, ITAE, etc. based on nature of the error, the selected performance measure (IAE) helps to design controller output such that efforts on controllers reduce comparatively. In this paper, comparison of the performance of three different controllers is provided in the form of IAE (Integral absolute error) value. It analyses the error between the actual process output and the desired process output. Figure 8 shows time-trajectories of manipulated variable (u) feed flow rate and sliding surface with Fuzzy-SMC scheme. Though the change in manipulated variable (Figure 8(a) and (c)) is smooth, the sliding surface (Figure 8(b) and (d)) shows its actual track with time.
Real time results on the control of liquid level using PI controllers have been shown in Figure 9. The controller settings were K C = 1.44; τ I = 0.83. It can be seen from the figure that the response settles in about 7 s, overshoot has been recorded as 0.9% while the closed-loop performance, IAE has been observed as 7.25.   Figure 10 shows trajectories of manipulated feed flow rate for changes in error and the sliding surface which is considered to be inputs of SMC controller for the step input. The output of the controller is manipulated variable feed flow rate of liquid to the spherical tank. The figure clearly shows stages of movement of feed flow rate with the sliding surface during the course of change.
From the above study, the following advantages of SMC can be enumerated: The proposed controller can track the reference trajectory with fast settling time and rise time without any overshoot. The controller is robust to any external disturbances. Though the spherical tank system is nonlinear   in nature, the designed controller can work well without chattering effects. The limitations of the controller can also be stated: Good process knowledge is required prior to the design of the proposed controller as the fuzzy controller is used to decide the sliding surface of the SMC controller. The present SMC design is based on FOPDT process but can be designed for the higher order process.

Robustness studies
Process parameters in real time plant changes due to the change in environmental & other factors that causes the mismatch between 'true plant' and 'identified model'. Hence, a robustness study is necessary to find out the performance of the designed controllers. Robust characteristics of SMC controller is proven even in fuzzy SMC controller. It has been found that the controller is capable of retaining the closed loop performance with the range of ±500% change in the nominal value of the process gain and ±100% change in the nominal value of time constant (Figure 10).

Conclusion
Spherical storage tanks are used in process industries to store inflammable liquids from the safety point of view. Due to the non-linear nature of liquid level in the spherical tank, it is challenging to model and control level near operating point. Continuity equations are developed from the first principle to establish relations between feed flow rate and liquid level. The non-linear model is used to generate step response from which the transfer functions are found and first order plus dead time models are formulated. A Fuzzy-based sliding mode based controller is designed and implemented on the liquid level process to get the robust closed loop response. The controller is robust against model uncertainties, parametric variations, and external disturbances and the response is found to be satisfactory. The proposed controller response is compared with that of IMC-PI and SMC controller and is found to be better as it eliminates overshoot, chattering effect and also gives less IAE value. Future works will be carried-out for real-time implementation of present technique and to design SMC augmented with a gain scheduling technique to control the level at different heights. It can also be extended for the coupled tank system consisting of a spherical tank and a conical tank which is highly nonlinear due to the changes in cross sectional areas at different locations. This control strategy can be suggested for implementation for controlling level in the spherical geometry.