# Real-Time Model Predictive Control of Human Bodyweight Based on Energy Intake
## 3 Results and Discussion
### Simulation Model Predictive Control  
Several MPC systems are developed using both the time-invariant and time-variant parameters transfer function models tested in the previous sub-sections. In order to test the capabilities of the controller for each individual participant, the bodyweight collected during the experiment is used as reference bodyweight curve and then the energy intake advised by the controller is compared with the measured energy intake. First, simulations are performed without any constraint to the system. Next, simulations with constraints are performed as well. In Figure 4, a comparison between the energy intake suggested by the different controllers and the energy intake collected during the experiments is displayed. The results have shown that the developed MPC, using the time-variant parameters DARX model, suggested an energy intake which is closest (see Table 6) to the actual energy intake collected during the experiment in comparison to that suggested by the MPC developed using time-invariant models. The MPC developed using the time-invariant model with constraints and the one using the DARX model without constraints perform similarly. Finally, the MPC developed using the time-invariant model and without constraints suggests an energy intake, which follows completely different dynamics. In addition, all MPC systems tested generate similar bodyweight curves, which follow closely the reference bodyweight curve. In order to quantify this visual inspection, Table 6 shows a summary of the _NRMSE_, _RMSE_ and \(r\) values when comparing the measured energy intake and bodyweight curves with those estimated from the different controller simulations. Besides, the _RMSE_ between the final weight achieved by the participant and the final weight obtained in the different controller simulations is summarized in Table 7.  
Figure 4: In (**a**), the energy intake curves suggested by the model predictive control (MPC) (dashed colored lines) compared with the energy intake measured (solid blue line) during the Minnesota starvation experiment are shown for participant 15. In (**b**), the bodyweight time course obtained following the MPC suggestions (dash colored lines) compared with the bodyweight measured (solid blue line) during the Minnesota starvation experiment is shown for participant 15. The different MPCs tested are the MPC using a time-invariant parameters transfer function model, without (red *) and with constraints (yellow square), and the MPC using the time-variant parameters DARX model, without (purple circle) and with constraints (green diamond). It can be seen that the best performance is obtained when using the DARX model in the controller with constraints in the simulation. The _RMSE_ for bodyweight and energy intake is only 260 g and 9 kcal day\({}^{-1}\), respectively. Moreover, the difference between the final bodyweight and energy intake values from all MPC's and the measured ones during the experiment are, on average, lower than 440 g and 12 kcal day\({}^{-1}\), respectively. These results highlight again the need to use individualized time-variant parameters models to develop a MPC capable to manage automatically the individualized advice of energy intake to achieve a desire bodyweight change. However, this does not necessarily mean that the other MPCs are suggesting completely wrong energy intake levels. As it can be seen in Figure 4, all outcome bodyweight curves from the MPCs follows closely the reference one. Thus, these suggested energy intake curves should be understood as alternative possibilities that, in principle, would have taken the participant to similar end bodyweight without lowering suddenly the energy intake, but by lowering the energy intake following another pattern. When starting to lower the energy intake following one of these alternative curves, it would be still needed to develop a time-variant model to monitor the performance of the test subject in real-time and adapt the suggested curves to the new conditions.