NREL is a national laboratory of the U.S. Department of Energy

Office of Energy Efficiency & Renewable Energy

Operated by the Alliance for Sustainable Energy, LLC

This report is available at no cost from the National Renewable Energy

Laboratory (NREL) at www.nrel.gov/publications.

Contract No. DE-AC36-08GO28308

Conference Paper

NREL/CP-5500-70492

November 2018

Stochastic Model Predictive Control for 

Demand Response in a Home Energy 

Management System

Preprint

Kaitlyn Garifi1, Kyri Baker1, Behrouz Touri2, 

and Dane Christensen3

1 University of Colorado

2 University of California

3 National Renewable Energy Laboratory

Presented at the IEEE Power and Energy Society General Meeting

Portland, Oregon

August 5-10, 2018

© 2018 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in 

any current or future media, including reprinting/republishing this material for advertising or promotional purposes, 

creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of 

this work in other works.
NREL is a national laboratory of the U.S. Department of Energy

Office of Energy Efficiency & Renewable Energy

Operated by the Alliance for Sustainable Energy, LLC

This report is available at no cost from the National Renewable Energy

Laboratory (NREL) at www.nrel.gov/publications.

Contract No. DE-AC36-08GO28308

National Renewable Energy Laboratory

15013 Denver West Parkway

Golden, CO 80401

303-275-3000 • www.nrel.gov

Conference Paper

NREL/CP-5500-70492

November 2018

Stochastic Model Predictive Control for 

Demand Response in a Home Energy 

Management System

Preprint

Kaitlyn Garifi1, Kyri Baker1, Behrouz Touri2, 

and Dane Christensen3

1 University of Colorado

2 University of California

3 National Renewable Energy Laboratory

Suggested Citation 

Garifi, Kaitlyn, Kyri Baker, Behrouz Touri, and Dane Christensen. 2018. Stochastic Model 

Predictive Control for Demand Response in a Home Energy Management System:

Preprint. Golden, CO: National Renewable Energy Laboratory. NREL/CP-5500-70492.

https://www.nrel.gov/docs/fy19osti/70492.pdf.
NOTICE

This work was authored in part by the National Renewable Energy Laboratory, operated by Alliance for Sustainable 

Energy, LLC, for the U.S. Department of Energy (DOE) under Contract No. DE-AC36-08GO28308. Funding 

provided by the U.S. Department of Energy Office of Energy Efficiency and Renewable Energy Building 

Technologies Office. The views expressed herein do not necessarily represent the views of the DOE or the U.S. 

Government. The U.S. Government retains and the publisher, by accepting the article for publication, acknowledges 

that the U.S. Government retains a nonexclusive, paid-up, irrevocable, worldwide license to publish or reproduce 

the published form of this work, or allow others to do so, for U.S. Government purposes.

This report is available at no cost from the National Renewable 

Energy Laboratory (NREL) at www.nrel.gov/publications.

U.S. Department of Energy (DOE) reports produced after 1991 

and a growing number of pre-1991 documents are available 

free via www.OSTI.gov.

Cover Photos by Dennis Schroeder: (clockwise, left to right) NREL 51934, NREL 45897, NREL 42160, NREL 45891, NREL 48097, 

NREL 46526.

NREL prints on paper that contains recycled content.
Stochastic Model Predictive Control for Demand

Response in a Home Energy Management System

Kaitlyn Garifi, Kyri Baker

University of Colorado Boulder

Boulder, CO, USA

Email: {kaitlyn.garifi;kyri.baker}@colorado.edu

Behrouz Touri

University of California San Diego

San Diego, CA, USA

Email: btouri@ucsd.edu

Dane Christensen

National Renewable Energy Laboratory

Golden, CO, USA

Email: dane.christensen@nrel.gov

Abstract—This paper presents a chance constrained, model

predictive control (MPC) algorithm for demand response (DR)

in a home energy management system (HEMS). The HEMS

optimally schedules controllable appliances given user preferences such as thermal comfort and energy cost sensitivity, and

available residentially-owned power sources such as photovoltaic

(PV) generation and home battery systems. The proposed control

architecture ensures both the DR event and indoor thermal

comfort are satisfied with a high probability given the uncertainty

in available PV generation and the outdoor temperature forecast.

The uncertainties are incorporated into the MPC formulation

using probabilistic constraints instead of computationally limiting sampling-based approaches. Simulation results for various

user preferences and probabilistic model parameters show the

effectiveness of the HEMS algorithm response to DR requests.

NOMENCLATURE

Butil DR reduction request from utility (kW)

ce Cost of Pgrid ($/kWh)

dhvac HVAC control signal (duty cycle)

E Battery state of charge (kWh)

Emax Maximum energy storage in battery (kWh)

Emin Minimum energy storage in battery (kWh)

η Battery charging/discharging efficiency

Pc Power consumed by HVAC when cooling (kW)

Pch Power injected into battery storage (kW)

Pdis Power drawn from battery storage (kW)

Pgrid Power consumed from the grid (kW)

Pmax Maximum charging/discharging power (kW)

Ppred Predicted Pgrid consumption with no DR (kW)

PPV Solar power consumed (kW)

Prad Solar Irradiance (W/m2)

Psol Available solar power (kW)

Puc Residential load from uncontrollable devices (kW)

ρDR Probability that DR request is satisfied

ρT Probability that Tin bounds are satisfied

tDR,f End time of DR period

tDR,n Time of DR notice

tDR,s Start time of DR period

Tin Indoor air temperature (◦F)

Tmax Maximum indoor air temperature (◦F)

Tmin Minimum indoor air temperature (◦F)

Tout Outdoor air temperature (◦F)

Ucurt PV curtailment (percent)

I. INTRODUCTION

Renewable energy integration into the power grid has presented new challenges due to uncertainty in weather forecasts and renewable energy generation availability. While

generation-side energy management solutions have been

widely studied to account for intermittent renewable energy

generation challenges, demand-side energy management solutions present another approach for integrating renewable

energy sources given the current power grid architecture. In

particular, residential demand-side energy management can

be used to address stable renewable energy integration since

the residential buildings account for 37.6% of total electricity

consumption in the U.S., which is more than the commercial

building, industrial building, or transportation sector [1]. Home

energy management systems (HEMS) provide demand-side

energy management by coordinating multiple residential appliances in real-time given user preferences and renewable energy

resource forecasts [2], [3]. HEMS can increase the energy

efficiency of a home by leveraging controllable residential

devices, such as heating, ventilation, and air-conditioning

(HVAC) systems, which account for over 50% of total residential load [1]. This work provides a stochastic model

predictive control (MPC) algorithm for demand response (DR)

in a HEMS that optimally coordinates home appliances and

residentially-owned generation and storage given user comfort

preferences, energy cost sensitivity, and uncertainty in available PV generation and outdoor temperature forecast.

Various HEMS architectures have been proposed for increasing residential energy efficiency [3]. Many of the control methods studied for HEMS applications also include

DR grid service capabilities such as real-time pricing and

direct load control, which encourage consumers to shift the

load of flexible devices away from peak demand periods

[2], [3]. Typically, advanced HEMS algorithms use optimization techniques such as MPC [2], [4], mixed-integer linear

programming (MILP) [5], or various artificial intelligence

techniques [3], [6], [7]. One approach to using stochastic

optimal control methods in HEMS algorithms is the use of

Monte Carlo sampling for representing uncertainties in various

parameters such as outdoor temperature and renewable energy

source generation [8], which is computationally restrictive.

Another approach for incorporating uncertainty in HEMS

algorithms is using the Markov chain modeling framework

[9]. To include probabilistic models in a HEMS algorithm,

we propose a chance constrained MPC-based optimization

formulation. Chance constrained optimization has been used

to incorporate uncertainty in renewable energy generation

into optimal energy storage sizing problems [10] and AC

optimal power flow problems [11]. Chance constrained MPC

has also been used to include uncertainty in weather forecasts

for energy efficient HVAC system usage in buildings [12].

1

This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications.
Fig. 1. Overall HEMS control and data schematic.

Chance constrained optimization for a HEMS has been used

to incorporate uncertainty in dynamic pricing and system loads

[13]. However, in this work we use a chance constrained MPCbased HEMS to incorporate uncertainty in the weather forecast

and renewable energy generation while ensuring both the DR

request and users’ thermal preferences are satisfied with high

probability.

In this work, we provide a chance constrained MPC algorithm for a HEMS capable of satisfying grid DR requests

where usage of flexible (i.e. controllable) devices, such as

HVAC systems, are shifted away from peak demand periods

on the power grid. We assume the DR event is communicated

to the HEMS before the DR period begins in the form of a

request for some amount of grid power reduction Butil relative

to amount of grid power the HEMS predicts the home requires

during the DR period. We consider a HEMS that coordinates

a residentially-owned PV array and battery storage system,

an HVAC system, and uncontrollable devices to satisfy the

DR event while ensuring user thermal comfort. Uncontrollable

residential devices include lighting, television, and plug loads,

which we assume cannot be controlled with a HEMS. The

chance constraints in the HEMS algorithm are used to ensure

that both the DR reduction request and the users’ thermal

comfort are satisfied with high probability given uncertainty in

available PV power and outdoor air temperature. An overview

of the considered HEMS system is shown in Fig. 1.

The rest of this paper is organized as follows: Section II

provides the mathematical formulation of the HEMS device

models and chance constraints for modeling uncertainty in PV

generation and outdoor air temperature forecast. In Section III,

we provide the overall stochastic MPC HEMS optimization

problem. The simulation results of the proposed HEMS algorithm are provided in Section IV. In Section V, conclusions on

the effectiveness of the proposed stochastic MPC-based HEMS

algorithm are discussed, as well as areas of future work.

II. RESIDENTIAL DR CONTROL STRUCTURE

In this section, the mathematical models for the indoor air

temperature dynamics and residential devices are provided.

In this work, we assume that the HEMS must coordinate

the HVAC system, the residential PV generation, the battery

storage system, uncontrollable loads, and any additional power

needed from the grid to satisfy the load. The chance constraint

formulations for incorporating the uncertainty in PV generation PPV and outdoor air temperature Tout are also provided.

The temporal index is denoted with the superscript (t).

A. HEMS Device Models

The residential indoor temperature model, coupled with the

HVAC model and thermal comfort preferences, is given by the

following dynamic equations:

T

(t+1)

in = T

(t)

in + β1(T

(t)

out − T

(t)

in ) − β2d

(t)

hvac + β3P

(t)

rad, (1)

Tmin ≤ T

(t+1)

in ≤ Tmax, (2)

where d

(t)

hvac ∈ [0, 1] is the HVAC duty cycle, β1 represents

the building envelope, β2 is the cooling gain, and β3 is the

solar gain. The residential PV system model is given by

P

(t)

PV = (1 − U

(t)

curt)P

(t)

sol , (3)

where Ucurt ∈ [0, 1] is the fraction of available PV generation

that is curtailed, and P

(t)

sol is a function of the solar irradiance,

array size, and array efficiency.

The residential battery storage system state of charge (SOC)

and power charged/discharged are modeled by the following:

E

(t+1) = E(t) + ηP(t)

ch ∆t −

1

η

P

(t)

dis∆t, (4)

Emin ≤ E

(t+1) ≤ Emax, (5)

0 ≤ P

(t)

dis , P(t)ch ≤ Pmax, (6)

where Emin and Emax are 15% and 85% of the rated energy

storage capacity, respectively, which limits battery degradation

when operating in this region [14]. From the structure of this

problem, it is assumed the optimization will not find it optimal

for the battery to charge and discharge simultaneously. This

simplification can be addressed with MILP or including the

constraint P

(t)

ch P

(t)

dis = 0. While the constraint is not included

in this work, we have confirmed that for all simulation results

provided in Section IV, the battery does not simultaneously

charge and discharge.

The overall power balance in a home is given by the

following equation:

0 = −P

(t)

grid + P

(t)

load − P

(t)

PV + P

(t)

ch − P

(t)

dis , (7)

where the total power demand for a home is given by

P

(t)

load = P

(t)

uc + Pcd

(t)

hvac. The total HVAC load is given by

P

(t)

hvac = Pcd

(t)

hvac.

B. Inclusion of Uncertainty

Chance constraints are introduced into the problem to ensure

both the DR request is satisfied and the user thermal comfort

is maintained with high probability given uncertainty in forecasting errors in weather parameters that dictate available PV

power and the indoor air temperature. First, we will focus on

the constraint that ensures the DR reduction request is satisfied

with probability ρDR, which is given by the following:

Pr 

tDRP,f

t=tDR,s

P

(t)

pred −

tDRP,f

t=tDR,s

P

(t)

grid ≥ Butil!

≥ ρDR, (8)

2

This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications.
where the actual grid power consumed P

(t)

grid is dependent on

the power balance equation in (7). The available PV power

can be represented as P

(t)

PV = P

(t)

f + P

(t)

err , where P

(t)

f

and

P

(t)

err are the solar forecast and solar forecast error at time

t, respectively. We assume the solar forecast error P

(t)

err is

Normally distributed P

(t)

err ∼ N (μ

(t)

Perr

, σ

2(t)

Perr

) and P

(t)

err are

independent. Then, we obtain the following for P

(t)

grid in (8):

P

(t)

grid = Pcd

(t)

hvac + P

(t)

uc + P

(t)

ch − P

(t)

dis − P

(t)

f − P

(t)

err . (9)

Notice that the sum of Normally distributed forecast errors

will result in another Normally distributed random variable

denoted Perr ∼ N (μP , σP ) where μP =

PtDR,f

t=tDR,s

μ

(t)

Perr

and

σ

2

P =

PtDR,f

t=tDR,s

σ

2(t)

Perr

. Then we can write the constraint in (8)

that ensures DR is met with probability ρDR as the following:

Pr(XP ≤ 0) ≥ ρDR. (10)

where P

(t)

grid is given in (9) and XP is given by:

XP =

tDRP,f

t=tDR,s

P

(t)

grid + Butil −

tDRP,f

t=tDR,s

P

(t)

pred.

Since Perr is Normally distributed, XP is also Normally

distributed with the following mean μ and variance σ:

μ =

tDRP,f

t=tDR,s

(Pcd

(t)

hvac + P

(t)

uc + P

(t)

ch − P

(t)

dis − P

(t)

f

) − μP

+ Butil −

tDRP,f

t=tDR,s

P

(t)

pred,

σ = σP .

The chance constraint in (10) can be written as:

Pr(XP ≤ 0) = Φ 

0−μ

σ



≥ ρDR, (11)

where Φ(·) is the CDF of the Normal distribution N (0, 1).

The chance constraint that ensures the DR request is satisfied

with a high probability is obtained by taking the inverse CDF

of both sides of (11), which is given by:

tXDR,f

t=tDR,s

P

(t)

pred −

tXDR,f

t=tDR,s

(Pcd

(t)

hvac +P

(t)

uc +P

(t)

ch −P

(t)

dis −P

(t)

f

)

+ μP − Butil ≥ Φ

−1

(ρDR)σP . (12)

Next, we provide the mathematical formulation for the

chance constraints that ensure the users’ thermal comfort

preferences are satisfied with a high probability during the DR

period given uncertainty in the outdoor temperature. Given

the thermal comfort bounds in (2), the constraints requiring

that the thermal comfort bounds are satisfied with at least

probability ρT during the DR period are as follows:

Pr(Tmin ≤ T

(t+1)

in ) ≥ ρT , (13)

Pr(T

(t+1)

in ≤ Tmax) ≥ ρT . (14)

For the probabilistic equation in (13), let the outdoor temperature be written in terms of the forecasting error: T

(t)

out =

T

(t)

f +T

(t)

err , where T

(t)

f

is the forecast outdoor temperature and

T

(t)

err is the outdoor temperature forecast error. The outdoor

temperature forecast error is assumed to be Normally distributed T

(t)

err ∼ N (μ

(t)

T

, σ

2(t)

T

) [15]. With similar analysis, we

obtain the following constraint that ensures the users’ thermal

comfort lower bound in (13) is satisfied with probability T :

(1 − β1)T

(t)

in + β1(T

(t)

f + μ

(t)

T

) − β2d

(t)

hvac + β3P

(t)

rad − Tmin

≥ −Φ

−1

(ρT )β1σ

(t)

T

. (15)

Similarly, the chance constraint for the thermal comfort upper

bound in (14) is obtained

Tmax − (1 − β1)T

(t)

in − β1(T

(t)

f + μ

(t)

T

) + β2d

(t)

hvac − β3P

(t)

rad

≥ Φ

−1

(ρT )β1σ

(t)

T

. (16)

III. STOCHASTIC MPC FORMULATION FOR HEMS

In this section, we provide the overall chance constrained

MPC optimization problem for the HEMS. The following objective function is minimized at each step of the optimization:

fcost(t, {x

(t)

, u

(t)

}

Nh

t=1) = X

Nh

t=1

(ceP

(t)

grid + P

(t)

sol U

(t)

curt),

where Nh denotes the prediction horizon, the optimization decision variables at each time t are collected in the vector u

(t) =

[P

(t)

grid, U(t)

curt, d(t)

hvac, P(t)ch , P(t)dis ], and the state variables at each

time t are collected in the vector x

(t) = [T

(t)

in , E(t)

, P(t)

PV]. The

overall chance constrained convex optimization problem is the

following:

min

{x(t),u(t)}

Nh

t=1

fcost(t, {x

(t)

, u

(t)

}

Nh

t=1) (17)

subject to

0 ≤ P

(t)

grid ∀t, (18)

0 ≤ U

(t)

curt ≤ 1 ∀t, (19)

P

(t)

PV = (1 − U

(t)

curt)P

(t)

sol ∀t, (20)

0 ≤ d

(t)

hvac ≤ 1 ∀t, (21)

T

(t+1)

in = T

(t)

in + β1(T

(t)

out − T

(t)

in ) − β2d

(t)

hvac + β3P

(t)

rad

∀t ∈ [1, . . . , Nh − 1], (22)

Tmin ≤ T

(t+1)

in ≤ Tmax ∀t /∈ [tDR,s, tDR,f], (23)

Tmax − (1 − β1)T

(t)

in − β1(T

(t)

f + μ

(t)

T

) + β2d

(t)

hvac

− β3P

(t)

rad ≥ Φ

−1

(ρT )β1σ

(t)

T ∀t ∈ [tDR,s, tDR,f], (24)

(1 − β1)T

(t)

in + β1(T

(t)

f + μ

(t)

T

) − β2d

(t)

hvac + β3P

(t)

rad

− Tmin ≥ −Φ

−1

(ρT )β1σ

(t)

T ∀t ∈ [tDR,s, tDR,f], (25)

P

(t)

grid + P

(t)

PV + P

(t)

dis = P

(t)

uc + Pcd

(t)

hvac + P

(t)

ch ∀t, (26)

E

(t+1) = E(t) + ηP(t)

ch ∆t −

1

η ∆tP(t)

dis ∀t ∈ [1, . . . , Nh − 1], (27)

Emin ≤ E

(t+1) ≤ Emax ∀t ∈ [1, . . . , Nh − 1], (28)

0 ≤ P

(t)

dis ≤ Pmax ∀t, (29)

0 ≤ P

(t)

ch ≤ Pmax ∀t, (30)

tXDR,f

t=tDR,s

P

(t)

pred − Butil −

tXDR,f

t=tDR,s

P

(t)

grid + μP

≥ Φ

−1

(ρDR)σP ∀t ∈ [tDR,n, tDR,f]. (31)

3

This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications.
IV. SIMULATIONS: LOAD SHEDDING IN SUMMER

To demonstrate the effectiveness of the proposed HEMS

algorithm in (17)-(31), we provide simulation results for DR

during a summer afternoon for two different houses. The

MATLAB-based modeling system for solving disciplined convex programs, CVX, is used in this work. For all simulations,

we assume the DR notice is received by the HEMS 2 hours

before the start of the summer load reduction DR event from

4pm to 6pm, and the DR reduction request needs to be satisfied

with probability ρDR = 95% while maintaining the thermal

comfort bounds with probability ρT = 95%. The preferred

indoor thermal comfort band is 68◦F ≤ T

(t)

in ≤ 72◦F from

9am to 5pm and restricted to 69◦F ≤ T

(t)

in ≤ 71◦F otherwise

when the residence is assumed to be occupied. The simulation

has a 24 hour prediction horizon with 1 hour time intervals.

The device models for both houses are assumed to have the

same parameters. The residential PV array size is 20m2 with

a tilt of 30◦and an efficiency of 16%. The 5-kWh residential

battery system is restricted to 15% to 85% of the maximum

SOC to preserve the battery lifetime [14]. The battery inverter

power limit is 3 kW with an inverter efficiency of 95%. The

battery charging/discharging efficiency η is 95%. The power

consumption of the HVAC when cooling Pc is 3 kW. The

cost of energy from the grid is assumed to be a flat rate of

$0.11/kWh. The outdoor air temperature and solar irradiance

forecasts were obtained from NOAA USCRN data [16].

A. Simulation Results

The proposed HEMS algorithm is simulated for two homes,

denoted House 1 and House 2, which have different house

model parameters and are given in Table I. The model parameters are designed such that House 2 is a less-insulated

version of House 1 and has a less efficient HVAC cooling

system. The initial battery SOC is 1.5 kWh and initial indoor

temperature is 73◦F for both homes. The simulation results

for House 1 are shown in Figs. 2 and 3 for a DR reduction request Butil = 0.75 kW with uncertainty in available

PV σP = 0.5 kW and uncertainty in the outdoor forecast

σT = 6◦F. From Fig. 2, we can see that the battery only

charges when the available PV power exceeds the base load of

the home, and is discharging (supplying power to the home)

otherwise. During the DR notice period, the Pgrid usage is

greater than the predicted grid usage without DR Ppred to

account for pre-cooling before the DR event. During the DR

period, the HEMS reduces grid power usage of House 1 by

leveraging the stored energy in the battery system. The indoor

air temperature T

(t)

in stays within the preferred thermal comfort

band throughout the simulation, as shown in Fig. 3 (top). The

battery SOC is shown in Fig. 3 (middle), which highlights the

usage of energy stored in the battery during the DR period.

The battery behavior is included in Fig. 3 (bottom) to show

there is no simultaneous battery charging and discharging.

Additional simulation results for both houses with varying

DR requests Butil and uncertainties σP and σT are given in

Table II. Let BH1 and BH2 denote the actual reduction in grid

TABLE I

HOUSE MODEL PARAMETER VALUES FOR HOUSE 1 AND HOUSE 2.

Parameter House 1 House 2

β1 0.03 0.035

β2 4 3

β3 0.000163 0.000326

Fig. 2. Power profiles for House 1 with proposed HEMS algorithm responding

to a summer load reduction DR event of Butil = 0.75 kW with uncertainty

σP in available PV forecast and σT in outdoor air temperature forecast. The

battery is discharging when Pbatt < 0 and charging when Pbatt > 0. The

HEMS predicted grid power usage is given by Ppred. The actual grid power

usage in the case of a DR event is denoted Pgrid.

Fig. 3. Simulation of House 1 with proposed HEMS algorithm responding to

a summer load reduction DR event of Butil = 0.75 kW with uncertainty σP

in available PV forecast and σT in outdoor air temperature forecast. Indoor

air temperature Tin (top). The outdoor air temperature forecast Tfis shown

for reference. Residential battery system SOC (middle). Battery charging and

discharging behavior (bottom).

power usage that House 1 and House 2 were able to achieve,

respectively. From Table II, we can see that the BH1 and BH2

increase as the uncertainty in the solar forecast increases. For

House 1 with constant σP , as the uncertainty in the outdoor

air temperature forecast increases, BH1 decreases since more

energy is required to maintain the indoor house temperature.

For the simulation of House 2 with constant σP , in some cases

the HEMS does not need to compensate further as σT varies

since the uncertainty in the available PV is more restrictive.

House 1 is able to achieve grid power usage reduction greater

than or equal to the reduction achieved by House 2 due to

the increased cooling efficiency and lower building envelope

coefficient of House 1 relative to House 2.

B. Chance Constraint Validation

Monte Carlo simulations were conducted to validate that

the chance-constrained optimization solutions actually satisfy

4

This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications.
TABLE II

ADDITIONAL HEMS ALGORITHM SIMULATION RESULTS.

σP (kW) σT (

◦F) Butil (kW) BH1 (kW) BH2 (kW)

0.25 3 0.5 0.9443 0.9172

0.25 6 0.5 0.9392 0.9139

0.5 3 0.5 1.3379 1.3224

0.5 6 0.5 1.3348 1.3224

0.25 3 0.75 1.1836 1.1626

0.25 6 0.75 1.1787 1.1612

0.5 3 0.75 1.5802 1.5724

0.5 6 0.75 1.5771 1.5724

TABLE III

MONTE CARLO SIMULATIONS FOR CHANCE CONSTRAINT VALIDATION.

Constraint House 1 House 2

BH ≥ Butil 95.28% 95.16%

Tmin ≤ T

(17)

in ≤ Tmax 95.16% 95.2%

Tmin ≤ T

(18)

in ≤ Tmax 95.24% 95.4%

the DR request with probability ρDR = 95% and the thermal

comfort bounds are satisfied with probability ρT = 95%.

Monte Carlo simulations use the chance-constrained optimal

solution and solar forecast error and outdoor temperature forecast error sampled randomly from their respective distributions

to check that constraints in (2) and (8) are satisfied. Using 5000

Monte Carlo simulations for validating the HEMS solutions

for both House 1 (shown in Figs. 2 and 3) and House 2

with the same simulation parameters, it is confirmed that the

chance constrained optimal solution satisfies the constraints

in (2) and (8), which is shown in Table III. The percentages in Table III represent the empirical distributions of the

Monte Carlo simulations that satisfy the DR request in (8)

and temperature bounds in (2) during the DR period. Thus,

in view of Table III, the Monte Carlo simulations validate

that the solution obtained with the chance constrained MPC

optimization problem ensures the DR request and temperature

bounds are satisfied with probability ρDR and ρT , respectively.

V. CONCLUSION

A chance-constrained MPC-based algorithm is proposed for

a HEMS capable of responding to grid DR events. Chance

constraints were incorporated into the optimization problem

to ensure the DR request and home temperature preferences

are satisfied with a high probability given uncertainty in both

the solar and outdoor temperature forecasts. The chance constrained optimization solution was validated with Monte Carlo

simulations. Simulation results show the proposed HEMS

algorithm responded to the DR request by coordinating flexible

devices during the DR notice period prior to DR event.

Future work includes validating the proposed HEMS on

hardware in the loop testbeds such as Foresee [2]. Additionally,

incorporating other flexible loads such as a dishwasher, water

heater, and electric vehicles (EVs) into the proposed HEMS

framework may allow for further load flexibility during the

DR notice and DR event period to ensure both the DR request

and users’ thermal comfort are satisfied with a high probability

given uncertainties in PV availability and outdoor temperature.

Further work on a stochastic HEMS algorithm also includes

incorporating uncertainty in home occupancy schedules, which

is not effectively modeled by a Gaussian distribution in the

chance constraint formulation. While we assume the random

variables in this work are Normally distributed, the use of

chance constraints can be extended to non-Gaussian distributions using existing techniques in the literature [11].

ACKNOWLEDGMENT

This work was supported in parts by the ESIF Summer

Graduate Internship Program at NREL, US Department of

Energy Building Technologies Office, Bonneville Power Administration, and the Air Force Office of Scientific Research

under the AFOSR-YIP award FA9550-16-1-0400.

REFERENCES

[1] U.S. Department of Energy, Office of Energy Efficiency and Renewable

Energy, “Buildings Energy Data Book,” 2012.

[2] X. Jin, K. Baker, D. Christensen, and S. Isley, “Foresee: A user-centric

home energy management system for energy efficiency and demand

response,” Applied Energy, vol. 205, pp. 1583 – 1595, 2017.

[3] B. Zhou, W. Li, K. W. Chan, Y. Cao, Y. Kuang, X. Liu, and X. Wang,

“Smart home energy management systems: Concept, configurations,

and scheduling strategies,” Renewable and Sustainable Energy Reviews,

vol. 61, pp. 30–40, 2016.

[4] C. Chen, J. Wang, Y. Heo, and S. Kishore, “MPC based appliance

scheduling for residential building energy management controller,” IEEE

Trans. Smart Grid, vol. 4, no. 3, pp. 1401–1410, 2013.

[5] Z. Bradac, V. Kaczmarczyk, and P. Fiedler, “Optimal scheduling of

domestic appliances via MILP,” Energies, vol. 8, no. 1, pp. 217–232,

2014.

[6] D. Zhang, S. Li, M. Sun, and Z. O’Neill, “An optimal and learningbased demand response and home energy management system,” IEEE

Trans. Smart Grid, vol. 7, no. 4, pp. 1790–1801, 2016.

[7] Y. Du, L. Jiang, Y. Li, and Q. Wu, “A robust optimization approach

for demand side scheduling under energy consumption uncertainty of

manually operated appliances,” IEEE Trans. Smart Grid, 2017, to be

published.

[8] H. Wu, A. Pratt, and S. Chakraborty, “Stochastic optimal scheduling of

residential appliances with renewable energy sources,” in IEEE Power

& Energy Society General Meeting, 2015, pp. 1–5.

[9] X. Wu, X. Hu, S. Moura, X. Yin, and V. Pickert, “Stochastic control

of smart home energy management with plug-in electric vehicle battery

energy storage and photovoltaic array,” Journal of Power Sources, vol.

333, pp. 203–212, 2016.

[10] K. Baker, G. Hug, and X. Li, “Energy storage sizing taking into account

forecast uncertainties and receding horizon operation,” IEEE Trans.

Sustain. Energy, vol. 8, no. 1, pp. 331–340, Jan 2017.

[11] E. Dall‘Anese, K. Baker, and T. Summers, “Chance-constrained AC

optimal power flow for distribution systems with renewables,” IEEE

Trans. Power Syst., vol. 32, no. 5, pp. 3427–3438, Sept 2017.

[12] F. Oldewurtel, A. Parisio, C. N. Jones, D. Gyalistras, M. Gwerder,

V. Stauch, B. Lehmann, and M. Morari, “Use of model predictive control

and weather forecasts for energy efficient building climate control,”

Energy and Buildings, vol. 45, pp. 15 – 27, 2012.

[13] Y. Huang, L. Wang, W. Guo, Q. Kang, and Q. Wu, “Chance constrained

optimization in a home energy management system,” IEEE Trans. Smart

Grid, 2017, to be published.

[14] E. Raszmann, K. Baker, Y. Shi, and D. Christensen, “Modeling stationary lithium-ion batteries for optimization and predictive control,” in

2017 IEEE Power and Energy Conf. at Illinois (PECI), 2017, pp. 1–7.

[15] L. J. Wilson, W. R. Burrows, and A. Lanzinger, “A strategy for

verification of weather element forecasts from an ensemble prediction

system,” Monthly Weather Review, vol. 127, no. 6, pp. 956–970, 1999.

[16] H. Diamond, T. Karl, M. Palecki, C. Baker, J. Bell, R. Leeper, D. Easterling, J. Lawrimore, T. Meyers, M. Helfert, G. Goodge, and P. Thorne,

“2013: U.S. climate reference network after one decade of operations:

status and assessment,” Bull. Amer. Meteor. Soc., vol. 94, pp. 489–498,

2013.

5

This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications.