Abstract
To optimally control the energy storage system of the battery exposed to the volatile daily cycling load and electricity tariffs, a novel modification of a conventional model predictive control is proposed. The uncertainty of daily cycling load prompts the need to design a new cost function which is able to quantify the associated uncertainty. By modelling a probabilistic dependence among flow, load, and electricity tariffs, the expected cost function is obtained and used in the constrained optimization. The proposed control strategy explicitly incorporates the cycling nature of customer load. Furthermore, for daily cycling load, a fixed-end time and a fixed-end output problem are addressed. It is demonstrated that the proposed control strategy is a convex optimization problem. While stochastic and robust model predictive controllers evaluate the cost concerning model constraints and parameter variations. Also, the expected cost across the flow variations is considered. The density function of load probability improves load prediction over a progressive prediction horizon, and a nonlinear battery model is utilized.
TO cover the cost of daily electricity consumption worldwide, it is necessary to allocate between % and % of the annual earnings [
In [
Model predictive controllers rely on dynamic models of the process [
In the literature of end-user MPC-based battery control, a quadratic cost function is commonly accepted. The model generally used in the battery control is a state-space model. The cost function minimizes a distance between the model predictive output and a given set-point signal [
In this paper, we propose a novel globally optimal control strategy for household BESS affected by uncertain daily cycling load and electricity tariffs. Global optimality is achieved by using a new cost function that models a probabilistic dependence between flow, load and electricity tariffs. We prove that the expected value of the proposed cost function depends on the expected value of the net load and applied electricity tariffs. The electricity tariffs are modelled as a function of flow. Based on the newly proposed cost function, a novel modification of a CMPC is recommended. A horizon is of variable length since the battery usage is predominately defined by the peak load in the morning and evening. Finally, a model of a household BESS is a linear time-varying switching model since it depends on the energy flow direction. We propose a strategy that directly incorporates a switching model in the cost function. The block diagram of problem description is shown in

Fig. 1 Block diagram of problem description.
The remainder of the paper is organized as follows. In Section II, the BESS modelling is described. Section III describes the methodology of the proposed BESS control. Results are given in Section IV and conclusions are presented in Section V.
Subsystems that make up a BESS form a control unit, a communication link and a smart meter. A control unit regulates the energy stored in the batteries driven by a variable local demand and tariff rates. The existence of a communication link is assumed, across which the information about tariff changes is provided to the control unit in real time. A smart meter measures how much the energy is flowing between the power grid and a household equipped with a BESS. A simplified block diagram of the system is presented in

Fig. 2 A household with a BESS.
Based on these characteristics, a state-space model of the household BESS is given as:
(1) |
where is the instantaneous battery energy at time instance ; is a time interval during which a control signal defines the instantaneous power delivered by a converter; and is defined as:
(2) |
In this paper, the losses in a battery are defined as a function of inverter efficiency since it is possible to map all the losses at the DC side of an inverter [
(3) |
The application of complex battery models [
Constraints are imposed on , which requires that:
(4) |
Additionally, the minimum and maximum energy levels of the battery impose the constraints on acceptable values of instantaneous energy, so that the following relations can be obtained as:
(5) |
where is the contracted level of energy reserve required for bidding the BESS [
(6) |
where is a fixed end output.
From (1) and (2), it follows that the underlying model of the system in
The power flow balance of the system in
In this section, the definition and properties of a novel modification of MPC are introduced. The problem is set as a nonlinear convex optimization problem constrained with the set of inequalities and equalities.
As a convex optimization problem, MPC of the finite horizon is defined as:
(7) |
where (u) is the cost function; is the optimization (control) variable; is the convex function; and is the affine function [
(8) |
where H×H is a linear transformation; is the optimization (control) vector; and . Note that at the finite horizon , a fixed-end output at a fixed-end time can be written as:
(9) |
where is the component of at the horizon point . With the constraints satisfying the convex optimization conditions, it remains to prove that the cost function is convex as well.
Generally, the total costs are determined by electricity tariffs and customer load. The total costs on the time interval is defined as:
(10) |
where is the integrand that represents an instantaneous cost, which depends on power flow and electricity tariffs:
(11) |
where is the function of flow , which models the electricity tariff. Since the main goal is to obtain a global optimal solution, the conditions of a convex optimization need to be verified. The first step is to prove that (11) is convex.
Theorem 1: an instantaneous cost (11) is a convex function.
Proof: for any sequence of flow at time instances and set of positive constants , , function (11) can be written as:
(12) |
Assuming that for each individual flow instance, F(ti) is possible to choose its own tariff rate , so that the following can be obtained as:
(13) |
Since the inequality (13) has the form of Jensen’s inequality [
By a theorem of calculus [
Generally, could assume multiple electricity tariff rates. However, to simplify the theoretical considerations, a particular case of two electricity tariff rates is evaluated as:
(14) |
where is the feed-in tariff; and is the grid-spot tariff. The difficulty with a direct calculation of the total costs in (10) is related to the random behaviour of the load. Consequently, to optimize an integral (10), an operator of mathematical expectation needs to be applied to it. As a result, the following equation is obtained:
(15) |
where is the performance index calculated as the expected value of the total cost; and is the operator of the mathematical expectation. Interchanging the integral with the expectation is possible if and only if an integrand is bounded [
(16) |
where is defined as in (11) but computed at time . It follows that the problem of calculation of comes down to calculate the mathematical expectation of . The expected value of a function is given as:
(17) |
where is the probability density function (PDF) of a random variable . The expectation in its unfolded form is based on (4), which is given as:
(18) |
The expectation of the instantaneous cost is split into two integrals. The integrals quantify the cost of expected values of a negative and a positive power flow component. The compact form of (18) is given as:
(19) |
where is the indicator function for given condition. The expectations and depend on grid flow . In addition, based on
(20) |
where is the real-time instance at which the system variables are measured; is the simulation index denoting the MPC prediction step with respect to ; is the net load; and is the battery flow. Since is a result of the MPC algorithm from previous control period , the value of is known and fixed at a time when the integral (18) is calculated, so that the value of is fixed for the purpose of evaluation in (20). A change of variables in (18) using (20) transforms the expectations and into:
(21) |
(22) |
Given the relation (20) between random variables and , it is required to define a relation between the cumulative distribution functions (CDFs) and . The CDF of a real-valued random variable is defined as [
(23) |
From (23), it follows that the relation between PDFs for and is given by . Also, assuming that is constant and independent from , it follows from (23) that . Finally, the expressions for expected values in (24) and (26) transform to the following equation:
(24) |
(25) |
where , and are calculated as:
(26) |
(27) |
(28) |
To compute the expected values (26) and (27) and the weighting factor (28), given an arbitrary load PDF , Markov chain Monte Carlo (MCMC) methods can be used. However, in the following for the sake of computation simplicity, a random load is modelled with Gaussian distribution , where and are the parameters of Gaussian distributions.
The calculation of (19) is required in the the expected cost function (16) at every real-time instance. Based on the calculation, the optimal control action sequence of MPC is obtained. To demonstrate the advantages of the newly proposed cost function, it needs to be compared with a cost function used in a CMPC which is based on (20). Therefore, the net load is substituted with the average value of net load . This type of cost function is called the expected load cost function.
To quantify the differences between cost functions, a synthesized example is created when a sudden jump in demand happens, so that the demand is higher than the generation. In the case of expected cost function, the probabilistic net load is modelled with the Gaussian distribution with and the parameter . In the case of the expected load cost function, only the mean value is used as the predicted net load value. In both cases, the prediction horizon is hours. For the Gaussian distribution, integrals (26) and (27) can be calculated algebraically applying the following equation:
(29) |
where and are the parameters of Gaussian distribution used to calculate the expected value of the random variable X; ; and . Similarly, the integral in (28) can be calculated by:
(30) |
where . It is worth noting that the expected cost depends on two parameters and , while the expected load cost function solely depends on .
In

Fig. 3 Battery control values for expected cost and expected load cost functions.

Fig. 4 Battery energy values for expected cost and expected load cost functions.

Fig. 5 Calculation of expected cost flow.
In conclusion, waveforms of battery control signals in
In conventional MPC [
The algorithm steps are summarized in
As stated before, to increase the battery life, it is important to penalize the inflow variability. To achieve this goal, the expected cost function (16) is extended by adding a penalty term for inflows, where is a weighting factor and the negative sign makes the penalty term positive, as shown in lines 3 and 4 of
Note that the computation time of the proposed control strategy is determined by three major contributors as stated in [
The advantages of the PMPC over the CMPC are demonstrated in this section. The PMPC is based on the expected cost function and the fixed-end horizon, while the CMPC applies the expected load cost function and a fixed -hour prediction horizon. Both of them are tested using the same BESS model (1), whose parameters are summarized in
The PV generation is modelled by average daily curve [
The net load is defined as a difference between a household demand and PV generation, as shown in

Fig. 6 Daily PV generation, a household demand and net load.
The CMPC and PMPC are compared for the net load given in

Fig. 7 Control actions for CMPC and PMPC.
As a result of applying different cost functions, the obtained control sequences result in different dynamical behaviour for a household BESS. Battery energy level presented in

Fig. 8 Battery energy level for CMPC and PMPC.
The insights into predicted control sequences for both CMPC and PMPC are presented in Figs.

Fig. 9 Predicted control sequence of CMPC.

Fig. 10 Predicted control sequence of PMPC.
In

Fig. 11 Control action of CMPC for noisy generation and demand.

Fig. 12 Control action of PMPC for noisy generation and demand.
Note that the time-of-use (TOU) price and dynamic rates can be considered as well using the proposed control strategy by adapting (14). These rates are defined as the tariff pairs . The strategy operates in the same way as for the flat tariffs and avoids energy purchase during the peak time.
The last group of the results demonstrates the advantages of the newly proposed control strategy in the presence of noise, which has the standard normal distribution with standard deviation as . The assumption is that both daily PV generation and demand are affected by random interference. The random PV generation models the change of weather conditions, while the random demand models the variability of a household consumption. In order to assess the benefits of the PMPC, it is necessary to generate multiple random realizations for both the PV generation and demand. Using Monte Carlo experiments, a hundred realizations are generated and the evaluation of the CMPC and the PMPC are obtained. The battery energy level for CMPC and PMPC for noisy generation and demand is shown in

Fig. 13 Battery energy level for CMPC and PMPC for noisy generation and demand.
The benefits of PMPC with expected cost function is summarized in

Fig. 14 Benefits of PMPC with expected cost function.
The mean and standard deviations for the PMPC and are and , respectively, implying that the PMPC with the expected cost function has a smaller total cost compared with that of the CMPC with the expected load cost function.
To optimally control a household BESS, a novel modification of an MPC is proposed. A probabilistic evaluation of a new cost function incorporates the random nature of cycling customer load, intermittent nature of the PV generation and variable tariffs. The probabilistic calculation of the cost function is applied on the horizon whose length changes progressively. A progressive horizon technique includes a fixed-end time and a fixed-end output. It is shown that for such constraints defined, an optimization problem has a globally optimal solution. Economic viability of the proposed control strategy is demonstrated using Monte Carlo experiments.
Finally, the proposed control strategy enables a household daily cost reduction in the presence of electricity tariffs and an uncertain daily cycling load.
Future work will include load prediction analysis using different PDFs and their expected values. Additionally, the coordination of multiple household battery packs will be considered. Also, the application of unsupervised learning algorithms for the adaptation of load PDF will be investigated.
References
OECD. (2019, Jan.). Purchasing power parities (PPP) (indicator). [Online]. Avalable: https://data.oecd.org/conversion/purchasing-power-parities-ppp.htm [Baidu Scholar]
V. Venizelou, N. Philippou, M. Hadjipanayi et al., “Development of a novel time-of-use tariff algorithm for residential prosumer price-based demand side management,” Energy, vol. 142, pp. 633-646, Jan. 2018. [Baidu Scholar]
E. Klaassen, C. Kobus, J. Frunt et al., “Responsiveness of residential electricity demand to dynamic tariffs: experiences from a large field test in the netherlands,” Applied Energy, vol. 183, pp. 1065-1074, Dec. 2016. [Baidu Scholar]
V. Azarova, D. Engel, C. Ferner et al., “Exploring the impact of network tariffs on household electricity expenditures using load profiles and socio-economic characteristics,” Nature Energy, vol. 3, pp. 317-325, Apr. 2018. [Baidu Scholar]
G. Brusco, A. Burgio, D. Menniti et al., “The economic viability of a feed-in tariff scheme that solely rewards self-consumption to promote the use of integrated photovoltaic battery systems,” Applied Energy, vol. 183, pp. 1075-1085, Dec. 2016. [Baidu Scholar]
E. Camacho and C. Bordons, Model Predictive control. London: Springer, 2007. [Baidu Scholar]
K. Worthmann, C. M. Kellett, P. Braun et al., “Distributed and decentralized control of residential energy systems incorporating battery storage,” IEEE Transactions on Smart Grid, vol. 6, no. 4, pp. 1914-1923, Jul. 2015. [Baidu Scholar]
S. Teleke, M. E. Baran, S. Bhattacharya et al., “Rule-based control of battery energy storage for dispatching intermittent renewable sources,” IEEE Transactions on Sustainable Energy, vol. 1, no. 3, pp. 117-124, Oct. 2010. [Baidu Scholar]
A. Mahamadi and S. Sastry, “Model predictive controller for battery management systems,” in Proceedings of 2015 International Conference on Computing, Control, Networking, Electronics and Embedded Systems Engineering (ICCNEEE), Khartoum, Sudan, Sept. 2015, pp. 21-26. [Baidu Scholar]
T. G. Paul, S. J. Hossain, S. Ghosh et al., “A quadratic programming based optimal power and battery dispatch for grid-connected microgrid,” IEEE Transactions on Industry Applications, vol. 54, no. 2, pp. 1793-1805, Mar. 2018. [Baidu Scholar]
J. Lee, P. Zhang, L. K. Gan et al., “Optimal operation of an energy management system using model predictive control and gaussian process time-series modeling,” IEEE Journal of Emerging and Selected Topics in Power Electronics, vol. 6, no. 4, pp. 1783-1795, Dec. 2018. [Baidu Scholar]
E. Perez, H. Beltran, N. Aparicio et al.,“Predictive power control for PV plants with energy storage,” IEEE Transactions on Sustainable Energy, vol. 4, no. 2, pp. 482-490, Apr. 2013. [Baidu Scholar]
Z. Yu, L. Jia, M. C. Murphy-Hoye et al., “Modeling and stochastic control for home energy management,” IEEE Transactions on Smart Grid, vol. 4, no. 4, pp. 2244-2255, Dec. 2013. [Baidu Scholar]
B. Zhu, H. Tazvinga, and X. Xia, “Switched model predictive control for energy dispatching of a photovoltaic-diesel-battery hybrid power system,” IEEE Transactions on Control Systems Technology, vol. 23, no. 3, pp. 1229-1236, May 2015. [Baidu Scholar]
O. Tremblay and L. A. Dessaint, “Experimental validation of a battery dynamic model for EV applications,” World Electric Vehicle Journal, vol. 3, no. 2, pp. 289-298, Jun. 2009. [Baidu Scholar]
J. B. Copetti, E. Lorenzo, and F. Chenlo, “A general battery model for PV system simulation,” Progress in Photovoltaics: Research and Applications, vol. 1, no. 4, pp. 283-292, Apr. 1993. [Baidu Scholar]
J. F. Manwell and J. G. McGowan, “Extension of the kinetic battery model for wind/hybrid power systems,” in Proceedings of European Wind Energy Conference and Exhibition (EWEC), Thessaloniki, Greece, pp. 284-289, Jun. 1994. [Baidu Scholar]
K. Li and K. J. Tseng, “Energy efficiency of lithium-ion battery used as energy storage devices in micro-grid,” in Proceedings of IECON 2015–41st Annual Conference of the IEEE Industrial Electronics Society, Yokohama, Japan, Nov. 2015, pp. 5235-5240. [Baidu Scholar]
S. B. Peterson, J. Apt, and J. Whitacre, “Lithium-ion battery cell degradation resulting from realistic vehicle and vehicle-to-grid utilization,” Journal of Power Sources, vol. 195, no. 8, pp. 2385-2392, Aug. 2010. [Baidu Scholar]
X. Wu, X. Hu, X. Yin et al., “Optimal battery sizing of smart home via convex programming,” Energy, vol. 140, pp. 444-453, Dec. 2017. [Baidu Scholar]
L. Wang, Model Predictive Control System Design and Implementation Using MATLAB. London: Springer, 2009. [Baidu Scholar]
C. Bian, H. He, S. Yang et al., “State-of-charge sequence estimation of lithium-ion battery based on bidirectional long short-term memory encoder-decoder architecture,” Journal of Power Sources, vol. 449, p. 227558, Feb. 2020. [Baidu Scholar]
X. Hu, H. Jiang, F. Feng et al., “An enhanced multi-state estimation hierarchy for advanced lithium-ion battery management,” Applied Energy, vol. 257, p. 114019, Jan. 2020. [Baidu Scholar]
M. Merten, C. Olk, I. Schoeneberger et al., “Bidding strategy for battery storage systems in the secondary control reserve market,” Applied Energy, vol. 268, p. 114951, Jun. 2020. [Baidu Scholar]
S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge: Cambridge University Press, 2004. [Baidu Scholar]
M. J. Cloud, B. C. Drachman, and L. P. Lebedev, Inequalities With Applications to Engineering. New York: Springer International Publishing, 2014. [Baidu Scholar]
W. R. Wade, “The bounded convergence theorem,” The American Mathematical Monthly, vol. 81, no. 4, pp. 387-389, Apr. 1974. [Baidu Scholar]
G. Grimmett and D. Stirzaker, Probability and Random Processes. Oxford: Oxford University Press, 2008. [Baidu Scholar]
S. Richter, C. N. Jones, and M. Morari, “Computational complexity certification for real-time MPC with input constraints based on the fast gradient method,” IEEE Transactions on Automatic Control, vol. 57, no. 6, pp. 1391-1403, Nov. 2012. [Baidu Scholar]
T. Kerekes, R. Teodorescu, P. Rodriquez et al., “A new high-efficiency single-phase transformerless PV inverter topology,” IEEE Transactions on Industrial Electronics, vol. 58, no. 1, pp. 184-191, Jan. 2011. [Baidu Scholar]
S. Pfenninger and I. Staffell, “Long-term patterns of european pv output using 30 years of validated hourly reanalysis and satellite data,” Energy, vol. 114, pp. 1251-1265, Nov. 2016. [Baidu Scholar]
J. A. Jardini, C. M. V. Tahan, M. R. Gouvea et al., “Daily load profiles for residential, commercial and industrial low voltage consumers,” IEEE Transactions on Power Delivery, vol. 15, no. 1, pp. 375-380, Jan. 2000. [Baidu Scholar]