# Advanced Construction of the Dynamic Matrix in Numerically Efficient Fuzzy MPC Algorithms
## 3 Example
### Experiments  
For the considered control plant, a few MPC algorithms were designed:  
* NMPC--based on the nonlinear model and nonlinear optimization and numerically efficient FMPC algorithms with advanced free response generation, proposed in [12], and:
* FMPC1 with the conventional dynamic matrix and the classical performance index,
* FMPC2 with the conventional dynamic matrix and the modified performance index,
* FMPC1a with the advanced dynamic matrix and the classical performance index,
* FMPC2a with the advanced dynamic matrix and the modified performance index. The simulation experiments were done using MATLAB. During the experiments, the operation of the control systems with the NMPC and FMPC algorithms was compared. The FMPC algorithms use the nonlinear model in the form of state equations, to generate the free response and the fuzzy model (23) to obtain the dynamic matrix. A sampling time equal to \(T_{\mathrm{s}}=3.6\) s was assumed; the values of tuning parameters were as follows (if not declared otherwise): prediction horizon \(p=70\), control horizon \(s=35\), and weighting coefficient \(\lambda=0.001\). The responses of the control systems to changes in the setpoint and to the change of the disturbance by \(10\%\) in the \(6\)th minute of the experiment are shown in Figures 3 and 4. If the setpoint was changed to \(\overline{C}_{B1}=1\) mol/L, the responses obtained in the control system with the FMPC1a algorithm (magenta lines in Figure 3) and with the FMPC1 algorithm (blue lines in Figure 3) were very close to those obtained with the NMPC algorithm with  
Figure 1: Steady-state characteristic of the control plant. Figure 2: Membership functions of the fuzzy model used to obtain the dynamic matrix. nonlinear optimization (red lines in Figure 3). In all cases, there was almost no overshoot. The FMPC algorithms were slightly faster than the NMPC algorithm. In the case when the setpoint changed to \(\overline{C}_{B2}=1.25\) mol/L, the response obtained with the FMPC1 algorithm was the fastest one. The one generated with the NMPC algorithm was the slowest, and the response obtained with the FMPC1a algorithm was between these two responses; it was closer to the response generated with the NMPC algorithm than the response obtained with the FMPC1 algorithm. This is because the prediction used in the FMPC1a algorithm, thanks to using the advanced construction of the dynamic matrix, is more accurate. In the case of all the algorithms, the setpoint was reached without overshoot. Disturbance responses obtained with the FMPC1 and the FMPC1a algorithms were practically the same. Near \(C_{B}=1\) mol/L, the response generated with the NMPC algorithm was very close to the other responses. In all three cases, there was no overshoot. In the case of operation near \(C_{B}=1.25\) mol/L, the NMPC was faster in the compensation of the disturbance change than the FMPC algorithms. The FMPC2 and FMPC2a algorithms worked faster than FMPC1 and FMPC1a. However, the same relations between the algorithms could be observed when the responses generated with FMPC2 and FMPC2a algorithms were compared with the ones obtained with the NMPC algorithm (Figure 4). If the setpoint was changed to \(\overline{C}_{B1}=1\) mol/L, the responses obtained with all the algorithms (FMPC2, FMPC2a, and NMPC) were very close to each other. There was almost no overshoot, and the FMPC2 algorithm was slightly slower than the other algorithms. In the case when the setpoint changed to \(\overline{C}_{B2}=1.25\) mol/L, the response obtained with the FMPC2 algorithm was the fastest one. The one generated with the NMPC algorithm was the slowest, and the response obtained with the FMPC2a algorithm, for the same reason as in the case of the FMPC1a algorithm, was between these two responses. In the case of all the algorithms, the setpoint was reached almost without overshoot. The disturbance responses obtained with the FMPC2 and FMPC2a algorithms were practically the same (the same phenomenon was observed in the case of the FMPC1 and FMPC1a algorithms).