Suppression of hydraulic transients for desalination plants based on active control synthesis

This paper proposes a control strategy to stabilize a reverse osmosis desalination system against hydraulic shocks with enhancing productivity and sustainability. First, the effects of hydraulic transients on water quality have been reviewed. The transient waves are approximated by sinusoidal functions so that their effects are incorporated into the controlled system as external disturbances. Next, the active control is implemented based on the adaptive super-twisting (STW) sliding mode control (SMC) algorithms. Then, the robust performance is guaranteed whenever the sliding variables reach the sliding surfaces in ﬁ nite time despite disturbances. The STW SMC scheme is to eliminate the chattering problems for protecting the valves and to improve the convergence precision for water production. The control gains are adaptable to enable formation of an effective controller for dealing with large disturbances such as water hammer during desalination process. The simulation results reveal the superior performances on controlling water product, while eliminating shock waves. Especially, the effect of hydraulic shocks has been dramatically attenuated, hence the plant components are protected to avoid fracture. Finally, the robust stability and performance of the desalination plants are guaranteed against large disturbances to ensure the population with quality water as well as system sustainability.


INTRODUCTION
Generally, water desalination is the process of removing dissolved salts and mineral components from target substances in order to attain quality water for animal consumption, irrigation, and human use. Water management based on desalination technology has become the solution for world water scarcity for many decades. Especially, desalinated water is the main water source for meeting the water demands in water-scarce regions. Most of the modern interests in desalination have focused on developing effective ways of providing fresh water for human consumption in regions where the availability of fresh water is extremely limited. Desalination plants have been designed to consistently produce fresh water from salty feed to system output in sufficient quality as economically as possible. The major technologies utilized for desalination processes include reverse osmosis (RO) and multistage flash distillation (MSF). Recently, the RO has gained more dominance, particularly for brackish water treatments (Alatiqi et al. ).
This desalination technique has also been used in diverse processing industries such as chemical, nuclear, biotechnology, and petroleum (Jamal et al. ). The fundamental RO principle is based on the transport mechanisms of solvent and solute through semi-permeable membranes for water treatments, using high pressure. Yet, this system is of considerable complexity in terms of its biological and physical aspects. A number of desalination researches have been conducted to realize a variety of water treatment mechanisms in existing technologies. Generally, the RO transport mechanisms can be divided into four main types (Ghernaout ): the wetted surface (Reid & Breton ), the solution-diffusion (Lonsdale et al. ), the sieve (Banks & Sharples ), and the preferential sorption-capillary flow mechanism (Sourirajan ). Consequently, many RO models have been presented in literature, including the models of can be parametric uncertainty due to modeling mismatch, unmodeled dynamics, and simplification or parameter changes because of disruptions such as concentration polarization, feed concentration, fouling and scaling. The external disturbances are possibly feed-concentration change, leakage or more severe disturbances caused by, for example, hydraulic transients. Therefore, a robust dynamic controller is required to cope with a RO desalination plant confronting these challenges to increase productivity and prolong the life of plant components (Sobana & Panda  (Chaudhry ; Liu & Simpson ). Hydraulic shock loads should be kept within the prescribed limits to protect the system components. Traditional passive devices against pressure pulsations and hydraulic shocks do not fully provide emergency protections against system failure due to pipe collapse or bursting (Schmitt et al. ). To mitigate severe hydraulic surge effects, the active controller can be utilized to minimize pressure fluctuations. Hydraulic transient and its effects has become a major area of concern for many researchers, but few have been involved in actively controlling water surges of desalination plants (Alidai & Pothof ; Phuc et al. ). The goals are to robustly regulate the product water flow and system pressure to track some setpoints and, especially, to stabilize the water productivity under water shock loads. In this paper, an adaptive STW SMC approach (Shtessel et al. ) is introduced for the desalination system. This algorithm can adapt control parameters to guarantee the convergence of the sliding surface to zero with unknown uncertainties against hydraulic shocks. The STW SMC strategy is effective for controlling of RO systems in normal conditions. However, in case of hash conditions such as water hammer, the robust stability of the RO system controlled by the fixed-gains of STW SMC may not be achieved. Therefore, adaptable control gains are integrated to guarantee the robust performance of the control scheme. Another advantage of this SMC-based controller is that it is readily applicable for deploying into the RO control hardware. The simulation results show that the active control algorithm provides superior performance and is perfectly fitting to water monitoring systems coping with fluid shocks. Finally, the active controller can effectively monitor all the components of desalination plants, taking automatic compensation actions when hydraulic pressure surges occur, with resulting advantages in terms of effective automation and general plant management.

Hydraulic transients in desalination plants
Basic components of a desalination system are briefly described considering hydraulic interactions among the system devices. In, the mass and momentum transfer under hydraulic shocks are not well understood for water treatment systems. The disadvantages of an RO system are the difficulties of obtaining rigorous mathematical models of desalination process, which accounts for several operating factors such as feed temperature, concentration polarization, and fouling under hydraulic surge waves. The where V s is the system volume, A p the pipe cross-sectional area, A m the membrane area, K m the overall mass transfer coefficient of the membrane, ρ the fluid density, R vc and R vb the concentration and bypass valve resistance, respectively, with the working ranges [À120,000, 120,000]; v the water velocity, the subscript f indicates feed stream, b the bypass stream, c the concentration stream, and p the product stream. In Equation (1), Δπ is the osmotic pressure that has to be overcome in order to produce permeate. The valve resistance is a dimensionless quantity which is equal to zero for an absence of resistance and goes to infinity as the valve becomes completely closed. The osmotic pressure difference is a measure of the chemical potential difference between the solution on the feed and permeate side of the membrane. An alternative definition of the osmotic pressure of a solution of concentration at a given temperature is described as follows (Bartman et al. ): where β indicates the effective concentration to osmotic pressure constant, α the effective concentration weighting coefficient, R the fractional salt rejection of the membrane, and T the temperature. The product water flow F p and the system pressure P s can be calculated based on system variables v c and v b using the following equations: where P p is the permeate pressure. In the area where the velocity change occurs, the liquid pressure increases dramatically due to the momentum force. Transient pressures are most important when the rate of flow is changed rapidly, such as resulting from rapid valve closures or pump stoppages. An excessive pressure rise can cause the membranes and/or materials of construction to move and sometimes break, eventually resulting in a complete failure of the membranes.

Dynamical analysis
A hydraulic shock typically occurs in pipes after a valve is shut off suddenly. Specifically, the quick starting or stopping of pumps can create damaging pressure spikes in the valves known as water hammer. Since liquids are incompressible, when there is a sudden change in fluid velocity, the kinetic energy of the moving fluid is immediately converted into potential energy, causing waves of pressure and flow velocity back to the fluid source. A flow velocity greater than 1.5 m/s, a valve closing in less than 1.5 s, and a high operating pressure will cause, water hammer to occur and the transient pressure can be as high as five times the initial working pressure. Therefore, water hammer phenomenon in RO systems must be sufficiently considered for RO plant design and to avoid plant damages or failure.
The governing equations of water hammer include two partial differential equations (PDEs) and are given as follows (Juneseok ; Chaudhry ): H ¼ P/ρg the piezometric head, f the friction factor, D the pipe internal diameter, and g the gravitational acceleration.
a is the wave speed and is calculated by: where K f is the bulk modulus of fluid elasticity, ρ the density of the liquid, e the pipe thickness, E the Young's modulus of pipe elasticity, and c ¼ 1 À ν/2, in which ν is the Poisson's ratio. Suppose that the studied RO system is working at the steady-state while a sudden closure occurs at the permeate side that is 20 m away from the membranethe steady- incorporate the water hammering as disturbance into the mathematical model, the pressure and velocity profiles are approximated by the following function, respectively: where: The comparison of the approximated functions and the numerical hammer wave profiles are also illustrated in Figure 2, which shows good fitting between them. The water hammer in the permeate side will affect the whole system including system pressure and velocities through the concentration and bypass valve. From the dynamic equation of the RO system, the system flow velocities can be calculated easily. As plotted in Figure 3, their profiles are also approximated as follows:

Adaptive SMC synthesis
Since operating valves and pumps could suddenly cause severe hydraulic transient effects, the active controller u(t) must be manipulated carefully to minimize wave fluctuations. By allowing the state variables x 1 ¼ v c and x 2 ¼ v b , the nonlinear RO model in Equation (1) is rewritten in state-space form as follows: where: The state-space representation in Equation (9) can be formulated in the compact form as follows: where the state vector and nonlinear terms are given by: The sliding variables are selected as follows: Then the state-space representation of the sliding mode variables can be written as: where: where A 1 , A 2 , B 110 , and B 220 are the known nominal parts, while δA 1 , δA 2 , δB 11 , and δB 22 describe the perturbed parts representing all model uncertainties.
Then, the control problem is equivalent to the finite-time stabilization of the following system: where: In order to drive the sliding variables to converge to zero and to achieve an input-output feedback linearization, the controller is realized as follows: where the former term is the equivalent control part and the latter is the reaching part. By considering external disturbance and uncertainty, Equation (19) can be written as follows: Or it can be rewritten in the following form: where: In the reaching part of the controller, the action w is designed to deal with disturbances and uncertainties to guarantee the reachability of the sliding surfaces in Equation Theorem 1: Consider the RO system in Equation (9) and the sliding surface in Equation (15). The controlled RO system is guaranteed to provide its robustness to uncertainties and finite-time convergence if the adaptive STW SMC law is designed as follows: Here, the control gains α and β are updated as follows: where ω i , γ i , ψ i , λ i , and ε i are arbitrary positive constants (∈ ℜ þ ).
Proof: For the state variable x 1 , its corresponding sliding surface from Equation (23) is given by: Assume thatÂ 1 is a bounded function which satisfies the following condition: where δ 1 is a positive constant (∈ ℜ þ ). From Equations (25) and (27), the first sliding variable (s 1 ) can be expressed as: A new vector z is introduced as: Its time derivative can be calculated as follows: Exploiting the assumption in Equation (28), the following expression is obtained: where ρ 1 (x, t) is a bounded function such as: Then Equation (31) can be written as: where: The following Lyapunov function candidate (Boubzizi et al. ) can be used to prove the stability of Equation (34): Here, V 0 is given by: where P is a positive define matrix: with λ 1 > 0, γ 11 > 0, jα 1 j < α 1 , and jβ 1 j < β 1 , ∀t > 0.
Then the time derivative of the Lyapunov function is: where ε α1 ¼ (α 1 À α 1 ), and ε β1 ¼ (β 1 À β 1 ). Note that: where: with: Q 11 ¼ 2λ 1 α 1B11 þ 4B 11 ε 1 (2ε 1 α 1 À β 1 ) À 2ρ 1 (λ 1 þ 4ε 2 1 ) By selecting β 1 ¼ 2ε 1 α 1 þ λ 1 þ ε 2 1 , the matrix Q is positive definite if α 1 satisfies the following inequality: From Equation (40), it is bounded by: By allowing λ min (P) and λ max (P) as the minimum and maximum eigenvalues, it is known that: λ min (P) kzk 2 z T Pz λ max (P)kzk 2 Equation (32) can be rewritten as: and Then it can be concluded that: Combining Equations (36) and (48), then it follows that: It is well known that: From Equation (50) it can be derived as: where η 1 ¼ min (r, k 1 , k 11 ). By allowing V 1 ¼ V 0 þ 1 2γ 1 (ε α1 s 1 ) 2 þ 1 2γ 11 (ε β1 s 1 ) 2 , then it can be further described as: By choosing ξ ¼ 0, the finite-time convergence can be assured via the following adaptive gains: By selecting ε 1 ¼ k 11 ffiffiffiffiffiffiffi γ 11 2 r js 1 j, then ξ ¼ 0 can be guaranteed. Therefore, the derivative of the given Lyapunov function is ensured to be negative definite, and thus the convergence of s 1 ¼ 0 can be written as: The proof is completed for the state variable x 1 . Similarly, the same justification can be made to prove the stability of the state variable x 2 . The adaption laws for control gains utilize the current information on the sliding surface to adjust the control input in real time.

RESULTS AND DISCUSSIONS
Transient events are also significant for water quality as well as productivity in the desalination plants.
The current product flow rate and the system pressure are 2,286 L/h and 35.69 bar, respectively. The set-points are 2,000 L/h and 40 bar, respectively. Since closing the valve suddenly could cause severe hydraulic shock effects, the active controller u(t) must be manipulated carefully to minimize flow fluctuations. The adaptive STW SMC controller has been successfully designed for the RO desalination system with the selected control parameters as follows: ε 1,2 ¼ 1, γ 1,2 ¼ 1, λ 1,2 ¼ 1,ω 1 ¼ 6, and ω 2 ¼ 8:5. The proposed SMC scheme with adaption is intended to minimize the control activities along with a finite-time convergence against water hammer. Figure 4 shows the step responses of the controlled variables. It can be seen that the product flow rate F p and the system pressure P s can reach new set-points with settling time within approximately 1 s, which is better than the other results reported in RO literature as summarized in Table 1. It is worth noting that previous studies do not provide clarity on water hammer. As depicted in Figure 4, there is a slight overshoot in the flow rate and no overshoot in the pressure channel. The fast responses demonstrate that the active controller can quickly drive the system to desired steady-states under some variations. For the control synthesis, the most interesting concern is the ability of disturbance attenuation, especially large disturbances such as water hammer, and more generally, fluid hammer. It is noted that this fluid hammer in liquid line can develop peak pressures several times greater than normal working pressures. In this simulation, the water hammer occurring at the permeate side is considered as a disturbance to the RO system. There are always pressurereducing valves (PRV) installed in RO systems but they are not enough to eliminate hydraulic shock effects. As Settling time (s) 1.5 4 1.5 1.5 1   discussed earlier, the hammer transient pressure has a damping wave profile and the magnitude of the first peak pressure wave is extremely high. Vacuum pressure also occurs, and both phenomena is very harmful to the RO system. Therefore, not only high positive pressure waves but also negative ones must be regulated to avoid machine or component fatigue failures. The advanced controllers can effectively handle this kind of sporadic disturbance to protect the desalination plants from damages or successfully eliminate erratic sounds coming out.
In this paper, the adaptive STW SMC is proposed to minimize the effect of this water hammer. The initial permeate pressure is 22.97 bar. The simulated condition is chosen as the worst case with the feed water concentration C f ¼ 50,000 mg/L. As illustrated in Figure 7, the peak pressure in the first wave is calculated at 82.57 bar without the con-

).
Referring to Figure 7, even though the transient pressure has the sinusoidal wave profile with positive and negative values, the RO system is regulated effectively by the active controller. As illustrated in Figure  As mentioned earlier, the control parameters are adaptable so that the controller is more flexible to deal with uncertainties and disturbances. Figure 9 shows that the control gains are updating their values during water hammering.
It can be observed that their values increase rapidly when the water hammer has just occurred. When the pressure is dramatically dampened, these values will be fixed or constant. An adaption scheme is developed to update the controller gains providing superior responses, eventually resulting in minimization of chattering effects under hydraulic shock waves. This study presents the basic concepts associated with transient flow, discusses the hydraulic surges, and introduces features of RO system design that

CONCLUSIONS
Hydraulic shocks can have detrimental effects on pipes, pumps, membranes, and valves in the water desalination plants. This paper deals with comprehensive dynamical analysis and control synthesis for hydraulic transients of desalination plants. The robust monitoring of the water desalination plant is challenged by uncertainties and disturbances such as fouling, scaling, and environment changes. First, the dynamic analysis was conducted to investigate the system parameters that affect the water hammer effects. Next, a robust control system was proposed based on SMC scheme with adaptive law. The STW algorithm was implemented to alleviate chattering caused by discontinuous control structure, and to ensure robust performances of the controller in transient states. After realizing adaptive STW SMC algorithm for desalination plants, numerical simulations were carried out in order to validate the effectiveness of the proposed control scheme. The proposed control strategy provides the following novel features to the desalination system: • The robust control synthesis exploits the adaptive STW SMC strategy to provide the finite-time convergence of the sliding surface while maintaining robust performance and stability against uncertainties and disturbances.
• The proposed controller ensures the tracking of product water flow and pressure set-points in a short time.
• Transient pressure waves can be suppressed to prevent damages or fractures caused by excess pressure or vapor cavitation.
• The presented approach provides a chattering-free SMC synthesis for the hydraulic shocks.
The presented active controllers can eliminate hydraulic shocks to protect the desalination system while enhancing overall performance and reliability. Finally, the validity and the superiority of the water production performances of the adaptive STW SMC scheme over other control algorithms have been clearly demonstrated through numerical simulations as safe and reliable to use in a desalination process.

DATA AVAILABILITY STATEMENT
All relevant data are included in the paper or its Supplementary Information.