- Home
- Documents
*A Tutorial on Blockchainfor Microgrids: Securing Distributed ...smart-grids. Decentral: 7...*

prev

next

out of 36

View

0Download

0

Embed Size (px)

A Tutorial on Blockchain for Microgrids: Securing Distributed Optimization

Prof. Scott Moura

Energy, Controls, & Applications Laboratory (eCAL) University of California, Berkeley

Eric Munsing

2

Challenges: Intermittency, Variability, Quantity of DERs Actors: Consumers, Aggregators, Utilities, System Operators

Motivation

3

Example: Renewable Energy Credits Issues: Since RECs are not physical, how do we know Sara actually has 5 RECs to sell?

How do we verify the RECs are legitimate?

Who tracks and manages REC transactions?

4

Background Fields and Relevant Tools

Optimization & Control

Power Systems

Economics

• Mathematical Programming

• Optimization Theory

• Statistical Learning

• Optimal Power Flow

• Electricity Mkt Design• Game Theory

• Sequence and Planning

• Blockchains

• Strategic Bidding

• Distributed Optimization

• Regulation

• Economic Dispatch

Distributed v. Decentralized

6

Network Topologies

System Operator

Aggregator

Centralized

Distributed

Fully Decentralized

Centralized: Pros: Simple formulation Cons: Limited privacy, slow computations

Distributed: Pros: Fast computation, protect privacy Cons: High communication overhead

Pros: Low communication overhead, islanding Cons: Increased vulnerability to cyberattack

Fully- Decentral:

7

Distributed v. Decentralized

Weaknesses of aggregator-based consensus: • Monopoly distortions and trust issues • Single point of failure/attack • Limited scalability

Alternative: Decentralized optimization • Consensus with neighbors who share variables • Effective for sparsely connected problems

Mota et al: “D-ADMM: A Communication-efficient distributed algorithm for separable optimization” IEEE Transactions on Signal Processing (2012)

8

Do you trust your neighbors?

Challenges: • Identify compromised nodes • Reach stable operation despite

compromised nodes

Assumptions: Compromised nodes… • Can affect problem data/constraints • Can send spurious messages

? ? ?

?

?

? ?

?

?

✓ ✓ ✓

☠

☠

✓ ✓

✓

☠

9

Options for Securing Fully-Decentralized Optimization

✓ ☠ ✓

Create database of state variables • Securely timestamp variables • Requires trusted database manager

10

Blockchain-Secured Decentralized Optimization

Blockchain as decentralized record-of-trust: • Record variable updates • Run feasibility checks • Compute update step • Anything a centralized aggregator can do!

…And more: • Transparent & auditable • Fully decentralized: robust to dropouts

✓ ☠ ✓

✓

✓ ☠ ✓

✓

Abstraction:

11

New Technology: Blockchains

M1 t

MN t

Block Bt Contents

M2 t

Header

Block No.

Timestamp

Validator ID

Hash of Contents:

ϒ(B1 )

B1 B0 M1

0

Bt Bt+1 ϒ(B0)

ϒ(B0)

ϒ(Bt−1)

ϒ(Bt+1)ϒ(Bt )

ϒ(Bt )

ϒ(Bt−1)

ϒ(Bt )

Decentralized, transparent database • Consensus mechanism for state updates • Trustless • Guarantees of security + execution • Robust, scalable, stable

Open Research Areas • Coordinating decentralized devices • Decentralized optimization • Trusted sensors and data networks

Appendix

12

Why Blockchains?

Aggregators are great if: • One entity owns everything • No incentives to cheat • Communication is reliable • Aggregator isn’t attacked

Why Blockchains? • Benefits of decentralization • Strengths of central

auditors

Failure Mode Aggregator Fully-Decentralized Blockchain

ADMM

Infeasible Constraints ✓ X ✓ Noise-injection attack ✓ ✓ ✓

Communication dropouts X

✓ ✓

Monopoly distortions X ✓ ✓

13

Outline

Background: What problem does blockchain solve?

Security: Cybersecurity in decentralized and fully-decentralized optimization

Coordination: Model trustless DER coordination respecting distribution constraints

0

1

2

14

1 Decentralized DER Coordination

Q: How do we address trust issues in decentralized coordination networks?

Novelty • Use blockchains to secure distributed optimization

15

Blockchains and Decentralized Optimization

Appendix

Local Computation

Verification Step

Updated Blockchain

State

Local Computation, … ,

Auditable Consensus

Blockchains:

Examples: Bitcoin, Ethereum, …

Decentralized Optimization:

Local Optimization

Update Step

Solution

Local Optimization,…,

Consensus

Examples: ADMM, Dual Splitting, …

Local Problem

Verifiable Update Step

Solution Stored on Blockchain

Local Problem, … ,

Auditable Consensus

Combined Paradigm:

Novel Paradigm

Munsing, Mather, Moura: “Blockchains for Decentralized Optimization of Energy Resources in Microgrid Networks” CCTA 2017

16

Application: Coordinating Distributed Energy Resources

Local Problem

Verifiable Update Step

Solution Stored on Blockchain

Local Problem, … ,

Auditable Consensus …

…

ADMM Update (on Blockchain)

Consensus: Day-ahead Schedule

Local ProblemLocal Problem

…

Munsing, Mather, Moura: “Blockchains for Decentralized Optimization of Energy Resources in Microgrid Networks” CCTA 2017

• Private problem: Minimize private costs

• Global variables: Voltage & power estimates

• Update step (blockchain): ADMM average

• Converge when agree on network state

17

Distribution Networks and Convex Relaxations of OPF

Single-phase AC distribution flow equations:

li � P 2i +Q

2 i

vi ()

������

2Pi 2Qi

li � vi

������ 2

li + vi

SOCP Relaxation:

pi = Pi � X

k2�(i)

Pk + rili, i = 0, . . . , n

qi = Qi � X

k2�(i)

Qk + xili, i = 0, . . . , n

vi = v⇡(i) + 2(riPi + xiQi)� (r2i + x2i )li

li = P 2i +Q

2 i

vi , i = 1, . . . , n

Evs & Shapeable Loads1: Psi,min ss(t) Psi,max TX

t=1

ss(t) = E s i,demand

ssi (t) = 0 8t = 1, . . . , ti,startby ssi (t) = 0 8t = ti,endby, . . . ,T

Batteries1: sbi (t) = d

b i (t)� cbi (t)

Pbi,dis dbi (t) 0 cbi (t) Pbi,charge Eb,min Eb(t) Eb,max Ebi (t) = E

b i (t� 1) + cbi (t)�th

i,in

� dbi (k)�t/h i,out

(1 + ")Ebi (1) Ebi (T) (1� ")Ebi (1)

Deferrable Loads2: sd = �d

8t = 1 . . .T : 0 di(t� 1) di(t) di(t) ai(t) ai(t� ⇣) d(t) di(t) 2 (0, 1)

2Le Floch et al: “Plug-and-Play Model Predictive Control for Load Shaping and Voltage Control in Smart Grids,” IEEE Transactions on Smart Grid, to appear 3Chang, Alizadeh, Scaglione: “Coordinated Home Energy Management for Real-Time Power Balancing,” IEEE PES General Meeting, 2012

1M.E. Baran and F.F. Wul: “Optimal Capacitor Placements on Radial Distribution Systems”, IEEE Transactions on Power Delivery, 1989

18

Formulation

Decompose using ADMM: • Local variables: Local line flows and injections • Global variables: Network line flows and injections

Appendix

min

TX

t=1

nX

i=1

Ci,t(s g i (t))

s.t. power flow equations t = 1, . . . ,T

and DER constraints, i = 1, . . . , n

over sgi (t) 2 [s g i , s

g i ], i = 0, . . . , n, t = 1, . . . ,T

(Pi, Qi, li, vi)(t), i = 1, . . . , n, t = 1, . . . ,T

Objective: Minimize Energy Cost

Y. Wang, L. Wu, and S. Wang, “A Fully-Decentralized Consensus-Based ADMM Approach for DC-OPF With Demand Response,” IEEE TSGI, 2016. Q. Peng and S. H. Low, “Distributed Algorithm for Optimal Power Flow on an Unbalanced Radial Network,” 53rd CDC, 2015. P. Sulc, S. Backhaus, and M. Chertkov, “Optimal Distributed Control of Reactive Power Via the Alternating Direction Method of Multipliers,” IEEE TEC, 2014.

19

Decentralize with ADMM and deploy on blockchain

repeat Pi: Private Optimization, compute locally

Gather private constraints

Compute x̃i and send to smart contract S1

S1: ADMM Aggregator, on blockchain Update z

if krkk2 ✏pri, kskk2 ✏dual then Compute final schedule and clearing prices

Send schedule to S2

end until krkk2 ✏pri, kskk2 ✏dual

Mi: Each Smart Meter Record energy consumption

Send time-stamped & signed consumption to S2