This paper presents two-degree-of-freedom (2-DOF) robust loop-shaping control methodology to stabilize a reverse osmosis (RO) desalination system operating under significant uncertainties, external disturbances and measurement noises, and to reduce product water cost. This method has the advantages that no information about the plant uncertainty is required and it can deal with external disturbance and noise simultaneously. The controlled RO plant is a multi-input multi-output (MIMO) system. The two controlled variables are product water flow and product water salinity, which are fundamental in water desalination. The result shows that the achieved controller has very good performance which can deal with up to 52% uncertainty, and eliminate 60% of disturbance and 70% of noise, while common existing controllers in RO desalination can't cover the uncertainty and disturbance or can only deal with small values of these factors. Now that the software and hardware in the RO plant are sufficiently robust, it is possible to use this powerful method for better water quality control of RO systems.

## INTRODUCTION

Nowadays, the lack of fresh water is becoming an urgent issue in many areas of the world. Some desalination technologies have been developed during recent decades to produce water of suitable quality at low cost. Two of the most important technologies are multi-stage flash distillation and the reverse osmosis (RO) process (Alatiqi *et al.* 1999). In recent years, the market share of RO desalination has widely expanded because of significant improvements and advantages in membrane technology. RO plants have lower energy consumption, investment cost, space requirements and maintenance than other desalination processes (Gambier *et al.* 2006).

In RO plants, the system parameters change rapidly because of fouling. Consequently, membrane cleaning has to be carried out frequently and process parameters obtained before and after cleaning are very different. Hence, if the control parameters are not optimally adjusted, the control performance will not be acceptable in some operational stages. Furthermore, in a typical RO unit, membranes are very sensitive to feed water temperature, salinity and pressure variations. Therefore, RO systems are often operated under many uncertainties. In addition, due to the change in global weather, uncertainties and disturbances are getting larger for desalination plants. Since the hardware and software in RO control are now powerful enough, it's necessary to apply an advanced control strategy that can simultaneously deal with large uncertainties, disturbances and noises in the plant; rather than conventional controllers.

Several contributions with varying approaches are described in the control literature to automatically stabilize RO systems. Among the control methods, conventional PID (proportional–integral–derivative) is the most popular due to its simplicity. PID can be used as a standard PID controller or redesigned into multiple single-input single-output structures for a more effective control strategy (Alatiqi *et al.* 1989). Many other researchers have also developed their control approaches based on PID. For example Kim *et al.* (2009) applied the Immune-Genetic Algorithm to get PID parameters for a RO system, Gambier & Badreddin (2011) designed a multi-objective optimization based PID controller so that the control loop was less sensitive to parameter changes, and Rathore *et al.* (2013) used PID tuning in RO to self-tune the parameters of the controller. Another common control algorithm is model predictive control (MPC) which has the ability to allow a RO plant to operate with various permeate fluxes (Robertson *et al.* 1996; Abbas 2006; Ali *et al.* 2010). This approach has some robustness characteristics, but the plant uncertainty level allowed is not high. Less common controllers for RO systems include fuzzy logic (Jafar & Zilouchian 2002), optimal control (Gambier *et al.* 2006), fault tolerant control and feed-forward/feed-back based on Lyapunov control law (McFall *et al.* 2007, 2008). However, at this stage there has been no work on a robust *H*_{∞} control synthesis that simultaneously deals with model uncertainties, external disturbances and measurement noises in the RO system.

In this paper, a two-degree-of-freedom (2-DOF) *H*_{∞} loop-shaping controller has been applied to a small size RO system. Based on a multi-input multi-output (MIMO) RO model with coprime factor uncertainty, the aim of the controller is to keep the system stable under some level of disturbances, measurement noises and change in system parameters without having an impact on overall operation, in particular, product water quality and quantity. By using coprime factor uncertainty, the *H*_{∞} loop-shaping controller can be synthesized without any frequency weighting function selection and *a priori* uncertainty information. This framework is very suitable for actual RO systems which consist of many sources of uncertainties and disturbances.

## SYSTEM IDENTIFICATION AND METHODS

### The reverse osmosis unit model

The controller objective is to control a small size RO unit, the parameters of which were defined by Chaaben *et al.* (2011). This model includes three RO modules, in which each module is composed of a membrane which is constituted of a thin film composite modified polyamide type. It can purify feed water containing up to 3 g/L of total dissolved solids with a capacity of 62.5 L/h at 800 kPa.

The output variables are product flow *F*_{p} and water salinity *S*_{p}. These two parameters are fundamental to control water quality and quantity in the desalination plants. The manipulated variables are pump angular speed *N*_{p} and reject valve aperture *R*_{v}. The membrane is of the hollow fine fiber type. Before entering the high speed pump, feed water is pre-filtered by the pretreatment system which is not mentioned in this paper.

*G*

_{nom}as follows: Here the output and input vectors are defined as follows: Specifically, the relations between output and input variables are based on elementary first and second order models as follows: where the nominal values for the model parameters are given by

*k*

_{1}= 2.9,

*k*

_{2}= −0.15,

*T*

_{1}=

*T*

_{2}= 1.6(s),

*ω*

_{n}_{1}= 1.35(rad/s),

*ω*

_{n}_{2}= 1.935(rad/s),

*ξ*

_{1}= 0.4 and

*ξ*

_{2}= 0.6.

### Decoupled system

*G*

_{nom}in Equation (3) is coupled. The negative effects between the inputs and the outputs make it hard to choose the compensators for controller design. Therefore, the nominal system has been decoupled before applying

*H*

_{∞}loop-shaping. In this study, a typical feed forward decoupling method has been applied to this system. Then the decoupler

*D*is defined as: where: Finally the decoupled system is given as:

In fact, when system parameters change, the decoupler could not eliminate the interactions completely, but it could weaken the interactions.

### Coprime factor uncertainty of RO system

*H*

_{∞}norm are conservative if there are many perturbation blocks at different positions in the RO system. To get tighter bounds for the RO system, the model uncertainties are described using the left coprime factorization (LCF) (McFarlane & Glover 1992) as depicted in the dashed rectangle in Figure 2. In this structure, the uncertainty blocks enter and exit from the same position. Therefore, they can be combined to form a full perturbation block.

*M*

_{s},

*N*

_{s}, and (i.e., stable and proper).

*A,B,C,D*) of the decoupled system

*G*,

*Z*is the unique positive definite solution to the following algebraic Riccati equation: with: In addition,

*X*is the unique positive definition solution of the following algebraic Riccati equation: The CFU description is general and has distinct advantages over the other approaches in that it is possible to represent a greater variety of the system uncertainty and no

*a priori*uncertainty information is needed. This uncertainty model captures both low and high frequency perturbations. The uncertainty matrix accounts for both unmodelled dynamics and real parameter variations in the practical RO system.

### 2-DOF *H*_{∞} loop-shaping controller for RO system

*H*

_{∞}*G*, but also the set of perturbed plant

*G*

_{p}using a dynamic feedback controller

*K*. A loop-shaping technique allows the system designer to specify closed-loop objectives by shaping the loop gains. If the functions

*W*

_{1}and

*W*

_{2}are the pre- and post-compensators, respectively, then the shaped plant with its LCF is given by: where

*W*

_{2}is the identity matrix and

*W*

_{1}is a diagonal matrix which is used to shape the frequency response of the RO model and to specify the closed-loop behaviors.

Typically, the loop gains have to be large at low frequencies for good disturbance rejection at both the input and output of the plant, and small at high frequencies for noise rejection. In addition, the desired opened-loop shapes are chosen to be approximately −20 dB/decade roll-off around the crossover frequency to achieve desired robust stability, gain and phase margins, overshoot and damping.

For stringent tracking of problems in the RO system, a one-degree-of-freedom controller will not be sufficient to meet both requirements for reference tracking and disturbance rejection. Hence, a dynamic 2-DOF controller is proposed using the approach of Hoyle *et al.* (1991). The 2-DOF feedback control scheme is depicted schematically in Figure 2.

*K*

_{2}that satisfies the requirements of internal and robust stability, disturbance rejection, measurement noise attenuation and sensitivity minimization; and the pre-compensator

*K*

_{1}that optimizes the response of the overall system to the command input such that the output of the system would be close to that of a chosen ideal system

*T*

_{r}. More explicitly,

*T*

_{r}represents some desired closed-loop transfer function between reference input and output. In other words, the purpose of the pre-compensator

*K*

_{1}is to ensure that: where the actual closed-loop transfer function

*T*between the inputs and outputs is given as: The parameter λ is used to weight the relative importance of robust stability as compared with the model-matching in the design optimization.

*H*

_{∞}control synthesis framework, in which

*P(s)*is the generalized plant,

*K*= [

*K*

_{1}

*K*

_{2}] denotes the 2-DOF controller and Δ = [Δ

_{N}– Δ

_{M}] represents the uncertainty matrix.

*P*with the controller

*K*via lower LFT, is described by: where is defined as follows: It is noted that the minimization of the norm may ensure both good model-matching and robust stability. According to small gain theorem and

*μ*-synthesis (Doyle 1982), if , then the closed-loop system will remain stable for all Δ such that . In other words, according to McFarlane & Glover (1992) and Hoyle

*et al.*(1991) the RO is robustly stable if a controller is applied to satisfy the following condition: which is given by: where: Finally, the 2-DOF controller for the perturbed plant

*G*

_{p}is derived as:

### Reduced-order controller

The 2-DOF controller is synthesized, in which the system has 58 orders. The high-order controller is complex for practical implementation, and it often causes time delays for a complete control system. Therefore, in this study, the controller is reduced to a reasonable order that achieves the equivalent level of system performance. By applying optimal Hankel norm approximation, a seven-order controller is achieved that has only a slight difference in frequency and closed-loop time responses, compared to the full-order controller. Further reduction of the controller order leads to deterioration of the closed-loop transient responses and would even cause instability. Therefore it is justifiably safe to use the seven-order controller.

### Simulation setup

To check the controller's performance, the system designers propose a set of parametric uncertainty, random disturbances at the system output and noise signals at the feedback of the closed-loop system. The closed-loop system has been tested for robust stability and performance under given simulation conditions.

As mentioned above, the membrane in the RO unit is very sensitive to changes in temperature, feed water salinity, fouling and many other factors. In this simulation, only a change in feed water salinity is examined to measure the parametric uncertainty of the system. If the feed water salinity varies from 1 to 3 g/L, the parameters of the transfer function *G(s)* will vary in the intervals as shown in Table 1. This uncertainty will cause a large modeling mismatch in the RO plant.

Parameters | Min. values | Max. values |
---|---|---|

k _{1} | 2.60 | 3.20 |

T(s) _{1} | 1.40 | 1.80 |

k _{2} | −0.20 | −0.10 |

T(s) _{2} | 1.00 | 1.80 |

ω(rad/s) _{n1} | 1.20 | 1.50 |

ξ _{1} | 0.30 | 0.50 |

ω(rad/s) _{n2} | 1.72 | 2.15 |

ξ _{2} | 0.40 | 0.80 |

Parameters | Min. values | Max. values |
---|---|---|

k _{1} | 2.60 | 3.20 |

T(s) _{1} | 1.40 | 1.80 |

k _{2} | −0.20 | −0.10 |

T(s) _{2} | 1.00 | 1.80 |

ω(rad/s) _{n1} | 1.20 | 1.50 |

ξ _{1} | 0.30 | 0.50 |

ω(rad/s) _{n2} | 1.72 | 2.15 |

ξ _{2} | 0.40 | 0.80 |

*W*

_{m}which bounds all the possible model uncertainty given in Table 1 is chosen as follows: Then the performance weighting function

*W*

_{p}which bounds the system sensitivity to disturbance is selected as:

## RESULTS AND DISCUSSION

The aim of this study is to design a robust controller that can stabilize the RO system under some level of uncertainties, external disturbances and measurement noises. In the RO system, water quality is a fundamental variable to be regulated; product water flow also affects the overall salinity. Therefore product water flow and salinity are strictly required to be regulated and stable all the time.

The design requirements of the closed-loop system are selected as follows:

The system is stable under given uncertainty at all frequency ranges.

The transient responses have a settling time of less than 3.5 s, slight overshoot, and zero steady state errors.

The effects of external disturbances and measurement noises are reduced by more than 50%.

*T*

_{r}: where the natural frequency and damping ratio are respectively given by = 1.25(rad/s) and = 1 for the time domain response.

*W*

_{1}and

*W*

_{2}that enable the designer to achieve the desired loop shape are chosen as follows: where: Note that the weights

*w*

_{11}and

*w*

_{12}include two lag compensators and two notches with the gain, pole and zero locations selected by considering the desired loop shapes at high, crossover, and low frequencies.

Based on the shaped loop transfer function, the 2-DOF *H*_{∞} loop-shaping controller is synthesized. The achieved value of is 0.52, thus . This value indicates good stability gain and 52% coprime factor uncertainty is allowed. Figure 4(b) shows the robust stability of the given uncertain system. It can be observed that the singular value (or gain) of the closed-loop system is less than 1 at all frequencies. According to the condition in Equation (20), this result shows that the robust stability requirement is satisfied under given parametric uncertainties.

*et al.*(2013), one can conclude that the current controller offers better performance than previous approaches.

Besides the time-domain transient response, the ability of disturbances attenuation is also a very important requirement for the robust controller. The disturbances can be the cause of leakage, air in the system or fouling, etc. In this study, random disturbances whose value is equal to ±50% setpoint have been applied in addition to reference inputs. As illustrated in Figure 6(a) and 6(b), the effects of external disturbance are attenuated exceptionally. In particular, a disturbance of 1 in magnitude at the 40th second only causes a change of 0.3 in the product water flow and 0.4 in the product water salinity for a short time. It means that 60–70% of disturbance can be eliminated in the system. Whenever the value of disturbance does not change, the error will go to zero. Hence, the closed-loop system is stable under large disturbances, and the energy consumption can be minimized. This ability will lead to lower the cost of product water.

In practice, external disturbances are often low-frequency signals, whereas the noises are often high-frequency signals. Noise is unavoidable and can cause some error to the system. Therefore it is also necessary to eliminate noise effects on the RO system. A unit step reference with sensor noises has been applied into the two channels. Figure 6(c) and 6(d) show the noise attenuation ability of the achieved controller in the high-frequency range. It can be observed that 70% of noises has been eliminated. From the magnitude of noise and the change in responses, one can conclude that the closed-loop system presented is insusceptible to noises. In summary, the achieved *H*_{∞} loop-shaping controller provides both robust stability and excellent performance. It meets all the given design requirements for high-quality operation of a RO system.

## CONCLUSIONS

In RO plants, system parameters often change significantly during operation, and there are also many disturbances due to fouling, variations in feed water temperature or salinity. A powerful controller is necessary to deal with those issues. In this paper, a robust RO desalination control system has been successfully designed using a 2-DOF controller based on *H*_{∞} loop shaping methodology. The control synthesis allows the separate processing of the robust stabilization problem and reference signals. Furthermore, the uncertainty modeling using coprime factorization is very suitable for a RO system which has many sources of uncertainty and disturbance. The original MIMO system is firstly decoupled to lessen the interaction and shaped to achieve the desired gains. Then a low order controller has been successfully designed with regard to this decoupled and shaped system. The simulation results show high stability gain and excellent performance of the closed-loop system for the set of perturbed plant. The set-point tracking, noises and disturbances attenuation capabilities are successfully evaluated. In other words, this control methodology preserves product water quality and flow of the RO system at desired values under large uncertainties, disturbances and noises. Consequently, it will help lower the cost of water produced by the desalination plant. While common existing controllers cannot cope with changes in system parameters, or just deal with small uncertainties, disturbances and noises, there is potential to use this control method for larger and more complicated RO plants.