Online optimization for residential PV-ESS energy system scheduling

This paper studies a residential PV-ESS energy system scheduling problem with electricity purchase cost, storage degradation cost and surplus PV generated cost [ 2 ]. This problem can be viewed as an online optimization problem in time \begin{document}$ t \in [1, T] $\end{document} with switching costs between decision at \begin{document}$ t-1 $\end{document} and \begin{document}$ t $\end{document} . We reformulate the problem into a single variable problem with \begin{document}$ {\bf{s}} = (s_1, ..., s_T)^T $\end{document} , which denotes the storage energy content. We then propose a new algorithm, named Average Receding Horizon Control (ARHC) to solve the PV-ESS energy system scheduling problem. ARHC is an online control algorithm exploiting the prediction information with \begin{document}$ W $\end{document} -steps look-ahead. We proved an upper bound on the dynamic regret for ARHC of order \begin{document}$ O(nT/W) $\end{document} , where \begin{document}$ n $\end{document} is the dimension of decision space. This bound can be converted to a competitive ratio of order \begin{document}$ 1+O(1/W) $\end{document} . This result overcomes the drawback of the classical algorithm Receding Horizon Control (RHC), which has been proved [ 11 ] that it may perform bad even with large look ahead \begin{document}$ W $\end{document} . We also provide a lower bound for ARHC of order \begin{document}$ O(nT/W^2) $\end{document} on the dynamic regret. ARHC is then used to study a real world case in residential PV-ESS energy system scheduling.


1.
Introduction. In recent years, photovoltaic (PV) panels integrated with energy storage systems (ESS), have gained popularity in energy market. More and more residential energy users consider to install the PV-ESS system, to support their energy demand with least electricity purchase. On the other hand, as the demand on traditional power generation utilities using fossil fuel are increasing, they introduce dynamic pricing in order to reduce the peak demand in certain time period [9]. Whether PV-ESS system can reduce its electricity need at peak hours becomes the main concern at both the demand side as well as the energy supply side.
To address the proper use of PV-ESS system, it is critical to perform intelligent energy system scheduling which can be regarded as an optimization problem.
Specifically, for time t = 1, ..., T , the scheduling for the PV-ESS system to store surplus PV generated energy is to minimize the cost of purchasing energy from main grid while maintaining a stable energy content for the user [24,3]. A real intelligent system needs to perform in an online fashion [12,23], i.e., it needs to make decision on scheduling every time t without given full information about future electricity price, PV generated energy and load demand.
One major cost in storage system scheduling is the degradation cost [5], or storage aging, i.e., when batteries are switching from one state to another, by charging or discharging, certain degradation will happen and will affect the efficiency of the batteries as well as their lifetime. With degradation cost presents, an intelligent system will avoid unnecessary circles of charging and discharging and hence introduce an constraint on the current scheduling decision from the previous decision. Degradation cost is in fact a typical phenomenon of switching cost or time coupling effect as discussed in online optimization community [10]. Time coupling effect may lead to bad performance using any greedy algorithm that optimizes the current cost at each stage, since it may restraint the decision in future stages.
To mitigate the time coupling effect with online decision, predictions within near future are usually employed. Solar radiation, the source of PV energy, depends on many meteorological factors, such as cloud cover, aerosols and solar zenith angle, etc. Recent research provides [20] good forecasting results on solar radiation. Meanwhile, dynamic price and load demand usually follow some certain patterns by day. Hence, a short term look-ahead of them is available [21,19].
Many online algorithms have been developed to handle both the prediction effect and the time coupling effect which arise in the degradation cost mentioned above. Receding Horizon Control (RHC) [14] is the most notable online algorithm. It is an iterative algorithm, based on an finite-horizon numerical optimization of a model, with certain constraints satisfied. One main goal of RHC is to design control rules to stabilize a complex dynamical system. It has also been applied in [22,18] to minimize the total stage cost in energy dispatching and scheduling.
The performance of an online algorithm can be measured by the competitive ratio which is the worst-case ratio between the cost of the solution found by the online algorithm and the cost of an optimal solution. It has been proved in [11] that RHC achieves an 1 + O(1) competitive ratio when the decision variable lies in high dimension space. An alternative performance measure of an online algorithm is the dynamic regret, which is the worst-case difference between the online cost and optimal cost. In this paper, to ease the analysis, we are interested in deriving the dynamic regret of an online algorithm. Note that the competitive ratio can be interpreted from the dynamic regret when the objective function is supported by a positive linear function.
1.1. Contribution of this paper. In this paper, we propose a PV-ESS energy system scheduling cost model where the cost function consists of the energy purchase cost, the storage degradation switching cost and the wasted surplus PV energy cost. Firstly, we reformulated the problem into a single variable problem with s = (s 1 , ..., s T ) T , which denotes the storage energy content. Secondly, we propose a new algorithm which is referred to as Average Receding Horizon Control (ARHC), to solve the PV-ESS energy system scheduling problem. ARHC is an extension of the Receding Horizon Control (RHC) algorithms which exploits the prediction information with W -steps look-ahead. Thirdly, we prove that its dynamic regret has an upper bound of order O(nT /W ), which can be converted to a competitive ratio of order 1+O(1/W ) if the objective cost function f t is supported by a linear function with positive parameters. This result is in constrast to the degraded performance of the classical RHC in higher dimensional cases. We also derive an lower bound on the dynamic regret of order O(nT /W 2 ). Finally, we apply our algorithm ARHC to a real world case in residential PV-ESS energy system scheduling problem. It is observed that the peak shift with minimum charge cycles happens as expected.
1.2. Related work. Scheduling of energy storage system with battery degradation cost has been discussed in many papers. The work [24] discussed scheduling the charging of an energy storage system using real-coded genetic algorithm. In [3], the authors studied distributed energy storage system scheduling using linear programming and quadratic programming. These papers include the switching cost in their models in an offline fashion. The scheduling and dispatching cost in micro-grids was studied in [12] as an online linear programming problem. The work [23] focused on the problem of home energy management using mixed integer linear programming in an online fashion. These papers consider the optimization problem in real-time which have not addressed on regret analysis of the algorithms.
Outside the energy scheduling community, online optimization with predictions and switching costs has also widely considered. The problem of economic dispatch in power systems was studied in [10]. The authors there proposed the Receding Horizon Gradient Descent (RHGD) algorithm, which yields an exponential decay competitive ratio in W when the objective function is strongly smooth and strongly convex.
The most related work to our method is the Averaging Fixed Horizon Control (AFHC) algorithm proposed in [11] which focused on the problem of geographical load balancing in data centers. AFHC is composite from W different versions of Fixed Horizon Control (FHC) with different starting points by taking average while The authors also showed the competitive ratio of AFHC is 1 + O(1/W ) if the cost function is supported by a linear function.
2. Problem formulation. We consider an online optimization problem with predictions and switching cost. The problem is based on the intelligent energy scheduling in a household which owns photovoltaic(PV) solar panels and energy storage system(ESS) [2]. At each time t, the energy scheduling cost are three folds: 1) The cost of purchasing energy from connected grid ξ t b t , where ξ t is the real-time electricity retail price and b t is the amount of energy purchased; 2) The storage degradation cost caused by charging/discharging, π|r t |. Here π is a penalty price that measures per unit of energy charging/discharging. And r t is the amount of energy charged or discharged from the storage; 3) The penalty of unused surplus PV generated energy, σ[b t + w t − u t − r t ], σ is the penalty parameter, w t is the amount of PV-generated energy, u t is the total amount of household energy consumption. The problem can be summed up as follows: The first constraint forces the energy demand of a household must be fulfilled by the available energy. The second constraint indicates the energy purchased from the connected grid is nonnegative. Note that the third constraint depicts the relation between energy charged/discharged, r(t), and the energy storage content s(t), which has a minimum 0 and a maximum C, as given in the last constraint. Using the relation among b, r and s, Problem (1) can be reformulated into single variable s, we conclude in the following proposition.
Proposition 1. The minimum of Problem (1) is the same as Moreover, the minimizers b and r can be obtained by The proof of Proposition 1 is straightforward. Firstly, the constraint s t = s t−1 +r t can be used to eliminate r t in Problem (2). Secondly, as in Problem (2), larger b t will result in larger electricity purchasing cost ξ t · b t and unused surplus energy cost Hence the optimal b t will be obtained only when both of the lower bounds on b t are reached, i.e. b t = max(d t + r t , 0). Rearranging terms will result in f t (s t − s t−1 ) in Equation (2).
Note that in Proposition 1 each f t is convex and subadditive, hence Problem (2) is convex and can be solved to any given precision via mature algorithms like interior-point methods [4]. We refer the solution of the entire problem as the optimal offline solution, s * . The optimal offline cost is defined as One might regard Problem (2) as an online convex optimization (OCO) problem [8]. However, in classical OCO, an online algorithm/decision maker plays against an adversarial environment for T stages, with no prediction information in the future stages, or any coupling like s t −s t−1 between stages. Let A be any online algorithm. Let C A denote the cost incurred by an A, and let s A denote the solution, then: Note that without the coupling s t − s t−1 in the cost function, given prediction on the current ξ t and d t , a greedy algorithm that optimizes the current cost function at each stage will achieve the optimal offline cost, since the total cost is separable between stages. As in Problem (2) the coupling can not be ignored, and a decision at current state that has immediate payoff may restrict the decision in future states, which can lead to poor performance. To measure the performance of an online algorithm, the competitive ratio is usually employed. The competitive ratio is the worst ratio between online algorithm cost and the optimal cost, which is defined by The goal is to achieve a constant bound for an online algorithm A on the competitive ratio regardless of T . As such, one is interested in an asymptotic bound approaching 1 as prediction window W becoming large. Another performance metric is the dynamic regret, which is the worst difference between online algorithm cost and the optimal cost. More formally, the dynamic regret is defined as As in the literature, the goal is to achieve a sublinear dynamic regret in T .

Receding Horizon methods.
In this section, we will study and design online control algorithms for PV-ESS energy system scheduling problem. We start by reviewing the classical control algorithm, Receding Horizon Control (RHC). Then, we propose a new algorithm, Averaging Receding Horizon Control (ARHC) which is inspired by RHC.

3.1.
Receding Horizon Control. Suppose one has perfect prediction on the electricity retail price, ξ t , the amount of PV-generated energy w t and the household demand u t with a window size W ∈ N + , i.e. the objective function f t , .
.., f t+W −1 is available. One popular control algorithm, Receding Horizon Control(RHC, a.k.a. Model Predictive Control) is often used to deal with prediction effect and time coupling effect. Formally, at each time t, let g t1:t2 (s; s t1−1 ) = t2 τ =t1 f τ (s τ − s τ −1 ) denote the sub-problem from t 1 to t 2 . At each time t, RHC solves g t1:t2 (s; s RHC t1−1 ) and takes the first element in the solution as its output. We conclude the above discussion in Algorithm 1.  Note that Algorithm 1 can start at t = 1 as the first output is given at t = 1. We still put starting point at t = 2 − W to unify the framework of RHC and the other algorithm. Intuitively, at each time t, RHC makes decision s RHC t using the most recent prediction information of size W , given the starting state s RHC t−1 . RHC has been shown in [11] that in certain cases, it can perform poorly when the decision variable belongs to R n where n ≥ 2. We include the theorem without proof here.

Algorithm 1 Receding Horizon Control
Theorem 3.1. If the decision space lies in high dimension (n ≥ 2), given any prediction window W ≥ 1, RHC is at least 1 + O(1)-competitive.
The theorem above states that the competitive ratio with prediction W ≥ 1 is at least as large as the competitive ratio without prediction, W = 0. This emphasizes that RHC may not improve its performance as the prediction size grows.

3.2.
Averaging fixed Horizon Control. To overcome the limitation of RHC, [11] proposed an algorithm named Averaging Fixed Horizon Control (AFHC). Before introducing AFHC, its predecessor, Fixed Horizon Control of version k (FHC (k) ) solves g t1:t2 (s; s (k) t1−1 ) at time t, and take the entire solution as its outputs from t 1 to t 2 . AFHC is combined from W versions of FHC (k) which starts from k − W + 2, k = 0, ..., W − 1. At time t, AFHC outputs the average of s (k) t over all W solutions. We conclude the above discussion in Algorithm 2.
Unlike RHC, which moves the prediction window on every output, FHC only move the prediction window after W outputs. Clearly FHC can behave worse than RHC since it does not use the most recent prediction information. Hence, intuitively, as the average of different versions of FHC (k) , k = 0, ..., W − 1, AHFC will perform worse than RHC. However, AFHC yields a consistent dynamic regret upper bound across all dimension n by introducing the factor 1 W in the average. We stated in the following theorem without proof.
Theorem 3.2. Given any decision space dimension n and any prediction window W ≥ 1, the dynamic regret of AFHC is upper bounded by where Even though AFHC can reach a dynamic regret decreasing with respect to W , It does not use the prediction fully. Look at any FHC version (t+W −2 mod W ), the initialization s    Whilst AFHC uses the initialization with least prediction information, ARHC exploits the most recent prediction information as RHC does, and use it as initialization at s t−1 . Meanwhile it takes average of last W steps solutions at time t. Hence ARHC is expected to have a dynamic regret upper with a factor 1 W despite the decision space dimension. This property of ARHC is summarized in the following theorem. Theorem 3.3. Given any decision space dimension n and any prediction window W ≥ 1, the dynamic regret of ARHC is upper bounded by Before we prove Theorem 3.3, we would like to mention the difference of Theorem 3.3 and Theorem 3.2. Both theorems yield the dynamic regret with same factor 1 W , and one can use the boundedness property on f t to give an bound independent of f t . However, if one look into the argument of f t , Theorem 3.2 can use boundedness t−1 is the output of FHC k and s (t) t−1 is the output of RHC, both at time t−1, intuitively RHC should yield a lower cost than FHC k . Hence one would expect that ARHC should yield a lower cost than AFHC. We discussed in the Experiments section on the performance of these two algorithms.
In order to prove Theorem 3.3, we would like to introduce a technical lemma, which implies that the double sums can be interchanged. Lemma 3.4. Let s t t1:t2 = (s t t1 , ..., s t t2 ) T denote any matrix at time t, where t 1 = max(t, 1) and t 2 = min(t + W − 1, T ), we have Proof. If W = 1, Equation (7) is trivial. For W ≥ 2, by the definition of g, the left hand side can be written as The following lemma establish a connection between the sub-problem solution and the optimal solution. Lemma 3.5. For any t = 2 − W, ..., T , we have Proof. Notice that t1−1 ). The first inequality is because s (t) t1:t2 is the minimizer of g t1:t2 (s; s (t) t1−1 ). The second inequality is due to the sub-additivity of f t1 and after rearranging terms. Now we are ready to prove Theorem 3.3 using Lemma 3.5 and Lemma 3.4.

Proof. By Lemma 3.5, we have
where the first equality is because of Lemma 3.4. Therefore, On the other hand, followed by Lemma 3.4, where the first inequality is due to the convexity of f τ , τ = 1, ..., T . Now, combine equations (9) and (10), Further, one can use the boundedness property on f t to give a bound independent of f t . We state in the following corollary. Corollary 1. Given any decision space dimension n and any prediction window W ≥ 1, suppose the parameters equal 0 when t ≤ 0 and when t ≥ 1, ξ t ≤ ξ max and d t ≤ d max , the competitive difference of ARHC is bounded above as follows Proof. Given any t ≥ 1, and any s t and s t in [0, C] n , the objective function Therefore, by Theorem 3.3 Note that competitive ratio of 1 + O(1/W ) can also be derived if a linear support function l(s − s ) = m · (s − s ) with m > 0 is provided for the objective function. Theorem 3.3 and Corollary 1 highlight that ARHC will perform better as prediction window grows despite the dimension. This overcomes the weakness of RHC.
Next, we provide a lower bound on the competitive difference for the new algorithm ARHC.
Theorem 3.6. Given any prediction window W ≥ 0, the competitive difference of ARHC has a lower bound bounded by Proof. First consider n = 1. Now consider the electricity price ξ t = ξ max when t = k(W + 1) + 1 and ξ t = 0 otherwise, here k = 0, 1, 2, ... and ξ max is a constant sufficiently large. Also consider the energy difference d t = C when t = k(W + 1) + 1 and d t = 0 otherwise. Note that with prediction window size W , from t = k(W + 1) + 2 to t = k(W + 2), the sub-problem can not see any large cost that may incur. Therefore, we have the following analytic solution to each sub-problem: In (W +1)-steps, there are one case k(W +1)+1 ∈ [t 1 , t 2 ] and one case k(W +1)+1 = t 1 . Therefore the output of ARHC can be calculated as: The cost function is and its corresponding cost Note that ξ max − 2π is positive if we assume ξ max is large enough. Now consider arbitrary n, the result in Equation (12) will follow. 4. Experiments. In this section, we discuss in detail of the experimental behavior and quantitative performance results of the proposed algorithm ARHC on the specific Equation (1), or equivalently Equation (2). The main concerns in this section are: i) to study the convergence rate with respect to the prediction window; and ii) to compare the online algorithms solutions with the offline optimal solution. 4.1. Setups. The setup in this paper follows the work [2]. In particular, we use real-world data for electricity price, solar irradiance and local energy demand. A detail description of the data is given below, note that in this problem we unify the time gap ∆t = 1 hour, and the total time period T = 8760 hours, i.e. 1 year. In Figure 1, only 48 hours of data are shown, for better visualization without loss of the pattern of data. More specifically, the data and the experimental setup are illustrated as follows.
• The electricity price: The price ξ t can be obtained from National Grid hourly electric supply charges at New York [15], shown in Figure 1a. As residential electricity usage is our main concern, the voltage delivery level is set as transmission. Note that we convert $/MWh to $/KWh in order to unify the unit of measure.
As shown in Figure 1a, the price is relatively low at night time, i.e. 12am -6am, and reaches its peak around 6pm -7pm. This behavior can be interpreted as a desire to reduce electric system peak demands. And this real-time pricing strategy has become popular in many states in U.S. [7].
• The solar radiation: National solar radiation data base [16] provides hourly solar data at New York, as shown in Figure 1b. Note that the solar irradiation is the integration of solar radiation over time. Here we utilize the graph to present the solar irradiation as well, since they have similar pattern. As shown in Figure 1b, the common pattern during two days is that radiation/irradiation is positive at day time, i.e. around 8am -6pm, and is 0 at night time. However, within day time, as it is affected by many meteorological factors such as cloud cover, aerosols, etc, solar radiation/irradiation is intermittent and varies over time. Note that due to the above nature of solar radiation, long-term prediction is difficult [20], but it is reasonable to assume that a relatively small window W of perfect prediction is available. Note that the maximum solar energy is about 3.0 KWh after normalization.
• The residential load: Residential load profiles at New York [17] are used in this experiment, shown in Figure 1c. The load demand matches the pattern of electricity price, i.e. relatively low at night time, 12am -6am, and reaches its peak around 6pm -7pm. Hence a desired smart system would apply solar energy to meet the demand instead of purchasing electricity during peak hours. However, as there is an obvious shift between the peak of load demand and peak of solar irradiation, the energy storage in the system should serve as a "commuter" of energy, i.e. it charges when solar irradiation is abundant and discharges when the electricity price is high. Note that the maximum load demand is about 2.5 KWh after normalization. • Problem solver: Problem (1) and its subproblem can be reformulated as a linear programming problem. For example, a subproblem from t 1 to t 2 , can be reformulated as Here r + t and r − t denotes the positive and negative part of r t , accordingly. Problem (13) can be further transformed in to a standard linear programming form. We use the linear programming solver provided by Mosek package in Python 3 to solve Problem (13) and recover the original solution by r t = r + t − r − t and s t = s 0 + t τ =1 (r + τ − r − τ ).

4.2.
Results. We perform several numerical experiments to test our theoretical analysis and compare the online solution and offline solution.
The dynamic regret of ARHC: Here we compare the performance of ARHC against the offline optimal algorithm. For simplicity, the maximum storage content Besides, the prediction window W is varied from 1 hour to 24 hours, i.e. one day, which is reasonable since one day look-ahead are usually available. We test n both AFHC and ARHC on Problem (2) and calculate its cost for every W . As shown in Figure 2a, the dynamic regret of ARHC is approaching zero as W increases, and is almost zero when one day look ahead are available. This behavior implies that with one day look ahead, ARHC can provide users of PV-ESS energy system almost the best online scheduling decision to optimize their cost. Also, in Figure 2a, we provide a normalized curve 0.015T W to denote the order of convergence in Corollary 1. The other dynamic regret curves apparently have the same or lower order of convergence as the normalized curve, which matches our analysis. Furthermore, one can observe different dynamic regret concerning different parameters π and σ. Note that the electricity retail price ξ t are much higher than π and σ, hence it yields the main cost. Larger π results in higher cost, since it restrict one to utilize the storage but to waste PV generated energy and purchase more electricity. On the other hand, larger σ results in lower cost, since it penalizes the surplus PV generated energy and forces one to utilize the PV energy and storage, which results in less electricity purchase.
In Figure 2b, we plotted the difference of cost between AFHC and ARHC. At the beginning, i.e. W = 1, the costs of both algorithms are the same. This is because when W = 1 ARHC and AFHC are essentially the same. Despite one point the cost of AFHC is lower than ARHC, for the rest of the points, ARHC yields obvious lower cost than AFHC. As the prediction window getting larger, the difference of AFHC and ARHC is approaching zero positively, since both algorithms are converging to the optimal one. This indicated our proposed method ARHC is competitive with AFHC. Solution patterns: Here we are interested in the solution ARHC presents, as well as the physical meaning of the solution. First of all, we set the maximum storage content C = 2.0 KWh, and the initial energy content s 0 = 0.0 KWh. And we set degradation penalty π = 0.001 and surplus energy penalty σ = 0.001. Besides, we consider one day look ahead, i.e. W = 24 and space n = 1, i.e. a household owns only one PV system and energy storage system.  We compare the ARHC solution with offline optimal solution. In Figure 3, only 48 hours of the solution are shown, for better visualization without loss of the pattern of data. As shown in Figure 3a, the storage contents t given by the ARHC has the same pattern of offline optimal s t , with slightly lower value for most of t. A lower value of ARHC may be due to the effect of past solution. Sinces t depends on s (t−W +1) t , ..., s (t) t and the first several solution may be inaccurate as the prediction information do not reach out long after t. In both days, the storage content follows the same pattern: it charges at night (1am-7am) when the electricity price is relative low; then it discharges (7am-9am) until PV energy are available; then it charges again to its maximum (10am-5pm) using PV energy; after that, as the peak electricity price comes (6pm-8pm) it discharges completely to handle the potential large cost; finally it stays empty until price decreases.
We note that this behavior is as expected in the Setup subsection: 1) It tries its best to shift the peak of demand/electricity price by exploiting the peak of solar irradiance. This is both beneficial for the customer and the power station since it reduces both the customer's cost and the station's pressure. 2) It only runs two cycles in one day, i.e. it charges and discharges twice in a day. This avoids unnecessary charging and discharging and hence can extend the batteries' life.
As shown in Figure 3b, the purchased electricityb t given by the ARHC has the same pattern of offline optimal b t , with a slightly different value for some of t. In both days, the purchased electricity follows the same pattern: the system purchases low cost electricity at night (1am-7am), it matches our discussion for Figure 3a; it stays zero when the solar irradiance is plenty enough to supply the load (11am-2pm); then it goes up again as both PV energy and storage energy are not enough to meet the load demand. The interesting phenomenon is, when the peak retail price arrives at 6pm, the system actually purchases the lowest electricity and uses storage to meet the load demand. Hence it again proves our discussion above, that ARHC scheduling will shift the peak as much as possible.
The Effect of the Storage Sizing: Here we discuss the effect of the size of storage system C in the model (1). Hence after the rest of the model is settled, i.e. π and σ, an optimal storage size can be determined by validating ARHC on different values of C.
As shown in Figure 4, we validate on different choices of degradation penalty π = 0.001, 0.005 and surplus energy penalty σ = 0.001, 0.005. Increasing the size of storage at first will decrease the total cost in a sharp way, but after certain steps, e.g. C = 10 as in Figure 4, the cost will reach an equilibrium. Therefore the lowest C with cost equilibrium can be chosen as the optimal storage size. Note that this observation has practical usage. For instance, suppose one has historical data on electricity price, solar irradiance and its load profile. Running ARHC on the historical data helps one decide the right amount of batteries in the storage to be installed. Although the installation cost is beyond the scope of this paper, one can balance the installation cost with the scheduling cost to find its optimal sizing. 5. Conclusion and future work. This paper studies online algorithms for PV-ESS energy system scheduling problem via both theoretical analysis and real-world data experiments. The problem contains cost from purchasing electricity, storage degradation and surplus PV generated energy [2]. We proposed a new algorithm Average Receding Horizon Control (ARHC) based on classical Receding Horizon Control. We showed that ARHC has a dynamic regret of order O(nT /W ) and hence it overcomes the drawback of RHC, which may perform bad in high dimension n ≥ 2 decision space even with sufficiently large enough look ahead W . Note that a competitive ratio 1 + O(1/W ) can also be derived if the objective function f t is supported by positive linear function. In the experimental section, we showed that ARHC with one day look ahead yields almost same performance as the offline optimal algorithm. And the solution given by ARHC matches our expectation on peak load shifting and minimum charging cycles. This paper assumes that perfect look ahead is available in the near future. However, in reality, forecasting noise is unavoidable. Whether ARHC will perform well or robust with respect to the forecasting noise is unclear. This is in the future pursue in this project. Besides, as in [11], a similar algorithm Averaging Fixed Horizon Control (AFHC) is proposed. But they are different because Theorem 3.3 shows that the solution is derived from FHC instead of RHC. As RHC certainly outperforms FHC, ARHC is expected to outperform AFHC. The thorough comparison between these two algorithms is another future direction for this project.