The invention relates generally to control applications, and more particularly to methods and apparatus for stochastic model-predictive control of dynamics of a mechanical system in response to an estimated uncertainty of disturbance acting on the mechanical system.
Optimization-based control and estimation techniques, such as model predictive control (MPC), allow a model-based design framework in which the system dynamics and constraints can directly be taken into account. MPC is used in many applications to control dynamical systems of various complexities, where the systems are described by a set of nonlinear differential equations, i.e., a system of ordinary differential equations (ODE), differential-algebraic equations (DAE), or partial differential equations (PDE). Examples of such systems include production lines, car engines, robots, numerically controlled machining, satellites, and power generators.
The MPC is based on a real-time finite-horizon optimization of a model of a system. The MPC has the ability to anticipate future events and to take appropriate control actions. This is achieved by optimizing the operation of the system over a future finite time horizon subject to constraints, and only implementing the control over a current time step.
The MPC can predict the change in state variables of the modeled system caused by changes in control variables. The state variables define a state of the system, i.e., a state of a controlled system is the smallest set of state variables in the state-space representation of the control system that can represent the entire state of the system at any given time. For example, if a controlled system is an autonomous vehicle, the state variables may include position, velocity, and heading of the vehicle. The MPC uses models of the system, the current system measurements and/or state estimates, the current state of the vehicle, and state and control constraints to calculate future changes in the state of the vehicle. These changes are calculated to hold the state close to the target subject to constraints on both control and state variables. The MPC typically sends out only the first change in each control variable to be implemented by actuators of the controlled system and repeats the calculation when the next change is required.
Many systems to be controlled are partially unknown, or at least uncertain. E.g., when controlling a vehicle both the maximum friction between tire and road is not exactly known, and furthermore, the dependence of the friction on the state of the vehicle, e.g., the velocity of the vehicle, is also not known. Typically, such uncertainties are estimated concurrently with the MPC, to give the MPC a better knowledge of the model it controls. Although MPC exhibits inherent robustness due to feedback, such controllers do not take uncertainties directly into account and, consequently, the satisfaction of safety-critical constraints cannot be guaranteed in the presence of model uncertainties or external disturbances. One alternative approach is robust MPC, which relies on the optimization of control policies under worst-case scenarios in the presence of a bounded range of uncertainty. However, robust MPC can lead to conservative control performance, due to the worst-case scenarios occurring with an extremely small probability.
Another type of MPC is stochastic MPC (SMPC), where the uncertainty of the system is modeled to have a distribution, e.g., the distribution can be the Gaussian distribution having a mean (center) and a covariance (uncertainty). SMPC aims at reducing the conservativeness of robust MPC by directly incorporating the probabilistic description of uncertainties into the optimal control problem (OCP) formulation. In some implementations, the SMPC requires constraints to be satisfied with a certain probability, i.e., by formulating so-called chance constraints that allow for a specified, yet non-zero, probability of constraint violation. In addition, SMPC is advantageous in settings where high performance in closed-loop operation is achieved near the boundaries of the plant's feasible region. In the general case, chance constraints are computationally intractable and typically require an approximate formulation.
In addition to many systems having uncertain parameters or components, disturbance acting on the mechanical system is often uncertain as well. While there are a number of methods for estimating the uncertainty of the parameters or components of the system, these methods depend on the dynamic of the system, while the uncertainty of the disturbance can be independent of the system dynamics.
In addition, some SMPC solvers assume the uncertainty is predetermined offline, i.e., prior to executing the controller. In case of disturbances, such an assumption is overly restrictive, as in numerous applications the uncertainties change with time and can hence not be predetermined offline prior to executing the SMPC.
Accordingly, there is a need to include the externally determined uncertainty of the disturbance acting on a mechanical system in the SMPC solver during the real-time control of the mechanical system.
It is an object of some embodiments to provide a system and a method for controlling the operation of a mechanical system subject to the uncertainty of a disturbance acting on the system. Examples of disturbances include wind acting on a drone or used by a windmill, vibration caused by an operating elevator and/or drilling machine, internal heat loads, or ambient conditions affecting the operation of air conditioning systems.
Predictive controller design depends on the quality of disturbance predictions, i.e., forecasts of the disturbance acting on a system within a prediction horizon used by the predictive controller. Such a prediction is challenging and several predictive controllers just assume some future disturbance values. For example, some controllers fix the predicted value of disturbance in advance. Other controllers place a bound on the variation of the disturbance and use this bound in determining the control inputs. These control methods, however, may be inaccurate and ill-equipped to handle the disturbance variations.
Some control methods, like stochastic model predictive control (SMPC), aim to address this deficiency by constructing a probabilistic model of the disturbance to draw the samples from that model. However, to the best of our knowledge, the SMPC formulations assume that the disturbances are generated in advance, i.e., before the control, by simplified stochastic processes that may not reflect the observed data. While these simplifications may result in tractable controller design frameworks, they often result in deteriorated performance for disturbance inputs that do not conform to the measurements.
Indeed, while disturbance modeling efforts that adopt a probabilistic perspective are advantageous over deterministic predictions, such probabilistic models are often applicable only in data-rich settings or involve making simplifying assumptions on the underlying stochasticity of the underlying disturbance signals.
Some embodiments are based on the understanding that during the operation of the system under control, the disturbance can be partially observed. For example, the disturbance acting on a system can be measured till the current instance of time, i.e., over a portion of the prediction horizon. These partial measurements and/or partial observations of the disturbance can be used to update the assumptions on the underlying stochasticity, i.e., to update a probabilistic distribution defining the model of the disturbance.
However, such an update on an arbitrarily shaped probabilistic model of the disturbance is challenging. Hence, to make such an update during the online control of the operation of the system, there is a need to assume the structure of the model of the disturbance. One example of such a structure is an assumption that a probabilistic model of the disturbance is a Gaussian distribution. Hence, the objective of the model update would be to update the parameters of the distribution, e.g., mean and variance of the Gaussian distribution, conditioned on partial observation of the disturbance. Such an update is possible, but the result would not be reliable since the disturbance rarely comes from the Gaussian distribution and any assumption on the structure of the statistical model of the disturbance can be incorrect.
Some embodiments are based on recognizing that measurements of time-series data indicative of disturbance have at least some unknown relationship in the time domain. An example of such a relationship can be observed in sensors measuring power plant operation where future variation in the loads depends on the current values of the loads. Some embodiments are based on the recognition that determining the unknown relationship is challenging as measurements in the original data space of the sensors are noisy and the unknown relationship includes a complex non-linear transformation. For example, in the case of the power plant, the thermodynamic relationship in the power plant is complex and requires extensive domain knowledge to elucidate. Such complex interdependency makes the recovery of the relationship, in the original data space, unreliable. Hence, the assumption of the parameterized structure of the distribution capturing this relationship is unreliable as well.
Some embodiments are based on the realization that efficient encoding of measurements of the sensors may find a relationship among the measurements because encoding methods are used to find reduced-order embeddings of data that summarize their relationships in the original data space. In addition, some embodiments are based on realizing that if the reduced-order embeddings of measurements may better represent the relationship among the measurements, the incorrect assumption of a structure of a probabilistic model of the disturbance in the measurement domain, e.g., the original domain, may become correct in the domain of the reduced-order embeddings of the measurements.
After some testing and experiments, some embodiments are based on the understanding that there is latent space of reduced-order embeddings of the original measurements of the disturbance where the latent representation of the disturbance can be modeled on a parameterized distribution with sufficient accuracy suitable for control applications. Hence, instead of trying to determine an unstructured distribution of disturbances conditioned on the partial observations in the original space of measurements, it is advantageous to determine the parameterized distribution of the latent representation of the disturbances in the latent space conditioned on the partial observations in the original measurement domains.
To perform such an estimation, some embodiments use a mapping between the latent and the original space determined offline as a deep generative decoder model. Some embodiments are based on the realization that an autoencoder can determine such an efficient mapping in an unsupervised manner. The autoencoder is a type of artificial neural network used to learn efficient data codings in an unsupervised manner. The autoencoder includes an encoder and a decoder. The encoder encodes input data from the original data space into a latent space represented by the vector of numerical values ‘h’. The decoder decodes the encodings from the latent space to an estimate of the input data, i.e., reconstructs the input data. In other words, the encoder and/or decoder provide a mapping between the data in the original data space and a latent space representation of the data. To that end, the autoencoder determines an efficient latent space suitable to capture the relationship between different instances of the input data.
The principles of the autoencoder can be extended to deep generative models, such as conditional variational autoencoders (CVAEs), to provide an expressive and automated approach for learning distributions in the latent space from data measured in the original space. However, the encoder and decoder of CVAE are trained on complete sequences of observation of disturbances. As used herein, the complete sequence of observations of disturbances provides values of the disturbances for the entire time and/or prediction horizon, while partial observations provide values of the disturbances only for a portion of the time horizon. During the execution, an encoder cannot be used to encode partial observation, i.e., due to the training on the complete sets. However, the decoder model of CVAE can be used to test estimations of the parameterized distribution in the latent space conditioned on the partial observation of the disturbance. Hence, the technology of the CVAE trained on complete sequences of observations can be extended to partial observations. As a result, by sampling the learned latent space, some embodiments can generate unseen disturbance realizations.
Accordingly, in one general aspect, method may include collecting partial observations of the disturbance affecting the operation of the mechanical system over an observed portion of a time horizon. Method may also include collecting a deep generative decoder model defining a mapping from a latent space of latent representations of time-series values of the disturbance affecting the mechanical system over the time horizon to a measurement space of the partial observations of the disturbance. Method may furthermore include determining, using the deep generative decoder model, a conditional probabilistic distribution of the latent representations of the disturbance conditioned on the partial observations of the disturbance. Method may in addition include sampling the conditional probabilistic distribution of the latent representations to produce a latent sample of the time-series values of the disturbance affecting the mechanical system over the time horizon. Method may moreover include decoding the latent sample with the deep generative decoder model to produce predicted values of the disturbance acting on the system within the time horizon with a probability of the latent sample on the conditional probabilistic distribution of the latent representations. Method may also include controlling the mechanical system using a predictive controller that determines control commands changing a state of the operation of the mechanical system using the probability of at least some of the predicted values of the disturbance. Other embodiments of this aspect include corresponding computer systems, apparatus, and computer programs recorded on one or more computer storage devices, each configured to perform the actions of the methods.
In one general aspect, device may include one or more processors configured to: collect partial observations of the disturbance affecting the operation of the mechanical system over an observed portion of a time horizon; collect a deep generative decoder model defining a mapping from a latent space of latent representations of time-series values of the disturbance affecting the mechanical system over the time horizon to a measurement space of the partial observations of the disturbance; determine, using the deep generative decoder model, a conditional probabilistic distribution of the latent representations of the disturbance conditioned on the partial observations of the disturbance; sample the conditional probabilistic distribution of the latent representations to produce a latent sample of the time-series values of the disturbance affecting the mechanical system over the time horizon; decode the latent sample with the deep generative decoder model to produce predicted values of the disturbance acting on the system within the time horizon with a probability of the latent sample on the conditional probabilistic distribution of the latent representations; and control the mechanical system using a predictive controller that determines control commands changing a state of the operation of the mechanical system using the probability of at least some of the predicted values of the disturbance. Other embodiments of this aspect include corresponding computer systems, apparatus, and computer programs recorded on one or more computer storage devices, each configured to perform the actions of the methods.
where xk∈n
n
n
For example, the mechanical system can be a thermodynamic system conditioning energy within a building, and the model f may describe the thermal dynamics of an air-conditioned zone in the building, wherein the states of the system x include room air temperature, interior wall surface temperature, and exterior wall core temperatures. The control input u could be the net heating and cooling power of a heat pump, while the disturbance input vector w could be one or a combination of the outside air temperature, solar radiations, airflow, and internal heat loads due to the presence of occupants and heat-generating appliances.
It is the objective of a disturbance-aware control algorithm 100 to achieve desired building operating conditions 109 based on estimates of the states, sensor measurements, and predictions of disturbance inputs. These predictions are generated using generative AI 110 that are trained on data that includes: disturbance inputs 111 potentially measured from the mechanical system 101 in real-time, or disturbance inputs that have been previously stored in a database 115 collected offline, either from the building energy system 101 in the past, or alternative data sources.
Some embodiments are based on the realization that efficient encoding of measurements of the sensors may find a relationship among the measurements because encoding methods are used to find reduced-order embeddings of data that summarize their relationships in the original data space. In addition, some embodiments are based on realizing that if the reduced-order embeddings of measurements may better represent the relationship among the measurements, the incorrect assumption of a structure of a probabilistic model of the disturbance in the measurement domain, e.g., the original domain, may become correct in the domain of the reduced-order embeddings of the measurements.
To that end, during the training stage of the control process performed offline, some embodiments learn 210 latent space of reduced-order embeddings of the original measurements of the disturbance where the latent representation of the disturbance can be modeled on a parameterized distribution with sufficient accuracy suitable for control applications. As described below, the embodiments learn a deep generative decoder model defining a mapping from a latent space of latent representations of time-series values of the disturbance affecting the mechanical system over the time horizon to the original, e.g., measurement space of the disturbance.
Notably, the latent space encodes time-series values of the disturbance affecting the mechanical system over the time horizon. For example, during the training, the time horizon can be 24 hours and the time-series values of the disturbance can be the measured disturbance affecting a system over the period of 24 hours. Hence, in this example, each sample in the latent space encodes a 24-hour-long disturbance trajectory.
During the online control, the partial observations of disturbance are collected 220, e.g., measured. For example, the disturbance is measured for the last hour. However, the prediction horizon of the SMPC can be longer than 1 hour. For example, it can be several hours or up to 24 hours in this example. Hence, there is a need to predict the remaining unseen disturbance conditioned on the partial observations of the disturbance. However, given the latent space, the embodiments, instead of trying to determine an unstructured distribution of disturbances conditioned on the partial observations in the original space of measurements, determine 230 the parameterized distribution of the latent representation of the disturbances in the latent space conditioned on the partial observations in the original measurement domains. As described above, due to the nature of the latent space, such estimation is more accurate. The conditional distribution allows the sampling 240 disturbance signals in the latent space and using 250 the decoded latent samples for disturbance-aware stochastic control 100.
To perform such an estimation, some embodiments use a mapping between the latent and the original space determined offline as a deep generative decoder model. Some embodiments are based on the realization that an autoencoder can determine such an efficient mapping in an unsupervised manner. The autoencoder is a type of artificial neural network used to learn efficient data codings in an unsupervised manner. The autoencoder includes an encoder and a decoder. The encoder encodes input data from the original data space into a latent space represented by the vector of numerical values ‘h’. The decoder decodes the encodings from the latent space to an estimate of the input data, i.e., reconstructs the input data. In other words, the encoder and/or decoder provide a mapping between the data in the original data space and a latent space representation of the data. To that end, the autoencoder determines an efficient latent space suitable to capture the relationship between different instances of the input data.
The principles of the autoencoder can be extended to deep generative models, such as variational autoencoders (VAEs) or conditional variational autoencoders (CVAEs), to provide an expressive and automated approach for learning distributions in the latent space from data measured in the original space.
Various embodiments use a probabilistic deep learning method that learns a latent space by encoding disturbance signal data; this latent space can be interpreted as a conditional probability distribution: sampling which, one can obtain disturbance signals by decoding. The CVAE includes an encoder 303 that compresses data signals W 301, given conditional inputs c 302, to a latent representation z 313 in a latent space within n
The generative model is specified by the distribution πθ(W|z, c) where z is sampled from a latent prior distribution π(z) and θ are the encoder weights. This implicitly specifies the conditional distribution:
In principle, the learning objective is to maximize the expected log-likelihood, i.e.,
However, this implicit conditional distribution is generally intractable, which motivates the introduction of a variational posterior qϕ(z|W, c) that approximates the actual posterior; ϕ are the decoder weights. This qϕ is utilized in a variational lower bound of the expected log-likelihood, also known as the evidence lower bound (ELBO)
The parameters (θ, ϕ) of the CVAE are jointly optimized to maximize the ELBO. Note that the variational posterior is typically parameterized as a conditional Gaussian:
with the mean vector μϕ309 and diagonal covariance matrix Σϕ311 given by parametric functions of (x, s). With the typical assumption of a latent prior distribution being the standard Gaussian distribution, the KLD term in ELBO is readily tractable and differentiable.
The variational posterior can be viewed as an encoder that induces a probabilistic map from W to a latent representation z, conditioned on c. The generative model can be viewed as a decoder that recovers likelihoods for W, conditioned on c, from a sampled latent representation z. This decoder can also be parameterized as a conditional Gaussian, where the mean vector is a parametric function of (z, c) and the covariance is the identity matrix. This simplifies the first term of the ELBO in to be essentially a negative reconstruction loss, i.e., shift-scale of mean-square error (MSE).
Given a trained VAE, the decoder can be used to generate synthetic data 307 by sampling from the latent variables, πθ(W|z, c). This is done by drawing a latent vector z from its prior distribution, and subsequently, for a given c, employing the generative model to specify the distribution πθ(W|z, c) from which the synthetic data should be sampled.
However, the deep generative decoder model 305 is trained offline from the training data of measured disturbances without consideration of the current partially observed disturbances acting on the mechanical system. To address the partial observations, the embodiments use the deep generative decoder model to determine a conditional probabilistic distribution of the latent representations of the disturbance conditioned on the partial observations of the disturbance.
Some embodiments sample 460 the conditional distribution 410 to produce a latent sample 450 and its probability 440 to represent the partial observations. The decoding of the latent sample 450 and its probability 440 are used by SMPC for the stochastic control.
Different embodiments use different techniques to determine the conditional distribution 410. For example, some embodiments determine the conditional probabilistic distribution of the latent representations of the disturbance based on a comparison of corresponding portions of a set of latent representations decoded by the deep generative decoder model with the partial observations of the disturbance.
These scores are used to build the conditional distribution 410. For example, some embodiments iteratively repeat the sampling 510, the decoding 520, and the comparing 530 until a termination condition is met to reduce an error between the values over the observed portion of the time horizon in the determined set of time-series values of the disturbance and the partial observations of the disturbance. Doing this in such a manner allows for identifying the area of the latent space with a higher probability of fitting the partial observation of the disturbance. The observed error is used to estimate the conditional probability of different samples.
For example, given pre trained decoder model, during an online control of the mechanical system at the current time t, the embodiments collect partial observations of measured disturbances W0:t=(w0, . . . , wt) and aim to leverage a pre-trained CVAE model to provide a distributional forecast of the remaining unknown sequence Wt+1:T=(wt+1, . . . , wT). Formally speaking, the aim is to extract and sample the conditional distribution π(Wt+1:T|W0:t,c) from the model learned by the CVAE.
However, this specific conditional dependency structure is not directly provided by the CVAE. Instead, the embodiments first extract the latent representation distribution conditioned on only the partially revealed perturbations, π(z|W0:t, c), equivalently, to identify a subspace in the latent space that is most likely to have generated the observed disturbance sequence W0:t conditioned upon c. Then, by sampling latents from this distribution z˜π(z|W0:t, c), the embodiments apply the CVAE decoder model to sample the corresponding completed sequences, including the unseen portions Wt+1:T, which is equivalent to predicting (probabilistically) 211 the disturbance input signal.
The conditional latent distribution π(z|W0:t, c), although not known in closed form, can be defined using Bayes' rule. Formally, the latent probability distribution conditioned on the partially revealed sequence is defined as,
}i=1m. The embodiment compares the reconstruction with the partially observed disturbance. For example, one implementation of the embodiment uses the coefficient of determination (the square of the Pearson correlation coefficient) on each reconstruction 403 with the original partially observed sequence of the disturbance 405 to assign a score 407 to the likelihood of each corresponding sample zi, as given by,
with scalar a>0.
These zeta-scores 407 enable the approximation of the likelihood π(z|W0:t) using kernel density estimation (KDE) 409. The KDE can be sampled to obtain np sigma points in the latent space, where we recall that np=2nz+1 and nz is the dimension of the latent distribution. After KDE approximation and sigma-point construction, the likelihood π(z|W0:t) gradually adapts 409 to a latent vector likely to have generated W_{0:t}.
These latent samples, along with their probabilities, are then passed to the decoder to produce conditionally sampled forecasts of the unseen portion of the disturbance sequence and weights 411 which are subsequently passed to the SMPC through the predicted dynamics.
The mechanical system 820, as referred to herein, can be any machine or device controlled by certain manipulation input signals 811 (inputs), possibly associated with physical quantities such as voltages, pressures, forces, and torques, and to return some controlled output signals 803 (outputs), possibly associated to physical quantities such as currents, flows, velocities, positions indicative of a transition of a state of the system from a previous state to the current state. The output values are related in part to previous output values of the system and in part to previous and current input values. The dependency on previous inputs and previous outputs is encoded in the state of the system. The operation of the system, e.g., a motion of components of the system, can include a sequence of output values generated by the system following the application of certain input values.
The uncertain disturbance 825 can be any time-varying signal, including any external disturbances, forces or torques acting on the system 820, any unmodeled dynamics, or any uncertainties in physical quantities such as uncertain friction coefficients, friction functions, a mass of a body, center of gravity of the system, or uncertain coefficients and parameters in the control model equations that describe the physical behavior of the real system 820. For example, in some implementations, the SMPC 810 uses a simplified control model 840, resulting in a large amount of the physical behavior in the mechanical system remaining unmodeled, to reduce the computational complexity of the controller or because some of the physical behavior is too complex and therefore difficult or impossible to model by first principles. Such simplified modeling can cause or contribute to the uncertainty 825. Note that time-independent uncertainties can be estimated or learned, either online or offline, as part of the state and parameter estimator 831.
In various embodiments, the estimator 831 is an online estimator that determines the uncertain disturbance 825 and/or confidence about the estimated uncertainty in real-time, i.e., during the control of the system 820. In such a manner some embodiments increase the accuracy of the estimation of the uncertainty 825 with respect to the accuracy of offline estimation of the uncertainties because the uncertainty 825 is changing with time and may depend on the control inputs and the system response to such control inputs.
A control model 840 can include a dynamic model defining the dynamics of the system 820. The control model 840 of mechanical system 820 can include a set of mathematical equations that describe how the system outputs change over time as functions of current and previous inputs and the previous outputs. The state of the system is any set of information, in general time-varying, for instance, an appropriate subset of current and previous inputs and outputs, that, together with the model of the system and future inputs, can uniquely define the future motion of the system. The mechanical system 820 can be subject to physical limitations and specification constraints 842 limiting the range where the outputs, the inputs, and also possibly the states of the system are allowed to operate. In various embodiments, the control model of the system includes a function of dynamics of the system having the parameter with the uncertainty 825. In such a manner, the uncertainty acting on the system 820 can be captured by the model 840.
The controller 810 can be implemented in hardware or as a software program executed in a processor, e.g., a microprocessor, which at fixed or variable control period sampling intervals receives the estimated state of the system 821 and the desired motion command 801 and determines, using this information, the inputs, e.g., the control signal 811, for operating the system.
The estimator 831 can be implemented in hardware or as a software program executed in a processor, either the same or a different processor from the controller 810, which at fixed or variable control period sampling intervals receives the outputs of the system 803 and determines, using the new and the previous output measurements, the estimated disturbance and its uncertainty 821 of the system 820.
Using the identified subspace of latent variables, the method predicts 920 future disturbance inputs based on the identified latent subspace using the deep generative decoder model and uses this prediction to forecast 930 states, inputs, and disturbances to compute a statistic of a cost function and probabilistic constraint violation over the different realizations of the disturbances, e.g., as described with respect to
Next, the SMPC runs 940 iterative optimization procedure to select the best sequence of input values that minimizes the cost subject to the probabilistic constraints over the prediction horizon and submits 950 a part of optimized control inputs in the sequence to the actuators of the mechanical system.
As further shown in
As also shown in
As further shown in
As also shown in
Although
As a skilled artisan readily recognizes, scenario trees are constructed to represent different possible realizations of the uncertain variables over a prediction horizon. Each branch of the tree corresponds to a particular scenario or realization of the uncertainties. Nodes in the scenario tree represent decision points in time, such as sampling instants for control inputs or prediction steps. At each node, the system faces a decision, and the tree branches based on different possible outcomes. Each branch of the scenario tree is associated with a probability weight that reflects the likelihood of that particular scenario occurring. As described above, these probabilities are estimated based on the conditional distribution.
The objective function in stochastic MPC is defined as the expected cost over all possible scenarios, taking into account the probability of each scenario. This involves weighting the cost associated with each scenario by its probability of occurrence. The optimization problem in stochastic MPC involves finding the control inputs that minimize the expected cost over the entire scenario tree. This leads to a more robust controller that performs well on average across different possible outcomes.
Stochastic MPC typically employs a receding horizon control strategy. At each time step, the controller solves the optimization problem over the current scenario tree, implements the first set of control inputs, and then updates the scenario tree based on new measurements. As time progresses, the actual system behavior is observed, and the scenario tree may be updated to incorporate new information. This adaptive approach helps the controller become more accurate over time.
Scenario trees provide a structured way to handle uncertainties and make decisions in a stochastic environment. They allow the MPC controller to explicitly consider multiple possible disturbance scenarios, making the control strategy more robust and capable of handling real-world uncertainties.
where δM is the Mahalanobis distance, and β is the pre-exponential factor for a multivariate Gaussian. We can now generate forecasts and compute their respective probability by jointly sampling the decoder and probability function.
Given π(z|W0:t, c) and disturbance forecasts Wt+1:7, we require a scenario selection strategy to select the forecasts to use in the SMPC. Construction of the scenario tree for non-i.i.d. disturbances require the transition probabilities between any two consecutive states in a scenario. However, when building a scenario tree from generated forecasts, state-transition probabilities π(Wi+1|Wi, c) ∀i∈[t:T−1] are not known and would be expensive to compute. Instead, generated samples can be directly used in a single-stage robust horizon decision tree, where each scenario is a generated forecast.
Given that the learned distribution can produce all possible scenarios, it will also contain all the scenarios of a tree with arbitrarily long robust horizons, without the need for explicitly defining branches and transition probabilities. Thus, by taking a subset of forecasts can be likened to a pruned scenario tree.
Different implementations utilize different strategies for the scenario selection. For example, in one embodiment the scenarios are generated by using the most probable forecasts A⊂{Ŵt+1:T(z)}, and generating scenarios
for a user-specified ns, generated using the mean and standard deviation over A. The scalars ξ=[ξ0, ξ1, . . . , ξn] can be used to select lower probability scenarios, using the normalized probability values of an isotropic Gaussian as the weights. Thus using a single scenario is equivalent to a MPC implementation, and increasing the number of scenarios and/or values of ξ results in more conservative control.
Additionally or alternatively, for non-adaptive strategies, the scenarios can be generated as outlined above, except where a is the set of most probable scenarios generated by sampling z˜(0,1), i.e., the unconditioned prior.
The control decisions are made using a scenario-tree SMPC framework 1241 where the scenarios have been generated as discussed above. Here ωs 1231 is the weight for scenario s, and k is a stage cost function such as energy or deviation from a comfortable temperature zones, or an economic objective. Additionally, {circumflex over (x)}ks, ŵks are the predicted states and forecasted disturbance values via the dynamics 1221 and the generative AI method 1211, and g is a set of probabilistic constraint functions. Considering the above, the embodiments can therefore forecast states, inputs, and disturbances to compute a statistic of a cost function and probabilistic constraint violation over the different realizations of the disturbances.
Consequently, the SMPC can solve this scenario-tree optimal control problem using various iterative optimization methods, and send a part of the optimal control solution to the building energy system.
The above-described embodiments of the present invention can be implemented in any of numerous ways. For example, the embodiments may be implemented using hardware, software, or a combination thereof. When implemented in software, the software code can be executed on any suitable processor or collection of processors, whether provided in a single computer or distributed among multiple computers. Such processors may be implemented as integrated circuits, with one or more processors in an integrated circuit component. However, a processor may be implemented using circuitry in any suitable format.
Also, the various methods or processes outlined herein may be coded as software that is executable on one or more processors that employ any one of a variety of operating systems or platforms. Additionally, such software may be written using any of a number of suitable programming languages and/or programming or scripting tools and also may be compiled as executable machine language code or intermediate code that is executed on a framework or virtual machine. Typically, the functionality of the program modules may be combined or distributed as desired in various embodiments.
Also, the embodiments of the invention may be embodied as a method, of which an example has been provided. The acts performed as part of the method may be ordered in any suitable way. Accordingly, embodiments may be constructed in which acts are performed in an order different than illustrated, which may include performing some acts concurrently, even though shown as sequential acts in illustrative embodiments.
Although the invention has been described by way of examples of preferred embodiments, it is to be understood that various other adaptations and modifications can be made within the spirit and scope of the invention. Therefore, it is the object of the appended claims to cover all such variations and modifications as come within the true spirit and scope of the invention.