04 Unit Commitment
04 Unit Commitment
UNIT COMMITMENT
D R . N AE E M I Q B AL
Introduction
Economic Dispatch versus Unit Commitment
Constraints in Unit Commitment
Spinning Reserve
Thermal Unit Constraints
Other Constraints
Unit Commitment Solution Methods
Priority-List Methods
Lagrange Relaxation Solution
Mixed Integer Linear Programming
Security-Constrained Unit Commitment (SCUC)
Daily Auctions Using a Unit Commitment
APPENDIX 4A Dual Optimization on a Nonconvex Problem
APPENDIX 4B Dynamic-Programming Solution to Unit Commitment
4B.1 Introduction
4B.2 Forward DP Approach
PROBLEMS
1
20-Mar-24
Example 4A: Suppose one had the three units given here:
2
20-Mar-24
3
20-Mar-24
4
20-Mar-24
SPINNING RESERVE
5
20-Mar-24
6
20-Mar-24
7
20-Mar-24
• Priority-list Schemes
• Dynamic Programming (DP)
• Lagrange Relaxation (LR)
• Integer Programming (IP)
Priority-List Methods
8
20-Mar-24
Most priority-list schemes are built around a simple shutdown algorithm that might
operate as follows:
• At each hour when load is dropping, determine whether dropping the next unit
on the priority list will leave sufficient generation to supply the load plus spinning
reserve requirements. If not, continue operating as is; if yes, go on to the next step.
•Determine the number of hours, H, before the unit will be needed again, that is,
assuming that the load is dropping and will then go back up some hours later.
•If H is less than the minimum shutdown time for the unit, keep the commitment
as is and go to the last step; if not, go to the next step.
• Calculate two costs. The first is the sum of the hourly production costs for the
next H hours with the unit up. Then recalculate the same sum for the unit down
and add in the start-up cost for either cooling the unit or banking it, whichever
is less expensive. If there is sufficient savings from shutting down the unit, it
should be shut down; otherwise, keep it on.
•Repeat this entire procedure for the next unit on the priority list. If it is also
dropped, go to the next and so forth.
Lagrange
Function
9
20-Mar-24
The objective function, the unit limits, and any unit min up/down
time constraints are separable over units, that is:
What we do with one unit does not affect the cost of running another
unit
10
20-Mar-24
11
20-Mar-24
The minimum of the Lagrangian is found by solving for the minimum for
each generating unit over all time periods;
subject to
12
20-Mar-24
13
20-Mar-24
14
20-Mar-24
15
20-Mar-24
16
20-Mar-24
n=size(coeff,1);
T=size(Pload,2);
lambda=zeros(1,T);
q=0;
minCost=zeros(n,1);
P=zeros(n,T);
U=zeros(n,T);
lostPower=zeros(1,T);
J=0;
leastCost=zeros(1,T);
Pt=zeros(n,T);
lackCost=10000;
flag=0;
iter=1;
epsilon=0.05;
gap=0.05;
17
20-Mar-24
function [minCost,P,U]=dp(coeff,Pmin,Pmax,T,lambda)
c2=coeff(1);% coeff=[c2,c1,c0]
c1=coeff(2);
c0=coeff(3);
minCost=0;
P=zeros(1,T);
U=zeros(1,T);
optCost=zeros(1,T);
for t=1:T
P(t)=( lambda(t)-c1 )/(2*c2);
if P(t)<=Pmin
P(t)=Pmin;
elseif P(t)>=Pmax
P(t)=Pmax;
end
optCost(t)=c2*P(t)*P(t)+c1*P(t)+c0 - lambda(t)*P(t);
end
for t=1:T
if optCost(t)< 0
U(t)=1;
else
U(t)=0;
P(t)=0;
end
end
for t=1:T
minCost = minCost + U(t)* ( c2*P(t)*P(t)+c1*P(t)+c0 );
March 20, 2024 end Unit Commitment 35
if( Pload<=maxPower)
function while( abs(lostPower)>=epsilon )
[leastCost,Pt]=ecoDisp(coeff,Pmin,Pmax,U,Pload) for i=1:n
if U(i)==1
n=size(coeff,1); Pt(i)=( lambda-c1(i) )/(2*c2(i));
c2=zeros(n,1); if Pt(i)<=Pmin(i)
c1=zeros(n,1); Pt(i)=Pmin(i);
c0=zeros(n,1); elseif Pt(i)>=Pmax(i)
c2=coeff(:,1); Pt(i)=Pmax(i);
c1=coeff(:,2); end
c0=coeff(:,3); end
end
leastCost=0; sumPower=0;
Pt=zeros(n,1); for i=1:n
sumPower = sumPower + U(i)*Pt(i);
lambda=10; end
epsilon=0.1; lostPower=Pload - sumPower;
lostPower=0.1;
sumPower=0; if lostPower> 0
alpha=0.01;
maxPower=0; elseif lostPower< 0
for i=1:n alpha=0.002;
maxPower = maxPower + U(i)*Pmax(i); end
end lambda=lambda+lostPower*alpha;
end
for i=1:n
leastCost = leastCost + U(i)* (
c2(i)*Pt(i)*Pt(i)+c1(i)*Pt(i)+c0(i) );
March 20, 2024 end
Unit Commitment 36
end
18
20-Mar-24
19
20-Mar-24
SECURITY-CONSTRAINED UNIT
COMMITMENT (SCUC)
20
20-Mar-24
Homework:
minimization of
21
20-Mar-24
Convex Problem
22
20-Mar-24
where x1, x2, u1, u2 obey the limits and the 1–0 conditions as before.
Dual Optimization
rearrange
If it is positive,
then we can minimize the Lagrangian by merely setting u1 = 0;
otherwise, u1 = 1.
March 20, 2024 Unit Commitment 46
23
20-Mar-24
Dual Optimization
Note also that if both u1 and u2 are 0, the gradient will be 5, indicating a
positive value telling us to increase . Eventually, increasing will result in a
negative value for
24
20-Mar-24
25
20-Mar-24
Chapter 5
Generation with Limited Energy Supply
26
20-Mar-24
27
20-Mar-24
What is new?
Time step variables j= 1 … jmax is the quantity of gas
used By generator T in time step j
28
20-Mar-24
29
20-Mar-24
30
20-Mar-24
Operating cost of the composite unit over the entire 24-h period is
52,128.03 $. The total gas consumption is 21.8 × 106 ft3.
Since the gas-fired plant must burn 40 × 106 ft3 of gas, the cost will be
2.0 $/1000 ft3 × 40.106 ft3 , which is 80,000 $ for the gas.
The solution method shown in Figure 5.3 was used with g values ranging
from 0.500 to 0.875. The final value for gamma is 0.8742 $/ccf with an
optimal schedule as shown in Table 5.3.
This schedule has a fuel cost for the composite unit of 34,937.47 $.
Note that the gas unit is run much harder and that it does not hit either
limit in the optimal schedule.
31