Fuzzy State-Dependent Riccati Equation (FSDRE) Control of the Reverse Osmosis Desalination System With Photovoltaic Power Supply

The two challenges facing human life are water and energy. Reverse osmosis (RO) desalination systems are popular owning to their unique advantages. However, robust performance and power supply are the two main challenges in this desalination system. This power is used to drive an induction motor that rotates a centrifugal pump to apply the required back pressure to the RO membrane. To solve these two challenges, a complete RO system powered by a photovoltaic (PV) system was considered, and for each subsystem, a robust controller was designed based on their dynamic models. A fuzzy controller optimized by the invasive weed algorithm (IWA) was designed to track the maximum power in the photovoltaic subsystem under different environmental conditions. A fuzzy-PID controller was used to control the motor-pump subsystem. Furthermore, it is focused on designing a robust controller with the ability to compensate for large set-point changes, reject external disturbances, and cope with parametric uncertainties, such as variations in feed water salinity. Hence, state-dependent Riccati equation control (SDRE) was used to control the reverse osmosis system. The simulation results for different scenarios show that the proposed controller performs well under different operating conditions and can remove the effects of disturbances on the system.

Reference Adaptive Control (MRAC) method was used for 82 controlling the combined PV-RO system in [23]. In [24], the 83 model predictive control approach was used for fault-tolerant 84 control of a small reverse osmosis system. 85 The disadvantage of these researches is that they do not 86 include the necessary elements for the reverse osmosis system 87 such as power supply, pumping process, and some others like 88 them. From our knowledge, only [25], [26] has considered 89 these elements. In [25], the super-twisting approach has been 90 considered in controlling the RO desalination system besides 91 other elements. 92 A slap optimization-based PID controller has been 93 designed in [27] for a PV-RO system. However, the linear 94 model of the system has been considered and there are no 95 details of other elements in the system. 96 A new control strategy for minimization of energy was 97 proposed in [28] by manipulating feed pressure and reject 98 valve opening. In [29], energy management and control of 99 renewable energy-powered reverse osmosis desalination sys-100 tems without batteries are proposed. 101 According to the above points, in this paper, the complete 102 set of the photovoltaic solar system, pump and electric motor 103 system, and reverse osmosis system membrane are examined 104 together. Maximum power point tracking (MPPT) in dif-105 ferent environmental (temperature and radiation) conditions 106 of the PV solar system, an optimized fuzzy controller with 107 an invasive weed algorithm (IWA) is used, which is much 108 more efficient than classical algorithms such as hill-climbing 109 [30]. A fuzzy-PID controller is considered to control the 110 motor-pump subsystem. This controller is more robust than 111 the classical PID controller and performs better in nonlinear 112 systems. Moreover, a novel application of state-dependent 113 Riccati equation (SDRE) control is also proposed to regulate 114 the flow rates in the reverse osmosis system in integration 115 with the motor-pump subsystem and photovoltaic subsystem. 116 Therefore, the main contributions of this paper are as 117 follows:

118
-Considering the PV-powered reverse osmosis (RO) 119 desalination system in integration with other essential 120 elements 121 -Using the SDRE method for control of the reverse osmo-122 sis subsystem 123 -Using Fuzzy-IWA controller for MPPT of photovoltaic 124 subsystem 125 -Evaluating the closed-loop system in dealing with dif-126 ferent uncertainties and disturbances 127 The aim of the proposed control design is to reach proper 128 dynamic performance and compensate for the effects of noise 129 and uncertain parameters. 130 The structure of the paper is as follows. In the next section, 131 the combined RO system powered by photovoltaic system is 132 presented. The controller design for each part is presented in 133 section 3. The simulation results are in section 4, and then the 134 conclusions are in the final section.  In this configuration, a system that can produce freshwater 149 from various water sources using sustainable energy is con-150 sidered.

151
In the following, we will describe each of the components 152 in more detail.
The parameters of the solar system are given in Table 1    The inlet water is pressurized by a high pressure pump and 201 then fed into the membrane (Fig. 3). This flow is divided into , which can 210 describe the process described in Fig. 3 as follows: Bypass flow speed v b and concentrated fluid speed v r are 214 the system state variables. V is the total internal volume, A p is 215 the area of the membrane, K m is the membrane mass transfer 216 parameter, ρis the density of the fluid, e vr is the concentrated 217 flow valve resistance, e vb is the bypass flow valve resistance, 218 v f is the feed rate, and π is the osmotic pressure. Low 219 salinity water flow velocitiy v p and system pressures P sys are 220 defined as follows: T the osmotic pressure is computed as follows: where: where C feed shows the TDS (total amount of dissolved solids) 228 of the in the inlet water, δ is related to the effective concen-229 tration to osmotic pressure, a is an effective concentration 230 weighting coefficient, R is the minimum salt excretion from 231 the membrane, and T is the temperature of the process.

233
The PV-RO desalination system should be able to withstand 234 different uncertainties in all parts of the system; in the PV sys-235 tem, such as changing the radiation intensity and temperature, 236 in the motor-pump system, such as changing in rotor resis-237 tance, and RO system, such as inlet water temperature, inlet 238 water TDS (sea or brackish water). Therefore, a robust control 239 strategy is essential to have a safe and reliable performance.  For each part, a robust control strategy is considered using 261 its dynamic model.

269
The goal of MPPT problems is to ensure that the maximum 270 power transfer theorem in electrical circuits is established. 271 This theorem states that to reach the maximum output power 272 from a source with a certain internal resistance, the load 273 resistance must be equal to the internal resistance of the 274 source, which is called impedance matching.

275
When the load resistance and source resistance as well as 276 load reactance and source reactance are equal, the maximum 277 power is transferred based on maximum power transfer the-278 orem. In a DC circuit, only the resistances must be equal for 279 satisfaction of the theorem conditions. A boost converter can 280 do this. The duty of a boost converter is setting up the input 281 voltage to a higher level required by the load. This is done by 282 adjustment of the duty cycle; sorting energy in an inductor 283 and releasing it to the load.

284
Because the current and voltage produced by the panel are 285 highly dependent on environmental conditions, the internal 286 resistance of the panel changes due to changes in the voltage 287 and current produced by the panel. Therefore, assuming the 288 load resistance is constant; the manufacturer's side resistance 289 must be adjusted. One method of impedance matching is 290 the use of power converters that equalize the resistance of 291 both the consumer and the producer. This paper uses a boost 292 converter (chopper circuit). 293 Various controllers have been introduced so far for MPPT, 294 but one of the simplest is the hill-climbing (HC) method. 295 In this method, the basis of the search is the slope of the 296 diagram, i.e., if it (dP/dV) is positive, the system is on the 297 path to the hill, but if it is negative, it means that the movement 298 is in the opposite direction of the peak, and the power value 299 is moving away from its apex, and zeroing the slope means 300 being at the peak of the P-V diagram [33]. Changes in the 301 duty cycle are applied by subtracting or adding a constant 302 number (assuming 0.05 here) to it. Then, the power change 303 is analyzed; if the power is higher than before, the following 304 change will be applied in the same direction. Otherwise, 305 it will be in the opposite direction of the first perturbation. 306 This method is straightforward, but when it reaches the peak 307  was presented in [43]. There is a review on the intelligent 315 solar photovoltaic MPPT techniques in [44]. Intelligent con-316 trol strategies are very popular due to their ease of use and 317 their robustness [45]. Besides, the use of optimized fuzzy 318 controllers with meta-heuristic algorithms has received much 319 attention [46], [47], [48], [49]. These methods have a much 320 better performance compared to classical methods such as 321 the hill-climbing method. In this paper, we use an optimized where P t is the power and V t is the voltage at time t. In other 330 words, E shows the slope of the P-V diagram. When error and 331 its change become zero, the system is at its maximum power.

345
The structure of the fuzzy controller is shown in Fig. 6. be adjusted to optimize the performance of the controller. 349 The invasive weed algorithm (IWA) is used to optimize the 350 performance of the fuzzy controller considering the following 351 performance index: The flowchart of the IWA is shown in Fig. 7.

354
The optimized gain are K 1 = 0.15 and K 2 = 70. The 355 optimized rule-base is presented in Table 2. 356 For example, as shown in Table 2, when the error and its 357 change are exactly zero, the following rule is activated: If the error and its change be exactly zero, being at the 360 maximum power, the duty cycle will be 0.5, i.e. the center 361 of the membership function M.

362
When the error is negative, the system is at the left of the 363 pick power in the P-V curve based on Eq. 16. The value of 364 the duty cycle D is dependent on the change of error value 365 (Table 2). If the change of error value is exactly zero, the 366 system is in the vicinity of the maximum power, and the duty 367 cycle is computed based on the following rules: The dynamics of the pump and motor are coupled. More-372 over, the pump load (T L ) is unknown and is considered as 373 a disturbance. So, a fuzzy-PID controller is designed which 374   is robust and suitable for nonlinear systems. In fuzzy-PID 375 controller, the controller gains are derived based on IF-THEN 376 fuzzy rules [50].

377
In this subsystem, the pressure of the system should be  as the control inputs (Fig. 3). The proposed controller should 391 not only stabilize the outputs of the subsystem to their desired 392 values but also should be able to compensate for the uncer-393 tainties and disturbances.

397
The SDRE controller is a generalization of the infinite-398 horizon time-invariant LQR controller for nonlinear systems. 399 The weighting matrices and the algebraic Riccati equation 400 (ARE) are state-dependent. At each time step, these matrices 401 are constant, and the LQ optimal control problem is solved 402 in each time step. Moreover, the LQR controller is robust in 403 dealing with disturbances and uncertainties. In the SISO case, 404 the LQR design has >60 • phase margin, infinite gain margin, 405 and a gain reduction tolerance of −6dB. Hence, the SDRE 406 controller is robust similarly.

407
The nonlinear optimal regulator control method or the 408 State-Dependent Riccati Equation (SDRE) controller solves 409 an algebraic Riccati equation to generate the optimal con-410 trol law. The unique feature of this method is that due to 411 the state-dependent nature of the coefficients, the Riccati 412 equation is solved in each step with different coefficients. 413 This means that the feedback control gain at each stage is 414 different from the previous stage. The control law is able to 415 actively adjust itself in response to changes in system param-416 eters. In addition, the degrees of freedom of the controller 417 design increase due to the existence of non-unique and state-418 dependent coefficients.
419 Consider a nonlinear system as follows:         (19) for all values of x. 459 The representation of the matrix A(x) is not unique when 460 the order of the system is 2 and more. When A 1 (x) and A 2 (x) 461 are two different representation of f (x), another representa-462 tion cab be as follows: The parameter α should be chosen such that the pair 465 A (x) , B (x) has more degree of controllability. In other 466 words, the controllability matrix ( c ) determinant becomes 467 maximum, where: The closed-loop dynamics is as follows: So, the feedback gain is as follows: As can be seen from these equations, the control gain depends small enough, so that: Therefore, for any state-dependent parameterization, if the 492 nonlinear system is controllable and observable, the closed-493 loop solution will always be asymptotically stable.
The derivative of V (x) is: Therefore,V < 0 and since parameterization A(x) is control-507 lable and observable, there is a constantP > 0 such that: The above equation determines that when ||x|| → ∞, 510 V (x) → ∞. So, the equilibrium point in the origin is always 511 asymptotically stable [55].

512
To track the desired output, the integral controller is used 513 as follows: where v b,des and v r,des are the desired values of v b and v r . So, 517 the dynamics of the RO subsystem is as follows:  Matrix A(x), B(x), Q(x), and R(x) are considered as follows:

527
In this section, several simulations have been done to show 528 the robustness and effectiveness of the proposed controllers. 529 MATLAB/Simulink environment is used for simulation by 530 the parameters of the system are presented in Table 3.

531
The block diagram of the whole system is shown in 532 Fig. 1.

533
The performance of the IWA-optimized MPPT fuzzy 534 (Fuzzy-IWA) controller in comparison with the hill-climbing 535 method in different radiation intensities is shown in Fig. 9. 536 Solar radiation is started with E = 1000 W /m 2 and changed to 537 VOLUME 10, 2022  The proposed fuzzy-IWA controller is not only optimal 545 but also has simpler structure and less membership functions 546 which causes faster response time in comparison with other 547 MPPT fuzzy controllers [44], [56], [57]. The fluctuations 548 of the hill-climbing method can be decreased by lowering  The behavior of the motor-pump subsystem is presented 560 in Fig. 10. Tracking of the desired speed is done perfectly 561 by the induction motor and the dynamics of tracking is 562 good. As shown in Fig. 8, the desired speed comes from the 563 pressure control loop. So, the appropriate flow rate is fed 564 by the pump into the membrane to supply desired pressure 565 for the RO membrane. The electromagnetic torque, direct 566 stator current, and rotor flux are shown in Figs. 10b-d. 567 The electromagnetic torque is settled to a higher value than 568 T L to attenuate the effect of friction. As shown, the direct 569 flux is kept constant which is in accordance with the FOC 570 method.

571
The desired system pressure is P sys = 457.51 psi [25] 572 which should be reached by adjusting the feed flow rate; and 573 the feed flow rate depends on the induction motor speed. 574 In this study, the feed flow speed is constant (Fig. 11-a) and 575 the feed flow rate into the RO membrane is adjusted by a 576 bypass valve.  The response of the permeate stream speed is shown in 587 Fig. 11d, which depends on the bypass and retentate stream 588 speeds (Figs. 11b-c). The behavior of the pressure of the 589 system is shown in Fig. 12. As shown in these figures, the 590 rise time and overshoot are appropriate.

591
The response of the pressure of the system (Fig. 12) shows 592 the good performance of the fuzzy-PID controller. The sys-593 tem pressure is adjusted to its desired values after some 594 deviations which are due to the transient phase of the system.

595
It should be noted that reaching the desired system pressure 596 is essential for the RO subsystem.

597
The control inputs for the RO subsystem are shown in 598 Fig. 13 which shows that the variation of e vb is more than 599 e vr . At first, e vr is zero and then rises to its final value while 600 e vb increases sharply at first and then settles to its final value. 601

602
In this section, some variations on the parameters of the 603 system are applied to show the robustness of the proposed 604 controllers. To this aim, changes in feed water concentration, 605 rotor resistance, and noise in outputs are applied.

606
The performance of the system in dealing with changes 607 in the feed water concentration is shown in Fig. 14. The 608 feed water concentration varies from its nominal value up to 609 four times the nominal value. As shown in this figure, the 610 SDRE controller can overcome the uncertainty in feed water 611 concentration.

612
As expected, by increasing the feed water concentration, 613 the permeate stream speed decreases (Fig. 14d). This is due to 614 an increase in osmotic pressure which increases the resistance 615 of the flow inside the membrane. So, the feed flow rate must 616 VOLUME 10, 2022 be decreased to preserve the system pressure at its desired 617 value (Fig. 11a). Moreover, the outputs track their desired 618 value with no steady-state error that presents the robustness 619 of the SDRE controller (Figs. 11b-c).  (Fig. 16d) and the system pressure is near 635 its desired value (Fig. 16f). However, the system pressure 636 is regulated to its desired value. It is proved that the SDRE 637 controller is able to immune the system in dealing with large 638 measurement noises.

640
The real PV-RO system maybe deals with different faults. So, 641 in this section, the performance of the proposed controller in 642 dealing with faults is considered.

643
At first, to test the fault-tolerant control of the field-644 oriented controller (FOC), variations in rotor resistance are 645 considered. Two increases in rotor resistance are imposed, a 646 50% increase at t=5s and then to 100% at t=10s (Fig. 17a). 647 The behavior of the system in dealing with changes in rotor 648 resistance is shown in Fig.17. As shown in this figure, the 649 closed-loop system has appropriate performance in dealing 650 with changes in rotor resistance.

651
The tracking of the desired speed is shown in Fig. 17b 652 which shows that the small effect of rotor resistance changes 653 on system behavior. Moreover, the electromagnetic torque 654 remains constant and just a small drop occurs while the rotor 655 resistance changes. The effect of rotor resistance changes on the system pressure is very small (Fig. 17d)