2.1 Dynamic social welfare maximization problem

Consider a smart grid consisting of n conventional generation (CG) units, q renewable generation (RG) units, and m demand units. Denote P1,Gð Þt , …, Pn,Gð Þt the powers generated by CG units; P1,R ð Þt , …, Pq,R ð Þt the powers generated by RG units; and P1,Dð Þt , …, Pm,Dð Þt the powers consumed by demand units; and

P tð Þ≜½ � <sup>P</sup>1,Gð Þ<sup>t</sup> ; …; Pn,Gð Þ<sup>t</sup> ; <sup>P</sup>1,Dð Þ<sup>t</sup> ; …; Pm,Dð Þ<sup>t</sup> T; P<sup>≜</sup> <sup>P</sup>ð Þ<sup>1</sup> <sup>T</sup>; …; P Nð Þ<sup>T</sup> h i<sup>T</sup> :

The generation cost for CG unit <sup>i</sup> is Cið Þ¼ Pi,Gð Þ<sup>t</sup> aiP<sup>2</sup> i,GðÞþt biPi,GðÞþt ci, with prescribed coefficients ai, bi, ci. The utility function for demand unit j [8–10], which shows the consumer's satisfaction with respect to its consumed power, is

$$U\_{\boldsymbol{j}}\left(P\_{\boldsymbol{j},D}(\boldsymbol{t})\right) = \begin{cases} \beta\_{\boldsymbol{j}}P\_{\boldsymbol{j},D}(\boldsymbol{t}) - a\_{\boldsymbol{j}}P\_{\boldsymbol{j},D}^{2}(\boldsymbol{t}) & : P\_{\boldsymbol{j},D}(\boldsymbol{t}) \le \frac{\beta\_{\boldsymbol{j}}}{2a\_{\boldsymbol{j}}},\\ \frac{\beta\_{\boldsymbol{j}}^{2}}{4a\_{\boldsymbol{j}}} & : P\_{\boldsymbol{j},D}(\boldsymbol{t}) \ge \frac{\beta\_{\boldsymbol{j}}}{2a\_{\boldsymbol{j}}} \end{cases}$$

where α<sup>j</sup> and β<sup>j</sup> are predetermined parameters. Then the DSWM problem in smart transmission grids is as follows:

$$\min\_{\mathbf{P}} \sum\_{t=1}^{N} \left[ \sum\_{i=1}^{n} \mathbf{C}\_{i}(P\_{i,G}(t)) - \sum\_{j=1}^{m} \mathbf{U}\_{j}(P\_{j,D}(t)) \right] \tag{4}$$

$$\text{s.t.} \sum\_{i=1}^{n} P\_{i,G}(t) + \sum\_{l=1}^{q} P\_{l,R}(t) = \sum\_{j=1}^{m} P\_{j,D}(t) + P\_L(t) \tag{5}$$

$$P\_{i,G}^{\min} \le P\_{i,G}(t) \le P\_{i,G}^{\max} \tag{6}$$

for <sup>t</sup> <sup>¼</sup> <sup>2</sup>, …, N, and <sup>P</sup>^min,t

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

rewritten as

the battery system.

by p tð Þ.

i,G ≜Pmin

Pj,Dð Þ<sup>t</sup> <sup>∈</sup> <sup>Ω</sup>jð Þ<sup>t</sup> <sup>≜</sup> xjð Þ<sup>t</sup> : <sup>P</sup>min

2.2 Power scheduling with electric vehicle

2.2.1 Diesel generation and load demand

cost of load demands is calculated by

need to satisfy the following constraint:

shown in (6) and (7), i.e.,

following form:

2.2.2 Electric vehicle

33

i,G , <sup>P</sup>^max,t

A Distributed Optimization Method for Optimal Energy Management in Smart Grid

i,G ≜Pmax

j,D <sup>≤</sup> xjð Þ<sup>t</sup> <sup>≤</sup> <sup>P</sup>max

In this problem, we include battery operation into the microgrid to suppress the high demand at the high-cost time of utility electricity. Furthermore, we consider EV battery instead of the stationary battery storage to reduce the installation cost of

Our microgrid model consists of n diesel generations (DGs), m demand units, q PV generations, v EVs, and one microgrid operator. This microgrid is connected to the main grid (MG) whose electricity trading price is predescribed as q tð Þ. The electricity trading price inside the microgrid, one of decision variables, is denoted

The generation cost function Cið Þ Pi,Gð Þt for DG unit i is similar to that in the Section 2.1. The formulas of constraints for DG powers are also the same to that

i,G <sup>≤</sup> Pi,Gð Þ<sup>t</sup> <sup>≤</sup> <sup>P</sup>max

i,G <sup>≤</sup> Pi,Gð Þ�<sup>t</sup> Pi,Gð Þ <sup>t</sup> � <sup>1</sup> <sup>≤</sup> <sup>Δ</sup>Pmax

Load demands are assumed as fixed parameters in this problem. The electricity

For simplicity, we assume that EVs have only one round-trip route per day, and

Denote Ph,EVð Þt the charging/discharging power of the h-th EV during time slot t

To reduce computational cost, Ph,EVð Þt between departure and arrival time slots

(Ph,EVð Þt . 0 in charging mode and Ph,EVð Þt , 0 in discharging mode), Ph,EVð Þt

h,EVð Þ<sup>t</sup> <sup>≤</sup> Ph,EVð Þ<sup>t</sup> <sup>≤</sup> Pmax

of a route are assumed by zero, without loss of generality, and Ph,EVð Þt at these departure and arrival time slots are assumed to be equal to a half of �<sup>P</sup> drive

Wi,Gð Þ¼ Pi,Gð Þt ; p tð Þ p tð ÞPi,GðÞ�t Cið Þ Pi,G ð Þt (11)

Wj,D Pj,Dð Þ<sup>t</sup> ; p tð Þ � � <sup>¼</sup> p tð ÞPj,Dð Þ<sup>t</sup> (12)

For the microgrid internal trading, the revenue function of DGs has the

Pmin

the home of each EV owner is the only charging point for each EV.

Pmin

ΔPmin

j,D n o, j <sup>¼</sup> <sup>n</sup> <sup>þ</sup> <sup>1</sup>, …, n <sup>þ</sup> <sup>m</sup>

i,G for t ¼ 1. In addition, (8) is

i,G (9)

h,EVð Þt (13)

<sup>h</sup> , where

i,G (10)

$$
\Delta P\_{i,G}^{\min} \le P\_{i,G}(t) - P\_{i,G}(t-\mathbf{1}) \le \Delta P\_{i,G}^{\max} \tag{7}
$$

$$P\_{j,D}^{\min} \le P\_{j,D}(t) \le P\_{j,D}^{\max} \tag{8}$$

where PLð Þt is the total power loss in the grid at time slot t, (5) is the power balance constraint, (6)–(7) represent the realistic limits on the output powers of CG units and their ramp rates, and (8) is a constraint for consumed powers of demand units. Next, denote the power loss coefficients of CG unit i, demand unit j, and RG unit <sup>l</sup> by <sup>γ</sup>i,G <sup>≜</sup> <sup>∂</sup>PL ∂Pi,G , <sup>γ</sup>j,D <sup>≜</sup> <sup>∂</sup>PL ∂Pj,D , <sup>γ</sup>l,R <sup>≜</sup> <sup>∂</sup>PL ∂Pl,R , respectively [10]. Then the power balance constraint (5) can be rewritten as

$$\sum\_{i=1}^{n} \left(\mathbf{1} - \boldsymbol{\gamma}\_{i,G}\right) P\_{i,G}(t) + P\_R(t) = \sum\_{j=1}^{m} \left(\mathbf{1} + \boldsymbol{\gamma}\_{j,D}\right) P\_{j,D}(t)$$

where PRð Þ<sup>t</sup> ≜ ∑<sup>q</sup> <sup>l</sup>¼<sup>1</sup> <sup>1</sup> � <sup>γ</sup>l,R � �Pl,Rð Þ<sup>t</sup> . On the other hand, for <sup>i</sup> <sup>¼</sup> <sup>1</sup>, …, n, (6) and (7) can be conveniently rewritten as

$$P\_{i,G}(t) \in \Omega\_i(t) \triangleq \left\{ \varkappa\_i(t) \,:\, \hat{P}\_{i,G}^{\min,t} \le \varkappa\_i(t) \le \hat{P}\_{i,G}^{\max,t} \right\}.$$

where

$$
\hat{P}\_{i,G}^{\min,t} \triangleq \max \{ P\_{i,G}^{\min}, \Delta P\_{i,G}^{\min} + P\_{i,G}(t-\mathbf{1}) \}, \\
\hat{P}\_{i,G}^{\max,t} \triangleq \min \{ P\_{i,G}^{\max}, \Delta P\_{i,G}^{\max} + P\_{i,G}(t-\mathbf{1}) \}
$$

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

for <sup>t</sup> <sup>¼</sup> <sup>2</sup>, …, N, and <sup>P</sup>^min,t i,G ≜Pmin i,G , <sup>P</sup>^max,t i,G ≜Pmax i,G for t ¼ 1. In addition, (8) is rewritten as

$$P\_{j,D}(t) \in \Omega\_j(t) \triangleq \left\{ \mathfrak{x}\_j(t) : P\_{j,D}^{\min} \le \mathfrak{x}\_j(t) \le P\_{j,D}^{\max} \right\}, j = n+1, \dots, n+m$$

### 2.2 Power scheduling with electric vehicle

2.1 Dynamic social welfare maximization problem

Research Trends and Challenges in Smart Grids

The generation cost for CG unit <sup>i</sup> is Cið Þ¼ Pi,Gð Þ<sup>t</sup> aiP<sup>2</sup>

8 >>><

>>>:

Pi,GðÞþt ∑

q

l¼1

Pmin

Pmin

, <sup>γ</sup>l,R <sup>≜</sup> <sup>∂</sup>PL ∂Pl,R

� �Pi,GðÞþ<sup>t</sup> PRðÞ¼ <sup>t</sup> <sup>∑</sup>

Pi,Gð Þ<sup>t</sup> <sup>∈</sup> <sup>Ω</sup>ið Þ<sup>t</sup> <sup>≜</sup> xið Þ<sup>t</sup> : <sup>P</sup>^min,t

i,G <sup>þ</sup> Pi,Gð Þ <sup>t</sup> � <sup>1</sup> � �, <sup>P</sup>^max,t

Uj Pj, <sup>D</sup>ð Þ<sup>t</sup> � �<sup>¼</sup>

min <sup>P</sup> <sup>∑</sup> N t¼1 ∑ n i¼1

ΔPmin

, <sup>γ</sup>j,D <sup>≜</sup> <sup>∂</sup>PL ∂Pj,D

1 � γi,G

<sup>l</sup>¼<sup>1</sup> <sup>1</sup> � <sup>γ</sup>l,R

balance constraint (5) can be rewritten as

s:t:∑ n i¼1

smart transmission grids is as follows:

unit <sup>l</sup> by <sup>γ</sup>i,G <sup>≜</sup> <sup>∂</sup>PL

where PRð Þ<sup>t</sup> ≜ ∑<sup>q</sup>

i,G ≜ max Pmin

where

P^min,t

32

∂Pi,G

∑ n i¼1

and (7) can be conveniently rewritten as

i,G ; ΔPmin

Consider a smart grid consisting of n conventional generation (CG) units, q renewable generation (RG) units, and m demand units. Denote P1,Gð Þt , …, Pn,Gð Þt the powers generated by CG units; P1,R ð Þt , …, Pq,R ð Þt the powers generated by RG

prescribed coefficients ai, bi, ci. The utility function for demand unit j [8–10], which

where α<sup>j</sup> and β<sup>j</sup> are predetermined parameters. Then the DSWM problem in

Cið Þ� Pi,Gð Þt ∑

Pl,RðÞ¼ t ∑

i,G <sup>≤</sup> Pi,Gð Þ<sup>t</sup> <sup>≤</sup> <sup>P</sup>max

i,G <sup>≤</sup> Pi,Gð Þ�<sup>t</sup> Pi,Gð Þ <sup>t</sup> � <sup>1</sup> <sup>≤</sup> <sup>Δ</sup>Pmax

j,D <sup>≤</sup> Pj,Dð Þ<sup>t</sup> <sup>≤</sup> <sup>P</sup>max

where PLð Þt is the total power loss in the grid at time slot t, (5) is the power balance constraint, (6)–(7) represent the realistic limits on the output powers of CG units and their ramp rates, and (8) is a constraint for consumed powers of demand units. Next, denote the power loss coefficients of CG unit i, demand unit j, and RG

m j¼1 Uj Pj,Dð Þ<sup>t</sup> � � " #

> m j¼1

m j¼1

� �Pl,Rð Þ<sup>t</sup> . On the other hand, for <sup>i</sup> <sup>¼</sup> <sup>1</sup>, …, n, (6)

n o

j, <sup>D</sup>ð Þt : Pj, <sup>D</sup>ð Þt ≤

: Pj, <sup>D</sup>ð Þt ≥

:

i,GðÞþt biPi,GðÞþt ci, with

(4)

βj 2α<sup>j</sup> ,

βj 2α<sup>j</sup>

Pj,Dð Þþt PLð Þt (5)

i,G (6)

j,D (8)

, respectively [10]. Then the power

Pj,Dð Þt

i,G

i,G ; ΔPmax

i,G <sup>þ</sup> Pi,Gð Þ <sup>t</sup> � <sup>1</sup> � �

1 þ γj,D � �

i,G <sup>≤</sup> xið Þ<sup>t</sup> <sup>≤</sup> <sup>P</sup>^max,t

i,G ≜ min Pmax

i,G (7)

units; and P1,Dð Þt , …, Pm,Dð Þt the powers consumed by demand units; and P tð Þ≜½ � <sup>P</sup>1,Gð Þ<sup>t</sup> ; …; Pn,Gð Þ<sup>t</sup> ; <sup>P</sup>1,Dð Þ<sup>t</sup> ; …; Pm,Dð Þ<sup>t</sup> T; P<sup>≜</sup> <sup>P</sup>ð Þ<sup>1</sup> <sup>T</sup>; …; P Nð Þ<sup>T</sup> h i<sup>T</sup>

shows the consumer's satisfaction with respect to its consumed power, is

β2 j 4α<sup>j</sup>

<sup>β</sup>jPj, <sup>D</sup>ð Þ�<sup>t</sup> <sup>α</sup>jP<sup>2</sup>

In this problem, we include battery operation into the microgrid to suppress the high demand at the high-cost time of utility electricity. Furthermore, we consider EV battery instead of the stationary battery storage to reduce the installation cost of the battery system.

Our microgrid model consists of n diesel generations (DGs), m demand units, q PV generations, v EVs, and one microgrid operator. This microgrid is connected to the main grid (MG) whose electricity trading price is predescribed as q tð Þ. The electricity trading price inside the microgrid, one of decision variables, is denoted by p tð Þ.

### 2.2.1 Diesel generation and load demand

The generation cost function Cið Þ Pi,Gð Þt for DG unit i is similar to that in the Section 2.1. The formulas of constraints for DG powers are also the same to that shown in (6) and (7), i.e.,

$$P\_{i,G}^{\min} \le P\_{i,G}(t) \le P\_{i,G}^{\max} \tag{9}$$

$$
\Delta P\_{i,G}^{\min} \le P\_{i,G}(t) - P\_{i,G}(t-\mathbf{1}) \le \Delta P\_{i,G}^{\max} \tag{10}
$$

For the microgrid internal trading, the revenue function of DGs has the following form:

$$\mathcal{W}\_{i,G}(P\_{i,G}(t), p(t)) = p(t)P\_{i,G}(t) - \mathcal{C}\_i(P\_{i,G}(t)) \tag{11}$$

Load demands are assumed as fixed parameters in this problem. The electricity cost of load demands is calculated by

$$\mathcal{W}\_{\mathbf{j},D}\left(P\_{\mathbf{j},D}(t), p(t)\right) = p(t)P\_{\mathbf{j},D}(t) \tag{12}$$
