# Synergistic Optimization of Coal Power and Renewable Energy Based on Generalized Adequacy
## 3 Coordinated Optimization Model of Coal Power and Renewable Energy
### Constraints
Flexibility adequacy is primarily based on two aspects: first, the flexible response provided by controllable units, and second, the flexibility demand induced by fluctuations on the supply and demand sides. Therefore, flexibility adequacy indicators are translated into adequacy constraints in power planning. This ensures that the system can respond to supply and demand fluctuations with a certain level of margin based on its own flexible adjustment capabilities. When load and renewable energy generation (wind and solar) fluctuate, the resulting flexibility demand requires coal-fired units to promptly increase or decrease the output. During output adjustments, these units are constrained by the ramp rates of the currently online units and the startup and the shutdown ramp rates of the offline units. \[P_{c,t}-P_{c,t-1}\leq(\overline{P}_{c,t}-S_{c,t}^{SU})\cdot R_{c}^{RU}+S_{uc} \cdot S_{c,t}^{SU}-\lambda_{c}^{\text{min}}\cdot S_{c,t}^{SD},\forall t \tag{56}\]  
\[P_{c,t-1}-P_{c,t}\leq(\overline{P}_{c,t}-S_{c,t}^{SU})\cdot R_{c}^{RD}-\lambda _{c}^{\text{min}}\cdot S_{c,t}^{SU}+S_{dc}\cdot S_{c,t}^{SD},\forall t \tag{57}\]  
where \(R_{c}^{RD}\) and \(R_{c}^{RU}\) are the ramp-up and ramp-down rates, while \(S_{uc}\) and \(S_{dc}\) represent the ramping levels during startup and shutdown. \[\overline{P}_{c,t}=\overline{P}_{c,t-1}+S_{c,t}^{SU}-S_{c,t}^{SD},\forall t \tag{58}\]  
\[\left\{ \begin{array}{l}0\leq S_{c,t+1}^{SD}\leq\overline{P}_{c,t}-\sum_{ \begin{subarray}{c}\tau=0\\ \tau=0\end{subarray}}^{t-1}S_{c,t-\tau}^{SU},t=1,\ldots,T_{c}^{on}-1\\ 0\leq S_{c,t+1}^{SD}\leq\overline{P}_{c,t}-\sum_{\tau=0}^{T_{c}^{on}-2}S_{c,t- \tau}^{SU},t=T_{c}^{on},\ldots,T-1\end{array} \right. \tag{59}\]  
\[\left\{ \begin{array}{l}0\leq S_{c,t+1}^{SU}\leq\overline{S}_{c}-\overline{P }_{c,t}-\sum_{\tau=0}^{t-1}S_{c,t-\tau}^{SD},t=1,\ldots,T_{c}^{off}-1\\ 0\leq S_{c,t+1}^{SU}\leq\overline{S}_{c}-\overline{P}_{c,t}-\sum_{\tau=0}^{T_{ c}^{off}-2}S_{c,t-\tau}^{SD},t=T_{c}^{off},\ldots,T-1\end{array} \right. \tag{60}\]where \(S_{c,t}^{\text{S}{\text{I}}}\) and \(S_{c,t}^{\text{S}{\text{D}}}\) represent the capacity of units starting up and shutting down at time \(t\), respectively, and \(T_{c}^{\text{on}}\) and \(T_{c}^{\text{off}}\) denote the minimum startup and shutdown times for the cluster of units. Equations (59) and (60) constrain the startup (or shutdown) capacity of coal-fired units within the time frame \([t-UT,\ t]\), preventing the units from being shut down (or started up) again at time t, thus avoiding frequent cycling. The system's flexibility demand arises from short-term fluctuations in the load and wind/solar power generation. Considering short-term responses, in addition to using energy storage resources, it is crucial to utilize the controllable ramp-up and ramp-down capabilities of coal-fired units. These units can quickly provide the necessary spinning reserve during different periods to meet flexibility requirements. To ensure sufficient flexibility adequacy, only the spinning reserve provided by coal-fired units is considered, without additional reliance on energy storage. \[P_{c,t}^{r}=\overline{P}_{c,t}-P_{c,t},\forall t \tag{61}\]  
\[\min(\frac{R_{c}^{R}\cdot\overline{P}_{c,t}}{h_{n}},P_{c,t}^{r})\geq r_{load} \cdot D_{t}+r_{\text{v}re}\cdot(\sum_{w\in G_{w}}P_{w,t}+\sum_{pV\in G_{PV}}P_ {PV,t}),\forall t \tag{62}\]  
where \(P_{c,t}^{r}\) denotes the online thermal reserve capacity at time \(t\), \(R_{c}^{R}\) represents the ramp rate of the generating unit, and \(r_{\text{l}and}\) and \(r_{\text{v}re}\) indicate the short-term fluctuation demand rates of the load and renewable energy sources, respectively. \(h_{n}\) is shown as a constant, since the time intervals in this section are in hours, when \(h_{n}\) is 2, it indicates a response within 30 min, and when \(h_{n}\) is 4, it indicates a response within 15 min. Inertia adequacy indicates that the inertia supply in the system meets the demand. The inertia demand level of the system load serves as the boundary constraint for the stable operation of the system.