Operational Optimization of Large-Scale Parallel-Unit SWRO Desalination Plant Using Differential Evolution Algorithm

A large-scale parallel-unit seawater reverse osmosis desalination plant contains many reverse osmosis (RO) units. If the operating conditions change, these RO units will not work at the optimal design points which are computed before the plant is built. The operational optimization problem (OOP) of the plant is to find out a scheduling of operation to minimize the total running cost when the change happens. In this paper, the OOP is modelled as a mixed-integer nonlinear programming problem. A two-stage differential evolution algorithm is proposed to solve this OOP. Experimental results show that the proposed method is satisfactory in solution quality.


Introduction
The shortage of fresh water has become a bottleneck of the economic development in many countries. Seawater desalination is an effective way to solve this problem. Reverse osmosis (RO) desalinating is one of the most popular ways to generate freshwater from seawater and has made a rapid progress over the past four decades [1][2][3]. The scale of seawater reverse osmosis (SWRO) desalination plant is continually expanding, whose capacity of freshwater has exceeded 100,000 tons per day in recent years. Now, a kind of large-scale parallel-unit SWRO desalination plant, which is composed of multiple parallel RO units, has appeared. This kind of plant has huger capital cost and more complicated operation processes. So, before it is built, an optimal design is made to select the suitable devices and system performance to match the operating condition [4][5][6][7][8]. These optimal designs are made based on static condition [9,10], but the actual situation is changing [11]. For example, the seawater temperature varies with changing seasons, the freshwater supply changes according to the user's demand, the permeate rate is declining with the membrane fouling [12], and so on. The result is that these devices would not work at the optimal designed points in most time. Therefore, an operational optimization scheduling is necessary to make these machines work in a best way under the changed conditions.
In this paper, a mathematical model of operational optimization problem (OOP) for a large-scale parallel-unit SWRO desalination plant, which includes objective function and constraint functions, is made. In order to solve this OOP, a two-stage differential evolution (TSDE) algorithm is proposed. The simulating results show that the TSDE is excellent in searching ability than basic DE and genetic algorithm (GA).

SWRO Desalination Plant
Representation. The single SWRO desalination unit is a multistage process, which includes seawater intake, pretreatment, RO desalination, and posttreatment [13]. Figure 1 shows the schematic diagram of the unit.
In the intake stage, the raw seawater is pumped from a deep well, which is located close to the shoreline, to the flocculators to filter; in the pretreatment stage, the most suspended matters and colloids are filtered out of seawater  by flocculators, mechanical filters, and precision safeguard filters successively to ensure that SDI (silt density index) is lower than 5 to meet the RO modules requirement; in the RO desalination stage, one part of the fed seawater is pressurized by the high pressure (HP) pump and the other by energy recovery device (ERD) and booster pump up to 40 ∼ 50 bar and then is desalinized by RO modules; in the posttreatment stage, the produced freshwater flows into the product freshwater tanks (PFWT) to supply into the municipal water network; the brine is disposed reasonably. The schematic diagram of a large-scale parallel-unit SWRO desalination plant is shown in Figure 2, which is structured with a number of independent RO units in parallel.
Each RO unit has different permeate rate. The freshwater, produced by RO Unit ( ∈ ), flows into PFWT and then is supplied for user.

Problem Mathematical Formulation.
The OOP of a large-scale SWRO desalination plant is to make an optimal scheduling plan to minimize the plant's total running cost (TRC). This optimal schedule plan determines the on/off status and amount of generated freshwater of each RO unit, and the amount of supplied freshwater by each PFWT at each time period. When computing the TRC, the price factors, such as time-of-use electricity price, the operation cost, and the maintenance cost, are taken into consideration.

Objective Function of OOP.
A lumped parameter model of this problem is built in this paper. The TRC of the plant consists of capital depreciation cost (CDC), operating cost (OC), labor and chemical cost (LCC), and energy cost (EC), which is presented as (1) The Capital Depreciation Cost, CDC, is The CDC is presented as (2), where CC is the capital cost of the SWRO desalination plant, 1.411 is the coefficient that is used to calculate the practical investment, is the capital charge rate, which is usually a constant, and is the operational optimization periods. When the SWRO desalination plant has been built, the CC is a fixed value; therefore, the CDC is a fixed cost in a certain time period under a constant capital charge rate . So, when computing the minimum value of TRC in this condition, this part cost CDC can be ignored. When the other parts of TRC reach their minimum values, the TRC gets its optimal value by adding this constant cost.
(2) The Operating Cost, OC. The OC includes maintenance expense and the repair and replacement expense of devices. The maintenance expense refers to the conventional maintenance expense during machines running; the repair and replacement expense refers to the cost of repair and replacement when the equipment stops. The OC is presented as where is the time horizon of the operational optimization; is the number of RO units in the plant; ( ) is the operating cost of Unit at the time , which is presented as where 1 is the coefficient that is used to calculate the maintenance cost; ( ) is the amount of freshwater generated by Unit at time ; 2 is the repair and replacement expense when Unit stops at time ; ( ) is the on/off status of Unit at time ; ( ) = 1 when Unit is running; ( ) = 0 when it stops.
(3) The Labor and Chemical Cost, LCC. Usually, we consider LCC = 12% × TRC. This cost includes labor cost, chemical expense, and other expenses. When TRC is the smallest, LCC has its minimum value.
(4) The Energy Cost, EC. The energy cost is the energy consumption which is necessary to drive the devices. It is obviously variable in different scheduling plans. By optimizing the scheduling plan, the plant's energy consumption can achieve the minimum value. The EC is presented as where 3 is the coefficient between energy and amount of freshwater generated by Unit at time ; ( ) is time-of-use electricity price at time .

Constraints of OOP.
The constraints of OPP include technical limitations and the design requirements, which are as follows.
(1) The Amount of Freshwater, ( ). ( ) is the amount of freshwater generated by Unit at time , which is subject to ,min ≤ ( ) ≤ ,max , = 1, 2, . . . , , ∀ , where ,max , ,min are the upper and the lower limit of the amount of freshwater generated by Unit , respectively.
where ( − 1) is the capacity of PFWT at the beginning of time ; is the number of PFWT; is the number of RO units which feed freshwater to the PFWT ; ( ) is the amount of supplied freshwater by PFWT at time ; ,max , ,min are the upper limit and the lower limit of capacity of PFWT .
(3) The Amount of Supplied Freshwater, ( ). ( ) is the amount of supplied freshwater by PFWT at time , which is subject to

Two-Stage Differential Evolution
The OOP of the large-scale parallel-unit SWRO desalination plant is a mixed-integer nonlinear programming problem (MINLP) over the time horizon. In the OOP, {0, 1} binary variables represent the on/off statuses of RO units; the real variables represent the amounts of freshwater generated by RO units and supplied freshwater by PFWTs. In order to compute this OOP, a novel differential evolution, TSDE, is proposed in this paper, and the basic steps of this TSDE are addressed in the following subsections.

4
The Scientific World Journal 3.1. Basic DE. Differential evolution algorithm was originally proposed by Storn and Price for solving continuous optimization in the mid-1990s [14][15][16][17][18]. It is an evolutionary algorithm, including three important operators: mutation, crossover, and selection [19,20]. The basic DE works are as follows.
Step 1 (initialization). The original population is generated in the search space randomly, which contains NP individual vectors: Step 2 (mutation). For each individual vector x , , a mutated solution v , is created according to a DE/rand/1/bin mutate operator (9) in each generation [15]. Consider where is the current generation number, is a scale factor, and 1 , 2 , and 3 are randomly selected integers from the set Step 3 (crossover). The crossover operator generates an offspring u , according to where CR is a crossover rate; rnbr( ) is a randomly chosen index (rnbr( ) ∈ {1, 2, . . . , }), which ensures u , getting at least one component from v , .
Step 4 (selection). The selection operator is to generate next population x , +1 according to (11). The objective function of x , is compared to one of u , and the smaller one is selected as the next generation. Consider Step 5 (stopping criterion). If the stopping criterion (maximum number of iterations) is satisfied, computation is terminated; otherwise, Steps 3-5 are repeated.

Treatment of Constraints.
In the OOP, there are two types of constraints: boundary constraints and technical limited constraint functions. The following is the treatment strategies of them.

Boundary Constraints.
Sometimes u , is out of the range of search space. When it happens, it is necessary to replace this value to guarantee it is into its allowed range (12). Consider where is the lower bound of , ; is the upper bound of , .
In this paper, the MINLP with constraints (13) is converted into an unconstrained MINLP by using a penalty function shown as (14).
where = [ 1 , 2 , . . . , ] is a continuous vector; = [ 1 , 2 , . . . , ] is a binary vector; ( , ) represents the th inequality constraint; ℎ ( , ) represents the th equality constraint; ( , ) represents new objective function, which consists of two parts: the old objective function ( , ) and a penalty function; is the number of inequality constraints; is the number of equality constraints; is a small positive constant, so that the th equality constraint ℎ ( , ) = 0 is converted into the inequality constraint ℎ ( , ) − < 0. In addition, is defined as penalty coefficient, which is a large positive constant, so that it imposes penalty on unfeasible solutions.

Conventional Technique for Binary Variables.
In this paper, the {0, 1} binary variables represent on/off status of RO units, but the DE algorithm is only capable of handling continuous variables. Therefore, some real variables within the range of [0, 1] are used to represent the statuses of RO units in TSDE instead of these binary variables. When the objective The Scientific World Journal 5 function and the constraint functions are calculated, these real variables are rounded off to the nearest integer with (15). Consider where INT() is a function to convert a real number to an integer value by rounding off.

Two-Stage DE.
The OOP of a large-scale parallel-unit SWRP desalination plant has such features: the permeate rate of each RO unit is huge; that is, the amount of freshwater generated by each RO unit is usually more than 10000 tons a day; the permeate rate changes within an allowable range, but this range is much smaller than its amount. So, when a RO unit's status changes, the TRC of the plant will change sharply. Usually, this change cannot be made up by adjusting the RO unit's permeate rate within its allowable range.
In this paper, a novel DE, TSDE, is proposed to solve the OOP. The TSDE is divided into two periods: Stage One and Stage Two. In Stage One, the permeate rate of each RO unit is supposed be a constant, which equals the median of its allowable range. A DE algorithm is used to compute the run/off status of each RO unit in this stage. When the DE is satisfying the stopping criterion, a preliminary scheduling will be worked out.
Then, the best 30 percent individuals in Stage One remain to Stage Two. The other 70 percent individuals in Stage Two are generated in the search space randomly (here, these two stages have the same population size NP). All these individuals are as the original values of another DE algorithm to evolute again in Stage Two. When the second DE stops, a final scheduling will be got.

Experimentation
For numerical experimentation, a large-scale parallel-unit SWRO desalination plant in Liuheng Island, China, which has the capacity of 100,000 m 3 freshwater a day, is considered over a 24-hour time horizon. The basic parameters of this OOP are shown in Tables 1, 2, and 3 The CDC of this plant is considered as a constant and ignored when calculating the TRC.

Parameters of TSDE.
The DE's search ability for different problems depends on its parameters [26]. So, before it is working, these parameters must be tuned.   The maintenance cost coefficient 1

11.5
The repair and replacement fees 2

155
The correlation coefficient of energy consumption and generated freshwater    Table 4, in which the bold font is the best solution. It can be observed that the bigger these two parameters are, the stronger the search ability is.
It is worth noting that if and NP are too big, the search speed of DE will decline sharply; and if the NP is small to a certain value, the algorithm is easy to fall into the locally optimal solution. Therefore, there is a compromise between the search speed and the accuracy when turning these two parameters.

The Scale Factor and Crossover Rate CR.
The scale factor and crossover rate CR are another two important parameters in DE; the search ability of DE is sensitive to them too. In order to find out the effects of and CR on the search ability of DE in this problem, a sensitivity analysis of these two parameters is presented.
Usually the is in the range of [0.0, 1.0] and CR is in the range of [0.0, 1.0] [15]. In order to compare the effects of different and CR fairly, the same initial individuals are used to calculate the optimal values of this OOP under different and CR. The population size NP = 100 and the maximum number of iterations = 1000. A basic DE is used to do this job, and the results are shown in Figures 3 and 4.
In Figure 3, the effects of different CR on the search ability of DE when = 0.1, 0.3, 0.5, 0.8, 1.0, and Rand[0.1 : 0.3], respectively, are explored, in which it is found that OOP gets its best solution when CR ⩾ 0.7. In Figure 4, the effects of different on the search ability of DE when CR = 0.1, 0.3, 0.5, 0.8, 1.0, and Rand[0.7 : 0.9], respectively, are studied, and it is found that OOP gets its minimal value when ⩽ 0.3. So, we set = Rand[0.1 : 0.3] and CR = Rand[0.7 : 0.9] for DE algorithm to compute the best solutions of OOP in the following sections. 1 and 2 of TSDE. As mentioned in the above sections, the TSDE algorithm is divided into two stages. The two maximum iteration numbers of these two stages, 1 and 2 , must be determined before the TSDE working. Here, it is supposed that 1 + 2 = 1000, NP = 100, = Rand[0.1 : 0.3], and CR = Rand[0.7 : 0.9], and each algorithm runs 10 times. The results are listed in Table 5, in which the bold font is the best solution. It is known that the TSDE gets its best solution when 1 = 300 and 2 = 700.

Pseudocode of TSDE.
The pseudocode of TSDE is shown in Algorithm 1. Each of algorithm runs 10 times, and the statistical results are listed in Table 6, in which the bond font are the best solution. The average searching quality of TSDE is better than the others. Moreover, the standard deviations by basic DE and TSDE are much smaller than GA.

Comparison between Optimal Operation and Manual
Operation. Finally, we compare the optimal operation with manual operation in the OOP. The scheduling strategy of manual operation is that all RO units are running until reaching the high amount limits of the PFWTs from time 1 to time 8 every day, when the time-of-use electricity price is the lowest. When the freshwater amount of each PFWT is at high limit, the corresponding RO units stop. At other time periods, the running status of each RO unit is only determined by the user's freshwater demand, and the time-of-use electricity price will no longer be considered. The optimal operation obeys the scheduling plan computed by TSDE. Figure 5 is the comparison of freshwater generation of each RO unit between optimal operation and manual operation. As Figure 5 shows, those RO units which have smaller freshwater generation capacity, such as Unit 1 and Unit 2, are almost running because of its smaller running cost. On the contrary, the RO unit which has large capacity (its running cost increases according to its capacity), such as Unit 6, is opened only when necessary. So, it has low  utilized efficiency. The others which have medium capacity are working intermittently. Figure 6 is the comparison of capacity of each PFWT. The sum of capacity of all PFWTs fluctuates with the profile of freshwater demand.
From Figure 6, it is observed as follows.
(1) Both of these two schedules open the RO units to generate freshwater from time 1 to time 8, and the sum of freshwater reaches its peak at time 8; (2) the manual operation does not take the time-of-use electricity price as the cost factor of TRC after time 8, so even at the highest electricity price period, such 8 The Scientific World Journal  as time 15, the sum of freshwater of PFWTs is still increasing. That is, the RO units are still opening at these time periods, so that the TRC under manual operation cannot get its optimal value; (3) the optimal operation takes full use of its advantage in global optimization, so at times 8, 13, and 18, the sum of generated freshwater reaches its local peaks before the time-of-use electricity price gets higher. Therefore, when the electricity price is higher, the storage of freshwater is used to satisfy user's demand, and the RO units will not be opened unless the storage of freshwater reaches its lower limit. In this way, the TRC of this plant under optimal operation is 5% lower than manual operation (Figure 7).

Conclusions
The OOP of large-scale parallel-unit SWRO desalination plant is modeled as a MINLP, in which binary-valued vectors indicate the on/off statsues of RO units and real-valued Randomly selected three integers 1 , 2 , and 3 from the set {1, 2, . . ., NP} Randomly selected index rnbr( ) (rnbr( ) ∈ {1, 2, . . . , }) (13) CR = rand * 0.2 + 0.7 (14) For = 1 to (15) If (rand < CR) or ( = rnbr( )) (16) Elseif End If (20) If ( , < ) or ( , > ) ( 21) , = + rand * ( − ) (22) End If (23) End For (24) If   The time-of-use electricity price (¥) The time-of-use electricity price (¥) Figure 5: The comparison of capacity of each RO unit.   vectors indicate the amounts of freshwater generated by RO units and the amounts of supplied freshwater by PFWFs. The objective function of the OOP is the total running cost of the desalination plant, and the constraint functions include the technical limitations, the design requirements of each RO unit, and the freshwater demand of user. A novel DE, two-stage DE, is presented to solve this OOP, and the effects of its main parameters on the search ability are analyzed in this paper. Applying this TSDE to a 100,000 ton SWRO desalination plant in Liuheng Island, China, it is observed that the proposed TSDE can successfully improve the utilization rate of RO units to reduce the TRC.