Online Energy Management for a Sustainable Smart Home with an HVAC Load and Random Occupancy

Online Energy Management for a Sustainable Smart Home with an HVAC Load and Random Occupancy

Liang Yu, , Tao Jiang, , and Yulong Zou, 
L. Yu and Y. Zou are with Key Laboratory of Broadband Wireless Communication and Sensor Network Technology of Ministry of Education, Nanjing University of Posts and Telecommunications, Nanjing 210003, P. R. China. (email: {liang.yu,yulong.zou}@njupt.edu.cn)
T. Jiang is Wuhan National Laboratory for Optoelectronics, School of Electronics Information and Communications, Huazhong University of Science and Technology, Wuhan 430074, P. R. China. (email: Tao.Jiang@ieee.org)
Abstract

In this paper, we investigate the problem of minimizing the sum of energy cost and thermal discomfort cost in a long-term time horizon for a sustainable smart home with a Heating, Ventilation, and Air Conditioning (HVAC) load. Specifically, we first formulate a stochastic program to minimize the time average expected total cost with the consideration of uncertainties in electricity price, outdoor temperature, renewable generation output, electrical demand, the most comfortable temperature level, and home occupancy state. Then, we propose an online energy management algorithm based on the framework of Lyapunov optimization techniques without the need to predict any system parameters. The key idea of the proposed algorithm is to construct and stabilize four queues associated with indoor temperature, electric vehicle charging, and energy storage. Moreover, we theoretically analyze the feasibility and performance guarantee of the proposed algorithm. Extensive simulations based on real-world traces show the effectiveness of the proposed algorithm.

Smart home, energy cost, thermal discomfort cost, online energy management, renewable sources, energy storage, HVAC, electric vehicle, dynamic pricing, random home occupancy, Lyapunov optimization techniques

Nomenclature

Indices

Time slot index.

Constants

Total number of time slots.

Duration of a time slot (hour).

The PV generation efficiency.

Total radiation area of solar panels ().

Factor of inertia.

Thermal conversion efficiency (heating).

Overall thermal conductivity (kW).

Time constant of system (hour).

Power rating of an HVAC system (kW).

Lower bound of comfort range ().

Upper bound of comfort range ().

Minimum outdoor temperature ().

Maximum outdoor temperature ().

Maximum charging power of the EV (kW).

Maximum queueing delay of the queue (hour).

Tolerant EV charging delay (hour)

Maximum ESS charging power (kW).

Maximum ESS discharging power (kW).

Thermal cost coefficient (RMB).

Variables

Generation output of PV panels (kW).

Solar radiation intensity (W).

Indoor temperature ().

Outdoor temperature ().

HVAC input power at slot (kW).

EV energy queue (kW).

Service rate of the queue (kW).

Arrival rate of the queue (kW).

Stored energy level of the ESS (kWh).

Purchasing/selling power of a smart home (kW).

Buying electricity price (RMB/kWh).

Selling electricity price (RMB/kWh).

Charging or discharging power of the ESS (kW).

The most comfortable temperature ().

Home occupancy state at slot .

Energy cost (RMB).

Thermal discomfort cost at slot (RMB).

Virtual queue related to indoor temperature ().

Virtual queue related to EV charging delay (slots).

Virtual queue related to ESS control (kWh).

Lyapunov function.

I Introduction

As a next-generation power system, smart grid is typified by an increased use of information and communications technology (ICT) in the generation, transmission, distribution, and consumption of electrical energy. In smart grid, there are two-way flows of electricity and information. As far as two-way information flow is concerned, consumers and utilities could exchange real-time information (e.g., electricity prices, power usages) through smart meters. Consequently, some energy management schemes could be developed to save energy cost for consumers by exploiting the temporal diversity of electricity prices[1, 2, 3]. As large electricity consumers in power grids, residential homes account for 30%-40% of the total electricity consumption in a country (e.g., about 39% in U.S.[4]). Therefore, it is of particular importance to carry out the design of efficient energy management for residential homes. In this paper, we mainly focus on the energy management of smart homes, which are evolved from traditional homes by adopting three components, namely the internal networks, intelligent controls, and home automations[5].

In a smart home, there are lots of appliances. In general, such appliances could be divided into two types, i.e., inflexible loads (e.g., lights, computers, and televisions) and flexible loads (e.g., heating, ventilation, and air conditioning (HVAC) systems, electric water heaters, electric vehicles (EVs), and washing machines). In this paper, we mainly focus on the scheduling of an HVAC system and an EV in a smart home, since HVAC systems account for about 50% electricity consumption of a smart home[4] and EV charging task represents one of the most flexible loads (i.e., deferrable and interruptible[6]). As a result, the temporal price diversity could be utilized to save energy cost. In addition, distributed generation and energy storage system are also considered in the smart home. The purpose of this paper is to minimize the sum of energy cost associated with appliances and thermal discomfort cost related to occupants in a long-term time horizon with the consideration of uncertainties in electricity price, outdoor temperature, renewable generation output, electrical demand, the most comfortable temperature level, and home occupancy state. To achieve the above aim, we first formulate a problem of minimizing the time average expected total cost for the sustainable smart home with an HVAC load. Since there are time-coupling constraints and the future system parameters are unknown, it is challenging to solve the formulated problem.

Typically, the framework of Lyapunov optimization techniques (LOT)[7] could be adopted to solve a time average optimization problem and an online energy management algorithm can be designed[8, 9]. Existing Lyapunov-based energy management algorithms intend to buffer the power demand requests of flexible loads in queues when electricity prices are high and to serve the stored requests when electricity prices are low. Different from flexible loads with specified energy/power demands (e.g., EV), an HVAC system has unknown power demand that is related to many factors, such as the most comfortable temperature level decided by occupants, the lower and upper bounds of indoor temperature, home occupancy state, and outdoor temperature. Therefore, existing Lyapunov-based energy management algorithms could not be applied to our problem directly.

To avoid knowing about an HVAC power demand when using the LOT framework, we construct a virtual queue associated with indoor temperature. By stabilizing all queues associated with indoor temperature, EV charging, and energy storage device, we design a Lyapunov-based energy management algorithm without predicting any system parameters and knowing HVAC power demand.

The main contributions of this paper are summarized as follows,

  • We formulate a time average expected total cost minimization for a smart home with an HVAC load considering uncertainties in electricity price, outdoor temperature, renewable generation output, electrical demand, the most comfortable temperature level, and home occupancy state.

  • We propose an online energy management algorithm for the formulated problem based on the LOT framework without predicting any system parameters and knowing the HVAC power demand. Moreover, we theoretically analyze the feasibility and performance guarantee of the proposed algorithm.

  • Extensive simulation results based on real-world traces show that the proposed algorithm can reduce energy cost effectively with small sacrifice in thermal comfort.

The remaining of this paper is organized as follows. Section II gives the literature review. In Section III, we describe the system model and problem formulation. Then, we propose an online algorithm to solve the formulated problem in Section IV. In Section V, we conduct extensive simulations. Finally, conclusions and future work are provided in Section VI.

Ii Literature Review

There have been many studies on investigating energy management for smart homes. In [10], Tsui et al. proposed a convex optimization framework with regularization for the home energy management, which can handle appliances with ON and OFF operational statuses. In [11], Liu et al. investigated the transformation from single-time scale into multi-time scale to reduce the computational complexity for the optimization of home energy management. In [12], Huang et al. formulated a chance-constrained programming optimization problem to minimize energy cost of appliances considering uncertainties in a smart home. In [13], Keerthisinghe et al. proposed a scheme to schedule distributed energy resources in a smart home using an approximate dynamic programming with temporal difference learning. In [14], Zhang et al. developed a learning-based demand response strategy for an HVAC system in a smart home to minimize energy cost without affecting customer’s comfort of living. In [15], Hansen et al. proposed a partially observable Markov decision process approach to minimize the energy cost in a smart home. In [16], Basit et al. designed a scheme based on Dijkstra algorithm to minimize the energy cost of all devices in a home. In [17], Deng et al. proposed a temporally-decoupled algorithm to control the indoor temperature of smart buildings with next-hour electricity price. Though some positive results have been obtained in aforementioned research efforts, they either implicitly/explicitly assume that future system parameters could be forecasted perfectly or known exactly, or require parameter forecasting.

To avoid the forecasting of system parameters, some online energy management methods have been developed based on the LOT framework[8, 19, 20, 18, 21]. In [8], Guo et al. proposed a Lyapunov-based cost minimization algorithm for multiple residential households in a smart neighborhood. In [18], Li et al. investigated the joint energy storage management and load scheduling at a residential site with renewable integration and designed a real-time solution. In [19], Yang et al. designed a cost-effective and privacy-preserving energy management strategy for smart meters by using a battery. In [20], Huang et al. presented an adaptive electricity scheduling algorithm to minimize the microgrid operation cost with the consideration of quality-of-service in electricity. In [21], Shi et al. proposed a real-time energy management strategy in microgrids considering physical constraints associated with the power distribution network. However, the above-mentioned works do not consider the online energy management for a smart home considering an HVAC system.

In [9], Fan et al. investigated the online energy management problem for a smart home with an HVAC load based on the LOT framework. Specifically, this paper intends to minimize energy cost by buffering the power demand requests of appliances in queues when electricity prices are high and serving requests when electricity prices are low. However, different from loads with specific energy/power demands (e.g., EV), an HVAC load has unknown power demand in each time slot that is related to many factors, such as the most comfortable temperature level decided by occupants, the lower and upper bounds of indoor temperature, room occupancy state, and outdoor temperature. Thus, the HVAC power demand is randomly generated in [9] and can not reflect the true demand of the HVAC system. Though the Lyapunov optimization technique is also adopted to design online energy management strategy for a smart home with an HVAC system, this paper has several aspects different from [9]: (1) by introducing a virtual queue associated with indoor temperature, our proposed algorithm operates without knowing the HVAC power demand in each time slot; (2) we jointly consider the minimization of energy cost and thermal discomfort cost; (3) random home occupancy, energy storage system, and selling electricity are jointly considered; (4) all system control parameters which affect algorithmic feasibility are explicitly derived.

Iii System Model and Problem Formulation

Fig. 1: Illustration of a smart home.

The smart home considered in this paper is shown in Fig. 1, where there are two-way communications between the smart home and the utility grid. Thus, real-time electricity price and power usage could be known by the smart home and the utility grid, respectively. In addition, the smart home could buy electricity from the utility grid and sell electricity back to the utility grid. In the smart home, some devices are connected to a low-voltage DC/AC bus for energy exchange, such as distributed generators (e.g., wind turbines or solar panels), energy storage system (ESS), home energy management system (HEMS), and loads. As the central controller of the smart home, HEMS manages the way of energy generation, storage, and consumption. Specifically, through two-way information flow, HEMS could collect system states (e.g., renewable generation output, electricity price, outdoor temperature, energy demand, and home occupancy state) and send control signals to controllable devices. As far as loads are concerned, we mainly consider flexible loads such as HVAC and EV, while the demands of other loads are satisfied by HEMS instantly and not considered in the optimization problem. In addition, HEMS operates in slotted time, i.e., , where is the total number of time slots. Moreover, the duration of a time slot is normalized to a unit time so that power and energy could be used equivalently.

Iii-a Renewable energy model

We consider the solar energy supply in the smart home. Let be the maximum generation output of photovoltaic (PV) solar panels at slot . Then, could be estimated by the following model[22], i.e.,

(1)

where denotes the PV generation efficiency, is the total radiation area of solar panels (in ), and represents the solar radiation (in ).

Iii-B Load model

Iii-B1 HVAC model

Generally, an HVAC system has two kinds of operational modes, i.e., heating and cooling. In this paper, we mainly focus on the heating mode in the winter and our designed algorithm could be extended to accommodate the cooling mode in the summer by taking the changes of equations (2) and (17)-(19) into consideration, e.g., the second “+” in (2) should be “-” when the cooling mode is considered.

According to [23], the indoor temperature dynamics caused by an HVAC system could be obtained as follows

(2)

where and denote the indoor temperature and outdoor temperature, respectively; is thermal conversion efficiency, and is the overall thermal conductivity in ; ; is the system time constant.

In this paper, we consider an HVAC system with inverter, i.e., the HVAC system can adjust its input power continuously[24]. Let be the rating power of the HVAC system, we have

(3)

For one person in the smart home, he/she would feel comfortable when the indoor temperature varies within a range, e.g., . Thus, we have the following constraints,

(4)

where and are lower and upper bounds of the comfort range, respectively.

Iii-B2 EV charging model

When an EV is connected to the DC/AC bus in the smart home, EV should send a charging request to the HEMS. To be specific, the charging request is represented by a 3-tuple (), where , and denote the starting time, completion time and energy demand, respectively. To fully utilize the temporal diversity of dynamic prices, the energy demand of the EV should be satisfied intelligently, i.e., executing charging when electricity prices are low and deferring charging process when electricity prices are high. To intelligently satisfy the energy demand of the EV without violating the completion time, we adopt an energy queue as follows,

(5)

where and are service and arrival processes of the energy queue, respectively. Since the LOT framework could transform a long-term optimization problem into many online subproblems through the queue stability control, introducing the energy queue contributes to online scheduling of EV charging as in [25].

Denote the maximum value of by , where () so that it is always possible to make the queue stable. Note that there is no need to serve the energy demand that is greater than , we have

(6)

Since the charging power of an EV is limited, the EV can add at most an energy demand to in a time slot, where denotes the maximum charging power of the EV. When , multiple time slots are needed to finish the submission of total energy demand . Similar to [25], the EV submits the energy demand at slot according to the following equation,

(7)

where .

To ensure that the average length of is finite, we have the following constraint, i.e.,

(8)

Since (8) is not enough to ensure that the charging completion time is not violated, we adopt the following constraint,

(9)

where is the maximum queueing delay of the queue ; denotes the tolerant EV charging service delay, which is equal to .

Iii-C ESS model

Let be the charging or discharging power of the ESS at slot . Then, we have

(10)

where and are maximum charging power and discharging power, respectively. Following the ESS models in [8],[20],[26], the dynamics of energy levels in the ESS could be expressed by

(11)

where represents the stored energy of the ESS at time slot . Though the ESS model with perfect charging and discharging efficiency parameters is considered in this paper, the proposed Lyapunov-based algorithm can be extended to incorporate more complex ESS models, please see [27] for details.

Since the energy level should fluctuate within a certain range, we have

(12)

where and denote the maximum and the minimum capacity of the ESS, respectively.

Iii-D Power balancing

Let be the energy transaction between the smart home and the main grid at slot . Specifically, means electricity purchasing while means electricity selling. Then, according to the real-time power balancing, we have

(13)

Iii-E Problem formulation

With the above models, the energy cost due to the electricity selling or buying is given by

(14)

where and denote the price of buying and selling electricity at slot , respectively. We assume that selling prices are not higher than purchasing prices, i.e., for all . In other words, the smart home cannot make profit by greedily purchasing energy from the utility grid and then selling it back to the utility grid at a higher price simultaneously. Such assumption is commonly made in existing works[20][28]. In addition, the intuition behind (14) is that just a variable is needed to reflect the electricity purchasing or selling. For example, when , . For the case , .

Similar to [29], we model the thermal discomfort cost of occupants at slot by

(15)

where is the cost coefficient with unit , which reflects the relative importance of discomfort cost with respect to energy cost; denotes the most comfortable level for occupants in slot (e.g., 22.5), and its value could be decided by occupants at slot . Binary variable represents the home occupancy state at time slot (“1” denotes occupancy and “0” denotes vacancy). When , would be zero since there is no occupant at home. The value of could be decided by the last occupant, who is going to leave the home at slot . If no human participation is expected, smart devices with sensors could be deployed to implement behavior awareness (e.g., leave home) and execute the corresponding operations[30].

With above-mentioned models, we formulate a problem to minimize the sum of energy cost and thermal discomfort cost as follows,

(16a)
(16b)

where denotes the expectation operator, which acts on random purchasing/selling electricity prices /, outdoor temperatures , renewable generation outputs , EV electrical demand , the most comfortable temperature level , and home occupancy state ; the decision variables of P1 are , , and .

Iv Algorithm Design

Iv-a The proposed online algorithm

There are two challenges involved in solving P1. Firstly, the constraints (2), (5), (11) introduce time couplings, which means that the current decision would affect future decisions. Secondly, future parameters are unknown, e.g., electricity prices and outdoor temperatures. To handle the “time-coupling” property, typical methods are based on dynamic programming[31], which suffers from “the curse of dimensionality” problem. Recently, the LOT framework was often adopted to deal with the above challenges[8][9]. Existing Lyapunov-based energy management algorithms intend to buffer the power demand requests of appliances (e.g., EV) in queues and to serve such requests when electricity prices are low. Different from EVs with specified energy/power demands, an HVAC load has unknown power demand in each time slot that is related to many factors, such as the most comfortable temperature level decided by occupants, the lower and upper bounds of indoor temperature, room occupancy state, and outdoor temperature. Thus, we need to redesign an algorithm to deal with the HVAC load. The key idea of the proposed algorithm is summarized as follows:

  • Constructing virtual queues associated with indoor temperature, EV charging delay and ESS.

  • Obtaining the drift-plus-penalty term according to the LOT framework.

  • Minimizing the upper bound given in the right-hand-side of the drift-plus-penalty term.

Based on the above idea, we can propose an online energy management algorithm without predicting any system parameters and knowing HVAC power demand in each time slot. Note that the purpose of constructing virtual queues is to guarantee the feasibility of constraints (4), (9), and (12). By stabilizing such queues, the proposed algorithm could operate without violating the constraints (4), (9), and (12). Specific proof can be found in Theorems 1-3.

To begin with, three mild assumptions are made about system parameters so that the system is controllable, i.e.,

(17)
(18)
(19)

where , . Note that the first assumption is very common for the heating mode in the winter since the highest temperature in the winter is always less than the comfortable temperature levels (e.g., Fig. 2(a) shows that is about , while is about 25.). In addition, the second assumption simply implies that the temperature decay can be compensated by injecting the maximum power of the HVAC system (this is required by any an HVAC system). The last assumption could also be satisfied easily in practice, e.g., when we set the parameters as follows[29][17]: , , , , , , , we have . The intuition behind (19) is that the control parameter in (33) should be greater than zero, i.e., .

Iv-A1 Constructing virtual queues

To guarantee the feasibility of (4), we define a virtual queue as a shifted version of indoor temperature as follows,

(20)

where is a constant, which is specified in the Theorem 1 of Section IV-B. Continually, the dynamics of could be obtained below,

(21)

where the above equation could be obtained by integrating (2) with (20).

In addition, to satisfy the requirement of (9), we define a delay-aware virtual queue as follows,

(22)

where ; is a fixed parameter, which represents the arrival rate of the virtual queue when the queue , while represents the service rate of . According to our previous work[3], it can be known that (9) could be guaranteed when the queues and have finite upper bounds. Moreover, the maximum queueing delay . In next section, we will show that such upper bounds indeed exist.

To guarantee the feasibility of (12), we define a virtual queue as a shifted version of ESS energy level as follows,

(23)

where is a constant, which is specified in the Theorem 3 of Section IV-B. Continually, the dynamics of is given by

(24)

Iv-A2 Obtaining drift-plus-penalty term

In addition to keeping three virtual queues stable, the actual energy queue should also be stabilized so that (8) could be satisfied. Thus, we define a Lyapunov function below,

(25)

Define , the one-slot conditional Lyapunov drift could be calculated as follows,

(26)

where the expectation is taken with respect to the randomness of electricity prices, outdoor temperatures, renewable generation output, EV charging demand, the most comfortable temperature level, and home occupancy state, as well as the chosen control decisions.

Taking (25) into consideration, we have

(27)

where . Specifically, , , , and have the following upper bounds, i.e.,

(28)
(29)
(30)
(31)

where , , , .

By adding a function of the expected total cost over one slot to (26), we can obtain the drift-plus-penalty term as follows,

(32)

where is a weight parameter that implements a tradeoff between queue stability and total cost reduction.

Iv-A3 Minimizing the upper bound

Since the main principle of the Lyapunov-based algorithm is to choose control actions that minimize the upper bound given in the right-hand-side of the drift-plus-penalty term. Then, the proposed algorithm could be described by the Algorithm 1, where P2 is a convex optimization problem with four variables and its solution could be solved efficiently using available convex methods (e.g., interior point methods) or tools (e.g., CVX). In addition, the value of with is described by for brevity. The lines 6-7 denote that the HVAC power input would be zero if the home is not occupied in the next time slot and is still greater than , which contributes to saving energy cost without affecting the thermal comfort of occupants.

1:  For each slot do
2:  At the beginning of slot , observe ,, , , , , , ;
3:  Choose , , , and as the solution to P2:
4:  (P2
5:        s.t. (3), (6), (10), (13)
6:  If and
7:        
8:  End
9:  Update , , and according to (21),(5),(22), (24);
10:  End
Algorithm 1 : Home Energy Management Algorithm

Note that updating , , and according to (21), (5), (24) means that the constraints (2), (5), (11) could be satisfied by the proposed algorithm. Moreover, (3), (6), (10), (13) are explicitly incorporated in P2. Thus, the remaining constraints (i.e., (4), (8), (9), (12)) are not considered in Algorithm 1. In the next section, we will show the feasibility of the proposed algorithm for P1 by proving that (4), (8), (9), (12) could be satisfied.

Iv-B Algorithm feasibility

Let (,,,) be the optimal solution of P2, we have the following three Lemmas and three Theorems, which show that the constraints (4), (8), (9), (12) could be satisfied by the proposed algorithm.

Lemma 1. The optimal HVAC operation decision of the proposed algorithm has the following properties, where , .

  1. If , .

  2. If , .

Proof:

See Appendix A. \qed

Based on Lemma 1, Theorem 1 could be derived as follows.

Theorem 1. If the initial temperature , the proposed algorithm with fixed parameters and would offer the following guarantee, i.e., for all time slots, where

(33)
(34)
(35)

In above formulas, , , , , , , , .

Proof:

See Appendix B. \qed

Lemma 2. The optimal EV charging decision of the proposed algorithm has the following properties:

  1. If , .

  2. If , .

Proof:

See Appendix C. \qed

Based on Lemma 2, Theorem 2 could be derived as follows.

Theorem 2 Suppose . If , the proposed online algorithm has the following properties:

  1. is bounded by , is bounded by .

  2. Maximum queueing delay

Proof:

See Appendix D. \qed

Lemma 3. The optimal ESS decision of the proposed algorithm has the following properties:

  1. If , we have .

  2. If , we have .

Proof:

See Appendix E. \qed

Based on Lemma 3, Theorem 3 could be derived as follows.

Theorem 3. If the initial energy level , the proposed algorithm with fixed parameters and would offer the following guarantee, i.e., for all slots, where

(36)
(37)
(38)
Proof:

See Appendix F. \qed

Theorems 1-3 show that the constraints (4), (8), (9), (12) could be ensured under the proposed algorithm. Since other constraints are explicitly considered in Algorithm 1, we have the conclusion that the proposed algorithm is feasible to the original problem P1. In next section, we will use real-world traces about outdoor temperature, electricity price and PV generation to test the effectiveness of the proposed algorithm.

Iv-C Performance guarantee

In this subsection, we analyze the performance guarantee of the proposed algorithm in Theorem 4.

Theorem 4. If purchasing/selling electricity prices /, outdoor temperatures , renewable generation outputs , EV electrical demand , the most comfortable temperature level , and home occupancy state are i.i.d. over slots, the proposed algorithm offers the following performance guarantee, i.e., , where is the optimal objective value of P1.

Proof:

See Appendix G. \qed

Since is a complex function of , the above optimality gap would not monotonically decreases with the increase of . Specially, when , becomes a constant. At this time, the performance of the proposed algorithm would be better given a greater . When uncertain parameters are non i.i.d over slots, performance analysis could be conducted using “multi-slot drift” in [7], which will be our future work.

V Performance Evaluation

V-a Simulation setup

The main simulation parameters are given as follows: hours, 1 hour, , for home occupancy, , [17], , , (we set ), , [28], [22], , [8], , [8], , , (the power could support the heating of a room with 136 )111http://item.gome.com.cn/A0006199221-pop8009870115.html?intcmp=list-9000000700-1_1_1. Suppose follows a uniform discrete distribution with parameters 4 and 18, EV charging time is [7pm, 6am]. Thus, we have . According to the Theorem 2, we set . In simulations, we adopt the hourly outdoor temperature data222http://data.cma.cn/ and retail electricity price data associated with the Nanjing City of China in January of 2017, which are shown in Figs. 2(a)-(b). For renewable generation information, we use the hourly solar radiation data333http://midcdmz.nrel.gov/srrl_bms/historical/ associated with the Golden city of the USA in January of 2017. Due to the lack of home occupancy traces, we adopt the sport data related to the step number in January of 2017 to approximate home occupancy states, which was collected by an iPhone automatically. To be specific, if the total step number during an hour is larger than a given threshold, the home is assumed to be unoccupied. Otherwise, the home is occupied. In this paper, we set the threshold as 1800 (i.e., 2 seconds per step)444Though the above threshold-based decision may mistake other cases (e.g., office occupancy) for home occupancy, it is still effective for the hours of sleep, e.g., 22pm-7am. and the obtained home occupancy trace is shown in Fig. 2(d).

To show the effectiveness of the proposed algorithm, three baselines are adopted as follows:

  • Baseline-1 (B1): similar to [23],[34], B1 intends to maintain the most comfortable temperature level for occupants by drawing the power when the home is occupied. When and , we set . In addition, B1 does not consider ESS and serves EV charging demand instantly.

  • Baseline-2 (B2): B2 intends to implement the temporally-decoupled algorithm as in [17] with perfect one-step price forecasting when the home is occupied, which results in an optimal HVAC control if (3) is neglected. Moreover, random occupancy is also considered in B2, i.e., when and , we set . In addition, B2 does not consider ESS and serves EV charging demand instantly.

  • Baseline-3 (B3): the proposed algorithm is equivalent to B3 when ESS control is not considered (i.e., ).

(a) Outdoor temperature
(b) Retail electricity price
(c) Solar radiation
(d) Occupancy state
Fig. 2: Random input data used in simulations.
(a) Indoor temperature (no vacancy)
(b) Indoor temperature (with vacancy)
(c) ESS energy level
(d) EV charging delay
Fig. 3: The feasibility of the proposed algorithm (given , , ).
(a) Energy cost
(b) ATD
(c) Actual temperature range
(d)
Fig. 4: The impact of (given ).
(a) Energy cost
(b) ATD
(c) Actual temperature range
(d)
Fig. 5: The impact of (given , ).
(a) Total cost
(b) Energy cost
(c) Thermal discomfort cost
(d) ATD
Fig. 6: The impact of (given ).

V-B Simulation results

V-B1 Algorithm feasibility

According to Theorems 1-3, the algorithmic feasibility of the proposed algorithm could be verified by checking the normal ranges of indoor temperature, ESS energy level, and EV charging delay. As shown in Fig. 3, indoor temperature under the proposed algorithm and ESS energy level always fluctuate within their respective normal ranges. Moreover, the maximum EV charging delay is less than . Therefore, the proposed algorithm is feasible to the original problem P1. In addition, it can be observed that B1 intends to maintain the most comfortable level when the home is occupied. When the home is unoccupied, B1 will turn off the HVAC system if that decision would not result in a temperature below in the next time slot. For B2, the increase or decrease of the indoor temperature depends on the relationship between and . When , the temperature will increase for pre-heating. Otherwise, the indoor temperature will decrease.

V-B2 The impact of

Since the proposed algorithm adjusts the HVAC power input dynamically according to the current electricity price, larger temperature range would result in lower energy cost. With the increase of , normal temperature range () decreases. Consequently, the proposed algorithm and B3 achieve higher energy cost but lower ATD (i.e., Average Temperature Deviation from the most comfortable level : , and denotes the total number of time slots with home occupancy) as shown in Fig. 4. Moreover, the proposed algorithm could reduce energy cost by 36.3% compared with B1 with small sacrifice of ATD (ATD=1.295). When , the proposed algorithm achieves lower energy cost than B3. Otherwise, B3 achieves lower energy cost than the proposed algorithm. The reason is that a small control parameter would affect the utilization of temporal price diversity as shown in [2].

V-B3 The impact of

The performance of the proposed algorithm under varying is demonstrated by Fig. 5, where the proposed algorithm generally achieves lower energy cost given a larger . The reason is that larger would result in less thermal loss given the same time horizon, which contributes to reaping the benefits of temporal price diversity under our proposed algorithm. Here, the temporal price diversity means that the proposed algorithm would increase power inputs when electricity prices are low so that power inputs associated with high electricity prices in later time slots could be reduced, resulting in lower energy cost. When , the energy cost begins to increase. The reason is that a small will lead to a small actual temperature range as shown in Fig. 5(c). Compared with B3, the proposed algorithm could reduce energy cost without the sacrifice of ATD under the given configuration. Though B2 has the lowest energy cost, its ATD is also the largest. Therefore, B2 is not necessarily the best scheme when energy cost and thermal discomfort cost are jointly considered.

V-B4 The impact of

Fig. 6 illustrates the performance of the proposed algorithm and three baselines under varying . It can be found that the proposed algorithm achieves the lowest total cost when falls within an appropriate range, e.g., (no vacancy) and (with vacancy). Specifically, when the tolerant ATD is smaller than , the proposed algorithm could achieve lower energy cost than B1 by 40.41% and 38.95% when the home is always occupied and randomly occupied, respectively. In contrast, B2 achieves the best performance in a much smaller range since its thermal discomfort cost would be the largest given a larger as shown in Fig. 6(c). When is large enough (e.g., ), B1 would achieve the best performance since the thermal discomfort cost of B1 is the smallest one and the corresponding energy cost is a constant, which are illustrated by Figs. 6(b) and (c). In summary, the proposed algorithm offers an effective way of controlling the HVAC system when home occupants care about both energy cost and thermal comfort.

Vi Conclusions and Future Work

In this paper, we investigated the energy management of a sustainable smart home with an HVAC load and random occupancy. To minimize the sum of energy cost and thermal discomfort cost in a long-term time horizon, we proposed an online energy management algorithm based on the LOT framework without predicting any system parameters. Different from existing Lyapunov-based energy management algorithms, the proposed algorithm does not require submitting unknown power demands of an HVAC system into an energy queue. Extensive simulation results based on real-world traces showed the effectiveness of the proposed algorithm. In the future, we plan to investigate the online HVAC control in a commercial building[34], e.g., how to allocate the air supply rate of every zone or room in realtime while taking thermal discomfort of occupants into consideration. Moreover, we plan to investigate the impact of HVAC load aggregation[35] in a residential building on end-user comfort, e.g., given some households enrolled in a demand response program, how to minimize the average thermal discomfort of these households without violating the total power reduction/increase requirement during a demand response event.

Appendix A Proof of Lemma 1

Proof:

Let (,,,) be the optimal solution of P2.

  1. When , suppose . To prove that the above assumption does not hold, we construct another solution (0,,,). According to power balance, we have . Let the optimal objective value of P2 be and the objective value with the new solution (0,,,) be , respectively. Then, we can compare with under different symbols of and as follows.

    • When , we have since and . Then, .

    • When and . Then, .

    • When and . Then, .

    Taking the above three cases into consideration, we have the conclusion that when .

  2. When , suppose . To prove that the above assumption does not hold, we construct another solution (,,,). According to power balance, we have . Let the optimal objective value of P2 be and the objective value with the new solution (,,,) be , respectively. Then, we can compare with under different symbols of and as follows.

    • When , we have since . Then, .

    • When and . Then, .

    • When and . Then, .

    Taking the above three cases into consideration, we have the conclusion that when .

\qed

Appendix B Proof of Theorem 1

Proof:

We will prove that the above inequalities are satisfied for all time slots by using mathematical induction method. Since , the above inequalities hold for =0. Suppose the above-mentioned inequalities hold for the time slot , we should verify that they still hold for the time slot +1. The specific proof detail is given as follows.

  • If . Then, the optimal HVAC decision is according to the Lemma 1. As a result,