This chapter presents a distributed optimization method named sequential distributed consensus-based ADMM for solving nonlinear constrained convex optimization problems arising in smart grids in order to derive optimal energy management strategies. To develop such distributed optimization method, multi-agent system and consensus theory are employed. Next, two smart grid problems are investigated and solved by the proposed distributed algorithm. The first problem is called the dynamic social welfare maximization problem where the objective is to simultaneously minimize the generation costs of conventional power plants and maximize the satisfaction of consumers. In this case, there are renewable energy sources connected to the grid, but energy storage systems are not considered. On the other hand, in the second problem, plug-in electric vehicles are served as energy storage systems, and their charging or discharging profiles are optimized to minimize the overall system operation cost. It is then shown that the proposed distributed optimization algorithm gives an efficient way of energy management for both problems above. Simulation results are provided to illustrate the proposed theoretical approach.
- optimal energy management
- distributed optimization
- social welfare maximization
- smart grid
- multi-agent system
- electric vehicle
In any energy system, optimal energy management (OEM) is an essential problem because it directly affects to both the technical (e.g., operation and control) and economic (i.e., profit) aspects of such energy system. Recently, smart grid has been proposed as a solution to improve the greenhouse gas emissions and the efficiency and energy management in electric power grids . Important components in smart grid are renewable energy sources (RESs) and distributed energy resources (DERs), e.g., rooftop photovoltaic (PV), electric vehicles (EVs), distributed energy storage systems (ESSs), etc. Those RESs and DERs are expected to replace the polluted fossil-based energy sources for generating electric power and to increase the mobility and flexibility of power grids.
However, the fluctuating and intermittent nature of RESs and the close or on-site location of DERs to end users make the OEM problem in smart grids more complex than that in traditional power grids. This urges the development of new concepts and approaches to deal with challenges that arose in smart grids. Some examples include demand side management (DSM) and real-time (dynamic) pricing (RTP) [2, 3]. As one of the main DSM activities [3, 4, 5], demand response (DR) motivates changes in electric use by end-use customers, in response to changes in the price of electricity over time, or gives incentive payments designed to induce lower electricity use at times of high market prices or when grid reliability is jeopardized . DR not only shifts the load in peak times but also increases the grid’s energy efficiency and customers’ benefits.
Traditionally, the OEM problem in transmission power networks is treated as the economic dispatch (ED) problem (see, e.g., ). Nonetheless, DSM including DR is often not included in the ED problem. To overcome this drawback, the social welfare maximization (SWM) problem is set up and solved, where the benefits from both the suppliers and the consumers are taken into account [8, 9, 10, 11, 12, 13, 14]. The effectiveness of the SWM problem has been verified in . On the other hand, in distribution power networks, the OEM problem is usually investigated with the existence of an intermediate player called the aggregator who manages the power exchange between a small distribution grid and a larger or main grid. Therefore, the OEM problem in such situations means to maximize the benefits of the DER owners, consumers, and the aggregator.
To suppress the redundancy or to supplement the lack of energy from the fluctuating outputs of RESs, and to make the energy scheduling more flexible, ESSs are being introduced into smart grids as a solution. For instance, in power distribution systems or microgrids, EV’s batteries are sources of mobile and distributed ESSs that might contribute to the energy efficiency, security, and flexibility of such distribution systems or microgrids. The stability and robustness of vehicle-to-grid (V2G) energy networks have been investigated in . The problem of power scheduling with electric vehicle (PSwEV) in a microgrid has been introduced under a multi-agent setting in . Due to the increase of market share of EVs and plug-in hybrid electric vehicles (PHEVs) predicted until 2050 , it is reasonable to believe that the PSwEV problem will be popular and important in the near future.
To solve optimization problems arising in OEM problems, the existing methods can be classified depending on the centralized or distributed nature of such methods and the heuristic or analytical characteristic of the obtained solution. The security and resiliency of centralized approaches are weak due to a single point of failure and the huge communication and data processing, at the central unit. Those limitations can be improved by distributed approaches using multi-agent system (MAS), where each agent corresponds to a bus or a portion of the grid and each agent only communicates with a few other neighboring agents. On the other hand, the heuristic methods (e.g., [19, 20]) usually require a long running time and local solutions, which are less effective than analytical methods for convex optimization problems. Thus, distributed and analytical approaches will be developed in the current chapter to solve convex optimization problems representing OEM problems in smart grids.
A MAS-based distributed method for solving the ED problem in smart grid was proposed in  where the power losses are approximated by quadratic functions and the nonlinear coupling of oscillating agents is employed for decentralized solution derivation from the Karush-Kuhn-Tucker (KKT) conditions. The projected gradient methods were utilized in  to solve the SWM problem, where a MAS was utilized to derive the supply-demand mismatch in a distributed fashion. Another method named dual decomposition was used in  to get a distributed solution when the power balance is not strictly required. If the power balance is required, a distributed observer design was employed in  to estimate the power mismatch. The Vickrey-Clarke-Groves (VCG) mechanism was used in , but it is centralized. A distributed method was presented in , but the communication structure was all-to-all. Next, two consensus protocols were introduced in  to derive a distributed method for solving the SWM problem. Lastly, the SWM problem with transmission losses modeled by a quadratic function was investigated in .
This chapter presents an approach named sequential distributed consensus-based ADMM (SDC-ADMM) for solving nonlinear convex optimization problems having both equality and inequality constraints, which include those from OEM problems in smart grids. The attractive features of this approach are as follows: (i) viable for a general and broad class of constrained convex programming, (ii) distributed implementation, (iii) analytical updates of variables, and (iv) unnecessary checking of the active constraints in the KKT conditions, e.g., as in , which slows down the convergence speed and increases the computational complexity. Then the effectiveness of the proposed approach will be demonstrated through two specific OEM problems in smart grids, namely, dynamic SWM (DSWM) and PSwEV.
The rest of this chapter is organized as follows. Section 2 introduces a class of constrained optimization problems in power grids followed by two specific problems. Then an approach to solve those optimization problems is given in Section 3. Simulation results to illustrate the proposed approach are provided in Section 4. Finally, Section 5 summarizes the chapter.
2. Constrained optimization problems in smart grid
A lot of OEM problems in power grids can be represented by the following general form of constrained convex programming:
where are scalar, continuous, and convex functions, are variables, is the time index, is a known time-varying parameter, are known parameters, are local convex constraint sets which might be dependent on the previous time slot , , and and are the number of time slots and variables.
Due to the global constraint (2), (1) is a centralized optimization problem. However, (1) is decomposable into subproblems corresponding to individual time slots; hence we can derive a sub-optimal solution to (1) by resolving it sequentially, i.e., from to . Doing so saves much time and computational costs in comparison with solving (1) for all time slots at once. Therefore, a sequential approach to solve (1) will be proposed in this chapter and will be applied to two problems, namely, DSWM and PSwEV. The former aims to maximize the benefits of both generators and consumers in transmission grids without explicitly considering ESSs, while the latter investigates the power scheduling in microgrids with EVs serving as mobile and distributed ESSs.
2.1 Dynamic social welfare maximization problem
Consider a smart grid consisting of conventional generation (CG) units, renewable generation (RG) units, and m demand units. Denote the powers generated by CG units; the powers generated by RG units; and the powers consumed by demand units; and
where and are predetermined parameters. Then the DSWM problem in smart transmission grids is as follows:
where is the total power loss in the grid at time slot , (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 , demand unit , and RG unit by , , , respectively . Then the power balance constraint (5) can be rewritten as
for , and , for . In addition, (8) is rewritten as
2.2 Power scheduling with electric vehicle
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 diesel generations (DGs), demand units, PV generations, EVs, and one microgrid operator. This microgrid is connected to the main grid (MG) whose electricity trading price is predescribed as . The electricity trading price inside the microgrid, one of decision variables, is denoted by .
2.2.1 Diesel generation and load demand
For the microgrid internal trading, the revenue function of DGs has the following form:
Load demands are assumed as fixed parameters in this problem. The electricity cost of load demands is calculated by
2.2.2 Electric vehicle
For simplicity, we assume that EVs have only one round-trip route per day, and the home of each EV owner is the only charging point for each EV.
Denote the charging/discharging power of the h-th EV during time slot t (in charging mode and in discharging mode), need to satisfy the following constraint:
To reduce computational cost, between departure and arrival time slots of a route are assumed by zero, without loss of generality, and at these departure and arrival time slots are assumed to be equal to a half of , where is the equivalently consumed power of the h-th EV as if the EV route just lasts for one time slot.
The state of charge (SOC) of EV battery at the starting point of a next time slot depends on the SOC at the starting point of current time slot and a charging/discharging efficiency , as shown in (4).
SOC constraint is as follows:
When EVs are at home (from the arrival time to the next departure time), their charging/discharging scheduling can be utilized for DR actions. The variable during EV plugged-in time is the decision variable and will be solved by the proposed algorithm. However, it is necessary to ensure that EVs have enough energy (SOC) for their routes before their departure times. To satisfy this requirement, we consider a simple EV charging strategy based on – in which and in (13) are specified during the EV plugged-in time. The EV charging strategy is presented below.
|Algorithm 1: EV charging strategy (fromto the next day)|
|1: Input: Departure time , and the required state-of-charge |
6: Return to 3
11: Return to 3
The battery life function of EVs depends on EVs charging/discharging power , as follows:
where and are constant coefficients, .
The revenue function of EVs is defined in , taking into account the battery life cost:
2.2.3 Microgrid operator
The revenue function of the microgrid operator is calculated by
where is the power trading between the MG and the microgrid via the microgrid operator. In the case that the microgrid sells power to the MG, is negative. Furthermore, needs to satisfy upper and low bounds, as follows:
2.2.4 Power balance constraint in the microgrid
With the existence of EVs and the MG, the power balance constraint in the microgrid has more terms than that in the DSWM problem, as follows:
2.2.5 PSwEV optimization problem
The PSwEV problem is to maximize the total revenue of DGs, EVs, load demands, and the microgrid operator, as follows:
3. Sequential distributed consensus-based ADMM approach
and solves them starting from until . Thus, (25) is well-defined and the time index can be dropped for conciseness. Then to solve (25), existing methods can be utilized, e.g., gradient-based methods, dual decomposition method, etc. Nevertheless, an approach called sequential distributed consensus-based ADMM (SDC-ADMM), which combines the advantages of the aforementioned methods  and avoids problems of centralized approaches, will be proposed in this section.
3.1 Multi-agent system description for smart grid
The SDC-ADMM approach is based on MAS and consensus theory so that it can be run in parallel in all generation and consumption units. Hence, the MAS description for smart grid needs to be introduced first. More specifically, each agent is assigned to a generation or demand unit, and the communication among agents is represented by an undirected graph . Each node represents a unit in the grid whose variable is or , and each edge represents the communication between two nodes. For each node , denote its neighbor set and the cardinality of .
3.2 Reformulation of smart grid optimization problems
To develop the SDC-ADMM approach, (25) is first reformulated into the 2-block form of ADMM. The following closed convex sets are defined corresponding to the global and local constraints:
together with their indicator functions 
Hence, (25) can be rewritten as follows:
Because the indicator function of a closed, non-empty convex set is proper, closed, and convex , the cost functions in (28) are also proper, closed, and convex with respect to and . Hence, (28) and (29) is exactly in a 2-block ADMM form . Next, an augmented Lagrangian associated with (28) is defined as follows:
where is a scalar penalty parameter and is called the scaled dual variable or scaled Lagrange multiplier . Subsequently, the optimization problem (28) and (29) can be iteratively solved where at each iteration the variables are updated by :
This algorithm is stopped if the criteria and are both satisfied, where and are the primal and dual residuals at iteration ; and are called primal and dual feasibility tolerances that can be chosen by
In the following, the variables will be updated in a distributed manner using MAS and consensus theory. It can be observed that is updated in a decentralized fashion when and are already updated. Therefore, only the updates of and are introduced below.
3.3 P-update step
The update of in (30) is in fact equivalent to solving the following convex optimization problem:
of which the strong duality holds . Let be the Lagrange multiplier associated with (34) and its optimal value, at the iteration of the SDC-ADMM algorithm. Then the Karush-Kuhn-Tucker (KKT) conditions can be used to find from the following equations:
Since are known, can be easily determined from (35). To find , the values of computed from (35) are substituted into (36). Usually, are chosen to be linear or quadratic functions for simplicity. Hence, the first term on the left-hand side of (35) is in the form of a linear function of , denoted by . This leads to
where . The optimal value of shown in (37) is a global variable because the information of all variables are needed. Therefore, in order to calculate it in a distributed manner, consensus theory is employed where each unit in the grid corresponding to a variable is represented by an agent which exchange its parameters and and (if ) with a few neighbors in each iteration of the SDC-ADMM algorithm. This is introduced in the following theorem:
Theorem 1. Given a connected undirected communication graph among agents, the initial conditions of agents are set to be
Consequently, the following consensus law is utilized:
where are Metropolis weights  defined by
Then the consensus of all agents is achieved, where the consensus states are
Thus, the optimal Lagrange multiplier can be obtained in a distributed manner by
Proof: Similar to the proof of Theorem 1 in , so it is omitted here for brevity. ■
Remark 1: If , then is not needed, and hence, there are only agents in the consensus problem in Theorem 1. Accordingly,
3.4 X-update step
The update of in (31) is obtained by solving a constrained quadratic programming:
Further, (42) and (43) is decentralized because both the cost function (42) and the constraint (43) are individually decomposable. Therefore, each agent (unit) just needs to solve a local scalar-constrained quadratic programming:
which is easily solved by existing methods.
3.5 Algorithm summarization
The convergence of the proposed SDC-ADMM algorithm can be proved in a similar manner to that in ; hence it is ignored here for brevity. In the following, a summary for the algorithm is provided.
|Algorithm 2: SDC-ADMM algorithm for solving (1).|
Each agent determines its local constraint set ;
Each agent calculates and , or ;
All agents run the consensus law (39) with initial values (38), then compute by (41);
Each agent updates its variable as in (37);
Each agent updates its variable by solving (44) and (45);
Each agent updates its variable as in (32);
%Check the stopping criteria
if the stopping criteria are true then
3.6 Pricing mechanism
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 in the following:
Theorem 2. For a sufficiently small but positive , i.e., , the optimal energy price in the considering smart grid converges to , the optimal Lagrange multiplier corresponding to the constraint (34) or equivalently (26), as .
Proof: For the OEM problems in smart grids, the convex functions in (1) and (25) represent the costs for power generations or for the consumers’ satisfaction. Therefore, we can denote the following functions as the reward functions for agents:
The optimal energy price in the system is achieved when the market is cleared, at which the marginal costs of all agents are the same. Hence,
In the proposed SDC-ADMM algorithm, this means
If , we obtain from (49) that
Thus, as long as the proposed SDC-ADMM algorithm converges, the optimal energy price is equal to the optimal Lagrange multiplier .■
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 with the total maximum output of 210 MW. The parameters of generators and demand units are taken from . The average PV output curve, which is shown in Figure 2, is suitably scaled from the real PV data collected in New England . Moreover, an average load profile taken from New England Independent System Operator  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.
Other parameters in the simulation are as follows. The absolute and relative tolerances are set to be , while . Moreover, the power loss coefficients of generators and consumers are randomly generated within 10%. Then the simulation results are shown in Figures 3–7.
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 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 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 capacity, respectively.
The absolute and relative tolerances are set to be and . Next, . 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 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.
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 energy generation.
Conflict of interest
The authors declare no conflict of interest.