<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Archiving and Interchange DTD v2.3 20070202//EN" "archivearticle.dtd">
<article article-type="methods-article" dtd-version="2.3" xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Control. Eng.</journal-id>
<journal-title>Frontiers in Control Engineering</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Control. Eng.</abbrev-journal-title>
<issn pub-type="epub">2673-6268</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">1237759</article-id>
<article-id pub-id-type="doi">10.3389/fcteg.2023.1237759</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Control Engineering</subject>
<subj-group>
<subject>Methods</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Data-driven non-parametric chance-constrained model predictive control for microgrids energy management using small data batches</article-title>
<alt-title alt-title-type="left-running-head">Babi&#x107; et al.</alt-title>
<alt-title alt-title-type="right-running-head">
<ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3389/fcteg.2023.1237759">10.3389/fcteg.2023.1237759</ext-link>
</alt-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name>
<surname>Babi&#x107;</surname>
<given-names>Leon</given-names>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2036090/overview"/>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name>
<surname>Lauricella</surname>
<given-names>Marco</given-names>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<xref ref-type="corresp" rid="c001">&#x2a;</xref>
<uri xlink:href="https://loop.frontiersin.org/people/1822845/overview"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Ceusters</surname>
<given-names>Glenn</given-names>
</name>
<xref ref-type="aff" rid="aff3">
<sup>3</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2339060/overview"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Biskoping</surname>
<given-names>Matthias</given-names>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
</contrib>
</contrib-group>
<aff id="aff1">
<sup>1</sup>
<institution>ETH Zurich</institution>, <addr-line>Zurich</addr-line>, <country>Switzerland</country>
</aff>
<aff id="aff2">
<sup>2</sup>
<institution>ABB Corporate Research</institution>, <institution>ABB AG</institution>, <addr-line>Ladenburg</addr-line>, <country>Germany</country>
</aff>
<aff id="aff3">
<sup>3</sup>
<institution>ABB n.v.</institution>, <addr-line>Zaventem</addr-line>, <country>Belgium</country>
</aff>
<author-notes>
<fn fn-type="edited-by">
<p>
<bold>Edited by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/1093696/overview">Agostino Marcello Mangini</ext-link>, Politecnico di Bari, Italy</p>
</fn>
<fn fn-type="edited-by">
<p>
<bold>Reviewed by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2344894/overview">Gaetano Volpe</ext-link>, Politecnico di Bari, Italy</p>
<p>
<ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/986166/overview">Manuel Berenguel</ext-link>, University of Almeria, Spain</p>
<p>
<ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2353691/overview">Ruotian Liu</ext-link>, Politecnico di Bari, Italy</p>
</fn>
<corresp id="c001">&#x2a;Correspondence: Marco Lauricella, <email>marco.lauricella@de.abb.com</email>
</corresp>
</author-notes>
<pub-date pub-type="epub">
<day>17</day>
<month>08</month>
<year>2023</year>
</pub-date>
<pub-date pub-type="collection">
<year>2023</year>
</pub-date>
<volume>4</volume>
<elocation-id>1237759</elocation-id>
<history>
<date date-type="received">
<day>09</day>
<month>06</month>
<year>2023</year>
</date>
<date date-type="accepted">
<day>13</day>
<month>07</month>
<year>2023</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#xa9; 2023 Babi&#x107;, Lauricella, Ceusters and Biskoping.</copyright-statement>
<copyright-year>2023</copyright-year>
<copyright-holder>Babi&#x107;, Lauricella, Ceusters and Biskoping</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p>
</license>
</permissions>
<abstract>
<p>This paper presents a stochastic model predictive control approach combined with a time-series forecasting technique to tackle the problem of microgrid energy management in the face of uncertainty. The data-driven non-parametric chance constraint method is used to formulate chance constraints for stochastic model predictive control, while removing the dependency on probability density assumptions of uncertain variables and retaining the linear structure of the resulting optimization problem. The proposed approach is suitable for implementation on systems with limited computational power or limited memory storage, thanks to its simple linear structure and its ability to provide accurate results within pre-defined confidence levels, even when using small data batches. The proposed forecasting and stochastic model predictive control approaches are applied on a numerical example featuring a small grid-connected microgrid with PV generation, a battery storage system, and a non-controllable load, showing the ability to reduce costs by reducing the confidence level, and to satisfy pre-defined confidence levels.</p>
</abstract>
<kwd-group>
<kwd>microgrid energy management</kwd>
<kwd>model predictive control</kwd>
<kwd>data-driven chance constraints</kwd>
<kwd>energy optimization</kwd>
<kwd>stochastic optimization</kwd>
</kwd-group>
<custom-meta-wrap>
<custom-meta>
<meta-name>section-at-acceptance</meta-name>
<meta-value>Control and Automation Systems</meta-value>
</custom-meta>
</custom-meta-wrap>
</article-meta>
</front>
<body>
<sec id="s1">
<title>1 Introduction</title>
<p>Optimal energy management in microgrids with distributed energy generation is a key tool to support the integration of renewable energy sources (RES), maximizing their use to lower greenhouse gas emissions, and to mitigate the uncertainties caused by non-dispatchable loads, RES production dependency on weather conditions, and intra-day energy prices (<xref ref-type="bibr" rid="B35">Parisio et al., 2014</xref>). Moreover, the increasing availability of local energy storage devices, like batteries, requires proper management to extract their full potential, and it provides additional degrees of freedom for optimal energy management strategies. The topic of energy management in microgrids has been widely investigated in recent years, both for the single-energy and for multi-energy scenarios (<xref ref-type="bibr" rid="B12">D&#xf6;rfler et al., 2016</xref>; <xref ref-type="bibr" rid="B39">Raimondi Cominesi et al., 2018</xref>; <xref ref-type="bibr" rid="B22">Khayat et al., 2020</xref>; <xref ref-type="bibr" rid="B9">Ceusters et al., 2021</xref>; <xref ref-type="bibr" rid="B46">Wang et al., 2021</xref>).</p>
<p>The efficient integration of RES into microgrids is a challenging task due to their intermittent generation profile, high variability, and low predictability. In recent years, a variety of approaches have been proposed to address the energy optimization problem with a tractable formulation while taking into account the presence of uncertainties in the problem of optimal operation of microgrids. Such approaches could be, in principle, divided into two main categories: deterministic robust optimization and stochastic optimization methods. Robust, or worst-case, optimization is a class of approaches where constraint violation is not allowed for any possible realization of uncertainties, usually resulting in computationally demanding algorithms and conservative solutions (<xref ref-type="bibr" rid="B27">Magni et al., 2003</xref>; <xref ref-type="bibr" rid="B28">Mayne et al., 2006</xref>; <xref ref-type="bibr" rid="B7">Cannon et al., 2009</xref>; <xref ref-type="bibr" rid="B26">Limon et al., 2009</xref>; <xref ref-type="bibr" rid="B40">Rawlings and Mayne, 2009</xref>). On the other hand, stochastic optimization methods have been developed to take advantage of possible prior knowledge about the stochastic characteristics of uncertain variables, such as their probability density function (PDF), by reformulating the energy optimization problem in a probabilistic framework.</p>
<p>Several literature contributions indicate stochastic programming as a promising tool for handling uncertainties in optimization problems (<xref ref-type="bibr" rid="B30">Mirkhani and Saboohi, 2012</xref>). Usually, the stochastic optimization approaches proposed in the microgrid and smart grid literature address the problem of minimizing energy costs and/or greenhouse gas emissions, while taking into account uncertainties in RES generation and load forecasts (<xref ref-type="bibr" rid="B1">Anderson et al., 2011</xref>; <xref ref-type="bibr" rid="B32">Niknam et al., 2012</xref>). Quite often, the resulting stochastic optimization problem is formulated as a mixed-integer nonlinear program, on which decomposition techniques or heuristics are applied (<xref ref-type="bibr" rid="B3">Baziar and Kavousi-Fard, 2013</xref>; <xref ref-type="bibr" rid="B8">Cardoso et al., 2013</xref>; <xref ref-type="bibr" rid="B50">Zhang et al., 2013</xref>; <xref ref-type="bibr" rid="B19">Ji et al., 2014</xref>; <xref ref-type="bibr" rid="B31">Mohammadi et al., 2014</xref>). One example of taking prior knowledge combined with confidence levels is day-ahead interval optimization considering observed historic forecast residuals (<xref ref-type="bibr" rid="B21">Kaffash et al., 2021</xref>). Stochastic model predictive control (SMPC) is often considered a promising approach to introduce the presence of stochastic terms into the energy optimization problem (<xref ref-type="bibr" rid="B37">Patrinos et al., 2011</xref>; <xref ref-type="bibr" rid="B18">Hooshmand et al., 2012</xref>; <xref ref-type="bibr" rid="B14">Farina et al., 2013</xref>; <xref ref-type="bibr" rid="B34">Parisio and Glielmo, 2013</xref>; <xref ref-type="bibr" rid="B41">Schildbach et al., 2014</xref>; <xref ref-type="bibr" rid="B43">Su et al., 2014</xref>; <xref ref-type="bibr" rid="B36">Parisio et al., 2016</xref>; <xref ref-type="bibr" rid="B39">Raimondi Cominesi et al., 2018</xref>). Here, several approaches rely on Monte Carlo methods to generate a set of possible scenarios that are used to represent the fluctuations of the uncertain variables and optimize over the expected costs with respect to each scenario. Other SMPC formulations proposed in the literature rely on probabilistic constraints on input and state variables formulated using the Chebyshev&#x2013;Cantelli inequality or are based on point-wise reformulation in deterministic terms (<xref ref-type="bibr" rid="B4">Bernardini and Bemporad, 2012</xref>; <xref ref-type="bibr" rid="B51">Zhou and Cogill, 2013</xref>; <xref ref-type="bibr" rid="B23">Korda et al., 2014</xref>; <xref ref-type="bibr" rid="B15">Farina et al., 2015</xref>).</p>
<p>Although randomized and scenario-based SMPC approaches are very promising, they could be computationally demanding for practical implementation (<xref ref-type="bibr" rid="B5">Blackmore et al., 2010</xref>; <xref ref-type="bibr" rid="B38">Prandini et al., 2012</xref>; <xref ref-type="bibr" rid="B6">Calafiore and Fagiano, 2013</xref>). Moreover, a common assumption for various SMPC approaches is the knowledge of a parametric PDF for the uncertain variables of the problem, which is not always satisfied. To address those issues, the data-driven non-parametric chance constraint (DNCC) approach was proposed (<xref ref-type="bibr" rid="B11">Ciftci et al., 2019b</xref>; <xref ref-type="bibr" rid="B10">Ciftci et al., 2019a</xref>; <xref ref-type="bibr" rid="B49">Wu et al., 2019</xref>; <xref ref-type="bibr" rid="B48">Wu et al., 2021</xref>; <xref ref-type="bibr" rid="B47">Wu and Kargarian, 2023</xref>). The DNCC method uses historical data to determine non-parametric PDFs from data for each random variable at each time instant, instead of relying on axiomatic or model-driven probabilistic approaches, i.e., no assumption on the PDF of the random variables is required. The DNCC approach then adjusts the confidence level of the chance constraints based on the uncertainty of the estimated PDF to ensure satisfaction of the constraints with the pre-defined confidence, in face of uncertainties and PDF estimation errors. The DNCC approach results in an accurate, yet simple-to-implement approach, where the probabilistic constraints are reformulated as linear algebraic constraints, allowing one to formulate microgrid energy optimization problems as linear or quadratic programs that are easier to solve, even on systems with low computational power.</p>
<p>In this paper, we apply the DNCC approach to the microgrid energy management problem within an SMPC framework, in combination with a modification of the forecasting model proposed in previous works (<xref ref-type="bibr" rid="B24">Lauricella et al., 2020</xref>; <xref ref-type="bibr" rid="B25">Lauricella and Fagiano, 2023</xref>). The approach relies on a linear prediction model and on a fictitious input signal to capture the seasonality of time series. We modified the original DNCC approach to apply it to the residuals of the forecasting models. Additionally, instead of the commonly used point-wise error technique to determine the confidence set size for the estimated PDF, we adopt the data bootstrapping approach of <xref ref-type="bibr" rid="B16">Fiorio (2004</xref>). Both the DNCC method and the forecasting model provide good accuracy even when using a small dataset for the training phase (here, we use 3&#xa0;weeks of historical data: the first two for the training of the forecasting model and the third for the estimation of the PDF and confidence intervals of the DNCC approach). This allows us to obtain a receding-horizon SMPC with a linear structure, which is suitable for practical implementation on systems with low computational power and limited memory storage. Numerical results show that the SMPC is able to reduce costs when reducing chance-constraint confidence levels compared to a nominal MPC. The SMPC is able to satisfy the pre-defined confidence levels of the constraints when directly applied during the day with actual realizations of load and PV power generation.</p>
<sec id="s1-1">
<title>1.1 Contributions</title>
<p>This article presents a receding-horizon SMPC approach for energy management in a microgrid with local non-dispatchable renewable energy generation, a battery storage system, and an uncertain non-controllable electrical load. We use a modified linear forecasting model based on the fictitious input approach of <xref ref-type="bibr" rid="B24">Lauricella et al. (2020</xref>) to predict the future PV energy generation and the electrical load using only 2&#xa0;weeks of data for model training. Then, we apply the modified DNCC approach of <xref ref-type="bibr" rid="B10">Ciftci et al. (2019a</xref>) to the residuals of the prediction models evaluated over 1&#xa0;week of data. This allows us to obtain an algebraic constraint formulation that satisfies operational constraints in face of uncertainties to a pre-defined confidence level. The obtained algebraic constraints are then used to formulate a stochastic model predictive control for optimal energy management in a deterministic way.</p>
<p>The main contributions of this work can be listed as follows:<list list-type="simple">
<list-item>
<p>&#x2022; We applied, for the first time, the forecasting method of <xref ref-type="bibr" rid="B24">Lauricella et al. (2020</xref>) based on the fictitious input in a receding-horizon fashion to the SMPC framework, showing both its accuracy on small datasets and its advantages for optimal control applications.</p>
</list-item>
<list-item>
<p>&#x2022; We introduced a regularization term to the forecasting method to avoid overfitting during the training of the prediction model for receding-horizon forecasting.</p>
</list-item>
<list-item>
<p>&#x2022; We modified the original DNCC approach of <xref ref-type="bibr" rid="B10">Ciftci et al. (2019a</xref>) to apply it to the prediction residuals instead of applying it directly to forecasts. This allows for adaptivity of the forecasts to changing weather conditions.</p>
</list-item>
<list-item>
<p>&#x2022; We replaced the point-wise error technique of the original DNCC approach with the bootstrapping approach of <xref ref-type="bibr" rid="B16">Fiorio (2004</xref>) to statistically improve the sizing of the confidence set of the estimated PDF.</p>
</list-item>
<list-item>
<p>&#x2022; We demonstrate with numerical results that the SMPC is able to satisfy the pre-defined operational constraint confidence levels, how the reduction of robustness by choosing lower confidence levels reduces energy costs, and its applicability on a system with limited computational power.</p>
</list-item>
<list-item>
<p>&#x2022; We provide an easy-to-follow step-by-step guide for the application of the presented SMPC approach to allow an easy repeatability of the obtained results and, in general, of the DNCC implementation.</p>
</list-item>
</list>
</p>
</sec>
<sec id="s1-2">
<title>1.2 Article structure</title>
<p>This paper is organized as follows. <xref ref-type="sec" rid="s2">Section 2</xref> presents the motivation and approach outline, and <xref ref-type="sec" rid="s3">Section 3</xref> describes the model learning procedure for time series forecasting. <xref ref-type="sec" rid="s4">Section 4</xref> presents our formulation of the data-driven non-parametric chance-constrained approach for energy optimization problems, while <xref ref-type="sec" rid="s5">Section 5</xref> introduces its practical implementation within the SMPC framework, and <xref ref-type="sec" rid="s6">Section 6</xref> discusses the numerical results. Finally, <xref ref-type="sec" rid="s7">Section 7</xref> concludes the paper and provides directions for future work.</p>
</sec>
</sec>
<sec id="s2">
<title>2 Motivation and approach</title>
<p>The main motivation for this work lies in the desire to have a lightweight microgrid energy optimization approach that could deliver good performance in face of uncertainties due to unknown load and unpredictable RES power generation using a limited amount of data for training and tuning, and having a rather simple mixed-integer linear program (MILP) at its core. The main target for such an approach is the implementation of systems with limited computational power and reduced memory storage. To achieve this goal, we resort to the linear prediction models with fictitious input of <xref ref-type="bibr" rid="B24">Lauricella et al. (2020</xref>) to forecast the microgrid&#x2019;s load and PV power generation, which demonstrated good forecasting accuracy even when trained on a small amount of data (i.e., 1 or 2&#xa0;weeks of historical data) (<xref ref-type="bibr" rid="B25">Lauricella and Fagiano, 2023</xref>). Moreover, we adopt the DNCC approach of <xref ref-type="bibr" rid="B11">Ciftci et al. (2019b</xref>) since it requires no <italic>a priori</italic> knowledge of the true distribution of uncertain quantities, but it provides a method to estimate it from data. In addition, it provides a methodology to convert the resulting chance constraints into linear algebraic constraints, thus allowing us to formulate a mixed-integer linear optimization problem to solve the receding-horizon energy management task.</p>
<p>A high-level conceptual overview of the approach is given in <xref ref-type="statement" rid="Algorithm_1">Algorithm 1</xref>. We denote the first day of a week with <italic>w</italic>. Here, the assumption is that the data of past 3&#xa0;weeks are available ([<italic>w</italic> &#x2212; 3, <italic>w</italic>]). The models described in <xref ref-type="sec" rid="s3">Section 3</xref> are trained on the first 2&#xa0;weeks of the dataset. Then, they are evaluated based on the third week, and the distribution of the residuals is learned with the DNCC method described in <xref ref-type="sec" rid="s4">Section 4</xref>. Next, the SMPC described in <xref ref-type="sec" rid="s5">Section 5</xref> is used to obtain optimal control decisions for every time step <italic>t</italic> with a control resolution of 15&#xa0;min within the current week ([<italic>w</italic>, <italic>w</italic> &#x2b; 1]). At the end of the current week, the dataset is shifted by including the data of the newly observed week and discarding the data of the oldest week. This process is then repeated, resulting in a continuous receding-horizon control of the microgrid.</p>
<p>
<statement content-type="algorithm" id="Algorithm_1">
<label>Algorithm 1.</label>
<p>High-level overview of the approach</p>
<p>
<inline-graphic xlink:href="fcteg-04-1237759-fx1.tif"/>
</p>
</statement>
</p>
</sec>
<sec id="s3">
<title>3 Prediction model learning</title>
<p>To predict the future behavior of the microgrid&#x2019;s load and the PV power generation, we adopt the forecasting method proposed in <xref ref-type="bibr" rid="B24">Lauricella et al. (2020</xref>). It relies on a linear time-invariant auto-regressive model with exogenous input (ARX) and on a synthetic input signal. The method allows good prediction accuracy even when trained on small data batches, as shown in <xref ref-type="bibr" rid="B25">Lauricella and Fagiano (2023</xref>). The key contribution here is the modification of the forecasting method, by training it for multi-step prediction in a receding-horizon fashion, to be used for multi-step forecasts newly generated at every control step of the receding-horizon SMPC, instead of a single day-ahead forecast. This includes the addition of the regularization term in <xref ref-type="disp-formula" rid="e7">Eq. 7</xref>.</p>
<p>It is worth noting that different forecasting models and methods can be used to predict the behavior of the uncertain variables, in place of the ARX predictors used here. Depending on the size of the available dataset and on the available computational power, methods like double exponential smoothing, persistence algorithms, predictive clustering models, support vector machines, machine learning, and deep learning approaches could be more suitable and achieve better forecasting accuracy, see, for example, <xref ref-type="bibr" rid="B13">Dutta et al. (2017)</xref>; <xref ref-type="bibr" rid="B33">Nowotarski and Weron (2018)</xref>; <xref ref-type="bibr" rid="B17">Hong et al. (2020)</xref>; <xref ref-type="bibr" rid="B2">Aslam et al. (2021)</xref>). However, the use of linear ARX predictors trained, and periodically re-trained, on smaller data batches could improve forecasting accuracy in face of unusual and fast-changing energy prices and weather patterns.</p>
<sec id="s3-1">
<title>3.1 Model description</title>
<p>We consider a multiple-input single-output ARX prediction model, where we have a linear dependency between future predictions of a signal with its past occurrences and with appropriate input signals. Let us denote with <inline-formula id="inf1">
<mml:math id="m1">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> the predicted value of a time series at time step <italic>k</italic>, given the data available at time <italic>t</italic>, the model parameter vector <italic>&#x3b8;</italic>, and the length of the prediction horizon <italic>K</italic>. Then, we obtain the following prediction model:<disp-formula id="e1">
<mml:math id="m2">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>&#x3c6;</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>&#x3b8;</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(1)</label>
</disp-formula>The vector <inline-formula id="inf2">
<mml:math id="m3">
<mml:mi>&#x3b8;</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> denotes the model weights, and <inline-formula id="inf3">
<mml:math id="m4">
<mml:mi>&#x3c6;</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> is the regressor, defined as<disp-formula id="e2">
<mml:math id="m5">
<mml:mi>&#x3c6;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
</mml:math>
<label>(2)</label>
</disp-formula>The regressor <xref ref-type="disp-formula" rid="e2">Eq. 2</xref> consists of an auto-regressive part denoted by <inline-formula id="inf4">
<mml:math id="m6">
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> and two exogenous components, namely, the external input <inline-formula id="inf5">
<mml:math id="m7">
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> and a fictitious input <inline-formula id="inf6">
<mml:math id="m8">
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula>. The auto-regressive component <italic>Y</italic>
<sub>
<italic>r</italic>
</sub> and the external input vector <italic>U</italic>
<sub>
<italic>e</italic>
</sub> are defined as<disp-formula id="e3">
<mml:math id="m9">
<mml:mtable class="aligned">
<mml:mtr>
<mml:mtd columnalign="right">
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>y</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(3)</label>
</disp-formula>Since we use the one-step-ahead predictor <xref ref-type="disp-formula" rid="e1">Eq. 1</xref> recursively, to obtain a multi-step forecast of the load and PV power generation, <italic>Y</italic>
<sub>
<italic>r</italic>
</sub> is initialized with the most recent <italic>n</italic>
<sub>
<italic>y</italic>
</sub> past measurements for the first prediction step. Then, <italic>Y</italic>
<sub>
<italic>r</italic>
</sub> is filled with past predictions as the model is iterated over time until the end of the prediction horizon. For example, to obtain <inline-formula id="inf7">
<mml:math id="m10">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>,</inline-formula> the auto-regressive component would become <inline-formula id="inf8">
<mml:math id="m11">
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>. The external input vector <italic>U</italic>
<sub>
<italic>e</italic>
</sub> in <xref ref-type="disp-formula" rid="e3">(3)</xref> contains the most recent <italic>n</italic>
<sub>
<italic>u</italic>
</sub> past input signals of dimension <italic>d</italic>
<sub>
<italic>u</italic>
</sub>, with relevant information for the prediction of the considered time series. These can be external temperature and humidity measurements and/or forecast of weather and solar irradiation provided by an external service. To model the (nonlinear) periodic behavior of the considered time series while using a linear predictor, an additional fictitious signal is provided as input to the model. Such fictitious cyclic time encoding consists of sine and cosine functions having a given number of pre-selected time periods, and it is defined as follows:<disp-formula id="e4">
<mml:math id="m12">
<mml:msub>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mtable class="matrix">
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mi>sin</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>60</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>60</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mtd>
<mml:mtd columnalign="center">
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
</mml:mtd>
<mml:mtd columnalign="center">
<mml:mi>sin</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>60</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>60</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mtd>
<mml:mtd columnalign="center">
<mml:mi>cos</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>60</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>60</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mtd>
<mml:mtd columnalign="center">
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
</mml:mtd>
<mml:mtd columnalign="center">
<mml:mi>cos</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>60</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>60</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="center"/>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
</mml:math>
<label>(4)</label>
</disp-formula>The decision on the pre-selected time periods is based on the selected non-overlapping windows for the optimization objective in <xref ref-type="disp-formula" rid="e7">(7)</xref> and should be chosen by cross-validation. The variable <italic>p</italic> represents the period in hours, and for practical implementation on a computational unit, the time step <italic>k</italic> needs to be converted to <italic>t</italic>
<sub>
<italic>s</italic>
</sub>(<italic>k</italic>) having a UNIX timestamp representation in seconds to be correctly inserted in <xref ref-type="disp-formula" rid="e4">(4)</xref>. This guarantees that the described model is actually time-invariant.</p>
</sec>
<sec id="s3-2">
<title>3.2 Model identification</title>
<p>The prediction model <xref ref-type="disp-formula" rid="e1">Eq. 1</xref> is trained on historical data by minimizing the simulation error obtained by recursive iteration of the one-step day-ahead predictor given the initial conditions <inline-formula id="inf9">
<mml:math id="m13">
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> over the prediction horizon <italic>K</italic> for each time step <italic>t</italic> &#x2208; <italic>N</italic>. This is done to train the model for forecasting in a receding-horizon fashion, i.e., generating new forecasts at every control step <italic>t</italic> of the SMPC. Assuming we have <italic>N</italic> available data points, the model training procedure can be described with the following optimization problem:<disp-formula id="e5">
<mml:math id="m14">
<mml:msup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>&#x3d;</mml:mo>
<mml:munder>
<mml:mrow>
<mml:mi>arg min</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:munder>
<mml:mstyle displaystyle="true">
<mml:munderover>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>K</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:munderover>
</mml:mstyle>
<mml:mstyle displaystyle="true">
<mml:munderover>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:munderover>
</mml:mstyle>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mi>y</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msubsup>
</mml:math>
<label>(5)</label>
</disp-formula>Note that <xref ref-type="disp-formula" rid="e5">(5)</xref> is a nonlinear optimization problem since, by iterating the prediction model recursively, the resulting cost has a polynomial dependency on <italic>&#x3b8;</italic>. Even if <italic>N</italic> is small, the dimension of the objective in <xref ref-type="disp-formula" rid="e5">(5)</xref> can grow very quickly depending on the prediction horizon <italic>K</italic>. To avoid long computation times during the model identification, we relax the objective to only contain <inline-formula id="inf10">
<mml:math id="m15">
<mml:mi>D</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo>&#x230a;</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
<mml:mo>&#x230b;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> non-overlapping prediction windows of the horizon <italic>K</italic>. The floor operation can lead to some information loss at the tail of the dataset; thus, ideally, the dataset should be chosen such that <inline-formula id="inf11">
<mml:math id="m16">
<mml:mrow>
<mml:mo>&#x230a;</mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
<mml:mo>&#x230b;</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:math>
</inline-formula>. To simplify the notation, we define the prediction and the measurement vectors as<disp-formula id="e6">
<mml:math id="m17">
<mml:mtable class="aligned">
<mml:mtr>
<mml:mtd columnalign="right">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mi>Y</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>y</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>y</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(6)</label>
</disp-formula>Due to the small size of the dataset, we introduce a regularizing term which is added to the objective function to reduce overfitting. The relaxation of <xref ref-type="disp-formula" rid="e5">(5)</xref> together with <xref ref-type="disp-formula" rid="e6">(6)</xref> and the regularization term result in<disp-formula id="e7">
<mml:math id="m18">
<mml:msup>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>&#x3d;</mml:mo>
<mml:munder>
<mml:mrow>
<mml:mi>arg min</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:munder>
<mml:mstyle displaystyle="true">
<mml:munderover>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>D</mml:mi>
</mml:mrow>
</mml:munderover>
</mml:mstyle>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mi>Y</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3bb;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mi>&#x3b8;</mml:mi>
<mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msubsup>
</mml:math>
<label>(7)</label>
</disp-formula>A larger value of the hyperparameter <italic>&#x3bb;</italic> corresponds to a sparser structure of <italic>&#x3b8;</italic>, and a smaller value corresponds to more flexibility in the magnitudes of <italic>&#x3b8;</italic>. Larger values of <italic>&#x3bb;</italic> avoid overfitting, but have a negative influence on training accuracy since they force a simpler model structure. On the other hand, smaller values of <italic>&#x3bb;</italic> allow for closer resemblance of the training data, which could reduce model generality. The tuning of <italic>&#x3bb;</italic> is a trade-off between good fitting performance and model generality; thus, it is recommended to tune its value via cross-validation. Since the optimization problem has become a ridge regression, we need to normalize our data to have a zero mean and unitary variance; otherwise, the regularization term would not function properly due to the different magnitudes of the signals. Thus,<disp-formula id="e8">
<mml:math id="m19">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="double-struck">E</mml:mi>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>Var</mml:mi>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mspace width="2em"/>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>y</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="double-struck">E</mml:mi>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>Var</mml:mi>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
</mml:math>
<label>(8)</label>
</disp-formula>where <inline-formula id="inf12">
<mml:math id="m20">
<mml:mi mathvariant="double-struck">E</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mo>&#x22c5;</mml:mo>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> and Var [&#x22c5;] represent, respectively, the expected value and the variance operators.</p>
</sec>
</sec>
<sec id="s4">
<title>4 Data-driven non-parametric chance constraints</title>
<p>This section presents the theoretical background and the implementation details of the data-driven non-parametric chance-constrained approach of <xref ref-type="bibr" rid="B10">Ciftci et al. (2019a</xref>), together with the novel contributions proposed in this work. As remarked in <xref ref-type="sec" rid="s1">Section 1</xref>, this approach uses adaptive kernel density estimators to construct an estimate of the probability density functions of random variables from historical data. The use of kernel density estimators requires no assumptions on the real probability distribution and density functions of the random variables affecting the system at hand. Here, data bootstrapping is used to account for forecasting errors, providing a method to adjust the predefined confidence levels with respect to the estimated density function errors evaluated on bootstrapped data samples. The resulting chance constraints are then formulated as algebraic constraints by evaluating the quantile function derived from the estimated density function.</p>
<p>The data-driven non-parametric chance-constrained approach contains the following steps.<list list-type="simple">
<list-item>
<p>&#x2022; The estimation of the probability density function of a random variable from historical data, using kernel density estimation, and tuning the kernel function bandwidth using Scott&#x2019;s rule.</p>
</list-item>
<list-item>
<p>&#x2022; The computation of the confidence set size of the estimated probability density function using data bootstrapping to evaluate the estimation errors.</p>
</list-item>
<list-item>
<p>&#x2022; The computation of the reduced risk level adjusted to the size of the estimated density function confidence set.</p>
</list-item>
<list-item>
<p>&#x2022; The reformulation of the corresponding chance constraints with the reduced risk level.</p>
</list-item>
<list-item>
<p>&#x2022; The reformulation of the chance constraints as algebraic constraints to be included in the stochastic model predictive control problem using the inverse of the estimated cumulative distribution function based on the adjusted risk level.</p>
</list-item>
</list>Each of these steps is described in the following sub-sections.</p>
<sec id="s4-1">
<title>4.1 Kernel density estimation (KDE)</title>
<p>Let us denote an uncertain quantity as the random variable <italic>X</italic> and its distribution function as <inline-formula id="inf13">
<mml:math id="m21">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>. In the classic chance constraint formulation, the expression that a randomly drawn value <inline-formula id="inf14">
<mml:math id="m22">
<mml:mi>X</mml:mi>
<mml:mo>&#x223c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> will be less or equal to a value <inline-formula id="inf15">
<mml:math id="m23">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula> with a probability 1 &#x2212; <italic>&#x3b1;</italic> can be written as<disp-formula id="e9">
<mml:math id="m24">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>X</mml:mi>
<mml:mo>&#x2264;</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:math>
<label>(9)</label>
</disp-formula>Here, we designate 1 &#x2212; <italic>&#x3b1;</italic> the confidence level, and <italic>&#x3b1;</italic> is the risk level. We assume no prior knowledge of the true distribution function <inline-formula id="inf16">
<mml:math id="m25">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>. Instead, we want to find an estimate <inline-formula id="inf17">
<mml:math id="m26">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> of the true probability density function (PDF) using kernel density estimation (KDE). Such an estimate will then be used to formulate data-driven non-parametric chance constraints which can be used for stochastic optimization.</p>
<p>Given a dataset <inline-formula id="inf18">
<mml:math id="m27">
<mml:mi mathvariant="script">V</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, <inline-formula id="inf19">
<mml:math id="m28">
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:math>
</inline-formula> of <italic>n</italic> samples from a probability distribution function <inline-formula id="inf20">
<mml:math id="m29">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>, an estimate <inline-formula id="inf21">
<mml:math id="m30">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> of the true probability density function <italic>f</italic>
<sub>
<italic>X</italic>
</sub> can be found with KDE as<disp-formula id="e10">
<mml:math id="m31">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mstyle displaystyle="true">
<mml:munderover>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:munderover>
</mml:mstyle>
<mml:mi>K</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>x</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(10)</label>
</disp-formula>Here, <inline-formula id="inf22">
<mml:math id="m32">
<mml:mi>h</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:math>
</inline-formula> denotes the <italic>bandwidth</italic>, and <italic>K</italic>(<italic>x</italic>) is the <italic>kernel function</italic>. We adopt the Gaussian kernel function <inline-formula id="inf23">
<mml:math id="m33">
<mml:mi>K</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
</mml:mfrac>
<mml:msup>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula>, but other kernels such as the Epanechnikov or uniform kernel can be used as well. We choose the Gaussian kernel due to its smoothness characteristic. It has shown smoother and more general distributions on small datasets than other kernels. The choice of the bandwidth has a significantly higher influence on PDF estimation than the choice of the kernel function, and it should be chosen according to the available samples. For simplicity, we chose the bandwidth as <inline-formula id="inf24">
<mml:math id="m34">
<mml:mi>h</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> according to Scott&#x2019;s rule (<xref ref-type="bibr" rid="B42">Scott, 1992</xref>).</p>
<p>By law of large numbers, the estimated PDF <inline-formula id="inf25">
<mml:math id="m35">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> will converge to the true density function <italic>f</italic>
<sub>
<italic>X</italic>
</sub> as <italic>n</italic> &#x2192; <italic>&#x221e;</italic> (<xref ref-type="bibr" rid="B45">Tsybakov, 2009</xref>). Since we have only limited data samples from the unknown distribution available, the KDE will not converge to the true distribution, which results in an uncertainty in the estimation.</p>
</sec>
<sec id="s4-2">
<title>4.2 Data-driven chance constraints</title>
<p>Considering that we can only estimate the true PDF using a finite dataset, we know that our estimation will have errors. <xref ref-type="bibr" rid="B20">Jiang and Guan (2016</xref>) propose a quantification of these errors and a method to include them in the chance constraint formulation. Here, the estimated distribution function <inline-formula id="inf26">
<mml:math id="m36">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mo>&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> is assumed to lie within a confidence set <inline-formula id="inf27">
<mml:math id="m37">
<mml:mi mathvariant="script">D</mml:mi>
</mml:math>
</inline-formula> of probability distribution functions <inline-formula id="inf28">
<mml:math id="m38">
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:math>
</inline-formula>, whose <italic>&#x3d5;</italic>-divergence to the estimated density function is less than a certain confidence set size <italic>d</italic>. <inline-formula id="inf29">
<mml:math id="m39">
<mml:mi mathvariant="script">D</mml:mi>
</mml:math>
</inline-formula> is defined as<disp-formula id="e11">
<mml:math id="m40">
<mml:mi mathvariant="script">D</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">M</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
</mml:msub>
<mml:mo>:</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>D</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>f</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(11)</label>
</disp-formula>In this work, we only consider 1-dimensional random variables; therefore, <inline-formula id="inf30">
<mml:math id="m41">
<mml:mi>X</mml:mi>
<mml:mo>&#x223c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>X</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:math>
</inline-formula>. We denote with <inline-formula id="inf31">
<mml:math id="m42">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="script">M</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> the set of all probability distributions. Then, the divergence <inline-formula id="inf32">
<mml:math id="m43">
<mml:msub>
<mml:mrow>
<mml:mi>D</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> is defined as<disp-formula id="e12">
<mml:math id="m44">
<mml:msub>
<mml:mrow>
<mml:mi>D</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mo>&#x222b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mi>&#x3d5;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>f</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mi>d</mml:mi>
<mml:mi>x</mml:mi>
</mml:math>
<label>(12)</label>
</disp-formula>To account for the uncertainty in the probability distribution estimation, the classic chance constraint <xref ref-type="disp-formula" rid="e9">Eq. 9</xref> is reformulated to hold for every distribution within the confidence set:<disp-formula id="e13">
<mml:math id="m45">
<mml:munder>
<mml:mrow>
<mml:mi>inf</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">D</mml:mi>
</mml:mrow>
</mml:munder>
<mml:mi mathvariant="double-struck">P</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>X</mml:mi>
<mml:mo>&#x2264;</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:math>
<label>(13)</label>
</disp-formula>To reformulate the chance constraint that holds for all <inline-formula id="inf33">
<mml:math id="m46">
<mml:mi mathvariant="double-struck">P</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">D</mml:mi>
</mml:math>
</inline-formula>, the risk level <italic>&#x3b1;</italic> is reduced to <italic>&#x3b1;</italic>&#x2032; according to the confidence set size <italic>d</italic>. Here, we choose the <italic>&#x3d5;</italic>-divergence to be the <italic>&#x3c7;</italic>-divergence of order 2, defined by <italic>&#x3d5;</italic>(<italic>x</italic>)&#x2254;(<italic>x</italic> &#x2212; 1)<sup>2</sup> for risk levels <italic>&#x3b1;</italic> &#x2264; 1/2. This choice allows for a closed-form derivation of the reduced risk level <italic>&#x3b1;</italic>&#x2032; (<xref ref-type="bibr" rid="B20">Jiang and Guan, 2016</xref>). Then, the reduced risk level <italic>&#x3b1;</italic>&#x2032; is given by<disp-formula id="e14">
<mml:math id="m47">
<mml:msup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>4</mml:mn>
<mml:mi>d</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msqrt>
<mml:mo>&#x2212;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>d</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:mfrac>
</mml:math>
<label>(14)</label>
</disp-formula>To avoid negative values for the risk level, the final risk level <inline-formula id="inf34">
<mml:math id="m48">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> is chosen as <inline-formula id="inf35">
<mml:math id="m49">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>max</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>. Note that in reality, the risk level rarely becomes negative, and in this work, it is not negative as well. This formulation is mainly made for consistency. With the reduced risk level, the chance constraint can be reformulated as<disp-formula id="e15">
<mml:math id="m50">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>X</mml:mi>
<mml:mo>&#x2264;</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
<label>(15)</label>
</disp-formula>Now, the chance constraint depends only on our estimated distribution and the confidence set of the estimated distribution. This chance constraint can now be easily reformulated to an algebraic representation by calculating the cumulative distribution function <inline-formula id="inf36">
<mml:math id="m51">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="double-struck">F</mml:mi>
</mml:mrow>
<mml:mo>&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and then using its inverse <inline-formula id="inf37">
<mml:math id="m52">
<mml:msubsup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="double-struck">F</mml:mi>
</mml:mrow>
<mml:mo>&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> (the quantile function) to determine <inline-formula id="inf38">
<mml:math id="m53">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula> given a confidence 1 &#x2212; <italic>&#x3b1;</italic> as<disp-formula id="e16">
<mml:math id="m54">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="double-struck">F</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>X</mml:mi>
<mml:mo>&#x2264;</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mspace width="1em"/>
<mml:mo>&#x21d4;</mml:mo>
<mml:mspace width="1em"/>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="double-struck">F</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(16)</label>
</disp-formula>Evaluating <inline-formula id="inf39">
<mml:math id="m55">
<mml:msubsup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="double-struck">F</mml:mi>
</mml:mrow>
<mml:mo>&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> yields a value <inline-formula id="inf40">
<mml:math id="m56">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula> that will be greater/equal than any random variable <italic>X</italic> drawn from any distribution in <inline-formula id="inf41">
<mml:math id="m57">
<mml:mi mathvariant="script">D</mml:mi>
</mml:math>,</inline-formula> with a probability of at least 1 &#x2212; <italic>&#x3b1;</italic>. This makes sure that the user-defined confidence 1 &#x2212; <italic>&#x3b1;</italic> is realized with respect to the uncertainty in the estimation <inline-formula id="inf42">
<mml:math id="m58">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>.</p>
</sec>
<sec id="s4-3">
<title>4.3 Confidence set size d</title>
<p>As the last step of the DNCC approach, we need to determine a confidence set size <italic>d</italic> to construct the reduced risk level. <xref ref-type="bibr" rid="B10">Ciftci et al. (2019a</xref>) proposes using point-wise errors between the estimated density function <inline-formula id="inf43">
<mml:math id="m59">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and a histogram of the available data. Since the performance of point-wise errors with histograms can change significantly depending on the chosen histogram bins, we use a different approach to construct confidence intervals of the estimated PDF, as proposed by <xref ref-type="bibr" rid="B16">Fiorio (2004</xref>).</p>
<p>The general confidence interval for the estimated density function <inline-formula id="inf44">
<mml:math id="m60">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> of the probability distribution of <italic>X</italic> can be written as<disp-formula id="e17">
<mml:math id="m61">
<mml:mi mathvariant="double-struck">E</mml:mi>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2208;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msub>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(17)</label>
</disp-formula>Since the variance of the estimation is unknown, the sample variance <italic>s</italic>
<sup>2</sup> is used to construct the confidence interval. The values <italic>u</italic>
<sub>1&#x2212;(<italic>&#x3b1;</italic>/2)</sub> and <italic>u</italic>
<sub>
<italic>&#x3b1;</italic>/2</sub> are the 1 &#x2212; (<italic>&#x3b1;</italic>/2) and <italic>&#x3b1;</italic>/2 quantiles of the t-statistic defined in <xref ref-type="disp-formula" rid="e18">(18)</xref>, respectively.<disp-formula id="e18">
<mml:math id="m62">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="double-struck">E</mml:mi>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
</mml:math>
<label>(18)</label>
</disp-formula>With the t-statistic, the quantiles are defined as <inline-formula id="inf45">
<mml:math id="m63">
<mml:mi mathvariant="double-struck">P</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:math>
</inline-formula> and <inline-formula id="inf46">
<mml:math id="m64">
<mml:mi mathvariant="double-struck">P</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, respectively. It is important to make sure that the t-statistic in <xref ref-type="disp-formula" rid="e18">(18)</xref> is unbiased, such that <italic>u</italic>
<sub>
<italic>&#x3b1;</italic>/2</sub> &#x2264; 0 and <italic>u</italic>
<sub>1&#x2212;(<italic>&#x3b1;</italic>/2)</sub> &#x2265; 0. In <xref ref-type="bibr" rid="B16">Fiorio (2004</xref>), the unbiased t-statistic is obtained by applying bootstrapping to the estimate <inline-formula id="inf47">
<mml:math id="m65">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> as follows.</p>
<p>Let <italic>x</italic>
<sub>
<italic>i</italic>
</sub>
<sup>&#x2a;</sup> denote the bootstrapped data samples obtained by <italic>n</italic> times random sampling with replacement of data points from the original dataset <inline-formula id="inf49">
<mml:math id="m67">
<mml:mi mathvariant="script">V</mml:mi>
</mml:math>
</inline-formula>. With the total number of samples denoted as <italic>n</italic>, the bootstrap KDE can be formulated, similarly to <xref ref-type="disp-formula" rid="e10">Eq. 10</xref>, as<disp-formula id="e19">
<mml:math id="m68">
<mml:msubsup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mstyle displaystyle="true">
<mml:munderover>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:munderover>
</mml:mstyle>
<mml:mi>K</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>x</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(19)</label>
</disp-formula>The sample variance of the estimated density function <inline-formula id="inf50">
<mml:math id="m69">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> is given by <xref ref-type="disp-formula" rid="e20">(20)</xref>, and its bootstrap analog <inline-formula id="inf51">
<mml:math id="m70">
<mml:msubsup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> by replacing the data points <italic>x</italic>
<sub>
<italic>i</italic>
</sub> with the bootstrapped data points <inline-formula id="inf52">
<mml:math id="m71">
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>
<sup>&#x2a;</sup>, and the estimated <inline-formula id="inf53">
<mml:math id="m72">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> with the bootstrapped estimate <inline-formula id="inf54">
<mml:math id="m73">
<mml:msubsup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>.<disp-formula id="e20">
<mml:math id="m74">
<mml:msubsup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfrac>
<mml:mstyle displaystyle="true">
<mml:munderover>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:munderover>
</mml:mstyle>
<mml:mi>K</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>x</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2212;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:math>
<label>(20)</label>
</disp-formula>With the bootstrap estimate <inline-formula id="inf55">
<mml:math id="m75">
<mml:msubsup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> and the bootstrap sample variance <inline-formula id="inf56">
<mml:math id="m76">
<mml:msubsup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>, the unbiased t-statistic <inline-formula id="inf57">
<mml:math id="m77">
<mml:msubsup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> is defined as<disp-formula id="e21">
<mml:math id="m78">
<mml:msubsup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
</mml:math>
<label>(21)</label>
</disp-formula>Now, the quantiles can be obtained from the unbiased t-statistic with <inline-formula id="inf58">
<mml:math id="m79">
<mml:mi mathvariant="double-struck">P</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:math>
</inline-formula> and <inline-formula id="inf59">
<mml:math id="m80">
<mml:mi mathvariant="double-struck">P</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>. These quantiles together with the sample variance <inline-formula id="inf60">
<mml:math id="m81">
<mml:msubsup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> can finally be used to construct the confidence interval for the estimate <inline-formula id="inf61">
<mml:math id="m82">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>:<disp-formula id="e22">
<mml:math id="m83">
<mml:mtable class="aligned">
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mi mathvariant="double-struck">E</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x22c5;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mi mathvariant="double-struck">E</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x22c5;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(22)</label>
</disp-formula>Finally, we use the obtained confidence intervals to construct the confidence set size of our distribution function estimate <inline-formula id="inf62">
<mml:math id="m84">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mo>&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>. The confidence set size <italic>d</italic> is defined as<disp-formula id="e23">
<mml:math id="m85">
<mml:mi>d</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="double-struck">E</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>U</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="double-struck">E</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
<label>(23)</label>
</disp-formula>Here, the subscript denotes the 1 &#x2212; <italic>&#x3b1;</italic> quantile of the point-wise squared distances between the upper and the lower confidence bound.</p>
</sec>
</sec>
<sec id="s5">
<title>5 Stochastic model predictive control</title>
<p>In this work, we focus on a single-energy microgrid consisting of an electric load (<italic>P</italic>
<sub>
<italic>l</italic>
</sub> [kW]), a photovoltaic power generation system (<italic>P</italic>
<sub>
<italic>pv</italic>
</sub> [kW]), a battery that can charge <inline-formula id="inf63">
<mml:math id="m86">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mspace width="0.17em"/>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mtext>kW</mml:mtext>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> and discharge <inline-formula id="inf64">
<mml:math id="m87">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mspace width="0.17em"/>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mtext>kW</mml:mtext>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, and a connection to the main grid (<italic>P</italic>
<sub>
<italic>g</italic>
</sub> [kW]), as shown in <xref ref-type="fig" rid="F1">Figure 1</xref>. Here, it is assumed that the considered microgrid can only consume energy from the grid at a time-varying price <italic>C</italic>
<sub>
<italic>g</italic>
</sub> [NOK/kWh] and cannot resell excess energy to the grid. Therefore, excess energy is curtailed (<italic>P</italic>
<sub>
<italic>cur</italic>
</sub> [kW]), i.e., &#x201c;thrown away.&#x201d; This decision is based on the real use case from <xref ref-type="bibr" rid="B44">TronderEnergi (2021)</xref>, as mentioned in <xref ref-type="sec" rid="s6">Section 6</xref>. The goal is to optimally control the microgrid such that the cost of importing energy from the grid is minimized.</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption>
<p>Graphical depiction of the considered microgrid, with arrows indicating the permitted energy flow directions.</p>
</caption>
<graphic xlink:href="fcteg-04-1237759-g001.tif"/>
</fig>
<p>We choose receding-horizon model predictive control (MPC) to tackle the problem of optimal energy management in the considered microgrid since it allows to easily account for the operational constraints of the battery storage system, and it can react to disturbances in the load and PV power generation. Moreover, to ensure robust performance to a user-specified risk level, we resort to a stochastic model predictive control (SMPC) formulation based on the data-driven non-parametric chance constraints presented in <xref ref-type="sec" rid="s4">Section 4</xref>.</p>
<sec id="s5-1">
<title>5.1 Preliminaries</title>
<p>Let <italic>t</italic> be the time instant for which a control decision has to be made, as described in <xref ref-type="statement" rid="Algorithm_1">Algorithm 1</xref>. Then, by implementing the receding-horizon SMPC with a fixed prediction horizon of length <italic>K</italic>, the resulting controller will plan the controllable inputs for all the next time steps <italic>k</italic> &#x2208; [<italic>t</italic>, <italic>t</italic> &#x2b; <italic>K</italic>]. Then, only the first control decision corresponding to the time step <italic>k</italic> &#x3d; <italic>t</italic> is implemented. The entire procedure is then iteratively repeated for all the following time steps within the current week of operation. All power variables are defined to be non-negative:<disp-formula id="e24">
<mml:math id="m88">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="0.17em"/>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">cur</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="0.17em"/>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="0.17em"/>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(24)</label>
</disp-formula>
</p>
</sec>
<sec id="s5-2">
<title>5.2 Objective</title>
<p>Since the goal is to minimize the total grid energy import cost over the considered prediction horizon <italic>K</italic>, the objective function for the SMPC can be formulated as<disp-formula id="e25">
<mml:math id="m89">
<mml:mstyle displaystyle="true">
<mml:munderover>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:munderover>
</mml:mstyle>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>C</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(25)</label>
</disp-formula>
</p>
</sec>
<sec id="s5-3">
<title>5.3 Battery</title>
<p>The battery storage system here is described by a simple state-space model with one state representing the battery state of charge. It is assumed that the battery model is deterministic, i.e., control decisions regarding charging and discharging power will be executed exactly as mandated by the SMPC. We neglect the battery&#x2019;s internal dynamics and all the external disturbances acting on the battery storage system. Let <italic>E</italic>
<sub>
<italic>soc</italic>
</sub>(<italic>k</italic>) denote the state of charge of the battery at time step k in kWh; <italic>&#x3b7;</italic>
<sub>
<italic>c</italic>
</sub> and <italic>&#x3b7;</italic>
<sub>
<italic>d</italic>
</sub> the charging and discharging efficiencies in percent, respectively; and &#x394;<italic>t</italic> the duration of one time step in hours. Hence, the battery model is described by<disp-formula id="e26">
<mml:math id="m90">
<mml:msub>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">soc</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">soc</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b7;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b7;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(26)</label>
</disp-formula>The state of charge at the first time step <italic>k</italic> is initialized with the realized state of charge as available from the previous time step <italic>t</italic> &#x2212; 1. To protect the battery and increase its lifespan, we add lower and upper bounds for the state of charge in the optimization problem:<disp-formula id="e27">
<mml:math id="m91">
<mml:msubsup>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">soc</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">min</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">soc</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">soc</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">max</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(27)</label>
</disp-formula>Furthermore, the battery charging and discharging capacities are limited as well, and to ensure that the battery is not charged and discharged at the same time, we introduce the binary decision variables &#x3b4;<sub>
<italic>c</italic>
</sub> and &#x3b4;<sub>
<italic>d</italic>
</sub>. Here, &#x3b4;<sub>
<italic>c</italic>
</sub>(<italic>k</italic>) &#x3d; 1 means that the battery will be charged at time step <italic>k</italic>; therefore, &#x3b4;<sub>
<italic>d</italic>
</sub>(<italic>k</italic>) has to be 0 for the same time instant. These constraints are formulated as follows:<disp-formula id="e28">
<mml:math id="m92">
<mml:mtable class="aligned">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="italic">max</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="italic">max</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="2em"/>
<mml:mspace width="2em"/>
<mml:mspace width="2em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(28)</label>
</disp-formula>
</p>
</sec>
<sec id="s5-4">
<title>5.4 Power balance</title>
<p>The MPC controller is required to maintain the balance between the overall power generation and consumption of the microgrid over the prediction horizon <italic>K</italic>. This operational requirement results in the following equality constraint:<disp-formula id="e29">
<mml:math id="m93">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">cur</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(29)</label>
</disp-formula>In <xref ref-type="disp-formula" rid="e29">(29)</xref>, <italic>P</italic>
<sub>
<italic>g</italic>
</sub>(<italic>k</italic>) and <italic>P</italic>
<sub>
<italic>cur</italic>
</sub>(<italic>k</italic>) are considered state variables, <inline-formula id="inf65">
<mml:math id="m94">
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf66">
<mml:math id="m95">
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> are control variables, and <italic>P</italic>
<sub>
<italic>pv</italic>
</sub>(<italic>k</italic>) and <italic>P</italic>
<sub>
<italic>l</italic>
</sub>(<italic>k</italic>) denote the true photovoltaic power generation and the load consumption, respectively, which are both uncontrollable and unknown variables for the MPC. The equality constraint in <xref ref-type="disp-formula" rid="e29">(29)</xref> can be reformulated to include the forecasts of the uncertain variables instead of their true but unknown values. Here, we assume that <italic>P</italic>
<sub>
<italic>pv</italic>
</sub>(<italic>k</italic>) and <italic>P</italic>
<sub>
<italic>l</italic>
</sub>(<italic>k</italic>) can be expressed as their predictions plus a residual term as<disp-formula id="e30">
<mml:math id="m96">
<mml:mtable class="aligned">
<mml:mtr>
<mml:mtd columnalign="right">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(30)</label>
</disp-formula>Here, <inline-formula id="inf67">
<mml:math id="m97">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and <inline-formula id="inf68">
<mml:math id="m98">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> denote, respectively, the PV and load forecast obtained with the prediction model described in <xref ref-type="sec" rid="s3">Section 3</xref>, while <inline-formula id="inf69">
<mml:math id="m99">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and <inline-formula id="inf70">
<mml:math id="m100">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> denote the error terms (i.e., the residuals). To capture the stochastic nature of load and PV generation, we assume that the error terms are stochastic variables following unknown probability distributions. We adopt the procedure presented in <xref ref-type="sec" rid="s4">Section 4</xref> to estimate such probability distribution on historical error data obtained by comparing the predictions with their true realizations from the available validation dataset.</p>
<p>We assume that the prediction for time step <italic>k</italic> at the same time <italic>t</italic> will have similar errors over different days, i.e., <inline-formula id="inf71">
<mml:math id="m101">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x223c;</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>24</mml:mn>
<mml:mtext>h</mml:mtext>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>. Therefore, the error <inline-formula id="inf72">
<mml:math id="m102">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> of the prediction for time <italic>k</italic> at time step <italic>t</italic> will follow the same probability distribution every day: <inline-formula id="inf73">
<mml:math id="m103">
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>24</mml:mn>
<mml:mtext>h</mml:mtext>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
<mml:mo>&#x223c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>. Considering the division of a day into <italic>T</italic>
<sub>
<italic>d</italic>
</sub> time steps per day and, therefore, <italic>t</italic>
<sub>
<italic>d</italic>
</sub> &#x2208; <italic>T</italic>
<sub>
<italic>d</italic>
</sub>, this results in a total of <italic>T</italic>
<sub>
<italic>d</italic>
</sub> &#x22c5; <italic>K</italic> probability distributions that need to be estimated from data.</p>
<p>Given this probabilistic definition of the prediction errors, we can now define a chance constraint to satisfy the power balance in <xref ref-type="disp-formula" rid="e29">(29)</xref> for the true load and PV realizations with a pre-defined confidence level. By substituting in <xref ref-type="disp-formula" rid="e29">(29)</xref> the true load and PV generation with their forecast plus residual counterpart from <xref ref-type="disp-formula" rid="e30">(30)</xref>, we obtain the following equality constraint that depends on the random variables <inline-formula id="inf74">
<mml:math id="m104">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf75">
<mml:math id="m105">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>:<disp-formula id="e31">
<mml:math id="m106">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">cur</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(31)</label>
</disp-formula>To ensure that this equality holds with a certain confidence 1 &#x2212; <italic>&#x3b1;</italic>, the following chance constraint can be formulated using an inequality that will be later replaced in the optimization with an equality.<disp-formula id="e32">
<mml:math id="m107">
<mml:mi mathvariant="double-struck">P</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2265;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">cur</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>,</mml:mo>
</mml:math>
<label>(32)</label>
</disp-formula>Notably, the time step notation <italic>t</italic> is omitted. Since <inline-formula id="inf76">
<mml:math id="m108">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf77">
<mml:math id="m109">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> have different underlying distributions, we cannot directly reformulate the upper chance constraint into an algebraic formulation. To mitigate this problem, we introduce a &#x201c;dummy variable&#x201d; <italic>d</italic>
<sub>
<italic>pv</italic>
</sub>, as suggested by <xref ref-type="bibr" rid="B10">Ciftci et al. (2019a</xref>). With <italic>d</italic>
<sub>
<italic>pv</italic>
</sub>, first, the probability distribution of the PV residuals is evaluated, and then the resulting value for <italic>d</italic>
<sub>
<italic>pv</italic>
</sub> can be inserted in the chance constraint in <xref ref-type="disp-formula" rid="e32">(32)</xref>, which allows the evaluation of the probability distribution of the load residuals, resulting in a full evaluation of the chance constraint.<disp-formula id="e33">
<mml:math id="m110">
<mml:mtable class="aligned">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi mathvariant="double-struck">P</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi mathvariant="double-struck">P</mml:mi>
<mml:mrow>
<mml:mo>(</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mspace width="1em"/>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">cur</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mrow>
<mml:mo>)</mml:mo>
</mml:mrow>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(33)</label>
</disp-formula>Finally, the chance constraint can be reformulated as an equality algebraic constraint that can be easily included in the MPC optimization problem by using the DNCC method described in <xref ref-type="sec" rid="s4">Section 4</xref>.<disp-formula id="e34">
<mml:math id="m111">
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="double-struck">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="double-struck">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">cur</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(34)</label>
</disp-formula>This chance constraint ensures that the SMPC will plan the battery operation such that there will be enough power generated or consumed in the system to match the true load and PV generation with a confidence of 1 &#x2212; <italic>&#x3b1;</italic> while minimizing the overall energy cost.</p>
</sec>
<sec id="s5-5">
<title>5.5 SMPC formulation</title>
<p>By combining the objective function defined in <xref ref-type="disp-formula" rid="e25">Eq. 25</xref>, the battery dynamics and constraints of <xref ref-type="disp-formula" rid="e26">Eqs. 26</xref>-<xref ref-type="disp-formula" rid="e28">28</xref>, the power balance chance constraint <xref ref-type="disp-formula" rid="e34">Eq. 34</xref> with <inline-formula id="inf78">
<mml:math id="m112">
<mml:msup>
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>, and the non-negativity constraints <xref ref-type="disp-formula" rid="e24">Eq. 24</xref>, the final SMPC formulation is<disp-formula id="e35">
<mml:math id="m113">
<mml:mtable class="align" columnalign="left">
<mml:mtr>
<mml:mtd columnalign="right">
<mml:munder>
<mml:mrow>
<mml:mi mathvariant="italic">min</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtable class="subarray-c" columnalign="center">
<mml:mtr>
<mml:mtd>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">cur</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">soc</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:munder>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mstyle displaystyle="true">
<mml:munderover>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:munderover>
</mml:mstyle>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>C</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mi mathvariant="normal">s</mml:mi>
<mml:mo>.</mml:mo>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mo>.</mml:mo>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">cur</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="double-struck">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="double-struck">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">soc</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">soc</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b7;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>/</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b7;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:msubsup>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">soc</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">min</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">soc</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">soc</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">max</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
<disp-formula id="equ1">
<mml:math id="m114">
<mml:mtable class="align-star" columnalign="left">
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="italic">max</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="italic">max</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="2em"/>
<mml:mspace width="2em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2264;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="0.17em"/>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">cur</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="0.17em"/>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="0.17em"/>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(35)</label>
</disp-formula>
</p>
</sec>
</sec>
<sec sec-type="results" id="s6">
<title>6 Results</title>
<sec id="s6-1">
<title>6.1 Dataset description</title>
<p>The models for load and photovoltaic forecasting are trained on the publicly accessible dataset of a small microgrid by <xref ref-type="bibr" rid="B44">TronderEnergi (2021</xref>). This dataset includes measured values for weather, load, PV, and prices. Furthermore, it includes dimensioning hyperparameters for the battery. To evaluate the SMPC, we use historic weather forecast data instead of historic measured data to have a better representation of uncertainties. The historic weather forecast data are extracted from the publicly available data from the Norwegian Meteorological Institute <xref ref-type="bibr" rid="B29">METNorway (2023)</xref>. Both datasets are sorted, cleaned, and merged together in one large dataset. The data are transformed to a time resolution of 15&#xa0;min, and every data point is accompanied by a timestamp. A description of the final dataset can be found in <xref ref-type="table" rid="T1">Table 1</xref>.</p>
<table-wrap id="T1" position="float">
<label>TABLE 1</label>
<caption>
<p>Dataset description containing the used data points and their units.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Data point</th>
<th align="left">Unit</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">Timestamp</td>
<td align="left">YYYY-mm-dd HH:MM:SS &#x2b; TZ</td>
</tr>
<tr>
<td align="left">Load</td>
<td align="left">kWh</td>
</tr>
<tr>
<td align="left">PV_generation</td>
<td align="left">kWh</td>
</tr>
<tr>
<td align="left">Price_intraday</td>
<td align="left">NOK/kWh</td>
</tr>
<tr>
<td align="left">Ambient_temperature (_forecast)</td>
<td align="left">&#xb0;C</td>
</tr>
<tr>
<td align="left">Direct_radiation (_forecast)</td>
<td align="left">W/m2</td>
</tr>
<tr>
<td align="left">Cloud_cover (_forecast)</td>
<td align="left">%</td>
</tr>
<tr>
<td align="left">Relative_humidity (_forecast)</td>
<td align="left">%</td>
</tr>
<tr>
<td align="left">Wind_speed (_forecast)</td>
<td align="left">m/s</td>
</tr>
<tr>
<td align="left">Wind_direction (_forecast)</td>
<td align="left">&#x25e6;</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s6-2">
<title>6.2 Simulation environment</title>
<p>The main assumption for the simulation is that the power balance equation in <xref ref-type="disp-formula" rid="e29">(29)</xref> must hold for the true load <italic>P</italic>
<sub>
<italic>l</italic>
</sub> and true PV generation <italic>P</italic>
<sub>
<italic>pv</italic>
</sub> at all times. Next, as mentioned previously in <xref ref-type="sec" rid="s5-3">Section 5.3</xref>, the battery system is assumed to be deterministic, i.e., the control decision by the SMPC for time step <italic>t</italic>, denoted as <inline-formula id="inf79">
<mml:math id="m115">
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf80">
<mml:math id="m116">
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, will be exactly executed as such, and the state of charge of the battery will exactly follow the dynamics. As battery charging/discharging power and load and PV generation are fixed values, the simulation will decide the true grid import <italic>P</italic>
<sub>
<italic>g</italic>
</sub> and the true curtailed power <italic>P</italic>
<sub>
<italic>cur</italic>
</sub> at the time of simulation. The simulation results at time step <italic>t</italic> can be described by the following equations:<disp-formula id="e36">
<mml:math id="m117">
<mml:mtable class="aligned">
<mml:mtr>
<mml:mtd columnalign="right">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">bal</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">bal</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">bal</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">bal</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3c;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">cur</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">bal</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2265;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">bal</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">bal</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3c;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(36)</label>
</disp-formula>
</p>
</sec>
<sec id="s6-3">
<title>6.3 Numerical results</title>
<p>All computations are carried out on a MacBook Pro Late 2013 with a 2&#xa0;GHz Quad-Core Intel Core i7 and 8&#xa0;Gb of RAM.</p>
<sec id="s6-3-1">
<title>6.3.1 Prediction models</title>
<p>The models for load forecasting and PV generation forecasting are trained with the model described in <xref ref-type="sec" rid="s3">Section 3</xref>. The number of initialization steps/auto-regressive features is chosen to be <italic>n</italic>
<sub>
<italic>y</italic>
</sub> &#x3d; 3, the number of past exogenous inputs is <italic>n</italic>
<sub>
<italic>u</italic>
</sub> &#x3d; 1, and the prediction horizon is set to <italic>K</italic> &#x3d; 12&#xa0;h. Through initial cross-validation, the regularization parameter is chosen to be <italic>&#x3bb;</italic> &#x3d; 50. Both models share the same weather features as described in 6.1 and the same fictitious input periods represented in hours, <italic>p</italic> &#x3d; [4<italic>h</italic>, 12<italic>h</italic>, 1<italic>d</italic>, 2<italic>d</italic>, 7<italic>d</italic>, 14<italic>d</italic>]. These time steps are chosen such that they fit the periodical behavior of the load and PV while producing stable results in regard to the optimization with non-overlapping windows of length <italic>K</italic> &#x3d; 12&#xa0;h in <xref ref-type="disp-formula" rid="e7">(7)</xref>. As a key aspect of the presented work is low data availability, the total dataset size for training and validation is 3 weeks of data with a resolution of 15&#xa0;min. The models are trained on the first 2&#xa0;weeks of the dataset and evaluated on the third week.</p>
<p>The evaluation of the load model is shown in <xref ref-type="table" rid="T2">Table 2</xref> and the PV model in <xref ref-type="table" rid="T3">Table 3</xref>. Both evaluations use the Root-Mean-Square-Error (RMSE) as a metric. Additionally, the mean absolute percentage error (MAPE) is shown only for the load model since PV generation can take zero values.<disp-formula id="equ2">
<mml:math id="m118">
<mml:mi>M</mml:mi>
<mml:mi>A</mml:mi>
<mml:mi>P</mml:mi>
<mml:mi>E</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>100</mml:mn>
<mml:mtext>%</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mstyle displaystyle="true">
<mml:munderover>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:munderover>
</mml:mstyle>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mi>R</mml:mi>
<mml:mi>M</mml:mi>
<mml:mi>S</mml:mi>
<mml:mi>E</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:msqrt>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mstyle displaystyle="true">
<mml:munderover>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:munderover>
</mml:mstyle>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msqrt>
</mml:math>
</disp-formula>
</p>
<table-wrap id="T2" position="float">
<label>TABLE 2</label>
<caption>
<p>Numerical results for load model trained and evaluated on different datasets. The calendar week specifies the evaluation week.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Cal. Week 2020</th>
<th align="left">12</th>
<th align="left">24</th>
<th align="left">32</th>
<th align="left">43</th>
<th align="left">47</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">RMSE [kW]</td>
<td align="left">5.91</td>
<td align="left">3.8</td>
<td align="left">
<bold>2.77</bold>
</td>
<td align="left">4.46</td>
<td align="left">3.78</td>
</tr>
<tr>
<td align="left">MAPE [%]</td>
<td align="left">17.5</td>
<td align="left">21.3</td>
<td align="left">19.4</td>
<td align="left">
<bold>13.7</bold>
</td>
<td align="left">13.9</td>
</tr>
<tr>
<td align="left">Training time [s]</td>
<td align="left">
<bold>2.13</bold>
</td>
<td align="left">3.29</td>
<td align="left">2.28</td>
<td align="left">2.94</td>
<td align="left">2.39</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="T3" position="float">
<label>TABLE 3</label>
<caption>
<p>Numerical results for PV model trained and evaluated on different datasets. The calendar week specifies the evaluation week.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Cal. Week 2020</th>
<th align="left">12</th>
<th align="left">24</th>
<th align="left">32</th>
<th align="left">43</th>
<th align="left">47</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">RMSE [kW]</td>
<td align="left">8.47</td>
<td align="left">6.88</td>
<td align="left">7.23</td>
<td align="left">7.24</td>
<td align="left">
<bold>3.52</bold>
</td>
</tr>
<tr>
<td align="left">Training time [s]</td>
<td align="left">3.09</td>
<td align="left">3.11</td>
<td align="left">3.19</td>
<td align="left">5.20</td>
<td align="left">
<bold>2.50</bold>
</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The comparison between load predictions and true values for the first day of calendar week 12 is shown in <xref ref-type="fig" rid="F2">Figure 2</xref>. Considering the simplicity of the model and the data availability, the results for calendar weeks 32 and 43 are very good. The figure shows that the model is capable of learning the load behavior even in situations with peaks. It can also be observed that training is very fast considering the time resolution of 15&#xa0;min. This supports the approach of retraining the model every week with new data to obtain the best possible predictions by capturing short-term trends.</p>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption>
<p>Comparison between load model predictions and load measurements for the first day of calendar week 12.</p>
</caption>
<graphic xlink:href="fcteg-04-1237759-g002.tif"/>
</fig>
<p>An exemplary plot for the PV model is shown in <xref ref-type="fig" rid="F3">Figure 3</xref>. It shows that the PV model is able to capture the typical PV generation trend during the day very well. All in all, the results show that the model structure is applicable to both load consumption and PV generation learning with good prediction results on small data batches and low computational burden.</p>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption>
<p>Comparison between PV model predictions and PV generation measurements for the second day of calendar week 24.</p>
</caption>
<graphic xlink:href="fcteg-04-1237759-g003.tif"/>
</fig>
</sec>
<sec id="s6-3-2">
<title>6.3.2 DNCC method</title>
<p>As mentioned in <xref ref-type="sec" rid="s5-4">Section 5.4</xref>, we want to use the DNCC method to estimate the probability distributions of the errors of the trained models. The underlying assumption is that we can capture the uncertainties in the models and in weather predictions in the evaluation errors of the model. Since we assume the availability of data of 3&#xa0;weeks and the models are trained on 2&#xa0;weeks, data of 1&#xa0;week are left for error evaluation and PDF estimation.</p>
<p>The errors are estimated in the following way: we start with a 3-dimensional array <italic>A</italic>. The first dimension corresponds to the daily time step <italic>t</italic>
<sub>
<italic>d</italic>
</sub> &#x2208; <italic>T</italic>
<sub>
<italic>d</italic>
</sub> and has, in this case, a size of <italic>T</italic>
<sub>
<italic>d</italic>
</sub> &#x3d; 4 &#x22c5; 24 &#x3d; 96. The second dimension corresponds to the <italic>k</italic>th predicted time step at time <italic>t</italic>
<sub>
<italic>d</italic>
</sub> and has a dimension <italic>K</italic> &#x3d; 4 &#x22c5; 12 &#x3d; 48. The third dimension corresponds to the recorded error values <italic>e</italic> (<italic>k</italic>&#x7c;<italic>t</italic>
<sub>
<italic>d</italic>
</sub>) and grows with the size of the validation dataset. Therefore, <italic>A</italic> has a non-homogeneous third dimension. Following a receding horizon fashion, for each model prediction at every time step <italic>t</italic> in the validation dataset, we record the error of the <italic>k</italic>th predicted time step <italic>e</italic> (<italic>k</italic>&#x7c;<italic>t</italic>). The time step <italic>t</italic> is mapped to a daily time step <italic>t</italic>
<sub>
<italic>d</italic>
</sub>, and the error value at the <italic>k</italic>th prediction step is put into <italic>A</italic> [<italic>t</italic>
<sub>
<italic>d</italic>
</sub>, <italic>k</italic>, :]. Finally, for each <italic>t</italic>
<sub>
<italic>d</italic>
</sub> and <italic>k</italic>, we run the DNCC method on the array of error values <italic>A</italic> [<italic>t</italic>
<sub>
<italic>d</italic>
</sub>, <italic>k</italic>, :]. This results in <italic>T</italic>
<sub>
<italic>d</italic>
</sub> &#x22c5; <italic>K</italic> &#x3d; 96 &#x22c5; 48 &#x3d; 4068 probability distributions with their respective chance-constraint formulation. Note that the DNCC method is applied <italic>a priori</italic>, i.e., before the beginning of a new week. Therefore, a longer initial computation is not a problem. In total, the estimation of 4,068 probability distributions and their corresponding cumulative distributions through integration took <bold>5:20&#xa0;min</bold>. The estimation process is summarized in <xref ref-type="statement" rid="Algorithm_2">Algorithm 2</xref>.</p>
<p>
<statement content-type="algorithm" id="Algorithm_2">
<label>Algorithm 2.</label>
<p>Error evaluation for the DNCC method</p>
<p>
<inline-graphic xlink:href="fcteg-04-1237759-fx2.tif"/>
</p>
</statement>
</p>
<p>For illustration of the estimated probability distribution and the confidence intervals, we run the DNCC method with a risk level of <italic>&#x3b1;</italic> &#x3d; 0.1 (confidence <italic>p</italic> &#x3d; 0.9). <xref ref-type="fig" rid="F4">Figure 4</xref> shows an exemplary estimated PDF with confidence intervals corresponding to the specified confidence. In this case, the risk level <italic>&#x3b1;</italic> &#x3d; 0.1 was reduced by the algorithm to <inline-formula id="inf85">
<mml:math id="m123">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0.094</mml:mn>
</mml:math>
</inline-formula> due to the uncertainties in the distribution estimation.</p>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption>
<p>DNCC example of estimated PDF with confidence intervals corresponding to a confidence <italic>p</italic> &#x3d;0.9.</p>
</caption>
<graphic xlink:href="fcteg-04-1237759-g004.tif"/>
</fig>
<p>Evaluating the DNCCs for every time step of the predictions in <xref ref-type="fig" rid="F2">Figure 2</xref> yields the exemplary prediction correction displayed in <xref ref-type="fig" rid="F5">Figure 5</xref>.</p>
<fig id="F5" position="float">
<label>FIGURE 5</label>
<caption>
<p>DNCC estimates applied to load model forecast with a confidence of <italic>p</italic> &#x3d; 0.9.</p>
</caption>
<graphic xlink:href="fcteg-04-1237759-g005.tif"/>
</fig>
</sec>
<sec id="s6-3-3">
<title>6.3.3 SMPC</title>
<p>The presented SMPC formulation in <xref ref-type="sec" rid="s5">Section 5</xref> is used to perform battery set-point control for every control time step on a test dataset with the size of 1&#xa0;week such that both the models and the DNCCs have not been trained/evaluated on. A high-level overview of the process is described in <xref ref-type="statement" rid="Algorithm_1">Algorithm 1</xref> and <xref ref-type="sec" rid="s2">Section 2</xref>. Assuming we are at the first day of the current week denoted by <italic>w</italic>, the assumption here is that the prior 3-week data are available [<italic>w</italic> &#x2212; 3, <italic>w</italic>]. First, we train the load and PV models on the first 2&#xa0;weeks of the dataset, the so-called training data [<italic>w</italic> &#x2212; 3, <italic>w</italic> &#x2212; 1]. Then, we learn the distribution of the model errors on the last week of the dataset, the so-called validation data [<italic>w</italic> &#x2212; 1, <italic>w</italic>]. Finally, the SMPC is run and evaluated on the current week [<italic>w</italic>, <italic>w</italic> &#x2b; 1], the so-called test data. This ensures the most realistic evaluation of the method. The SMPC computes the battery control set-points at each time step <italic>t</italic> within the current week by planning <italic>K</italic> &#x3d; 12<italic>h</italic> ahead and applying the first control decision at time <italic>t</italic>. Note that <italic>w</italic> is updated by &#x394;<italic>w</italic> &#x3d; 1week, while <italic>t</italic> is updated by &#x394;<italic>t</italic> &#x3d; 15&#xa0;min.</p>
<p>We compare the performance of a nominal MPC with that of the SMPC method on five different and randomly chosen calendar weeks representing different times of the year. For each of those weeks, we evaluate the SMPC method for multiple risk levels <italic>&#x3b1;</italic> &#x2208; [0.01, 0.05, 0.1, 0.2, 0.3]. The evaluated metrics are the average step computation time, which measures how long the optimization in <xref ref-type="disp-formula" rid="e35">Eq. 35</xref> takes to solve, the satisfaction of the true realized load <inline-formula id="inf86">
<mml:math id="m124">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> and the true realized PV generation <inline-formula id="inf87">
<mml:math id="m125">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">&#x302;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mo>&#x303;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, to evaluate how well the DNCC methods satisfy the pre-defined confidence levels, and finally the realized grid energy costs. The results are shown in <xref ref-type="table" rid="T4">Table 4</xref>.</p>
<table-wrap id="T4" position="float">
<label>TABLE 4</label>
<caption>
<p>Comparison of nominal MPC and SMPC with various risk levels <italic>&#x3b1;</italic> on different calendar weeks.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th colspan="2" align="left">Calendar week 2020</th>
<th align="left">13</th>
<th align="left">25</th>
<th align="left">33</th>
<th align="left">44</th>
<th align="left">48</th>
<th align="left">Average</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td rowspan="4" align="left">Nominal MPC</td>
<td align="left">Avg. step time [s]</td>
<td align="left">0.152</td>
<td align="left">0.163</td>
<td align="left">0.209</td>
<td align="left">0.182</td>
<td align="left">0.178</td>
<td align="left">0.177</td>
</tr>
<tr>
<td align="left">Load satisfaction [%]</td>
<td align="left">59.8</td>
<td align="left">39.0</td>
<td align="left">51.8</td>
<td align="left">92.7</td>
<td align="left">36.9</td>
<td align="left">56.0</td>
</tr>
<tr>
<td align="left">PV satisfaction [%]</td>
<td align="left">70.8</td>
<td align="left">92.7</td>
<td align="left">57.0</td>
<td align="left">86.6</td>
<td align="left">91.8</td>
<td align="left">79.8</td>
</tr>
<tr>
<td align="left">Grid energy cost [NOK]</td>
<td align="left">
<bold>179.89</bold>
</td>
<td align="left">
<bold>30.99</bold>
</td>
<td align="left">
<bold>67.42</bold>
</td>
<td align="left">289.33</td>
<td align="left">268.43</td>
<td align="left">167.21</td>
</tr>
<tr>
<td align="left">Stochastic MPC</td>
<td align="left">Avg. step time [s]</td>
<td align="left">0.136</td>
<td align="left">0.140</td>
<td align="left">0.150</td>
<td align="left">0.152</td>
<td align="left">0.160</td>
<td align="left">
<bold>0.148</bold>
</td>
</tr>
<tr>
<td align="left">
<italic>&#x3b1;</italic> &#x3d; 0.01</td>
<td align="left">Load satisfaction [%]</td>
<td align="left">91.7</td>
<td align="left">73.5</td>
<td align="left">84.2</td>
<td align="left">
<bold>99.9</bold>
</td>
<td align="left">81.4</td>
<td align="left">86.1</td>
</tr>
<tr>
<td rowspan="2" align="left">&#x3b1;&#x2032;<sub>&#x2b;</sub>&#x3d; 0.002</td>
<td align="left">PV satisfaction [%]</td>
<td align="left">58.9</td>
<td align="left">
<bold>98.8</bold>
</td>
<td align="left">89.1</td>
<td align="left">
<bold>99.1</bold>
</td>
<td align="left">95.4</td>
<td align="left">88.3</td>
</tr>
<tr>
<td align="left">Grid energy cost [NOK]</td>
<td align="left">190.46</td>
<td align="left">32.22</td>
<td align="left">69.28</td>
<td align="left">278.62</td>
<td align="left">265.10</td>
<td align="left">167.14</td>
</tr>
<tr>
<td align="left">Stochastic MPC</td>
<td align="left">Avg. step time [s]</td>
<td align="left">0.140</td>
<td align="left">0.143</td>
<td align="left">0.152</td>
<td align="left">0.155</td>
<td align="left">0.166</td>
<td align="left">0.151</td>
</tr>
<tr>
<td align="left">
<italic>&#x3b1;</italic> &#x3d; 0.05</td>
<td align="left">Load satisfaction [%]</td>
<td align="left">
<bold>92.3</bold>
</td>
<td align="left">74.0</td>
<td align="left">84.2</td>
<td align="left">
<bold>99.9</bold>
</td>
<td align="left">79.3</td>
<td align="left">85.9</td>
</tr>
<tr>
<td rowspan="2" align="left">&#x3b1;&#x2032;<sub>&#x2b;</sub>&#x3d; 0.018</td>
<td align="left">PV satisfaction [%]</td>
<td align="left">54.5</td>
<td align="left">
<bold>98.7</bold>
</td>
<td align="left">86.2</td>
<td align="left">
<bold>99.1</bold>
</td>
<td align="left">
<bold>93.0</bold>
</td>
<td align="left">86.3</td>
</tr>
<tr>
<td align="left">Grid energy cost [NOK]</td>
<td align="left">191.50</td>
<td align="left">31.45</td>
<td align="left">70.39</td>
<td align="left">278.48</td>
<td align="left">265.21</td>
<td align="left">167.41</td>
</tr>
<tr>
<td align="left">Stochastic MPC</td>
<td align="left">Avg. step time [s]</td>
<td align="left">0.140</td>
<td align="left">0.146</td>
<td align="left">0.151</td>
<td align="left">0.154</td>
<td align="left">0.156</td>
<td align="left">0.150</td>
</tr>
<tr>
<td align="left">
<italic>&#x3b1;</italic> &#x3d; 0.1</td>
<td align="left">Load satisfaction [%]</td>
<td align="left">
<bold>90.8</bold>
</td>
<td align="left">72.3</td>
<td align="left">83.9</td>
<td align="left">
<bold>99.3</bold>
</td>
<td align="left">78.7</td>
<td align="left">85.0</td>
</tr>
<tr>
<td rowspan="2" align="left">&#x3b1;&#x2032;<sub>&#x2b;</sub>&#x3d; 0.041</td>
<td align="left">PV satisfaction [%]</td>
<td align="left">52.5</td>
<td align="left">
<bold>98.5</bold>
</td>
<td align="left">86.0</td>
<td align="left">
<bold>98.4</bold>
</td>
<td align="left">
<bold>90.6</bold>
</td>
<td align="left">85.2</td>
</tr>
<tr>
<td align="left">Grid energy cost [NOK]</td>
<td align="left">191.63</td>
<td align="left">31.51</td>
<td align="left">68.91</td>
<td align="left">276.44</td>
<td align="left">264.69</td>
<td align="left">166.63</td>
</tr>
<tr>
<td align="left">Stochastic MPC</td>
<td align="left">Avg. step time [s]</td>
<td align="left">0.139</td>
<td align="left">0.142</td>
<td align="left">0.161</td>
<td align="left">0.153</td>
<td align="left">0.163</td>
<td align="left">0.152</td>
</tr>
<tr>
<td align="left">&#x3b1; &#x3d; 0.2</td>
<td align="left">Load satisfaction [%]</td>
<td align="left">
<bold>87.1</bold>
</td>
<td align="left">65.9</td>
<td align="left">
<bold>79.3</bold>
</td>
<td align="left">
<bold>99.6</bold>
</td>
<td align="left">73.4</td>
<td align="left">
<bold>81.0</bold>
</td>
</tr>
<tr>
<td rowspan="2" align="left">&#x3b1;&#x2032;<sub>&#x2b;</sub>&#x3d; 0.124</td>
<td align="left">PV satisfaction [%]</td>
<td align="left">47.8</td>
<td align="left">
<bold>98.5</bold>
</td>
<td align="left">69.9</td>
<td align="left">
<bold>97.0</bold>
</td>
<td align="left">
<bold>86.9</bold>
</td>
<td align="left">
<bold>80.0</bold>
</td>
</tr>
<tr>
<td align="left">Grid energy cost [NOK]</td>
<td align="left">188.58</td>
<td align="left">31.55</td>
<td align="left">69.11</td>
<td align="left">
<bold>273.52</bold>
</td>
<td align="left">264.52</td>
<td align="left">165.46</td>
</tr>
<tr>
<td align="left">Stochastic MPC</td>
<td align="left">Avg. step time [s]</td>
<td align="left">0.140</td>
<td align="left">0.144</td>
<td align="left">0.153</td>
<td align="left">0.155</td>
<td align="left">0.155</td>
<td align="left">0.150</td>
</tr>
<tr>
<td align="left">
<italic>&#x3b1;</italic> &#x3d; 0.3</td>
<td align="left">Load satisfaction [%]</td>
<td align="left">
<bold>82.0</bold>
</td>
<td align="left">58.0</td>
<td align="left">
<bold>72.2</bold>
</td>
<td align="left">
<bold>99.3</bold>
</td>
<td align="left">62.9</td>
<td align="left">
<bold>74.9</bold>
</td>
</tr>
<tr>
<td rowspan="2" align="left">
<inline-formula id="inf88">
<mml:math id="m126">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0.214</mml:mn>
</mml:math>
</inline-formula>
</td>
<td align="left">PV satisfaction [%]</td>
<td align="left">39.4</td>
<td align="left">
<bold>98.4</bold>
</td>
<td align="left">56.7</td>
<td align="left">
<bold>92.7</bold>
</td>
<td align="left">60.7</td>
<td align="left">
<bold>69.6</bold>
</td>
</tr>
<tr>
<td align="left">Grid energy cost [NOK]</td>
<td align="left">184.47</td>
<td align="left">31.73</td>
<td align="left">68.88</td>
<td align="left">275.42</td>
<td align="left">
<bold>263.27</bold>
</td>
<td align="left">
<bold>164.75</bold>
</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The first result to highlight is the same average computation time of both nominal MPC and SMPC. This is due to the property of computing and evaluating the DNCCs <italic>a priori</italic> and only inserting the resulting values in the MILP, as described in <xref ref-type="disp-formula" rid="e35">Eq. 35</xref>. Next, we observe that the SMPC with risk level <italic>&#x3b1;</italic> &#x3d; 0.3 has the lowest realized average grid energy cost compared to all other methods. The results show that decreasing the confidence level improves the grid energy costs. On the other hand, decreasing the risk level and, therefore, increasing the confidence results in higher costs, yielding a tradeoff between robustness and cost. Although the most robust method has the highest cost between the SMPCs, a very good result is that the average cost of the most robust SMPC is very close to the average cost of the nominal MPC. Additionally, taking into account the load and PV satisfactions, the most robust SMPC delivers a higher satisfaction and, therefore, more guarantees at the same average cost. The last result to point out is that the SMPC is able to satisfy the pre-defined confidence in many cases (marked percentages). In particular, for the risk levels <italic>&#x3b1;</italic> &#x3d; 0.2 and <italic>&#x3b1;</italic> &#x3d; 0.3, the SMPC satisfies the risk levels and, therefore, the confidences on average. This shows the possibility of maintaining pre-defined confidence levels with the presented method. The mismatch between confidence level and load and PV satisfactions for high confidence levels (lower risk levels) can be explained by the limited data availability, which means that the true error distribution might contain larger errors that we did not observe in the validation data.</p>
<p>To have a greater insight into the SMPCs&#x2019; behavior compared to the nominal MPC, we compare the battery state-of-charge (SoC) between the nominal MPC and the SMPC with different risk levels on calendar week 13. The comparison is shown in <xref ref-type="fig" rid="F6">Figure 6</xref>. It shows that with increasing risk level <italic>&#x3b1;</italic>, the SMPC tends to charge the battery more so that it has more energy to discharge. This can be confirmed with the higher SoC peaks compared to the nominal MPC and with the full battery discharging up until the SoC constraint for both nominal MPC and all SMPCs.</p>
<fig id="F6" position="float">
<label>FIGURE 6</label>
<caption>
<p>Comparison of battery state of charge between SMPCs with various risk levels and the nominal MPC.</p>
</caption>
<graphic xlink:href="fcteg-04-1237759-g006.tif"/>
</fig>
</sec>
</sec>
</sec>
<sec sec-type="conclusion" id="s7">
<title>7 Conclusion</title>
<p>We presented a stochastic model predictive control approach to address the energy management problem in microgrids based on data-driven non-parametric chance constraints and on linear prediction models with fictitious input signals to forecast uncertain quantities like electric energy load and renewable power generation. The proposed framework allows the formulation of the resulting stochastic model predictive control as a rather simple mixed-integer linear program using appropriate algebraic constraints, making it feasible for implementation in systems with limited computational power. Moreover, numerical results demonstrated the performance of the approach even when only a limited amount of historical data is available for the training and tuning phase of the algorithm. The presented approach is able to reduce costs when reducing robustness through chance constraints, deliver robustness at the same average cost compared to a nominal MPC, and to satisfy constraints up to the pre-defined confidence.</p>
</sec>
</body>
<back>
<sec sec-type="data-availability" id="s8">
<title>Data availability statement</title>
<p>The original contributions presented in the study are included in the article/Supplementary Material; further inquiries can be directed to the corresponding author.</p>
</sec>
<sec id="s9">
<title>Author contributions</title>
<p>LB contributed to the problem formulation, the algorithm design, the dataset collection, the numerical simulations and results analysis, and to the preparation of the first draft of the manuscript. ML contributed to the conception and design of the approach, the problem formulation, the literature review and introduction section, and the reading and revision of the manuscript. GC and MB contributed to the conception, the evaluation, and the improvement of the approach, and to the revision of the manuscript. All authors contributed to the article and approved the submitted version.</p>
</sec>
<sec id="s10">
<title>Funding</title>
<p>This work has been supported in part by the Flemish Agency for Innovation and Entrepreneurship (VLAIO) grant HBC. 2019.2613 and grant HBC. 2018.0529. The authors declare that the funder had no involvement in the study.</p>
</sec>
<sec sec-type="COI-statement" id="s11">
<title>Conflict of interest</title>
<p>Authors ML and MB were employed, and author LB was partially employed by ABB AG. Author GC was employed by ABB n.v. The author ML declared that they were an editorial board member of Frontiers, at the time of submission. This had no impact on the peer review process and the final decision.</p>
</sec>
<sec sec-type="disclaimer" id="s12">
<title>Publisher&#x2019;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors, and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Anderson</surname>
<given-names>R. N.</given-names>
</name>
<name>
<surname>Boulanger</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Powell</surname>
<given-names>W. B.</given-names>
</name>
<name>
<surname>Scott</surname>
<given-names>W.</given-names>
</name>
</person-group> (<year>2011</year>). <article-title>Adaptive stochastic control for the smart grid</article-title>. <source>Proc. IEEE</source> <volume>99</volume>, <fpage>1098</fpage>&#x2013;<lpage>1115</lpage>. <pub-id pub-id-type="doi">10.1109/JPROC.2011.2109671</pub-id>
</citation>
</ref>
<ref id="B2">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Aslam</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Herodotou</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Mohsin</surname>
<given-names>S. M.</given-names>
</name>
<name>
<surname>Javaid</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Ashraf</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Aslam</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2021</year>). <article-title>A survey on deep learning methods for power load and renewable energy forecasting in smart microgrids</article-title>. <source>Renew. Sustain. Energy Rev.</source> <volume>144</volume>, <fpage>110992</fpage>. <pub-id pub-id-type="doi">10.1016/j.rser.2021.110992</pub-id>
</citation>
</ref>
<ref id="B3">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Baziar</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Kavousi-Fard</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2013</year>). <article-title>Considering uncertainty in the optimal energy management of renewable micro-grids including storage devices</article-title>. <source>Renew. Energy</source> <volume>59</volume>, <fpage>158</fpage>&#x2013;<lpage>166</lpage>. <pub-id pub-id-type="doi">10.1016/j.renene.2013.03.026</pub-id>
</citation>
</ref>
<ref id="B4">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bernardini</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Bemporad</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2012</year>). <article-title>Stabilizing model predictive control of stochastic constrained linear systems</article-title>. <source>IEEE Trans. Automatic Control</source> <volume>57</volume>, <fpage>1468</fpage>&#x2013;<lpage>1480</lpage>. <pub-id pub-id-type="doi">10.1109/TAC.2011.2176429</pub-id>
</citation>
</ref>
<ref id="B5">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Blackmore</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Ono</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Bektassov</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Williams</surname>
<given-names>B. C.</given-names>
</name>
</person-group> (<year>2010</year>). <article-title>A probabilistic particle-control approximation of chance-constrained stochastic predictive control</article-title>. <source>IEEE Trans. Robotics</source> <volume>26</volume>, <fpage>502</fpage>&#x2013;<lpage>517</lpage>. <pub-id pub-id-type="doi">10.1109/TRO.2010.2044948</pub-id>
</citation>
</ref>
<ref id="B6">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Calafiore</surname>
<given-names>G. C.</given-names>
</name>
<name>
<surname>Fagiano</surname>
<given-names>L.</given-names>
</name>
</person-group> (<year>2013</year>). <article-title>Robust model predictive control via scenario optimization</article-title>. <source>IEEE Trans. Automatic Control</source> <volume>58</volume>, <fpage>219</fpage>&#x2013;<lpage>224</lpage>. <pub-id pub-id-type="doi">10.1109/TAC.2012.2203054</pub-id>
</citation>
</ref>
<ref id="B7">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Cannon</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Kouvaritakis</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Ng</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2009</year>). <article-title>Probabilistic tubes in linear stochastic model predictive control</article-title>. <source>Syst. Control Lett.</source> <volume>58</volume>, <fpage>747</fpage>&#x2013;<lpage>753</lpage>. <pub-id pub-id-type="doi">10.1016/j.sysconle.2009.08.004</pub-id>
</citation>
</ref>
<ref id="B8">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Cardoso</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Stadler</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Siddiqui</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Marnay</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>DeForest</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Barbosa-P&#xf3;voa</surname>
<given-names>A.</given-names>
</name>
<etal/>
</person-group> (<year>2013</year>). <article-title>Microgrid reliability modeling and battery scheduling using stochastic linear programming</article-title>. <source>Electr. Power Syst. Res.</source> <volume>103</volume>, <fpage>61</fpage>&#x2013;<lpage>69</lpage>. <pub-id pub-id-type="doi">10.1016/j.epsr.2013.05.005</pub-id>
</citation>
</ref>
<ref id="B9">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Ceusters</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Rodr&#xed;guez</surname>
<given-names>R. C.</given-names>
</name>
<name>
<surname>Garc&#xed;a</surname>
<given-names>A. B.</given-names>
</name>
<name>
<surname>Franke</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Deconinck</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Helsen</surname>
<given-names>L.</given-names>
</name>
<etal/>
</person-group> (<year>2021</year>). <article-title>Model-predictive control and reinforcement learning in multi-energy system case studies</article-title>. <source>Appl. Energy</source> <volume>303</volume>, <fpage>117634</fpage>. <pub-id pub-id-type="doi">10.1016/j.apenergy.2021.117634</pub-id>
</citation>
</ref>
<ref id="B10">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Ciftci</surname>
<given-names>O.</given-names>
</name>
<name>
<surname>Mehrtash</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Kargarian</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2019a</year>). <article-title>Data-driven nonparametric chance-constrained optimization for microgrid energy management</article-title>. <source>IEEE Trans. Industrial Inf.</source> <volume>16</volume>, <fpage>2447</fpage>&#x2013;<lpage>2457</lpage>. <pub-id pub-id-type="doi">10.1109/tii.2019.2932078</pub-id>
</citation>
</ref>
<ref id="B11">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Ciftci</surname>
<given-names>O.</given-names>
</name>
<name>
<surname>Mehrtash</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Safdarian</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Kargarian</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2019b</year>). &#x201c;<article-title>Chance-constrained microgrid energy management with flexibility constraints provided by battery storage</article-title>,&#x201d; in <conf-name>2019 IEEE Texas Power and Energy Conference (TPEC)</conf-name>, <conf-loc>College Station, TX, USA</conf-loc>, <conf-date>07-08 February 2019</conf-date> (<publisher-name>IEEE</publisher-name>). <pub-id pub-id-type="doi">10.1109/TPEC.2019.8662200</pub-id>
</citation>
</ref>
<ref id="B12">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>D&#xf6;rfler</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Simpson-Porco</surname>
<given-names>J. W.</given-names>
</name>
<name>
<surname>Bullo</surname>
<given-names>F.</given-names>
</name>
</person-group> (<year>2016</year>). <article-title>Breaking the hierarchy: distributed control and economic optimality in microgrids</article-title>. <source>IEEE Trans. Control Netw. Syst.</source> <volume>3</volume>, <fpage>241</fpage>&#x2013;<lpage>253</lpage>. <pub-id pub-id-type="doi">10.1109/TCNS.2015.2459391</pub-id>
</citation>
</ref>
<ref id="B13">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Dutta</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Li</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Venkataraman</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Costa</surname>
<given-names>L. M.</given-names>
</name>
<name>
<surname>Jiang</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Plana</surname>
<given-names>R.</given-names>
</name>
<etal/>
</person-group> (<year>2017</year>). <article-title>Load and renewable energy forecasting for a microgrid using persistence technique</article-title>. <source>Energy Procedia</source> <volume>143</volume>, <fpage>617</fpage>&#x2013;<lpage>622</lpage>. <pub-id pub-id-type="doi">10.1016/j.egypro.2017.12.736</pub-id>
</citation>
</ref>
<ref id="B14">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Farina</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Giulioni</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Magni</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Scattolini</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2013</year>). &#x201c;<article-title>A probabilistic approach to model predictive control</article-title>,&#x201d; in <conf-name>52nd IEEE conference on decision and control</conf-name>, <conf-loc>Firenze, Italy</conf-loc>, <conf-date>10-13 December 2013</conf-date> (<publisher-name>IEEE</publisher-name>), <fpage>7734</fpage>&#x2013;<lpage>7739</lpage>.</citation>
</ref>
<ref id="B15">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Farina</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Giulioni</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Magni</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Scattolini</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2015</year>). <article-title>An approach to output-feedback mpc of stochastic linear discrete-time systems</article-title>. <source>Automatica</source> <volume>55</volume>, <fpage>140</fpage>&#x2013;<lpage>149</lpage>. <pub-id pub-id-type="doi">10.1016/j.automatica.2015.02.039</pub-id>
</citation>
</ref>
<ref id="B16">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Fiorio</surname>
<given-names>C. V.</given-names>
</name>
</person-group> (<year>2004</year>). <article-title>Confidence intervals for kernel density estimation</article-title>. <source>Stata J.</source> <volume>4</volume>, <fpage>168</fpage>&#x2013;<lpage>179</lpage>. <pub-id pub-id-type="doi">10.1177/1536867x0400400207</pub-id>
</citation>
</ref>
<ref id="B17">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hong</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Pinson</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Wang</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Weron</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Yang</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Zareipour</surname>
<given-names>H.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>Energy forecasting: A review and outlook</article-title>. <source>IEEE Open Access J. Power Energy</source> <volume>7</volume>, <fpage>376</fpage>&#x2013;<lpage>388</lpage>. <pub-id pub-id-type="doi">10.1109/oajpe.2020.3029979</pub-id>
</citation>
</ref>
<ref id="B18">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Hooshmand</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Poursaeidi</surname>
<given-names>M. H.</given-names>
</name>
<name>
<surname>Mohammadpour</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Malki</surname>
<given-names>H. A.</given-names>
</name>
<name>
<surname>Grigoriads</surname>
<given-names>K.</given-names>
</name>
</person-group> (<year>2012</year>). &#x201c;<article-title>Stochastic model predictive control method for microgrid management</article-title>,&#x201d; in <conf-name>2012 IEEE PES Innovative Smart Grid Technologies (ISGT)</conf-name>, <conf-loc>Washington, DC, USA</conf-loc>, <conf-date>16-20 January 2012</conf-date> (<publisher-name>IEEE</publisher-name>), <fpage>1</fpage>&#x2013;<lpage>7</lpage>.</citation>
</ref>
<ref id="B19">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Ji</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Niu</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Huang</surname>
<given-names>G.</given-names>
</name>
</person-group> (<year>2014</year>). <article-title>An inexact two-stage stochastic robust programming for residential micro-grid management-based on random demand</article-title>. <source>Energy</source> <volume>67</volume>, <fpage>186</fpage>&#x2013;<lpage>199</lpage>. <pub-id pub-id-type="doi">10.1016/j.energy.2014.01.099</pub-id>
</citation>
</ref>
<ref id="B20">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Jiang</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Guan</surname>
<given-names>Y.</given-names>
</name>
</person-group> (<year>2016</year>). <article-title>Data-driven chance constrained stochastic program</article-title>. <source>Math. Program.</source> <volume>158</volume>, <fpage>291</fpage>&#x2013;<lpage>327</lpage>. <pub-id pub-id-type="doi">10.1007/s10107-015-0929-7</pub-id>
</citation>
</ref>
<ref id="B21">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Kaffash</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Ceusters</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Deconinck</surname>
<given-names>G.</given-names>
</name>
</person-group> (<year>2021</year>). <article-title>Interval optimization to schedule a multi-energy system with data-driven pv uncertainty representation</article-title>. <source>Energies</source> <volume>14</volume>, <fpage>2739</fpage>. <pub-id pub-id-type="doi">10.3390/en14102739</pub-id>
</citation>
</ref>
<ref id="B22">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Khayat</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Shafiee</surname>
<given-names>Q.</given-names>
</name>
<name>
<surname>Heydari</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Naderi</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Dragi&#x10d;evi&#x107;</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Simpson-Porco</surname>
<given-names>J. W.</given-names>
</name>
<etal/>
</person-group> (<year>2020</year>). <article-title>On the secondary control architectures of ac microgrids: an overview</article-title>. <source>IEEE Trans. Power Electron.</source> <volume>35</volume>, <fpage>6482</fpage>&#x2013;<lpage>6500</lpage>. <pub-id pub-id-type="doi">10.1109/TPEL.2019.2951694</pub-id>
</citation>
</ref>
<ref id="B23">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Korda</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Gondhalekar</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Oldewurtel</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Jones</surname>
<given-names>C. N.</given-names>
</name>
</person-group> (<year>2014</year>). <article-title>Stochastic mpc framework for controlling the average constraint violation</article-title>. <source>IEEE Trans. Automatic Control</source> <volume>59</volume>, <fpage>1706</fpage>&#x2013;<lpage>1721</lpage>. <pub-id pub-id-type="doi">10.1109/TAC.2014.2310066</pub-id>
</citation>
</ref>
<ref id="B24">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lauricella</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Cai</surname>
<given-names>Z.</given-names>
</name>
<name>
<surname>Fagiano</surname>
<given-names>L.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>Day-ahead building load forecasting with a small dataset</article-title>. <source>IFAC-PapersOnLine</source> <volume>42</volume>, <fpage>13076</fpage>&#x2013;<lpage>13081</lpage>. <pub-id pub-id-type="doi">10.1016/j.ifacol.2020.12.2257</pub-id>
</citation>
</ref>
<ref id="B25">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lauricella</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Fagiano</surname>
<given-names>L.</given-names>
</name>
</person-group> (<year>2023</year>). <article-title>Day-ahead and intra-day building load forecast with uncertainty bounds using small data batches</article-title>. <source>IEEE Trans. Control Syst. Technol.</source> <volume>1</volume>, <fpage>1</fpage>&#x2013;<lpage>12</lpage>. <pub-id pub-id-type="doi">10.1109/TCST.2023.3274955</pub-id>
</citation>
</ref>
<ref id="B26">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Limon</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Alamo</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Raimondo</surname>
<given-names>D. M.</given-names>
</name>
<name>
<surname>de la Pe&#xf1;a</surname>
<given-names>D. M.</given-names>
</name>
<name>
<surname>Bravo</surname>
<given-names>J. M.</given-names>
</name>
<name>
<surname>Ferramosca</surname>
<given-names>A.</given-names>
</name>
<etal/>
</person-group> (<year>2009</year>). &#x201c;<article-title>Input-to-state stability: A unifying framework for robust model predictive control</article-title>,&#x201d; in <source>Nonlinear model predictive control: Towards new challenging applications</source> (<publisher-loc>Berlin, Heidelberg</publisher-loc>: <publisher-name>Springer Berlin Heidelberg</publisher-name>), <fpage>1</fpage>&#x2013;<lpage>26</lpage>.</citation>
</ref>
<ref id="B27">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Magni</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>De Nicolao</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Scattolini</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Allg&#xf6;wer</surname>
<given-names>F.</given-names>
</name>
</person-group> (<year>2003</year>). <article-title>Robust model predictive control for nonlinear discrete-time systems</article-title>. <source>Int. J. Robust Nonlinear Control</source> <volume>13</volume>, <fpage>229</fpage>&#x2013;<lpage>246</lpage>. <pub-id pub-id-type="doi">10.1002/rnc.815</pub-id>
</citation>
</ref>
<ref id="B28">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mayne</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Rakovi&#x107;</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Findeisen</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Allg&#xf6;wer</surname>
<given-names>F.</given-names>
</name>
</person-group> (<year>2006</year>). <article-title>Robust output feedback model predictive control of constrained linear systems</article-title>. <source>Automatica</source> <volume>42</volume>, <fpage>1217</fpage>&#x2013;<lpage>1222</lpage>. <pub-id pub-id-type="doi">10.1016/j.automatica.2006.03.005</pub-id>
</citation>
</ref>
<ref id="B29">
<citation citation-type="web">
<collab>METNorway</collab> (<year>2023</year>). <article-title>THREDDS historical weather data</article-title>. <comment>Avaliable At: <ext-link ext-link-type="uri" xlink:href="https://thredds.met.no">https://thredds.met.no</ext-link>
</comment>.</citation>
</ref>
<ref id="B30">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mirkhani</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Saboohi</surname>
<given-names>Y.</given-names>
</name>
</person-group> (<year>2012</year>). <article-title>Stochastic modeling of the energy supply system with uncertain fuel price &#x2013; A case of emerging technologies for distributed power generation</article-title>. <source>Appl. Energy</source> <volume>93</volume>, <fpage>668</fpage>&#x2013;<lpage>674</lpage>. <pub-id pub-id-type="doi">10.1016/j.apenergy.2011.12.099</pub-id>
</citation>
</ref>
<ref id="B31">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mohammadi</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Soleymani</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Mozafari</surname>
<given-names>B.</given-names>
</name>
</person-group> (<year>2014</year>). <article-title>Scenario-based stochastic operation management of microgrid including wind, photovoltaic, micro-turbine, fuel cell and energy storage devices</article-title>. <source>Int. J. Electr. Power &#x26; Energy Syst.</source> <volume>54</volume>, <fpage>525</fpage>&#x2013;<lpage>535</lpage>. <pub-id pub-id-type="doi">10.1016/j.ijepes.2013.08.004</pub-id>
</citation>
</ref>
<ref id="B32">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Niknam</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Azizipanah-Abarghooee</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Narimani</surname>
<given-names>M. R.</given-names>
</name>
</person-group> (<year>2012</year>). <article-title>An efficient scenario-based stochastic programming framework for multi-objective optimal micro-grid operation</article-title>. <source>Appl. Energy</source> <volume>99</volume>, <fpage>455</fpage>&#x2013;<lpage>470</lpage>. <pub-id pub-id-type="doi">10.1016/j.apenergy.2012.04.017</pub-id>
</citation>
</ref>
<ref id="B33">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Nowotarski</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Weron</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2018</year>). <article-title>Recent advances in electricity price forecasting: A review of probabilistic forecasting</article-title>. <source>Renew. Sustain. Energy Rev.</source> <volume>81</volume>, <fpage>1548</fpage>&#x2013;<lpage>1568</lpage>. <pub-id pub-id-type="doi">10.1016/j.rser.2017.05.234</pub-id>
</citation>
</ref>
<ref id="B34">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Parisio</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Glielmo</surname>
<given-names>L.</given-names>
</name>
</person-group> (<year>2013</year>). &#x201c;<article-title>Stochastic model predictive control for economic/environmental operation management of microgrids</article-title>,&#x201d; in <conf-name>2013 European Control Conference (ECC)</conf-name>, <conf-loc>Zurich, Switzerland</conf-loc>, <conf-date>17-19 July 2013</conf-date> (<publisher-name>IEEE</publisher-name>), <fpage>2014</fpage>&#x2013;<lpage>2019</lpage>. <pub-id pub-id-type="doi">10.23919/ECC.2013.6669807</pub-id>
</citation>
</ref>
<ref id="B35">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Parisio</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Rikos</surname>
<given-names>E.</given-names>
</name>
<name>
<surname>Glielmo</surname>
<given-names>L.</given-names>
</name>
</person-group> (<year>2014</year>). <article-title>A model predictive control approach to microgrid operation optimization</article-title>. <source>IEEE Trans. Control Syst. Technol.</source> <volume>22</volume>, <fpage>1813</fpage>&#x2013;<lpage>1827</lpage>. <pub-id pub-id-type="doi">10.1109/tcst.2013.2295737</pub-id>
</citation>
</ref>
<ref id="B36">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Parisio</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Rikos</surname>
<given-names>E.</given-names>
</name>
<name>
<surname>Glielmo</surname>
<given-names>L.</given-names>
</name>
</person-group> (<year>2016</year>). <article-title>Stochastic model predictive control for economic/environmental operation management of microgrids: an experimental case study</article-title>. <source>J. Process Control</source> <volume>43</volume>, <fpage>24</fpage>&#x2013;<lpage>37</lpage>. <pub-id pub-id-type="doi">10.1016/j.jprocont.2016.04.008</pub-id>
</citation>
</ref>
<ref id="B37">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Patrinos</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Trimboli</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Bemporad</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2011</year>). &#x201c;<article-title>Stochastic mpc for real-time market-based optimal power dispatch</article-title>,&#x201d; in <conf-name>2011 50th IEEE Conference on Decision and Control and European Control Conference</conf-name>, <conf-loc>Orlando, FL, USA</conf-loc>, <conf-date>12-15 December 2011</conf-date> (<publisher-name>IEEE</publisher-name>), <fpage>7111</fpage>&#x2013;<lpage>7116</lpage>. <pub-id pub-id-type="doi">10.1109/CDC.2011.6160798</pub-id>
</citation>
</ref>
<ref id="B38">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Prandini</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Garatti</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Lygeros</surname>
<given-names>J.</given-names>
</name>
</person-group> (<year>2012</year>). &#x201c;<article-title>A randomized approach to stochastic model predictive control</article-title>,&#x201d; in <conf-name>2012 IEEE 51st IEEE Conference on Decision and Control (CDC)</conf-name>, <conf-loc>Maui, HI, USA</conf-loc>, <conf-date>10-13 December 2012</conf-date> (<publisher-name>IEEE</publisher-name>), <fpage>7315</fpage>&#x2013;<lpage>7320</lpage>. <pub-id pub-id-type="doi">10.1109/CDC.2012.6426462</pub-id>
</citation>
</ref>
<ref id="B39">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Raimondi Cominesi</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Farina</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Giulioni</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Picasso</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Scattolini</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2018</year>). <article-title>A two-layer stochastic model predictive control scheme for microgrids</article-title>. <source>IEEE Trans. Control Syst. Technol.</source> <volume>26</volume>, <fpage>1</fpage>&#x2013;<lpage>13</lpage>. <pub-id pub-id-type="doi">10.1109/TCST.2017.2657606</pub-id>
</citation>
</ref>
<ref id="B40">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Rawlings</surname>
<given-names>J. B.</given-names>
</name>
<name>
<surname>Mayne</surname>
<given-names>D. Q.</given-names>
</name>
</person-group> (<year>2009</year>). <source>Model predictive control: Theory and design</source>. <publisher-loc>USA</publisher-loc>: <publisher-name>Nob Hill Publishing</publisher-name>.</citation>
</ref>
<ref id="B41">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Schildbach</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Fagiano</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Frei</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Morari</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2014</year>). <article-title>The scenario approach for stochastic model predictive control with bounds on closed-loop constraint violations</article-title>. <source>Automatica</source> <volume>50</volume>, <fpage>3009</fpage>&#x2013;<lpage>3018</lpage>. <pub-id pub-id-type="doi">10.1016/j.automatica.2014.10.035</pub-id>
</citation>
</ref>
<ref id="B42">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Scott</surname>
<given-names>D. W.</given-names>
</name>
</person-group> (<year>1992</year>). <source>Multivariate density estimation</source>. <publisher-loc>New York</publisher-loc>: <publisher-name>Wiley</publisher-name>. <pub-id pub-id-type="doi">10.1002/9780470316849</pub-id>
</citation>
</ref>
<ref id="B43">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Su</surname>
<given-names>W.</given-names>
</name>
<name>
<surname>Wang</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Roh</surname>
<given-names>J.</given-names>
</name>
</person-group> (<year>2014</year>). <article-title>Stochastic energy scheduling in microgrids with intermittent renewable energy resources</article-title>. <source>IEEE Trans. Smart Grid</source> <volume>5</volume>, <fpage>1876</fpage>&#x2013;<lpage>1883</lpage>. <pub-id pub-id-type="doi">10.1109/TSG.2013.2280645</pub-id>
</citation>
</ref>
<ref id="B44">
<citation citation-type="web">
<collab>TronderEnergi</collab> (<year>2021</year>). <article-title>NTNU brain AI Hackathon 2021</article-title>. <comment>Avaliable At: <ext-link ext-link-type="uri" xlink:href="https://github.com/TronderEnergi/tronderenergi-ai-hackathon-2021">https://github.com/TronderEnergi/tronderenergi-ai-hackathon-2021</ext-link>
</comment>.</citation>
</ref>
<ref id="B45">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Tsybakov</surname>
<given-names>A. B.</given-names>
</name>
</person-group> (<year>2009</year>). <source>Introduction to nonparametric estimation</source>. <publisher-loc>New York</publisher-loc>: <publisher-name>Springer</publisher-name>. <pub-id pub-id-type="doi">10.1007/b13794</pub-id>
</citation>
</ref>
<ref id="B46">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Wang</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Wang</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Liang</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Bi</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Shafie-khah</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Catalao</surname>
<given-names>J. P.</given-names>
</name>
</person-group> (<year>2021</year>). <article-title>Data-driven chance-constrained optimal gas-power flow calculation: A bayesian nonparametric approach</article-title>. <source>IEEE Trans. Power Syst.</source> <volume>36</volume>, <fpage>4683</fpage>&#x2013;<lpage>4698</lpage>. <pub-id pub-id-type="doi">10.1109/tpwrs.2021.3065465</pub-id>
</citation>
</ref>
<ref id="B47">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Wu</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Kargarian</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2023</year>). <article-title>Computationally efficient data-driven joint chance constraints for power systems scheduling</article-title>. <source>IEEE Trans. Power Syst.</source> <volume>38</volume>, <fpage>2858</fpage>&#x2013;<lpage>2867</lpage>. <pub-id pub-id-type="doi">10.1109/TPWRS.2022.3195127</pub-id>
</citation>
</ref>
<ref id="B48">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Wu</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Kargarian</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Jeon</surname>
<given-names>H. W.</given-names>
</name>
</person-group> (<year>2021</year>). <article-title>Data-driven nonparametric joint chance constraints for economic dispatch with renewable generation</article-title>. <source>IEEE Trans. Industry Appl.</source> <volume>57</volume>, <fpage>6537</fpage>&#x2013;<lpage>6546</lpage>. <pub-id pub-id-type="doi">10.1109/tia.2021.3105364</pub-id>
</citation>
</ref>
<ref id="B49">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Wu</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Mohammadi</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Mehrtash</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Kargarian</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2019</year>). &#x201c;<article-title>Non-parametric joint chance constraints for economic dispatch problem with solar generation</article-title>,&#x201d; in <conf-name>2019 IEEE Texas Power and Energy Conference (TPEC)</conf-name>, <conf-loc>College Station, TX, USA</conf-loc>, <conf-date>07-08 February 2019</conf-date> (<publisher-name>IEEE</publisher-name>). <pub-id pub-id-type="doi">10.1109/TPEC.2019.8662145</pub-id>
</citation>
</ref>
<ref id="B50">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Zhang</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Gatsis</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Giannakis</surname>
<given-names>G. B.</given-names>
</name>
</person-group> (<year>2013</year>). <article-title>Robust energy management for microgrids with high-penetration renewables</article-title>. <source>IEEE Trans. Sustain. Energy</source> <volume>4</volume>, <fpage>944</fpage>&#x2013;<lpage>953</lpage>. <pub-id pub-id-type="doi">10.1109/TSTE.2013.2255135</pub-id>
</citation>
</ref>
<ref id="B51">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Zhou</surname>
<given-names>Z.</given-names>
</name>
<name>
<surname>Cogill</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2013</year>). <article-title>Reliable approximations of probability-constrained stochastic linear-quadratic control</article-title>. <source>Automatica</source> <volume>49</volume>, <fpage>2435</fpage>&#x2013;<lpage>2439</lpage>. <pub-id pub-id-type="doi">10.1016/j.automatica.2013.03.010</pub-id>
</citation>
</ref>
</ref-list>
</back>
</article>