# Unit Commitment with Ancillary Services in a Day-Ahead Power Market
## 2 Problem Formulation  
The unit commitment with ancillary services should satisfy the load demand, and must consider if the online units can respond to the load change in a short time period, i.e., the demands from AGC, RSR, and SR. The mathematical model involves multiple variables, which are mostly confined to the constraints of unit characteristics. This paper aims to minimize the total cost, including electric energy, AGC, RSR, and SR costs. That is,  
\[Min.C_{T}=\text{electric energy cost }+\text{ AGC cost }+\text{ RSR cost }+\text{ SR cost}\]  
\[C_{T}=\sum\limits_{t=1}^{m}\left[\begin{array}{c}\sum\limits_{i=1}^{m} \left(F_{i}\left(P_{i}^{t}\right)U_{i}^{t}+ST_{i}^{t}U_{i}^{t}\left(1-U_{i}^{t -1}\right)+\sum\limits_{i=1}^{m}\left(F_{ACG,i}\left(P_{AGC,i}^{t}\right)U_{i }^{t}\right.\right.\\ \left.\left.\hskip 28.452756 pt+\sum\limits_{i=1}^{m}\left(F_{RSR,i}\left(P_{RSR,i} ^{t}\right)U_{i}^{t}+\sum\limits_{i=1}^{m}F_{SR,i}\left(P_{SR,i}^{t}\right) \right.\right]\end{array}\right. \tag{1}\]  
The startup cost is divided into hot-start and cold-start cost, as expressed by  
\[ST_{i}^{t}=\left\{\begin{array}{c}hotstartcost\quad when\quad T_{i}^{off} \leq U_{i}^{off}\leq H_{i}^{off}\quad H_{i}^{off}=T_{i}^{off}+csl_{i}\\ coldstartcost\quad when\quad U_{i}^{off}>H_{i}^{off}\quad H_{i}^{off}=T_{i}^{ off}+csl_{i}\end{array}\right. \tag{2}\]  
Other related constraints are [4; 5]  
Load balance  
\[\sum\limits_{i=1}^{m}P_{i}^{t}\times U_{i}^{t}=D_{t} \tag{3}\]  
Upper and lower limits of unit generation  
\[P_{\text{Lmin}}\leq P_{i}^{t}\leq P_{i,max}\text{ I}=1,\ldots,\text{m} \tag{4}\]  
Ramping down/up rate limitations  
\[P_{i}^{t-1}-RD_{i}\leq P_{i}^{t}\leq P_{i}^{t-1}+RU_{i}\text{ I}=1,\ldots,\text{m} \tag{5}\]  
Minimum up/down time  
\[U_{i}^{t}=1\text{ for }\sum\limits_{t=t_{1,m}}^{t_{2,em}}U_{i}^{t}\geq MUT_{i} \tag{6}\]  
\[U_{i}^{t}=0\text{ for }\sum\limits_{t=t_{1,off}}^{t_{2,aff}}U_{i}^{t}\geq MDT_{i} \tag{7}\]  
The AGC rate for the load up/down is 3 min, RSR has a load up rate of 30 min, and SR has a load up rate of 60 min. Related constraints are described as follows [5]:A.  AGC limitation a The AGC demand is esxpresed as \[\sum_{i=1}^{m}P_{AGC,i}^{t,k=3}=D_{AGC}^{t,k=3}\] (8) b.  The response to the rise/down rate of 3 min can be expressed as \[P_{AGC,i}^{t,k=3}-P_{AGC,i}^{t,k=0}\leq UR_{AGC,i}^{t,k=3}\] (9) \[P_{AGC,i}^{t,k=3}-P_{AGC,i}^{t,k=0}\leq DR_{AGC,i}^{t,k=3}\] (10) B.  RSR limitation a The RSR demand is expressed as \[\sum_{i=1}^{m}P_{RSR,i}^{t,k=30}=D_{RSR}^{t,k=30}\] (11) b.  The rise rate of 30 min is expressed as \[P_{RSR,i}^{t,k=30}-P_{RSR,i}^{t,k=0}\leq UR_{RSR,i}^{t,k=30}\] (12) C.  SR limitation a The SR demand is expressed as \[\sum_{i=1}^{m}P_{SR,i}^{t,k=60}=D_{SR}^{t,k=60}\] (13) b.  The rise rate of 60 min is expressed as \[P_{SR,i}^{t,k=60}-P_{SR,i}^{t,k=0}\leq UR_{SR,i}^{t,k=60}\] (14)  
**3. Proposed Methodology**  
Regarding the unit commitment problem, two types of variables must be computed:  
1. unit state--\(U_{i}(t)\) is an integer variable;
2. generation output: \(P_{i}(t)\) is a continuous variable.  
The proposed DPSO-SQP uses DPSO to compute the unit state in the state matrix, and uses SQP to compute the assigned generation output of various units. The proposed methodology is described below.