A rank-based multiple-choice secretary algorithm for minimising microgrid operating cost under uncertainties

Chunqiu XIA , Wei LI , Xiaomin CHANG , Ting YANG , Albert Y. ZOMAYA

Front. Energy ›› 2023, Vol. 17 ›› Issue (2) : 198 -210.

PDF (5304KB)
Front. Energy ›› 2023, Vol. 17 ›› Issue (2) : 198 -210. DOI: 10.1007/s11708-023-0874-8
RESEARCH ARTICLE
RESEARCH ARTICLE

A rank-based multiple-choice secretary algorithm for minimising microgrid operating cost under uncertainties

Author information +
History +
PDF (5304KB)

Abstract

The increasing use of distributed energy resources changes the way to manage the electricity system. Unlike the traditional centralized powered utility, many homes and businesses with local electricity generators have established their own microgrids, which increases the use of renewable energy while introducing a new challenge to the management of the microgrid system from the mismatch and unknown of renewable energy generations, load demands, and dynamic electricity prices. To address this challenge, a rank-based multiple-choice secretary algorithm (RMSA) was proposed for microgrid management, to reduce the microgrid operating cost. Rather than relying on the complete information of future dynamic variables or accurate predictive approaches, a lightweight solution was used to make real-time decisions under uncertainties. The RMSA enables a microgrid to reduce the operating cost by determining the best electricity purchase timing for each task under dynamic pricing. Extensive experiments were conducted on real-world data sets to prove the efficacy of our solution in complex and divergent real-world scenarios.

Graphical abstract

Keywords

energy management systems / demand response / scheduling under uncertainty / renewable energy sources / multiple-choice secretary algorithm

Cite this article

Download citation ▾
Chunqiu XIA, Wei LI, Xiaomin CHANG, Ting YANG, Albert Y. ZOMAYA. A rank-based multiple-choice secretary algorithm for minimising microgrid operating cost under uncertainties. Front. Energy, 2023, 17(2): 198-210 DOI:10.1007/s11708-023-0874-8

登录浏览全文

4963

注册一个新账户 忘记密码

1 Introduction

Nowadays, the rapid growth of energy demands and increasing environmental concerns contribute substantially to the flourishing field of renewable energy. The use of decentralised renewable energy sources calls for the development of microgrids. A microgrid consists of electric sources, energy storage, and controllable loads to operate islanded from or connected to the utility grid. Due to the inherent intermittent nature of the renewable energy resources and load demands, it is particularly challenging for a microgrid to tightly coordinate the distributed generations (DGs), both renewable and non-renewable energy resources, and the controllable demands.

The continued advancement of ICT (information and communication) enables electric appliances to have more flexible and controllable loads on the end-user side, facilitating the demand response (DR) program. Benefiting from the dynamic pricing induced by price-based DR, the electricity cost can be optimised by shifting the controllable loads from peak hours to off-peak hours. The benefits of dynamic pricing can indeed incentivise users to participate in DR programs but significantly increases the uncertainty in managing microgrids. The coordination of renewable energy resources, energy storage, load demands, and dynamic pricing complicate the energy management of a microgrid. Energy management has thus become a focus of such systems.

Building an energy management system (EMS) for a microgrid can be modeled as a cost-aware scheduling problem of controllable demands, distributed generation, and energy storage systems while meeting the user demands and specific constraints [1,2]. Machine learning and stochastic optimisation approaches are often used to handle the uncertainties in EMSs. However, extensive computing resources, statistical prerequisites, and large-scale labeled data set are the need to accommodate these approaches [36]. In addition, the performance of machine learning approaches deeply relies on producing accurate predictions on the run. These concerns urge a new solution that guarantees effectiveness without relying on future knowledge.

Online optimisation, with more refined time scales, is used in EMSs to handle the run-time uncertainties of the microgrid [79]. This paper aims to explore an online management scheme benefiting from renewable energy resources and dynamic electricity pricing to minimise the electricity cost in the microgrid. In addition, it investigates online scheduling for the real-world scenario, where the electricity pricing, renewable energy sources and load demands change dynamically and unexposed to the microgrid. Moreover, it also considers computational overhead in the work.

To address the above problem, it proposes a multi-choice secretary algorithm based real-time solution to minimise the operating cost of a microgrid while not violating any constraints. One of the most challenging problems is to utilize electricity from the valley of the dynamic electricity pricing, which can be deemed as a multi-choice secretary problem. It proposes a rank-based multiple-choice secretary algorithm to find the pricing valley under uncertainties. The proposed dynamic programming based solution achieves the minimum rank expectation of the selected electricity pricing.

The main contributions of this work can be summarized as follows:

A novel lightweight algorithm is proposed to minimise the operating cost of a microgrid. The rank-based multi-choice secretary algorithm proposed achieves an optimal average rank expectation of candidates selected. The solution effectively coordinates the demands, the renewable energy, and the energy storage. The performance of the solution proposed in this paper is compared to the benchmarks, which proves the efficacy of the solution in general practice.

2 EMSs for microgrids

Recently, the studies on the integration between renewable resources, load demands, and the dynamic electricity prices have been investigated in Refs. [13,6]. The main objective of a microgrid is to determine the optimal load schedule and energy storage behaviors, thus minimising the operating cost by increasing the renewable energy utilization while purchasing the insufficient electricity at an off-peak period when the electricity price is lower.

One common aim of previous studies is day-ahead energy management, supposing the needed future information is well-known by EMS and can be used in decision making. Carpinelli et al. [10] effectively reduced the energy cost and the peak load of a microgrid by a nonlinear optimisation model but did not consider the uncertainties of renewable distributed generation units in the model. Mazidi et al. [6] investigated the integration of renewable resources and DR scheme for a microgrid. A two-stage stochastic optimisation strategy was proposed to maximise the benefits obtained from the DR scheme. Nwulu & Xia [5] investigated the optimal scheduling problem to maximise the grid operator benefits in a grid-connected microgrid consisting of distributed generations, energy storage and schedulable loads. Jung & Yoon [11] implemented a mixed-integer linear programming (MILP) approach to shave the peak load of the microgrid. In Refs. [1,12], heuristic algorithms, particle swarm optimisation and genetic algorithm, were implemented to address the optimisation problems on minimising the operation cost in microgrids. The electricity price, load demand, and the renewable generation were prerequisites in both studies. There is no doubt that the operating cost of a microgrid can be minimised by shifting load demands and adjusting energy storage behaviors in accordance with dynamic pricing and renewable generations [1315]. However, these deterministic approaches can be inefficacy in the real world because they fail to handle the uncertainty of changing weather conditions, dynamic electricity prices, load demands, etc. Moreover, these deterministic approaches could go wrong in the real world because they are unable to handle the uncertainties that emerge from the operating environment. References [1618] investigated the uncertainties of EMSs for microgrids.

The price-based DR schemes have also been rapidly used in microgrids with the broad penetration of the Internet of Things (IoT) devices. The fine-grained pricing scheme empowered load demands to closely match the DGs’ status maximise the social welfare between loads and energy generations, but complicate the EMS of the microgrid at the same time [19]. The day-ahead-based solutions can hardly be capable of serving a fine-grained DR scheme, as the pre-planned schedule cannot easily respond to real-world scenarios. Most efforts have been made to estimate the random variables of a microgrid to address the uncertainty in microgrids [2022]. However, these proactive solutions lean on the accurate prediction of one or more uncertainty from the load demand, renewable generations and the electric pricing. Machine learning based approaches have recently been employed to provide the needed results for these predictions. Additionally, to handle the uncertainties in real-time EMS, reinforcement learning approaches have been used in Refs. [2325]. Although the machine learning-based approaches show notable cost reduction in these studies, these computational intensive approaches may not be real-world implementation friendly. First, high-quality labeled data are always difficult to acquire. Next, the computational resources of a microgrid may not be feasible for performing a complicated training process, while the transferred model may heavily be impacted on performance. Finally, the cold-start problem is still a substantial barrier to learning-based solutions [26].

3 System overview

In this paper, a microgrid, shown in Fig.1, is utilized as a target platform for the proposed EMS, which consists of an external power resource, a solar panel, a wind turbine, an energy storage, load devices, and a control module. The microgrid is often grid-connected to ensure a sufficient supply. The external power resources can be supplied from either the utility grid or other microgrids. Purchasing electricity from external resources, necessary when the internal energy generations are insufficient, is under a price-based DR scheme in coordinating to the supply and demand of the external energy resource.

The solar panels, wind turbines, and other renewable energy harvesting devices can be grouped as the renewable DGs (RDGs). The involvement of RDGs makes the microgrid less reliant on traditional fossil fuels. The supplies of these RDGs are not stable due to the intermittent nature of renewable energy resources. Meanwhile, load demands and the supplies from RDGs are often mismatched. Therefore, batteries are employed in the microgrid to store renewable energy that cannot be instantly consumed. However, in a real-world microgrid, the system scale of the battery, RDGs are often incompatible with the users’ demands. In addition, the users’ habits can make the demands irregular and volatile. The external energy supply is compulsory when peak usage exceeds the capacity of the internal resources.

The non-deterministic renewable energy generations, the mismatch between the supplies and the load activities, and the dynamic electricity pricing pose a critical challenge to the microgrid. A proper EMS is vital for such a system to address the abovementioned problems. The existing solutions have verified the efficacy of day-ahead scenarios, where the parameters are exposed to the control module in advance. The system in this paper demonstrates a more general scenario in which the future renewable generations, load demands, and dynamic pricing are indeterministic to the control module. Thus, dealing with the uncertainties with the limited computational resource on the local control module is the key focus of this microgrid. In such a system, the executions of all load demands are scheduled by the control module. The electricity loads can be categorised into two types, flexible jobs which can be reserved for later executions and non-deferrable jobs which are compulsory to execute immediately when arrival. Meanwhile, the battery behaviors are also scheduled by the control module. The battery is utilized to store surplus renewable energy and grid electricity when its price is low. When the microgrid is under load, the energy resources are selected by the control module aiming to minimise operating cost.

4 Problem assumption and formulation

The principal task of the control module of a microgrid is to minimise the electricity cost by shifting the loads and coordinating the electricity supply from multiple resources. This task can be formulated as an operating cost minimisation problem under constraints. Discretisation was used on system modeling for simplicity, where the continuous variables are always assumed to be a constant over a fine-grained and equality-sized time slot.

4.1 Load demand modeling

Let any indivisible electrical operation be a task τ. All load demands can be represented as a set of tasks Θ= {τ1,τ2,τ3,τ4,...,τk}. The ith job is denoted by τi, where ri, ei, pi, and di are used to denote its release time, execution time, power consumption rate in each time slot, and absolute deadline, respectively. A task is also seen as the minimum unit of a load demand. If any task is valid, achievable on time (ri+eidi), it will not be interruptible once start. A task is not known to the control module until its release time ri. Any task can be either classified as instant job, where ri+ei=di; or deferrable job, where ri+ei>di.

4.2 Electricity supply modeling

The electricity is supplied from one or multiple sources, including internal energy sources, batteries, external sources, the utility grid, and other microgrids. This requires switching between multiple resources to maintain a stable and continuous supply. The types of local DGs contain both traditional DGs, controllable and normally fossil-fuel driven; renewable DGs, no operational cost but uncontrollable. In this paper, all local DGs are considered to be uncontrollable renewable energy harvesting devices. For those microgrids with traditional DGs, these fossil fuel-powered devices can be considered as external resources due to the fact that they provide electricity at a cost. The external energy resources can also include other microgrids other than the utility grid. When a microgrid has multiple external supplies, it can simply pick the source with the lowest current cost. Therefore, the multiple resources can still be regarded as one external source, with their pricing to be the minimum value of them at each time slot. For simplicity, it is assumed that the utility grid is the only external source to the system.

4.2.1 Local DGs

All local DGs are considered renewable energy harvesting systems, of which generation is uncontrollable. The total renewable generation of all local DGs is ηt at the time slot t. Its actual value is not exposed to the microgrid until the time t. The challenge is to entirely utilize renewable energy when the future ηt' are unknown.

4.2.2 Battery

The maximum battery storage is limited by its capacity βc. The battery utilization rate is denoted as bt. Let bt>0, bt=0, and bt<0 represent three statues of the battery, charging, idle, and discharging, respectively. The battery cannot charge and discharge concurrently. When the system decides to charge the battery, the electricity can be utilized from one or more power sources simultaneously. An ideal battery model is considered in this paper for the sake of simplicity. Therefore, no energy loss and battery degradation are addressed.

4.2.3 Electricity purchasing

The electricity purchased from the external sources is δt at the time slot t, pricing at ηt. A price-based DR scheme is applied in the proposed microgrid, where the purchasing cost constantly fluctuates over time. The energy purchased can either be consumed by the current load directly or saved up by the battery for later utilization.

4.3 Cost function and constraints

Min:C(δ)=Σδtηt,tT,

s.t.δt+αte=lt+bt,tT,

0αteαt,tT,

βt=Σt=1tbt,tT,

0βtβc,tT,

btβt,tT,

btβcbt,tT,

θ(τi)(t)={0,1},tT,τiΘ,

lt=Σi=1|Θ|θ(τi)(t)pi,tT,

ei=Σt=1Tθ(τi)(t),τiΘ,

Σti=t't+ei1θ(τi)(t)=et,τiΘ,ti[ri,diei1].

Cost function Eq. (1). The sole objective of the proposed solution is to minimise the electricity purchasing cost.

Supply constraints (From Eq. (2) and Eq. (3)). Equation (2) ensures that the energy supply always satisfies the demands. In this constraint, bt can be either positive or negative. Here, the battery is the supply source when the battery is discharging (bt<0), and is the load device when the battery is charging (bt>0). Equation (3) ensures that the local DGs can neither become a load device nor provide more energy supply than its actual generation. Energy wastage occurs when local generations are not being fully utilized αte<αt.

Battery constraints (From Eq. (4) to Eq. (7)). As mentioned, the battery model used in this system is an ideal one without degradation and energy loss. Equation (4) ensures that the battery storage level is only changed with charging and discharging behaviors. Equations (5)–(7) together ensure that the battery storage level stays within a valid range and the battery utilization rate bt is limited accordingly.

Task scheduling constraints (From Eq. (8) to Eq. (11)). Equation (8) ensures that the status of any task θ(τi)(t) can be either inactive (0) or active (1). Equation (9) ensures that the total task loads at any time is the summation of the consumption rate of all active tasks. Equation (10) lets the total active period of any task i exactly equal its execution time required. Due to the fact that a task is uninterruptible, Eq. (11) makes sure that any task is scheduled to execute continuously after its release time and before its absolute deadline.

5 Methodology

In this section, we propose RMSA for microgrids to handle the uncertainties coming from load tasks, local generations, and dynamic electricity prices. To do so, it is imperative to increase the utilization rate of local generations and decrease the electricity purchasing expenses. The intuition is that when local generations are below load demands, external electricity purchases can easily cause a considerable operational cost if not carefully chosen. An important strategy to render this intuition is to spare energy by purchasing electricity from external sources when the price is low. To achieve a lightweight algorithm, no explicit mechanisms are used to estimate future variables. We introduce a rank-based multiple-choice secretary algorithm for energy management under the DR scheme, which guarantees a linear-logarithmic computational complexity to make online decisions under uncertainties. To plainly describe the lightweight online management algorithm, it is divided into three parts. A brief overview of the algorithm is shown in Fig.2. At each time slot, any new arrival tasks are first processed by Algorithm 1. The intuition of Algorithm 1 is to determine how to select up to ei time slots with the lowest electricity prices between its release time ri and absolute deadline di by generating a bunch of thresholds to select ei candidates from a total of diri candidates for any task ti. The thresholds are related to both the positions of the slot in all candidates and the selection numbers that have already been made. Thus, the results of Algorithm 1 are stored by a two-dimensional array. Each arrival task with its thresholds is stored in a waiting queue until its completion. At each time slot, all tasks in the waiting queue are processed by Algorithm 2, which makes the decision on whether to purchase and reserve the electricity at the current slot based on the rank threshold and the current observed rank. Fig.3 presents an example. A task is assumed, of which the execution time and absolute deadline is 3 and time slot 10, arrives in time slot 1. The system knows the observed rank of the current electricity price at each time slot, although the true rank is not revealed. To be clear, the current observed rank for a certain task is the number of lower electricity prices observed since the arrival of this task. For instance, the observed rank of the time slot 4 is 2, as there is only 1 slot that has a lower electricity price between time slot 1 and 4. In this example, Algorithm 2 selects time slot 2, 6, 7 based on the observed ranks and the rank thresholds. After applying Algorithm 2 to all waiting tasks, the microgrid obtains a preliminary electricity purchase proposal. Thereafter, Algorithm 3 is involved to coordinate the loads and electricity supplies. By the processes above, the system thus decides the task scheduling, battery operations, and electricity purchasing. The details of the algorithm are presented in the rest of this section.

5.1 Threshold generation

Threshold generation starts from a single task τi, {ri,ei,pi,di} scenario. Here, the task is set to be a deferrable one, di is far greater than ri+ei, and the needed energy supplements are purchased under a price-based demand scheme. In a microgrid, each task τi can be seen as a load demand, eipi, to be fulfilled by the task’sabsolute deadline di. To reduce the electricity cost, the key challenge is to select the ideal electricity purchasing timing between ri and di when the future electricity prices are unknown to the system. The use of the battery allows the microgrid to purchase external electricity to ensure task completion while the price is relatively low. In short, at each time slot, the approach decides whether to purchase and preserve the electricity to complete τi. The system has to make an instant and non-regrettable decision in real-time whenever a new price is revealed. The system has access to the current and past prices but not awareness of future variations. The above objective can be seen as a variant of the secretary problem, a well-studied problem in optimal stopping theories. If there is no limitation to the battery charging rate, the microgrid control module seeks the optimal electricity purchasing opportunities at all times. In this case, the problem is the same as the CSP. The system can achieve the minimised possible purchasing cost by obtaining all required electricity from the minimum price between the release and execution of the task. Despite the fact that the traditional CSP solution [27] guarantees a roughly 37% chance of finding the best timing, the expected rank selected can barely reach n/2e, where n is the number of candidates, e is Euler number. When aiming to minimise the electricity cost, the expected rank should overweight the probability of finding the best one. In CSP, the expected rank was later improved to e∙log(n/2) [28].

Due to the hardware limitations in a real-world microgrid, it is often impossible to seek minimal cost by purchasing the full amount of required electricity at once. The number of electricity purchasing slots desired can be varied in real-world systems. We tend to avoid the peak load increments on the microgrid because the high peak can extensively increase the hardware cost. In this paper, to control the peak-to-average ratio (PAR) increments, ei time slots are chosen to reserve the electricity for any task τi. Therefore, the allocated electricity utilization rate is the same as the utilization rate when τi executes normally without management. Then the problem becomes a multiple-choice secretary one. The previous study [29] proposed a virtual algorithm-based lightweight online scheduling (VALOS) by implementing a variant of the virtual algorithm (VA) in Ref. [30]. VA derives the C2PS from CSP, which makes it inherit the “nothing but the best” target. The limitations of VALOS can be concluded from two aspects. First, the expected rank selected is not minimised. Second, the amplification factor in τi increased the PAR. To address these challenges, we propose a rank-based multiple-choice secretary algorithm as an extension of the dynamic programming based solution in Ref. [31].

Between the release and completion of a task τi, we aim to find equal amounts of time slots of its execution time ei that the electricity purchasing cost is low. ϑi is used to denote the total duration between its releasing time ri and deadline di, and ti to denote the current relative time to its arrival time, ti=tri+1. Let a1i,a2i,a3i,...,aϑii, an independent and identically distributed (i.i.d.) random sequence, denote the sequence of the true rank of the electricity pricing between ri and di. For example, a3i=2 means that the electricity price is rank 2 (the second lowest price in the selected period) when ti=3 (where t=ri+2). Meanwhile, γtii is used to denote the relative rank observed at time ti. According to the above information, it is known that the probability is

P(γtii=ω)=1ti,ω{1,2,3,...,ti}.

When observing a relative rank ω, the probability to have the true rank σ is

P(atii=σ|γtii=ω)=(σ1ω1)(ϑiσtiω)/(ϑiti).

Therefore, if we decide to pick the current slot for any known ti and ω, the expectation on true rank is

E(atii|γtii=ω)=σ=1ϑiσP(atii=σ|γtii=ω)=ωϑi+1ti+1.

Now the expectation on the true rank can be minimised, with an optimal rule (ti,ω), by solving a backward induction. For any ti = 1,2,3,...,{ϑi}, ϵti1 is the minimal expectation if the selection must be made on or after ti. The backward induction starts from the base case (ti = ϑi), which is the expected true rank of the last candidate.

ϵϑi1(1)=E(ωϑi+1ϑi+1),=1ϑi1ϑiω=ϑi+12,(ω=1,2,3,...,ϑi).

Recursively, for any ti={ϑi1,ϑi2,ϑi3,...,2,1}, it can be concluded that the expected true rank selected on or after the current time is

ϵti1(1)=E(min(γtiiϑi+1ti+1,ϵti(1)))=1tiω=1timin(ωϑi+1ti+1,ϵti(1)).

According to Eq. (16), a selecting rule can be concluded that: make the selection at the time slot ti if its expected true rank is less or equal to the optimal expectation in the future, when γtii(ϑi+1)/(ti+1)ϵti(1), or continue to observe following time slots otherwise. Thus, it can be concluded that the threshold of γtii for a single selection is

ϖti(1)=[ϵti(1)ti+1ϑi+1],(ti=1,2,3,...,ϑi2,ϑi1).

The last slot must be selected if no selection has been made:

ϖϑi(1)=ϑi.

According to Eqs. (16) and (17), the expected value of true rank can be transformed to

ϵti1(1)=1ti(γtii=1ϖti(1)γtiiϑi+1ti+1+ϵti(1)(tiϖti(1)))=1ti(ϖti(1)(ϖti(1)+1)2ϑi+1ti+1+ϵti(1)(tiϖti(1))).

By now, the corresponding value of expected true ranks and relative ranks can be recursively obtained, which implies a solution for minimising the expected rank in CSP. Now, the multiple-selection case can be discussed. The base case for 2-selection is at time slot, ti=ϑi1, when 2 selections are compulsory to be made from the left two candidates, and the expected rank is

ϵϑi2(2)=2E(ωϑi+1ϑi+1),=2ϑi1ϑiω=ϑi+1,(ω=1,2,3,...,ϑi).

Recursively, for any ti={ϑi2,ϑi3,...,2,1}, it can be concluded that the corresponding expected rank is

ϵti1(2)=E(min(ϵti(1)+γtiiϑi+1ti+1,ϵti(2)))=1tiΣω=1timin(ϵti(1)+ωϑi+1ti+1,ϵti(2)).

Similar to the above, a selecting rule can be concluded, which guarantees a minimised expected rank, for 2-selection case: select the time slot ti if its expected true rank is less or equal to the optimal expectation in the future, γtii(ϑi+1)/(ti+1)ϵti(2)ϵti(1), or continue to observe following time slots otherwise. Once a selection has been made, the problem is then transformed into the single-selection case (CSP). Thus, it can be concluded that the threshold of the observed rank on the two-selection case is

ϖti(2)=(ϵti(2)ϵti(1))ti+1ϑi+1,(ti=1,2,3,...,ϑi2),

and the second last slot must be selected if two selections are expected form the left candidates

ϖϑi1(2)=ϑi.

According to Eqs. (21) and (22), the expected value of true rank can be transformed to

ϵti1(2)=1ti(γtii=1ϖti(2)(γtiiϑi+1ti+1+ϵti(1))+ϵti(2)(tiϖti(2)))=1ti(((1+2++ϖti(2))ϑi+1ti+1+ϖti(2)ϵti(1)+ϵti(2)(tiϵti1(2))=1ti(ϖti(2)(ϖti(2)+1)2ϑi+1ti+1+ϖti(2)ϵti(1)+ϵti(2)(tiϖti(2))).

The equations above can be concluded into a more generalized format for multiple-selection cases. Here, x is used, with valid range 1xϑi, to denote the number of selections to be made. The base case for any x is ti=ϑix+1 when the left candidates equal the number of selections to be made:

ϵϑix(x)=xE(ωϑi+1ϑi+1),=xϑi1ϑiω=x2(ϑi+1),(ω=1,2,3,...,ϑi).

Similar to the 2-selection case, the selection is compulsory to fulfill the expected amount of the total selection when

ϖϑix+1(x)=ϑi.

Recursively, for any ti={ϑix,ϑix1,ϑix2,...,2,1}, it can be concluded that the corresponding expected rank is

ϵti1(x)=E(min(ϵti(x1)+γtiiϑi+1ti+1,ϵti(x)))=1tiω=1timin(ϵti(x1)+ωϑi+1ti+1,ϵti(x)),

and the adaptive threshold is

ϖti(x)=(ϵti(x)ϵti(x1))ti+1ϑi+1,(ti=1,2,3,...,ϑix).

By combining Eqs. (27) and (28), a general equation can be concluded as

ϵti1(x)=1ti(γtii=1ϖti(x)(γtiiϑi+1ti+1+ϵti(x1)))+ϵti(2)(tiϖti(x))=1ti(1+2+...+ϖti(x))ϑi+1ti+1+ϖti(x)ϵti(x1)+ϵti(2)(tiϖti(x))=1ti(ϖti(x)(ϖti(x)+1)2ϑi+1ti+1+ϖti(x)ϵti(x1)+ϵti(2)(tiϖti(x))).

Now all the general equations are obtained to produce the ϖti(x) and ϵti1(x) recursively. The value of ϵti1(x) will be used as the threshold of the observation rank for corresponding progress. The proposed solution is present in a pseudocode style in Algorithms 1 and 2 to determine the energy reservation schedule on every task.

Algorithm 1 is applied to any new release task. The inputs include the release time ri, execution time ei, and absolute deadline di, or the task τi. To clearly present the execution of Algorithm 1, the total time between the release and deadline of a job is denoted as ϑ. Then, the system initialises 2 two-dimensional array to store the minimum expected ranks and thresholds accordingly. For any task τi, a total number of eiϑi thresholds are appended in a 2-d array format. For example, ϵ[2][5] indicates the minimum expected rank summation of 2 candidates selected from the 5th to the ϑth candidates. The value of ϖ[2][5] represents the threshold of the 5th candidates if 2 selections are expected on or after this time.

5.2 Timing determination

Once the thresholds are determined, the process in Algorithm 2 is relatively simple on deciding whether a time slot is selected. The input includes the current time t, target task τi and its related status including its thresholds generated in Algorithm 1, counter c, and current observed rank λ on electricity price from its release. The first step is to transfer time t to ti, the relative time to its release. The counter c denotes the number of time slots selected. Thus, the expected amount left is eic. The corresponding threshold is recorded as ϖ[eic][ti]. The observed rank λ, represents the rank of current electricity purchasing price in comparison to the prices of ri in the past and the present. The current slot is chosen if the observed rank is less or equivalent to the corresponding threshold.

5.3 Microgrid energy management

The integrated task scheduling and energy management scheme are presented in Algorithm 3. The algorithm executes in an online fashion. In each iteration, the system receives all new release tasks, current local generations and electricity purchasing prices, then make entangled decisions on (1) the electricity purchasing amount from the external sources, (2) the schedule of released tasks, and (3) the battery behaviors.

First, any newly released task is pre-scheduled based on its latest execution time and added to a priority queue Q. The pre-arranged latest execution increases the opportunities for reducing the operational cost by accumulating local no-cost generations or reserving low-cost electricity from external sources. The system applies Algorithm 1 to this task and stores the thresholds obtained. It also maintains a priority queue for each task in Q to record the electricity cost, at each time between its release to the present time, in ascending order. Each task is also assigned a counter, initialised as 0, to record the time slots already selected for this task.

Second, execute and remove any waiting tasks in Q whose pre-scheduled start time is reached. Then, execute Algorithm 2 for all waiting tasks in Q. Once the current time slot is selected by a waiting task, the system increases the electricity purchase rate, denoted as δt, by the power consumption rate and the counter c by 1 of the task. The processes above produce a preliminary electricity purchasing proposal δt.

After determining a preliminary electricity purchasing amount, the algorithm now can generate the final decisions. The supply resources include the electricity purchased δt, the total local generations ate, and the battery storage βt.

The total electricity purchase will be increased if the total supplies cannot fill the total demands lt, which is the summation of the electricity consumption rate of all executing tasks. In contrast, when supply is sufficient and the battery capacity is going to be reached, the algorithm endeavors to entirely utilize the surplus energy by executing the top priority tasks from the waiting queue Q. Similarly, the electricity purchase is adjusted accordingly when newly joined tasks breach the balance between the supplements and demands.

5.4 Computational cost

Observe that, in Algorithm 1, the computation cost of each task is eϑ , e here refers to the execution time of the task, on arrival to determine the thresholds and O(logϑ) at the rest of the time before completion. For a system with up to n tasks running concurrently, the online computational complexity of RMSA is O(neϑ).

6 Experiment and discussion

In this Section, first, RMSA is implemented and its theoretical performances on various scenarios is verified. Then, its performance in real-world scenarios with AEMO [32], REDD [33] and UK-DALE [34] data sets is demonstrated. The experiment results of RMSA, VALOS, and the predictive method [29] are compared. The performances are evaluated in various microgrids with divergent user preferences.

First, we evaluate the performance of RSMA with different schedule length, the multiples of the lifetime of a task compared to its duration, in Fig.4. The scatter plot represents the candidates arriving in an i.i.d random sequence. The vertical axis represents the absolute rank of each candidate, and the horizontal axis represents timeline or index of each candidate. The selected candidates are marked out with red crosses. In practical scenarios, more task flexibility implies the increments on the candidate amount, which empowers the microgrid to obtain a lower electricity price from a wider time range. In this group of experiments, the desired selection number is fixed to 3, but the total number of candidates is increased. As the selection number is unchanged, the average ranks of all four scenarios are 2, when obtaining the optimistic result with the absolute rank 1, 2, and 3 selected. Fig.4(a) presents the results of 3 selections out of a total of 10 candidates. The expectation average rank by the algorithm is roughly 3.26. The absolute rank of the 3 selections are 1, 2, 5 and the average rank selected is 2.67. In the rest of the experiments in Fig.4, the possible observation candidates are increased to 20, 50, 250 separately. In Fig.4(b), when the candidates increase to 20, the algorithm achieves an optimal selection while the expectation average rank is 3.89. In Fig.4(c), when the candidates increase to 50, the average rank of selections is 4.33 while the expectation is 4.48. In Fig.4(d), when the candidates increase to 250, the average rank of selections is 4 while the expectation is 4.95. Besides, this experiment is repeated 100 times and the concluded results are presented by the box-plots in Fig.5. From the box-plots, it can be observed that the average rank of each box-plot is closed to the corresponding theoretic expectation by the approach. It can also be observed that the average rank of the selections is very similar though the candidate size increases 25 times. Additionally, according to the theoretical expectation, the average rank of the selections is only 5.13 even the candidate escalates to 1.0×108. Therefore, it can be concluded the RMSA is applicable regardless their schedule lengths. Although the increments of the candidate size significantly complicate the problem, the implementation of RMSA obtain an outstanding performance.

To further evaluate its performance over diverse scenarios, the selection size is adjusted when fixing the candidate size to 1000. The target selection numbers are set to 15, 50, 100, and 300 in the four scenarios in Fig.6. As shown in the scatter plot, the selections represented by red crosses concentrate at the bottom of the plot areas. Precisely, the expectation average rank by RMSA are 11.77, 29.91, 55.15, and 154.67, while the optimal average rank can be 8, 15.5, 25.5, and 150.5 among the four settings. The practical average selection ranks achieved in the experiments are 10.47, 26.3, 52.36, and 154.13. Thus, it can be concluded that the practical results fulfil the expectations and the expectations approaches the optimal results along with the increments on selection numbers.

Thereafter, the real-world performance of RMSA is evaluated by implementing various solutions demonstrating typical microgrid scenarios over a 4-week period. The microgrids in the experiments are partially supplied by renewable energy from local photovoltaic panel, while the rest of the electricity is purchased from external resources. The experiments cover variant settings of the schedule length. The results are shown in Fig.7.

The experiments contain the results from four approaches: the offline approach, as the upper bounds where the future parameters are provided to the microgrid directly; the Green Energy First (GEF) approach, as the lower bounds where the microgrid simply priority utilizes the zero-cost local renewable generations; the predictive approach, where operations are based on accurate predictions on local generations and near-future electricity price; VALOS [29], a light-weight online approach without predicting components; and RMSA, the solution proposed in this paper. Fig.7 consists of the results of eight-group experiments at variant schedule lengths to evaluate the performances of each approach over variant user preferences. The results of the offline approach, GEF, predictive, VALOS, and RMSA are presented in blue, red, purple, green, and orange bar respectively. In the offline case, the knowledge of all future parameters enables an optimal result by always selecting the lowest-price timings to supplying the exact energy needs after extracting local renewable generations. Therefore, the offline results are used as the upper bound 100% in each group. To clearly compare the performance, the operation cost reduction in each case is converted to the ratio of its cost reduction to that in the offline case. Similarly, GEF results are used as the baseline in each group. As shown in Fig.7, the predictive approach, VALOS, and RMSA present adequate improvements. RMSA outperforms the predictive case and VALOS to some extent. Although there are not much differences between the overall performances of these three approaches, the advantages of RMSA is especially obvious at a long schedule length. The reason for this is that the electricity pricing typically only fluctuates within a narrow range over a short period, which makes the results obtained by these three approaches similar when the schedule length is low.

Compared to the traditional utility grid, a microgrid can have extensive fluctuations in electricity price over a short period. Therefore, these approaches are compared in a new scenario with drastic fluctuating price, which also makes the comparison more visible. The results of the predictive approach are not presented in this part due to its failures on handling the price uncertainties in this experiment. The results of the other four approaches are presented in Fig.8. It can clearly be observed that RMSA outperforms VALOS over all scenarios although VALOS obtains an adequate cost reduction in each experiment. Besides, it is noticeable that the performance of RMSA is approaching the offline result along with incremental schedule length.

The peak electricity utilization load is also a critical concern of the microgrid, which is commonly measured by the peak to average ratio (PAR). Now, the PARs of GEF cases is used as the baseline. Fig.9 presents PARs of offline, predictive, VALOS, and RMSA cases by blue, red, green, and orange bars. The incremental schedule length causes more overlaps of the lifetime of the different tasks, which lead to the increments of PAR. Compared to the VALOS and predictive approach, RMSA maintains the lowest peak utilization of all scenarios. The results implies that the RMSA approach relatively disperses the energy loads. In certain microgrids, the peak utilization may be critically limited. Thus, it is important to know the performance of an approach when the peak load is limited.

Fig.10 demonstrates the scenarios with the confined maximum utilization rates, which requires that the approaches are able to shave the spike load. As shown in Fig.10, the right bar chart presents the performance of RMSA. The green bar represents a relative relax peak limitation scenario, where RMSA can shift the loads to fewer points with the lowest price. In this case, the PAR is around 2.5 times than the GEF case. Then, the algorithm is forced to distribute the load into more points in a peak-restricted case, where the PAR is roughly 1.5 times in the GEF case. The overall performance is hardly influenced. In contrast, the performance of VALOS is tremendously influenced when confining the peak usage. Besides, VALOS still results in a roughly 2.5 times PAR than the GEF case when forced to make more selections. A comparison of the results of RMSA and VALOS indicates that the RMSA approach dominates the peak limitation test.

7 Conclusions

In this paper, a novel lightweight algorithm is proposed to minimise the operating cost of a microgrid under multiple uncertainties. The experiment results show that the solution to the algorithm proposed effectively reduces the electricity purchase cost while confining the increase of peak load over multiple scenarios, which outperforms the benchmarks in terms of performance, stability, and universality.

In the future, experiments will be conducted to explore such systems with untrusted predictions. In this work, the system is unaware of future variables regarding electricity prices, load demand, and local generations. It will be interesting to study if limited future information by rough predictions can be helpful for the existing solution. The current solution individually treats the energy pre-reservation process for each waiting task. The next step is to improve RMSA to deal with all known load demands. Furthermore, the current solution focus on a real-time price-based DR scheme, to fulfil a wider range of scenarios, extending such a solution to multiple types of DR schemes can be another direction in the future.

References

[1]

Harsh P, Das D. Energy management in microgrid using incentive-based demand response and reconfigured network considering uncertainties in renewable energy sources. Sustainable Energy Technologies and Assessments, 2021, 46: 101225

[2]

Gouveia C, Moreira J, Moreira C L. . Coordinating storage and demand response for microgrid emergency operation. IEEE Transactions on Smart Grid, 2013, 4(4): 1898–1908

[3]

Li Y, Li K, Yang Z. . Stochastic optimal scheduling of demand response-enabled microgrids with renewable generations: An analytical-heuristic approach. Journal of Cleaner Production, 2022, 330: 129840

[4]

Verbraeken J, Wolting M, Katzy J. . A survey on distributed machine learning. ACM Computing Surveys, 2021, 53(2): 1–33

[5]

Nwulu N I, Xia X. Optimal dispatch for a microgrid incorporating renewables and demand response. Renewable Energy, 2017, 101: 16–28

[6]

Mazidi M, Zakariazadeh A, Jadid S. . Integrated scheduling of renewable generation and demand response programs in a microgrid. Energy Conversion and Management, 2014, 86: 1118–1127

[7]

Shi W, Li N, Chu C C. . Real-time energy management in microgrids. IEEE Transactions on Smart Grid, 2017, 8(1): 228–238

[8]

Elsied M, Oukaour A, Youssef T. . An advanced real time energy management system for microgrids. Energy, 2016, 114: 742–752

[9]

Yan J, Menghwar M, Asghar E. . Real-time energy management for a smart-community microgrid with battery swapping and renewables. Applied Energy, 2019, 238: 180–194

[10]

Carpinelli G, Mottola F, Proto D. Optimal scheduling of a microgrid with demand response resources. IET Generation, Transmission & Distribution, 2014, 8(12): 1891–1899

[11]

Jung S, Yoon Y T. Optimal operating schedule for energy storage system: Focusing on efficient energy management for microgrid. Processes (Basel, Switzerland), 2019, 7(2): 80

[12]

Astriani Y, Shafiullah G M, Shahnia F. Incentive determination of a demand response program for microgrids. Applied Energy, 2021, 292: 116624

[13]

Ebrahimi M R, Amjady N. Adaptive robust optimization framework for day-ahead microgrid scheduling. International Journal of Electrical Power & Energy Systems, 2019, 107: 213–223

[14]

Kumar K P, Saravanan B. Day ahead scheduling of generation and storage in a microgrid considering demand side management. Journal of Energy Storage, 2019, 21: 78–86

[15]

Aluisio B, Dicorato M, Forte G. . An optimization procedure for microgrid day-ahead operation in the presence of CHP facilities. Sustainable Energy, Grids and Networks, 2017, 11: 34–45

[16]

Khodaei A, Bahramirad S, Shahidehpour M. Microgrid planning under uncertainty. IEEE Transactions on Power Systems, 2015, 30(5): 2417–2425

[17]

Motevasel M, Seifi A R. Expert energy management of a micro-grid considering wind energy uncertainty. Energy Conversion and Management, 2014, 83: 58–72

[18]

Luo L, Abdulkareem S S, Rezvani A. . Optimal scheduling of a renewable based microgrid considering photovoltaic system and battery energy storage under uncertainty. Journal of Energy Storage, 2020, 28: 101306

[19]

Alotaibi I, Abido M A, Khalid M. . A comprehensive review of recent advances in smart grids: A sustainable future with renewable energy resources. Energies, 2020, 13(23): 6269

[20]

Agüera-Pérez A, Palomares-Salas J C, González de la Rosa J J. . Weather forecasts for microgrid energy management: Review, discussion and recommendations. Applied Energy, 2018, 228: 265–278

[21]

Olivares D E, Lara J D, Cañizares C A. . Stochastic-predictive energy management system for isolated microgrids. IEEE Transactions on Smart Grid, 2015, 6(6): 2681–2693

[22]

Li W, Chang X, Cao J. . A sustainable and user-behavior-aware cyber-physical system for home energy management. ACM Transactions on Cyber-Physical Systems, 2019, 3(4): 1–24

[23]

Li H P, Wan Z Q, He H B. Real-time residential demand response. IEEE Transactions on Smart Grid, 2020, 11(5): 4144–4154

[24]

ZhangCKuppannagariS RKannanR, . Building HVAC scheduling using reinforcement learning via neural network-based model approximation. In: Proceedings of the 6th ACM International Conference on Systems for Energy-Efficient Buildings, Cities, and Transportation, 2019, 287–296

[25]

Lu R, Hong S H, Yu M. Demand response for home energy management using reinforcement learning and artificial neural network. IEEE Transactions on Smart Grid, 2019, 10(6): 6629–6639

[26]

XuS CWangY XWangY Z, . One for many: Transfer learning for building HVAC control. In: Proceedings of the 7th ACM International Conference on Systems for Energy-Efficient Buildings, Cities, and Transportation, Virtual Event, Japan, 2020

[27]

Ferguson T S. Who solved the secretary problem?. Statistical Science, 1989, 4(3): 282–289

[28]

BajnokBSemovS. The “thirty-seven percent rule” and the secretary problem with relative ranks, 2015, arXiv preprint:1512.02996

[29]

Xia C, Li W, Chang X. . Lightweight online scheduling for home energy management systems under uncertainty. IEEE Transactions on Sustainable Computing, 2022, 7(4): 887–898

[30]

BabaioffMImmorlicaNKempeD, . A knapsack secretary problem with applications. In: Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques. Springer, 2007, 16–28

[31]

Denis V. Lindley. Dynamic programming and decision theory. Journal of the Royal Statistical Society. Series C, Applied Statistics, 1961, 10(1): 39–51

[32]

AustralianEnergy Market Operator. AEMO data model archieve. 2021, available at the website of nemweb

[33]

Zico Kolter J, Johnson M J. Redd: A public data set for energy disaggregation research. In: Workshop on Data Mining Applications in Sustainability (SIGKDD), San Diego, CA, 2011, 25: 59–62

[34]

Kelly J, Knottenbelt W. The UK-DALE dataset, domestic appliance-level electricity demand and whole-house demand from five UK homes. Scientific Data, 2015, 2(1): 1–14

RIGHTS & PERMISSIONS

Higher Education Press 2023

AI Summary AI Mindmap
PDF (5304KB)

3701

Accesses

0

Citation

Detail

Sections
Recommended

AI思维导图

/