4. Simulation results for test systems

In this section, simulation results for two problems, DSWM and PSwEV, are provided to illustrate the effectiveness of the proposed SDC-ADMM algorithm.

#### 4.1 Test case 1: DSWM problem

For this problem, a modified IEEE 39-bus system (see Figure 1) is used as the test system where it is assumed that there are PV generation units in the system

A Distributed Optimization Method for Optimal Energy Management in Smart Grid DOI: http://dx.doi.org/10.5772/intechopen.84136

Figure 1. IEEE 39-bus system.

3.6 Pricing mechanism

Research Trends and Challenges in Smart Grids

in the following:

functions for agents:

hereafter.

and (29), xið Þ<sup>t</sup> is replaced by <sup>P</sup><sup>k</sup>þ<sup>1</sup>

For several grid optimization problems represented in the form of (1), e.g., economic dispatch or power scheduling, DSWM, PSwEV, etc., an electricity pricing mechanism is needed to drive the electricity trading in the grid. Interestingly, the optimal Lagrange multiplier associated with the equality constraint (2) is often regarded as the market-clearing price. That will be proved under mild assumptions

Theorem 2. For a sufficiently small but positive ρ, i.e., ρ ! 0, the optimal energy price in the considering smart grid converges to λ<sup>∗</sup>, the optimal Lagrange multiplier corresponding to the constraint (34) or equivalently (26), as k ! ∞. Proof: For the OEM problems in smart grids, the convex functions fi

(1) and (25) represent the costs for power generations or for the consumers' satisfaction. Therefore, we can denote the following functions as the reward

Wið Þ¼ xið Þt p tð ÞμixiðÞ�t fi

at which the marginal costs of all agents are the same. Hence,

In the proposed SDC-ADMM algorithm, this means

Substituting (48) into (35), we have

If ρ ! 0, we obtain from (49) that

4. Simulation results for test systems

4.1 Test case 1: DSWM problem

40

<sup>p</sup>μ<sup>i</sup> <sup>þ</sup> <sup>ρ</sup> Pkþ<sup>1</sup>

<sup>∂</sup>fi <sup>P</sup><sup>k</sup>þ<sup>1</sup> i ∂P<sup>k</sup>þ<sup>1</sup> i

<sup>i</sup> � <sup>X</sup><sup>k</sup>

<sup>i</sup> <sup>þ</sup> uk i

p ¼ λ

Thus, as long as the proposed SDC-ADMM algorithm converges, the optimal

In this section, simulation results for two problems, DSWM and PSwEV, are provided to illustrate the effectiveness of the proposed SDC-ADMM algorithm.

For this problem, a modified IEEE 39-bus system (see Figure 1) is used as the test system where it is assumed that there are PV generation units in the system

kþ1

<sup>¼</sup> <sup>λ</sup>

energy price <sup>p</sup><sup>∗</sup> is equal to the optimal Lagrange multiplier <sup>λ</sup><sup>∗</sup> <sup>≜</sup> lim<sup>k</sup>!<sup>∞</sup> <sup>λ</sup>

∂Wi P<sup>k</sup>þ<sup>1</sup> i ∂Pkþ<sup>1</sup> i

where p tð Þ is the energy price at time slot t. In the ADMM reformulation (28)

The optimal energy price in the system is achieved when the market is cleared,

ð Þ xið Þt in

ð Þ xið Þt (46)

<sup>i</sup> ð Þt . For simplicity, the time index is also dropped

¼ 0 ∀i ¼ 1, … , M (47)

¼ pμ<sup>i</sup> ∀i ¼ 1, … , M (48)

<sup>μ</sup><sup>i</sup> <sup>∀</sup><sup>i</sup> <sup>¼</sup> <sup>1</sup>, … , M (49)

kþ1

. ■

<sup>k</sup>þ<sup>1</sup> (50)

with the total maximum output of 210 MW. The parameters of generators and demand units are taken from [26]. The average PV output curve, which is shown in Figure 2, is suitably scaled from the real PV data collected in New England [28]. Moreover, an average load profile taken from New England Independent System Operator [29] is utilized and properly scaled to obtain the time-varying upper bounds of demand units. This load profile has two demand peaks at 11:00 am and 8:00 pm, and the highest demand is at 8:00 pm, as seen in Figure 3.

Figure 2. PV output.

Figure 3. Total CG power and demand.

Figures 3 and 4 display the total and individual power generated and consumed

Then the electricity price is exhibited in Figure 5 showing that it is highest at 8 pm and lowest at 1–2 pm. This explains why the peak demand can be shifted. Next, the total welfare in the grid is shown in Figure 6 where the maximum welfare is attained at 1 pm when the consumers use most energy and the CG units produce

in the test system which are obtained by the proposed SDC-ADMM algorithm. Thanks to PV energy, the peak demand is shifted from 8 pm to 1 pm at which the

A Distributed Optimization Method for Optimal Energy Management in Smart Grid

DOI: http://dx.doi.org/10.5772/intechopen.84136

PV output is maximum, as observed in Figure 3.

Figure 5. Electricity price.

Figure 6. Total social welfare.

43

Figure 4. Individual power profile.

Other parameters in the simulation are as follows. The absolute and relative tolerances are set to be <sup>ε</sup>abs <sup>¼</sup> <sup>10</sup>�<sup>4</sup>, <sup>ε</sup>rel <sup>¼</sup> <sup>10</sup>�<sup>3</sup> , while ρ ¼ 0:06. Moreover, the power loss coefficients of generators and consumers are randomly generated within 10%. Then the simulation results are shown in Figures 3–7.

A Distributed Optimization Method for Optimal Energy Management in Smart Grid DOI: http://dx.doi.org/10.5772/intechopen.84136

Figure 5. Electricity price.

Figures 3 and 4 display the total and individual power generated and consumed in the test system which are obtained by the proposed SDC-ADMM algorithm. Thanks to PV energy, the peak demand is shifted from 8 pm to 1 pm at which the PV output is maximum, as observed in Figure 3.

Then the electricity price is exhibited in Figure 5 showing that it is highest at 8 pm and lowest at 1–2 pm. This explains why the peak demand can be shifted. Next, the total welfare in the grid is shown in Figure 6 where the maximum welfare is attained at 1 pm when the consumers use most energy and the CG units produce

Figure 6. Total social welfare.

Other parameters in the simulation are as follows. The absolute and relative

power loss coefficients of generators and consumers are randomly generated within

, while ρ ¼ 0:06. Moreover, the

tolerances are set to be <sup>ε</sup>abs <sup>¼</sup> <sup>10</sup>�<sup>4</sup>, <sup>ε</sup>rel <sup>¼</sup> <sup>10</sup>�<sup>3</sup>

Figure 3.

Figure 4.

42

Individual power profile.

Total CG power and demand.

Research Trends and Challenges in Smart Grids

10%. Then the simulation results are shown in Figures 3–7.

Figure 7. Algorithm convergence.

least energy. Finally, Figure 7 shows the convergence of the proposed SDC-ADMM algorithm.

## 4.2 Test case 2: PSwEV problem

In this test case, a microgrid having 2 DGs, 16 EVs, 4 load demands, 4 PV generations, and a microgrid operator is considered with a 3-day duration. The total number of agents is 27, in which the controllable agents are those for 2 DGs, 16 EVs, and the microgrid operator. The total PV curve and the total demand curve are given in Figure 8. The prescribed electricity transaction price q tð Þ between the microgrid and the utility company is depicted in Figure 9.

The departure and arrival time and required traveling energies of 16 EVs are randomly generated from mix Gaussian distributions of this parameter of an actual

set of 1400 EVs. The maximum energy capacity of each EV battery is 17.6 kWh, and the SOC limits of each EV battery are set at 20 and 80% of the maximum energy

The absolute and relative tolerances are set to be <sup>ε</sup>abs <sup>¼</sup> <sup>10</sup>�<sup>4</sup> and <sup>ε</sup>rel <sup>¼</sup> <sup>10</sup>�3.

Consequently, the simulations for hundreds of different scenarios corresponding to the above random times are run with the proposed SDC-ADMM algorithm. The

Figure 10 shows the benefit of utilizing PV generation and EV charging in the microgrid. First, DG output power is reduced around the time period of high PV output, while the load demand is quite high. Second, when PV output is high, the microgrid operator can sell the redundant electricity to the utility at the highest price. Last, even though EVs do not have much correlation to PV output due to the

Next, ρ ¼ 0:06. These parameters are the same with those in Section 4.1.

A Distributed Optimization Method for Optimal Energy Management in Smart Grid

DOI: http://dx.doi.org/10.5772/intechopen.84136

results for one specific scenario are then shown in Figures 10–12.

DG power, EV charging power, and transaction price inside microgrid.

capacity, respectively.

Figure 10.

45

Figure 9.

Transaction price by utility.

Figure 8. PV and demand curves.

A Distributed Optimization Method for Optimal Energy Management in Smart Grid DOI: http://dx.doi.org/10.5772/intechopen.84136

Figure 9. Transaction price by utility.

least energy. Finally, Figure 7 shows the convergence of the proposed SDC-ADMM

In this test case, a microgrid having 2 DGs, 16 EVs, 4 load demands, 4 PV generations, and a microgrid operator is considered with a 3-day duration. The total number of agents is 27, in which the controllable agents are those for 2 DGs, 16 EVs, and the microgrid operator. The total PV curve and the total demand curve are given in Figure 8. The prescribed electricity transaction price q tð Þ between the

The departure and arrival time and required traveling energies of 16 EVs are randomly generated from mix Gaussian distributions of this parameter of an actual

microgrid and the utility company is depicted in Figure 9.

algorithm.

Figure 8.

44

PV and demand curves.

Algorithm convergence.

Figure 7.

4.2 Test case 2: PSwEV problem

Research Trends and Challenges in Smart Grids

Figure 10. DG power, EV charging power, and transaction price inside microgrid.

set of 1400 EVs. The maximum energy capacity of each EV battery is 17.6 kWh, and the SOC limits of each EV battery are set at 20 and 80% of the maximum energy capacity, respectively.

The absolute and relative tolerances are set to be <sup>ε</sup>abs <sup>¼</sup> <sup>10</sup>�<sup>4</sup> and <sup>ε</sup>rel <sup>¼</sup> <sup>10</sup>�3. Next, ρ ¼ 0:06. These parameters are the same with those in Section 4.1.

Consequently, the simulations for hundreds of different scenarios corresponding to the above random times are run with the proposed SDC-ADMM algorithm. The results for one specific scenario are then shown in Figures 10–12.

Figure 10 shows the benefit of utilizing PV generation and EV charging in the microgrid. First, DG output power is reduced around the time period of high PV output, while the load demand is quite high. Second, when PV output is high, the microgrid operator can sell the redundant electricity to the utility at the highest price. Last, even though EVs do not have much correlation to PV output due to the

Figure 11. The state of charge of all EVs.

5. Conclusions

Consensus for computing λ

kþ1 .

DOI: http://dx.doi.org/10.5772/intechopen.84136

Figure 13.

energy generation.

Conflict of interest

47

The authors declare no conflict of interest.

In this chapter, a distributed optimization algorithm called sequential distributed consensus-based alternating direction method of multipliers (SDC-ADMM) is proposed for optimal energy management in smart grids. This algorithm is applicable to a broad class of linear or nonlinear constrained convex programming, of which two specific problems in smart grids have been studied in this chapter. The first problem DSWM tries to maximize the total social welfare in transmission grids in the presence of renewable energy and power losses, while the second problem PSwEV considers the power scheduling in distribution microgrids with renewable energy, electric vehicle as mobile storage, and a microgrid operator. It is then shown that the proposed SDC-ADMM algorithm works well for both problems, in which an optimal real-time electricity pricing scheme is derived as a part of the algorithm which facilitates demand response. Additionally, the existence of renewable energy and electric vehicles with suitable charging and discharging strategies is benefit to the grid for reducing the electricity price and the output power from nonrenewable

A Distributed Optimization Method for Optimal Energy Management in Smart Grid

Figure 12. SDC-ADMM convergence.

EV traveling times, they still benefit the microgrid with their optimal charging and discharging schedules in which the charging is executed at low-price time periods of utility, and vice versa, the discharging is made at high-price time periods of utility. Moreover, the discharging also provides microgrid electricity for selling to the utility at a high price.

Subsequently, the SOC profiles of 16 EVs are depicted in Figure 11. It can be observed that the EV batteries will be charged in the early morning when the electricity price is low, but not to the maximum allowed SOC, i.e., 80% of maximum battery capacity, because of the using of EV charging/discharging strategy in Algorithm 1 and the realistic EV data that only around 6 kWh is enough for each EV round-trip. Further, the charged/discharged SOCs of EVs are different due to their differences on charging/discharging times and required energy for traveling.

Finally, the convergence of the proposed SDC-ADMM algorithm in the PSwEV problem is shown in Figure 11, and the consensus processes in the distributed algorithm for calculating the optimal electric price inside the microgrid are displayed in Figures 12 and 13.

A Distributed Optimization Method for Optimal Energy Management in Smart Grid DOI: http://dx.doi.org/10.5772/intechopen.84136

Figure 13. Consensus for computing λ kþ1

.
