## 4 Results and Discussions  
The designed Expert MPC was programmed and real-time implemented in the remote supervision station of the pilot-scale RO desalination plant under study (see Figure 1). In order to evaluate the performance and robustness of the designed Expert MPC controller, two real-time tests were developed based on real industrial operation scenarios involving demanded setpoint changes. Moreover, a step disturbance to all plant outputs was applied at different time instants. The controllers' performance was evaluated based on the settling time, overshoot and steady state error obtained from the plant steps changes responses. To ensure the rapid fouling of the membranes, the water used in this plant is rich in dissolved and suspended solids. The first test scenario was developed to validate the performance of the Expert MPC, as well as its rejection to the negative impact of the plant time-varying parameters near specified nominal operating conditions. The design parameters of the Expert MPC were next: The sampling period was established at \(T=10\) s, the minimum and maximum prediction horizons were set like \(N_{1}=3\), \(N_{2}=15\) samples respectively, the control horizon was established as \(N_{u}=3\), and the positive definite weighting matrices were set like \(R=diag(5,\,1)\) and \(Q=diag(1,\,6)\), respectively. Figure 6 shows,in the PanelView 1500 of the pilot-scale plant, the real-time closed-loop responses of the control system with the designed Expert MPC. In this figure, at time \(t=25\) s, simultaneous step changes were applied at the setpoint (SP) of the permeate flowrate that increased it from 5 l/min to 20 l/min, as well as at the setpoint (SP) of the permeate conductivity that decreased it from 580 uS/cm to 430 uS/cm. Figure 7 shows an enlargement of the results exhibited in Figure 6, and Figure 8 exhibits the control signals of the designed Expert MPC. Figure 6: Real-time closed-loop responses of the control system with the designed expert model predictive controller (Expert MPC) to simultaneous steps changes at the setpoints of the critical variables, in the PanelView 1500 of the pilot-scale plant. Figure 7: Enlargement of the results exhibited in Figure 6, where: (**a**) Permeate flowrate response; (**b**) Permeate conductivity response. From Figure 6, it is observed that the permeate flowrate and the permeate conductivity attain the new setpoints (20 l/min, 430 \(\upmu\)s/cm respectively) with a setline time (\(t_{s}\)) of approximately 125 s, and with an undershoot (\(M_{p}\)) of 12.5% for the permeate conductivity. However, due to membranes fouling, time variations in the dynamic parameters of the plant take place from time \(t=200\) s, and consequently the permeate flowrate decreases and the permeate conductivity increases; therefore, the time responses of the control system worsen. As in this test scenario, the error signal \(e(k)\) between the output vector of the plant \(y(k)\) and the output vector of the prediction model \(\hat{y}(k)\) is greater than the value of the threshold error \(e_{n}\); the first rule of the expert system is triggered, and therefore the parameters of the prediction model are tuned by the expert system (see Figure 4). Consequently, at time \(t=290\) s, the time responses of the control system return to their operations values with zero steady-state errors. Thus, the designed Expert MPC keeps its robust performance throughout this test scenario. The second test scenario was performed to comparatively evaluate the performance of the designed Expert MPC against another standard MPC designed under the same conditions but without the expert system. In this test scenario, at time \(t=15\) s, simultaneous step changes were applied at the setpoint of the permeate flowrate, that increased it from 22 l/min to 30 l/min, as well as at the setpoint of the permeate conductivity that decreased it from 480 \(\upmu\)S/cm to 425 \(\upmu\)S/cm. The real-time closed-loop responses and control signals of this test scenario are displayed in Figures 9 and 10 respectively.