Convolutional Neural Network-based RoCoF-Constrained Unit Commitment
The fast growth of inverter-based resources such as wind plants and solar
farms will largely replace and reduce conventional synchronous generators in
the future renewable energy-dominated power grid. Such transition will make the
system operation and control much more complicated; and one key challenge is
the low inertia issue that has been widely recognized. However, locational
post-contingency rate of change of frequency (RoCoF) requirements to
accommodate significant inertia reduction has not been fully investigated in
the literature. This paper presents a convolutional neural network (CNN) based
RoCoF-constrained unit commitment (CNN-RCUC) model to guarantee RoCoF stability
following the worst generator outage event while ensuring operational
efficiency. A generic CNN based predictor is first trained to track the highest
locational RoCoF based on a high-fidelity simulation dataset. The RoCoF
predictor is then formulated as MILP constraints into the unit commitment
model. Case studies are carried out on the IEEE 24-bus system, and simulation
results obtained with PSS/E indicate that the proposed method can ensure
locational post-contingency RoCoF stability without conservativeness.
Mingjian Tuo, Xingpeng Li
# Convolutional Neural Network-based RoCoF-Constrained Unit Commitment

###### Abstract

The fast growth of inverter-based resources such as wind plants and solar farms will largely replace and reduce conventional synchronous generators in the future renewable energy-dominated power grid. Such transition will make the system operation and control much more complicated; and one key challenge is the low inertia issue that has been widely recognized. However, locational post-contingency rate of change of frequency (RoCoF) requirements to accommodate significant inertia reduction has not been fully investigated in the literature. This paper presents a convolutional neural network (CNN) based RoCoF-constrained unit commitment (CNN-RCUC) model to guarantee RoCoF stability following the worst generator outage event while ensuring operational efficiency. A generic CNN based predictor is first trained to track the highest locational RoCoF based on a high-fidelity simulation dataset. The RoCoF predictor is then formulated as MILP constraints into the unit commitment model. Case studies are carried out on the IEEE 24-bus system, and simulation results obtained with PSS/E indicate that the proposed method can ensure locational post-contingency RoCoF stability without conservativeness.

 Convolutional neural network, Deep learning, Frequency stability, Low-inertia power systems, Rate of change of frequency, Unit commitment. +
Footnote †: publication: Submitted to the 23rd Power Systems Computation Conference (PSCC 2024).

## I Introduction

Integration of converter-based resources such as wind plants and solar farms help realize the decarbonization of the electricity generation. However, the increased penetration of renewable energy sources (RES) imposes great challenges on maintaining power system frequency stability for reliable system operations [1]. Traditionally, synchronous generators play an important role in regulating frequency excursion and rate of change of frequency (RoCoF) after a disturbance as it ensures slower frequency dynamics [2]. The conventional source of system kinetic energy, provided by rotating masses, decreases significantly as synchronous generators are retired and replaced. This makes the system more susceptible to large fluctuations in load or generation [3]. It is also reported that the lack of system inertia has already caused wind curtailment in Ireland [4].

With high penetration levels of renewable energy sources, transmission system operators (TSOs) pay more attentions to the increased frequency stability challenges. There are considerable interests in incorporating post-contingency rate of change of frequency (RoCoF) constraints into the traditional security-constrained unit commitment (SCUC) model. Such incorporation helps determine the minimum requirement for synchronous inertia online and ensure the stability of system frequency [5].

EirGrid has introduced a synchronous inertial response constraint to ensure that the available inertia is always above a minimum limit of 23 GWs in the Ireland grid [6]. Swedish TSO once ordered one of its nuclear power plants to reduce output by 100 MW to mitigate the risk of loss of that power plant considering system frequency stability [7]. Both [8]-[9] implement a system frequency stability constrained multiperiod SCUC model which incorporated frequency related constraints derived from uniform frequency dynamic model. In [10], uniform frequency response model was extended by including converter-based control, and constraints on RoCoF are then derived and incorporated into SCUC formulations. Yang proposes a data-driven distributionally robust chance-constrained approach which optimizes the SCUC problem while limiting the risk of frequency related constraint violations [11]. The work in [12] studies a mixed analytical-numerical approach based on multi-regions and investigated a model combining evolution of the center of inertia and certain inter-area oscillations. However, these approaches oversimplify the problem as they neglect locational frequency dynamics and the oscillation within the system. The actual need for frequency ancillary services would be subsequently underestimated.

Reference [13] considers the geographical discrepancies and connectivity impacts on nodal frequency dynamics. However, simulation results show that these physical model-based approaches may fail to handle higher order characteristics and nonlinearities in system frequency response. Model approximation may introduce large errors
into the derived constraints, resulting in more conservative solutions. Recently, a pioneering data-driven approach has been proposed in [14], which incorporates neural network-based frequency nadir constraints against the worst-case contingency into RoCoF-constrained unit commitment (RCUC). However, a power system is an interconnected network of generators and loads which has embedded spatial information. Traditional methods neglect the spatial information embedded in the system, and RoCoF predictions for each node were not considered.

In this paper, we propose a novel convolutional neural network (CNN)-based RCUC (CNN-RCUC) model to address the aforementioned gaps. A unique feature of this model is that its solution can ensure system frequency stability after the occurrence of the most severe contingency event. CNN-based RoCoF predictor is first trained using system operation data, which can reflect geographical discrepancies and locational frequency dynamics due to non-uniform distribution of inertia. The major contributions of this work are summarized as follows:

* First, to enhance the data-driven RCUC model, we incorporate locational post-contingency RoCoF requirements as constraints. Unlike existing data-driven methods that solely rely on fully connected layer based deep neural network (DNN), we introduce a CNN-based RoCoF predictor that utilizes spatial information processing. This predictor effectively monitors locational RoCoF, even in post-contingency scenarios where frequency oscillations must be taken into account.
* Secondly, we demonstrate the dynamic model of a power system that includes a realistic number of generators located at various nodes; heterogeneous responses of each node are then derived. Instead of creating random grid operation data that may not be reasonable or realistic, we implemented a model-based approach that enforces system locational frequency security to efficiently generate realistic data samples which covers a vast range of operating conditions. It can also eliminate samples with post-contingency instability issues.
* Last, the condition of disturbance propagation is considered [13]. Methods focusing on the initial RoCoF value may fail to capture highest locational RoCoF value during the oscillation. The proposed CNN based RoCoF predictor can track the highest RoCoF within the period following the contingency and secure frequency stability.

The remainder of this paper is organized as follows. In section II, the frequency dynamic model and data-driven approach are demonstrated. Section III details the definition of input feature vector and the architecture of convolutional neural network based RoCoF predictor. Section IV describes the formulation of proposed CNN-RCUC model and the linearization of CNN forward propagation. The simulation results and analysis are presented in Section V. Section VI presents the concluding remarks and future work.

## II System Frequency Dynamics and Overview of Solution

### System Frequency Dynamics

The power system's frequency is a crucial measure that signifies the stability of the system. In the past, the frequency is usually interpreted as either a representation of a single bus or as the center of inertia (COI) representation. The total inertia of the power system was regarded as the sum of the kinetic energy stored in all the generators synchronized with the system [15].

\[E_{sys}=\sum_{i=1}^{N}2H_{i}S_{h_{i}} \tag{1}\]

where \(S_{h_{i}}\) is the generator rated power in MVA and \(H_{i}\) denotes the inertia constant of the generator which is usually provided by the generator manufacturer.

When a disturbance occurs in the electrical power system, the dynamics between power and frequency can be modeled by the swing equation described in (2) with \(M=2H\) denoting the normalized inertia constant and \(D\) denoting damping constant respectively [16].

\[P_{m}-\Delta P_{e}=M\frac{\partial\Delta\omega}{\partial t}+D\Delta\omega \tag{2}\]

where \(\Delta P_{m}\) is the total change in mechanical power and \(\Delta P_{e}\) is the total change in electric power of the power system. \(\partial\Delta\omega/\partial t\) is commonly known as RoCoF. However only considering system uniform metrics would neglect the geographical discrepancies in locational frequency dynamics on each bus, which has imposed risks on power system stability [12]. The topological information and system parameters can be embedded into the model by using swing equation on each individual bus to describe the oscillatory behavior within the system,

\[m_{i}\ddot{\theta_{i}}+d_{i}\dot{\theta_{i}}=P_{n_{i},i}-\sum_{j=1}^{n}b_{i,j }\sin(\theta_{i}-\theta_{j}) \tag{3}\]

where \(m_{i}\) and \(d_{i}\) denote the inertia coefficient and damping ratio for node \(i\) respectively, while \(P_{n_{i},i}\) denotes the power input. A network-reduced model with \(N_{g}\) generator buses can be obtained by eliminating passive load buses via Kron reduction [17]. By focusing on the network connectivity's impact on the power system nodal dynamics, the phase angle \(\theta\) of generator buses can be expressed by the following dynamic equation [18],

\[M\ddot{\theta}+D\dot{\theta}=P-L\theta \tag{4}\]

where \(M=\text{diag}\left(\left\{m_{i}\right\}\right),\)\(D=\text{diag}\left(\left\{d_{i}\right\}\right);\) for the Laplacian matrix \(L\), its off-diagonal elements are \(l_{y}=-b_{y}V_{i}^{(0)}V_{j}^{(0)}\), and diagonals are \(l_{y}=\sum_{j=1,j,n_{i}}^{s}b_{y}V_{i}^{(0)}V_{j}^{(0)}\). The RoCoF value at bus \(i\) can then be derived,
\[f_{\sigma_{d},f_{i}}(t_{o})=\] (5) \[\frac{\Delta Pe^{\frac{-\frac{\gamma t}{2}}{2}}}{2\pi m}\sum_{s=1}^{ \frac{\gamma t}{2}}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!
the input features \(x_{i}\), which helps improve the performance of machined learning assisted SCUC.

The CNN model used in this study is illustrated in Fig. 1 created using the NN-SVG tool. The proposed model consists of two types of layers, namely convolutional and fully connected layers. The convolutional layers aim to learn feature representations of the input. The convolutional layer is composed of \(\xi\) convolutional kernels which are used to compute different feature maps. In essence, the neurons within a feature map establish connections with neighboring neurons in the preceding layer, forming a receptive field for each neuron. This receptive field is a region of influence that affects the neuron's input. To generate a new feature map, the input is convolved with a learned kernel and then subjected to an element-wise nonlinear activation function on the convolved outcomes. It's important to note that in the process of generating each feature map, the kernel is utilized across all spatial locations of the input, effectively sharing the same kernel weights throughout the entire input volume. The forward propagation equations are defined as,

\[\hat{z}_{i,j}^{o}=x_{i,j}w_{\xi}^{o}+b_{\xi}^{o},\forall i,\forall j,\forall \sigma,\forall\xi \tag{12}\]

\[z_{i,j}^{o}=\max\left(z_{i,j,\sigma}^{o},0\right),\forall i,\forall j,\forall \sigma,\forall\xi \tag{13}\]

where \(w_{\xi}^{o}\) and \(b_{\xi}^{o}\) are the weight vector and bias term of the \(\xi\) -th filter of the \(o\) -th layer respectively, and \(x_{i,j}\) is the input patch centered at location \((i,j)\) of the \(o\) -th layer. It should be noted that the kernel \(w_{\xi}^{o}\) that generates the feature map is shared, such mechanism can reduce the model complexity and improve the efficiency of the model. ReLU is used as the activation function for introducing nonlinearities to CNN.

Before feeding into the fully connected layer, the convolved features should be flattened in advance. Denoting the flatten function as flatten(\(\cdot\)), for the generated feature map \(z_{i,j,\xi}^{o}\) we have,

\[z^{full}=\text{flatten}\left(z_{\xi}^{o_{x}}\right) \tag{14}\]

\[z^{1}=z^{full}W^{1}+b^{1} \tag{15}\]

\[\hat{z}^{q}=z^{q-1}W^{q}+b^{q} \tag{16}\]

\[z^{q}=\max\left(z^{q},0\right) \tag{17}\]

and

\[R_{h,s}=z_{N_{L}}W_{N_{L+1}}+b_{N_{L+1}} \tag{18}\]

where \(O_{N}\) is the last convolutional layer, \(W^{q}\) and \(b^{q}\) represent the weight and bias for the \(q\) -th fully connected layer. \(W_{N_{L+1}}\) and \(b_{N_{L+1}}\) represent the set of weight and bias of the output layer. The training process is to minimize the total mean squared error between the predicted output and the labeled outputs of all training samples as follows,

\[\min_{\phi}\frac{1}{N_{S}}\sum_{s=1}^{N_{S}}\left(\hat{f}_{\text{max}}-\hat{f} _{ref}\right)^{2} \tag{19}\]

where \(\Phi=\left\{w_{\xi}^{o},b_{\xi}^{o},W^{q},b^{q},W_{N_{L+1}}^{\text{ref}},b_{N_{ L+1}}^{\text{ref}}\right\}\) represents the set of optimization variables.

## IV CNN-Based RoCoF-Constrained Unit Commitment

### _Basic SCUC Model_

In this section, the proposed CNN-RCUC considering frequency related constraints is formulated. The objective of the modified CNN-RCUC model is to minimize total operating cost subject to various system operational constraints and guarantee system frequency stability. The formulation is shown below:

\[\min_{\phi}\sum_{g\in G}\sum_{i\sim t}(c_{g}P_{g,s}+c_{g}^{NL}u_{g,t}+c_{g}^{SN}v_{g,t}+c_{g}^{RE}v_{g,t}) \tag{20a}\] \[\sum_{g\in G}P_{g,t}+\sum_{i\in K^{c}}(P_{g,t}-\sum_{i\in K^{c}}P _{g,t}-D_{g,t}+E_{g,t}=0,\forall n,t\] (20b) \[P_{k,t}-b_{k}\left(\theta_{a,t}-\theta_{a,t}\right)=0,\forall k,t\] (20c) \[-I_{k}^{\text{max}}\leq P_{k,t}\leq P_{k^{\text{max}}},\forall k,t\] (20d) \[P_{g}^{\text{min}}u_{g,t}\leq P_{g,t},\forall g,t\] (20e) \[P_{g,t}+r_{g,t}\leq u_{g,t},P_{g,t}^{\text{max}},\forall g,t\] (20f) \[0\leq r_{g,t}\leq R_{g}^{\text{re}}u_{g,t},\forall g,t\] (20g) \[\sum_{j\in G}r_{j,t}\geq P_{g,t}+r_{g,t},\forall g,t\] (20h) \[P_{g,t}-P_{g,t-1}\leq R_{g}^{\text{tr}},\forall g,t\] (20i) \[P_{g,t}\geq u_{g,t}-u_{g,t-1},\forall g,t\] (20k) \[v_{g,t+1}\leq 1-u_{g,t},\forall g,t\leq nT-1\] (20l) \[v_{g,t}\leq u_{g,t},\forall g,t\] (20m) \[\sum_{s+t\sim t_{T_{g}}}^{t}v_{g,t}\leq u_{g,t},\forall g,t\geq UT _{g}\] (20n) \[\sum_{s+t\sim t_{T_{g}}}^{t+D_{g}}v_{g,t}\leq 1-u_{g,t},\forall g,t\geq nT -DT_{g}\] (20o) \[u_{g,t},v_{g,t}\in\{0,1\},\forall g,t \tag{20p}\]

Equation (20a) is the objective function, and the basic constraints include (20b)-(20o). Equation (20b) enforces the

Fig. 1: Architecture of proposed CNN model.
nodal power balance. Network power flows are calculated in (20c) and are restricted by the transmission capacity as shown in (20d). The scheduled energy production and generation reserves are bounded by unit generation capacity and ramping rate (20e)-(20j). As defined in (20h), the reserve requirements ensure the reserve is sufficient to cover any loss of a single generator. The start-up status and on/off status of conventional units are defined as binary variables (20k)-(20m). Minimum-down time before a generator can be started-up and the minimum-up time before a generator can be shutdown are depicted in (20n) and (20o), respectively. Indicating variables for generator start-up and commitment status are binary and are represented by (20p).

### _Feature Encoding_

Since \(\boldsymbol{\sigma}_{i}^{G}\) contains the max operator, it cannot be directly used in the encoding formulation. Thus, we introduce the supplementary variables to indicate if generator \(g\) outputs the largest active power in scheduling period \(t\). The reformulations are expressed as follows,

\[P_{x,t}^{G}-P_{g,t}^{G}\leq A\left(1-v_{g,t}^{G}\right),\forall g,t \tag{21}\] \[\sum_{g\in G}v_{g,t}^{G}=1,\forall t \tag{22}\]

where \(A\) is a big number. Equation (21) enforces \(v_{g,t}^{G}\) to be zero if the dispatched power of any generator \(\chi\) is larger than interested generator \(g\) at period \(t\). Equation (22) ensures that there would be only one largest generator being considered as the potential largest contingency. Equation (21) together with (22) could enforce generator \(g\) has the largest output power and \(v_{g,t}^{G}\) would be set as 1. To further encode the magnitude and spatial information of disturbance into feature vector, variable \(\rho_{x,t}^{G}\) is introduced, and the value of \(\rho_{x,t}^{G}\) equals to the largest generation \(P_{g,t}^{G}\), the constraints can be expressed as follows,

\[\rho_{x,t}^{G}-P_{g,t}^{G}=-A\left(1-v_{g,t}^{G}\right),\forall g,t \tag{23}\] \[\rho_{x,t}^{G}-P_{g,t}^{G}\leq A\left(1-v_{g,t}^{G}\right),\forall g,t\] (24) \[0\leq\rho_{x,t}^{G}\leq Av_{g,t}^{G},\forall g,t \tag{25}\]

Thus, the overall feature vector of a case \(x_{\text{g}}\) can be then defined as follows,

\[x_{t}=[u_{1,t},\cdots,u_{g,t},\rho_{1,t}^{G},\cdots,\rho_{g,t}^{G},P_{1,t}, \cdots,P_{g,t}],\forall g,t \tag{26}\]

### _CNN Linearization_

Since ReLU activation functions are nonlinear, to include the CNN into the MILP, binary variables \(\alpha_{i,t,\xi,t}^{o}\) and \(\alpha_{i,t}^{g}\) are introduced which represent the activation status of the ReLU within CNN model. Considering \(A\) is a big number that is larger than the absolute value of all \(\hat{z}_{i,t,\xi,t}^{o}\) and \(\hat{z}_{i,t}^{g}\), when preactivated value \(\hat{z}_{i,t,\xi,t}^{o}\) or \(\hat{z}_{i,t}^{g}\) is larger than zero, constraints (27b) - (27e) and (27h) - (27f) will force binary variables \(\alpha_{i,i,\xi,t}^{o}\) or \(\alpha_{i,t}^{g}\) to one, and the activated value will be equal to pre-activated value. When \(\hat{z}_{i,t,\xi,t}^{o}\) or \(\hat{z}_{i,t}^{g}\) is less than or equal to zero, constraints will force binary variable \(\alpha_{i,i,\xi,t}^{o}\) or \(\alpha_{i,t}^{g}\) to zero. Subsequently, the activated value will be set zero.

\[\hat{z}_{i,t,\xi,t}^{o}=x_{i,t,j}W_{\xi}^{o}+b_{\xi}^{o},\forall i,j,t,o,\xi \tag{27a}\] \[z_{i,t,\xi,t}^{o}\leq\hat{z}_{i,t,\xi,t}^{o}+A\left(1-\alpha_{i,t,\xi,t}^{o}\right),\forall i,j,t,o,\xi\] (27b) \[z_{i,t,\xi,t}^{o}\geq\hat{z}_{i,t,\xi,t}^{o},\forall i,j,t,o,\xi\] (27c) \[z_{i,t,\xi,t}^{o}\leq A\alpha_{i,t,\xi,t}^{o},\forall i,j,t,o,\xi\] (27d) \[z_{i,t,\xi,t}^{o}\geq 0,\forall i,j,t,o,\xi\] (27e) \[z_{i,t}^{\text{full}}=\text{flatten}\left(z_{i}^{o_{i}}\right),\forall t\] (27f) \[z_{i,t}^{1}=z_{i}^{\text{full}}W_{1}^{1}+b_{1}^{1},\forall l,t\] (27g) \[\hat{z}_{i,t}^{g}=z_{i,t}^{\text{full}}W_{1}^{g}+b_{t}^{g},\forall q,l,t\] (27h) \[z_{i,t}^{q}\leq\hat{z}_{i,t}^{q}+A\left(1-\alpha_{i,t}^{q}\right), \forall q,l,t\] (27i) \[z_{i,t}^{q}\geq\hat{z}_{i,t}^{q},\forall q,l,t\] (27j) \[z_{i,t}^{q}\leq A\alpha_{i,t}^{q},\forall q,l,t\] (27k) \[z_{i,t}^{q}\geq 0,\forall q,l,t\] (27l) \[\alpha_{i,t,\xi,t}^{o},\alpha_{i,t}^{q}\in\{0,1\},\forall i,j,o,q,\zeta,l,t \tag{27m}\]

## V Results Analysis

A case study on the IEEE 24-bus system [20] is provided to demonstrate the effectiveness of the proposed methods. This test system contains 24 buses, 33 generators and 38 lines, which also has wind power as renewable resources. The mathematical model-based data generation is operated in Python using Pyomo [21]. The PSS/E software is used for time domain simulation and labeling process [22]. We use full-scale models for the dynamic simulation during the labeling process: GENROU and GENTPJ for the synchronous machine; IEEEX1 for the excitation system; IESGO for the turbine-governor; PSS2A for the power system stabilizer. Standard wind turbined generator (WTG) and corresponding control modules are employed. The data creation and verification steps are implemented using Pyomo and PSS/E. SCUC is solved using Gurobi solver. Machine learning step is implemented in Python 3.6. A computer with Intel(r) Xeon(R) W-2295 CPU @ 3.00GHz, 192 GB of RAM and NVIDIA GeForce RTX 2060, 6GB GPU was utilized.

### _Predictor Training_

We first generate 8300 samples for predictor training. Each case is labeled with security status, 0 for insecure and 1 for secure based on post contingency conditions. To ensure the
practically of the dataset and the generality of the trained model, load profile and RES profile are sampled based on Gaussian distribution while the deviation of means value ranges from [-20%, 20%] of the based value. The optimality gap of the solver is set to 0.1%. We assume synchronous generators have adequate reactive power capacity, and WTGs are controlled with a unity power factor.

Several common classification methods are first compared with proposed CNN model on the IEEE 24-Bus system data. The proposed CNN based RoCoF predictor is compared with benchmark DNN in TABLE I. The results show that with a tolerance of 5%, the proposed CNN model has a validation accuracy of 92.78%. For the benchmark DNN model, the validation accuracy with 5% tolerance is calculated as 93.53% on the same validation dataset, which is relatively lower than the proposed CNN model. Fig. 2 presents the evolution of MSE losses on the training and validation sets over the training process of the proposed CNN model.

Additionally, we validate performance of CNN predictor using the following metrics to demonstrate the prediction accuracy: (1) median absolute error (MED-E), (2) mean absolute error (MEA-E), and (3) R2 score. From TABLE II we can observe that CNN based RoCoF predictor has lower MSE as well as MEA-E, indicating that CNN model has a better performance in processing power system data with graphical information embedded.

Electricity demand ranges from 1,300 MW to a peak of 1,786 MW. The results presented in TABLE II show that the all RoCoF constrained SCUC models alleviate the reserve cost over T-SCUC. Especially for CNN-RCUC, the reserve cost is reduced from $83,475 to $61,882, giving a reduction of 25.87%. An increase in startup cost can also be observed in TABLE III when RoCoF related constraints are applied on period 19, which indicates extra cost is introduced due to improvement of generator flexibility.

We assume the worst-case contingency takes place in period 19, and the generator outputting the largest power is tripped. The system uniform RoCoF responses of different schedule cases are shown in Fig. 3. Fig. 3 (a) shows the uniform RoCoF response of ERC-SCUC model. With system equivalent RoCoF constraints incorporated, the highest RoCoF absolute value of ERC-SCUC is strictly 0.5 Hz/s, which satisfies the RoCoF constraint. Fig. 3 (b), (c) and (d) show that system uniform RoCoF doesn't violate the threshold in both LRC-SCUC and DNN-RCUC cases. It should be noted that the proposed CNN-RCUC model has the lowest RoCoF value.

The locational RoCoF dynamics of all models are plotted in Fig. 4. Combining Fig. 3 (a) and Fig. 4 (a) we can observe that even though the system uniform RoCoF doesn't violate the threshold when equivalent RoCoF constraint is applied, locational RoCoF on several generator buses violate its threshold due to oscillations. The ERC-SCUC is insecure as dispatched condition cannot withstand the trip of the largest generator, cascaded generator contingency may occur under such condition. From Fig. 3 (b) we can find that the highest RoCoF is mitigated for LRC-SCUC s

Fig. 3: Uniform RoCoF curves of different model following worst contingency case.

Fig. 2: Learning curve of CNN model.
violates the threshold due to introduced approximation error. For data driven methods, Fig. 4 (b) and Fig. 4 (c) show better RoCoF dynamics. As we can observe, DNN-RCUC can mitigate the highest RoCoF to -0.55Hz/s which slightly violates the threshold. The highest RoCoF if the proposed CNN-RCUC method is -0.52 Hz/s which outperforms all other SCUC schedules.

## VI Conclusions

The presence of a high level of renewable energy sources in the power grid reduces its overall inertia, which could lead to frequency instability during worst-case G-1 contingencies. Frequency-related constraints have been included in the SCUC process to ensure post-contingency frequency stability. Current physical model-based approaches face limitations. They either struggle to maintain locational RoCoF stability due to approximation errors or provide overly conservative solutions that result in additional costs. This paper proposes a novel CNN-RCUC model that integrates frequency-related constraints derived from convolutional neural networks capturing spatial correlations. Simulations conducted with PSS/E demonstrate that the proposed CNN-RCUC model effectively ensures system frequency stability without unnecessary conservatism.
