## 2 System Identification of the Pilot-Scale Seawater RO Desalination Plant
The SCADA also allows storing the plant signals of interest in a database and its export to other applications, as well as the alarm's generation and verification of potential failures, and the suggestion of different decision-making. The design of MPC requires mathematical models that accurately describe the most relevant dynamic behavior of the plants to be controlled [57; 71]. In the last years, for the development of adequate mathematical models of complex industrial plants, systems identification tools are being used successfully, see e.g., Refs. [74; 75; 76; 77; 78]. The main goal of a seawater RO desalination plant is to produce desalted water with a low total dissolved solids (TDS) index [17]. However, the permeate conductivity is used to evaluate the quality of the desalted water obtained because it is not possible to measure the TDS on-line [11]. Then, the permeate conductivity must be maintained within a certain range of values to guarantee the required quality of the desalted water. For example, for human consumption, the permeate conductivity should be maintained in a range of 400-500 \(\upmu\)S/cm [17]. In addition, an augment in the permeate conductivity implies an increment in the membrane fouling and/or variations in the dynamic parameters of the RO desalination plant [45]. Figure 2: Schematic representation of the pilot-scale seawater RO desalination plant under study. The RO desalination plant is a multivariable process, with two input variables and two output variables that must be controlled simultaneously. Each RO high-pressure feed pump is equipped with a variable frequency drive (speed variator) to change the rotational speed of the pump, which in turn varies both the flow rate and the pressure of the incoming stream to the RO rack. Moreover, in industrial practice, to change the concentration of the permeate flowrate, the brine flowrate is adjusted by varying the position of the brine flowrate control valve. Therefore, in this plant, the critical variables that must be controlled are: the permeate flowrate \(\mathrm{Q_{p}(t)}\) through the high feed pressure \(\mathrm{P_{f}(t)}\), and the permeate conductivity \(\mathrm{C_{p}(t)}\) by means of the brine flowrate \(\mathrm{Q_{b}(t)}\). Through the application of the systems identification tools [74], a mathematical model that describes the dynamic behaviour of the pilot-scale plant under study was obtained, which is represented by the expression:  
\[\left[ \begin{array}{c}Q_{p}(s)\\ C_{p}(s)\end{array} \right]=\left[ \begin{array}{cc}G_{11}(s)&G_{12}(s)\\ G_{21}(s)&G_{22}(s)\end{array} \right]\times\left[ \begin{array}{c}P_{f}(s)\\ Q_{b}(s)\end{array} \right] \tag{1}\]  
where:  
\[\mathrm{G_{11}(s)}=\frac{\mathrm{Q_{p}(s)}}{\mathrm{P_{f}(s)}}=\frac{0.01895(0. 7492\;\mathrm{s}+1)}{0.1150\mathrm{s}^{2}+0.4028\;\mathrm{s}+1} \tag{2}\]  
\[\mathrm{G_{12}(s)}=\frac{\mathrm{Q_{p}(s)}}{\mathrm{Q_{b}(s)}}=\frac{-0.01238( 0.3421\;s+1)}{0.1060\mathrm{s}^{2}+0.6018\;s+1} \tag{3}\]  
\[\mathrm{G_{21}(s)}=\frac{\mathrm{C_{p}(s)}}{\mathrm{P_{f}(s)}}=\frac{-0.4091( 0.2547\;s+1)}{0.4150\mathrm{s}^{2}+0.8048\;s+1} \tag{4}\]  
\[\mathrm{G_{22}(s)}=\frac{\mathrm{C_{p}(s)}}{\mathrm{Q_{b}(s)}}=\frac{-0.6991( 0.1387s+1)}{0.5249\mathrm{s}^{2}+1.6516\;s+1} \tag{5}\]  
Figure 3 shows the validation results of the mathematical model obtained of the seawater RO desalination plant under study, which exhibit degrees of accuracy (FIT) of 94.4%, 90.8%, 94.11%, and 90.2% respectively. Therefore, the model (1) adequately describes the dynamic behaviour of the plant under study and consequently can be used in the design of MPC.