![Page 1: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/1.jpg)
Informatik 7
Rechnernetze und
Kommunikationssysteme
Using Optimization in Smart Grid Applications
Dr.-Ing. Abdalkarim Awad
04.11.2015
![Page 2: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/2.jpg)
Why Optimization
Smart Grid allows better coordination between the different entities
Optimization can be used to find the best strategy, size of different components,…
We are not going to focus on the optimization algorithms rather than on how to use them
There are a lot of tools that can be used
We are going to use some tools to solve the problems.
Dr.-Ing. Abdalkarim Awad 1
![Page 3: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/3.jpg)
Several tools
ADMB
CONDOR
Joptimizer
NLOPT
Dr.-Ing. Abdalkarim Awad 2
![Page 4: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/4.jpg)
R
Nlopt
+
3
![Page 5: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/5.jpg)
What is Optimization?
Optimization is the mathematical discipline which is concerned with finding the maxima and minima of functions, possibly subject to constraints.
Dr.-Ing. Abdalkarim Awad
![Page 6: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/6.jpg)
What do we optimize?
A real function of n variables
with or without constraints
),,,( 21 nxxxf
Dr.-Ing. Abdalkarim Awad
![Page 7: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/7.jpg)
Unconstrained optimization
22 2),(min yxyxf
Dr.-Ing. Abdalkarim Awad
![Page 8: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/8.jpg)
Optimization with constraints
2
2),(min
1,52
2),(min
0
2),(min
22
22
22
or
or
yx
yxyxf
yx
yxyxf
x
yxyxf
Dr.-Ing. Abdalkarim Awad
![Page 9: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/9.jpg)
Nloptr Package
We are going to use a package called nloptr to solve non-linear optimization problems.
Dr.-Ing. Abdalkarim Awad 8
![Page 10: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/10.jpg)
Example1
GA GB
Max=120 Mvar
LB=300LA=300
Euro/hr 0.00149PG11.83PG616.9)(PGC
Euro/hr 0.00334PG11.69PG 399.8)(PGC
2
BBBB
2
AAAA
AB
Dr.-Ing. Abdalkarim Awad 9
![Page 11: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/11.jpg)
Example1
Total Hourly Cost :
Bus A Bus B
300.0 MWMW
199.6 MWMW 400.4 MWMW
300.0 MWMW
8459 $/hr
Area Lambda : 13.02
AGC ON AGC ON
Dr.-Ing. Abdalkarim Awad 10
![Page 12: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/12.jpg)
Generator cost curves
PGA+PGB=600
Euro/hr 0.00149PG11.83PG616.9)(PGC
Euro/hr 0.00334PG11.69PG 399.8)(PGC
2
BBBB
2
AAAA
Dr.-Ing. Abdalkarim Awad 11
![Page 13: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/13.jpg)
Generator cost curves
How much each generator should produce to cover the 600MW demand
The Problem can be written as:
MINIMIZE (CA(PGA)+CB(PGB))
Subject to
PGA+PGB=600
PGA>=0
PGB>=0
Dr.-Ing. Abdalkarim Awad 12
![Page 14: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/14.jpg)
Code
Dr.-Ing. Abdalkarim Awad 13
![Page 15: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/15.jpg)
Code
Dr.-Ing. Abdalkarim Awad 14
![Page 16: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/16.jpg)
Run
Dr.-Ing. Abdalkarim Awad 15
![Page 17: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/17.jpg)
Example2
Add constraints to generator 2
0<PGB<250
What is the total costs now?
Dr.-Ing. Abdalkarim Awad 16
![Page 18: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/18.jpg)
Example3
Max=50 MvarZ=0.1j
GA GBLB=300 MW
LA=300 MW
AB
Write R script to find P1 and P2 that minimizes the operation
costs and takes into considerations line limitations
Dr.-Ing. Abdalkarim Awad 17
![Page 19: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/19.jpg)
Including power Flow
2
1
1010
1010
3
3
PB
PA
N
k
kiiki BP1
))((
P1=(B12)(θ1-θ2)
P1=(B12)θ1-B12(θ2)
P2=B21(θ2- θ1)
P2=-B21(θ1)+(B21)(θ2)
Z=0.1j y=-10jB=-10
Dr.-Ing. Abdalkarim Awad 18
![Page 20: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/20.jpg)
2
1
1010
1010
3
3
PB
PA
PB-3=-(10)θ2
PB-3+(10)(θ2)=0
Solve with respect
to bus #1. i.e θ1=0
(Slack bus)
Dr.-Ing. Abdalkarim Awad 19
P12=B12*(θ1-θ2)
|P12|=|10(θ1-θ2)|<0.5
-0.5<10*θ2<0.5
-0.05<θ2<0.05
![Page 21: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/21.jpg)
Example 4
20
P1 P2
BUS2
BUS3
500 MW
Dr.- Ing. Abdalkarim Awad
100MW
L1=50
![Page 22: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/22.jpg)
Generator cost curves
C1(P1) = 400 + 9 x P1 + 0.0015 x (P1)2
100 MW ≤ P1 ≤ 600 MW
C3(P2) = 100 + 8 x P2 + 0.0048 x (P2)2
50 MW ≤ P2 ≤ 400 MW
Minimize (C1(P1)+C3(P2))
Dr.- Ing. Abdalkarim Awad 21
![Page 23: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/23.jpg)
Optimization Problem
Minimize (C1(P1)+C2(P2))
Subject to:
100 MW ≤ P1 ≤ 600 MW
50 MW ≤ P2 ≤ 400 MW
Dr.- Ing. Abdalkarim Awad 22
![Page 24: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/24.jpg)
Solution
9 + 2*0.0015 x (P1)=λ
8+ 2*0.0048 x (P2) =λ
P1+P2=500+50-100=450
P1=263.5
P2=186.5
Minimum Cost = 4634.60
Dr.- Ing. Abdalkarim Awad 23
Do they satisfy all constraints?
![Page 25: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/25.jpg)
24
P1 P2
BUS2
BUS3
BUS1
y12=-10j
y13=-10jy23=-10j
L3=500= 5 pu
P13<200=2 pu
SB=100 MVA
100MW= 1 pu
P13=221.2MW
P12=42.3
P23=178.8
P1=263.5MW 186.5MWL1=50= 0.5 pu
![Page 26: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/26.jpg)
Including power Flow
Dr.- Ing. Abdalkarim Awad 25
3
2
1
32213231
23232121
13121312
3
2
1
BBBB
BBBB
BBBB
P
P
P
N
k
kiiki BP1
))((
P1=(B12)(θ1-θ2)+B13(θ1-θ3
P1=(B12+B13)θ1-B12(θ2)-B13(θ3)
P2=-B21(θ1)+(B21+B23)(θ2)-B23(θ3)
P3=-B31(θ1)-B32(θ2)+(B31+B32)(θ3)
Compare to Y matrix!
![Page 27: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/27.jpg)
Dr.- Ing. Abdalkarim Awad 26
3
2
1
201010
102010
101020
51
5.02
1
P
P
singular P1 P2
BUS2
BUS3
BUS1
y12=-10j
y13=-10jy23=-10j
L3=500= 5 pu
P13<200=2 pu
SB=100 MVA
100MW= 1 pu
L1=50= 0.5 pu
![Page 28: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/28.jpg)
Dr.- Ing. Abdalkarim Awad 27
3
2
2010
1020
4
5.02
P
P13<200 B13(θ1-θ3)<2 (pu) θ3<0.20
(B13=-10)
Solve with respect
to bus #1. i.e θ1=0
(Slack bus)
3
2
1
20100
102010
01020
4
5.02
1
P
P
![Page 29: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/29.jpg)
Optimization Problem
Minimize (C1(P1)+C2(P2)) (in pu)
Subject to:
1 pu ≤ P1 ≤ 6 pu
0.5 pu ≤ P2 ≤ 4 pu
P1+P2=4
Dr.- Ing. Abdalkarim Awad 28
3
2
2010
1020
4
5.02
P
Θ3<0.20
![Page 30: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/30.jpg)
Solution (using R)
Dr.- Ing. Abdalkarim Awad 29
2.0
0
0
3
2
1
P1=200 MW
P2=250 MW
P13=-B13(θ1-θ3)=-10*(0-0.2)=2 pu=200 MW
Costs=4659.95>4634.60 Euro
![Page 31: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/31.jpg)
30
P1 P2
BUS2
BUS3
BUS1-10j
-10j -10j
5
P13<1.7
1
0.5 pu
![Page 32: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/32.jpg)
Optimization Problem
Minimize (C1(P1)+C2(P2)) (in pu)
Subject to:
1 pu ≤ P1 ≤ 6 pu
0.5 pu ≤ P2 ≤ 4 pu
Dr.- Ing. Abdalkarim Awad 31
P13<170 B13(θ1-θ3)<1.70 θ3<0.17
3
2
2010
1020
4
2
P
![Page 33: Using Optimization in Smart Grid ApplicationsUsing Optimization in Smart Grid Applications Dr.-Ing. Abdalkarim Awad 04.11.2015 Why Optimization Smart Grid allows better coordination](https://reader034.vdocuments.us/reader034/viewer/2022042114/5e911ab041fe941fa91cdcf7/html5/thumbnails/33.jpg)
Solution (using R)
The total generation cost becomes: 4783.03> 4634.60
Here, we had to sacrifice “cost” for “implementation”.
Dr.- Ing. Abdalkarim Awad 32
P1=110
P2=340
θ2=-0.06
θ3=0.17