2018 Metamodel-based Optimization of a PID Controller Parameters for a Coupled-tank

mohdhatta.kl@utm.my Abstract Liquid flow and level control are essential requirements in various industries, such as paper manufacturing, petrochemical industries, waste management, and others. Controlling the liquids flow and levels in such industries is challenging due to the existence of nonlinearity and modeling uncertainties of the plants. This paper presents a method to control the liquid level in a second tank of a coupled-tank plant through variable manipulation of a water pump in the first tank. The optimum controller parameters of this plant are calculated using radial basis function neural network metamodel. A time-varying nonlinear dynamic model is developed and the corresponding linearized perturbation models are derived from the nonlinear model. The performance of the developed optimized controller using metamodeling is compared with the original large space design. In addition, linearized perturbation models are derived from the nonlinear dynamic model with time-varying

ISSN: 1693-6930  Samsudin [13] conducted a study to investigate the simulation time required to optimize a pole placement controller for a nonlinear plant. The simulation time required to find the optimum pole placement gains was around 3 days using a Pentium based computer. In another instance, Tsai, et al. [14] conducted a finite element analysis study to solve a microwave passive/active circuit design problem.
The reported simulation time was around 8 hours on a Pentium based PC. Having a simpler model that represent complicated plants will reduce the simulation time of several design issues, such as the prediction of systems outputs, what-if analysis, and optimization and validation of simulation models. This reduction in the simulation time is due to the ability of the optimized metamodel to find the output (such as a NN) in a matter of minutes, using an equivalent PC. A radial basis function (RBF) NN was presented by M. S. Mohamed Ali, et al. [12] to optimize a controller parameters for a mixing plant. The proposed method by the authors showed a noticeably shorter simulation time as compared to the large input space. Finding the optimal values of the controller required 30 min using the large input space, while it required 1 min only when using their proposed method. The reported works showed that metamodeling can be used to simplify complex models and give approximate solutions within a short time. Thus, this work investigates using a RBF metamodel to optimize a controller for a coupled-tank system.

RBF Metamodel
In this work, RBF is utilized to tune and find the optimal parameters of a PID controller. The RBFNN is trained using initial values obtained using integral square error (ISE) data from the plant simulation with a randomly selected controller parameters [15]. The minimum ISE is obtained by training the NN used to simulate large space of the control parameter sets. Then, the point that results the minimum ISE is selected to get the control parameter sets. A schematic diagram of an RBFNN is illustrated in Figure 1. The NN consists of three layers namely the input layer, the hidden layer, and the output layer [16]. If the number of output, Q=1, then the output of the RBF ANN in Figure 1 can be found from the following formula: where X, ϕ k , W 1k , SI, and C k are the input vector, the basis function, the weight in the output layer, the number of neurons (and centers) in the hidden layer, and the RBF centers in the input vector space, respectively [17]. The output of the neuron in the hidden layer represents a nonlinear function of the distance between X and C k . The centers are defined points that are assumed to perform an adequate sampling of the input space. Usually, a large number of input vectors are assigned to the centers to ensure a suitable input space sampling. In addition, some of the centers may be removed in an organized method to prevent any significant distort of the network mapping performance after it has been trained [18]. After setting the centers and the parameter, the output layer weights can be calculated as follows: where the set D has N initial input and output training pairs, and ij represents the possible samples in a discrete input space. If the input space is ℜ R×1 and the number of outputs Q=1, equation 1 can be rewritten in a vector matrix form as follows: By considering the quadratic error between the actual and desired ANN outputs as an optimization criterion, as follows: The vector of weights that minimizes equation 4 can be derived as follows: where ϕ T represents the pseudo-inverse of the nonlinear mapping matrix ϕ.

Coupled-tank Process
In this work, a coupled-tank system is selected as the plant that required to be controlled. This section presents the mathematical model of the system, which is developed by applying the fundamental physical laws of science and engineering [2]. A time-varying nonlinear dynamic model is developed and the corresponding linearized perturbation models are derived from the nonlinear model. Figure 2 illustrates a diagram of the coupled-tank control system.  Figure 2, where H 1 and H 2 are the liquid level in tank 1 and 2, respectively, measured with respect to the corresponding outlet [1]. Considering a simple mass balance, the rate of change of liquid volume in each tank equals the net flow of liquid into the tank. Thus, the dynamic equations for tank 1 and tank 2 are as follows: where H 1 and H 2 are the height of liquid in tank 1 and tank 2, respectively. A 1 and A 2 are the cross-sectional areas of tank 1 and tank 2, respectively. Q i1 and Q i2 are the pump flow rate into tank 1 and tank 2, respectively. α 1 , α 2 , and α 3 are proportionality constants that depend on the coefficients of discharge, the cross-sectional area of each nozzle, and the gravitational constant, respectively.

Ziegler-Nichols on-line Tuning Method
One of the earliest on-line closed-loop tuning methods for PID controllers is Ziegler-Nichols tuning method. In this method, the proportional gain is gradually increased until the output response oscillates with a constant amplitude. The value of K P that produces sustained oscillations is called the ultimate gain, K U . The period of this oscillation is called the ultimate period, T U . The desired closed loop response is the one with a decay ratio of one-fourth of the amplitude of two consecutive oscillations. The controller parameters K P , integral time, T I , and derivative time, T D , are calculated based on K U and T U for quarter decay ratio response [19]. The formulae for these parameters are given in Table 1. Then, the integral, K I , and the derivative, K D , gains are set to zero, while K P is increased gradually until sustained oscillation is observed. It was found that K U is 140 and the corresponding ultimate period is 9 s. Figure 3 shows

PID Controller Optimization
As discussed in the previous section, PID controllers have 3 parameters that can be adjusted to determine the performance and the output response of the controller [20]. The initial data sets require a proper identification in order to train the RBFNN to achieve the best approximation. Moreover, the initial data sets should cover the maximum and minimum value of the large data sets to prevent falling into extrapolation conditions that result unacceptable solutions. In addition, the initial data sets should maintain a suitable size that allows a proper training while minimizes the training time. The identified initial and large data sets are presented in Table 2     The ISE is used to train the RBFNN which will then be used as the metamodel of the coupled-tank system to evaluate the ISE for the corresponding large data sets of the controller parameters. The error goal is set to 0.1 in the training stage of the RBFNN. The training curves are as shown in Figure 4.
From Figure 4, it is can be seen that 350 epochs are required to achieve the set goal for an error of 0.1. A better approximation can be achieved when using a smaller error target. However, if the targeted error is very small, the training process will take a longer time. A spread value of 150 is used in the training process. This value can be adjusted to achieve a better response. The larger the spread, the smoother the function approximation will be. Too large a spread means a lot of neurons will be required to fit a fast-changing function. Whereas, a small spread implies that many neurons will be required to fit a smooth function, and the network may not generalize well. After the training process, RBFNN is used to evaluate 31500 data sets. To verify the metamodel, the actual Simulink model was evaluated for all the 31500 cases in large space data sets (D') using the same PC and the ISE (E) was also computed. The result is then compared with the actual simulation result as illustrated in Figure 5.

Overall Comparison of the Controllers' Performance
The performance controllers designed for Couple Tank System which is PID controller, one of the first things that must be done during controller design is to decide upon a criterion for measuring how good a response is [21]. For example, when we deal with systems where we are not bothered with the actual dynamics of how the steady state is reached, but only care about the steady state itself, a good measure will be the steady state error of the system defined by equation (8):

1595
The graph in Figure 6 shows the set-point and the output response for both Ziegler-Nichols and metamodeling. The best that could be achieved for the both methods of compensation studied is compared. A glance reveals that the designed metamodeling method has an overall better performance than Ziegler-Nichols method. The comparison of the response's characteristics is shown in Table 4.   Table 5 show the comparison between metamodel and Ziegler-Nichols method in ISE. The ISE for metamodel is lower than Ziegler-Nichols. The different ISE between metamodel and Ziegler-Nichols method is 739.2037.

Conclusion
This work presented an RBFNN that has proven its effectiveness as a method of controller optimization. The proposed method was able to find the optimal control values within a short computational time of 1 min as compared to simulating the process for all values in large input space (D') (around 30 min). The proposed approach was proven to be a useful approach for a large D or and complicated problem. In addition, the proposed method was able to provide a quick estimation for a set of initial parameters.
Further improvements of the results can be achieved by increasing the simulation time whenever it is required. In this work, the data set D was created based on prior knowledge of the plant by choosing the input values in a grid-like fashion. An alternative approach is to start off with a small number of samples, and then sequentially adding more data samples employing experimental design techniques. It can be concluded that a more strategic data location will allow achieving a more accurate metamodel using less data and simulation time to find the optimal controller parameters.