Adaptive heat pump and battery storage demand side energy management

An adaptive linear model predictive control strategy is introduced for the problem of demand side energy management, involving a photovoltaic device, a battery, and a heat pump. Moreover, the heating influence of solar radiation via the glass house effect is considered. Global sunlight radiation intensity and the outside temperature are updated by weather forecast data. The identification is carried out after adapting to a time frame witch sufficiently homogeneous weather. In this way, in spite of the linearity an increase in precision and cost reduction of up to 46% is achieved. It is validated for an open and closed loop version of the MPC problem using real data of the ambient temperature and the global radiation.


Introduction
Recently, the inclusion of continuously changing electricity market price variability in predictive modelling of efficient demand side energy management including heat pump operation has been studied under the assumption of the customer's ability to shift energy load [4].In energy management using weather forecasts, model predictive control (MPC) has previously been identified as superior over non-predictive methods [3,4,12].So far, however, there has not been any work including the photovoltaic devices, the heat-pump, as well as the solar global radiation altogether in the optimization.We show that this is possible within a purely linear, adaptive MPC approach.

Previous Work related to adaptive MPC
A quickly growing body in the literature on model predictive control (MPC) has established this method as a state of the art technique to solve control problems for deterministic systems as well as systems with uncertainty showing its superiority over conventional control loop feedback mechanisms (such as PID) [10].Closed loop stability analysis has now since long been studied with MPC for non-linear systems (e.g.[13,16]).
For domestic energy management of heat energy this method has been successfully applied in both in open and closed loop instances [4,6,11].Adaptive MPC techniques, however, in which the recursive estimation procedure systematically adapts the choice of model according to some recursive strategy have only recently gained a similar amount of attention ( [7]; [10] 3.4).

Our strategy
By adopting a two-phase view of the control problem ([2], 6.1), we introduce a method solving a purely linear closed-loop optimal control problem with an adaptive strategy for the parameter estimation of the underlying dynamic constraints.More precisely, we use a linear program with cost function taking into account the return temperature together with a 'comfort-parameter' λ, and corresponding required power p with a (time-changing) cost parameter ξ.Furthermore, photovoltaic and stored electric power is included in the cost function while the battery state of charge is modelled by another linear dynamic constraint.At every instant t when an optimization is carried out, the data for the SI is used from a period starting at some suitably chosen time s in the past.Since these parameters determine the resulting optimal control (the applied power p and therefore also the temperature T), the proposed scheme solves an adaptive control problem.

Experimental setup
Our model is based on the assumption of there being a linear relationship between the return temperature and the desired room temperature.The reason is the availability of measured values of the return temperature (due to there not being any temperature sensors).Also, the room temperature would have to involve either a more sophisticated building model or more sophisticated assumptions about its role in the model.

Available Data and Consequence for Model
We are using data collected by the control unit of an end user heat pump in Austria for the return temperature, the electrical power used to drive the heat pump, and the outside   The solar global radiation data was provided by [1] from Linz (143km).While it would be more desirable to have a direct description of the dynamics of the room temperature, it is usually not available in domestic heating systems as generic temperature sensors are not standard equipment.We therefore propose a theory using the return temperature of the heater representing the global heat of the whole building: by assuming a linear relationship between the room temperature and the return temperature.
Table 1.Parameters and Variables: T, SOC and `decapitalized' powers are subject to optimization.

The linear model representing the building
Instead of using criteria for the thermal storage of the given building architecture [4] we choose a simple model of the amount of heat delivered to the building which only uses the heating system's return temperature as a general, collective measure for all the whole heat transfer into the building.Using the assumption of a linear system equation of the underlying building model, the exponential cool-off rate a will be assumed to be piece-wise constant in time.Another parameter, b, representing the linear relationship between the thermal power and the increase in return temperature (where є is the heat pump's coefficient of performance COP, which depends only on the outside temperature) is characterising the building.A third parameter ( ) describes the influence of the global solar radiation (glass house effect) on the change of the room temperature (  ′ =  ,0 ′ + ) and, in turn, on the return temperature T (under the assumption of a linear relationship between these two).This is modelled by the linear ODE with parameters a, b, c (1) We will use a discretized (difference-) equation of (1) over a suitably chosen timeinterval [ 0 , ].The block diagram (see Fig. 6) shows the two different used modes (i.openloop, and ii.closed-loop, [11]) distinguished in terms of whether the output prediction of the optimizer is used in the subsequent system identification step.In other words, the optimization results from the future is used to perform a comparison of the resulting identification of the parameters with simpler estimations.The decision variables of the optimiser (Opt) are the set of powers (battery charge/discharge and electric heat-pump power) together with the resulting state of charge (SOC) and return temperature of the heating system.Their history is also used as predictor variables in the system identification (SI) stage via (1).The prediction ̂ of the optimal powers from the optimiser yields a direct control directive for the use of battery and heat pump.Furthermore, the two modes for the usage of these two stages' output variables are: i.) Open-loop: This mode simply uses the results of the system identification estimation process to determine the optimal length of the time interval of the considered data of p, SOC and T, from the past.Statistics determining the quality of the parameter estimation, only, are used when making the decision of which past to consider.ii.) Closed-loop: In this mode, the result of the optimizer is fed back into the system identification process.The data which is used to carry out the system identification is augmented with the optimal solution, giving a new estimate of the system-parameters a, b and c.Given convergence, the iteration of this process leads to a self-consistent solution for parameters and optimal control of the heat pump and battery.We determine the advantage of using closed-loop mode by comparing the cost of the resulting strategies (the 'energy bill').

Adaption: Criteria for model selection
Adaptive MPC allows for switching adaptively to a different model during operation.In the present case, we define for each choice of a measuring procedure in the system identification there to be a corresponding (building) model.The set of considered models only differs in the domain of data on which the identification process is carried out.Data is considered only with timestamps from the interval [s, t], where t is the present moment (a fixed parameter representing the end of the domain).Therefore the model class(=: ) considered for predictions of optimal heat pump and battery usage at time t is parametrized by the variable s ranging over times up to t.We now adopt the view (Fig. 3) of there being an interval of the past [s, t] (up to the present t), and an interval of the future [t, r].Now, in order to determine the best criteria for selecting the right model at time t among the many in (with different lengths of the interval [t-s]), we use, for a given significance level α>0, the hypothesis and define the time τt (α) (in the past, i.e. before t) is the LS-estimator [14] of the parameters on the interval .The fact that are future predictions make depend on the optimal solution determined by the optimization (see Fig. 3).On the other hand, this optimal solution depends on the parameters delivered by the least square estimation carried out on .This circular dependence is the basis for the closed loop mode of the MPC problem, where an initial value for is picked by hand, when no optimal solution has yet been calculated.We are using the multivariate two-sample Hotelling test.Even though it proves useful to apply univariate two-sample tests (such as the Welch test or the t-test) for each parameter (a, b, c), separately (enabling to set separate thresholds), it is then not clear how to combine the resulting distinct time-ranges into a single choice of s.So, after choosing a level of significance for whether each multivariate parameter mean on deviates significantly from that on [t, r] (1 day), we measure the p-values from our data for every (discrete) s in a properly chosen maximal interval (three weeks) before t.A p-value smaller

Optimisation
When including the photovoltaic facility in the domestic energy model together with a battery, the relationship between the SOC and the charging power plays a role similar to that of equation ( 1), namely between the return temperature (reflecting the accumulated heat content) and the electric power used to operate the heat pump: where  1 and  2 (set to 0.9 in the experiment) are the (constant in time) degrees of efficiency of the charging and discharging module, respectively.
We formulate a linear program with an objective function with two terms, one of which realises the modelling of the heat pump and one which belongs to the battery/PV device.The decision variable into which both of these terms enter is the power   =    −    , related to charging (C) and discharging (D) the battery.We start with the balance of energy flows derived from the schema shown in Fig. 1.The power required from the grid during the i-th elementary time interval is given by ( 4) The de-capitalized letters refer to decision (optimization) variables, the capitalized ones are fixed, given functions obtained from measurements.The objective function is (5) The second term bears a new parameter, λ, which measures the amount of money the user is willing to pay for an increase of the temperature by one degree Celsius during a unit time interval (cmp.[]).In this form the problem is a mixed integer program.Considering the large number (n=96 for so many 15 min intervals per day) of degrees of freedom and the absolute value sign of the temperature term it is advisable to switch to the following linear form with two additional degrees of freedom (u and v): F(u,v) = ∑ (() + ())   subject to the following constraints u(i) ≥ ξP(i)Δp(i) and u(i) ≥ ξS(i)Δp(i) with ξP(i) the purchase prices, and ξS(i) the selling price at time i є {1, …, n}.Also, the constraints v(i) ≥ λ (T(i) -Texp(i)) and v(i) ≥ λ (Texp(i) -T(i)) hold to realise the positivity of the absolute value |Texp -T |.Other constraints include the linear system dynamics (1) and ( 3), as well as hard boundaries of the involved decision variable intervals.As an example for the sensitive nature of the optimal solution on the parameters, consider the pair of solutions in Figure 4, and 5: The return temperature is given the freedom to range between the margins of a 'rule-of-thumb' temperature (red) from a custom-set 'heat curve' H0 (pink, Fig. 4): , with margins of 2 degrees below and 4 degrees above.
4 System identification

An MPC problem in Open-loop and Closed-loop mode
After it has been established that there is high sensitivity of the optimal solution on the parameters (a,b,c), we show how (5) may become a closed-loop identification problem.The 'weather data' of the ambient temperature Ta and global radiation I is needed both in the system identification (historical data), as well as in the optimization (forecast).Once the forecast for battery and return temperature T is available, they can either be passed on to the devices as the final result (i.open-loop), or they are first reused in another SI step (ii.closed-loop).Namely, the fitting of the parameters may now occur on the extended time-interval of the historical (p,T) data together with the future interval holding the optimizer's optimal prediction (,  ̂).We now present the results for the two different modes (Fig. .5;compare with [14], Chap.13.4): i.) Open-Loop: In this case, a separate system identification process is first carried out, before the resulting parameter estimates are used for the optimal choice of power used in the heat pump and for/by the battery (the corresponding temperature and state of charge variables follow from integration of the system equations (1) and ( 3)).ii.) Closed-Loop: For each instance t for which a prediction of an optimal power and battery use over a future interval is demanded, an iterated sequence (6) of system identification and optimization stages is carried out (once with and once without I) using a `mixing parameter' q.Using the value of the objective function we break-off at step 4 of the iteration-procedure if it doesn't lead to further reduction of the cost: (6)

Results and Conclusion: Several approaches to reduce cost
For some given significance levels , we report the interval length t -τt(α) obtained from available data for a specific example.In other words we calculate the maximum number of days possible to reach back in time to perform the proposed system identification and optimization procedure without significant differences in the distribution of estimated parameters on the two intervals [s, t] and [t, r].We use our Stockerau-data for the first 3 weeks in October 2016 using the Benjamini-Hochberg [5] correction for multiple tests for (2).Our interval in the future is |r -t| = 24 hours, the forecast is made at midnight.The selling price of electrical energy into the grid is 3 Cent/Kwh.The purchasing price has been Table 2. Results of interval size  −   () (=Days, left cell) and cost reduction (right cell) for i.) open loop and ii.) closed loop mode, with global radiation (I) and without (here c=0).The percentages refer to cost reduction in comparison with the case where s is categorically chosen to be 21 (=∞, corresp.to α=0).All cost is given in Cents where λ = 0.1 Cent / (15min deg Celsius) has been used.chosen to be 20 Cent/KWh (which is the approximate effective cost at a formal advertised price of about 6 Cent/KWh).As the weather forecasts on the future interval [t, r] we use the exact values ('perfect weather forecast').As the break-off criterion of the closed-loop procedure we check if the objective function (cost) continuous to decrease.For the period of Fig. 2, triples (,   (), Cost()) with τt(α) in days, and cost-reduction in % of the  = 0 case) are given in

Figure 1 :
Figure 1: Energy flow diagram for PV, battery, heat-pump, and global solar radiation.

Figure 2 :
Figure2: Return temperature data (black) (regularization from the temperature sensor of a heat pump) and its electrical power (green).The ambient temperature (red) on the same scale as the global radiation (magenta) [1], shown as used here.Note drastic cool-off at beginning of October.The `current' moment t is the dark vertical line: 09 Oct 2016, at 00:00 a.m., moment r is 24 hours later.

Figure 3 :
Figure 3: Mutually dependent weather data and optimal solution: s depends on opt.solution and v/v.

Figure 4 :
Figure 4: End user heat pump data of return temperature, electrical power used to drive the heat pump, and ambient temperature: The solar global radiation data was provided by [1] from Linz (distance to Stockerau 143km).Left & Middle: Initial return temperatur (blue, thick line) of 28.5 deg.Celsius is increased to over 30 degrees Celsius in early morning to cope with condition of first (high) minimal heat load shortly after 20 time units.The positive surplus power (red) as a result of high global radiation (cyan) indicates ability to feed energy into the grid.Right Column: Parameter a larger by a factor of 1.2 yields increase of cost by 5.2%, as morning high minimum heat demand isn't 'overcome' by first heating up and then cooling off (while pHP =0: see blue, thin line in lower left diagram).

Figure 5 :
Figure 5: Block diagram showing the control loop with open-loop (i.) and closed-loop (ii.) mode.
Table 2 for q=0.1.As seen in Figure 2, this aligns with a strong temperature drop and decrease in global radiation around 4 October 2016.The numbers in