Next Article in Journal
Numerical Simulation and Analysis of the Causes and Distribution of Secondary Lining Cracks in Overlapping Railway Tunnels
Previous Article in Journal
Research on Oxygen Supply System of Coal Mine Refuge Chamber Based on Personnel Location and Programmable Logic Controller
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Modeling of Physical Activity Behavioral Interventions Relying on MPC Strategy

1
Facultad de Ingeniería en Electricidad y Computación, Escuela Superior Politécnica del Litoral (ESPOL), Campus Gustavo Galindo Km 30.5 vía Perimetral, P.O. Box 09-01-5863, Guayaquil 090150, Ecuador
2
School of Computer Science and Informatics, Cardiff University, Wales CF24 4AG, UK
*
Author to whom correspondence should be addressed.
Appl. Sci. 2023, 13(11), 6437; https://doi.org/10.3390/app13116437
Submission received: 20 April 2023 / Revised: 16 May 2023 / Accepted: 17 May 2023 / Published: 25 May 2023

Abstract

:
Physical inactivity is becoming an important threat to public health in today’s society. The COVID-19 pandemic has also reduced physical activity (PA) levels given all the restrictions imposed worldwide. In this work, physical activity interventions supported by mobile devices and relying on control engineering principles were proposed. The model was constructed relying on previous studies that consider a fluid analogy of Social Cognitive Theory (SCT), which is a psychological theory that describes how people acquire and maintain certain behaviors, including health-promoting behaviors, through the interplay of personal, environmental, and behavioral factors. The obtained model was validated using secondary data (collected earlier) from a real intervention with a group of male subjects in Great Britain. The present model was extended with new technology for a better understanding of behavior change interventions. This involved the use of applications, such as phone-based ecological momentary assessments, to collect behavioral data and the inclusion of simulations with logical reward conditions for reaching the behavioral threshold. A goal of 10,000 steps per day is recommended due to the significant link observed between higher daily step counts and lower mortality risk. The intervention was designed using a Model Predictive Control (MPC) algorithm configured to obtain a desired performance. The system was tested and validated using simulation scenarios that resemble different situations that may occur in a real setting.

1. Introduction

According to the World Health Organization (WHO), physical inactivity is becoming a serious problem worldwide. Sedentary people tend to develop major health issues, most needing long-term treatments or continuous medication. In some countries, people without private insurance rely on local government health providers to be treated. Consequently, governments are held responsible for the health, treatment, and medical care of millions of citizens which causes a huge economic impact. On the other hand, physical activity (PA) decreases emotional stress and improves physical and psychological health [1]. The COVID-19 pandemic has had unprecedented health, economic, and social consequences worldwide causing a decrease in physical activity and a deterioration in physical and psychological health [2,3,4].
Different organizations (i.e., National Institutes of Health (NIH) or American Council on Exercise (ACE)) are trying to encourage people to engage more in physical activity and are involved in research on how to do this effectively [5,6]. As part of the aforementioned research, Behavioral Intervention models were developed based on Bandura’s Social Cognitive Theory (SCT) [7,8,9]. Fortunately, to mitigate the problem of sedentary behavior, recent technologies have opened new ways for intervening upon behavior via mobile applications to improve and test models with data that can be collected easily, using “patient-friendly” ideas [10].
For some years now, control system engineering principles have been proposed to address problems in behavioral medicine [11,12]. In this work, a control strategy was proposed that relies on an SCT model obtained from secondary data (information that was collected and analyzed by someone else for a different purpose but can be reused for a new research project) and tested on a different model obtained from primary data (information that is original and has not been collected or analyzed by anyone else for a different purpose) to address the physical inactivity issue.
In summary, this paper presents a model approach to simulating and managing dynamic multivariable systems using Model Predictive Control (MPC), which has gained significant traction in the biomedical engineering and control systems field. It involves creating a model of the system being controlled and using that model to predict future behavior and optimize control inputs accordingly [13,14].
The paper is organized as follows. Section 2 presents a modeling procedure obtained from previous research regarding Behavioral Intervention problems and the challenges that arose. Section 3 describes the proposed control strategy for Behavioral Intervention. Section 4 provides the details of the results of the analysis obtained from a simulation using the proposed controller. Section 5 gives a summary of conclusions and future work.

2. Modeling Procedure

Bandura’s Social Cognitive Theory (SCT) is a widely used framework for behavior change strategies, providing a basis for understanding behavior and its relationships. SCT emphasizes reciprocal determinism, where personal factors, environmental factors, and behavior interact and mutually affect each other; in other words, that both personal and environmental factors contribute to shaping behavior and, in turn, behavior also influences personal and environmental factors [7]. Using a fluid analogy can help to create a structured framework and mathematical model of behavioral performance in a simple way, representing Bandura’s SCT constructs and their interrelationships. The outputs are treated as levels of tanks (constructs), while the other signals are treated as inputs to those inventories. Behavior is represented as a fluid inventory that changes over time ( t ) based on various SCT factors. The model was developed on a daily time frame and could be adapted for different behaviors and time frames of interest [15]. The levels of tanks are represented by the variables η i and exogenous inputs are represented in the diagram by variables ξ i . The inflow resistances are denoted by γ i and outflow resistances are represented by β i . These resistances can be interpreted as the fraction of each inventory or input that flows from one instance to the next. Other parameters represent the physical characteristics of each inventory and flow, including time constants τ i and time delays θ i . Unmeasured disturbances are considered as ζ i .
By means of a fluid analogy of SCT, computational approaches can be used to model and test these relationships, while mobile and wireless technologies can help measure them in real-time. SCT has proven successful in mobile health interventions for biomedical engineering and applications such as smoking cessation, weight management, and management of physical inactivity [8].
A procedure for identifying a dynamic model of a Social Norm Physical Activity Intervention was proposed using a semi-physical system and data from a randomized controlled trial [9,16]. However, the secondary data model needs to be improved in order to meet the necessary conditions for the proposed behavior change intervention.

2.1. Secondary Data Modeling

A model was created through secondary data analysis of a randomized controlled trial conducted in the United Kingdom, which suggested that smartphones are effective at motivating individuals with limited intrinsic motivation for exercise to engage in physical activity [16]. There were three groups of 55 male adult participants each. Data from participant number 115 were used for the semi-physical identification because he had the most reliable set of data for the study period with the least amount of missing information.
The structure of the intervention is based on a simplified version of the dynamical systems model of the Social Cognitive Theory (SCT) presented by Martín et al. [15], which is illustrated as a fluid analogy in Figure 1. The only output considered is the behavior ( η 4 ), which is measured through the number of daily steps taken by the individual. This “subsystem” is used to describe the algorithm of physical activity intervention related to social norms to encourage physical activity behavior.
The simplified model included inputs ( ξ 1 ), ( ξ 2 ), ( ξ 5 ) and ( ξ 7 ), while ignoring inputs ( ξ 3 ) (Persuasion), ( ξ 4 ) (Internal Cues), and ( ξ 6 ) (Intrapersonal States) as they were irrelevant to the study. These inputs will be assumed to be equal to zero. The meaning of some inputs is:
  • Skills training ( ξ 1 ). These activities help to increase (or decrease) the self-management skills of the individual.
  • Observed behavior of others ( ξ 2 ). This input refers to vicarious learning or social learning. This is a type of learning that occurs when an individual can acquire knowledge and skills by observing others and learning from the outcomes of their actions.
  • Perceived barriers ( ξ 5 ). This input refers to external conditions that affect behavior. For instance, unfavorable weather conditions, limited availability of exercise facilities, or insufficiently secure walking paths can all hinder physical activity levels. This input refers to conditions that are perceived by the participants.
  • Environmental context ( ξ 7 ). This input refers to situational factors which directly influence the behavioral outcomes. This study takes into account the date of measurement, which is identified as either a weekend or a weekday.
This approach used principles from semi-physical system identification and relied on the widely-accepted prediction–error identification methods (PEM) [17]. Semi-physical identification combines physical knowledge and experimental data to create a mathematical model of a physical system (which was created based on the data obtained from male subjects in Great Britain and was previously presented in an earlier study published in 2016) [16]. It involves using simplified physical models or analogies to represent a complex system (human behavior can be considered a complex system, composed of interconnected components that interact nonlinearly) and then fitting experimental data to these models to estimate system parameters. This approach can be used to predict the system’s behavior under different conditions.
The estimation process was carried out in MATLAB® using the idgrey and greyest commands from the System Identification Toolbox [18]. The idgrey model is used to represent a system as a state-space model with identifiable coefficients. The greyest function is employed to estimate the unknown parameters of the idgrey model. Results obtained are depicted in Figure 2. By comparing the estimated behavior ( η 4 ) based on the number of steps obtained from semi-physical identification using simulated data with the real experimental data from male adult participant number 115, a fitting of 30.5% was achieved with nine iterations, which serves as a good starting point.
Additionally, a validation procedure relying on correlation analysis was performed for a semi-physical identification method resulting in residual errors within confidence bounds. The autocorrelation for behavior and cross-correlation for different lags between behavior and each of the following variables are shown in Figure 3, where:
  • “Co-usage”⇔“skills training” corresponds to the daily number of glances at the application.
  • “Sumusa” is “sum of application usage”⇔“observed behavior” is the total length of time (in seconds) per day the application was glanced at.
  • “Weather”⇔“perceived barriers” means the environmental condition in which the subject is influenced to engage in physical activity or not.
  • “Weekend”⇔“environmental context” indicates whether the date of measurement falls or does not fall during the weekend.
Lag refers to a time delay or temporal shift between two variables. Therefore, when calculating correlation with lag, the relationship between the two variables was analyzed with a certain time delay to see if there was any significant correlation between them at that specific moment.
Correlation analysis is a statistical method that measures the strength and direction of the relationship between two variables. It uses the correlation coefficient, with the amplitude ranging from −1 to 1, where −1 indicates a perfect negative correlation, 0 indicates no correlation, and 1 indicates a perfect positive correlation. To confirm the predictive ability of the model [9], it was expected that the amplitude of autocorrelation would be equal to 1 at zero lag and would take any value within the confidence interval for other lags, if the model is reliable. Moreover, the values within the confidence bounds depicted in Figure 3 in the cross-correlation plots validate the reliability of the model [19].
Although the percentage fit was relatively low, the model developed in [9] is able to follow some of the dynamic characteristics of the system (i.e., amplitude and frequency variations of the signal η 4 over time), even though it was derived from secondary data. Nevertheless, the model has limited applicability for the required purpose since it does not support the implementation of behavioral interventions using external cues or reinforcement through outcome expectancy.
As a result of the previous analysis, internal parameters for the secondary data SCT model were obtained [9]. For the intervention design, this SCT model needs to be expanded to include additional input variables directly associated with the required behavior change intervention. Thus, the secondary data model was expanded with parameters obtained from different experiments where preliminary validated models were obtained using primary data [11,20].

2.2. Hypothetical Model

A second extended model is now considered including additional parameters and intervention inputs. For this purpose, an SCT model enhanced with individualized self-regulation via internalized cues is shown in Figure 4. In the case of this model, too, the daily number of steps was used as a measure of behavior ( η 4 ). The primary aim of the intervention proposal is to promote physical activity among inactive individuals, with the specific target of achieving an average of 10,000 daily steps per week in light of the observed significant negative correlation between daily step counts and mortality risk [21]. To motivate participants, the intervention’s conceptual diagram incorporates a reward system. The model includes the following inputs and outputs:
  • Environmental context ( ξ 7 ), social and physical factors that affect behavior.
  • External cues ( ξ 8 ), triggers to engage in the behavior.
  • Expected points ( ξ 9 ), the expected daily reward points that will be exchanged for specific rewards.
  • Granted points ( ξ 10 ), which are fed to the behavioral outcomes ( η 5 ) inventory only if the performed behavior ( η 4 ) meets or exceeds the specified goal ( u 8 ).
  • Goal attainment ( ξ 11 ), a new input signal that indicates the amount of attainment of the established goals.
  • Outcome expectancy ( η 2 ), the perceived probability that performing a given behavior will result in specific outcomes.
  • Self-efficacy ( η 3 ), the self-perceived capability to perform the required behavior.
  • Behavior ( η 4 ), the behavior of interest, e.g., daily performed steps.
  • Behavioral outcomes ( η 5 ), positive or negative outcomes resulting from the behavior, e.g., lost weight, physical pain.
The simplified SCT model upon which the physical activity intervention design with goal setting is based is illustrated in Figure 5, where:
  • Daily goals ( u 8 ) , to quantitatively establish the desired behavior, e.g., 10,000 steps per day.
  • Expected points ( u 9 ) , the daily reward points announced that will be given to individuals if they achieve the daily goal.
  • Granted points ( u 10 ) , given every day if individuals meet the established goal; this feature is represented by the “if/then” block. The points can be redeemed later for tangible rewards, such as gift cards.
  • Goal attainment ( u 11 ) = ξ 11 = y 4 u 8 , a signal that represents the gap between the actual behavior and daily goals. It can be used as an input for the self-efficacy inventory and as an output to evaluate the effectiveness of the intervention.
The fluid analogy allows the use of the conservation of mass principle to calculate the accumulation of each inventory based on the net difference between mass inflows and outflows over time domain t. It relates to how a system or signal changes over time. Variables ξ i represent external excitations (i.e., inputs), η i are the inventory levels (i.e., outputs), γ 1 and β 1 are factors that represent interactions among the different constructs, ζ i are external disturbances, and θ i are delay times. The fluid analogy can be represented by the following system of first-order differential equations: Equations (1)–(5).
τ 2 d η 2 d t = γ 29 ξ 9 ( t θ 21 ) + β 25 η 5 ( t θ 14 ) η 2 ( t ) + ζ 2 ( t )
τ 3 d η 3 d t = γ 311 ξ 11 ( t θ 22 ) + β 34 η 4 ( t θ 13 ) η 3 ( t ) + ζ 3 ( t )
τ 4 d η 4 d t = β 42 η 2 ( t θ 6 ) + β 43 η 3 ( t θ 8 ) + β 46 η 6 ( t θ 17 ) + β 45 η 5 ( t θ 19 ) η 4 ( t ) + ζ 4 ( t )
τ 5 d η 5 d t = γ 57 ξ 7 ( t θ 15 ) + γ 510 ξ 10 ( t θ 20 ) + β 54 η 4 ( t θ 12 ) η 5 ( t ) + ζ 5 ( t )
τ 6 d η 6 d t = γ 64 ξ 4 ( t θ 11 ) + γ 68 ξ 8 ( t θ 18 ) η 6 ( t ) + ζ 6 ( t ) .
The extended model includes two additional components. The first one is incorporating an optimal range for step goals. This was accomplished by adding a goal attainment signal that affects self-efficacy based on the effectiveness of the required behavior. Secondly, a self-regulation loop was established by using internal cues and is represented by the C s r block. The idea behind this block is derived from internal model control (IMC) [23]) and is mathematically defined in the equation outlined in [11]. The self-regulation process is represented through a controller that adjusts action cues based on the discrepancies between the set goal ( u 8 ) and the measured outcome ( y 4 ). The controller needs to allow for a partial set point tracking to permit other intervention components (such as points) to influence changes in the output. According to the IMC formulation, the self-regulator is a classical feedback controller. See Equation (6).
c s r = K s r γ 64 β 46 τ 4 s + 1 λ s K s r + 1 .
The performance of the self-regulator is determined by two parameters: λ , which indicates the closed-loop speed of response, and K s r , which ranges between 0 and 1 and represents the level of integral action, with 1 indicating perfect integral action. Equations (1)–(5), without disturbances or delays ( ζ i = 0 , θ i = 0 , i ), and self-regulator C s r , with state η 7 , were considered. Assuming that the dominant effect on the output is obtained from the time constant of the behavior inventory ( η 4 ), the state matrices are shown in Equations (Section 2.2)–(9).
A = 1 τ 2 0 0 β 25 τ 2 0 0 0 1 τ 3 β 34 + γ 311 τ 3 0 0 0 β 42 τ 4 β 43 τ 4 1 τ 4 β 45 τ 4 β 46 τ 4 0 0 0 β 54 τ 5 1 τ 5 0 0 0 0 γ 64 M s r τ 4 τ 6 0 1 τ 6 γ 64 M s r ( 1 N s r τ 4 ) τ 4 τ 6 0 0 1 0 0 N s r
B = 0 0 γ 29 τ 2 0 0 0 γ 311 τ 3 0 0 γ 34 τ 3 0 0 0 0 0 γ 57 τ 5 0 0 γ 510 τ 5 0 0 γ 64 M s r τ 4 τ 6 0 0 0 0 1 0 0 0
C = 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0
where:
M s r = K s r γ 64 β 46 λ
N s r = 1 K s r λ .
A stimulus in the form of a reward mechanism was employed to encourage the desired behavior in the intervention, whereby users receive a specified number of points ( ξ 9 ) upon reaching their daily step goals ( u 8 ). These points can later be exchanged for tangible rewards. This is represented by an if/then block that is considered external to the simplified SCT model due to its non-linear nature, as depicted in Figure 4.
The obtained model can be described by means of the parameters shown in Table 1, which were partially obtained through Secondary Data Modeling in Section 2.1, using a semi-physical estimation procedure (combining physical knowledge and experimental data to create a mathematical model).

3. Control Strategy

The control strategy for the intervention must incorporate the defined requirements and constraints for physical activity behavioral intervention. Model Predictive Control (MPC) is a controller formulation whereby the current values of the manipulated variables are determined in real-time as the solution of an optimal control problem over a horizon of a given length [14]. In MPC, “move horizon” refers to the number of future control moves computed by the controller at each time step. These future moves are then used to optimize the control actions over a finite time horizon. The “move horizon” length is a key design parameter in MPC, as it affects the trade-off between computational complexity and control performance. A more extended move horizon allows for better prediction and optimization of future behavior but requires more computation time. The optimization problem is solved for a move horizon using a “hypothetical model”, from where a new set of control moves are obtained [22]. Therefore the success of MPC depends on the degree of precision of the model. Only the first calculated move is applied at each instant; the whole process is repeated and new control moves are obtained.

3.1. Open-Loop Behavioral Interventions Analysis: Tuning of MPC

The proper selection of controller parameters (tuning) can be estimated by analyzing the open-loop step response of the proposed behavioral interventions. The choice of suitable values for these parameters is important because they affect not only the controller’s performance but also the computational complexity of the MPC algorithm, which solves an optimization problem online at each time step. Analyzing an open-loop step response is important because it provides information about the dynamic behavior of a system. It allows us to observe the system’s response to a sudden change in its input and measure its performance in terms of characteristics such as rise time, settling time, overshoot, and steady-state error. This information is crucial for obtaining specifications of the system (human behavior) and tuning the controller parameters to achieve desired performance. By analyzing the open-loop step response, we can gain insights into the system’s stability, transient response, and steady-state behavior, which are all essential for designing and implementing control systems. Given the aim of reaching 10,000 steps daily, our approach to conducting the open-loop test involves setting a target of 1500 steps per day for the model and observing the point at which the system attains stability, as indicated in Figure 6. Based on the system’s stabilization from day 20 onwards, calculations are made for the dynamic specifications of the performed step response.
From this, some specifications and parameters of the system are calculated: percent overshoot ( % O S ), damping ratio ( ζ ), natural frequency ( ω n ), and rise time ( T r ). Rise time is the time required for the system output to reach and maintain a percentage of its final value, typically 90%. It is an important characteristic of a system’s response because it indicates how quickly the system can respond to changes in its input. A shorter rise time indicates a faster response and better performance. See Equations (12)–(15).
% O S = 2763 2276 2276 776.1 × 100 = 32.46 % ,
ζ = l n ( % O S / 100 ) π 2 + ( l n ( % O S / 100 ) ) 2 = 0.337 ,
ω n = π T p 1 ζ 2 = 0.67 ( r a d / d a y ) ,
T r = π c o s 1 ( ζ ) ω n 1 ζ 2 = 1.99 ( d a y s ) .
The sampling time parameter ( T s ) is the rate at which data are sampled. This time is determined based on two considerations: limiting the number of samples to 20 during the rise time to avoid computational overload, and following Nyquist’s theorem, which requires sampling a periodic signal at more than twice the highest frequency component of the signal [24]. See Equations (16) and (17).
T s > T r 20 T s > 1.99 20 T s > 0.099 ( d a y s ) ,
ω s > 2 ω n 2 π T s > 2 ω n T s < π ω n T s < 4.69 ( d a y s ) .
Thus, given 0.099 < T s < 4.69 , a value of T s = 1 is recommended.
Selecting a prediction horizon that covers its significant dynamics is crucial to predicting a system’s future behavior accurately. A recommended approach is to choose a value that is high enough to capture the relevant dynamics but not too high to introduce unnecessary delay [13]. Based on the calculation of the sampling time, it is recommended to use a prediction horizon of 20 to 40 samples in order to cover the transient response of the open-loop system. A prediction horizon parameter value of 30 was selected. Choosing a very large control horizon only increases computational complexity. The control horizon was chosen to be less than (or equal to) the prediction horizon [25]. Thus, the value of the control horizon parameter was selected to be equal to 10.
Finally, the parameters shown in Table 2 were selected, and a maximum number of 15,000 steps as the daily goal was chosen. Additionally, considering that 10 points correspond to one cent of a US dollar, a maximum daily limit of 5000 points, corresponding to USD 5 as a reward, was established.

3.2. MPC Close Loop Structure

MPC uses a system model to predict behavior (e.g., the number of steps). It handles MIMO systems (Multiple-Input Multiple-Output) with interactions between inputs and outputs. The goal is to find the optimal control action that minimizes a cost function subject to constraints. Quadratic Programming (QP) is a mathematical optimization technique that aims to find the optimal solution to a given problem by minimizing or maximizing an objective function subject to certain constraints. QP involves the use of mathematical models and algorithms to optimize a specific objective function while satisfying a set of constraints. Thus, QP was used to determine the best control input at each time step, to achieve optimal performance while adhering to the system’s constraints. The strategy is known as a receding horizon control strategy, where only the first calculated moves are applied at each instant and the process is repeated to obtain new control moves. This strategy is shown in Figure 7. The MPC structure used in this project is shown in Figure 8. The layout of the project ecosystem implemented in MATLAB ® is shown in Figure 9. Some abbreviations used in this figure are explained in Table 3.
At each time instant (t), the controller uses previous system information and its states, current demands, and control actions to forecast the system outcome for the prediction horizon. Based on this, it calculates a sequence of future control actions for the control or move horizon by solving an optimization problem using cost functions from Equations (18) and (19).
J ( z k ) = J y ( z k ) + J u ( z k ) + J Δ u ( z k ) + J ε ( z k )
z k T = u ( k | k ) T u ( k + 1 | k ) T . . . u ( k + p 1 | k ) T ε k ,
where J i ( z k ) are the partial cost functions, z k is the quadratic programming ( Q P ) decision, and slack variable ε k (dimensionless) represents the deviation of system state variables from their setpoints at each control interval in control systems.
J y ( z k ) = j = 1 n y i = 1 p w i , j y s j y r j ( k + i | k ) y j ( k + i | k ) 2 ,
where:
  • k is the current control interval;
  • p is the prediction horizon (number of intervals);
  • n y is the number of plant output variables;
  • y j ( k + i | k ) is the predicted value of the jth plant output at the i th prediction horizon step;
  • r j ( k + i | k ) is the reference value for the jth plant output at the ith prediction horizon step;
  • s j y is the scale factor for the jth plant output;
  • w i , j y is the tuning weight for the jth plant output at the ith prediction horizon step (dimensionless).
The values n y , p, s j y , and w i , j y are constant controller specifications. The controller receives r j ( k + i | k ) for the entire prediction horizon and uses the state observer to predict the plant outputs, y j ( k + i | k ) , which depend on manipulated variables (MV) adjustments ( u k ) (goals ( u 8 ) and expected points ( u 9 )), measured disturbances (MD), and state estimates. At interval k, the state estimates and MD values are available. Therefore, J y is a function of z k only.
The second cost function is:
J u ( z k ) = j = 1 n u i = 0 p 1 w i , j u s j u u j ( k + i | k ) u j , t a r g e t ( k + i | k ) 2 ,
where:
  • n u is the number of MV;
  • u j , t a r g e t ( k + i | k ) is the target value for jth MV at the ith prediction horizon step;
  • s j u is the scale factor for the jth MV;
  • w i , j u is the tuning weight for the jth MV at the ith prediction horizon step (dimensionless).
The values n u , p, s j u and w i , j u are constant controller specifications. The controller receives u j , t a r g e t ( k + i | k ) —values for the entire horizon. The controller uses the state observer to predict the plant outputs. Thus, J u is a function of z k only.
An MPC controller uses the subsequent scalar performance metric to suppress the movement of manipulated variables (see Equation (22)),
J Δ u ( z k ) = j = 1 n u i = 0 p 1 w i , j Δ u s j u u j ( k + i | k ) u j ( k + i 1 | k ) 2
and the partial cost function for the slack variable ε k (see Equation (23)). In practical applications, constraint violations can sometimes be inevitable. Soft constraints ensure a feasible QP solution even under such conditions. An MPC controller utilizes a slack variable, ε k , which is non-negative (greater than or equal to zero) and dimensionless, to measure the worst-case constraint violation.
J ε ( z k ) = ρ ε ε k 2 ,
where:
  • ε k is the slack variable at control interval k (dimensionless);
  • ρ ε is the constraint violation penalty weight (dimensionless).
The slack variable ε k represents the amount by which the system state variables can deviate from their setpoints at each control interval. The value of ε k is used to ensure that the constraints are satisfied within the given tolerance levels. On the other hand, the weight assigned to the constraint violation penalty, ρ ε , is a scalar value that determines the trade-off between achieving a lower cost function and satisfying the constraints. A higher value of ρ ε indicates a greater penalty for violating the constraints, which can lead to a more conservative controller.
MPC constraints are limited as shown below.
y m i n y j ( k + i | k ) s j y y m a x , i = 1 : p , j = 1 : n y u m i n u j ( k + i 1 | k ) s j u u m a x , i = 1 : p , j = 1 : n u Δ u m i n Δ u j ( k + i 1 | k ) s j u Δ u m a x , i = 1 : p , j = 1 : n u ,
where:
y m i n = y j , m i n ( i ) s j y ε k V j , m i n y ( i ) y m a x = y j , m a x ( i ) s j y + ε k V j , m a x y ( i ) u m i n = u j , m i n ( i ) s j u ε k V j , m i n u ( i ) u m a x = u j , m a x ( i ) s j u + ε k V j , m a x u ( i ) Δ u m i n = Δ u j , m i n ( i ) s j u ε k V j , m i n Δ u ( i ) Δ u m a x = Δ u j , m a x ( i ) s j u + ε k V j , m a x Δ u ( i ) .
Here, V j parameters correspond to the Equal Concern for Relaxation parameter (ECR), which specifies the relative importance of satisfying constraints versus achieving performance goals in a control problem. They are dimensionless controller constants analogous to the cost function weights and used for constraint softening (zero implies a hard constraint). A more significant positive ECR value means that the controller is willing to compromise the satisfaction of the constraint to achieve the goals.
  • ε k is a scalar QP slack variable (dimensionless) used for constraint softening;
  • s j y is a scale factor for the jth plant output;
  • s j u is a scale factor for the jth MV;
  • y j , m i n ( i ) , y j , m a x ( i ) are the lower and upper bounds for the jth plant output at the ith prediction horizon step;
  • u j , m i n ( i ) , u j , m a x ( i ) are the lower and upper bounds for the jth MV at the ith prediction horizon step;
  • Δ u j , m i n ( j ) , Δ u j , m a x ( i ) are the lower and upper bounds for the jth MV increment at the ith prediction horizon step.
Due to the substantial correlation between higher daily step counts and lower mortality risk, a recommended target of 10,000 steps per day has been established [26].
As mentioned before, a maximum number of 15,000 steps as the daily goal was chosen. Furthermore, a daily cap of 5000 points was set, which equates to a reward of USD 5, given that 10 points are equivalent to one cent. These constraints are indicated in Table 4.
In an MPC controller design, the selection of the weights must be chosen to favor or disfavor the variability of the MVs, their rate, and the variability of the outputs. The selected weights for the MPC are shown in Table 5.

4. Results Analysis

It is essential to use accurate system parameters when designing and testing a control system to ensure that it performs as expected and achieves the desired control objectives. Thus, an identification procedure with the data from the “hypothetical model” was performed to obtain a linear state-space variable model. This discrete model was then used to design an MPC controller that considers the actual system dynamics. However, to test the controller the “hypothetical model” was used. This led to a difference between the identified parameters used for the MPC design and the system’s parameters used for simulation, similar to what may occur in a real scenario.
The proposed controller was tested and the following results were obtained (Figure 10). The results from day 30 to day 120 are shown. During the first month, an initial desired behavior of 1000 daily steps was set.
The response of the manipulated variables (i.e., goals ( u 8 ) and expected points ( u 9 )) is shown in Figure 11, demonstrating the successful achievement of the constraints considered in the MPC design. Since the weight of the expected points was set to 1 (the highest level of importance), the signal tends to decrease over time. On the other hand, the weight of the goals was set to 0, resulting in an increase and stabilization of the signal at a steady-state value of around 10,000 steps.
In Figure 12 and Figure 13, the other input variables (granted points ( u 10 ) and goal attainment ( u 11 )) are shown. It is noticeable that the number of granted points in Figure 12 was lower than the number of expected points in Figure 11. Meanwhile, the goal attainment signal in Figure 13 shows that, for the majority of the experiment, the number of daily steps taken surpassed the proposed goal.
In Figure 14, the steady state of the goal attainment signal is shown. It can be observed that most of the time this signal has positive values, which indicates that the number of daily steps is greater than the set goal. Goal attainment positively affects behavior through the auto-efficacy inventory as demonstrated through the fluid analogy of the SCT model.
The designed controller achieves the desired behavior even though there is a mismatch between the model used for the MPC design and the model used for the simulation. Thanks to the robust control ideas of this type of controller, the difference between those models does not affect the system’s performance. Only a few points were needed as rewards to achieve the desired behavior. A ramp test was also performed to examine the dynamic performance of a system by evaluating how it reacts to a gradually varying input signal. The results of this progressive approach can be observed in Figure 15. It can be observed that the output tracks the reference input, achieving zero steady-state error. This input type is suggested for the experiment to avoid abrupt changes in the output with the step input.
To further demonstrate the performance of the designed controller, two parameters that directly affect behavior were modified; the values were arbitrarily selected. In the first scenario, the time constant τ 4 was modified from 0.8 to 0.65 days. Figure 16 shows the original and modified responses. In the second scenario, the input coefficient from the behavior inventory β 45 was modified from 0.5 to 0.8; the obtained results are shown in Figure 17. In both scenarios, it can be observed that the obtained responses do not suffer any significant change compared to the system response without the parameter modification.
The results obtained from varying both τ 4 and β 45 simultaneously are shown in Figure 18. In the three scenarios, it can be observed that the steps tracking is maintained, thus zero steady-state error is achieved even though there is a mismatch between the identified model, which was used for the MPC design, and the hypothetical model used for the simulation, which also had some of its parameters modified.
The effect of the time constant parameter τ 4 is significant for the system’s performance. A time-constant sweep was performed via simulation. The results obtained from the simulation for the minimum and maximum tested values, as well as for the original value ( τ 4 = 0.8 ) are shown in Figure 19. It should be noted that the controller responds better when the time constant is increased from its original value than when it is decreased. When the time constant decreases, the system tends to become unstable.
A sweep was conducted for the parameter value of β , with the limitation that it can only take values between 0 and 1. The results obtained from the simulation with all arbitrarily considered values are shown in Figure 20. The settling time is approximately the same in the three scenarios. However, the percentage overshoot is affected by the parameter variation but the zero steady-state error is still achieved. The time constant parameter τ 4 is more sensitive (meaning it has a greater impact on the stability of the system) than the input coefficient β 45 .
An analysis of the obtained results is presented below, along with relevant comments and requisite considerations, while acknowledging that this is an approximation of a complex system such as human behavior.
Despite the limitations of the mathematical modeling of human behavior, initial estimates of the MPC controller’s parameters were made based on the model obtained. Open-loop tests were conducted to establish the natural and uncontrolled response of the model, followed by closed-loop tests to evaluate the system’s response to gradual and continuous changes in input. The controller successfully regulated both step and ramp signals, although the step response showed a relatively high overshoot. Implementing saturation-limiting elements could address this issue.
Finally, closed-loop tests were conducted for different scenarios and the controller was effective in absorbing variations in sensitivity levels depending on the parameter being varied. We should note that the time constant parameter τ 4 appears to have a considerably more significant impact on the stability of the system compared to the input coefficient β 45 . This suggests that it exhibits a higher level of sensitivity concerning the stability of the system.

5. Conclusions and Future Work

In previous work co-authored by some of the present study’s authors, a model was obtained relying on secondary data focused on interventions for physical inactivity problems [9]. However, the earlier model did not take into consideration some critical aspects needed for the proposed behavioral interventions. In the present study, a new hypothetical model was proposed including information obtained from the initial secondary data modeling, supplemented with additional parameters obtained from previous experiments and personal experiences to include all the inputs and outputs needed for the proposed behavioral intervention.
This hypothetical model was simulated under realistic conditions to provide data for system identification; the model obtained as a result of this process was used for the MPC design. As frequently seen in practical control scenarios, some of the parameters of the hypothetical model differ from the parameters of the identified linear model causing a model mismatch. Another factor contributing to model mismatch is the non-linearity of the hypothetical system and the fact that each person’s state represents a different set of those parameters.
Because this model represents human behavior using Bandura’s Social Cognitive Theory and fluid analogy, a mismatch will exist between the person’s behavior, the model output, and the identified system output. This leads to the need for a model-based controller that is able to absorb the model mismatches. The MPC control strategy meets these requirements and was demonstrated to be suitable for the non-linear behavioral intervention model. This work presented the results from the proposed adaptive MPC Control Design applied to a non-linear behavioral intervention model.
Simulations demonstrated that the MPC controller could maintain zero steady-state error and similar settling times even if a critical parameter of the behavior inventory was modified. Additionally, because it is possible to set weights and constraints using this control strategy, the number of points granted as a reward was low, which is important for the economic aspect of this kind of intervention. A settling time of approximately 10 days was achieved. However, this value is not feasible in a real-life situation because other aspects need to be taken into account that the model does not. For example, in this case, if someone is able to achieve the goal within 10 days, he/she is probably able to succeed without the need for additional rewards. This is a case of someone who is likely a young athlete, and therefore is outside the target group of interest.
As future work, a validation test for the mathematical models created through system identification, which is the process of building mathematical models of dynamic systems based on observed data, should be performed. A reliable model is needed for a good MPC performance, hence system identification is a fundamental undertaking prior to the MPC design. The duration of the experiment is critical if it is performed in real-time and not simulated, so a test monitoring procedure should also be performed during the online identification of the parameter values carried out to improve the reliability of the obtained model.
Due to the nature of the system, each person represents a different set of parameters. Additionally, for a given person, this set of parameters can change as a function of that person’s state (mental, physical, or environmental). Therefore, a multiple MPC design is highly recommended. This controller could include different models that represent different states of a given person and switch the controller parameters, weights, and constraints used depending on their current and past states.

Author Contributions

Conceptualization, C.S., C.M., V.A. and P.E.; Investigation, C.S. and A.A.; Methodology, C.S., C.M. and V.A.; Project administration, C.S. and C.M.; Software, A.A. and V.A.; Validation, A.A.; Writing—original draft, C.S. and A.A.; Writing—review & editing, C.S., C.M. and P.E. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are available from the authors upon request.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Stults-Kolehmainen, M.; Sinha, R. The effects of stress on physical activity and exercise. Sport. Med. 2014, 444, 81–121. [Google Scholar] [CrossRef] [PubMed]
  2. Clemente-Suárez, V.J.; Navarro-Jiménez, E.; Moreno-Luna, L.; Saavedra-Serrano, M.C.; Jimenez, M.; Simón, J.A.; Tornero-Aguilera, J.F. The Impact of the COVID-19 Pandemic on Social, Health, and Economy. Sustainability 2021, 13, 6314. [Google Scholar] [CrossRef]
  3. Budayová, Z.; Pavliková, M.; Samed Al-Adwan, A.; Klasnja, K. The Impact of Modern Technologies on Life in a Pandemic Situation. J. Educ. Cult. Soc. 2022, 13, 213–224. [Google Scholar] [CrossRef]
  4. Stockwell, S.; Trott, M.; Tully, M.; Shin, J.; Barnett, Y.; Butler, L.; McDermott, D.; Schuch, F.; Smith, L. Changes in physical activity and sedentary behaviours from before to during the COVID-19 pandemic lockdown: A systematic review. BMJ Open Sport Exerc. Med. 2021, 7, e000960. [Google Scholar] [CrossRef] [PubMed]
  5. Mandili, I.M.; Balobaid, A.N.; Alzahrani, H.H.; Almalki, M.A.; Alghamdi, A.A.; Alaradi, R.R.; Fallatah, H.B.; Alzahrani, W.H.; Alamri, H.Z.; Eid, S.S. Types of chronic diseases associated with sedentary behaviour and physical inactivity. Int. J. Community Med. Public Health 2022, 9, 3965–3970. [Google Scholar] [CrossRef]
  6. González, K.; Fuentes, J.; Márquez, J.L. Physical Inactivity, Sedentary Behavior and Chronic Diseases. Korean J. Fam. Med. 2017, 38, 111–115. [Google Scholar] [CrossRef] [PubMed]
  7. Bandura, A. Human agency in social cognitive theory. Am. Psychol. 1989, 44, 1174–1184. [Google Scholar] [CrossRef] [PubMed]
  8. Martín, C.; Rivera, D.; Hekler, E.; Riley, W.; Buman, M.; Adams, M.; Magann, A. Development of a Control-Oriented Model of Social Cognitive Theory for Optimized mHealth Behavioral Interventions. IEEE Trans. Control. Syst. Technol. 2018, 28, 1–16. [Google Scholar] [CrossRef] [PubMed]
  9. Asanza, V.; Martín, C.; Eslambolchilar, P.; van Woerden, H.; Cajo, R.; Salazar, C. Finding a Dynamical Model of a Social Norm Physical Activity Intervention. In Proceedings of the 2nd IEEE Ecuador Technical Chapters Meeting, Salinas, Ecuador, 16–20 October 2017. [Google Scholar]
  10. Rivera, D.; Lee, H.; Braun, M.; Mittelmann, H. Plant-friendly system identification: A challenge for the process industries. In Proceedings of the 13th IFAC Symposium on System Identification (SYSID), Rotterdam, The Netherlands, 27–29 August 2003; pp. 917–922. [Google Scholar]
  11. Martín, C.A.; Rivera, D.E.; Hekler, E.B. A control engineering approach for optimizing physical activity behavioral interventions. In Proceedings of the 1st IEEE Ecuador Technical Chapters Meeting, Guayaquil, Ecuador, 12–14 October 2016. [Google Scholar]
  12. Hekler, E.B.; Rivera, D.E.; Martin, C.A.; Phatak, S.S.; Freigoun, M.T.; Korinek, E.; Klasnja, P.; Adams, M.A.; Buman, M.P. Tutorial for Using Control Systems Engineering to Optimize Adaptive Mobile Health Interventions. J. Med. Internet Res. 2018, 20, e214. [Google Scholar] [CrossRef] [PubMed]
  13. Rossiter, J.A. Model-Based Predictive Control: A Practical Approach; CRC Press: Boca Raton, FL, USA, 2003. [Google Scholar]
  14. Camacho, E.; Bordons, C. Control Predictivo: Pasado, Presente y Futuro. Rev. Iberoam. Autom. Inform. Ind. 2010, 1, 5–28. [Google Scholar]
  15. Martin, C.; Rivera, D.; Riley, W.; Hekler, E.; Buman, M.; Adams, M.; King, A. A Dynamical Systems Model of Social Cognitive Theory. In Proceedings of the 14th American Control Conference, Portland, OR, USA, 4–6 June 2014. [Google Scholar] [CrossRef]
  16. Harries, T.; Eslambolchilar, P.; Rettie, R.; Stride, C.; Walton, S.; Woerden, H. Effectiveness of a smartphone app in increasing physical activity amongst male adults: A randomized controlled trial. BMC Public Health 2016, 16, 925. [Google Scholar] [CrossRef] [PubMed]
  17. Ljung, L. Prediction error estimation methods. Circuits Syst. Signal Process. 2002, 21, 11–21. [Google Scholar] [CrossRef]
  18. Ljung, L.; Zhang, Q.; Lindskog, P.; Iouditski, A.; Singh, R. An integrated System Identification toolbox for linear and non-linear models. In Proceedings of the 14th IFAC Symposium on Identification and System Parameter Estimation, Newcastle, Australia, 29–31 March 2006; Volume 39, pp. 931–936. [Google Scholar] [CrossRef]
  19. Kohn, A.F. Wiley Encyclopedia of Biomedical Engineering; John Wiley & Sons, Ltd.: Hoboken, NJ, USA, 2006. [Google Scholar]
  20. Freigoun, M.T.; Martín, C.A.; Magann, A.B.; Rivera, D.E.; Phatak, S.S.; Korinek, E.V.; Hekler, E.B. System identification of Just Walk: A behavioral mHealth intervention for promoting physical activity. In Proceedings of the 2017 American Control Conference, Seattle, WA, USA, 24–26 May 2017; pp. 116–121. [Google Scholar] [CrossRef]
  21. Saint-Maurice, P.F.; Troiano, R.P.; Bassett, D.R.; Graubard, B.I.; Carlson, S.A.; Shiroma, E.J.; Fulton, J.E.; Matthews, C.E. Association of Daily Step Count and Step Intensity With Mortality Among US Adults. JAMA 2020, 323, 1151–1160. [Google Scholar] [CrossRef] [PubMed]
  22. Martín, C. A System Identification and Control Engineering Approach for Optimizing mHealth Behavioral Interventions Based on Social Cognitive Theory. Ph.D. Thesis, Arizona State University, Tempe, AZ, USA, 2016. [Google Scholar]
  23. Morari, M.; Zafiriou, E. Robust Process Control; Prentice Hall: Hoboken, NJ, USA, 1989. [Google Scholar]
  24. Nise, N.S. Control Systems Engineering; Wiley: Hoboken, NJ, USA, 2015. [Google Scholar]
  25. Wang, L. Model Predictive Control System Design and Implementation Using MATLAB®; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
  26. Morgan, A.L.; Tobar, D.A.; Snyder, L. Walking Toward a New Me: The Impact of Prescribed Walking 10,000 Steps/Day on Physical and Psychological Well-Being. J. Phys. Act. Health 2010, 7, 299–307. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Fluid analogy for the simplified version of the SCT model [9].
Figure 1. Fluid analogy for the simplified version of the SCT model [9].
Applsci 13 06437 g001
Figure 2. Comparison between estimated behavior (i.e., η 4 ) (number of steps) using semi−physical identification (simulated data) vs. real experimental data (male adult participant number 115) [9].
Figure 2. Comparison between estimated behavior (i.e., η 4 ) (number of steps) using semi−physical identification (simulated data) vs. real experimental data (male adult participant number 115) [9].
Applsci 13 06437 g002
Figure 3. Model validation via correlation analysis for the semi−physical identification procedure. The areas highlighted in blue represent the confidence bounds [9].
Figure 3. Model validation via correlation analysis for the semi−physical identification procedure. The areas highlighted in blue represent the confidence bounds [9].
Applsci 13 06437 g003
Figure 4. Enhanced model SCT with individualized self-regulation via internalized cues [22].
Figure 4. Enhanced model SCT with individualized self-regulation via internalized cues [22].
Applsci 13 06437 g004
Figure 5. Low physical activity intervention based on the simplified SCT model [22].
Figure 5. Low physical activity intervention based on the simplified SCT model [22].
Applsci 13 06437 g005
Figure 6. “Step response” refers to the response of a system to a step input of the Social Cognitive Theory (SCT) model in an open loop configuration. On the other hand, “steps” refers to the number of steps in the output signal ( η 4 ). It is a measure of the output of the system.
Figure 6. “Step response” refers to the response of a system to a step input of the Social Cognitive Theory (SCT) model in an open loop configuration. On the other hand, “steps” refers to the number of steps in the output signal ( η 4 ). It is a measure of the output of the system.
Applsci 13 06437 g006
Figure 7. Conceptual application of the receding horizon control strategy to the physical activity behavioral problem [22].
Figure 7. Conceptual application of the receding horizon control strategy to the physical activity behavioral problem [22].
Applsci 13 06437 g007
Figure 8. MPC structure. Goals ( u 8 ) and expected points ( u 9 ) are the manipulated variables. Environmental context ( u 7 ), granted points ( u 10 ), and goal attainment ( u 11 ) are measured disturbances. Actual steps-behavior is the controlled variable. All the other outputs are also measured but not controlled.
Figure 8. MPC structure. Goals ( u 8 ) and expected points ( u 9 ) are the manipulated variables. Environmental context ( u 7 ), granted points ( u 10 ), and goal attainment ( u 11 ) are measured disturbances. Actual steps-behavior is the controlled variable. All the other outputs are also measured but not controlled.
Applsci 13 06437 g008
Figure 9. Closed-loop Model Predictive Control project ecosystem in Simulink block (graphical programming environment in MATLAB®). These blocks represent the various components such as the plant (simplified SCT), controller (MPC), and other supporting functions.
Figure 9. Closed-loop Model Predictive Control project ecosystem in Simulink block (graphical programming environment in MATLAB®). These blocks represent the various components such as the plant (simplified SCT), controller (MPC), and other supporting functions.
Applsci 13 06437 g009
Figure 10. Step tracking. This figure describes the ability of a controller to track or follow a step input signal. A step input signal is a signal that abruptly changes from one constant value to another, often used to represent a change in the desired setpoint of a controlled system. In this case, the desired behavior or setpoint was a change in daily steps from 1000 to 10,000. The figure shows that the control system was able to achieve this desired behavior in less than 20 days. The settling time for this test was 10 days and the percentage overshoot was 17%.
Figure 10. Step tracking. This figure describes the ability of a controller to track or follow a step input signal. A step input signal is a signal that abruptly changes from one constant value to another, often used to represent a change in the desired setpoint of a controlled system. In this case, the desired behavior or setpoint was a change in daily steps from 1000 to 10,000. The figure shows that the control system was able to achieve this desired behavior in less than 20 days. The settling time for this test was 10 days and the percentage overshoot was 17%.
Applsci 13 06437 g010
Figure 11. Manipulated variables: goals ( u 8 ) and expected points ( u 9 ).
Figure 11. Manipulated variables: goals ( u 8 ) and expected points ( u 9 ).
Applsci 13 06437 g011
Figure 12. Granted points ( u 10 ) , given every day if individuals meet the established goal.
Figure 12. Granted points ( u 10 ) , given every day if individuals meet the established goal.
Applsci 13 06437 g012
Figure 13. Goal attainment ( u 11 ) represents a signal that indicates the difference between the actual behavior and the daily goals. This signal can serve as an input for the self-efficacy inventory, helping to assess an individual’s belief in their ability to achieve the goals.
Figure 13. Goal attainment ( u 11 ) represents a signal that indicates the difference between the actual behavior and the daily goals. This signal can serve as an input for the self-efficacy inventory, helping to assess an individual’s belief in their ability to achieve the goals.
Applsci 13 06437 g013
Figure 14. Goal attainment ( u 11 ) : steady state.
Figure 14. Goal attainment ( u 11 ) : steady state.
Applsci 13 06437 g014
Figure 15. Steps tracking: progressive approach. In a ramp test, the dynamic performance of a system is evaluated by observing its response to a slowly changing input signal.
Figure 15. Steps tracking: progressive approach. In a ramp test, the dynamic performance of a system is evaluated by observing its response to a slowly changing input signal.
Applsci 13 06437 g015
Figure 16. Steps tracking: the first scenario. In order to provide additional evidence of the efficiency of the controller, the time constant τ 4 was arbitrarily adjusted from 0.8 (original response) to 0.65 days (new response).
Figure 16. Steps tracking: the first scenario. In order to provide additional evidence of the efficiency of the controller, the time constant τ 4 was arbitrarily adjusted from 0.8 (original response) to 0.65 days (new response).
Applsci 13 06437 g016
Figure 17. Steps tracking: the second scenario. The input coefficient from the behavior inventory β 45 was arbitrarily varied during a test. This parameter value was modified from 0.5 (original response) to 0.8 (new response).
Figure 17. Steps tracking: the second scenario. The input coefficient from the behavior inventory β 45 was arbitrarily varied during a test. This parameter value was modified from 0.5 (original response) to 0.8 (new response).
Applsci 13 06437 g017
Figure 18. The third scenario involves tracking steps in a situation in which both the time constant τ 4 and the input coefficient β 45 were varied simultaneously. The original response had τ 4 = 0.8 and β 45 = 0.5 , while the new response had τ 4 = 0.65 and β 45 = 0.8 .
Figure 18. The third scenario involves tracking steps in a situation in which both the time constant τ 4 and the input coefficient β 45 were varied simultaneously. The original response had τ 4 = 0.8 and β 45 = 0.5 , while the new response had τ 4 = 0.65 and β 45 = 0.8 .
Applsci 13 06437 g018
Figure 19. Effects of the time constant parameter τ on the number of steps. The controller’s response shows a significant improvement when the time constant is increased from its original value, as opposed to the situation in which it is decreased. It is worth noting that a decrease in the time constant may cause the system to become unstable.
Figure 19. Effects of the time constant parameter τ on the number of steps. The controller’s response shows a significant improvement when the time constant is increased from its original value, as opposed to the situation in which it is decreased. It is worth noting that a decrease in the time constant may cause the system to become unstable.
Applsci 13 06437 g019
Figure 20. Effects of modifications of the input coefficient β 45 parameter on the number of steps.
Figure 20. Effects of modifications of the input coefficient β 45 parameter on the number of steps.
Applsci 13 06437 g020
Table 1. Parameters of the hypothetical model (i.e., the secondary data model, which was extended with parameters obtained from different experiments using primary data [11,20].
Table 1. Parameters of the hypothetical model (i.e., the secondary data model, which was extended with parameters obtained from different experiments using primary data [11,20].
ParameterValueParameterValue
τ 1 0.01 γ 68 1.5
τ 2 0.1236 γ 311 0.4
τ 3 0.01 γ 510 0.6
τ 4 0.8 β 14 0.01
τ 5 2 β 21 0.0513
τ 6 0.5 β 25 0.5
γ 11 4.55 β 31 0.0198
γ 22 15 β 34 0.2
γ 29 2.5 β 42 1.8437
γ 32 10.7036 β 43 0.9
γ 33 0.5 β 45 0.5
γ 35 1 β 46 1.8755
γ 36 1 β 54 0.6
γ 57 1 K f 0.8
γ 64 1 λ 1
Table 2. Tuning of model predictive control. Sample time is set equal to 1 to limit samples to 20 during rise time and to follow Nyquist’s theorem. A prediction horizon of 20 to 40 samples is recommended. Therefore, a value of 30 is chosen. A control horizon equal to 10 is selected, as this value is typically less than (or equal to) the prediction horizon [25].
Table 2. Tuning of model predictive control. Sample time is set equal to 1 to limit samples to 20 during rise time and to follow Nyquist’s theorem. A prediction horizon of 20 to 40 samples is recommended. Therefore, a value of 30 is chosen. A control horizon equal to 10 is selected, as this value is typically less than (or equal to) the prediction horizon [25].
ParameterValue
Sample time1
Prediction Horizon30
Control horizon10
Table 3. Bandura’s simplified SCT model inputs and outputs.
Table 3. Bandura’s simplified SCT model inputs and outputs.
SymbolsInputsAcronym
ξ 7 Environmental contextEC
ξ 8 External CuesC
ξ 9 Expected pointsEP
ξ 10 Granted pointsGP
ξ 11 Goal attainmentGA
SymbolOutputsAcronym
η 2 Outcome expectanciesOE
η 3 Self-efficacySE
η 4 BehaviorB
η 5 Behavioral outcomesBO
Table 4. MPC constraints. Goals ( u 8 ) and expected points ( u 9 ) are the manipulated variables (MV). Δ u i refers to the change in the signal i between two consecutive time instances.
Table 4. MPC constraints. Goals ( u 8 ) and expected points ( u 9 ) are the manipulated variables (MV). Δ u i refers to the change in the signal i between two consecutive time instances.
ParameterMinMaxUnit
u 8 015,000(steps/day)
u 9 05000(points/day)
Δ u 8 unconstrained(steps/day)
Δ u 9 unconstrained(points/day)
Table 5. MPC weights. Taking into account the economic factor which is critical for the project, the controller will try to penalize abrupt values of offered reward points ( u 9 ) for which the weight of 1 is assigned. The weight of the daily step goal ( u 8 ) was set to zero. The weights assigned to Δ u 8 and Δ u 9 are both 0.1, indicating that those variables are not considered significant. The weight of the output variable η 4 is also equal to 1 since that variable, which corresponds to the behavior, is the one to be regulated, leaving the other outputs to vary freely (other output weight = 0).
Table 5. MPC weights. Taking into account the economic factor which is critical for the project, the controller will try to penalize abrupt values of offered reward points ( u 9 ) for which the weight of 1 is assigned. The weight of the daily step goal ( u 8 ) was set to zero. The weights assigned to Δ u 8 and Δ u 9 are both 0.1, indicating that those variables are not considered significant. The weight of the output variable η 4 is also equal to 1 since that variable, which corresponds to the behavior, is the one to be regulated, leaving the other outputs to vary freely (other output weight = 0).
ParameterWeightsUnit
u 8 0dimensionless
u 9 1
Δ u 8 Δ u 9 0.1
Output Variables η 2 = 0 η 3 = 0 η 4 = 1 η 5 = 0dimensionless
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Salazar, C.; Martin, C.; Aguirre, A.; Eslambolchilar, P.; Asanza, V. Modeling of Physical Activity Behavioral Interventions Relying on MPC Strategy. Appl. Sci. 2023, 13, 6437. https://doi.org/10.3390/app13116437

AMA Style

Salazar C, Martin C, Aguirre A, Eslambolchilar P, Asanza V. Modeling of Physical Activity Behavioral Interventions Relying on MPC Strategy. Applied Sciences. 2023; 13(11):6437. https://doi.org/10.3390/app13116437

Chicago/Turabian Style

Salazar, Carlos, Cesar Martin, Adriana Aguirre, Parisa Eslambolchilar, and Victor Asanza. 2023. "Modeling of Physical Activity Behavioral Interventions Relying on MPC Strategy" Applied Sciences 13, no. 11: 6437. https://doi.org/10.3390/app13116437

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop