## 1 Introduction  
Water scarcity has become a progressively growing problem worldwide due to the accelerated increase in water demand, which is expanding nowadays at a rate never seen before in any previous time [1; 2; 3; 4; 5]. Therefore, the effective management of water resources is a challenge to face the complexity of the real problem [6; 7; 8; 9]. Currently, to solve the growing global demand for freshwater, the desalination of brackish and seawater is being used [10; 11; 12]. Desalination is a powerful and hopeful technology for obtaining freshwater, and in many countries with scarce water resources, represents the only solution [13; 14; 15]. Desalination is a water treatment process that removes salt and other minerals from brackish and seawater to make them suitable for human consumption and/or industrial and agriculture use [16]. Water with salinity less 500 mg/L is adequate for human use [17]. The desalination process essentially separates saline water into two streams--one that has a low salt concentration (permeated flowrate, or product water), and the other with a higher salt concentration than the original feed water (prime flowrate, or simply concentrate) [18]. The seawater desalination is an energy-intensive consumption process [19; 20; 21; 22; 23]. There are two main possibilities to obtain desalted seawater: (a) thermal processes and (b) membrane processes [17]. However, membranes-based processes are the most energy-efficient option [24]. Consequently, reverse osmosis (RO) desalination method has become as one of the essential technologies for the commercial desalination industry, as well as the most commonly used approach to increase the provision of freshwater around the world [25]. Thereby, brackish and seawater RO desalination plants are quickly increasing in the world [26]. Sewater RO desalination plants need an effective controller to increase their performance, as well as to keep their operations close to the optimum conditions, which results in higher efficiency, along with extending the lifetime of their membranes [27; 28; 29]. Nevertheless, the effective control of these plants is not a simple assignment and has several challenges, among which are: (a) the dynamic processes in the membrane vessels are complex and cannot easily be modelled; (b) for the operation of the high-pressure pump, a large amount of energy is required; (c) the feed seawater features variations can considerably change the performance of the RO membrane units, which leads to lower water production, deficient system operations, membranes fouling or irreversible membranes damages; (d) the high-pressure setpoint has to be increased several times a day for compensation of the membranes fouling effect and to bring the permeate flowrate back to its operation value, which usually is done manually by plant operators; (e) continuous monitoring of membranes fouling is required to determine the appropriate time for membranes flushing (cleaning in place by chemical detergents is applied when membrane flushing is not sufficient to recover the good membranes performance); and (f) the operators of these plants are trained by conventional methods that only enable them to maneuver the infrastructures and not to control and manage these plants efficiently [30; 31; 32]. In addition, these plants have uncertainties, multivariable coupling, load disturbances, and dynamics dependent on the operation conditions, since a few of their parameters, such as the membrane permeability, are time-varying due to membranes fouling [33; 34; 35]. Membranes fouling result from the accretion of undesirable particles inside or around the membranes [36].