# Evaluation of Different Control Algorithms for Carbon Dioxide Removal with Membrane Oxygenators
## 3 Results and Discussion  
All controllers were able to track the reference signal accurately, while rejecting the disturbance acting on the system. Figure 3 shows a 250 s long snip from the experiment. The PI and NMPC signals had a very similar appearance, which was also confirmed by the measured signal characteristics in Table 1. The steady state error of the PI was larger than the NMPC; however, the NMPC showed an action delay of around five samples, or 25 ms, as can be seen in Figure 3. This action delay could explain the higher RMSE of the NMPC, compared to the PI, even though its steady state error was generally lower--0.17 mmHg vs. 0.29 mmHg. The RL controller had the highest steady state error at 0.5 mmHg, and the high rise and settling time increased its overall RMSE further. Additionally, often the RL controller did not even reach the reference, with less than 2% error in 50% of the cases in the given 15 s window. In comparison, the PI did not reach the reference in 16% and the NMPC in only 10% of the cases. From Figure 3, it can also be seen that the blood flow rate signal of the PI showed the highest spectral density, compared with RL and NMPC. The gas flow rate signal for NMPC had the highest spectral density, while for RL, it was almost constant. More than 99.993% of the sweep flow rate values of RL were at the maximum of the range (Figure 2). PI also showed quite polarizing values for the gas flow rate. Around 70% of all gas flow rates were either the maximum or the minimum of the range. Even  
Figure 2: Statistics of the results of the experiments: (**a**) the distributions for the control action and reference tracking error for each controller; (**b**) distributions for the reference signal and the disturbance signal. though the NMPC controller also tended towards maximum gas flow rate values, its actions were more evenly distributed than RL and PI. The reference tracking error of the NMPC had a mean of \(-0.12\) mmHg and a standard deviation of \(1.09\) mmHg. The PI error had a mean value of \(-0.29\) mmHg and a standard deviation of \(1.03\) mmHg. The RL error had a \(1.37\) mmHg standard deviation with a \(0\) mean. Table 1 summarizes the results of the measured characteristics during the experiments. The PI showed the lowest RT at \(1.18\) s, the lowest RMSE at \(1.06\) mmHg, and the lowest ST at \(2.24\) s. However, the PI also showed the most variance in its actions, while the RL produced the most stable inputs for the gas flow rate. For the blood flow rate, the NMPC produced the least varying actions. The NMPC showed the least power consumption for both the blood and gas flow rates, while RL showed the most for gas flow rate and PI for blood flow rate. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **PI** & **NMPC** & **RL** \\ \hline RT [s] & \(1.18\) & \(1.33\) & \(4.9\) \\ \hline ST [s] & \(2.24\) & \(3.57\) & \(7.6\) \\ \hline RMSE [mmHg] & \(1.06\) & \(1.09\) & \(1.37\) \\ \hline \(P_{Q_{g}}\) [\(\mathrm{L^{2}s^{-2}}\)] & \(6.7\times 10^{-3}\) & \(4.1\times 10^{-3}\) & \(8\times 10^{-3}\) \\ \hline \(P_{Q_{b}}\) [\(\mathrm{L^{2}s^{-2}}\)] & \(2.2\times 10^{-3}\) & \(1.4\times 10^{-3}\) & \(2\times 10^{-3}\) \\ \hline \(\sigma_{Q_{g}}\) [\(\mathrm{mLs^{-1}}\)] & \(6.53\) & \(6.53\) & \(0.03\) \\ \hline \(\sigma_{Q_{b}}\) [\(\mathrm{mLs^{-1}}\)] & \(6.3\) & \(5.05\) & \(5.95\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Results of the control experiments. The PI, NMPC, and RL controllers were assessed based on rise time (RT), settling time (ST), root-mean-squared error (RMSE), action power P, and action standard deviation \(\sigma\). Figure 3: Results of the control experiments. The top row shows setpoints and manipulated variable—\(P_{\mathrm{CO},g\uparrow}\) for the three controllers. The bottom row shows the actions taken—sweep flow rate (SFR) and blood flow rate (BFR)—by each controller for a snip of the reference tracking task. The disturbance S is also shown.