Stochastic Optimal Energy Management of Smart Home with PEV Energy Storage

Xiaohua Wu, Xiaosong Hu, Member, IEEE, Xiaofeng Yin, Member, IEEE, Scott J. Moura, Member, IEEE

Abstract—This paper proposes a stochastic dynamic program- Rint The internal resistance ming framework for the optimal energy management of a smart S The PEV state home with plug-in electric vehicle (PEV) energy storage. This SOC The battery state-of-charge work is motivated by the challenges associated with intermit- max tent renewable energy supplies and the local energy storage SOC The maximal SOC min opportunity presented by vehicle electrification. This paper seeks SOC The minimal SOC min to minimize electricity ratepayer cost, while satisfying home SOCc The constant minimal SOC power demand and PEV charging requirements. First, various SOCg The sample values from the discretized set of feasible operating modes are defined, including vehicle-to-grid (V2G), SOC values vehicle-to-home (V2H), and grid-to-vehicle (G2V). Second, we use equivalent circuit PEV battery models and probabilistic SOCh The sample values from the discretized set of feasible models of trip time and trip length to formulate the PEV to SOC values smart home energy management stochastic optimization problem. SOCinit The initial SOC Finally, based on time-varying electricity price and time-varying SOCpi The SOC at plugging-in time home power demand, we examine the performance of the three SOC The SOC at plugging-out time operating modes for typical weekdays. po Index Terms—Vehicle to Grid, Energy Management, Stochastic ta The plugging-in time Dynamic Optimization, Smart Home, Plug-in Electric Vehicle. td The plugging-out time Voc The open circuit voltage NOMENCLATURE I.INTRODUCTION ∆t The time-step A. Motivation and Background c The time-varying electricity price d The trip distance PEV energy storage provides a compelling opportunity to address several challenges for the security and economic sus- Eff The overall electric drive efficiency I Current tainability of our energy supply [1]. These challenges include Imax The maximal current renewable energy integration, distributed energy resources, Imin The minimal current resilience during natural/man-made disasters (e.g. the tsunami- min induced Fukushima nuclear meltdown), and rapidly evolving Ibat The physical limits of battery discharging current k Time index markets for demand-side management. If left unmanaged, however, PEVs can exacerbate peak loads and overstress local mhg The probability that pluggging-in SOC SOCpi = distribution circuits, resulting in less stable electricity supply SOCh, given plugging-out SOC SOCpo = SOCg p The transition probability of plugging-out and higher costs ultimately passed on to the consumer. As a consequence, researchers have recently focused on developing Pbatt The PEV battery power effective control strategies for integrating PEVs into building Pdem The power demand of the house loads and the grid. Pgrid The electric power from the grid q The transition probability of plugging-in B. Literature Review Q The charge capacity cap Researchers have examined PEV charging schedule designs Q The energy capacity eap for objectives such as ancillary services, frequency regulation, Corresponding authors. X. Wu and X. Hu equally contributed to this work. battery health, and effective utilization of renewable energy. X. Wu is with School of Automobile and Transportation, Xihua University, The application of aggregators to frequency regulation by , 610039, . She was with Energy, Controls, and Applications making fair use of PEVs’ energy storage capacity is addressed Laboratory, University of California, Berkeley, CA 94720, USA. (e-mail: [email protected]). in [2], [3]. Vehicle to Grid (V2G) ancillary services, such X. Hu is with the State Key Laboratory of Mechanical Transmissions as load regulation and spinning reserves are studied in [4] and with the Department of Automotive Engineering, Chongqing University, by incorporating probabilistic vehicle travel models, time Chongqing 400044, China. He was with Energy, Controls, and Applications Laboratory, University of California, Berkeley 94720, California, USA. (E- series pricing, and reliability. The cost of PEV battery wear mail: [email protected]). due to V2G applications is presented in [5], [6]. Renewable X. Yin is with School of Automobile and Transportation, Xihua University, integration is considered in [7], which derives optimal PEV Chengdu, 610039, China. (e-mail: [email protected] ). S. J. Moura is with Energy, Controls, and Applications Laboratory, Univer- charging schedules based on predicted photovoltaic output and sity of California, Berkeley, CA 94720, USA. (e-mail: [email protected]). electricity consumption. The literature provides various V2G energy management approaches [8], [9], which can be generally categorized into linear programming (LP) [10], [11], dynamic programming (DP) [12]–[14], convex programming (CP) [15], [16], model predictive control (MPC) [17], and game theoretic approaches [18], [19]. An optimal centralized scheduling method to jointly control home appliances and PEVs is constructed as a mixed integer linear program (MILP) in [11]. A globally optimal and locally optimal scheduling scheme for EV charging and discharging are proposed using convex optimization in [16]. Energy management system for smart grids with PEVs based on hierarchical model predictive control (HiMPC) is presented in [17]. The problem of grid-to-vehicle energy exchange between a smart grid and plug-in electric vehicle groups (PEVGs) is studied using a noncooperative Stackelberg game in [18]. A strategic charging method for plugged in hybrid electric vehicles (PHEVs) in smart grids are introduced based Fig. 1. Structure of PEV to smart home. on a game theoretic approach in [19]. Rayati et al. [20] present a smart energy hub for a residential customer and use rein- D. Outline forcement learning and Monte Carlo estimation to find a near optimal solution for the energy management problem. These The remainder of the paper is arranged as follows. Section approaches all share a common goal, namely, to meet overall II details the models of PEV to smart home and the random home electric power demand while optimizing a metric such variables. The SDP framework is described in Section III. The as electricity consumption, reliability, or frequency regulation. optimization results are discussed in Section IV followed by Most of this literature pursues a V2G technology potential conclusions presented in Section V. evaluation objective. Few pursue a real-time control system II.PEV TO SMART HOME MODEL DEVELOPMENT that optimizes energy management with an explicit consider- ation for stochastic home loads and mobility patterns. Iverson A. Operating Modes et al. consider probabilities of vehicle departure time and We consider a smart home with PEV energy storage as trip duration to formulate a stochastic dynamic programming shown in Fig. 1. The smart home is composed of the house (SDP) algorithm to optimally charge an EV based on an load demand, the utility grid, a PEV with a Li-ion battery pack, inhomogeneous Markov chain model [21]. Donadee et al. [22] and associated power electronics. The PEV battery interfaces use stochastic models of (i) plug-in and plug-out behavior, with the utility grid and house loads via power electronics, (ii) energy required for transportation, and (iii) electric en- namely a DC/AC converter. The power electronics are de- ergy prices. These stochastic models are incorporated into an signed and controlled to allow bidirectional or unidirectional infinite-horizon Markov decision process (MDP) to minimize power flow according to the different operating modes. The the sum of electric energy charging costs, driving costs, and controller is used to manage the power flow between the the cost of any driver inconvenience. A later study by [14] con- battery, house appliances and utility grid. We apply a stochastic structs a Markov chain to model random prices and regulation optimal control approach to synthesize an energy management signal and formulates a SDP to optimize the charging and fre- controller. quency regulation capacity bids of an EV. The previous three There are four operating modes in PEV to smart home studies, however, do not consider integrated PEV charging systems, as shown in Fig. 2. Mode A allows PEV battery with building loads. Liang et al. [23] provide a comprehensive charging only (uni-directional power flow), called grid-to- literature survey on stochastic modeling and optimization tools vehicle (G2V). Mode B allows battery charge and discharge for microgrids and examine the effectiveness of such tools. with the home, but does not export power to the grid. This is called vehicle-to-home (V2H). Mode C allows battery charge C. Main Contribution and discharge and may sell power to the grid, called vehicle- The main contribution of this paper is to model PEV to-grid (V2G). The V2G mode with renewable energy (such energy storage availability by incorporating multiple random as solar rooftop photovoltaics or wind power) is considered variables into a SDP control formulation of smart home energy in mode D. Renewable energy sources will not be considered management. The random variables include PEV arrival time, in this paper, however it is a direct extension of the proposed departure time, and energy required for mobility. We also framework and a topic for future investigation. quantify the potential cost savings of various operating modes, To develop and evaluate our control methods, we consider including V2G, V2H, and G2V. Our procedure provides a load data from a single family home in Los Angeles, Califor- systematic methodology to quantify the potential cost savings nia. The collected data corresponds to date range 2013-04-01 to home ratepayers in smart homes with PEV energy storage. to 2014-03-31. Figure 3 plots the hourly average electricity Household Household Consequently, we can compute the power of the PEV battery A) Electricity Demand B) Electricity Demand as 2 Pbatt,k = Voc(SOCk)Ik + RintI (5) PEV Utility PEV Utility k Battery Grid Battery Grid The charge power is assumed to be positive, by convention. In this paper, we assume the internal resistance Rint is constant Household Household and the open circuit voltage V is a function of SOC [24]. C) Electricity Demand oc k D) Electricity Demand C. Trip Time Model PEV Utility PEV Utility Battery Grid PEV battery storage provides a unique opportunity to de- Battery Grid couple energy supply from demand. A unique challenge in Renewable smart homes, however, is uncertainty in three parameters: Energy PEV plug-in time, plug-out time, and charge required for mobility. Given statistics for these uncertain parameters, we Fig. 2. Operating modes of PEV to smart home: A) grid-to-vehicle (G2V); B) vehicle-to-home (V2H); C) vehicle-to-grid (V2G); D) V2G with renewable model the PEV plug-state as a Markov chain. A Markov chain energy generation. model is a dynamic system that undergoes transitions from one state to another on a state-space. Unlike deterministic dynamical systems, the process is random and each transition 3 Average is characterized by statistics. Moreover, it contains the Markov property that given the present state, the future and past states 2 are independent. Considering the PEV is plugged-in (Sk = 1) or plugged-out (Sk = 0) at time k, the Markov chain model 1 can be written mathematically as

Summer Power [kW] 0.3 2 3 Pij,k = Pr[Sk+1 = j|Sk = i, k], i, j ∈ {0, 1} ,

P10,k = Pr[Sk+1 = 0|Sk = 1, k] = p(k), 2 P11,k = Pr[Sk+1 = 1|Sk = 1, k] = 1 − p(k),

1 P01,k = Pr[Sk+1 = 1|Sk = 0, k] = q(k),

Winter Power [kW] 0.3 P00,k = Pr[Sk+1 = 0|Sk = 0, k] = 1 − q(k). (6) 00:00 04:00 08:00 12:00 16:00 20:00 24:00 Time of Day These dynamics are visualized by the state transition diagram in Fig. 4. The quantity p(k) is the transition probability of Fig. 3. Hourly electric power demand on each weekday (blue) and power plugging-out and q(k) is the transition probability of plugging- demand average across year (red). in. consumption on summer (May 1 - Oct 31) and winter (Nov 1 - Apr 30) weekdays. k k k B. Model of PEV to Smart Home At all points in time, the system must sastify the following power balance equation, k

Pgrid,k = Pdem,k + SkPbatt,k, k = 0, ..., N − 1, (1) Fig. 4. State transition diagram for stochastic plug-in/out state Sk.

( 0 for td ≤ k ≤ ta The start time of outgoing trips from home (or residential Sk = (2) 1 otherwise, area) is called the plugging-out time, and the plugging-in time is the end of the last return trip. In order to research the where Sk denotes the PEV state at time k, i.e., plugged-in randomness of trip time, we investigated 10 individuals daily (Sk = 1) or plugged-out (Sk = 0). In this paper we assume driving schedules over 3197 person-work days. All 10 people the PEV plugs-out and plugs-in once per day, each. work in a university office in Chengdu, China and their work We consider the following discrete-time equivalent circuit hours are from 8:30 AM to 5:30 PM. Chengdu is a capital model of a PEV battery city in the southwest of China and the core city resident ∆t population is about 5.65 million. According to the analysis SOCk+1 = SOCk + Ik, k = 0, ..., N − 1 (3) of the daily driving schedules, the temporal distribution of Q cap vehicle transition probability is shown in Fig. 5. The plugging- SOC0 = SOCinit (4) out time distribution is concentrated around 6:45-8:30 AM, 40 plugging−out time 35 plugging−in time 30 1

25 0.8 0.6 20 0.4 15 Probability 0.2 10 0 Transition Probability [%] 5 0 0.2 1 0 0.4 00:00 04:00 08:00 12:00 16:00 20:00 24:00 0.8 Time of Day 0.6 0.6 SOC at Plug−out Time 0.8 0.4 0.2 SOC at Plug−in Time Fig. 5. Distribution of plugging-in and plugging-out times for 10 individuals 1 0 over 3197 person-work days in Chengdu, China.

Fig. 6. Conditional probabilities of plugging-in SOC SOCpi, given the and corresponds to morning commutes. The mean value of plugging-out SOC SOCpo. the plugging-out time is 7:40 AM (7.66h), and the standard deviation (std) is 0.57h. The plugging-in time distribution SOCpo are shown in Fig. 6. Note the SOC at plugging-in time shows the highest peak around 5:30-8:00 PM, the mean value is always less than or equal to SOC at plugging-out time - that is 6:38 PM (18.64h), and the std is 0.89h. is SOC cannot increase during driving events.

D. SOC at Plugging-in Time Model III.STOCHASTIC DYNAMIC PROGRAMMING In this section, we use daily trip distance to compute the This section presents the stochastic dynamic programming SOC at plugging-in time, denoted SOCpi. The randomness of approach used for solving the optimal power management SOC at plugging-in time is affected by many factors, including problem for PEV to smart home microgrid. The objective is the SOC at plugging-out time, driving distance, driving styles, to manage power flow to minimize electricity cost. The elec- route choice, traffic, etc. Here we only consider the effect of tricity cost includes household electric power demand, PEV driving distance battery charging and discharging. This objective is oriented ( min d min toward individual homeowners. Other objectives are directly SOCc , if SOCpo − ≤ SOCc , Eff ·Qeap applicable as well, e.g. minimize marginal power plant carbon SOCpi = d SOCpo − , otherwise, Eff ·Qeap emissions, battery degradation, or distribution circuit voltage (7) drop. To explicitly compute the electricity cost for a PEV to where Qeap is the energy capacity [kWh] and Eff is the smart home microgrid, we define the instantaneous electricity overall electric drive efficiency which we assume equal to cost functional, gk(SOCk,Sk,Ik), as follows: 6.7km/kWh [25]. Random variables SOCpo and d represent the SOC at plugging-out time (see Fig. 5) and daily driving gk(SOCk,Sk,Ik) = ck · ∆t · Pgrid,k distance. If given SOCpo and d, then SOCpi can be com- = ck · ∆t · (Pbatt,kSk + Pdem,k) puted. Note that SOC is lower-bounded by SOCmin, which pi c = c · ∆t · ((V (SOC )I + R I2)S + P ) (10) prevents battery depletion. Consequently, we can compute the k oc k k int k k dem,k conditional probability distribution of SOCpi according to where ck is the time-varying electricity price [cents/kWh]. In this paper we assume deterministic home power demand. m = P r[SOC = SOC |SOC = SOC ], (8) hg pi h po g While this assumption is clearly never true, the literature is rich with machine learning and stochastic modeling approaches for  min SOCh,SOCg ∈ S = SOCi = SOCc + i · ∆SOC | home power demand [27], [28], that can be incorporated into min max i ∈ N,SOCc ≤ SOCi ≤ SOC . (9) our framework. As such, we focus on the novel aspects of this work - modeling PEV energy storage availability. m The quantity hg is the probability that plugging-in SOC The controller must maintain battery SOC and current I SOC = SOC SOC = SOC k k pi h, given plugging-out SOC po g. within simple bounds, When given a plug-out SOCpo (SOCpo = SOCg), the min max probability distribution of SOCpi is decided by the probability SOC ≤ SOCk ≤ SOC , k = 0, ..., N (11) distribution of driving distance. According to the statistical min max I ≤ Ik ≤ I , k = 0, ..., N − 1 (12) daily trip length distribution from 2009 U.S. National House- hold Travel Survey (NHTS) [26], the conditional probabilities The various operating modes (see Fig. 2) are incorporated by min for the plugging-in SOC SOCpi, given the plugging-out SOC appropriately setting values of I . the current battery SOC level and the plug-state - SOCk,Sk, Random process Controller respectively. Then the principle of optimality [29] is given by: PPrSjSiijij,1 k[|],,0,1 k  k   ISOCSkkk(,) mhg Pr[| SOC pi SOC h SOC po  SOC g ] Vk(SOCk,Sk) = min {g (SOC ,S ,I ) + V (SOC ,S )} SSOCkpi, k k k k E k+1 k+1 k+1 Ik∈Dk Deterministic System = min {g(SOCk,Sk,Ik)+ SOCkk11 SOC, S kk 0 S 0 Ik∈Dk  max SOCProj[ SOC ]SOC , S0 S 1 I X  kpikk11SOCmin k P V (SOC ,S = j)}, (18)  c ij,k k+1 k+1 k+1 SOCkkkcapkk11 SOC tI Q, S1 S 0 j∈{0,1}  SOCkkkcapkk11 SOC tI Q, S1 S 1  where gk(·, ·) is the instantaneous cost in (10) and Pij,k are Markov chain transition probabilities in (6). The minimization SOC k operator is subject to a time-varying admissible control set Dk characterized by (1)-(9) and (11)-(15). We can further expand (18) by considering separate cases for S = 0 and S = 1 Fig. 7. Block diagram of stochastic multi-stage decision process. k k and substituting the SOC dynamics as follows.

i) In V2G mode (Mode A), Vk(SOCk,Sk = 0) = min min min {g(SOC ,S = 0,I ) I = Ibat , (13) k k k Ik∈Dk

ii) In V2H mode (Mode B), + (1 − q(k)) · Vk+1(SOCk,Sk+1 = 0) ( p ) SOCmax o 2 +q(k) · Vk+1(Proj[SOCpi] min ,Sk+1 = 1) , (19) min min −Voc + Voc − 4RintPdem,k SOCc I = max Ibat , . (14) 2Rint Vk(SOCk,Sk = 1) = iii) In G2V mode (Mode C), min {g(SOCk,Sk = 1,Ik) Imin = 0. (15) Ik∈Dk  ∆t  + p(k) · Vk+1 SOCk + Ik,Sk+1 = 0 Armed with the Markov chain modelling framework to Qcap incorporate statistics of the random process (e.g. plugging-out  ∆t  time, plugging-in time, SOC at plugging-in time), we can now +(1 − p(k)) · Vk+1 SOCk + Ik,Sk+1 = 1 . Qcap formulate a stochastic dynamic program (SDP). Consider the (20) block diagram in Fig. 7. The deterministic subsystem is given in the lower-left block, and is characterized by state SOCk. We also have the boundary condition The stochastic subsystem is characterized by the pair of states ( min max 0, for SOCN ≤ SOCN ≤ SOCN {S ,SOC }, described by the Markov chain model in the VN (SOCN ,SN ) = k pi ∞, otherwise. top block. The design problem is to determine the control (21) input Ik which minimizes the electricity cost. The control will be synthesized as a time-varying state feedback control law. Finally, the optimal control action is saved as Namely, the control is the output of a mapping that depends ∗ Ik = γk(SOCk,Sk) (22) on the current deterministic state SOCk and stochastic state {Sk,SOCpi}. We formalize this as a finite-time stochastic = arg min {g(SOCk,Sk,Ik) Ik∈Dk dynamic program [29], X + Pij,kVk+1(SOCk+1,Sk+1 = j}. j∈{0,1} N−1 X min E ck · ∆t · (SkPbatt,k + Pdem,k) (16) IV. RESULTS &DISCUSSION Ik,SOCk,Sk k=0 This section analyses the SDP controller properties by com- s. t. paring its performance in different operating modes. The time-  SOC ,S = 0 → S = 0 varying price signal, driving cycles and average electricity  k k k+1  SOCmax power demand are input to the SDP control algorithm. First, Proj[SOCpi]SOCmin ,Sk = 0 → Sk+1 = 1 c we do the SDP multi-stage decision process offline and find the SOCk+1 = ∆t SOCk + Ik,Sk = 1 → Sk+1 = 0  Qcap optimum charge and discharge current and minimum expected  ∆t SOCk + Ik,Sk = 1 → Sk+1 = 1 electric energy cost, for any time k and any value of SOCk. Qcap Then, we use the optimal control policy computed by SDP to Eqns (1) − (9) and (11) − (15). (17) simulate the closed-loop system. The PEV is allowed to charge Now we define the value function. Let Vk(SOCk,Sk) be only at home. Table I lists the parameter values used for these the minimum expected cost-to-go from time step k to N, given optimization case studies presented in this manuscript. 50 120

40 80 Summer 40 20 Speed [km/h] 0 0.95 From home to work 0 Hourly Varying Price PGE Price From work to home 40 0.9 Winter 0.85 SOC 20

Electric Price [cents/kWh] 0.8

0.75 0 5 10 15 20 25 0 00:00 04:00 08:00 12:00 16:00 20:00 24:00 Time [min] Time of Day Fig. 9. SOC curves for a PEV undergoing LA92 drive cycle. Fig. 8. Electric Price in a Day. B. Average Weekday Household Power Demand A. Time-Varying Electricity Price This section presents the resulting SDP control law sim- ulated on the average weekday household power demand, average plug-out and average plug-in times. The time horizon Pacific Gas and Electric Company (PG&E) offers special is 24 hours. We assume the PEV is driven between work and EV rate plans for residential customers in different seasons. home with one LA92 drive cycle (15.8 km and 23.93 min- They are non-tiered, time-of-use plans shown in Fig. 8 [30]. utes). A simple PEV energy management control strategy is EV charging cost is based on the time of day you consume considered. All the drive power is supplied by the battery and electricity. Costs are lowest from 11 PM to 7 AM when all deceleration power is captured with regenrative braking, demand is lowest. Electricity is more expensive during Peak unless: (i) the deceleration power exceeds the motor’s limits; (2-9 PM) and Partial-Peak (7 AM-2 PM and 9-11 PM) periods. (ii) the deceleration power causes battery voltage to exceed Similar to the PG&E EV rate plans, we synthetically generated V . Then it uses friction brakes for remaining deceleration a more interesting hourly time-varying electric price, as shown max power. The SOC curves for a PEV similar to a Nissan Leaf in Fig. 8. The hourly time-varying electric prices vary between undergoing LA92 drive cycle are shown in Fig. 9. The SOC 6.5-47.8 cents/kWh in summer and 6.5-38.8 cents/kWh in at plugging-out time SOC is 0.94. The SOC at plugging-in winter, providing an opportunity for the PEV to gain eco- po time SOC is 0.76. nomic benefits through off-peak charging and bidirectional pi PEV to smart home power exchange. This might emulate a Three different operating modes are investigated, including future time-of-use EV pricing scenario that several utilities (i) V2G mode; (ii) V2H mode; (iii) G2V mode. In the first are considering. In summer, both the PG&E EV price and two, the battery can supply power to the home and grid. hourly time-varying electric price’s average is 23.8 cents/kWh. Based on average summer weekday power demand, as well as In winter, average is 18 cents/kWh. In this paper, we examine hourly time-varying electric price, the battery SOC trajectories, the performance of PEV to smart home with the hourly time- electric power from grid, and total electric cost are depicted in varying electricity price. Fig. 10. Here we assume the SOCs, SOC0, at the start time of a day (00:00) are 0.10, 0.52 and 0.76 in V2G, V2H and G2V mode, respectively, which equal to the SOC values at the end TABLE I time of a day (24:00). SYSTEM PARAMETERS. It is evident that the depth of battery discharge is larger Parameter Description Symbol Value Unit under V2G mode than V2H mode. Of course, more frequent Battery Charge Capacity Qcap 66 Ah charging and discharging will affect battery life, which will be Battery Energy Capacity Qeap 24 kWh Battery Open Circuit Voltage Voc f(SOC) V considered in the future work. Based on the summer hourly Battery Internal Resistance Rin 0.1 Ohm time-varying electric price, a majority of the charging occurs Time Step ∆t 15 min during the low electricity price period: 2:00-5:30 AM in V2G Maximum Battery SOC SOCmax 0.95 - min mode; 3:00-5:00 AM in V2H and G2V modes. A majority of Constant Minimum Battery SOC SOCc 0.075 - Minimum Battery SOC SOCmin 0.075 - the discharging during the high electricity price period: 6:30- max Maximum Charging Current Ibat 20.27 A 9:00 PM. Minimum Discharging Current Imin -20.27 A bat The daily electricity cost based on average weekday power Plugging-out Time td 7:40 AM Plugging-in Time ta 6:38 PM demand and LA92 drive cycle are shown in Table II. In V2G mode, the daily electricity cost is 4.50 USD less in summer 40 1 PGE Price New PGE Price 0.5 V2G 20 SOC V2H [cents/kWh] 0 0 10 G2V 1 No PEV 5 0.5 PGE Price V2G SOC 0 V2H 0 G2V

Power[kW] −5 1

20 0.5 New PGE Price 0 SOC 0 00:00 04:00 08:00 12:00 16:00 20:00 24:00 Time of Day −40

Cost[cents] (a)

00:00 04:00 08:00 12:00 16:00 20:00 24:00 30 Time of Day Electric Price 20 Fig. 10. SOC, grid power, and instantaneous cost trajectories of SDP controllers based on summer average weekday house power demand. [cents/kWh] 10 V2G V2H G2V SOCmin and 3.65 USD less in winter relative to the No PEV case. 1 In V2H mode, the daily electricity cost is 1.10 USD less in 0.8 summer and 0.84 USD less in winter than the No PEV case. 0.6

In G2V mode, the daily electricity cost is 0.29 USD more SOC 0.4 than the No PEV case in both summer and winter. Summer 0.2 is more expensive than winter due to higher electricity prices 0 00:00 04:00 08:00 12:00 16:00 20:00 24:00 and larger household power demand. These estimates can be Day of Time combined with charging infrastructure costs to calculate the best-case return-on-investment (ROI) period for each working (b) mode, which Interested readers should pay more attention to. Fig. 11. Battery SOC if the evening electric prices are less than or equal to the morning electric prices.

TABLE II and discharging is decided by time varying electric price, DAILY ELECTRICITY COSTBASEDON AVERAGE WEEKDAY POWER transition probability of plugging-out, constraints of current DEMANDAND LA92 DRIVE CYCLE. and SOC. Here we consider one practical heuristic solution by min min Summer cost (USD) Winter cost (USD) making SOC time-varying. That is, make SOCk = 90% Modes total PEV Total PEV when there’s some non-trivial probability of plugging-out, as V2G 1.40 -4.50 1.15 -3.65 min SOCk = 90% for k’s where P10,k = P r[Sk+1 = 0|Sk = V2H 4.81 -1.10 3.94 -0.84 min G2V 6.19 +0.29 5.07 +0.29 1, k] > 1%. SOCk−u = 90%, u = 0, 1, ..., 30 for the first No PEV 5.90 0 4.78 0 P10,k = P r[Sk+1 = 0|Sk = 1, k] > 1%. To illustrate, we consider average summer house power demand, LA92 drive cycle, the new electricity price, and time-varying SOCmin as Based on the previous results, it would seem necessary for shown in Fig. 11(b). The battery SOC in V2G, V2H and G2V the time-of-use price to be less before morning departure than mode are shown in Fig. 11(b). This time-varying minimum the price after evening arrival to ensure sufficient SOC for SOC ensures the SOC is sufficiently high to meet mobility mobility needs. This time-of-use price characteristic is not demands - in all modes. necessary, as demonstrated in Fig. 11(a). Namely, we have considered a PG&E price scheme, along with a new (i.e. mod- C. Impact of Varying Mobility Needs ified) PG&E price scheme. The new scheme has lower prices This section investigates the impact of varying daily com- after evening arrival than prices before morning departure. Yet, mute distances on smart home power management. We ex- the SOC increases. We have observed, however, that for some amine daily trip lengths between 5 km and 150 km, which other electricity price structures the proposed SDP will not includes the bulk of daily trip length distribution according to sufficiently charge the PEV to meet mobility constraints. The the NHTS data. In Table III, several drive cycles, trip lengths reason for this behavior might be due to numerical or imple- and SOC for driving are reported. The total electricity cost, mentation issues in the simulation. The decisions of charging PEV battery electric cost and SOC value at the end of the day TABLE III 800 DRIVECYCLESCONSIDEREDTOASSESSIMPACTOFDAILYTRIPLENGTH ONSMARTHOMEENERGYMANAGEMENT.

Daily Trip 600 Cycles Length/km SOCd 2x(HWFET+LA92+US06+UDDS+NEDC+SC03) 147.58 0.84 2x(HWFET+LA92+US06+UDDS+SC03) 125.72 0.76 2x(LA92+US06+UDDS+NEDC) 103.22 0.61 400 V2G 2x(LA92+US06+UDDS) 81.16 0.49 2x(HWFET+US06+SC03) 70.32 0.47 V2H 2x(US06+UDDS+SC03) 61.28 0.37 G2V 2x(LA92+NEDC) 53.16 0.30 No PEV 2x(LA92+SC03) 43.12 0.23 200 Total Electric Cost [cents] 2xHWFET 33.02 0.21 2xLA92 31.60 0.18 2xUS06 25.78 0.21 2xUDDS 23.98 0.11 0 2xNEDC 21.86 0.12 0 30 60 90 120 150 2xSC03 11.52 0.05 Daily Trip Length [km] SC03 5.76 0.03 (a)

(24:00) in summer weekday with different daily trip are shown 200 in Fig. 12. The total electric costs and PEV electric costs increase as daily trip length increases, for all three operating 0 modes. When the daily trip length equals the PEV electric −200 range, then the costs are the same in all three modes. In G2V V2G mode, the SOC values (at 24:00) decrease as daily trip length −400 V2H G2V increases. In V2H mode, the SOC values (at 24:00) decrease PEV Cost [cents] −600 as daily trip length increases, for trip lengths less than 103 1 km, but are constant as the trip length increasing. In V2G 0.8 mode, the SOC values (at 24:00) are constant for all daily trip lengths. From Fig. 12-(b), it can be seen that PEVs in V2H or 0.6

V2G mode provide net cost reductions when daily trip length SOC 0.4 is less than 100 km. 0.2 D. Financial Analysis 0 0 30 60 90 120 150 To demonstrate the potential financial benefits of PEV to Daily Trip Length [km] smart home microgrids, this section considers the annual profits for different operating modes. In this part, we use the (b) 2xLA92 drive cycles as the daily trip. The daily electric cost Fig. 12. Electricity cost in summer weekday with varying daily trip length. under no PEV case, V2G, V2H, and G2V modes are presented in Fig. 13. The analysis summarized by Table IV examines the the total winter weekdays cost is 503.0 USD. The mean value annual electric cost in summer and winter. of G2V daily electric cost is 4.89 USD, and the total winter In summer weekdays, the mean value of No PEV daily weekdays cost is 636 USD. The winter weekdays total electric electric cost is 5.91 USD/day, and the total summer weekday cost is 74.7% less for V2G mode relative to No PEV case, and cost is 768.8 USD. The mean value of V2G daily electric cost it is by 16.0% in V2H mode, but 6.2% more for G2V mode is 1.42 USD, and the total summer weekday cost is 184.3 USD. relative to No PEV case. The mean value of V2H daily electric cost is 4.80 USD/day, Over one year, total electric cost is 75.5% less for V2G and the total summer weekday cost is 624.1 USD. The mean mode relative to the No PEV case, and it is 17.6% less in V2H value of G2V daily electric cost is 6.20 USD/day, and the total mode. The cost increases by 5.4% in G2V mode. The energy summer weekdays cost is 805.8 USD. The summer weekday management strategy is exploiting price arbitrage selling total electric cost is 76.0% less for V2G mode relative to No electricity to the grid when its high and buying electricity from PEV case, and it is by 18.8% in V2H mode, but 4.8% more the grid when its low. for G2V mode relative to No PEV case. In winter weekdays, the mean value of No PEV daily E. Discussion on Power Quality Problem electric cost is 4.61 USD/day, and the total winter weekdays Power quality in distribution circuits is a key challenge cost is 599.0 USD. The mean value of V2G daily electric cost associated with PEV charging. Without coordinated charging, is 1.16 USD, and the total winter weekdays cost is 151.4 USD. PEV charging can lead to voltage loss and hence reliability The mean value of V2H daily electric cost is 3.87 USD, and concerns and increased energy costs. Coordinated charging 1200 8 Maximum Grid Minimal Grid House Demand V2G V2H 4 1000 G2V 0 NoPEV −4

800 8 4 V2G V2H G2V 0 600 Grid power without constrains

Power [kW] −4 −8

Cost [cents] V2G V2H G2V 400 4 0 200 Grid power with constraints −4 00:00 04:00 08:00 12:00 16:00 20:00 24:00 0 Time of Day

0 20 40 60 80 100 120 Summer Weekdays Fig. 14. SDP optimized grid power trajectories, with and without the grid power limits given in the top subplot. (a) SUMMER 1000 considering power limits from the grid (top subplot of Fig. 14). V2G V2H Specifically, we consider a scenario where the utility provides min max 800 G2V day-ahead power limit signals, Pgrid,k ≤ Pgrid,k ≤ Pgrid,k, to No PEV the controller which ensures distribution circuit power quality. 600 Thus, we regulate the PEV charging power to avoid excessive deportation or importation of power from the local distribution grid. To illustrate, we consider house power demand on 400 an arbitrary day during winter, the winter hourly electricity Cost [cents] price, and the LA92 drive cycle. The results are shown in 200 Fig. 14. With grid power limits, the magnitude of power transferred between the grid and home is less. Consequently, 0 the charging/discharging times are elongated in V2G mode. 0 20 40 60 80 100 120 In V2H mode, the maximum power from grid is reduced. The Winter Weekdays difference is negligible in G2V mode, since the grid power (b) WINTER demand constraints do not become active. Fig. 13. Electricity cost in different modes. V. CONCLUSION This paper examines a stochastic optimization framework TABLE IV for energy management of a smart home with PEV energy ANNUALELECTRICCOST (USD) DUETOWEEKDAYHOUSEPOWER storage, with a specific focus on PEV energy storage uncer- DEMAND,PEV CHARGING, AND LA92 DRIVINGCYCLE. tainty. A stochastic dynamic programming problem (SDP) is V2G V2H G2V No PEV formulated to optimize the electric power allocation among Summer Daily Average 1.42 4.80 6.20 5.91 the PEV battery, home power demand, and utility grid. The Winter Daily Average 1.16 3.87 4.89 4.61 Year Daily Average 1.29 4.34 5.55 5.26 strategy explicitly incorporates probability distributions of trip Summer Total 184.3 624.1 805.8 768.8 time and trip length. We quantify the potential cost savings Winter Total 151.4 503.0 636.0 599.0 of various operating modes, including V2G, V2H and G2V. Year Total 335.7 1127.1 1441.8 1367.8 We find that variable mobility patterns significantly impact the optimal energy management behavior. Additionally, significant can minimize the power losses and maximize distribution grid operational cost savings are achievable with the V2G operating load factors [14], [31]. According to Fig. 10, the total power mode, given the electricity cost structure assumed in this paper. demand from the grid is reduced when grid load is high, and Future work may incorporate thermal and aging dynamics is increased during the night based on SDP control. The load of the PEV battery into the SDP optimization framework, shifting effect is significant and important to improve grid since the V2G or V2H operating modes will impact battery power quality. However, the maximal power demand from health. The proposed framework can be extended to consider the grid may violate voltage deviation limits, and excessive additional uncertainties, such as house power demand, time- discharge may affect grid stability. Although this manuscript varying electricity price, renewable power generation. Com- is concerned with a single node, and not the distribution bined with charging infrastructure costs, the best-case return- network, we conduct a simple power quality analysis by on-investment (ROI) period for different working modes can be calculated. [18] W. Tushar, W. Saad, H. Poor, and D. Smith, “Economics of electric vehicle charging: A game theoretic approach,” IEEE Transactions on ACKNOWLEDGMENT Smart Grid, vol. 3, no. 4, pp. 1767–1778, Dec 2012. [19] A. Sheikhi, S. Bahrami, A. Ranjbar, and H. Oraee, “Strategic charging This work is supported partially by Science and Technology method for plugged in hybrid electric vehicles in smart grids; a game theoretic approach,” International Journal of Electrical Power & Energy Department of Province (Grant Nos. 2016HH0010, Systems, vol. 53, pp. 499 – 506, 2013. 2015TD0021, and 2013JY0088), NSF of China (Grant No. [20] M. Rayati, A.Sheikhi, and A. Ranjbar, “Optimising operational cost of 51375402), and Xihua University Fund (Grant Nos. z1220315, a smart energy hub, the reinforcement learning approach,” International Journal of Parallel, Emergent and Distributed Systems, vol. 30, pp. 325– and szjj2012-012). 341, 2015. [21] E. B. Iversen, J. M. Morales, and H. Madsen, “Optimal charging of an REFERENCES electric vehicle using a markov decision process,” Applied Energy, vol. 123, no. 0, pp. 1 – 12, 2014. [1] C. Liu, K. Chau, D. Wu, and S. Gao, “Opportunities and challenges of [22] J. Donadee, M. Ilic, and O. Karabasoglu, “Optimal autonomous charging vehicle-to-home, vehicle-to-vehicle, and vehicle-to-grid technologies,” of electric vehicles with stochastic driver behavior,” in Vehicle Power and IEEE Proceedings, vol. 101, no. 11, pp. 2409–2427, Nov 2013. Propulsion Conference (VPPC), 2014 IEEE, Oct 2014, pp. 1–6. [2] J. Escudero-Garzas, A. Garcia-Armada, and G. Seco-Granados, “Fair [23] H. Liang and W. Zhuang, “Stochastic modeling and optimization in a design of plug-in electric vehicles aggregator for v2g regulation,” IEEE microgrid: A survey,” Energies, vol. 7, no. 4, p. 2027, 2014. Transactions on Vehicular Technology, vol. 61, no. 8, pp. 3406–3419, [24] S. Moura, H. Fathy, D. Callaway, and J. Stein, “A stochastic optimal Oct 2012. control approach for power management in plug-in hybrid electric [3] S. Han, S. Han, and K. Sezaki, “Development of an optimal vehicle-to- vehicles,” IEEE Transactions on Control Systems Technology, vol. 19, grid aggregator for frequency regulation,” IEEE Transactions on Smart no. 3, pp. 545–555, May 2011. Grid, vol. 1, no. 1, pp. 65–72, June 2010. [25] A. Ashtari, E. Bibeau, S. Shahidinejad, and T. Molinski, “Pev charging [4] C. Quinn, D. Zimmerle, and T. H. Bradley, “The effect of communication profile prediction and analysis based on vehicle usage data,” IEEE architecture on the availability, reliability, and economics of plug-in Transactions on Smart Grid, vol. 3, no. 1, pp. 341–350, March 2012. hybrid electric vehicle-to-grid ancillary services,” Journal of Power [26] USDOT-FHWA, “National household travel survey,” U.S. Sources, vol. 195, no. 5, pp. 1500 – 1509, 2010. Department of Transportation, Federal Highway Administration, [5] C. Zhou, K. Qian, M. Allan, and W. Zhou, “Modeling of the cost http://nhts.ornl.gov/index.shtml, Tech. Rep., 2009. of ev battery wear due to v2g application in power systems,” IEEE [27] H. K. Alfares and M. Nazeeruddin, “Electric load forecasting: literature Transactions on Energy Conversion, vol. 26, no. 4, pp. 1041–1050, Dec survey and classification of methods,” International Journal of Systems 2011. Science, vol. 33, no. 1, pp. 23–34, 2002. [6] S. Bashash, S. J. Moura, and H. K. Fathy, “On the aggregate grid load [28] G. K. Tso and K. K. Yau, “Predicting electricity energy consumption: A imposed by battery health-conscious charging of plug-in hybrid electric comparison of regression analysis, decision tree and neural networks,” vehicles,” Journal of Power Sources, vol. 196, no. 20, pp. 8747 – 8754, Energy, vol. 32, no. 9, pp. 1761–1768, 2007. 2011. [29] D. P. Bertsekas, D. P. Bertsekas, D. P. Bertsekas, and D. P. Bertsekas, [7] Y.-M. Wi, J. uk Lee, and S.-K. Joo, “Electric vehicle charging method for Dynamic programming and optimal control. Athena Scientific Belmont, smart homes/buildings with a photovoltaic system,” IEEE Transactions MA, 1995, vol. 1, no. 2. on Consumer Electronics, vol. 59, no. 2, pp. 323–328, May 2013. [30] “Electric vehicles making sense of the [8] D. B. Richardson, “Electric vehicles and the electric grid: A review rates,” Pacific Gas and Electric Company, of modeling approaches, impacts, and renewable energy integration,” http://www.pge.com/en/myhome/saveenergymoney/pev/rates/index.page, Renewable and Sustainable Energy Reviews, vol. 19, no. 0, pp. 247 – Tech. Rep., 2015. 254, 2013. [31] K. Clement-Nyns, E. Haesen, and J. Driesen, “The impact of charging [9] M. Yilmaz and P. Krein, “Review of the impact of vehicle-to-grid plug-in hybrid electric vehicles on a residential distribution grid,” IEEE technologies on distribution systems and utility interfaces,” IEEE Trans- Transactions on Power Systems, vol. 25, no. 1, pp. 371–380, Feb 2010. actions on Power Electronics, vol. 28, no. 12, pp. 5673–5689, Dec 2013. [10] F. De Angelis, M. Boaro, D. Fuselli, S. Squartini, F. Piazza, and Q. Wei, “Optimal home energy management under dynamic electrical and thermal constraints,” IEEE Transactions on Industrial Informatics, vol. 9, no. 3, pp. 1518–1527, Aug 2013. [11] M. Tushar, C. Assi, M. Maier, and M. Uddin, “Smart microgrids: Optimal joint scheduling for electric vehicles and home appliances,” IEEE Transactions on Smart Grid, vol. 5, no. 1, pp. 239–250, Jan 2014. [12] S. J. Moura, D. S. Callaway, H. K. Fathy, and J. L. Stein, “Tradeoffs between battery energy capacity and stochastic optimal power manage- ment in plug-in hybrid electric vehicles,” Journal of Power Sources, vol. 195, no. 9, pp. 2979 – 2988, 2010. [13] S. Moura, J. Stein, and H. Fathy, “Battery-health conscious power management in plug-in hybrid electric vehicles via electrochemical modeling and stochastic control,” IEEE Transactions on Control Systems Technology, vol. 21, no. 3, pp. 679–694, May 2013. [14] J. Donadee and M. Ilic, “Stochastic optimization of grid to vehicle frequency regulation capacity bids,” IEEE Transactions on Smart Grid, vol. 5, no. 2, pp. 1061–1069, March 2014. [15] X. Hu, N. Murgovski, L. Johannesson, and B. Egardt, “Optimal di- mensioning and power management of a fuel cell/battery hybrid bus via convex programming,” IEEE/ASME Transactions on Mechatronics, vol. 20, no. 1, pp. 457–468, Feb 2015. [16] Y. He, B. Venkatesh, and L. Guan, “Optimal scheduling for charging and discharging of electric vehicles,” IEEE Transactions on Smart Grid, vol. 3, no. 3, pp. 1095–1105, Sept 2012. [17] F. Kennel, D. Gorges, and S. Liu, “Energy management for smart grids with electric vehicles based on hierarchical mpc,” IEEE Transactions on Industrial Informatics, vol. 9, no. 3, pp. 1528–1537, Aug 2013. Xiaohua Wu received the B.S. degree from the Xiaofeng Yin (M’14) received the B. Eng. degree in college of engineering, China Agricultural Univer- automotive engineering from of sity, Beijing, China, in 2007, and received the Ph.D. Science and Technology, Chengdu, China, in 1993, degree in Automotive Engineering from Beijing In- the M. Eng. degree in vehicle engineering from stitute of Technology, Beijing, China, in 2011. of Technology, Changchun, China, She is currently a Lecturer at School of Automo- in 1999, and the Ph. D. degree in vehicle engineering bile and Transportation, Xihua University, Chengdu, from Jilin University, Changchun, China, in 2002. China. She was a visiting scholar at the Department From 1993 to 1994, he was an Engineer with the of Civil & Environmental Engineering, University of Institute of Automotive Technology Research and California, Berkeley, USA, between 2014 and 2015. Development, Sichuan University of Science and Her research interests include modeling and control Technology, and, in 1995, became an Assistant Lec- of electric vehicle and energy storage systems. turer with the Department of Automotive Engineering. From 2002 to 2003, he was a Lecturer with the Department of Automotive Engineering, Xihua University, in 2003, became an Associate Professor of vehicle engineering, and, in 2006, was appointed as a Professor of vehicle engineering. He is also a national certified System Analyst of computer software. From 2005 to 2006, he was a Visiting Research Scientist and Postdoctoral Scholar at the University of Michigan, Ann Arbor, USA, where he was working on the performance modeling and analysis for automotive embedded control systems. From 2014 to 2015, he was a Visiting Professor at the Newcastle University, Newcastle upon Tyne, U.K, where he was working on the performance optimization and control of the power drive train systems for electric vehicles. He is currently the director of Sichuan Provincial Key Laboratory of Automotive Engineering, and the director of the Institute of Automotive Engineering, Xihua University. His currently research interests include vehicle drive train systems, automotive Xiaosong Hu (SM’16) received the Ph.D. degree embedded control software, in-vehicle networks, and internet of vehicles. He in Automotive Engineering from Beijing Institute of has published over 70 papers, and owns a number of patents and software Technology, China, in 2012. copyrights. He did scientific research and completed the Ph.D. dissertation in Automotive Research Center at the Scott Moura (S’09–M’13) received the B.S. degree University of Michigan, Ann Arbor, USA, between from the University of California, Berkeley, and 2010 and 2012. He is currently a professor at the the M.S. and Ph.D. degrees from the University of State Key Laboratory of Mechanical Transmissions Michigan, Ann Arbor, in 2006, 2008, and 2011, and at the Department of Automotive Engineering, respectively, all in mechanical engineering. Chongqing University, Chongqing, China. He was a He is currently an Assistant Professor and Di- postdoctoral researcher at the Department of Civil & rector of the Energy, Controls, and Applications Environmental Engineering, University of California, Berkeley, USA, between Laboratory (eCAL) in Civil & Environmental En- 2014 and 2015, as well as at the Swedish Hybrid Vehicle Center and the gineering at the University of California, Berkeley. Department of Signals and Systems at Chalmers University of Technology, In 2011-2013, he was a postdoctoral fellow at the Gothenburg, Sweden, between 2012 and 2014. He was also a visiting Cymer Center for Control Systems and Dynamics at postdoctoral researcher in the Institute for Dynamic systems and Control at the University of California, San Diego. In 2013 he was a visiting researcher Swiss Federal Institute of Technology (ETH), Zurich, Switzerland, in 2014. in the Centre Automatique et Systmes at MINES ParisTech in Paris, France. His research interests include modeling and control of alternative-energy His current research interests include optimal and adaptive control, partial powertrains and energy storage systems. differential equation control, batteries, electric vehicles, and energy storage. Dr. Hu serves as an Associate Editor for IEEE TRANSACTIONS ON Dr. Moura is a recipient of the National Science Foundation Graduate Re- TRANSPORTATION ELECTRIFICATION, IEEE TRANSACTIONS ON search Fellowship, UC Presidential Postdoctoral Fellowship, O. Hugo Shuck SUSTAINABLE ENERGY, and IEEE Access, and an Editorial Board member Best Paper Award, ACC Best Student Paper Award (as advisor), ACC and for another 2 journals. He has been a recipient of several prestigious ASME Dynamic Systems and Control Conference Best Student Paper Finalist awards/honors, including EU Marie Currie Fellowship in 2015, ASME DSCD (as student), Hellman Fellows Fund, University of Michigan Distinguished Energy Systems Best Paper Award in 2015, and Beijing Best Ph.D. Disserta- ProQuest Dissertation Honorable Mention, University of Michigan Rackham tion Award in 2013. Merit Fellowship, College of Engineering Distinguished Leadership Award.