Improved Transient Performance of a Fuzzy Modified Model Reference Adaptive Controller for an Interacting Coupled Tank System Using Real-Coded Genetic Algorithm

. The main objective of the paper is to design a model reference adaptive controller (MRAC) with improved transient performance. A modification to the standard direct MRAC called fuzzy modified MRAC (FMRAC) is used in the paper. The FMRAC uses a proportional control based Mamdani-type fuzzy logic controller (MFLC) to improve the transient performance of a direct MRAC. The paper proposes the application of real-coded genetic algorithm (RGA) to tune the membership function parameters of the proposed FMRAC offline so that the transient performance of the FMRAC is improved further. In this study, a GA based modified MRAC (GAMMRAC), an FMRAC, and a GA based FMRAC (GAFMRAC) are designed for a coupled tank setup in a hybrid tank process and their transient performances are compared. The results show that the proposed GAFMRAC gives a better transient performance than the GAMMRAC or the FMRAC. It is concluded that the proposed controller can be used to obtain very good transient performance for the control of nonlinear processes.


Introduction
Industrial applications of liquid level control are found in food processing, beverage, dairy, filtration, effluent treatment, nuclear power generation plants, pharmaceutical industries, water purification systems, industrial chemical processing, boilers, and automatic liquid dispensing and replenishment devices [1].Traditionally, proportionalintegral-derivative (PID) controllers are used for this purpose.Ziegler-Nichols and Cohen-Coon methods are widely used to tune a PID controller [2].In these methods, the PID controller parameters are tuned for a particular operating point around which the process can be considered linear [3].The controller would give suboptimal performance whenever the operating point is shifted out of the linearized region or when the plant parameters change due to environment and ageing.So, the PID controller parameters need to be retuned.In order to have a good performance despite the environment-induced changes in the process parameters, the controller must adapt to changes in the plant dynamics.As the level process is nonlinear, [4,5] adaptive controllers are more suitable than fixed-parameter controllers.
Gain scheduling, dual control, self-tuning regulation (STR), and MRAC are the strategies used in adaptive control [5].In gain scheduling, there is no feedback to make necessary changes in the controller parameter values in the event of the schedule being incorrect [5].Dual control is too complicated to be used for real-life problems [5].Nonlinear nature of a system warrants the use of adaptive controllers such as MRAC and STR [3].In STR, even a small error in process parameter estimation can lead to large changes in parameters resulting in possible oscillation of process International Journal of Chemical Engineering variables.Model reference adaptive controller (MRAC) has been used in the control of nonlinear processes [4,[6][7][8].Goodwin and Mayne [9] established global convergence and asymptotic properties of a direct adaptive controller for continuous time stochastic linear systems.In an MRAC, the process output  takes some finite time to converge with reference model output   .
Improving the transient performance of the MRAC has been a point of research for a long time.A modified traditional MRAC proposed by [10] has shown improved transient and steady-state performance.Miller and Davison [11] proposed a controller, which comprises an LTI compensator together with a switching mechanism, which can give an arbitrarily good transient and steady-state performance for a single-input single-output linear time-invariant plant.Asan Mohideen et al. [4] proposed a GAMMRAC that uses a PID controller along with an MRAC to improve the transient performance of the MRAC in controlling the level of a hybrid tank process.The authors have proposed an FMRAC, which uses a Mamdani-type FLC to improve the performance of MRAC [12].The fuzzy if-then rules and the membership functions are designed based on a proportional controller.The shape and the parameters of the fuzzy membership functions are designed by using the knowledge of the operator of the plant.In order to improve the performance of the FMRAC further, the membership function parameters can be fine-tuned by using intelligent optimization algorithms like particle swarm optimization (PSO), ant colony, bacterial foraging, and GA.Chang [13] applied RGA for system identification and offline tuning of a PID controller for a system whose structure is assumed to be known previously.Hu et al. [14] used GA to optimize a fuzzy PID controller.Valarmathi et al. [15] used RGA for system identification and controller tuning for a pH process.Asan Mohideen et al. [4] used RGA for system identification and controller tuning for level control.RGA overcomes some pitfalls of the binary-coded GA such as Hamming cliff problems [16], redundancy of codes [17], time-consuming encoding and decoding, large memory requirement, and low precision due to quantization error [4,15].This paper proposes RGA to fine-tune the membership functions of the FMRAC offline so that the transient and steady-state performance is further improved.The resultant proposed controller is referred to as GAFMRAC in the paper.A GAMMRAC [4], an FMRAC [12], and the proposed GAFMRAC are designed and implemented to control liquid level in a coupled tank process in this study.

Fuzzy Logic Controller
Fuzzy logic provides a simple method to design nonlinear controllers based on heuristic approach [18].It has been used in control of nonlinear processes such as surge tank [18], continuous stirred tank reactor [19], level process in steam generators [20], and force control in end-milling [21].
The membership functions that are most commonly used in practice are the triangular and the trapezoidal membership functions.
The mathematical representation of a triangular membership function denoted by The mathematical representation of a trapezoidal membership function denoted by where the variables , , , and  are the parameters of the membership functions.The Mamdani-type FLC (MFLC) is the most common in practice [22] and is used in this paper.There are a few defuzzification methods such as max membership principle, centroid method, weighted average method, and min max membership method.The centroid method is the most physically appealing of all the defuzzification methods [22].This paper uses the centroid method of defuzzification.The output of the defuzzifier is given as the controller output to the process.

Fuzzy Modified Model Reference Adaptive Controller
The FMRAC is shown in Figure 1 where  is the output of the process and   is that of the reference model.The controller output of the FMRAC is If the cost function () that is to be minimized is taken as  2 /2, change in the value of controller parameters with respect to time as per the MIT rule [5] is given in where / is the sensitivity derivative of the system,  is the adaptation gain, and  is the tracking error.The adaptation gains that are used in updating the values of  1 and  2 are  1 and  2 , respectively.Very small values are assigned for  1 and  2 initially and then they are gradually increased so that  asymptotically converges with   in the shortest possible time [4].The cost function, () =  2 /2, is used in this paper.
For systems with positive steady-state gain, when  is positive, the MFLC output will reduce the controller output.This will reduce  and hence .Similarly, when  is negative, the MFLC output will increase the controller output.This contribution from the MFLC increases the response speed of the MRAC.In order to improve the performance of the FMRAC further, the membership function parameters can be finetuned by using RGA.The genetic algorithm [23] is a global search and optimization method based on Darwinian theory of evolution.GA is quite successful in locating the regions of the search space containing the global optimum, but not the global optimum itself [24].To avoid getting trapped in local minima, the procedure explained in [4] can be followed.By following this procedure, optimal or near-optimal solutions can be ensured.

Tuning of FMRAC Using RGA
The setup in which RGA is used to find the optimal values of fuzzy membership function parameters of the MFLC that is part of the FMRAC is shown in Figure 2. The command signal is applied to the reference model and the controller.The error and the plant output are given to GA, and it returns the optimal values of membership function parameters.The parameters are updated in each generation until the stopping criterion is met.
The objective function to be minimized is the mean square error (MSE) given as where () is the output of the model at the instant  and   () is the output of the reference model at the instant .
The GA maximizes the fitness function given by Maximizing "" in effect minimizes the objective function MSE.In the denominator, a "1" is added to make sure that the denominator value never becomes zero.Tournament selection is used in this application.

Results and Discussion
In this section, a GAMMRAC [4], an FMRAC, and a GAFMRAC are designed for the coupled tank setup used by [4] and their performances are compared.

Process Model.
Figure 3 shows the coupled tank setup.It is identified as an overdamped second-order system with zero delay.The transfer function of the identified model is The time constant in the transfer function is scaled by a factor of 50 in [4].The flow rate 1 and the liquid level 2 are the manipulated variable and the controlled variable, respectively.The operating region of the coupled tank process is from 18.5 cm to 41 cm with the corresponding influent flow rate ranging from 615 liters per hour (lph) to 740 lph.The maximum value of 1 is 880 lph.This control element constraint is incorporated in the simulation experiments.In this paper, zero level represents 30 cm and zero influent flow represents 677 lph and, from this point onwards, all the values of 1 and 2 are given in relative values.

Controller Tuning.
In this section, a GAMMRAC, an FMRAC, and a GAFMRAC are designed for the coupled tank system.The interaction between the two tanks makes the coupled tank process more sluggish than the coupled tank system without interaction.The time constant of a single tank level process is found to be approximately 200 seconds during the initial study of the hybrid tank process.Hence, a model representing a coupled tank system without interaction is selected as the reference model initially.Some other reference models are also tried to show that the proposed controllers work well even if the reference model and the process model The adaptation rules for the MRAC parameters  1 and  2 are where  1 and  2 are the adaptation gains for  1 and  2 , respectively.

GA Based Modified MRAC.
In the GAMMRAC, the controller output  [4] is where   is the proportional gain,   is the integral gain, and   is the differential gain.A GAMMRAC is designed as per ( 8), ( 9), ( 10), (11), and (12).RGA is used to optimize the above said parameters.A six-digit floating-point number represents each of them.The steps referred to in Section 3 are followed to ensure the optimality of the solution.Different combinations of RGA parameters are tried and random restart is carried out twenty times.The average of the individual runs represents the solution.Maximum fitness is obtained with the assignment of the values 100, 20, 0.8, and 0.02 to number of generations, population size, crossover rate, and mutation rate, respectively.The stopping criterion used here is the number of generations.
Figure 4 shows the pattern of convergence of the best and average fitness values.At the nineteenth generation, both fitness values converge for the first time.After 31 generations, the best fitness changes very little for many more generations.Hence, the estimate can be said to be optimal or near optimal.The optimal values of   ,   , and   are 999, 15, and 124, respectively.

Fuzzy Modified MRAC.
An FMRAC is designed as shown in Figure 1.The inference used in this work is "max min" method, where "min" operation is used for "and" conjunction and "max" is used for "or" conjunction.Implication and aggregation are "min" and "max" methods, respectively.Centroid defuzzification method is used.Table 1 shows the design parameters of the MFLC used in the study.Input and output variables are assigned ranges of [−10 10] and [−200 200], respectively.Operating range of the process and final control element constraint on maximum flow 1 determine the ranges of the input and output variables, respectively.Each variable range is divided into five fuzzy subsets as shown in The total number of parameters is 36.The values of the adaptation gains  1 and  2 used are 0.0000004 and 0.000005, respectively.Increasing the values of the adaptation gains has resulted in an overshoot and damped oscillation in the response during simulation study.As zero overshoot is desired in this paper, larger values are not used for the adaptation gains even though larger adaptation gains reduce the rise time.
Fuzzy rules are framed based on the following discussion.When  is large positive the controller output has to be reduced fast in order to have faster response.This is achieved by moving the control valve towards fully closed condition.This will reduce error fast and, as it becomes smaller, the control valve position moves towards the new steady-state position gradually so that  converges with   asymptotically.Similarly, when  is large negative, the controller output is increased fast by moving the control valve towards fully open condition.As error moves towards zero, the control valve position also moves gradually from fully open to the new steady-state position.If  is zero, then control valve position needs no change.
The fuzzy if-then rules for the FMRAC are as follows.
(i) If error is large positive, then flow rate is negative high.
(ii) If error is small positive, then flow rate is negative medium.
(iii) If error is zero, then flow rate is zero.
(iv) If error is small negative, then flow rate is positive medium.
(v) If error is large negative, then flow rate is positive high.

GA Based Fuzzy Modified MRAC.
RGA is used to optimize the membership function parameters of the FMRAC that is designed in the previous subsection.The steps referred to in Section 3 are followed to ensure the optimality of the solution.Since there are 36 parameters, each solution has 36 dimensions.A six-digit floating-point number represents each membership function parameter.Maximum fitness is obtained with the assignment of the values 100, 50, 0.8, and 0.02 to number of generations, population size, crossover rate, and mutation rate, respectively.The stopping criterion used here is the number of generations.
Figure 5 shows the pattern of convergence of the best fitness value and the average fitness value.At the twenty-ninth generation, the average fitness approaches the best fitness and since then they stay close to each other.After 50 generations, the best fitness does not change considerably for many more generations.Hence, the estimate can be said to be optimal or near-optimal.The membership function parameters of the FMRAC are substituted by the optimal values found by the application of RGA, and the resultant controller is called GAFMRAC.The optimal values of the membership function parameters are shown in Table 2.

Performance Analysis of the Proposed Controller.
In order to carry out performance analysis of different controllers, a step input of size 50 is applied to the command signal   and    the responses are shown in Figure 6.The figure consists of the responses of the reference model, GAMMRAC, FMRAC, and GAFMRAC.Figure 7 shows the zoomed in view of Figure 6 in order to be able to appreciate the difference among the transient responses of the three controllers.The proposed controller of GAFMRAC performs the best as far as the performance criteria are concerned.The performance criteria are calculated for all the three controllers and shown in Table 3. Rise time   , settling time   , and mean square error (MSE) are the three performance indices considered in the paper.In this context,   is the time it takes for the process output  to reach within ±5% of its final value and stay there.Rise time   is the time it takes for the plant output  to reach 90% of the final value from 10% of the same.The main objective is to make the process follow the reference model as closely as possible with minimal MSE.
International Journal of Chemical Engineering 7  The shortest rise time of 671.6 seconds enables the proposed controller to immediately adapt to any change in the reference level of the process.Usually, the shorter rise time would result in larger overshoot and accompanying oscillations.However, the output of the proposed controller has no overshoot at all and it has the lowest value of MSE.It has reduced the MSE by 60.4 percent when compared to FMRAC.
During the step response analysis, the process inputs in the cases of all the three controllers remain well within the bounds and are shown in Figure 8.The outputs of all the controllers oscillate initially before settling at a final value.Table 4 shows the statistical analysis of the controller outputs.The maximum and the standard deviation are the least in the case of GAFMRAC.Thus, it can be considered better than the other two controllers in terms of stringent requirements of the final control element.It shows that the proposed controller can be implemented to control the hybrid tank process.
In order to check the robustness of the proposed controller, different types of command signals and different reference models are applied and the results are discussed below.Figure 9 shows the responses of the three controllers to a sinusoidal command signal when  1 () is used as the reference model.The values of MSE for the GAMMRAC, FMRAC, and GAFMRAC are 5.04 − 7, 3.79 − 8, and 2.26 − 8, respectively.The GAFMRAC gives 40.4 percent and 95.5 percent reduction in MSE when compared with GAFMRAC and GAMMRAC.Figure 10 shows the responses of the three controllers to a step input followed by a sinusoidal signal.The values of MSE for the GAMMRAC, FMRAC, and GAFMRAC are 2.54−6, 4.65−7, and 1.84−7, respectively.In this case, the GAFMRAC gives 60.4 percent and 92.8 percent reduction in MSE when compared with GAFMRAC and GAMMRAC.
Two different reference models whose parameters are very different from that of the process are used in order to test the robustness of the proposed controller.Figure 11 shows the responses of the three controllers to a sinusoidal command signal when a reference model whose transfer function is given in ( 13) is used.The values of MSE for GAMMRAC, FMRAC, and GAFMRAC are 6.11−8, 1.61−8, and 8.12−9, respectively.The reference model has larger steady-state gain and smaller time constant when compared to that of the process model: Figure 12 shows the responses of the three controllers to a square wave command signal when a first order transfer function given in ( 14) is used as the reference model.The values of MSE for MRAC, FMRAC, and GAFMRAC are 9.69 − 5, 1.89 − 5, and 1.82 − 5, respectively.The reduction in MSE in the case of the GAFMRAC is 3.8% when compared to FMRAC: From the analysis of the results, it can be said that the proposed GAFMRAC gives very good transient and steadystate performance for any type of command signal.It is also shown that even when the reference model parameters are very different from the process model parameters, the proposed controller gives stable response and the process shows improved transient and steady-state performance when compared to the performance of GAMMRAC and FMRAC.Even if the plant parameters change due to aging and any other external disturbances, and consequently the process parameters and the reference model parameters become very different from each other, the process will faithfully follow the reference model.

Conclusions
The coupled tank process used in this study is a nonlinear process.Hence, an adaptive controller like MRAC is preferred compared to a PID controller in the study.For the coupled tank process, a GAMMRAC, an FMRAC, and a GAFMRAC are designed and their performances are compared.The application of RGA to fine-tune the membership function parameters of the FMRAC has given even better transient and steady-state performance than that of the FMRAC.The simulation results establish that the proposed GAFMRAC reduces MSE better when compared to FMRAC and GAMM-RAC.It has also been shown that the proposed controller performs very well for different types of command signals like step, sinusoid, square, and step followed by a sinusoid.It has also performed very well, even when the reference model parameters are very different from the process model parameters indicating the robustness of the proposed design.The designed GAFMRAC can be used for the control of other nonlinear processes as well.Future work aims to adapt the values of the adaptation gains  1 and  2 by using fuzzy logic in order to obtain improved transient performance.

Figure 6 :
Figure 6: Response of the three controllers for a step change in set point.

Figure 7 :
Figure 7: A zoomed in view of the response of the three controllers shown in Figure 6.

Figure 8 :Figure 9 :
Figure 8: Process input for a step input of 50 to the command signal.

Figure 10 :Figure 11 :
Figure 10: Response of the three controllers to a step input followed by a sinusoidal input.

Figure 12 :
Figure 12: Response of the three controllers for a square wave command signal when  3 () is used as the reference model.

Table 1
Triangular and trapezoidal membership functions are used as shown in the table.

Table 1 :
Design parameters of the MFLC.

Table 2 :
Optimal parameters of the MFLC by using RGA.

Table 3 :
Comparison of step responses of different controllers.

Table 4 :
Statistical analysis of different controller outputs.