Академический Документы
Профессиональный Документы
Культура Документы
f
= 1 − 4𝑥1 + 2𝑥3 = 0
𝑥1
f
= 1 − 8𝑥2 = 0
𝑥2
f
= 1 − 16𝑥3 + 2𝑥1 = 0
𝑥3
Where:
is the Lagrange multiplier
f(x) is a function representing controllable variables
o Such as cost-function that depends on number of
controllable output
g(x) is a function representing the constraints
o Such as the balance between supply and demand
Using Karush-Kuhn-Tucker Conditions
Originally developed by Harold W. Kuhn and
Albert W. Tucker and later developed by
William Karush
Are necessary conditions for the solution of
non-linear problems that is desired to be
optimal
o Provided that some regularity conditions are
satisfied
Using Karush-Kuhn-Tucker Conditions
KKT Optimality Conditions
L
1.
xi
Partial derivative of Lagrange with respect
to xi should be equal to zero
2. gi(x0) = 0:
Restatement of constraint conditions
3. hi(x0) < 0
Restatement of constraint conditions
4. i0gi(x0) = 0 where i0 > 0
Slack variables or excess is equal to zero in
optimal condition
Example: Generation Supply and Demand
Consider two generating plants supplying a given power
demand of 50 MW. The fuel costs of each is related to
the output power as detailed below:
2
F1 =5P1 + 0.01P1
2
F2 =2P2 + 0.04P2
2 2
L(x, ) = (5P1 + 0.01P1 + 2P2 + 0.04P1 ) + [ * (Demand – P1 – P2) ]
L
=(5 + 0.02P1 + 0 + 0) + [ ∗ (0 – 1 – 0) ] = 0
P1
L
=(0 + 0 + 2 +0.08P2 ) + [ ∗ (0 – 0 – 1) ] = 0
P2
L
=(0 + 0 + 0 +0) + [ 1 ∗ (Demand – P1 – P2) ] = 0
Case Demand P1 P2
1 50 10 40 5.2
2 100 50 50 6.0
3 200 130 70 7.6
𝐶𝑡𝑜𝑡𝑎𝑙 = 𝐶𝑖 = 𝑖 + 𝑖 𝑃𝑖 + 𝑖 𝑃𝑖 2
𝑖=1 𝑖=1
We can also get the standard equation for all generators upon
getting the partial derivative (KKT condition 1) using the above
equation
− 𝑖
𝑃𝑖 =
2𝑖
Method 1: Lambda-Iteration Method
Let us not forget the following standard equation derived
previously
− i
Equation (1) Pi =
2i
We will be trying to get the nearest value for lambda using this
method. The following are the steps:
1. Pick any high and low value for lambda (H and L )
2. Get the mid-point of H and L . This shall be M
+
3. M = H L
2
4. Get Pi using M in equation (1)
5. If σm
i=1 Pi M − PDemand > 0, then H = M for the next iteration
6. If σm
i=1 Pi M − PDemand < 0, then L = M for the next iteration
7. Continue steps 5 and 6 until the absolute difference between H
and L is < a tolerance
Example for Method 1: Lambda-Iteration Method
Using the same problem before
Consider two generating plants supplying a given power
demand of 50 MW. The fuel costs of each is related to
the output power as detailed below:
2
F1 =5P1 + 0.01P1
2
F2 =2P2 + 0.04P2
For generator 1:
−5 −5
P1 = =
2 0.01 0.02
For generator 2:
−2 −2
P2 = =
2 0.04 0.08
𝑥 𝑘+1 = 𝑥 𝑘 − 𝛻𝑓
Where:
f
𝛻𝑓 =
xi
is a scalar value
Method 2: Gradient Search Method
Remembering the Lagrange function
L(x, ) = f(x) + [ * g(x) ]
𝑘+1 = 𝑘 + ∆𝑘
Where:
∆Pk
∆k =
σm
1
i=1 2
i
∆Pk = PDemand − σm P
i=1 i
𝑘
Example for Method 2: Gradient Search Method
Using the same problem before
Consider two generating plants supplying a given power
demand of 50 MW. The fuel costs of each is related to
the output power as detailed below:
2
F1 =5P1 + 0.01P1
2
F2 =2P2 + 0.04P2
∆Pk = PDemand − σ
m P 𝑘 = 50 – (250 + 100) = -300
i=1 i
∆Pk −300
∆k = = = - 4.8
σm
1 1 + 1
i=1 2 2 0.01 2 0.04
i
Example for Method 2: Gradient Search Method
We then obtain the lambda for the next iteration using
the formula previously stated
o k+1 = k + ∆k
2 2
L(x, ) = (5P1 + 0.01P1 + 2P2 + 0.04P1 ) + [ * (Demand – P1 – P2) ]
L
=(5 + 0.02P1 + 0 + 0) + [ ∗ (0 – 1 – 0) ] = 0
x1
L
=(0 + 0 + 2 +0.08P2 ) + [ ∗ (0 – 0 – 1) ] = 0
x2
L
=(0 + 0 + 0 +0) + [ 1 ∗ (Demand – P1 – P2) ] = 0
Method 3: Newton’s Method
Re-arranging the previous equations will
L
: 0.02P1 + 0 − = −5
x1
L
: 0 + 0.08P2 − = −2
x2
L
: P1 + P2 + 0= Demand
Method 3: Newton’s Method
In matrix form:
0.02 0 -1 P1 -5
0 0.08 -1 P2 = -2
1 1 0 Demand
We can now obtain the values for P1, P2, and lambda
Method 3: Newton’s Method with Gen Limits
We can further expand the Lagrange equation based on
Condition 4 of the KKT
o i0gi(x0) = 0 where i0 > 0
Slack variables or excess is equal to zero in optimal
condition
This expansion is to consider generator limits in the
equation. It is formulated as follows
Method 3: Newton’s Method with Gen Limits
If we solve this matrix equation
0.02 0 -1 P1 -5
0 0.08 -1 P2 = -2
1 1 0 Demand
2 2
L(x, ) = (5P1 + 0.01P1 + 2P2 + 0.04P1 ) + [ * (Demand – P1 – P2) ] +
max
2 𝑚𝑎𝑥 P2 − P2
L
=(5 + 0.02P1 + 0 + 0) + [ ∗ (0 – 1 – 0) ] + 0 = 0
P1
L
=(0 + 0 + 2 +0.08P2 ) + [ ∗ (0 – 0 – 1) ] − 2 𝑚𝑎𝑥 = 0
P2
L
=(0 + 0 + 0 +0) + [ 1 ∗ (Demand – P1 – P2) ] + 0 = 0
L max
= 0 + 0 + P2 − P2 = 0
2 𝑚𝑎𝑥
Method 3: Newton’s Method with Gen Limits
Adding the last equation, we now have four equations, four
unknowns
0.02 0 -1 0 P1 -5
0 0.08 -1 -1 P2 -2
=
1 1 0 0 Demand
0 1 0 0 2
𝑚𝑎𝑥
P2max