Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
Distributed Optimization
Lecture 4: Exchange/consensus ADMM
Jalal Kazempour
26 June 2015June 21, 2019
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Learning objectives
2 Jalal Kazempour 1/16
After Lecture 4, you are expected to:
• Have a clearer idea on the applications of (augmented)Lagrangian relaxation and ADMM to energy systems.
• Explain the functioning of Exchange and Consensus ADMM.
• Implement them to illustrative examples.
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
3 Jalal Kazempour 2/12
Subject to
Consider a power system with 3 generators with quadratic cost functions and one inelastic demand:
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
4 Jalal Kazempour 2/12
Subject to
Consider a power system with 3 generators with quadratic cost functions and one inelastic demand: Cost coefficients
(constants)
Production level of
generator g Capacity of generator g
Load level (constant)
Dual variable
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
5 Jalal Kazempour 2/12
Subject to
Consider a power system with 3 generators with quadratic cost functions and one inelastic demand:
Reminder from the last lecture: This problem can be decomposed by relaxing powerbalance equality (complicating constraint). We can implement Lagrangian relaxation(LR), since the objective function is quadratic (first derivative continuous).
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
6 Jalal Kazempour 3/12
Subject to
The exact equivalent problem (but still not decomposed) is a max‐min problem:
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
7 Jalal Kazempour 3/12
Subject to
The exact equivalent problem (but still not decomposed) is a max‐min problem:
Then, pursuing decomposability, we fix dual variable to a given value This yields:
Subject to
This problem is now decomposed to three subproblems, one per generator!
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
8 Jalal Kazempour 4/12
Subject to
Three subproblems, one per generator:
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
9 Jalal Kazempour 4/12
Subject to
Three subproblems, one per generator:
Then, the value of should be updated for the next iteration (e.g., usingsubgradient method) [1]: Solve subproblems 1, 2 and 3 in iteration to obtainthe values :
where and are positive constants, e.g., and .
[1] A. J. Conejo, E. Castillo, R. Minguez, and R. Garcia‐Bertrand, Decomposition Techniques in MathematicalProgramming: Engineering and Science Applications. Berlin, Germany: Springer, 2006.
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
10 Jalal Kazempour 5/12
Subject to
The illustration of LR operation:
Subproblem 1 for generator 1:
Subject to
Subproblem 2 for generator 2:
Subject to
Subproblem 3 for generator 3:
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
11 Jalal Kazempour 5/12
Subject to
The illustration of LR operation:
Subproblem 1 for generator 1:
Subject to
Subproblem 2 for generator 2:
Subject to
Subproblem 3 for generator 3:
Coordinator ( ‐update)
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
12 Jalal Kazempour 5/12
Subject to
The illustration of LR operation:
Subproblem 1 for generator 1:
Subject to
Subproblem 2 for generator 2:
Subject to
Subproblem 3 for generator 3:
Coordinator ( ‐update)
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
13 Jalal Kazempour 5/12
Subject to
The illustration of LR operation:
Subproblem 1 for generator 1:
Subject to
Subproblem 2 for generator 2:
Subject to
Subproblem 3 for generator 3:
Coordinator ( ‐update)
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
14 Jalal Kazempour 5/12
Subject to
The illustration of LR operation:
Subproblem 1 for generator 1:
Subject to
Subproblem 2 for generator 2:
Subject to
Subproblem 3 for generator 3:
Coordinator ( ‐update)
In the market context, this is a Walrasian auction (with
quadratic offers of generators)!
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 1: Optimal power flow
15 Jalal Kazempour 6/12
Discussion:
How to generalize Example 1 including elastic demands and powertransmission system?
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
16 Jalal Kazempour 7/12
Subject to
Consider an electricity market with 3 generators (with linear offers) and one inelastic demand:
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
17 Jalal Kazempour 7/12
Subject to
Consider an electricity market with 3 generators (with linear offers) and one inelastic demand:
Offer price of generator g (parameter)
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
18 Jalal Kazempour 7/12
Subject to
Consider an electricity market with 3 generators (with linear offers) and one inelastic demand:
Offer price of generator g (parameter)
Reminder from the last lecture: We cannot implement Lagrangian relaxation (LR),since the objective function is linear (first derivative is a constant). The alternative isto implement augmented Lagrangian relaxation (ALR).
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
19 Jalal Kazempour 8/12
Subject to
The exact equivalent problem (but still not decomposed) is the following max‐min problem. Wehave added a weighted quadratic penalty term (whose value is equal to zero in the optimal point)to make the first derivative of objective function continuous:
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
20 Jalal Kazempour 8/12
Subject to
The exact equivalent problem (but still not decomposed) is the following max‐min problem. Wehave added a weighted quadratic penalty term (whose value is equal to zero in the optimal point)to make the first derivative of objective function continuous:
Then, pursuing decomposability, we fix dual variable to a given value This yields:
Subject to
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
21 Jalal Kazempour 8/12
Subject to
The exact equivalent problem (but still not decomposed) is the following max‐min problem. Wehave added a weighted quadratic penalty term (whose value is equal to zero in the optimal point)to make the first derivative of objective function continuous:
Then, pursuing decomposability, we fix dual variable to a given value This yields:
Subject toStill not decomposed! Why?
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
22 Jalal Kazempour 9/12
We use “alternating direction method of multipliers (ADMM)” to solve ALR in a decomposedmanner. Three subproblems, one per generator:
Subject to
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
23 Jalal Kazempour 9/12
We use “alternating direction method of multipliers (ADMM)” to solve ALR in a decomposedmanner. Three subproblems, one per generator:
Subject to
Then, the value of should be updated for the next iteration [1]: Solvesubproblems 1, 2 and 3 in iteration to obtain the values :
[1] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein, “Distributed optimization and statistical learning via thealternating direction method of multipliers,” Foundations and Trends in Machine Learning, vol. 3, no. 1, pp.1‐122, Jan. 2011.
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
24 Jalal Kazempour 10/12
Subject to
The illustration of ADMM operation:
Subproblem 1 for generator 1:
Subproblem 2 for generator 2:
Subproblem 3 for generator 3:
Subject to
Subject to
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
25 Jalal Kazempour 10/12
Subject to
The illustration of ADMM operation:
Subproblem 1 for generator 1:
Subproblem 2 for generator 2:
Subproblem 3 for generator 3:
Subject to
Subject to Coordinator (
‐upd
ate)
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
26 Jalal Kazempour 10/12
Subject to
The illustration of ADMM operation:
Subproblem 1 for generator 1:
Subproblem 2 for generator 2:
Subproblem 3 for generator 3:
Subject to
Subject to Coordinator (
‐upd
ate)
,
,
,
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
27 Jalal Kazempour 10/12
Subject to
The illustration of ADMM operation:
Subproblem 1 for generator 1:
Subproblem 2 for generator 2:
Subproblem 3 for generator 3:
Subject to
Subject to Coordinator (
‐upd
ate)
,
,
,
In each iteration, each generator needs to know the dispatch of other generators in the previous iteration to be able to solve its own subproblem. From market perspective, does this make sense? Is this a Walrasian auction?
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Example 2: Market clearing
28 Jalal Kazempour 10/12
Subject to
The illustration of ADMM operation:
Subproblem 1 for generator 1:
Subproblem 2 for generator 2:
Subproblem 3 for generator 3:
Subject to
Subject to Coordinator (
‐upd
ate)
,
,
,
In each iteration, each generator needs to know the dispatch of other generators in the previous iteration to be able to solve its own subproblem. From market perspective, does this make sense? Is this a Walrasian auction?
• we will talk about “Exchange ADMM”, whichresolves this issue, i.e., each generator does notneed any information of other generators.
• We will also talk about “Consensus ADMM”!
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Main Reference
29 Jalal Kazempour 2/16
S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein,“Distributed optimization and statistical learning via thealternating direction method of multipliers,” Foundationsand Trends in Machine Learning, vol. 3, no. 1, pp. 1‐122,Jan. 2011.
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Exchange ADMM
30 Jalal Kazempour 8/16
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Exchange ADMM
31 Jalal Kazempour 8/16
Consider the following compact form of market‐clearing (optimal exchange) problem with inelastic demands:
Subject to
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Exchange ADMM
32 Jalal Kazempour 8/16
Consider the following compact form of market‐clearing (optimal exchange) problem with inelastic demands:
Subject to
It is straightforward to write a similar problem with elastic demands. In that case, the right‐hand side of complicating constraint will be zero.
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Exchange ADMM
33 Jalal Kazempour 9/16
ADMM‐based solution:
Subject to
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Exchange ADMM
34 Jalal Kazempour 9/16
ADMM‐based solution:
Subject to
Each subproblem:
Subject to
and
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Exchange ADMM
35 Jalal Kazempour 9/16
Each subproblem:
Subject to
and where is the averageproduction in iteration !
ADMM‐based solution:
Subject to
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Exchange ADMM
36 Jalal Kazempour 9/16
Each subproblem:
Subject to
and where is the averageproduction in iteration !
ADMM‐based solution:
Subject to
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Exchange ADMM
37 Jalal Kazempour 9/16
Each subproblem:
Subject to
and where is the averageproduction in iteration !
Important observation: Each agent does not need to know the dispatchinformation of other agents in details. The “average” dispatch is sufficient!
26 June 2015DTU Electrical Engineering, Technical University of Denmark
An example of a market with 3 generators
38 Jalal Kazempour 10/16
26 June 2015DTU Electrical Engineering, Technical University of Denmark
An example of a market with 3 generators
39 Jalal Kazempour 10/16
The illustration of “Exchange ADMM” operation:Note: is the average production dispatch of three generators in iteration .
Subproblem 1 for generator 1:
Subproblem 2 for generator 2:
Subproblem 3 for generator 3:
Coordinator (
‐upd
ate)
,
,
,
26 June 2015DTU Electrical Engineering, Technical University of Denmark
An example of a market with 3 generators
40 Jalal Kazempour 10/16
Subject to
The illustration of “Exchange ADMM” operation:Note: is the average production dispatch of three generators in iteration .
Subproblem 1 for generator 1:
Subproblem 2 for generator 2:
Subproblem 3 for generator 3:
Subject to
Subject to Coordinator (
‐upd
ate)
,
,
,
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM
41 Jalal Kazempour 12/16
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM
42 Jalal Kazempour 12/16
Consider the following problem, including agents , but a singleglobal variable . This problem is called the “global consensus problem”,since all agents should agree on .
Subject to
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM
43 Jalal Kazempour 12/16
Consider the following problem, including agents , but a singleglobal variable . This problem is called the “global consensus problem”,since all agents should agree on .
Subject to
This problem can be rewritten as follows using auxiliary variable :
Subject to
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM
44 Jalal Kazempour 13/16
‐update subproblem for each agent
‐update subproblem (based on given values for )
‐update for each agent
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM
45 Jalal Kazempour 13/16
Subject to
‐update subproblem for each agent
‐update subproblem (based on given values for )
‐update for each agent
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM
46 Jalal Kazempour 13/16
Subject to
‐update subproblem for each agent
‐update subproblem (based on given values for )
‐update for each agent
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM
47 Jalal Kazempour 13/16
Subject to
‐update subproblem for each agent
‐update subproblem (based on given values for )
‐update for each agent
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM
48 Jalal Kazempour 14/16
Let’s first focus on this single subproblem!
‐update subproblem (based on given values for )
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM
49 Jalal Kazempour 14/16
‐update subproblem (based on given values for )
This constraint‐free optimization problem can be easily solved. This yields:
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM
50 Jalal Kazempour 14/16
‐update subproblem (based on given values for )
This constraint‐free optimization problem can be easily solved. This yields:
The ‐update subproblem is not an optimization anymore! This is called as “central collector” or “fusion center”.
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM: updated formulation
51 Jalal Kazempour 15/16
Subject to
‐update subproblem for each agent
‐update subproblem (based on given values for )
‐update for each agent
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM: updated formulation
52 Jalal Kazempour 15/16
Subject to
‐update subproblem for each agent
‐update subproblem (based on given values for )
‐update for each agent
This algorithm can be evenfurther simplified!
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM: updated formulation
53 Jalal Kazempour 15/16
Subject to
‐update subproblem for each agent
‐update subproblem (based on given values for )
‐update for each agent
Written in an average form over =1,…,N
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM: updated formulation
54 Jalal Kazempour 15/16
Subject to
‐update subproblem for each agent
‐update subproblem (based on given values for )
‐update for each agent
Written in an average form over =1,…,N
Written in an average form over =1,…,N
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM: updated formulation
55 Jalal Kazempour 15/16
Subject to
‐update subproblem for each agent
‐update subproblem (based on given values for )
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM: updated formulation
56 Jalal Kazempour 15/16
Subject to
‐update subproblem for each agent
‐update subproblem (based on given values for )
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Consensus ADMM: final form
57 Jalal Kazempour 15/16
Subject to
‐update subproblem for each agent
‐update for each agent
In each iteration , each agent independently solves its own subproblem to determine the value of global variable , while panelized based on its distance to the average value of global variable among all agents obtained in
the previous iteration!
26 June 2015DTU Electrical Engineering, Technical University of Denmark
Exercise 3
58 Jalal Kazempour 16/16
Consider a two‐stage stochastic programming problem, e.g., a two‐settlementmarket‐clearing problem with day ahead (DA) and real time (RT) stages:
Can this problem be solved by “consensus ADMM”? If so, how?
Guide: Think of relaxing the non‐anticipativity conditions, and to have one subproblem per scenario.
26 June 2015DTU Electrical Engineering, Technical University of Denmark59
Thanks for your attention!
Email: [email protected]