• Nem Talált Eredményt

Consumer side Management and Control Algorithms

2.6 Community-Level Optimization Framework

2.6.3 Appliances Scheduling Algorithm

In this section, the scheduling of the appliances has similarities with the one presented in section 2.3. However, in this scheduling algorithm, the coordination of the energy procure-ment from each available energy source is included for both the shiftable and nonshiftable appliances. Therefore, the notations of the variables used before are revised to simplify the algorithm.

Just like before, the scheduling algorithm decides when to switch on and/or off the appliances to satisfy comfort constraints and minimize the electricity costs. In addition to the mentioned objectives, the algorithm here maximizes the usage of the locally generated electric power. The algorithm coordinates the transitioning between the distributed energy resources and the grid. The MIP approach is well suited to solve such a problem, and it is formulated next.

Decision Variables

Let the binary variables Sh,gd,i,jk and Sh,lc,i,jk designate the state of the shiftable set Ah,s in household h if it is supplied by the grid and the distributed energy resources, respectively.

Sh,gd,i,jk (resp. Sh,lc,i,jk ) can be 1 if thejth of applianceiis on at the time slotk, otherwise 0.

The nonshiftable appliances may draw primarily from the distributed energy resources and the grid if needed. Hence, the decision variables N Sh,lck and N Sh,gdk denote the amount of energy drawn from the resources as mentioned earlier, respectively.

To show the ability of the energy exchange among the consumers, the decision variables related to the neighborhood are separated from the distributed energy resources. Hence, let Sh,N,i,j and N Sh,N be the decision variables for Ah,s and Ah,ns appliances supplied by the neighboring households, respectively.

The charging and discharging powers of the EV and the ESS are considered decision variables to find the optimal charging/discharging power at each time slot k subject to the constraints (2.36)-(2.40).

Shiftable Appliances Constraints

If an appliance in Ah,s is on, all the phases j = [1,...,nldh,i] in its power profile should indicate 1 (i.e., S=1 and S=0), and be executed sequentially.

nldh,i X j=1

Sh,gd,i,jk +Sh,lc,i,jk =nldh,i, Sh,gd,i,jk−1Sh,gd,i,jkSkh,gd,i,j, Sh,lc,i,jk−1Sh,lc,i,jkSkh,lc,i,j.

(2.45)

It is assumed that only one electric energy source can be on at the same time slot k to supply the shiftable appliances and it is given by

Sh,gd,i,jk +Sh,lc,i,jk =1. (2.46)

To avoid unnecessary peaks rebound, it is considered that the UC sets a power limit P OWN,av to supply the N aggregated households along the scheduling horizon. It is sup-posed that P OWN,av is distributed equally among the households, where P OWh,av is the power constraint on how much the householdhcan draw from the gird. Where the following constraint has to be verified

Nh,app X i=1

nldh,i X j=1

Sh,gd,i,jk P OWh,ikP OWh,avk , (2.47) If the distributed energy resources supply an appliance, its consumption should not exceed the available power at time slot k; otherwise, it is supplied by the grid. This can be verified using

Nh,app X i=1

nldh,i X j=1

Sh,lc,i,jk P OWh,ikP OWh,lck . (2.48) The consumer also here can give his time preferences (i.e., comfort constraint). Hence, the time preferences corresponding to the earliest switching onth,i,on and the latest switching off th,i,of f of an appliance are considered in the scheduling. Such preferences must be satisfied by the following inequalities

th,i,of fth,i,onnldh,i, th,i,on≤ {k:Sh,i,1k =1}, {k:Si,ldk+ldh,i−1

h,i =1} ≤th,i,of f.

(2.49)

During the EV’s parking in household h, it can charge from both energy sources. The EV can discharge to serve as an energy source, if a certain energy level is already stored in the battery SoEh,EV,min, for other appliances in on-peaks. Hence,

th,dp X k=th,ar

P OWh,EVk ,dist

( SoEh,EVth,ar ,init if SoEh,EV,minSoEh,EVth,ar,init

0 otherwise. (2.50)

If the EV has discharged, it should be guaranteed that the EV will charge to reach the maximum SoE by the time of departure. This reads

P OWh,EVk ,chP OWh,avk

Nh,app X i=1

nldh,i X j=1

Sh,gd,i,jk P OWh,s,i,jkN Sh,gdk P OWh,nskP OWh,ESS,chk , P OWh,EVk ,chP OWh,lck onkh,EV,

SoEh,EV,init+

th,dp

X k=tar

P OWh,EVk ,cht

th,dp

X k=th,ar

P OWh,EVk ,dist=SoEh,EV,max.

(2.51) Similar to the EV, the ESS can discharge to provide energy to the household. This is satisfied by

P OWh,ESS,chkP OWh,lck onkh,ESS,

Nslot X k=1

P OWh,ESS,disktSoEh,ESS,init, P OWh,ESS,chkP OWh,avk

Nh,app

X i=1

nldh,i

X j=1

Sh,gd,i,jk P OWh,s,i,jkN Sh,gdk P OWh,nskP OWh,EVk ,ch

SoEh,ESS,init+

Nslot X k=1

P OWh,ESS,chkt

Nslot X k=1

P OWh,ESS,diskt=EESS,h.

(2.52) Nonshiftable Appliances Constraints

The grid and distributed energy sources can supply the nonshiftable appliances in the house-hold h. Therefore, both sources can be on at the same time slot k. This is ensured by

N Sh,gdk +N Sh,lck =1, (2.53)

where N Sh,gdk (resp. N Sh,lck ) can vary at each time slot so that

0≤N Sh,gdk ≤1 and 0≤N Sh,lck ≤1. (2.54) Both energy sources impose limitations on the energy consumed by theAh,nsin household h. As the shiftable appliances draw an amount of the local energy, the latter’s remainders are available for the Ah,ns operations. The following constraints ensure this

N Sh,lck P OWh,nskP OWh,lck

Nh,app X i=1

nldh,i X j=1

Sh,lc,i,jk P OWh,s,i,jP OWh,ESS,chk ,

N Sh,gdk P OWh,nskP OWh,avk

Nh,app

X i=1

nldh,i

X j=1

Sh,EVk ,i,jP OWh,s,i,jP OWh,EVk ,chP OWh,ESS,chk . (2.55)

Neighborhood Constraints

The total power procured from the grid to satisfy the energy requirements of the H aggre-gated households should not exceed the power limit set by the local distributor.

H X h=1

Nh,app

X i=1

nldh,i X j=1

Sh,gd,i,jk P OWh,s,i,jk +N Sh,gdk P OWh,nsk +P OWh,EVk ,ch+P OWh,ESS,chk

P OWN,avk (2.56)

Let us introduce new decision variables for the neighborhood namely Sh,N,i,j andN Sh,N. These decision variables follow the same logic as described in subsections 2.6.3 and 2.6.3, where

H X h=2

Sh,Nk ,i,j≤1 and XH

h=2

N Sh,Nk ≤1. (2.57)

At each time slot, the algorithm listens to each household if a flag is raised to request for purchasing energy from the neighbors. If one household has raised a flag, the decision-maker will find the optimal strategy that maximize the profits of all the participants. It is assumed that the price market in the neighborhood is similar to the proposed price by the UC. Hence, at a time slotk, the energy available in the neighborhood level is limited, where

N Sh,Nk P OWh,nsk +Sh,N,i,jP OWh,s,i,jkP OWN,lck . (2.58) Example 2.6.1 In case if the household h=1 is in shortage at time slot k, the household will raise a flag indicating how much power is needed at that time slot. Hence, the available power in the neighborhood level at that time slot is denoted as P OWNk,lc and calculated by P OWNk,lc=U2k(d2) +U3k(d3).

The output of the game-theoretic algorithm (i.e., decision) is the amount of power each household sells to the householdh=1at each time slotk. The power that will be transferred to the household h=1 equals the power needed by the household h=1.

H X h=2

N Sh,Nk P OW1,nsk +Sh,N,i,jP OW1,s,i,jk P OWN,lck . (2.59)

Electricity Cost Function

The set of all the decision variables of the algorithm is denoted by DVset, where DVset=

nSh,gd,i,j,Sh,lc,i,j, N Sh,lc,N Sh,gd,P OWh,EV,ch,P OWh,EV,dis,P OWh,ESS,ch,P OWh,ESS,dis,Sh,N,i,j,N Sh,No. The power consumed by the shiftable appliances of an individual household at time slot

k is calculated as follows P OW Shk=

Nh,app X i=1

nldh,i X j=1

Sh,gd,i,jkSh,lc,i,jk P OWh,s,i,jk +P OWh,EVk ,ch+P OWh,ESS,chk , (2.60) the power consumed by the nonshiftable appliances in household h is

P OW N Shk =N Sh,gdkN Sh,lck P OWh,nsk , (2.61)

the power sold by the household h is

Soldkh=Uhk(dh), (2.62)

and the power purchased by the household h is P urchkh=dh

Nh,app

X i=1

nph,i X j=1

Sh,N,i,jk P OWh,s,i,jk +N Sh,Nk P OWh,nsk

, (2.63)

thus, the cost of the total energy consumed by the household h during 24 hours for a given schedule is

CosthDVsetk =

Nslot X k=1

P OW Shk+P OW N ShkSoldkh+P urchkhtP Rk, (2.64) and the neighborhood’s total electricity cost is expressed as

CostNDVsetk =

H X h=1

CosthDVsetk , (2.65)

where the optimal electricity cost can be obtained by selecting the scheduling nDVdseto so that the cost function (2.66), subject to constraints (2.35) to (2.59) is minimal

DVdkset

=argmin

{DVsetk }

CostNDVsetk . (2.66)

Simulation 5 The proposed approach is also implemented in Matlab/Simulink environment and solved using a Gurobi solver. A scenario ofH=3 aggregated households with different consumption behaviors is considered to conduct the simulations. The behavior is described by the type and number of appliances (shiftable and nonshiftable) in the household and how many times they are running.

The energy constraint imposed by the utility company on the neighborhood is set to be P OWNk,av =25kWh, which is similar to the one used in [124]. The ToU electricity tariff is assumed to be known along the scheduling horizon. The ToU electricity tariff is chosen differently from the previous simulation examples. In the studied scenario, different sets of appliances are assigned to be scheduled Ah,s, and each consumer has different preference times matching their routine, such as in Table 2.11. Nonshiftable appliances’ consumption can be found in [125].

It is assumed that the households are equipped with similar types of EV, ESS, and PV.

The capabilities of exchanging energy inside and between the households are assumed avail-able (V2H [89], ESS2H, PV2H, and H2H [90,91]). To demonstrate the proposed framework’s applicability, different EV traveling patterns are considered for each household. All the EVs have a similar maximum range, which is EVh,mrg =220 km for h=1,2,3. The distances traveled by each EV areEV1,dst=80km,EV2,dst=40km, andEV3,dst=220km; respectively.

The appliances’ optimal consumption schedule and the coordination between the energy sources are analyzed for each household. Figures 2.29-2.31 illustrate the power consump-tion of the households’ different appliances along with the corresponding supply sources for households 1,2 and 3; respectively.

Table 2.11: Time Preferences of each consumer h=1,2,3.

t1,i,on t1,i,of f t2,i,on t2,i,of f t3,i,on t3,i,of f

WM 9 16 9 16 9,13:15 11,16

DW 20 22 20:45 22 13:15,18:15 16,20

OV1 7 8 7 8 7 8

OV2 18 20 17 20 11,16:45 13,18

EV 18 6:45 17 6:45 16 6:45

Figure 2.29: Optimal consumption schedule forh=1 (top) and the energy sources supplying it (bottom).

Figure 2.30: Optimal consumption schedule forh=2 (top) and the energy sources supplying it (bottom).

Figure 2.31: Optimal consumption schedule forh=3 (top) and the energy sources supplying it (bottom).

In the three households, the shiftable appliances are scheduled in predefined time in-tervals. It can be seen that the shiftable appliances are supplied by the distributed energy resources in on and mid-peaks where the price is higher. At the same time, they are supplied by the grid in off-peak due to the low electricity price. Thus, the locally generated energy usage is maximized and serves as an alternative solution to minimize the energy drawn from the grid at periods with higher electricity tariffs. Consequently, the electricity costs are kept minimal.

On the other hand, the nonshiftable appliances are supplied by the distributed energy resources when it is available and by the grid. For households h=1,2, the parking of the EVs coincides with the on-peak of the ToU tariff. Therefore, the EVs supply the households (EV2H source) to cover the operation of the appliances assigned at the on-peak period.

In this example, the state-of-charge ofEV3at arrival time (k=37) is zeroSoE3,EVt3,ar ,init=0 since the distance traveled is assumed to be equal to the maximum rangeEV3,dst=EV3,mrg. Therefore,EV3 can not discharge to provide the household h=3 with energy at the time of arrival. Moreover, the ToU tariff at such time is high, and the other households still have remains of their locally generated power (i.e., from distributed energy resources). Therefore, the household h=3 will raise a flag with a negative power value indicating that it is in power shortage of the specified amount. Recall that, at each time slot, all participants raise a flag indicating if they are in shortage or have a surplus electric energy. In this case, the Nash equilibrium, consisting of the decision to open the switches and the amount of energy, is found for the virtual energy market, where two participants are selling, and one is purchasing. The Nash equilibrium represents both households’ optimal contribution while maximizing their profits (thanks to selling their on-site generated power). The household 3 then receives the energy by H2H technique to cover its energy needs.

The energy limits set by the UC are respected in all households. Hence, any rebound of peaks in off and mid-peaks are prevented. Since the distributed energy resources can cover

a portion of the neighborhood’s consumption, the total energy consumption can exceed the energy limit imposed by the UC, and it can be seen in Figure 2.31 starting from time slot k=89.

The neighborhood’s total electricity costs for purchasing energy from the grid if the proposed method is adopted and H2H is enabled is CostN =51.26. On the other hand, if the H2H is disabled, the total cost of energy purchased from the grid is CostN =53.44, versus the case of the scheduling without coordinating the distributed energy resources is CostN =109.38. Thus, the efficiency of the proposed method’s usefulness is verified by reducing the neighborhood electricity costs by 4%. Furthermore, the coordination of the distributed energy resources at the household level and neighborhood-level guarantees a win situation for the UC side since the UC will not purchase additional energy (in on-peak times) to fulfill this consumer population’s energy needs. Moreover, the UC will prevent the grid’s congestion due to exchanging electric energy in the neighborhood.