Abstract
The usage of water treatment technologies is increasing at a rapid rate due to scarcity of pure water in the world. This paper proposes controller design using grey wolf optimization (GWO) algorithm for water treatment plants. Doha reverse osmosis (RO) water treatment plant is considered for the experimental purpose. Proportional-integral-derivative (PID) controller is designed for the considered Doha RO plant. The proposed method can minimize the error criterion in such a way that good transient responses for flux and conductivity are obtained. To show the efficacy of GWO based controller, other state-of-art optimization techniques are also used for tuning of controller parameters. Comparative simulations show that GWO algorithm is more efficient and suitable over other algorithms for tuning the parameters of controller for Doha RO water treatment plant.
Keywords
Introduction
It is well known that scarcity of freshwater on earth is increasing rapidly due to regular growth in population as well as industrial revolution. Increasing demand of fresh water leads to developments in new desalination technologies. In desalination methods, reverse osmosis (RO) is presently leading in the market because of its simplicity, high product quality, less energy consumption and less investment. In RO process, two solutions having different concentrations get separated out using a semi-permeable membrane with the help of high pressure. This high pressure is used to overcome the osmotic pressure difference of the two solutions [1].
Currently, the RO water treatment method is used world-wide for desalination of brackish as well as sea-water. However, there are some problems with RO water treatment like membrane fouling, plant breakdowns, plant uncertainties, etc. These difficulties can be reduced by the development of suitable control techniques for desalination plants [2].
In many control applications, a combination of proportional, integral and derivative control actions is in use today. The proportional-integral-derivative (PID) controllers are used generally due to being simple in tuning the controller parameters. There are some classical methods of tuning the PID controller parameters e.g. Ziegler-Nichols, Cohen and Coon, Astrom and Hagglund [3], etc. Most of these methods are based on either mathematical functions or trial-and-error. Moreover, there is no universal rule for designing PID controllers for different applications. Many a times, control engineers have to adjust the settings of these controllers. So, to reduce such types of problems, optimization algorithm based controller tuning is proposed in the literature recently. This has renewed the interest in research and application of PID controllers.
In recent years, some optimization algorithm based control designs are also proposed for RO process systems. The work [4] presented genetic algorithm (GA) based control for RO plants. In [5], optimal control of RO desalination using multi-objective optimization (MOO) technique is proposed. GA is used to solve the MOO problem. The article [6] contributed the auto tuning of PID controller using improved genetic algorithm (IGA) for controller design of RO systems. Park et al. [7] considered real coded genetic algorithm (RCGA) based controller for a RO system. A control system design for RO plants using advanced optimization techniques is proposed in [8]. Additionally, in [9], modeling, optimization and control of RO desalination plant using ANN is presented and GA algorithm is utilized to find the optimum paths for trans-membrane pressure, feed rate and control strategies.
In this work, grey wolf optimization (GWO) [10] based PID controllers are proposed for RO treatment plants. The parameter tuning of PID controllers is accomplished with minimization of integral of squared error (ISE). Doha water treatment plant is used for the experimental purpose in this case. First, the multi-input-multi-output (MIMO) RO model of Doha plant is converted into two single-input-single-output (SISO) models using decoupling. Then, two GWO based PID controllers are designed for permeate flux and conductivity parameters, respectively. A comparative study of GWO based PID controllers is carried out with other controllers developed using artificial bee colony (ABC), differential evolutionary (DE) and particle swarm optimization (PSO) algorithms. The study shows that the GWO based PID controllers are providing better results when compared to controllers designed using other state-of-art-algorithms.
The rest contents of this paper are organized as follow: Section 2 contains description of RO process system, Section 3 gives controller design adopted in this paper, Section 4 discusses the grey wolf optimization (GWO) algorithm applied for tuning the RO desalination plant, and Section 5 presents simulation results and comparisons with other techniques. And finally, the paper is concluded in Section 6.
Reverse osmosis system
The RO desalination pilot plant structure is shown in Fig. 1. In this structure the RO plant is divided into four sections namely pre-treatment, high-pressure pump, RO membrane module, and post-treatment. First section is known as pre-treatment where seawater or brackish water is first pre-filtered chemically and mechanically by removing most of the suspended and dissolved pollutants, mud, and scaling compounds present in it. This helps to prevent RO membrane degradation. In the next section i.e. high-pressure pump, the pre-treated water is pressurized with a high-pressure feed pump. The high-pressure feed water enters RO membrane module which is a composite polyamide membrane, where fresh water comes out in storage tank and brine water rejected by membrane goes to a discharge channel. The product fresh water is post-treated in next section by adjusting its pH value to neutrality.

The RO desalination process.
In Fig. 1, there are two sensors, at permeate side, to measure the output variables: F p i.e. flux and C p i.e. conductivity. While, two manipulated variables (P f i.e. feed pressure and pH f i.e. pH value of feed water) are sensed at the feed side.
The generalized multi-input-multi-output (MIMO) block diagram for RO plant is illustrated in Fig. 2. This is basically two-input-two-output system having pH and pressure as input variables and flux and conductivity as output variables. In this model, two interacting loops (pressure and pH) are present. The first control loop is for feed pressure which affects both permeate flux and conductivity. While, the second control loop is for feed pH which affects conductivity only. Alatiqi et al. [11] first proposed the MIMO model structure for Doha RO plant. The empirical transfer functions for Doha model are represented in Laplace domain as follow:

Interacting MIMO model of RO plant.
The operating ranges of different parameters of RO system are listed in Table 1.
Operating ranges of system parameters
The problem of interaction in MIMO models can be eliminated with the help of decoupling phenomenon [12]. In this work, simplified decoupling is used to convert MIMO structure into two SISO structures. Figure 3 shows the MIMO model having decoupler.

MIMO RO model with decoupler.
The transfer function for decoupler is given as:
This cancels out the effect of interaction in the system and converts system into two non-interacting loops. And thus, two separate controllers can easily be designed for two non-interacting loops.
The ISE for general closed loop system
The generalized closed loop control system is illustrated with the help of block diagram given in Fig. 4. The transfer functions G PID (s) and G P (s), respectively, denote the PID controller and plant while r (s), e (s) and y (s), represent the reference input, error and actual output of the plant, respectively.

General closed loop control.
PID controllers, in general, can be represented in many configurations. One of the ideal parallel forms of PID controller is given as:
In this work, the tuning of parameters of PID controller is accomplished by minimizing the integral of squared error (ISE). The ISE can berepresented:
The ISE, given in Equation (11), is obtained using alpha and beta parameters [13]. The ISE in terms of alpha and beta parameters can be evaluated as follows:
Suppose, the Laplace transform of e (t) is given as
Alpha table
Beta table
For the decoupled Doha RO model (Fig. 3), two individual PID controllers, GPID1 (s) and GPID2 (s), are designed by minimizing ISE. The ISEs, defined in Equation (12), for two controllers become
The JISE1 and JISE2 are obtained from the E1 (s) and E2 (s), respectively. The transfer functions of E1 (s) and E2 (s), for model discussed in Fig. 3, are given as
The coefficients of numerator and denominator of E1 (s) and E2 (s) are provided in Appendix A.
The ISEs obtained in Equations (14) and (15) are minimized using GWO algorithm to obtain the parameters of two controllers. The GWO algorithm is discussed in Section 4.
GWO is meta-heuristic optimization algorithm proposed by Mirjalili et al. in 2014 [10]. Like several other algorithms, it is also a nature inspired algorithm. It is inspired by the social behavior of grey wolves [15]. The details of GWO are given as follow.
Background
Generally, grey wolves live in a bunch of 5 to 10 members in a society. The leaders in the society are named as alphas. The leaders (or alphas) are the wisest members of the society; therefore, they take most of the decisions about encircling and attacking the prey, timing for hunting, etc. Rest of the group members follow the instructions as provided by alphas. After alpha members, there is second level of members named as betas. Beta members follow the instructions given by alphas and deliver to rest of the members. There may a case when alpha wolves are not available or not in position to take decisions, then beta members will be taking charge of alpha members. After beta level, there is third level named as gamma. The task of gammas is just like a caretaker. Gammas establish the relationship among beta and the lower level. The last level of the hierarchy is lambda. They are the rest of the members in the society and are responsible to higher level members i.e. alphas, betas, and gammas.
Mathematical model and algorithm
In mathematical terms, alpha (α) is considered as the best solution in the population, beta (β) is the second best solution, similarly, gamma (γ) is the third best solution and finally, the rest solutions are considered as lambdas (λ). In this way, GWO algorithm establishes four levels of organization i.e. alpha, beta, gamma and lambda.
The three higher rank members (i.e. α, β, and γ) encircle the prey. It is modeled mathematically as:
The coefficient vectors (
By using Equations (18) and (19), the grey wolves update their positions. Based on the update rules defined in Equations (18) and (19), positions of α, β, and γ are updated as:
Using Equations (22), (23) and (24), the current positions of all grey wolves are updated as:
The positions of wolves are updated using Equation (25) until the termination criterion is met.
The simulations are obtained for two controllers designed for two loops namely, permeate flux and conductivity. For both cases, GWO, ABC, DE and PSO algorithms are applied to design PID controllers minimizing ISE. For the simulation propose, the population size and total number of iterations are considered as 10 and 100, respectively. All simulations are performed on MATLAB/Simulink environment having fixed solver with step interval of 0.1 sec.
Values of controller parameters for control loop I
Values of controller parameters for control loop I
The results presented in this section are obtained by minimizing the function as given in Equation (14). Table 4 shows the controller parameters i.e. Kp1, Ki1, and Kd1 obtained from GWO, ABC, DE, and PSO algorithms. The comparison, in terms of time domain analysis, is shown in Fig. 5 with all above algorithms for flux when a constant pressure value of 1 (psig) is applied as a reference input to the first control loop of RO plant. Table 5 shows that the value of performance index is minimum for GWO-PID. It is also clear from Table 5 that the time domain specifications like settling time, overshoot, undershoot and peak value are better for GWO-PID. It can successfully be concluded from Fig. 5 and Table 5 that the performance of GWO-PID controller is better in terms of settling time, peak overshoot, undershoot and peak value than ABC-PID, DE-PID, and PSO-PID based controllers. Hence, it shows the supremacy of GWO-PID controller over others for control loop I of RO water treatment plant.

Unit step response for control loop I.
Comparisons of performance for control loop I
In this section, simulations for conductivity loop are obtained by minimizing the function given in Equation (15). Table 6 shows the values of controller parameters for conductivity loop. A constant pH value of 1 is applied as a reference input and the results are obtained using GWO, ABC, DE, and PSO algorithms. The step response obtained is plotted in Fig. 6. Table 7 shows the time domain specifications with GWO-PID, ABC-PID, DE-PID, PSO-PID controllers. It is clear from Table 7 that the value of performance index is minimum for GWO-PID controller. Also, it is noticed from Table 7 that the values of rise time, settling time, overshoot, undershoot and peak are minimum for GWO-PID controller. Hence, Table 7 and Fig. 6 clarify that GWO-PID controller performs better than other controllers. It proves the superiority of GWO-PID controller over others for control loop II of RO water treatment plant also.

Unit step response for control loop II.
Values of controller parameters for control loop II
Comparisons of performance for control loop II
In this contribution, PID controller design using grey wolf optimization (GWO) algorithm is proposed for RO plants. Doha model of RO system is considered for experimentations. Two separate PID controllers are designed for the interacting multi-input-multi-output (MIMO) model of plant. First, the MIMO model is converted into two single-input-single-output (SISO) models, successfully, using simplified decoupler design methodology. Then two PID controllers are tuned by minimizing the integral of squared error (ISE). To show the efficacy of GWO based controller design, other controllers based on some state-of-art optimization algorithms have also designed for comparison. The simulation study concludes that the GWO based PID controllers are better in comparison to others designed using state-of-art-algorithms. Future scope of this work lies in design and tuning of PID controllers for other models proposed for RO plants. Additionally, this work can also be extended to design of robust PID controllers for RO plants.
Footnotes
Appendix A
Numerator and denominator coefficients of E1 (s) and E2 (s)
