Open Access
This article is

- freely available
- re-usable

*Appl. Sci.*
**2019**,
*9*(13),
2609;
https://doi.org/10.3390/app9132609

Article

Real-Time Model Predictive Control of Human Bodyweight Based on Energy Intake

^{1}

Department of Biosystems, Division Animal and Human Health Engineering, M3-BIORES: Measure, Model & Manage of Bioresponses Laboratory, KU Leuven, Kasteelpark Arenberg 30, 3001 Heverlee, Belgium

^{2}

Nutrition & Obesity, Clinical and Experimental Endocrinology, Department of Chronic Diseases, Metabolism and Aging, KU Leuven, UZ Herestraat 49, 3000 Leuven, Belgium

^{3}

Clinical Nutrition Unit, Department of Endocrinology, University Hospitals Leuven, 3000 Leuven, Belgium

^{*}

Author to whom correspondence should be addressed.

Received: 3 June 2019 / Accepted: 25 June 2019 / Published: 27 June 2019

## Abstract

**:**

## Featured Application

**This work sets the basis for developing a control system that allows managing, in an automated and individualized manner, human bodyweight in terms of energy intake, by taking advantage of the real-time monitoring capabilities of the ever-growing wearable technology sector.**

## Abstract

The number of overweight people reached 1.9 billion in 2016. Lifespan decrease and many diseases have been linked to obesity. Efficient ways to monitor and control body weight are needed. The objective of this work is to explore the use of a model predictive control approach to manage bodyweight in response to energy intake. The analysis is performed based on data obtained during the Minnesota starvation experiment, with weekly measurements on body weight and energy intake for 32 male participants over the course of 27 weeks. A first order dynamic auto-regression with exogenous variables model exhibits the best prediction, with an average mean relative prediction error value of 1.01 ± 0.02% for 1 week-ahead predictions. Then, the performance of a model predictive control algorithm, following a predefined bodyweight trajectory, is tested. Root mean square errors of 0.30 ± 0.06 kg and 9 ± 3 kcal day

^{−1}are found between the desired target and simulated bodyweights, and between the measured energy intake and advised by the controller energy intake, respectively. The model predictive control approach for bodyweight allows calculating the needed energy intake in order to follow a predefined target bodyweight reference trajectory. This study shows a first possible step towards real-time active control of human bodyweight.Keywords:

weight loss; mHealth; dynamic model; adaptive control## 1. Introduction

Managing one’s own weight can be a difficult task to perform [1]. In order to assist people in managing their weight, it is important to know the required calorie intake. An imbalance in energy intake versus energy expenditure over a longer period can lead to severe changes in body weight [2]. A positive energy balance, meaning that the energy intake is higher than the energy expenditure, results in an increase in body fat [3]. A long-term positive energy balance can lead to overweight (body mass index (BMI) = 25–29.9 kg·m

^{-2}) or even obesity (BMI ≥ 30 kg·m^{-2}), a syndrome that negatively affects the cardiovascular system [4]. Obesity is associated with different clinical manifestations such as diastolic dysfunction [5], cancers [6], atrial fibrillation due to pericardial fat [7], hypertension and coronary heart diseases [4]. In 2010, obesity caused more than 3 million deaths worldwide [8]. In 1975, the total number of obese men and women amounted up to 34 million and 71 million, respectively. These numbers rose up to 266 million men and 375 million women in 2014 [4], reaching more than 1.9 billion overweight people in 2016 [9]. Furthermore, the most worrisome trend is the rising rates of obesity in children and adolescents, the prevalence of which tripled between 1971 and 2002 [10]. By contrast, a negative energy balance leads to being underweight. Its prevalence in developed nations is increasing due to voluntary and involuntary caloric restriction [3]. Therefore, a prolonged imbalance in energy intake is a risk factor for several diseases (e.g., diabetes, anorexia of ageing) and affects a large number of people. Thus, it is important to find new and more efficient ways to monitor and control body weight [11].Health professionals (e.g., dietitians, physical trainers) are qualified to assist individuals in their quest to obtain an optimized energy balance. Based on our own research, we have proven that digital applications (e.g., use of smartphone, wearables…) can assist in optimizing the energy balance and the health professionals are considered as buddies [12]. Nowadays, smartphones and wearables are suitable tools to collect and process information. The built-in digital cameras, sensors, storage capabilities and wireless connectivity of smartphones can be beneficial for automatic dietary monitoring [13,14]. In addition, smartphone applications are able to give direct feedback and are already used as tools to monitor physical health [15]. Currently, there are numerous smartphone applications available to track in an individualized and objective manner weight, physical activity and dietary energy intake [16,17]. However, studies show that the engagement of individuals with these apps decreases after some time, even when personalized suggestions are provided [15,18,19]. One of the contributing aspects to this may rely on the fact that nowadays, empirical equations describing the nutrition process are used to predict weight loss and/or to advise dietary energy intake levels. Although these equations are extremely relevant to gather knowledge about the nutrition process, their parameters are estimated at a population-based level. Therefore, inaccurate predictions or suggestions are obtained when applied to data from a single individual. This can diminish the trust in the smartphone app, leading to a loss of engagement and adherence to the suggestions, finally quitting its use [18,19,20].

Past and current theoretical models describing the nutrition process are based on the first thermodynamics law on energy conservation [2,21]. Based on some of the earliest models proposed, still nowadays, many health institutions recommend reducing daily calorie intake with 2 MJ to lose 0.5 kg in 1 week, known as the 3500 kcal rule [21]. However, comparisons between weight loss predicted by the 3500 kcal rule and dynamic models are performed, confirming the invalidity of this rule [22,23]. The human body has its own feedback system to regulate body mass, meaning that an increase or decrease of energy intake does not directly relate to a change in body mass [24,25]. Decades ago, multiple dynamic models describing changes in bodyweight based on changes in energy expenditure and energy intake were already proposed to account for this [24,25,26,27,28]. Even models applied during starvation were proposed with the aim of characterizing how the body stores and metabolizes energy in the absence of food [29,30]. Besides, more complex models attempting to refine the description of the adaptation process of the human body during weight loss, as perturbations to the macronutrients metabolization and energy flux balances, have been proposed [2,31,32,33]. The main drawbacks of these models are their high complexity and the fact that they rely on several a priori assumptions and parameter estimates based on population-based averages. These drawbacks are highlighted in [11,34] and reduced models are proposed, although the parameter estimates still rely on population-averaged values. It is also proposed that previous models addressed the body adaptation process as an open-loop systems instead as a closed-loop one [11].

Therefore, although theoretical models provide a good insight in weight control process, there are other external and internal factors, which affect macronutrient metabolization and energy flux balances and that should be considered. For instance, new insights from the domain of chrono-nutrition indicate that, the rate of energy absorption varies in time [35,36]. These recent insights determine the best time to consume meals and the suitable meal proportions and its impact on bodyweight status [37,38]. Therefore, the main limitation of the current models is that the algorithms are developed at population-based level and cannot account for the individual time-variant characteristics of each individual person. Biological systems, such as the human body, should be considered as complex, individual, time-varying and dynamic (CITD) systems [39]. Data-based mechanistic (DBM) models can be suitable for modelling such systems. While DBM models are based on a simple model structure, they allow coping with non-linear characteristics of the process by estimating the model parameters in real-time, which are only accepted if they can be interpreted in meaningful physical/physiological terms [40]. Even though real-time monitoring of weight is still at its early stages in humans, other sectors such as the farming industry already use real-time monitoring of weight to optimize feeding and breeding activities. Data-based modelling has already proven useful in the emerging precision feeding control in livestock [41,42]. In [41], an algorithm to control the growth trajectory of broiler chickens based on an adaptive dynamic process model is developed. In [43], this model predictive growth control is tested in a real broiler farm. In farm conditions, the mean relative error (MRE) between actual and target weight trajectories was 7.3%. Besides, the model proved to be beneficial in broiler farms, suggesting the possibility of using the model predictive control for other purposes such as for weight control in human beings [41].

Therefore, the aim of this work is to test the capabilities of DBM models to develop a model predictive control (MPC) system, which allows estimating individualized dietary energy intake needed to achieve a desired change in bodyweight. Such a system could be implemented easily in current smartphone applications for tracking weight, energy intake and physical activity in real time. Automatic, individualized and accurate dietary energy intake suggestions are expected to increase the engagement to the application and the adherence to the suggestions of the users, as well to assist dietitians in the individualized treatment of patients.

## 2. Materials and Methods

#### 2.1. Data Collection

The dataset used in this work is retrieved from an on-line accessible experimental dataset from the Minnesota starvation experiment, described by [30]. In this study, the energy intake of 32 male participants (age between 20 and 33 years old) is reduced to resemble the weight loss in undernourished prisoners of war. Prior to the 24 weeks of energy restriction (S1–S24), a 12-week control phase (C1–C12) is used to bring all participants as close to the group norm as possible. Information on daily energy intake for each participant during the control phase is available for only the last three weeks (C10–C12). For each participant, an average of daily energy intake for each week of the starvation period is specified. The starvation phase is followed with a recovery phase of 20 weeks (R1–R20). However, no information on daily energy intake is obtained during this last phase of the Minnesota starvation experiment. Physical activity is mandatory during both, control and starvation phases, and includes at least 35 km of walking per week. Total energy expenditure (TEE) is not directly measured but estimated based on resting energy expenditure (REE) and energy expended during physical activity (EEPA). REE is calculated the week prior to the starvation phase and at the end of the starvation phase. Therefore, no weekly estimation on TEE is provided. During the entire study, each participant is weighed once every week. Therefore, the dataset is comprised by the averages of body weight and daily energy intake from the last 3 weeks of the control phase and the entire starvation phase for the 32 test participants. The average height of the participants present in the dataset is H = (1.79 ± 0.06) m. The average initial and final bodyweights are BW

_{i}= (69.50 ± 0.10) kg and BW_{f}= (53 ± 4) kg. Finally, the average energy intake during the last three weeks of the control phase is EI_{c}= (3.5 ± 0.3)·10^{3}kcal day^{−1}, and the average energy intake during the starvation experiment is EI_{s}= (1.6 ± 0.2)·10^{3}kcal day^{−1}.#### 2.2. Modelling

A description of the basis for the data-based mechanistic framework tested is given in [40]. In essence, the data-based mechanistic approach firstly infers the deterministic model structure inductively from the data. Afterwards, this model structure, and associated parameters, are only accepted if they can be interpreted in physically meaningful terms according to the process under study [40]. Thus, in this study, firstly a time-invariant parameters single-input, single-output (SISO) transfer function (TF) modelling approach is used to identify the transfer function model structure, which allows characterizing the relation between the energy intake and bodyweight for each individual subject. Afterwards, in line with the aim of this study, the forecasting properties of time-variant parameters models, dynamic linear regression (DLR) and dynamic auto-regression with exogenous variables (DARX) models are studied in order to evaluate their potential to monitor in real-time and forecast the time-varying bodyweight development of the participants. Finally, the model selected as best, according to its performance in terms of the minimal mean relative prediction error (MRPE), is used to develop a model predictive controller and to simulate the energy intake advice by it. MATLAB

^{®}(MATLAB 2015b, The Mathworks, Inc.) Software and the CAPTAIN Toolbox is used to perform the data-based mechanistic approach [44,45].#### 2.2.1. Time-Invariant Single-Input, Single-Output (SISO) Transfer Function (TF) Model

For the system identification process, a SISO TF model with time-invariant parameters is tested. The model has the following general structure [46],
where $y\left(k\right)$ and $u\left(k\right)$ are the output (bodyweight [kg]), and the input (energy intake [kcal day
where ${a}_{j}$ and ${b}_{j}$ are the model parameters to be estimated; ${z}^{-1}$ is the backward shift operator, i.e., ${z}^{-1}y\left(k\right)=y\left(k-1\right)$, with y and k defined as in Equation (1); n

$$y\left(k\right)=\frac{B\left({z}^{-1}\right)}{A\left({z}^{-1}\right)}u\left(k-\mathsf{\delta}\right)+\xi \left(k\right)$$

^{−1}]) of the model, respectively; $\xi \left(k\right)$ is additive noise assumed to be zero mean, serially uncorrelated sequence of random variables with variance ${\sigma}^{2}$, accounting for measurement noise, modelling errors and effects of unmeasured inputs to the process; $k$ is the sample of the measurement; δ is the time delay of the input, expressed in number of time intervals; $A\left({z}^{-1}\right)$ and $B\left({z}^{-1}\right)$ are two series given by:
$$A\left({z}^{-1}\right)=1+{a}_{1}{z}^{-1}+{a}_{2}{z}^{-2}+\dots +{a}_{{n}_{a}}{z}^{-{n}_{a}}$$

$$B\left({z}^{-1}\right)={b}_{0}+{b}_{1}{z}^{-1}+{b}_{2}{z}^{-2}+\dots +{b}_{{n}_{b}}{z}^{-{n}_{b}}$$

_{a}and n_{b}are the orders of the respective A and B polynomials. The model parameters are estimated using a refined instrumental variable (RIV) approach [46]. Normally, the model is referred to as the triad [n_{a}n_{b}δ].In order to test the fitting accuracy of the different models estimated, the goodness of fit is quantified using the coefficient of determination, ${R}_{T}^{2}$. Its general expression is given by [46],
where ${\sigma}_{e}^{2}$ is the variance of the residuals, when comparing the model estimations with the output measured values, and ${\sigma}_{y}^{2}$ is the variance in the output. In addition, the Young information criterion (YIC) is estimated. It is given by the following expression [46],
where ${\sigma}_{e}^{2}$ is the variance of the residuals, ${\sigma}_{y}^{2}$ is the variance of the output, h is the number of estimated parameters, ${\widehat{p}}_{ii}$ are the diagonal elements of the covariance matrix from the parameters estimations and ${\widehat{a}}_{i}^{2}$ is the square value of the i-th parameter. The first term of YIC is simply a relative measure of how well the model explains the data. The smaller the model residuals the more negative the term becomes. The second term provides a measure of the conditioning of the instrumental variable cross product matrix. If the model is over-parameterized, then it can be shown that this matrix will tend to singularity and, because of its ill conditioning, the elements of its inverse will increase in value, often by several orders of magnitude. Then, the second term in YIC tends to dominate the criterion function, indicating over-parameterization [46].

$${R}_{T}^{2}=1-\frac{{\sigma}_{e}^{2}}{{\sigma}_{y}^{2}}$$

$$YIC=lo{g}_{e}\left(\frac{{\sigma}_{e}^{2}}{{\sigma}_{y}^{2}}\right)+lo{g}_{e}\left(\frac{1}{h}{\displaystyle \sum}_{i=1}^{h}\frac{{\sigma}_{e}^{2}\xb7{\widehat{p}}_{ii}}{{\widehat{a}}_{i}^{2}}\right)$$

#### 2.2.2. Time-Variant Parameters Models

As it is expected that the relationship between energy intake and bodyweight varies throughout the monitored period (i.e., behaves in a time-varying way), a dynamic auto-regression with exogenous variables (DARX) modelling approach is tested further. The model structure is similar to that described in Equation (1) but allowing the model parameters in the A and B series to vary over time [46]. The DARX expression is given by,
in which the previous A and B series described by Equations (2) and (3) are now expressed as,

$${y}_{t}=\frac{B\left({z}^{-1},t\right)}{A\left({z}^{-1},t\right)}{u}_{t-\delta}+\frac{1}{A\left({z}^{-1},t\right)}{e}_{t}$$

$$A\left({z}^{-1},t\right)=1+{a}_{1,t}{z}^{-1}+{a}_{2,t}{z}^{-2}+\dots +{a}_{{n}_{a},t}{z}^{-{n}_{a}}$$

$$B\left({z}^{-1},t\right)={b}_{0,t}+{b}_{1,t}{z}^{-1}+{b}_{2,t}{z}^{-2}+\dots +{b}_{{n}_{b},t}{z}^{-{n}_{b}}$$

In order to estimate the time-variable model parameters, a

_{i,t}and b_{i,t}, it is necessary to make some assumptions about the nature of their temporal variability. In this approach, it is assumed that they show a stochastic evolution described by a general random walk process [46] and they are estimated using a sliding window approach, similarly to the work of [47]. By this sliding window approach, the effect of obsolete data is minimized. In terms of the biological process, this time variation of the parameters allows the modelling approach accounting for external influences to the process, such as environmental or health aspects, which are not explicitly taken into account in the model [47].Following a similar procedure, a dynamic linear regression modelling approach is also tested. The DLR is the simplest state space model using time-variant parameters. Its general expression is given by:
where ${y}_{t}$ is the output or dependent variable (bodyweight); ${T}_{t}$ is a trend or low frequency component; ${b}_{i,t}$ are time-varying parameters over the observational interval which reflect possible changes in the regression relationship; and ${u}_{i,t}$ are the inputs of the model (energy intake), which are assumed to affect the dependent variable ${y}_{t}$ [46]. In this study, on each discrete time instant t, for feed amount or composition the linear relation can be written as:
with BW the measured bodyweight (kg) and EI the energy intake (kcal day
where BW

$${y}_{t}={T}_{t}+{\displaystyle \sum}_{i=1}^{m}{b}_{i,t}{u}_{i,t}$$

$$B{W}_{t}={c}_{1,t}+{c}_{2,t}E{I}_{t}$$

^{−1}) at time t. c_{1,t}(kg) and c_{2,t}(kg·kg^{−1}) are the time-variant model parameters estimated at time t. More specifically, the parameter c_{1,t}is expected to resemble the general bodyweight trend exhibited by each individual. Also, the parameter c_{2,t}, is expected to resemble the energy efficiency at time t (defined as change of bodyweight per change of energy intake). The fitting agreement is tested using the normalized root mean square error (NRMSE) given by,
$$NRMSE=1-\frac{\Vert B{W}_{ref}-B{W}_{fit}\Vert}{\Vert B{W}_{ref}-avg(B{W}_{ref})\Vert}$$

_{ref}is the weight curve used as reference, BW_{fit}is the weight curve obtain by the model and avg(BW_{ref}) is the average value of the bodyweight reference curve. The NRMSE provides a value in the range $(-\infty ,1]$, being 1 a perfect fitting agreement.Besides, the prediction accuracy of the DARX and DLR models is also tested. The accuracy of the model predictions is investigated by applying the recursive estimation algorithm combining different window sizes S and prediction horizons F to each dataset. In this work, window sizes ranging from 3 to 15 weeks and a prediction horizons ranging from 1 to 7 weeks have been tested. As a result, for each dataset, 91 (13 × 7) combinations of window size and prediction horizon are evaluated. Then, the goodness of the predictions is quantified by means of the mean relative prediction error (MRPE), which is given by,
where MRPE is expressed as a percentage; N is the number of samples; W

$$MRPE=\frac{1}{N}{\displaystyle \sum}_{t=1}^{N}\sqrt{{\left(\frac{{W}_{t}-\widehat{{W}_{t}}}{{W}_{t}}\right)}^{2}}\xb7100$$

_{t}(kg) is the bodyweight measured at time t and $\widehat{{W}_{t}}$ (kg) is the predicted weight at time t [47].#### 2.3. Model Predictive Control (MPC)

After selecting in the previous steps the best time-invariant parameters and time-variant parameters models, a model predictive control (MPC) system is developed. An MPC solves an optimization problem to advise the dependent variable or input needed to the system in order to achieve an output or independent variable, according to the model included in the controller, the closest to the desired or reference output. The standard cost function is generally described as function of four terms, each one focusing on a particular aspect of the controller performance [48],
where ${J}_{y}\left({z}_{k}\right)$ is related to the output reference tracking performance,
where k is the current control interval, p the prediction horizon, n

$$J\left({z}_{k}\right)={J}_{y}\left({z}_{k}\right)+{J}_{u}\left({z}_{k}\right)+{J}_{\Delta u}\left({z}_{k}\right)+{J}_{\u03f5}\left({z}_{k}\right)$$

$${J}_{y}\left({z}_{k}\right)={\displaystyle \sum}_{j=1}^{{n}_{y}}{\displaystyle \sum}_{i=1}^{p}{\left\{\frac{{w}_{i,j}^{y}}{{s}_{j}^{u}}\left[{r}_{j}\left(k+i|k\right)-{y}_{j}\left(k+i|k\right)\right]\right\}}^{2}$$

_{y}the number of outputs, z_{k}is the suggested input, given by ${z}_{k}^{T}=[u{\left(k|k\right)}^{T}u{\left(k+1|k\right)}^{T}\cdots u{\left(k+p-1|k\right)}^{T}{\u03f5}_{k}]$; ${y}_{j}\left(k+i|k\right)$ and ${r}_{j}\left(k+i|k\right)$ is the predicted j-th output value and the reference value, respectively, at the i-th prediction horizon step. Finally, ${w}_{i,j}^{y}$ and ${s}_{j}^{y}$ are the tuning weight and scale factor, respectively, for the predicted j-th output at the i-th prediction horizon step.Also, ${J}_{u}\left({z}_{k}\right)$ is related to the dependent variable tracking performance and is given by,
where k, p, and z

$${J}_{u}\left({z}_{k}\right)={\displaystyle \sum}_{j=1}^{{n}_{u}}{\displaystyle \sum}_{i=0}^{p-1}{\left\{\frac{{w}_{i,j}^{\Delta u}}{{s}_{j}^{u}}\left[{u}_{j}\left(k+i|k\right)-{u}_{j}\left(k+i-1|k\right)\right]\right\}}^{2}$$

_{k}are defined as before. n_{u}the number of inputs, ${u}_{j}\left(k+i|k\right)$ and ${u}_{j,target}\left(k+i|k\right)$ is the predicted j-th input and target input, respectively, at the i-th prediction horizon step. Finally, ${w}_{i,j}^{u}$ and ${s}_{j}^{u}$ are the tuning weight and scale factor, respectively, for the predicted j-th input at the i-th prediction horizon step.Besides, ${J}_{\Delta u}\left({z}_{k}\right)$ accounts for the changes in the dependent variable in consecutive realisations, given by,
where k, p, n

$${J}_{\Delta u}\left({z}_{k}\right)={\displaystyle \sum}_{j=1}^{{n}_{u}}{\displaystyle \sum}_{i=0}^{p-1}{\left\{\frac{{w}_{i,j}^{u}}{{s}_{j}^{u}}\left[{u}_{j}\left(k+i|k\right)-{u}_{j,target}\left(k+i|k\right)\right]\right\}}^{2}$$

_{u}, and z_{k}are defined as before. ${u}_{j}\left(k+i|k\right)$ and ${u}_{j,target}\left(k+i|k\right)$ is the predicted j-th input and target input, respectively, at the i-th prediction horizon step. Finally, ${w}_{i,j}^{\Delta u}$ is the tuning weight for the predicted j-th input movement at the i-th prediction horizon step and ${s}_{j}^{u}$ the scale factor for the j-th input.Finally, ${J}_{y}\left({z}_{k}\right)$ addresses the violation of constraints when these are included in the controller,
where z

$${J}_{\u03f5}\left({z}_{k}\right)={\rho}_{\u03f5}{\u03f5}_{k}^{2}$$

_{k}is defined as before. ${\rho}_{\u03f5}$ is the constraint violation penalty weight and ${\u03f5}_{k}^{2}$ the slack variable at control interval k.In this work, the input variable is the energy intake and the output the bodyweight. This MPC approach is tested when using time-invariant parameters and time-variants parameters models using constrains and without them. The constraints simply account for the minimum and maximum values allowed for bodyweight and energy intake. The minimum and maximum bodyweight are, BW

_{min}= 52.2 kg and BW_{max}= 69.8 kg, respectively. In addition, the minimum and maximum energy intake are, EI_{min}= 1223 kcal day^{−1}and EI_{max}= 3556 kcal day^{−1}, respectively.The controller’s performance and robustness are tested. Firstly, the bodyweight measured curve from each test participant in the Minnesota starvation experiment is used as reference curve and the energy intake suggested by the MPC is compared with the energy intake actually measured to evaluate the performance. Afterwards, the robustness is tested by performing 100 Monte Carlo simulations. In each simulation, the average values of the a- and b-parameters are disturbed with random noise and the impact on the performance is evaluated. Finally, the MPC is applied using theoretical curves as bodyweight reference curves. Since no ideal target trajectory is suggested in literature, three different target body weight trajectories are proposed. In [49], it is recommended to decrease bodyweight by 5–10% within 6 months. The study, performed on obese women, concludes that a weight loss of 5–10% of the total body weight results in improvements in blood glucose levels and hypertension [49]. The initial and final body weight for the three targeted body weight trajectories are set to the same values. The initial body weight is defined as the average maximum body weight over all participants prior to the start of the starvation phase, which is 69.36 kg. The final body weight is set to 59.36 kg and has to be reached after one year or 52 weeks. This means that the initial body weight is decreased with 14.4%. The first and second trajectories gradually decrease the body weight in even steps, holding these steps constant for 3 or 8 weeks, respectively. The third body weight trajectory follows an exponential trend with equation BW
where BW is the target body weight of 59.36 kg and H is the average height of 1.79 m of all participants. This equation results in a minimum energy intake of 1672.05 kcal day

_{t}= BW_{0}·0.95^{t}(t = 1,..., 52 weeks) where the desired bodyweight at the start of the simulation is reduced more rapidly than near the end of the simulation. The MPC algorithm used to test the three trajectories has different constraints. The maximum value of the output is defined as the average maximum body weight over all participants prior to the start of the starvation phase, which is 69.36 kg. The minimum output value is the target body weight at the end of the trajectory of 59.36 kg. The maximum input or energy intake is the average maximum energy intake of 3538.72 kcal day^{−1}prior to the starvation phase. The minimum energy intake is calculated using the Henry equations based on the average height, age, target bodyweight and gender [50]. These equations estimate the basal metabolic rate (BMR) and defines the minimum energy intake to account for daily energy expenditure in rest. As the age of the male participants from the Minnesota starvation experiment varies between 20 and 33 years, the following equation is used for the estimation of the minimum energy:
BMR (kcal day

^{−1}) = 14.4·BW(kg) + 313·H(m) + 113^{−1}.Both, the NMRSE, given by Equation (11), and the root mean square error (RMSE) are used to quantify the deviation between the desire targeted (reference) and simulated, using the MPC, energy intake or bodyweight curves. The RMSE is given by the expression:
where N

$$RMSE=\sqrt{\frac{{\Vert {y}_{ref}-{y}_{sim}\Vert}^{2}}{{N}_{s}}}$$

_{s}is the number of samples, y_{ref}is the reference energy (or bodyweight) curve and y_{sim}is the simulated energy intake (or bodyweight) curve by the MPC.## 3. Results and Discussion

#### 3.1. Time-Invariant SISO TF Models

In Figure 1, the gathered energy intake and bodyweight curves from the 32 participants are displayed.

The obtained data have shown clear interpersonal differences between participants in their energy intake and bodyweight curves during the course of the experiment. Even though during the control phase it is attempted to reduce the variability in the bodyweight among the participants, it can be seen that the individual variability in energy intake during the starvation stage of the experiment induced different responses in the bodyweight time course. Similar energy intake patterns lead to different bodyweight time courses, which highlights the individual characteristics of the biological process, emphasizing the importance of the aim of this study.

Therefore, using the Minnesota starvation experiment dataset, 32 sub-datasets are created using the bodyweight and energy intake from each individual participant. Using each sub-dataset, a system identification procedure is performed to define the best time-invariant parameters model structure needed to relate energy intake and bodyweight. In Table 1, a summary is shown of the first and second order model performances in terms of YIC and the goodness of fit, ${R}_{T}^{2}$. Table 2 shows the Pearson correlation coefficients (r), to assess the similarity between the model outputs and the weight curves from the participants. A representative example of the agreement between the measured and estimated bodyweight curves for one individual test participant (participant 8) in the Minnesota starvation experiment is displayed in Figure 2.

The results have shown that a first order model is sufficient to characterize the impact of energy intake in bodyweight, as reflected by the superior YIC, ${R}_{T}^{2}$, and a high Pearson correlation coefficient results (see Table 1 and Table 2). During the system identification process, the presence of delay was allowed, but the best results were always obtained when no delay (i.e., δ = 0) was present in the models. From a biological viewpoint this make sense, as metabolizing the ingested energy takes about 12 h, while the used time interval is one week (i.e., 168 h). Thus, the time delay between energy intake and bodyweight change reduces to nearly zero in terms of the used measurement interval of one week.

In addition, the YIC value also indicates that the parameters estimation when using a first order model is reliable. Ideally, it would be possible to define a first order model, using the average values of the different estimations of a- and b-parameters obtained for each subject, which would allow estimating the impact of bodyweight of a given energy intake. When the a- and b-parameters from the individual estimations are averaged together, the following model is obtained,
where BW is bodyweight in kg, EI is the energy intake in kcal day

$$B{W}_{t}={a}_{1}\xb7B{W}_{t-1}+{b}_{0}\xb7E{I}_{t}=\left(0.92\pm 0.03\right)\xb7B{W}_{t-1}+\left(9\pm 3\right)\xb7{10}^{-4}\xb7E{I}_{t}$$

^{−1}and t is the time sample in weeks. It can be seen that the b-parameter exhibits more variability than the a-parameter. This is expected, taking into account the biological process under study. Translating the model to the biological process, it states that the bodyweight at time t is the bodyweight of the time sample before plus a contribution of a certain percentage of the energy intake at time sample t. Therefore, on one hand it is expected that the a-parameter should be close to one and should not show too much variability between participants. On the other hand, the b-parameter should resemble energy efficiency and thus it is expected to vary between the different individuals. From Equation (20), it can be the seen that the results matched perfectly this hypothesis. Running this average model in all datasets results in an average coefficient of determination of ${R}_{T}^{2}$ = 0.3 ± 0.2. Therefore, by defining an average model in which an average b-parameter value is set, the performance of the model drops drastically. In several previous studies [24,25,26,27,28,31,32,33], models were developed to estimate bodyweight changes in response to changes in the energy balance, taking into account energy intake and physical activity. These models are mechanistic models, using population-based average estimations of parameters to describe the energy balance equations. This explains the high standard deviation exhibited in the results of these models. The same is observed in this work, when an average time-invariant parameters model is developed. This clearly indicates the need for accurately estimating the proper b-parameter value for each individual.Therefore, from the system identification step it can be concluded that a first order transfer function model is sufficient to characterize the impact of energy intake on the bodyweight time course. However, it is necessary to use b-parameters that resemble the energy efficiency of the individual, and thus developing an average model is not a suitable approach. Moreover, it is expected that this energy efficiency would not only be individually different, but also change throughout the experimental period. Internal and external factors are expected to affect how a person translates the energy intake into a bodyweight change throughout the weight intervention process. Therefore, by including time-variant parameters in the model, it is expected to cope with these dynamic characteristic of the process. Thus, in the next section the results of the time-variant parameters modelling approach are described.

#### 3.2. Time-Variant Parameters Models

By allowing the parameters to vary in time, it is expected to capture the changes induced in the energy efficiency by factors not taken explicitly into account in the model and, hence, obtain a more accurate estimation of bodyweight.

Firstly, the modelling accuracy is evaluated when modelling the complete experiment. In the previous section, it was shown that a first order transfer function model is sufficient to describe the relation between the energy intake and the bodyweight. Thus, a first order DARX model and a DLR model are tested. In Table 3, the results from the modelling performance for the complete experiment, in terms of the NRMSE and r, are shown for both time-varying modelling approaches.

These results indicate that the DLR model provides a better and more consistent fitting agreement than the DARX model. Thus, from these results it seems that the DLR model outperforms the DARX approach. One of the reasons, which can explain this finding, could be the higher stochasticity behavior in the DLR model. Stochastic models can account for the variability among individuals in populations. Thus, a combination of deterministic and stochastic parts in the model allows quantifying both, the trend and the variability present in the process [51]. Besides, in the work of [2], weight loss is modelled by energy deficit, using energy flux balances. They found that when a stochastic component is added to the model the results improved. This is in line with the results obtained in this analysis. Allowing the time –variant model parameters to have a stochastic behavior, in order to characterize their time-evolution, improves the modelling performance. However, this analysis just confirms that a first order model with time-variant parameters allows characterizing the relation between energy intake and bodyweight time-course more accurately than using time-invariant parameters models, as expected. In order to develop a control system in the next phase, the model should not only describe the process accurately but also should exhibit suitable forecasting properties. Therefore, the forecasting capabilities of both time-variant parameters models are tested. In Table 4 and Table 5, the forecasting performance for the DLR and DARX models is displayed in terms of MRPE.

Besides, in Figure 3, the results obtained for the different combinations of time window and prediction horizon sizes tested for both time-variant parameters models are displayed, together with a representative example for the one-week ahead prediction horizon forecasting results.

It is clear from the aforementioned results that the DARX model is able to achieve the best forecasting performance. Time window sizes ranging between 7 and 12 weeks lead to a MRPE of 1.01 ± 0.02%, on average, when using the DARX model. In the same range, the average MRPE for the DLR model is 1.53 ± 0.12%. Thus, there is a difference of 0.52% in favor of the DARX model prediction capabilities. Besides, the evolution of the MRPE among the different time window and prediction horizon sizes in the DLR model improves, as more data is included in the time window. Biologically, it is expected that the energy efficiency will vary with time and the current efficiency should be more relevant than the efficiency in past instances. Thus, it seems that the DLR model is not capturing fully the expected biological behavior of the process.

In contrast, the DARX model shows that increasing the window size improves the forecasting performance, but only until a certain range. Once this range is exceeded, the forecasting properties worsen again. This is expected, as the sliding time window with a fixed size should help in removing the impact of obsolete data in the model [47]. Thus, this is more in line with what it is expected in terms of the biological process under study. Furthermore, it can be seen that the optimal time window size changes according to the prediction horizon size. For instance, if the prediction horizon is raised to 4–5 weeks, thus over a month time, the MRPE error ranges between 2.5–3% and the optimal time window size range increases to 10–14 weeks.

The prediction of bodyweight using a recursive linear regression approach based on time-variant parameters has been already tested on broiler chickens [47]. In that study, the lowest MRPE reaches a value of 1.4% for a prediction horizon of 1 day and the highest MRPE is 4.1% for a prediction horizon of 7 days, when broiler chickens are fed ad libitum [47]. These results illustrate that using time-variant parameters models to predict human bodyweight is highly accurate, improving the previous results.

Lastly, it is important to mention that because little information on energy expenditure is known, the bodyweight predictions are based solely on energy intake. The data from the Minnesota starvation experiment include merely estimations of the resting energy expenditure on the week prior to the starvation phase and at the end of the starvation phase. Thus, calculating the weekly energy balance is not possible. There are several models in literature that attempt to address this characteristic during a weight program intervention by using complex mechanistic models based on systems of one dimensional differential equations [28,29,31,32]. Although these theoretical models resemble accurately the dynamic process of bodyweight change, the large amount of model parameters are estimated based on averages from population studies [32] and do not take into account the changes in the values of the model parameters throughout the experimental period [11]. In the modelling framework proposed in this study, not only the dynamic evolution through time, but also the dynamics induced by the impact of internal and external factors in the model parameters are taken into account implicitly by the model. This allows designing more compact models, reducing greatly their complexity while capturing the most relevant dynamics of the process. In future, if both energy intake and expenditure would be available, a time-variant model in which both are used as inputs could be developed. Moreover, gathering regular information about the time course of fat body mass and lean body mass would allow developing a time-variant model, whose model parameters could be related to existing mechanistic equations describing bodyweight component changes in response to changes in energy intake and energy expenditure. On one hand, this would help dietitians to develop further the current mechanistic expressions to describe more accurately the bodyweight change process. On the other hand, it would enable them to evaluate and adapt in real-time the impact of the suggested dietary energy intake to achieve a desire bodyweight change at individualized patient level.

In summary, these results show that a time-variant parameters model allows characterizing accurately the dynamics of a body weight change induced by a change in dietary energy intake. Using a window size of seven weeks of dietary energy intake allows forecasting bodyweight one-week ahead with a MRPE of 1.04% and four-weeks ahead with a MRPE of 2.53%. Therefore, from this analysis with time-variant models, it seems that a first order DARX model is the best model choice when balancing fitting agreement and forecasting performance. Besides, it seems to describe more accurately the biological process under study. Therefore, this model is considered the best option to develop a model-predictive control to estimate the energy intake needed to achieve a desired bodyweight change. In the next section, the model predictive controller is developed and tested. When using the time-variant parameters model in the controller, the time window size of seven weeks is selected. It should be noted that even though in this study the time window size is fixed, it would be possible to perform a similar analysis as the one described in this section to estimate in real-time which would be the optimal time window size to be used in the controller’s model for each individual.

#### 3.3. 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.

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. In this regard, these capabilities can be exploited by dietitians to determine which is the healthier alternative for an individual patient to achieve the desire bodyweight change according to its response to the initial treatment through time.

Thus, in order to test the MPC system capabilities to follow theoretical reference curves, three different theoretical bodyweight curves are defined according to the procedure described in Section 2.3 of the Material and Methods section. In Figure 5, the different energy intake curves suggested by the controller are displayed. In addition, the resulting estimated weight curves obtained when following these suggestions, compared with the defined theoretical ones, are displayed as well. In order to perform these simulations, the average time-invariant model obtained in Section 3.1 of this section is used as model for the controller. This approach cannot be tested with the time-variant parameters DARX models, as there is no actual data collection from the participants following these theoretical curves.

It can be seen that the energy intake curves suggested by the controller are similar. The main difference is the energy intake change rate over consecutive weeks. Depending on the theoretical bodyweight curve used as reference, the energy intake suggested for an average individual decreases faster or slower in consecutive weeks. The NRMSE, RMSE and r describing the differences between the reference bodyweight curve and the bodyweight curves achieved with the control simulation are summarized in Table 8. Table 9 shows the RMSE between the final bodyweight value from the controllers and the one from the theoretical reference curve.

It can be seen that the RMSE errors, when comparing the complete curves or just the final values, are small, less than 200 g on average, in all cases. Thus, the MPC controller is able to follow closely a predefined theoretical bodyweight curve. Therefore, the MPC developed in this study may be used to set a theoretical bodyweight reference curve and evaluate the energy intake curve suggested to follow the given bodyweight curve in order to achieve the desired final weight.

Finally, as the last part of the analysis, the robustness of the controller is tested. A random contribution, at the level of the standard error in the parameters estimations (10%), is added as uncertainty to the a- and b-parameters of the time-invariant model. Using Monte Carlo simulations, the robustness of the model is tested, generating 100 realizations varying a- or b-parameter estimations. In Figure 6, examples of the suggested energy intake and bodyweight curves obtained from these 100 Monte Carlo simulations, adding uncertainty in the a- and b-parameters, respectively, are shown.

The results have shown how the controller’s suggestions for energy intake are much less sensitive to the uncertainty in the a-parameter than in the b-parameter. This is expected as the b-parameter represents the energy intake efficiency; thus, slight changes in this parameter induce changes in the energy required to achieve a target bodyweight. However, uncertainty in the a-parameter should be limited as well, because an increase in uncertainty may lead to an unstable model. Therefore, these results point out again towards the need to use time-variant parameters models, such the DARX model tested in this study, to obtain accurate estimations of the model parameters and their time evolution for individual participants. Accounting in the model parameters for this variability improves considerably the capabilities of the MPC to suggest energy intake levels which take the individuals variability into account, enabling it to get the closest possible to the targeted bodyweight.

In [41], the growth trajectory of broiler chickens is controlled based on an adaptive dynamic model. Here, the performance of the MPC algorithm is quantified by calculating the mean relative error (MRE) between the actual and target weight trajectory of the broiler chickens. The MRE values ranged between 3.7% and 7.0%. For broiler chickens, it is important that the actual growth trajectory resembles the target trajectory, in order to suppress negative effects associated with fast growing broiler chickens. Examples of negative effects include decreased reproduction capacity of the breeder stock, increased body fat deposition and metabolic diseases, such as sudden death syndrome [41]. In [43], the MPC developed in [41] was tested in commercial broiler settings. In this case, the MRE ranged between 6% and 11% under these conditions. Translating the NRMSE and RMSE results from this work to MRE values, obtains, on average, a MRE of 0.65 ± 0.07% and 0.34 ± 0.06% when comparing the experimental measured bodyweight curve for each participant and the bodyweight curve obtained following the suggestions from the MPC using time-invariant parameters and time-variant parameters models, respectively. Moreover, MRE of 0.12 ± 0.01%, 0.18 ± 0.02% and 0.15 ± 0.03% are obtained when comparing the theoretical bodyweight reference trajectory curves and those obtained when following the MPC suggestions for the theoretical reference trajectories 1, 2 and 3, respectively. Therefore, the MPC’s developed in this work show that they are capable of following different bodyweight reference trajectories accurately. Similarly as in the case of the time-variant parameters models, the MPC’s developed in this work exhibit a high accuracy when compared with the ones developed for livestock applications. Thus, this enables dietitians to develop a theoretical bodyweight curve and test the energy intake suggested to fulfill this goal in an individualized manner for their patients. Besides, taking advantage of the adaptive capabilities of the MPC, it is possible to modify in real-time this bodyweight reference trajectory according to the performance of the patient and health considerations.

In [11,34], dynamic models are developed to control bodyweight dynamics. These models are dynamic in the sense of accounting for the time evolution of the bodyweight and energy processes. However, these models do not account for the time evolution of the model parameters or the individualized estimation of those parameters working in real-time. These dynamic models still rely on average mechanistic descriptions of the bodyweight and energy flux dynamics. Thus, these approaches lack the adaptability characteristics of the MPC developed in this work. However, a MPC as developed in this work has still some drawbacks to be taken into account in the future. No information on the ratio of carbohydrates, lipids and proteins with respect to the total energy intake is provided. In addition to the total energy intake, further optimization of the MPC algorithm can include suggestions on the ratio of carbohydrates, lipids and proteins based on the recommended dietary allowances. An important factor influencing the dietary behavior is the degree of saturation. Food with a high energy density usually ensures a low degree of satiety. Therefore, food with a low energy density is usually recommended, as it provides a longer period of satiety [52]. In [12], it is shown that combining current methods to deal with bodyweight changes with mHealth applications may enhance the performance of the first ones. Therefore, on the one hand, the current applications may benefit from including such a MPC as developed in this work. By providing more individual accurate estimations of energy intake and bodyweight change levels, it is expected to enhance the engagement to the mHealth technology and the adhesion to its suggestions, improving weight management [33]. On the other hand, if further development of apps and wearables enhance the characterization of the energy intake, physical activity and other related physiological variables, the MPC developed in this work can be extended to manage more accurately the metabolization and energy flux balances processes. In such a situation, a comparison with the existing mechanistic models would allow extracting more biological and physical information while keeping the real-time and automatic properties of the controller.

To sum up, it can be seen that such a MPC system may help people to manage and control their bodyweight in real time. Taking advantage of the new possibilities offered by wearables and smartphones, an individual can gather real-time information about their energy intake, bodyweight and activity. Then, mHealth applications may exploit such compact and accurate MPC algorithms to manage body weight change taking advantage of the data gathered. This enables a target bodyweight or bodyweight reference curve to be defined and suggestions for the energy intake needed to achieve this goal to be made. Besides, the MPC system may be a useful tool for dietitians as well. They can develop theoretical bodyweight curves for losing weight using biological and medical information and simulate the energy intake suggested to follow this curve at individual patient level as close as possible. Moreover, at certain points in the treatment, this theoretical curve can be adapted according to the performance of the patient and medical considerations. Thus, the MPC system can be used not only to simulate an energy intake pattern according to a predefined bodyweight curve, but also to monitor the impact of the strategy in individual patients and adapt the strategy accordingly throughout the bodyweight change process.

#### 3.4. Current Limitations and Future Perspectives

The Minnesota starvation experiment was performed in 1944 to investigate the psychological and physiological effects of severe dietary restriction [53]. The experiment was designed to mimic the dietary conditions of prisoners during World War II. Therefore, due to both the period in which the experiment was performed and the focus, only male participants were selected. This restriction in energy intake is not a recommended method to lose weight, as the energy intake is lower than the minimum requirements. However, this abrupt change in energy intake presents the perfect conditions to perform an analysis of the system’s dynamics and the modelling of body weight in response to energy intake. Unfortunately, the experiment has some limitations with respect to age, gender, size of the study population, and BMI category. The population of the Minnesota starvation experiment counted 32 male participants. The size of the population was small and the population did not represent differences in gender, BMI category and age. A study, performed on male and female mice, showed that the metabolic processes during bodyweight dynamics are gender-dependent [54]. Therefore, it is necessary to verify and model the body weight dynamics of both males and females. The age of the participants varied between a limited range of 20 and 33 years. Metabolic processes are not only dependent on the gender but also on the age. To estimate the basal metabolic rate (BMR), the equations in [49] are often used and are different depending on gender and age. Calculation of BMR is based on height and weight. In the Minnesota starvation experiment, the average body weight and BMI of the participants prior to the starvation phase were 69.36 kg and 21.7, respectively. All participants apart from one had a BMI in the normal category. Only one subject was slightly overweight with a BMI of 25.4. The aim of this study is to make a first step towards designing a controller to help overweight or obese people lose body weight. However, the constructed controller is based on data of 32 male participants within the normal BMI category. Regardless of the limited subject variation, the controller should eventually depend on time-variant parameters opposed to time-invariant parameters. The benefit of using time-variant parameters is that if the underlying metabolic processes are changed due to unknown factors, the parameters are updated in order to predict future body weight more accurately.

The modelling framework also has certain limitations. It is known that the weight loss intervention strategies will be affected by external factors [55], such as psychological [56,57,58,59], occupational [60,61,62,63], and metabolic factors [64,65], besides their combined effects [66,67]. These external factors will affect the weight loss intervention, as well as its maintenance in the long term [68,69]. Besides, there is a high degree of heterogeneity in the impact of these factors both, during and after a weight intervention [70]. In principle, the modelling framework developed in this study cannot provide directly any information about this matter during its application throughout the weight intervention. However, there is an aspect in the proposed modelling approach, which can actually allow getting some insight in this regard. One of the reasons for allowing the parameters to vary with time is to capture the contribution of external factors, which impact the process under study but which are not taken explicitly into account in the model. Therefore, the time evolution of the model parameters can be understood as a summary of the contribution of each individual external factor, besides the inherent time evolution related to the process input (energy intake in this study). This is the reason why, although we use a simple compact model based solely on energy intake and bodyweight, this allows describing accurately the weight loss intervention.

This, at first sight, model limitation actually provides one of the most interesting aspects for future improvement and development of the modelling approach. More specifically, it opens the possibility to use the time evolution of the model parameters as data-based reference to describe the impact of these external factors. If experiments, in which in a controlled manner a weight intervention is taking place and only one or a limited number of its external factors are allowed to vary, then the output from the current mechanistic expression can be tested against the time-variant model parameters. This would allow not only quantifying the impact of one or several of these external factors, but also gaining insight in how to refine the proposed mechanistic relations assumed for them. Yet, the validity of the proposed model could be validated too. Finally, the development of novel features in smartphone and wearable technologies continues growing exponentially. Therefore, it is expected that soon it will become possible to have available real-time measurements of more variables playing a role in the weight intervention. Thus, the model and controller proposed in this study could be expanded and refined in order to describe more accurately and gain more insight in the weight intervention.

## 4. Conclusions

In this work, a data-based mechanistic (DBM) model is tested to describe the individual dynamic responses of bodyweight to changes in the energy intake. During the course of this study, time-invariant and time-variant parameters models are tested. A DARX time-variant parameters model exhibits on average a NRMSE of 0.94 ± 0.03. Furthermore, this model allows forecasting bodyweight one week ahead with a MRPE of 1.01 ± 0.02%, on average. Moreover, a model predictive controller is developed using this DARX model. This allows suggesting dietary energy intake needed to follow a predefined bodyweight reference trajectory. Targeting experimentally measured bodyweight trajectories, the controller managed to calculate the needed energy intake accurately (RMSE = 9 ± 3 kcal day

^{−1}between the actual energy intake and the suggested energy intake by the controller). Additionally, it was able to accurately follow the bodyweight reference trajectory (RMSE = 0.30 ± 0.06 kg between the actual reference bodyweight and the bodyweight following energy intake suggestions from the controller). Therefore, it can be concluded that in the light of the aforementioned results and findings the developed modeling and MPC algorithms suggested by this paper form a potential solution for real-time bodyweight monitoring and management.## Author Contributions

Conceptualization, A.P.F., A.Y., C.M. and J.-M.A.; methodology, A.P.F., A.Y. and J.-M.A.; formal analysis, A.P.F., A.Y. and C.H.; writing—original draft preparation, A.P.F. and A.Y.; writing—review and editing, A.P.F., A.Y., C.M. and J.-M.A.; visualization, A.P.F. and A.Y.; supervision, C.M. and J.-M.A.

## Funding

This research received no external funding.

## Conflicts of Interest

The authors declare no conflict of interest.

## References

- Higginson, A.D.; McNamara, J.M. An adaptive response to uncertainty can lead to weight gain during dieting attempts. Evol. Med. Public Heal.
**2016**, 2016, 369–380. [Google Scholar] [CrossRef] [PubMed] - Chow, C.C.; Hall, K.D. The dynamics of human body weight change. PLoS Comput. Biol.
**2008**, 4, 1–11. [Google Scholar] [CrossRef] [PubMed] - Mantzoros, C.S. Nutrition and Metabolism; 2009 ed.; Humana press, Springer Science & Business Media: New York, NY, USA, 2009. [Google Scholar]
- Di Cesare, M.; Bentham, J.; Stevens, G.A.; Zhou, B.; Danaei, G.; Lu, Y.; Bixby, H.; Cowan, M.J.; Riley, L.M.; Hajifathalian, K.; et al. Trends in adult body-mass index in 200 countries from 1975 to 2014: A pooled analysis of 1698 population-based measurement studies with 19.2 million participants. Lancet
**2016**, 387, 1377–1396. [Google Scholar] - Russo, C.; Jin, Z.; Ph, D.; Homma, S.; Rundek, T.; Elkind, M.S.V.; Sacco, R.L.; Di Tullio, M.R. Effect of obesity and overweighton left ventricular diastolic function: A community-based study in an elderly cohort. J. Am. Coll. Cardiol.
**2011**, 57, 1368–1374. [Google Scholar] [CrossRef] [PubMed] - Taubes, G. Unraveling the obesity-cancer connection. Science
**2004**, 335, 28–32. [Google Scholar] [CrossRef] [PubMed] - Wong, C.X.; Abed, H.S.; Molaee, P.; Nelson, A.J.; Brooks, A.G.; Sharma, G.; Leong, D.P.; Lau, D.H.; Middeldorp, M.E.; Roberts-Thomson, K.C.; et al. Pericardial fat is associated with atrial fibrillation severity and ablation outcome. J. Am. Coll. Cardiol.
**2011**, 57, 1745–1751. [Google Scholar] [CrossRef] [PubMed] - Ng, M.; Fleming, T.; Robinson, M.; Thomson, B.; Graetz, N.; Margono, C.; Mullany, E.C.; Biryukov, S.; Abbafati, C.; Abera, S.F.; et al. Global, regional and national prevalence of overweight and obesity in children and adults during 1980–2013: A systematic analysis. Lancet
**2014**, 384, 766–781. [Google Scholar] [CrossRef] - Skolnik, R. Noncommunicable Diseases Country Profiles 2018; World Health Organization: Geneva, Switzerland, 2018; ISBN 9789241514620. [Google Scholar]
- Altman, M.; Wilfley, D.E. Evidence Update on the Treatment of Overweight and Obesity in Children and Adolescents. J. Clin. Child Adolesc. Psychol.
**2015**, 44, 521–537. [Google Scholar] [CrossRef] - Laila, D.S. A note on human body weight dynamics and control based on the macronutrient and energy flux balance. In Proceedings of the 2010 American Control Conference, Baltimore, MD, USA, 30 June–2 July 2010; pp. 3580–3585. [Google Scholar]
- Hurkmans, E.; Matthys, C.; Bogaerts, A.; Scheys, L.; Devloo, K.; Seghers, J. Face-To-face versus mobile versus blended weight loss program: Randomized clinical trial. JMIR mHealth uHealth.
**2018**, 6, e14. [Google Scholar] [CrossRef] - Zhu, F.; Bosch, M.; Woo, I.; Kim, S.; Boushey, C.J.; Ebert, D.S.; Delp, E.J. The use of mobile devices in aiding dietary assessment and evaluation. IEEE J. Sel. Top. Signal Process.
**2010**, 4, 756–766. [Google Scholar] [PubMed] - Amft, O.; Tröster, G. Recognition of dietary activity events using on-body sensors. Artif. Intell. Med.
**2008**, 42, 121–136. [Google Scholar] [CrossRef] [PubMed] - Pellegrini, C.A.; Duncan, J.M.; Moller, A.C.; Buscemi, J.; Sularz, A.; Demott, A.; Pictor, A.; Pagoto, S.; Siddique, J.; Spring, B. A smartphone-supported weight loss program: Design of the ENGAGED randomized controlled trial. BMC Public Health
**2012**, 12, 1041. [Google Scholar] [CrossRef] [PubMed] - Steele, R. An Overview of the State of the Art of Automated Capture of Dietary Intake Information. Crit. Rev. Food Sci. Nutr.
**2015**, 55, 1929–1938. [Google Scholar] [CrossRef] [PubMed] - Zaidan, S.; Roehrer, E. Popular Mobile Phone Apps for Diet and Weight Loss: A Content Analysis. JMIR mHealth uHealth
**2016**, 4, e80. [Google Scholar] [CrossRef] [PubMed] - Gilmore, L.A.; Duhé, A.F.; Frost, E.A.; Redman, L.M. The technology boom: A new era in obesity management. J. Diabetes Sci. Technol.
**2014**, 8, 596–608. [Google Scholar] [CrossRef] [PubMed] - Patel, M.L.; Hopkins, C.M.; Brooks, T.L.; Bennett, G.G. Comparing Self-Monitoring Strategies for Weight Loss in a Smartphone App: Randomized Controlled Trial. JMIR mHealth uHealth
**2019**, 7, e12209. [Google Scholar] [CrossRef] [PubMed] - Pellegrini, C.A.; Pfammatter, A.F.; Conroy, D.E.; Spring, B. Smartphone application to support weight loss: Current perspectives. Adv Health Care Technol.
**2015**, 1, 13–22. [Google Scholar] [CrossRef] [PubMed] - Wishnofsky, M. Caloric equivalents of gained or lost weight. Am. J. Clin. Nutr.
**1958**, 6, 542–546. [Google Scholar] [CrossRef] - Hall, K.D.; Sacks, G.; Chandramohan, D.; Chow, C.C.; Wang, Y.C.; Gortmaker, S.L.; Swinburn, B.A. Quantification of the effect of energy imbalance on bodyweight. Lancet
**2011**, 378, 826–837. [Google Scholar] [CrossRef] - Thomas, D.M.; Martin, C.K.; Lettieri, S.; Bredlau, C.; Kaiser, K.; Church, T.; Bouchard, C.; Heymsfield, S.B. Can a weight loss of one pound a week be achieved with a 3500-kcal deficit? Commentary on a commonly accepted rule. Int. J. Obes.
**2013**, 37, 1611–1613. [Google Scholar] [CrossRef] - Antonetti, V.W. The equations governing weight change in human beings. Am. J. Clin. Nutr.
**1973**, 26, 64–71. [Google Scholar] [CrossRef] [PubMed] - Westerterp, K.R.; Donkers, J.H.; Fredrix, E.W.; Boekhoudt, P. Energy intake, physical activity and body weight: A simulation model. Br. J. Nutr.
**1995**, 73, 337–347. [Google Scholar] [CrossRef] [PubMed] - Leibel, R.L.; Rosenbaum, M.; Hirsch, J. Changes in energy expenditure resulting from altered body weight. J. Occup. Environ. Med.
**1995**, 38, 621–628. [Google Scholar] - Hall, K.D. What is the required energy deficit per unit weight loss? Int. J. Obes. (Lond.)
**2008**, 32, 573–576. [Google Scholar] [CrossRef] [PubMed] - Christiansen, E.; Garby, L. Prediction of body weight changes caused by changes in energy balance. Eur. J. Clin. Investig.
**2002**, 32, 826–830. [Google Scholar] [CrossRef] [PubMed] - Song, B.; Thomas, D.M. Dynamics of starvation in humans. J. Math. Biol.
**2007**, 54, 27–43. [Google Scholar] [CrossRef] - Hargrove, J.L.; Heinz, G.; Heinz, O. Modeling transitions in body composition: The approach to steady state for anthropometric measures and physiological functions in the Minnesota human starvation study. Dyn. Med.
**2008**, 7, 1–11. [Google Scholar] [CrossRef] - Hall, K.D. Body fat and fat-free mass inter-relationships: Forbes’s theory revisited. Br. J. Nutr.
**2007**, 97, 1059–1063. [Google Scholar] [CrossRef] - Hall, K.D. Predicting metabolic adaptation, body weight change, and energy intake in humans. Am. J. Physiol. Metab.
**2009**, 298, E449–E466. [Google Scholar] [CrossRef] - Thomas, D.M.; Schoeller, D.A.; Redman, L.A.; Martin, C.K.; Levine, J.A.; Heymsfield, S.B. A computational model to determine energy intake during weight loss. Am. J. Clin. Nutr.
**2010**, 92, 1326–1331. [Google Scholar] [CrossRef] [PubMed] - Thomas, D.M. A simple model predicting individual weight change in humans. J. Biol. Dyn.
**2011**, 5, 579–599. [Google Scholar] [CrossRef] [PubMed] - Oike, H.; Oishi, K.; Kobori, M. Nutrients, Clock Genes, and Chrononutrition. Curr. Nutr. Rep.
**2014**, 3, 204–212. [Google Scholar] [CrossRef] [PubMed] - Tahara, Y.; Shibata, S. Chrono-biology, Chrono-pharmacology, and Chrono-nutrition. J. Pharmacol. Sci.
**2014**, 124, 320–335. [Google Scholar] [CrossRef] [PubMed] - Almoosawi, S.; Vingeliene, S.; Karagounis, L.G.; Pot, G.K. Chrono-nutrition: A review of current evidence from observational studies on global trends in time-of-day of energy intake and its association with obesity. Proc. Nutr. Soc.
**2016**, 75, 487–500. [Google Scholar] [CrossRef] - Vilela, S.; Oliveira, A.; Severo, M.; Lopes, C. Chrono-Nutrition: The Relationship between Time-of-Day Energy and Macronutrient Intake and Children’s Body Weight Status. J. Biol. Rhythms
**2019**, 34, 1–11. [Google Scholar] [CrossRef] [PubMed] - Berckmans, D. Automatic on-line monitoring of animals by precision livestock farming. In Proceedings of the 2004 ISAH Conference, Saint-Malo, France, 6–10 September 2004; pp. 27–30. [Google Scholar]
- Young, P.C. The data-based mechanistic approach to the modelling, forecasting and control of environmental systems. Annu. Rev. Control
**2006**, 30, 169–182. [Google Scholar] [CrossRef] - Aerts, J.M.; Van Buggenhout, S.; Vranken, E.; Lippens, M.; Buyse, J.; Decuypere, E.; Berckmans, D. Active control of the growth trajectory of broiler chickens based on online animal responses. Poult. Sci.
**2003**, 82, 1853–1862. [Google Scholar] [CrossRef] - Hauschild, L.; Lovatto, P.A.; Pomar, J.; Pomar, C. Development of sustainable precision farming systems for swine: Estimating real- time individual amino acid requirements in growing- fi nishing pigs. J. Anim. Sci.
**2012**, 90, 2255–2263. [Google Scholar] [CrossRef] - Cangar, O.; Aerts, J.M.; Vranken, E.; Berckmans, D. Effects of different target trajectories on the broiler performance in growth control. Poult. Sci.
**2008**, 87, 2196–2207. [Google Scholar] - Taylor, C.J.; Pedregal, D.J.; Young, P.C.; Tych, W. Environmental time series analysis and forecasting with the Captain toolbox. Environ. Model. Softw.
**2007**, 22, 797–814. [Google Scholar] [CrossRef] - Young, P.C.; Taylor, C.J.; Tych, W.; Pedregal, D.J. The CAPTAIN Toolbox; Centre for Research on Environmental Systems and Statistics, Lancaster University: Lancashire, UK, 2007; Available online: http://captaintoolbox.co.uk/Captain_Toolbox.html/Captain_Toolbox.html (accessed on 10 May 2019).
- Young, P. Recursive Estimation and Time-Series Analysis, 2nd ed.; Spring: Berlin/Heidelberg, Germany, 1984; ISBN 9783642219801. [Google Scholar]
- Aerts, J.M.; Lippens, M.; De Groote, G.; Buyse, J.; Decuypere, E.; Vranken, E.; Berckmans, D. Recursive prediction of broiler growth response to feed intake by using a time-variant parameter estimation method. Poult. Sci.
**2003**, 82, 40–49. [Google Scholar] [CrossRef] [PubMed] - Bemporad, A.; Morari, M.; Ricker, N.L. MathWorks Model Predictive Control Toolbox
^{TM}User’s Guide; Mathworks: Natick, MA, USA, 2015. [Google Scholar] - LeCheminant, J.D.; Jacobsen, D.J.; Bailey, B.W.; Kirk, E.P.; Donelly, J.E. Is greater than 10 percent weight loass associated with further risk reduction in obese women? Med. Sci. Sports Exerc.
**2004**, 36, S82. [Google Scholar] - Henry, C.J.K. Basal metabolic rate studies in humans: Measurement and development of new equations. Public Health Nutr.
**2005**, 8, 1133–1152. [Google Scholar] [CrossRef] [PubMed] - Strathe, A.B.; Sørensen, H.; Danfær, A. A new mathematical model for combining growth and energy intake in animals: The case of the growing pig. J. Theor. Biol.
**2009**, 261, 165–175. [Google Scholar] [CrossRef] [PubMed] - Duncan, K.H.; Bacon, J.A.; Weisner, R.L. The effects of high and low energy density diets on satiety, energy intake and eating time on obese and nonobese subjects. Am. J. Clin. Nutr.
**1983**, 37, 763–767. [Google Scholar] [CrossRef] - Keys, A.; Brozek, J.; Henschel, A.; Mickelsen, O.; Taylor, H.L. The Biology of Human Starvation; University of Minnesota Press: Minneapolis, MN, USA, 1950. [Google Scholar]
- Benz, V.; Bloch, M.; Wardat, S.; Böhm, C.; Maurer, L.; Mahmoodzadeh, S.; Wiedmer, P.; Spranger, J.; Foryst-Ludwig, A.; Kintscher, U. Sexual dimorphic regulation of body weight dynamics and adipose tissue lipolysis. PLoS ONE
**2012**, 7. [Google Scholar] [CrossRef] - Blüher, M. Obesity: Global epidemiology and pathogenesis. Nat. Rev. Endocrinol.
**2019**, 15, 288–298. [Google Scholar] [CrossRef] - Teixeira, P.J.; Carraça, E.V.; Marques, M.M.; Rutter, H.; Oppert, J.M.; De Bourdeaudhuij, I.; Lakerveld, J.; Brug, J. Successful behavior change in obesity interventions in adults: A systematic review of self-regulation mediators. BMC Med.
**2015**, 13, 1–16. [Google Scholar] [CrossRef] - Brockmeyer, T.; Simon, J.J.; Becker, A.; Friederich, H.C. Reward-related decision making and long-term weight loss maintenance. Physiol. Behav.
**2017**, 181, 69–74. [Google Scholar] [CrossRef] - Teixeira, P.J.; Marques, M.M. Health Behavior Change for Obesity Management. Obes. Facts
**2018**, 10, 666–673. [Google Scholar] [CrossRef] [PubMed] - Harcourt, B.E.; Pons, A.; Kao, K.T.; Twindyakirana, C.; Alexander, E.; Haberle, S.; McCallum, Z.; Sabin, M.A. Psychosocial measures and weight change in a clinical paediatric population with obesity. Qual. Life Res.
**2019**, 28, 1555–1564. [Google Scholar] [CrossRef] [PubMed] - Østbye, T.; Stroo, M.; Brouwer, R.J.N.; Peterson, B.L.; Eisenstein, E.L.; Fuemmeler, B.F.; Joyner, J.; Gulley, L.; Dement, J.M. The steps to health employee weight management randomized control trial: Rationale, design and baseline characteristics. Contemp. Clin. Trials
**2013**, 35, 68–76. [Google Scholar] [CrossRef] [PubMed] - Ott, U.; Stanford, J.B.; Greenwood, J.L.J.; Murtaugh, M.A.; Gren, L.H.; Thiese, M.S.; Hegmann, K.T. Stages of weight change among an occupational cohort. J. Occup. Environ. Med.
**2015**, 57, 270–276. [Google Scholar] [CrossRef] [PubMed] - Haynes, P.L.; Silva, G.E.; Howe, G.W.; Thomson, C.A.; Butler, E.A.; Quan, S.F.; Sherrill, D.; Scanlon, M.; Rojo-Wissar, D.M.; Gengler, D.N.; et al. Longitudinal assessment of daily activity patterns on weight change after involuntary job loss: The ADAPT study protocol. BMC Public Health
**2017**, 17, 1–11. [Google Scholar] [CrossRef] - Gudzune, K.A.; Alexander, E.; Tseng, E.; Durkin, N.; Jerome, G.J.; Dalcin, A.; Appel, L.J.; Clark, J.M. Influence of subsidies and promotional strategies on outcomes in a beneficiary-based commercial weight-loss programme. Clin. Obes.
**2019**, 9, e12307. [Google Scholar] [CrossRef] [PubMed] - Horton, E.S. Metabolic aspects of exercise and weight reduction. Med. Sci. Sports Exerc.
**1986**, 18, 10–18. [Google Scholar] [CrossRef] - Anton, S.D.; Moehl, K.; Donahoo, W.T.; Marosi, K.; Lee, S.A.; Mainous, A.G.; Leeuwenburgh, C.; Mattson, M.P. Flipping the Metabolic Switch: Understanding and Applying the Health Benefits of Fasting. Obesity
**2018**, 26, 254–268. [Google Scholar] [CrossRef] - Gram Quist, H.; Christensen, U.; Christensen, K.B.; Aust, B.; Borg, V.; Bjorner, J.B. Psychosocial work environment factors and weight change: A prospective study among Danish health care workers. BMC Public Health
**2013**, 13, 21–23. [Google Scholar] [CrossRef] - Guerrero-Vargas, N.N.; Espitia-Bautista, E.; Buijs, R.M.; Escobar, C. Shift-work: Is time of eating determining metabolic health? Evidence from animal models. Proc. Nutr. Soc.
**2018**, 77, 199–215. [Google Scholar] [CrossRef] - Montesi, L.; El Ghoch, M.; Brodosi, L.; Calugi, S.; Marchesini, G.; Grave, R.D. Long-term weight loss maintenance for obesity: A multidisciplinary approach. Diabetes, Metab. Syndr. Obes. Targets Ther.
**2016**, 9, 37–46. [Google Scholar] - Pedersen, S.; Sniehotta, F.F.; Sainsbury, K.; Evans, E.H.; Marques, M.M.; Stubbs, R.J.; Heitmann, B.L.; Lähteenmäki, L. The complexity of self-regulating food intake in weight loss maintenance. A qualitative study among short- and long-term weight loss maintainers. Soc. Sci. Med.
**2018**, 208, 18–24. [Google Scholar] [CrossRef] [PubMed] - Ryder, J.R.; Kaizer, A.M.; Jenkins, T.M.; Kelly, A.S.; Inge, T.H.; Shaibi, G.Q. Heterogeneity in Response to treatment of adolescents with severe obesity: The need for precision obesity medicine. Obesity
**2019**, 27, 288–294. [Google Scholar] [CrossRef] [PubMed]

**Figure 1.**Energy intake in kcal day

^{−1}(

**a**) and bodyweight in kg (

**b**) curves collected for each one of the 32 participants in the Minnesota starvation.

**Figure 2.**Comparison between the bodyweight curved collected for test participant 8 in the Minnesota starvation experiment (solid line) and the bodyweight curve simulated by a first order time-invariant parameters transfer function model (dashed line).

**Figure 3.**Average mean relative prediction error (MRPE) from the 32 test participants in the Minnesota starvation experiment for different combinations of time window (TW) and prediction horizon (PH) sizes for the DARX (

**a**) and DLR (

**c**) models. Besides, the MRPE for one-week ahead prediction according to different time window sizes is shown for the DARX (

**b**) and DLR (

**d**) models.

**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).

**Figure 5.**Energy intake curves suggested by the MPC controller using the time-invariant averaged TF model in order to follow the theoretical bodyweight curves 1, 2 and 3, (

**a**), (

**c**) and (

**e**), respectively. The reference bodyweight curves 1, 2 and 3 (solid lines) and bodyweight curves obtained with the MPC simulation (dashed lines) are display in (

**b**), (

**d**) and (

**f**), respectively.

**Figure 6.**Energy intake curves suggested by the MPC system based on the time-invariant parameters TF model when uncertainty is added to the a-parameter estimation (

**a**) or in b-parameter estimation (

**c**) and the obtained bodyweight curves when following these respective energy curves (

**b**) and (

**d**), after 100 Monte Carlo simulations are performed.

**Table 1.**Average Young information criterion (YIC) and coefficient of determination, ${R}_{T}^{2}$, together with their standard deviation, obtained during the system identification process for each of the 32 sub-datasets created from the Minnesota starvation excel spreadsheet used in the work of [31]. [n

_{a}n

_{b}δ] indicates the different combinations (24 in total) of time –invariant first and second order models: number of a-parameters (n

_{a}) ranging from 1 to 2 (Equation (2)), number of b-parameters (n

_{b}) ranging from 1 to 2 (Equation (3)) and delays (δ) ranging from 0 to 5 samples.

[1 1 0] | [1 2 0] | [2 1 0] | [2 2 0] | |

YIC | −12 ± 2 | −5 ± 3 | −6 ± 4 | −1 ± 5 |

${\mathit{R}}_{\mathit{T}}^{\mathit{2}}$ | 0.99 ± 0.01 | 0.99 ± 0.01 | 0.93 ± 0.24 | 0.83 ± 0.34 |

[1 1 1] | [1 2 1] | [2 1 1] | [2 2 1] | |

YIC | −11 ± 2 | −6 ± 2 | −1 ± 6 | 2 ± 6 |

${\mathit{R}}_{\mathit{T}}^{\mathit{2}}$ | 0.99 ± 0.01 | 0.99 ± 0.01 | 0.60 ± 0.47 | 0.53 ± 0.49 |

[1 1 2] | [1 2 2] | [2 1 2] | [2 2 2] | |

YIC | −9 ± 1 | −6 ± 2 | 5 ± 3 | 7 ± 6 |

${\mathit{R}}_{\mathit{T}}^{\mathit{2}}$ | 0.97 ± 0.01 | 0.98 ± 0.01 | 0.09 ± 0.28 | 0.21 ± 0.39 |

[1 1 3] | [1 2 3] | [2 1 3] | [2 2 3] | |

YIC | −8 ± 1 | −4 ± 2 | 5 ± 2 | 5 ± 4 |

${\mathit{R}}_{\mathit{T}}^{\mathit{2}}$ | 0.96 ± 0.02 | 0.96 ± 0.02 | 0.03 ± 0.17 | 0.24 ± 0.36 |

[1 1 4] | [1 2 4] | [2 1 4] | [2 2 4] | |

YIC | −6 ± 2 | 1 ± 4 | 6 ± 2 | 6 ± 4 |

${\mathit{R}}_{\mathit{T}}^{\mathit{2}}$ | 0.90 ± 0.16 | 0.84 ± 0.27 | 0.03 ± 0.14 | 0.18 ± 0.30 |

[1 1 5] | [1 2 5] | [2 1 5] | [2 2 5] | |

YIC | −2 ± 4 | 1 ± 3 | 4 ± 3 | 7 ± 5 |

${\mathit{R}}_{\mathit{T}}^{\mathit{2}}$ | 0.75 ± 0.34 | 0.72 ± 0.37 | 0.15 ± 0.31 | 0.19 ± 0.35 |

**Table 2.**Mean and standard deviation of the Pearson correlation coefficient obtained when comparing the first and second orders time-invariant models with no delay ([n

_{a}n

_{b}0]) output and each one of the weight curves collected for the 32 participants in the experiment.

[1 1 0] | [1 2 0] | [2 1 0] | [2 2 0] |

0.999 ± 0.001 | 0.999 ± 0.001 | 0.999 ± 0.001 | 0.999 ± 0.001 |

**Table 3.**Normalized root mean square error (NRMSE) and Pearson correlation coefficient (r) evaluating the fitting agreement between the experimental data and the model output of the dynamic linear regression (DLR) model and a first order dynamic auto-regression with exogenous variables (DARX).

DLR | DARX | |
---|---|---|

NRMSE | 0.997 ± 0.003 | 0.941 ± 0.031 |

r | 0.999 ± 0.001 | 0.997 ± 0.003 |

**Table 4.**Mean relative prediction error (MRPE), in percentage, for different combinations of time window (TW) and prediction horizon (PH) sizes, measured in weeks, when applying the dynamic linear regression (DLR) model.

TW [Week] | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

PH [week] | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | |

1 | 2.82 | 1.96 | 1.81 | 1.75 | 1.66 | 1.66 | 1.57 | 1.51 | 1.39 | 1.36 | 1.31 | 1.33 | 1.24 | |

2 | 4.54 | 3.57 | 3.37 | 3.20 | 3.09 | 3.00 | 2.87 | 2.70 | 2.50 | 2.41 | 2.35 | 2.28 | 2.13 | |

3 | 5.86 | 5.09 | 4.73 | 4.54 | 4.29 | 4.15 | 3.99 | 3.75 | 3.43 | 3.34 | 3.21 | 3.09 | 2.98 | |

4 | 7.22 | 6.44 | 5.98 | 5.65 | 5.37 | 5.21 | 4.99 | 4.65 | 4.39 | 4.23 | 4.01 | 3.91 | 3.77 | |

5 | 8.30 | 7.66 | 7.10 | 6.73 | 6.50 | 6.31 | 5.99 | 5.71 | 5.32 | 5.06 | 4.81 | 4.67 | 4.39 | |

6 | 9.31 | 8.73 | 8.22 | 7.89 | 7.65 | 7.35 | 7.06 | 6.68 | 6.17 | 5.99 | 5.71 | 5.44 | 5.15 | |

7 | 10.24 | 9.92 | 9.43 | 9.08 | 8.67 | 8.44 | 8.05 | 7.53 | 7.26 | 7.02 | 6.59 | 6.34 | 6.03 |

**Table 5.**Mean relative prediction error (MRPE), in percentage, for different combinations of time window (TW) and prediction horizon (PH) sizes, measured in weeks, when applying the dynamic auto-regression with exogenous variables (DARX) model. The values >100 indicate an extremely low forecasting performance of the model.

TW [week] | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

PH [week] | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | |

1 | 2.05 | 1.23 | 1.15 | 1.11 | 1.04 | 1.04 | 1.00 | 0.97 | 1.01 | 0.98 | 0.99 | 1.02 | 1.05 | |

2 | 6.02 | 2.13 | 1.83 | 1.70 | 1.56 | 1.51 | 1.46 | 1.45 | 1.48 | 1.45 | 1.46 | 1.53 | 1.52 | |

3 | 24.64 | 3.45 | 2.69 | 2.35 | 2.06 | 1.95 | 1.91 | 1.86 | 1.90 | 1.85 | 1.91 | 1.91 | 1.90 | |

4 | >100 | 4.94 | 3.50 | 2.92 | 2.53 | 2.38 | 2.30 | 2.31 | 2.33 | 2.27 | 2.27 | 2.25 | 2.28 | |

5 | >100 | 6.35 | 4.22 | 3.44 | 3.07 | 2.84 | 2.79 | 2.77 | 2.79 | 2.70 | 2.67 | 2.67 | 2.74 | |

6 | >100 | 8.36 | 5.02 | 4.05 | 3.55 | 3.30 | 3.21 | 3.15 | 3.19 | 3.07 | 3.06 | 3.12 | 3.18 | |

7 | >100 | 11.21 | 5.85 | 4.66 | 4.08 | 3.74 | 3.64 | 3.57 | 3.59 | 3.50 | 3.53 | 3.54 | 3.53 |

**Table 6.**Normalized root mean square error (NRMSE), root mean square error (RMSE) and Pearson correlation coefficient (r) when comparing the MPC suggestions for energy intake and bodyweight outcome, with the energy intake and body weight from the Minnesota starvation experiment. The MPC systems tested are the one using the time-invariant parameters model without constraints (TI), the same one but with constraints (TIC), the MPC system using the time-variant parameter DARX model without constraints (TV) and this one with constraints (TVC). The RMSE for bodyweight has kg as units and the RMSE for energy intake has kcal day

^{−1}units. The NRMSE value is set to 0 when the energy intake suggested by the MPC and the measured energy intake curves follow diverging dynamics.

Bodyweight [kg] | Energy Intake [kcal day^{−1}] | |||||||
---|---|---|---|---|---|---|---|---|

TI | TIC | TV | TVC | TI | TIC | TV | TVC | |

NRMSE | 0.92 ± 0.01 | 0.92 ± 0.01 | 0.90 ± 0.03 | 0.91 ± 0.02 | 0 | 0 | 0 | 0.92 ± 0.04 |

RMSE | 0.46 ± 0.19 | 0.46 ± 0.19 | 0.33 ± 0.08 | 0.32 ± 0.08 | 1278 ± 875 | 726 ± 324 | 232 ± 121 | 13 ± 10 |

r | 0.99 ± 0.01 | 0.99 ± 0.01 | 0.99 ± 0.01 | 0.99 ± 0.01 | 0.43 ± 0.12 | 0.95 ± 0.03 | 0.41 ± 0.27 | 0.99 ± 0.01 |

**Table 7.**Root mean square error (RMSE) when comparing the MPC end value of bodyweight outcome for all MPCs tested and final energy intake suggestion for the MPC using the time-variant parameter DARX model with constraints (TVC) with the final bodyweight and energy intake values from the Minnesota starvation experiment. The MPC systems tested are the one using the time-invariant parameters model (TI), the same one but adding constraints (TIC), and the MPC system using the time-variant parameter DARX model (TV) and this one with constraints (TVC). The RMSE for bodyweight has kg as units and the RMSE for energy intake has kcal day

^{−1}units.

Bodyweight [kg] | Energy Intake [kcal day^{−1}] | ||||
---|---|---|---|---|---|

TI | TIC | TV | TVC | TVC | |

RMSE | 0.38 ± 0.06 | 0.38 ± 0.06 | 0.26 ± 0.06 | 0.26 ± 0.03 | 9 ± 3 |

**Table 8.**Normalized root mean square error (NRMSE), root mean square error (RMSE), in kg, and Pearson correlation coefficient (r) for the comparison between the bodyweight curve obtain following the suggestions from the MPC systems using the time-invariant parameters transfer function model, without (TI) and with constraints (TIC) and the three theoretical bodyweight reference curves generated.

Reference Curve 1 | Reference Curve 2 | Reference Curve 3 | ||||
---|---|---|---|---|---|---|

TI | TIC | TI | TIC | TI | TIC | |

NRMSE | 0.968 ± 0.004 | 0.969 ± 0.003 | 0.941 ± 0.002 | 0.941 ± 0.003 | 0.943 ± 0.002 | 0.951 ± 0.010 |

RMSE | 0.10 ± 0.05 | 0.10 ± 0.04 | 0.19 ± 0.05 | 0.19 ± 0.05 | 0.15 ± 0.04 | 0.13 ± 0.08 |

r | 0.999 ± 0.001 | 0.998 ± 0.002 | 0.999 ± 0.001 | 0.999 ± 0.001 | 0.998 ± 0.002 | 0.999 ± 0.001 |

**Table 9.**Root mean square error (RMSE), in kg, for the comparison between the end bodyweight from the curves obtain following the suggestions from the MPC systems using the time-invariant parameters transfer function model, without (TI) and with constraints (TIC) and the three theoretical bodyweight reference curves generated.

Reference Curve 1 | Reference Curve 2 | Reference Curve 3 | ||||
---|---|---|---|---|---|---|

TI | TIC | TI | TIC | TI | TIC | |

RMSE | 0.010 ± 0.003 | 0.010 ± 0.003 | 0.034 ± 0.012 | 0.006 ± 0.003 | 0.065 ± 0.38 | 0.065 ± 0.036 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).