# Spinning Reserve Capacity Optimization of a Power System When Considering Wind Speed Correlation
## 3 Optimization Model
### Constraints  
Constraint conditions mainly include the power balance (Equation (15)), the generation limits (Equation (16)), minimum running time (Equation (17)), outage time constraints (Equation (18)), and ramping constraints (Equation (19)), which are defined as follows:  
\[\sum_{i=1}^{N}P_{i,t}+\sum_{j=1}^{S}P_{j,t}^{W}=P_{\rm L,t}, \tag{15}\]  
\[P_{i,t}^{\min}\leq P_{i,t}\leq P_{i,t}^{\max}\quad\ i\in N\ \, \tag{16}\]  
\[T_{i,t}^{\rm on}\geq T_{i,\min}^{\rm on} \tag{17}\]  
\[T_{i,t}^{\rm off}\geq T_{i,\min}^{\rm off}, \tag{18}\]\[R_{i,\mathrm{Damp}}\leq P_{i,t}-P_{i,t-1}\leq R_{i,\mathrm{Uamp}}, \tag{19}\]  
where \(S\) is the number of wind farms, \(P_{i,t}^{\mathrm{w}}\) is the power output of the \(j\)th wind farm at the time \(t\); \(P_{i,t}\) is the load power at \(t\); \(P_{i,t}^{\mathrm{min}}\) and \(P_{i,t}^{\mathrm{max}}\) are the minimum and maximum available power output of thermal power unit \(i\) at \(t\), respectively; \(T_{i,t}^{\mathrm{on}}\) and \(T_{i,t}^{\mathrm{off}}\) are the operation and shutdown time, respectively, of the unit \(i\) at \(t\); \(T_{i,\mathrm{min}}^{\mathrm{on}}\) and \(T_{i,\mathrm{min}}^{\mathrm{off}}\) are the minimum values of operation time and shutdown time, respectively; \(R_{i,\mathrm{Damp}}\) and \(R_{i,\mathrm{Uamp}}\) are the ramp-down and the ramp-up limit of the thermal power generator \(i\), respectively.  
Due to the random and fluctuation of the wind power outputs and loads, some additional constraint conditions should be considered. In this paper, the probability intervals of the wind power and loads are both set as 95%, which are respectively defined as \([P_{\mathrm{W},t}^{\mathrm{min}},P_{\mathrm{W},t}^{\mathrm{max}}]\) and \([P_{\mathrm{L},t}^{\mathrm{min}},P_{\mathrm{L},t}^{\mathrm{max}}]\). Furthermore, the up and down spinning reserve capacities \(R_{\mathrm{s},t}^{\mathrm{u}}\) and \(R_{\mathrm{s},t}^{\mathrm{d}}\) needed to supply the power system at \(t\) are as follows:  
\[\left\{\begin{array}{l}R_{\mathrm{s},t}^{\mathrm{u}}=P_{\mathrm{W},t}-P_{ \mathrm{W},t}^{\mathrm{min}}+P_{\mathrm{L},t}^{\mathrm{max}}-P_{\mathrm{L},t} \\ R_{\mathrm{s},t}^{\mathrm{d}}=P_{\mathrm{W},t}^{\mathrm{max}}-P_{\mathrm{W},t }+P_{\mathrm{L},t}-P_{\mathrm{L},t}^{\mathrm{min}}\end{array}\right. \tag{20}\]  
The up and down spinning reserve constraints of the thermal power unit are as follows:  
\[r_{i,\mathrm{u}}\leq\min\bigl{\{}P_{i}^{\mathrm{max}}-P_{i,t},R_{i,\mathrm{ Uamp}}\bigr{\}} \tag{21}\]  
\[r_{i,\mathrm{d}}\geq\max\Bigl{\{}P_{i,t}-P_{i}^{\mathrm{min}},R_{i,\mathrm{ Damp}}\Bigr{\}} \tag{22}\]  
\[P\Biggl{\{}\sum_{i=1}^{N}\left(P_{i,t}+r_{i,t}^{\mathrm{u}}\right)d_{i,t}+ \sum_{j=1}^{S}P_{j,t}^{\mathrm{W}}\geq P_{\mathrm{L},t}+R_{\mathrm{s},t}^{ \mathrm{u}}\Biggr{\}}\geq\beta \tag{23}\]  
\[P\Biggl{\{}\sum_{i=1}^{N}\left(P_{i,t}+r_{i,t}^{\mathrm{d}}\right)d_{i,t}+ \sum_{j=1}^{S}P_{j,t}^{\mathrm{W}}\geq P_{\mathrm{L},t}+R_{\mathrm{s},t}^{ \mathrm{d}}\Biggr{\}}\geq\beta \tag{24}\]  
where \(r_{i,\mathrm{u}}\) and \(r_{i,\mathrm{d}}\) are the up and down spinning reserve capacity supplied by the thermal power generator unit \(i\), respectively; \(\beta\) is the confidence level of the system; \(d_{i,t}\) is the state variable of the thermal power generator unit \(i\), and \(d_{i,t}\) = 0 when the unit \(i\) is not scheduled to run in the day-ahead dispatch. Otherwise, \(d_{i,t}\) is determined by the forced outage rate \(q_{i}\) of the unit \(i\) by Monte Carlo stochastic simulation: randomly generate a pseudo-random number \(\delta_{i}\) following the uniform distribution [0,1], if \(\delta_{i}\leq q_{i}\), \(d_{i,t}\) = 0, otherwise, \(d_{i,t}\) = 1.