Conservative Sparse Neural Network Embedded Frequency-Constrained Unit
  Commitment With Distributed Energy Resources
The increasing penetration of distributed energy resources (DERs) will
decrease the rotational inertia of the power system and further degrade the
system frequency stability. To address the above issues, this paper leverages
the advanced neural network (NN) to learn the frequency dynamics and
incorporates NN to facilitate system reliable operation. This paper proposes
the conservative sparse neural network (CSNN) embedded frequency-constrained
unit commitment (FCUC) with converter-based DERs, including the learning and
optimization stages. In the learning stage, it samples the inertia parameters,
calculates the corresponding frequency, and characterizes the stability region
of the sampled parameters using the convex hulls to ensure stability and avoid
extrapolation. For conservativeness, the positive prediction error penalty is
added to the loss function to prevent possible frequency requirement violation.
For the sparsity, the NN topology pruning is employed to eliminate unnecessary
connections for solving acceleration. In the optimization stage, the trained
CSNN is transformed into mixed-integer linear constraints using the big-M
method and then incorporated to establish the data-enhanced model. The case
study verifies 1) the effectiveness of the proposed model in terms of high
accuracy, fewer parameters, and significant solving acceleration; 2) the stable
system operation against frequency violation under contingency.
Linwei Sang, Yinliang Xu, Zhongkai Yi, Lun Yang, Huan Long, Hongbin Sun
# Conservative Sparse Neural Network Embedded Frequency-Constrained Unit Commitment

###### Abstract

The increasing penetration of distributed energy resources (DERs) will decrease the rotational inertia of the power system and further degrade the system frequency stability. To address the above issues, this paper leverages the advanced neural network (NN) to learn the frequency dynamics and incorporates NN to facilitate system reliable operation. This paper proposes the conservative sparse neural network (CSNN) embedded frequency-constrained unit commitment (FCUC) with converter-based DERs, including the learning and optimization stages. In the learning stage, it samples the inertia parameters, calculates the corresponding frequency, and characterizes the stability region of the sampled parameters using the convex hulls to ensure stability and avoid extrapolation. For conservativeness, the positive prediction error penalty is added to the loss function to prevent possible frequency requirement violation. For the sparsity, the NN topology pruning is employed to eliminate unnecessary connections for solving acceleration. In the optimization stage, the trained CSNN is transformed into mixed-integer linear constraints using the big-M method and then incorporated to establish the data-enhanced model. The case study verifies 1) the effectiveness of the proposed model in terms of high accuracy, fewer parameters, and significant solving acceleration; 2) the stable system operation against frequency violation under contingency.

 Distributed energy resources, unit commitment, conservative sparse neural network, frequency dynamics constraints.

## Nomenclature

The main notation below is provided for unit commitment problem formulation. And other additional symbols are defined in the paper when needed.

## 1 A. Sets and Indices

\begin{tabular}{l l} \(t\in\mathcal{T}\) & Set of the time periods. \\ \(g\in\mathcal{G}\) & Set of the thermal generators. \\ \(n\in\mathcal{N}\) & Set of the system buses. \\ \(w\in\mathcal{W}\) & Set of the converter-based wind turbine generators. \\ \(pv\in\mathcal{PV}\) & Set of the converter-based PV generators. \\ \(j\in\mathcal{N}_{d}\) & Set of the droop control converters. \\ \(k\in\mathcal{N}_{v}\) & Set of the VSM control converters. \\ \end{tabular}

## 2. Decision Variables

\begin{tabular}{l l} \(x_{g,t}^{SU}/x_{g,t}^{SD}\) & Indicators of units start up / shunt down. \\ \(x_{g,t}\) & Operation status of units. \\ \(p_{g,t}/p_{w,t}/p_{pv,t}\) & Power output of thermal, wind turbines, and PV generators. \\ \(p_{n,t}^{cur}\) & Load curtailment of the bus node. \\ \(u_{gi}/u_{dj}/u_{dk}\) & Frequency response participation indicators of the thermal generators, droop / VSM converters. \\ \(M\) & System aggregate inertia constant. \\ \(D\) & System aggregate damping constant. \\ \(R_{g}\) & System aggregate droop factor. \\ \(F_{g}\) & System aggregate fraction factor. \\ \(\delta\) & Phase angle of the bus node. \\ \(P_{ij}\) & Power flow between node \(i\) and node \(j\). \\ \end{tabular}

## 3. Parameters

\begin{tabular}{l l} \(f_{N}\) & Nominal frequency rating value. \\ \(f^{min}/f_{lim}(t_{j,t})\) & Minimum frequency limits / stepwise frequency limit. \\ \(C_{oper}/C_{rsv}/C_{load}\) & Costs of system operation / reserve / load reduction. \\ \(B_{mn}\) & The susceptance of the transmission line. \\ \(\hat{p}_{w,t}/\hat{p}_{pv,t}\) & Day-ahead predicted power of wind / PV. \\ \(M_{gi}\) & Inertia constant of the unit \(i\). \\ \(D_{gi}\) & Damping constant of the unit \(i\). \\ \(R_{gi}\) & Inertia constant of the unit \(i\). \\ \(K_{gi}\) & Mechanical power gain of the unit \(i\). \\ \(F_{gi}\) & Fraction of the unit \(i\) power generation by the turbine. \\ \(R_{dj}\) & Droop gain of the converter \(j\). \\ \(K_{dj}\) & Mechanical power gain of the converter \(j\). \\ \(M_{dk}\) & Virtual inertia of the converter \(k\). \\ \(D_{dk}\) & Virtual damp constant of the converter \(k\). \\ \(\epsilon_{l}/\epsilon_{der}\) & Prediction errors of load and DERs. \\ \end{tabular}
## I Introduction

In the transition to a low carbon energy society, the renewable energies are replacing the conventional fossil energies and taking up a larger proportion of generation in the modern power system [1]. Unlike the direct connection of fossil-based synchronous generators, the distributed energy resources (DERs) are integrated into the grid through power converters that lack inherent rotational inertia, leading to the low-inertia systems [2]. The decreased rotational inertia will degrade the frequency stability of the system or even trigger large-scale blackouts [3, 4].

To address the above frequency stability problems of the low-inertia systems, the system operator should consider the frequency dynamics under contingency, transform the frequency dynamics requirements into static operational constraints, and incorporate them into the upstream scheduling models. Current research has focused on the formulation and incorporation of the frequency constraints by approximating the frequency nadir, which can be categorized into two types. The first type approximates the frequency response of generators as a piece-wise linear function to time, decoupling the governor control from the frequency in Ref. [5, 6, 7, 8]. Though exhibiting a simplified form with the frequency nadir constraints, it ignores the actual control policy and may not apply to high penetrated converter-based DER scenarios. The second type is based on the system frequency response model combined with the converter response feature to formulate the total frequency dynamics in Ref. [9, 10, 11, 12]. Ref. [9, 10] derive the analytical expression of frequency dynamics with converter-based DERs, calculate the frequency nadir expression, and utilize the piece-wise linear formulation to approximate these dynamics, which can be converted into a set of linear constraints. Ref. [11] further considers the joint scheduling of wind farm frequency support and reserve based on the analytical expression. These piece-wise linear models include the converter-based DER response but have limited approximation capability, which may not satisfy the requirement of complex converter-based power systems [13, 14].

The frequency support potential of the high-penetration DERs has been explored and exploited within the control scheme of the grid-forming voltage source converter (VSC) [15, 16, 17]. Virtual synchronous machine policy is one of the common VSC control strategies based on the emulation of system inertia [15]. Ref. [16] proposes a generalized architecture of VSC from the view of multivariable feedback control to unify different control strategies. Ref. [17] focuses on the wind turbine generators and proposes multiple virtual rotating masses for frequency support. However, the direct inertia parameter aggregation of different VSC control methods may lead to the low-inertia system instability [2].

So the relationship between the frequency dynamics and frequency support sources under the high penetrated converter-based DER is governed by the system's ordinary differential equations, which are complicated and cannot be incorporated into the system operation model directly. The thriving machine learning (ML) technique, widely applied in pattern cognition [18, 19] and image detection [20, 21], provides the powerful deep neural networks (DNNs) to formulate the above relationship with high accuracy [22, 23, 24, 25, 26]. The enforced constraints on the DNN-based frequency can be transformed into the mixed-integer linear programming [27] and solved efficiently by the off-the-shelf solvers [25]. In Ref. [22], the DNN is utilized to learn constraints and objectives, and the learned DNN is embedded in solving the world food program planning problem. ITwo critical issues arises from the direct integration of the trained DNNs into the frequency-constrained scheduling models will raise : 1) the positive and negative prediction errors of a DNN have different impacts on the system, where positive errors can lead to violations of the frequency requirements, and 2) the parameter number of the conventional dense DNN can be huge, resulting in the long solving time [28].

Faced with the complex frequency dynamics under the high penetrated converter-based DERs, this paper leverages the advanced research in ML and the dramatic improvement in solving mixed-integer linear programming (MILP) to formulate and incorporate the frequency constraints into operation models to ensure the system stable operation. To address the issues of DNN integration, it proposes the _conservative sparse neural network_ (CSNN) embedded frequency-constrained unit commitment model with DER, composed of learning and optimization stages. Its key lies in the design of the CSNN to achieve the conservativeness and sparsity of NN, which can further facilitate the safety and efficiency of CSNN incorporation. It first formulates and derives the highly non-convex frequency dynamics explicitly under DER. In the learning stage, it samples the inertia parameters, calculates the corresponding frequency, and characterizes the stability region of the sampled parameters using the convex hull to ensure stability and avoid extrapolation. Then for the conservativeness of NN, the positive prediction error penalty is added to the loss function to avoid possible frequency requirement violation; for the sparsity of NN, the neural network topology pruning is employed in training NN to eliminate some unnecessary connections for achieving MILP solving acceleration. In the optimization stage, the trained CSNN is transformed into a series of mixed-integer linear constraints using the big-M method to relax the ReLU activation functions in NN. Then these frequency constraints is incorporated into the conventional unit commitment (UC) to establish the final data-enhanced frequency constrained UC model in the MILP form. For this paper, the main contributions are as follows:

1) To the best of authors' knowledge, this paper, _for the first time_, proposes the _conservative sparse neural network_ to achieve both the conservativeness and sparsity of neural networks, which is beneficial to NN embedding in the optimization problems and can be utilized to formulate the relationship between the frequency dynamics and system inertia parameters. The proposed CSNN achieves higher approximation accuracy, compared with the previous piece-wise linear formulation of frequency dynamics in Ref. [10, 15], which exhibits i) fewer parameters to accelerate MILP solving ii) and conservative prediction to prevent the violation of frequency requirements, compared with conventional NN.

2) Based on the proposed CSNN, this paper proposes the data-enhanced frequency constrained unit commitment under
DER to address the frequency stability problem of the low-inertia system. The proposed scheduling model approximates both frequency nadir and stepwise constraints by CSNN, transforms the trained CSNNs into a series of mixed-integer linear constraints using the big-M method, and embeds the constraints into the conventional UC model. Compared with conservative and conventional neural networks, the proposed data-enhanced model can achieve significant MILP solution time reduction, verifying its efficiency.

3) This paper designs the _stability region_ using convex hulls from the sampled dataset with stability to guarantee the system operation stability and avoid extrapolation. The main reason for _stability region_ is that not all inertia parameters in the sampled dataset can stabilize the total system, especially under the high penetration of the converter-based DERs. So the inertia parameters with stability are extracted to construct the stable dataset, and then the clustered convex hulls are extracted, denoted by _stability region_, which are transformed into linear constraints and embedded into the scheduling model to guarantee the stability and feasibility.

For clearer delivery, we further summarize the main motivation and innovation of this paper. The increasing distributed energy resources will decrease the system rotational inertia and further degrade the system frequency stability, which requires the frequency consideration in system scheduling. However, the relationships between frequency dynamics and frequency support sources are complex, which requires the accurate and conservative formulation to capture the relationship. To address the above issues, we propose the CSNN with high representational capacity for capturing the above complex frequency relationship effectively with conservativeness design and embed the trained CSNN into the conventional unit commitment model efficiently with sparsity design to formulate the data-enhanced frequency constrained unit commitment model. The rest of this paper is organized as follows. Section II depicts the frequency dynamics with distributed energy resources. Section III proposes the conservative sparse neural network to formulate the frequency constraints. Section IV presents the CSNN embedded data-enhanced frequency-constrained unit commitment with DER. Section V performs the case study to verify the efficiency of the proposed model. Section VI concludes this paper.

## II Frequency Dynamics Formulation with Distributed Energy Resources

This section formulates the system frequency dynamics under conventional _synchronous_ generators and _converter-based_ DER generators mathematically, governed by nonlinear ordinary differential equations from Ref. [30]. The frequency dynamics can be analyzed by the swing equation in Eq. (1).

\[M\frac{d\Delta f}{dt}+D\Delta f=\Delta p_{g}-\Delta p_{e}. \tag{1}\]

Then, based on Eq. (1), the low-inertia system dynamics is introduced, and several key frequency constraints are proposed to guarantee the frequency dynamic stability.

### _Frequency Dynamics Analytical Analysis_

Based on Ref. [15], we can derive the transfer function \(G(s)\) of the system dynamics model in Eq. (2). 1

Footnote 1: The detailed infrastructure can be referred to Ref. [9].

\[\begin{split} G(s)&=\frac{\Delta f}{\Delta P_{e}}= \bigg{(}\underbrace{(sM_{g}+D_{g})+\sum_{l\in\mathcal{N}_{g}}\frac{K_{gi}(1+sF _{gi}T_{gi})}{R_{gi}(1+sT_{gi})}}_{\text{Multiple-machine system frequency response}}\\ &+\sum_{j\in\mathcal{N}_{d}}\frac{K_{cj}}{R_{cj}(1+sT_{cj})}+ \sum_{k\in\mathcal{N}_{v}}\frac{sM_{ck}+D_{ck}}{1+sT_{ck}}\bigg{)}^{-1}. \end{split} \tag{2}\]

It is assumed that all synchronous generators have equal time constants with \(T_{gi}=T,\forall i\in\mathcal{N}_{g}\). The time constants of converters are 2-3 orders lower than those of synchronous generators with \(T\gg T_{c}\approx 0\), according to Ref. [33]. Then we transform the general-order Eq. (2) into its second-order form Eq. (3).

\[G(s)=\frac{1}{MT}\frac{1+sT}{s^{2}+2\zeta\omega_{n}s+\omega_{n}^{2}}. \tag{3}\]

where \(\omega_{n}\) and \(\zeta\) denote the natural frequency and damping ratio, calculated by Eq. (4).

\[\omega_{n}=\sqrt{\frac{D+R_{g}}{MT}},\quad\zeta=\frac{M+T(D+F_{g})}{2\sqrt{MT( D+R_{g})}}. \tag{4}\]

The key parameters \(M\), \(D\), \(F_{g}\), and \(R_{g}\) in Eq. (4) calculation can be referred to Ref. [15].

Given a stepwise disturbance \(\Delta P\) (\(\Delta P/s\) in the frequency domain) in Eq. (1), the frequency dynamics in time domain can be derived from Eq. (3) as follows:

\[\begin{split}\Delta f(t)=&-\frac{\Delta P}{MT \omega_{n}^{2}}\\ &-\frac{\Delta P}{M\omega_{d}}e^{-\zeta\omega_{n}t}\Big{(}\sin( \omega_{d}t)-\frac{1}{\omega_{n}T}\sin(\omega_{d}t+\phi)\Big{)}\end{split} \tag{5}\]

where the \(\omega_{d}\) and \(\phi\) calculated as follows:

\[\omega_{d}=\omega_{n}\sqrt{1-\zeta^{2}},\quad\phi=\arcsin(\sqrt{1-\zeta^{2}}). \tag{6}\]

The frequency nadir is located in the time instance \(t_{m}\) where the derivative of frequency is zero in Eq. (7).

\[\frac{d\Delta f(t_{m})}{t_{m}}=0\to t_{m}=\frac{1}{\omega_{d}}\tan^{-1}( \frac{\omega_{d}}{\zeta\omega_{n}-T^{-1}}). \tag{7}\]

Then the maximum frequency deviation can be calculated by replacing the \(t\) of Eq. (5) by \(t_{m}\) of Eq. (7) as:

\[\Delta f_{max}=-\frac{\Delta P}{D+R_{g}}(1+\sqrt{\frac{T(R_{g}-F_{g})}{M}}e^{- \zeta\omega_{n}t_{m}}). \tag{8}\]
### _Frequency Constraints Formulation_

Based on the above analytical frequency response formulation, this paper proposes four key constraints to bound frequency dynamics for securing the system stability from different perspectives, including the rate-of-change-of-frequency (RoCoF) constraint for guaranteeing transient stability [31], the quasi-steady state for bringing back system normal operation state [9], the frequency nadir constraint for avoiding the activation of under frequency load shedding [15], and the stepwise frequency constraint for enhancing the frequency restoration performance [8].

#### Ii-B1 RoCoF Constraint

RoCoF constraint guarantees the sufficient system inertia to limit the allowable RoCoF at \(t=0\), following the ENTSO-E standard [32].

\[|\text{RoCoF}|=|\frac{\Delta P}{M}|\leq\text{RoCoF}^{max}. \tag{9}\]

#### Ii-B2 Quasi-Steady State Constraint

Quasi-steady state (QSS) constraint guarantees quasi-steady state security assuming the RoCoF is effectively zero.

\[\Delta f_{qss}=-\frac{\Delta P}{D+R_{g}}\leq\Delta f_{qss}^{max}. \tag{10}\]

#### Ii-B3 Frequency Nadir Constraints

To avoid triggering under-frequency load shedding (UFLS) and oscillation, the maximum frequency deviation should be limited within the allowable range by Eq. (11).

\[f_{nadir}=f_{N}-\Delta f_{max}\geq f^{min}. \tag{11}\]

#### Ii-B4 Frequency Stepwise Constraints

Besides the above frequency constraints, we further consider the frequency restoration requirement from frequency nadir to quasi-steady state, inspired by Ref. [8]. The stepwise frequency constraints are utilized to bound the frequency restoration process, as shown in Eq. (12), Eq. (13), and Fig. 1.

Then we formulate the stepwise frequency constraints as follows:

\[f(t)=f_{N}-\Delta f(t)\geq f_{lim}(t). \tag{13}\]

However, the above constraints are complicated because they should be evaluated for \(t\geq 0\). As shown in Fig. 1, the stepwise frequency constraints are binding when the transient curve and limit curve touch. The constraints are not required when no step changes in the frequency limit curve. So we only evaluate it at the step change time \(t=t_{j,l}\) as follows:

\[f(t_{j,l})=f_{N}-\Delta f(t_{j,l})\geq f_{lim}(t_{j,l})\quad j\in N_{c}. \tag{14}\]

### _Frequency Constraints Analysis_

#### Ii-C1 Relationship Analysis

The RoCoF and QSS constraints are linear with respect to \(M\), \(D\), and \(R_{g}\). In contrast, the frequency nadir and stepwise constraints are nonlinear due to the nonlinearity of \(f_{nadir}(M,D,R_{g},F_{g})\) and \(f(M,D,R_{g},F_{g};t_{j,l})\) with respect to \(M\), \(D\), \(R_{g}\), and \(F_{g}\).

#### Ii-C2 Conservative Approximation of Frequency Constraints

So we need to derive the tractable constraints from the nonlinear ones to facilitate tractable solving. The system operator prioritizes the negative error (predicted value minus true value) but is averse to positive error, where positive errors may result in the frequency requirement violation. So we propose to approximate the \(f_{nadir}\) and \(f(t_{j,l})\) in a conservative way in Eq. (15).

\[f_{nadir}(M,D,R_{g},F_{g})\geq\hat{f}_{nadir}(M,D,R_{g},F_{g}) \geq f^{min} \tag{15a}\] \[f(M,D,R_{g},F_{g};t_{j,l})\geq\hat{f}(M,D,R_{g},F_{g};t_{j,l}) \geq f_{lim}(t_{j,l}) \tag{15b}\]

where \(\hat{f}_{nadir}\) and \(\hat{f}\) are the predicted frequency, which are the lower bounds of the true frequency.

## III Methodology

Based on the frequency constraints formulation and analysis, this section 1) introduces the concept of optimization with constraint learning (OCL) framework, 2) proposes the conservative sparse neural network formulation under the OCL framework for nonlinear frequency constraints in Eq. (15), 3) embeds the trained neural network into the optimization models via MILP, 4) and presents two data processing techniques for facilitating predictive model integration.

### _Data-driven Optimization with Constraint Learning Framework Design_

Practical optimization problems often contain constraints with intractable forms or no explicit formulas. However, based on the supportive data corresponding to such constraints, these data can be utilized to learn the constraints (constraint learning, CL). The trained predictive models can be embedded into the optimization models. So the above two stages are called optimization with constraint learning (OCL). We denote the final tractable model by the data-enhanced optimization model.

According to the review of Ref. [23], the OCL framework is usually composed of the following five steps: 1) formulate

Fig. 1: Multiple stepwise frequency requirement.
the conceptual optimization model 2) conduct data sampling and processing; 3) construct and train predictive models; 4) embed the predictive model into the optimization model; 5) solve and evaluate the data-enhanced optimization model. It should be noted that the OCL framework can be extended to objective learning by transforming the objective function into constraints via the epigraph of the function [22].

### _Conservative Sparse Neural Network Formulation_

Under the above OCL framework, we propose the CSNN to learn the relationship of Eq. (15) and formulate the data-enhanced frequency-constrained unit commitment model based on the trained CSNN, detailed in the following parts. The learning of Eq. (15) is denoted by frequency nadir constraint learning for Eq. (15a) and stepwise constraint learning for Eq. (15b). The proposed CSNN prediction models are both conservative and sparse, which can guarantee the safety of frequency constraints and accelerate the NN-embedding model solution.

#### Iii-B1 Conservative Neural Network Design

Based on the analysis of frequency constraints in section II-C, the negative errors are prioritized against possible frequency requirement violations compared to the positive errors. So the conservative prediction models are prioritized for the system safe and stable operation. To this end, we propose a conservative loss function where prediction values are always lower than the true values. It is calculated by the weighted sum of _mean-square-error_ loss function and additional positive error ReLU loss function to penalize the positive part of the frequency constraints, as illustrated in Eq. (16).

\[\hat{f}^{*}_{\theta}\leftarrow\arg\min_{\theta}\mathcal{L}^{com}_{\theta} \tag{16a}\] \[\mathcal{L}^{com}_{\theta}=\underbrace{\frac{1}{2}\mathbb{E}_{(x,y) \rightarrow\mathcal{D}}(\hat{f}_{\theta}(x)-y)^{2}}_{\text{supervised regression}}+\underbrace{\mathbb{E}_{(x,y)\rightarrow\mathcal{D}}\text{ReLU}(\hat{f}_{\theta}(x)-y)}_{ \text{ReLU loss function}} \tag{16b}\]

where the resulting \(\hat{f}^{*}_{\theta}(x)\) is the conservative estimate of the actual function \(f(x)\).

#### Iii-B2 Sparse Neural Network Design

We propose to train sparse neural networks by dropping and activating their inner connections iteratively to alleviate the calculation burden of dense full-connected NN embedding. The keys to sparse training lie in updating neural network topology based on parameter magnitude criterion for dropping connections and infrequent gradient criterion for activating connections, which is from the lottery ticket hypothesis in Ref. [29]. The motivation behind the growing and dropping sparse training is as follows: the dropping of neuron connections may sacrifice the accuracy of the learning models; so, we further re-activate \(k\) connections with the top-\(k\) high magnitude gradients, because high magnitude gradients indicate high impact connection between neurons. So we re-activate these connections for improving the accuracy. The main scheme of sparse training is composed of sparse distributing, update scheduling, connection dropping, and connection activating for learning the mapping from the input system parameter to the output frequency response, as shown in Fig. 2.

Sparse DistributingWe define sparsity \(s^{l}\in(0,1)\) as the dropping fraction of the \(l^{th}\) layer. The first layer is set as the dense layer, and the other layers are set as the sparse layers with predefined \(s^{l}\) for the \(l^{th}\) layer sparse training in a uniform way.

Update SchedulingThe update scheduling drops a fraction of connections based on NN parameter magnitude and activates new ones based on NN parameter gradient magnitude iteratively at \(\Delta T\) interval. So the updating fraction function by considering decaying is defined in Eq. (17).

\[f_{decay}(t;\alpha,T_{end})=\frac{\alpha}{2}(1+\cos\frac{t\pi}{T_{end}}) \tag{17}\]

where \(T_{end}\) is the number of iteration for sparse training, and \(\alpha\) is the initial drop fraction.

Connection DroppingIn connection dropping of the \(l^{th}\) layer, we utilize \(ArgTopK(v,k)\) algorithm to select the top-\(k\) maximum element indices of vector \(v\) and drop the connection by \(ArgTopK(-|\theta^{l}|,f_{decay}(t;\alpha,T_{end})(1-s^{l})N^{l})\).

Connection ActivatingAfter dropping, we further re-activate \(k\) connections with the top-\(k\) high magnitude gradients by \(ArgTopK(\nabla_{\theta^{l}}L^{com}_{t},f_{decay}(t;\alpha,T_{end})(1-s^{l})N^ {l})\). Newly activated connections are initialized as zero to avoid influencing the network output.

**Remark 1**.: _The effect of gradients on the model's training lies in the following two aspects: i) the gradients from the loss function can learn the prediction models by minimizing the proposed conservative loss function (stochastic gradient training); ii) they can also be utilized to grow necessary connection in the sparse neural networks to improve accuracy._

#### Iii-B3 Conservative Sparse SGD Algorithm

Based on the conservative loss of Eq. (16b) and sparse training designs, we propose the conservative sparse stochastic gradient descent (CS-SGD) algorithm for training the CSNN in algorithm 1.

The key novelty of the proposed CS-SGD algorithm lies in incorporating the conservative loss function of Eq. (16) and sparse training process with dropping and growing to train

Fig. 2: Sparse neural network training by leveraging the weight magnitude and gradient information.
CSNN with conservativeness and sparsity for approximating the power system frequency dynamics. The weights and bias of trained CSNN are leveraged to formulate the equivalent mixed-integer linear frequency constraints, which can secure the system frequency stability. The conservativeness of CSNN guarantees safety of the transformed frequency constraints, and the sparsity of CSNN improving solution efficiency of the data-enhanced frequency constrained unit commitment optimization model with fewer optimizing variables.

### _NN Embedded Frequency Constraints Transformation_

After training, the proposed CSNN can be transformed into a series of mixed linear integer constraints using the big-M method. Based on Ref. [27], this paper formulates the general form of an \(L\)-layer feedforward neural network with ReLU as the activation function in Eq. (18), which is composed of stacked linear transformation (18a) and ReLU activation (18b).

\[\text{Neural Network:}v_{i}^{I}=\text{ReLU}(\theta_{i0}^{I}+ \sum_{j\in\mathcal{N}^{L-1}}\theta_{ij}^{I}v_{j}^{J-1}) \tag{18a}\] \[\text{where }y=v^{L}=\theta_{0}^{L}+\sum_{j\in\mathcal{N}^{L-1}} \theta_{j}^{L}v_{j}^{L-1} \tag{18b}\]

where \(v_{i}^{I}\) is the output of neuron \(i\) in layer \(l\) in a neuron network, \(\theta_{ij}^{I}\) is the weight between neuron \(i\) and \(j\), and \(\theta_{i0}^{I}\) is the bias of neuron \(i\) in layer \(l\).

For each layer of Eq. (18a), the ReLU operator, \(\text{ReLU}(x)=\max\{0,x\}\), can be encoded using linear constraints in a big-M way from Ref. [22], as follows:

\[v \geq x, \tag{19a}\] \[v \leq x-M_{L}(1-t),\] (19b) \[v \leq M_{U}t,\] (19c) \[v \geq 0,\] (19d) \[t \in\{0,1\} \tag{19e}\]

where \(M_{U}\) and \(M_{L}\) are positive and negative large value to relax the ReLU function.

### _Data Processing Techniques_

This part utilizes the data sampling strategy based on the boundary and Latin hypercube sampling to enhance the data quality for the predictive models. It constructs the stability region based on the convex hulls to prevent the extrapolating of predictive models.

#### Iv-D1 Data Sampling Strategy

The predictive model performance relies on the training dataset quality; thus, the data distribution is critical for constraint learning. The sampled data should be space-filling sufficiently to capture the frequency dynamics of frequency constraints in Eq. (15). Inspired by Ref. [25], we utilize the boundary sampling and optimal Latin hypercube (OLH) sampling for constructing training set \(\mathcal{Z}=\{M_{n},D_{n},R_{g,n},F_{g,n}\}_{n=1}^{N}\). In the process, the boundary sampling collects the corners of the \(\mathcal{Z}\) hypercube by the input data bounds, and then we conduct the OLH sampling over the above hypercube. The detailed sampling procedures are illustrated in Ref. [25].

#### Iv-D2 Convex Hulls as Stability Region

The optimal solutions of mixed-integer linear programs are often located at the extremes of their feasible polyhedron region, which may harm the validity of the trained ML models. According to Ref. [22], the accuracy of an ML-based predictive model will deteriorate for points far away from the training dataset. So we construct stability regions to prevent the predictive model from extrapolating by the convex hull from the training dataset. For the training dataset \(\mathcal{Z}\), we construct the following convex hull \(CH(\mathcal{Z})\) in Eq. (20) as the stability region.

\[CH(\mathcal{Z})=\left\{z|\sum_{i\in I}\lambda_{i}\hat{z}_{i}=z,\sum_{i\in I} \lambda_{i}=1,\lambda\geq 0\right\} \tag{20}\]

However, there are two issues arising from the direct single convex hull. One issue is that the computing of the convex hull is exponential to data number in time and space; the other is that the data distribution in a single convex hull is not uniform. Some points cannot satisfy the requirement of system stability in Eq. (2), and the single convex hull may include and extrapolate some infeasible points. So we propose the cluster-then-build strategy, which first clusters the trained dataset, builds a convex hull for each cluster, and unions them \(\bigcup_{k\in\mathcal{K}}CH_{k}(\mathcal{Z})\) for preventing extrapolating in Eq. (21).

\[\begin{split}\bigcup_{k\in\mathcal{K}}CH_{k}(\mathcal{Z})=\left\{ z|\sum_{i\in I_{\bar{i}}}\lambda_{i}\hat{z}_{i}=z,\sum_{i\in I}\lambda_{i}=u_{k}, \sum_{k\in\mathcal{K}}u_{k}=1\right.\\ \left.\lambda\geq 0,\forall k,u\in\{0,1\}\right\}\end{split} \tag{21}\]

#### Iv-D3 Discussion

It should be noted that we need to construct and build different CSNN models and stability regions for different system and DER settings. Because the training of CSNNs is based on the sampled dataset from the system model with corresponding DER setting via Eq. (5) and Eq. (8). Different system and DER settings will affect the sampled dataset directly and further affect the training of CSNNs indirectly, leading to inaccurate approximation. Stability region
is also constructed from the sampled dataset. So we need to retrain different learning models and construct different stability region for these circumstances, such as different DER settings, to improve approximation accuracy.

## IV Data-enhanced Frequency-Constrained Unit Commitment with DER

Based on the above proposed CSNN, this section proposes the data-enhanced frequency constrained unit commitment (FCUC) with the converter-based DER. It firstly introduces the overall OCL framework for the proposed data-enhanced FCUC, then presents the conventional unit commitment model, and includes the data-enhanced frequency constraints to formulate the final data-enhanced model.

### _Overall Framework_

Based on the CSNN and NN embedded transformation of section III, we propose the OCL framework for the data-enhanced FCUC with converter-based DERs, composed of the learning and optimization stages, as shown in Fig. 3. Its main idea lies in leveraging CSNN and the frequency data to enhance the power system decision-making and advance the data-driven integration modeling technique. The learning stage samples the stable instances from the frequency analytical expression of Eq. (8) and Eq. (13), feeds them to training the CSNNs, constructs the stability region using the convex hulls for the stable instances, and evaluates their performance; the optimization stage embeds the stability region constraints of Eq. (21) and transformed CSNN constraints of Eq. (19) in the system scheduling model to formulate the final data-enhanced FCUC model. It should be noted that: 1) the stability region and the CSNNs are constructed from the sampled dataset in different ways and are integrated into the conventional unit commitment model as mixed-integer linear constraints, so the stability region construction will not affect the training process of CSNNs; 2) DERs refer to the distributed photovoltaic (PV) and wind power (WP) generators concretely in this paper.

### _Unit Commitment Considering Joint Reserve and Regulation Capacity_

Based on the above OCL framework, we formulate the conventional unit commitment model considering joint reserve and regulation capacity to minimize the system operating cost under a series of operational constraints.

#### Iv-A1 Model Objective

The objective of conventional unit commitment is to minimize the total system operating cost, which is composed of the operating cost \(C_{oper}\), reserve cost \(C_{sav}\), and load shedding cost \(C_{load}\) in Eq. (22).

\[\min \quad C_{total}=C_{oper}+C_{rsv}+C_{load} \tag{22a}\] \[C_{oper}=\sum_{t\in\mathcal{N}_{T}}\sum_{g\in\mathcal{N}_{G}} \left(C_{g}^{SU}x_{g,t}^{SU}+C_{g}^{SD}x_{g,t}^{SD}+f_{g}(p_{g,t})\right)\] (22b) \[C_{rsv}=\sum_{t\in\mathcal{N}_{T}}\Big{(}\sum_{g\in\mathcal{G}}C_{g}^{R}R _{g,t}+\sum_{w\in\mathcal{W}}C_{w}^{R}R_{w,t}+\sum_{pv\in\mathcal{P}\mathcal{ V}}C_{pv}^{R}R_{pv,t}\Big{)}\] (22c) \[C_{load}=\sum_{t\in\mathcal{N}_{T}}\sum_{n\in\mathcal{N}_{R}} \lambda_{L}P_{n,t}^{cur} \tag{22d}\]

where \(C_{oper}\) includes the start-up, shut-down, and the fuel costs; \(C_{rsv}\) includes the costs of the reserve from synchronous generators and converter-based PV/WP generators; \(C_{load}\) includes the load shedding costs from different buses. The unit cost function \(f_{g}(\cdot)\) can be piece-wised by SOS2 constraints.

#### Iv-A2 Power Network Constraints

The node power balance equation and transmission power limited are formulated based on DC power flow model in Eq. (23).

\[\sum_{g\in\mathcal{G}_{n}}p_{g,t}+\sum_{w\in\mathcal{W}_{n}}p_{ w,t}+\sum_{pv\in\mathcal{P}\mathcal{V}_{n}}p_{pv,t}\] \[+\sum_{m:(n,m)}B_{nm}(\delta_{nn}-\delta_{nn})=p_{n,t}^{D}-p_{n,t }^{cur}\quad\forall n,t \tag{23a}\] \[|B_{nm}(\delta_{nn}-\delta_{nn})|\leq F_{nm}^{max}\quad\forall(n,m) \in\mathcal{L},\forall t \tag{23b}\]

where Eq. (23a) enforces the bus power balance for each period, and Eq. (23b) restricts the branch power flow under the given capacity.

#### Iv-A3 Thermal Generator Operational Constraints

The ramping and power output restriction are formulated via MILP in Eq. (24).

\[x_{g,t}p_{g}^{min}\leq p_{g,t}\leq x_{g,t}p_{g}^{max} \quad\forall g,t \tag{24a}\] \[x_{g,t}^{SU}-x_{g,t}^{SD}=x_{g,t}-x_{g,t-1} \quad\forall g,t\] (24b) \[p_{g,t}-p_{g,t-1}\leq x_{g,t-1}Ru_{g} \quad\forall g,t\] (24c) \[p_{g,t-1}-p_{g,t}\leq x_{g,t}Rd_{g} \quad\forall g,t \tag{24d}\]

where Eq. (24a) restricts the generator power output; Eq. (24b) enforces the relationship between the on/off variables and start-up/shut-down variables; Eq. (24c) and Eq. (24d) restricts the generator ramping capacity.

#### Iv-A4 Renewable Energy Generation Constraints

The actual power outputs of renewable energy generation are limited below the predicted values.

\[0\leq p_{w,t}\leq\hat{p}_{w,t}\quad\forall w,t \tag{25a}\]

Fig. 3: The optimization with constraint learning framework for the data-enhanced FCUC with DER.
\[0\leq p_{pv,t}\leq\hat{p}_{pv,t}\quad\forall pv,t \tag{25b}\]

where Eq. (25a) and Eq. (25b) restrict the actual power output of wind and PV below the day ahead predicted value.

#### Iv-B5 System Reserve Constraints

The system reserve is restricted to cover the prediction errors of the DERs and load as follows:

\[\begin{split}&\sum_{g\in\mathcal{G}}x_{g,t}P_{g}^{max}+\sum_{w \in\mathcal{W}}\hat{p}_{w,t}+\sum_{pv\in\mathcal{P}\mathcal{V}}\hat{p}_{pv,t} +\sum_{n\in\mathcal{N}}P_{n,t}^{cur}\\ &\geq(1+\epsilon_{l})\sum_{n\in\mathcal{N}}\hat{p}_{n,t}^{D}\\ &+(1+\epsilon_{der})(\sum_{w\in\mathcal{W}}\hat{p}_{w,t}+\sum_{pv \in\mathcal{P}\mathcal{V}}\hat{p}_{pv,t})\quad\forall t.\end{split} \tag{26}\]

Eq. (26) guarantees that the online generation capacity can satisfy the load demand with prediction errors, according to Ref. [10].

### _Data-enhanced Frequency Constraints_

As discussed in section III, we propose the CSNN to approximate the nonlinear constraints of frequency nadir and stepwise constraints in a conservative way. So this part adds the CSNN embedded frequency dynamics constraints in Eq. (28) and corresponding emergency regulation constraints in Eq. (30) into the above conventional unit commitment models for ensuring the frequency dynamics stability.

#### Iv-C1 Inertia Parameter Aggregation

The system inertia variables \(M\), \(D\), \(R_{g}\), and \(F_{g}\) for Eq. (15) can be calculated by aggregating generators' and PV/WP converters' related parameters in Eq. (27).

\[M_{g} =\frac{\sum_{i\in N_{g}}u_{gi}M_{gi}P_{gi}}{P_{g}^{b}},D_{g}= \frac{\sum_{i\in N_{g}}u_{gi}D_{gi}P_{gi}}{P_{g}^{b}} \tag{27a}\] \[F_{g} =\sum_{i\in N_{g}}\frac{u_{gi}K_{gi}F_{gi}}{R_{gi}}\frac{P_{gi}} {P_{g}^{b}},R_{g}=\sum_{i\in N_{g}}\frac{u_{gi}K_{gi}}{R_{gi}}\frac{P_{gi}}{ P_{g}^{b}}\] (27b) \[R_{d} =\sum_{j\in N_{d}}\frac{u_{dj}K_{dj}}{R_{dj}}\frac{P_{dj}}{P_{der }^{b}}\] (27c) \[M_{d} =\sum_{k\in N_{e}}u_{dk}M_{dk}\frac{P_{dk}}{P_{der}^{b}},D_{d}= \sum_{k\in N_{e}}u_{dk}D_{dk}\frac{P_{dk}}{P_{der}^{b}}\] (27d) \[M =\frac{M_{g}P_{g}^{b}+M_{der}P_{der}^{b}}{P_{g}^{b}+P_{der}^{b}}\] (27e) \[D =\frac{D_{g}P_{g}^{b}+D_{der}P_{der}^{b}+R_{d}P_{der}^{b}}{P_{g}^{b }+P_{der}^{b}}. \tag{27f}\]

#### Iv-C2 Frequency Dynamics Constraints

The proposed CSNN is utilized to reach the convex lower bounds of nonlinear frequency constraints by transforming \(f_{nadir}\) and \(f(t_{j,l})\) into \(\hat{f}_{nadir}^{csmn}\) and \(\hat{f}_{csmn}^{csmn}(t_{j,l})\) in Eq. (11) and Eq. (14), as follows:

\[\hat{f}_{nadir}^{csmn}(M,D,R_{g},F_{g})\geq f_{min} \tag{28a}\] \[\hat{f}_{nadir}^{csmn}(M,D,R_{g},F_{g};t_{j,l})\geq f_{lim}(t_{j, l}). \tag{28b}\]

where \(\hat{f}_{nadir}^{csmn}\) and \(\hat{f}_{csmn}^{csmn}(t_{j,l})\) can be transformed into mixed-integer linear constraints via Eq. (19). Taking Eq. (28a) as an example, its equivalent mixed-integer constraints is formulated and incorporated by taking \(x=(M,D,R_{g},F_{g})\) in Eq. (29).

\[v_{i}^{1} =\theta_{i0}^{1}+\sum_{j\in\mathcal{N}}\theta_{ij}^{l}x_{j}, i\in[N_{1}] \tag{29a}\] \[\hat{v}_{i}^{l} =\theta_{i0}^{l}+\sum_{j\in\mathcal{N}^{l-1}}\theta_{ij}^{l}v_{j}^ {l-1}, l\in[L],i\in[N_{l}]\] (29b) \[v_{i}^{l} \geq\hat{v}_{i}^{l}, l\in[L],i\in[N_{l}]\] (29c) \[v_{i}^{l} \leq\hat{v}_{i}^{l}-M_{l,i}^{L}(1-t_{l,i}), l\in[L],i\in[N_{l}]\] (29d) \[v_{i}^{l} \leq M_{l,i}^{H}l_{l,i}. l\in[L],i\in[N_{l}]\] (29e) \[v_{i}^{l} \geq 0,\quad t_{i,l}\in\{0,1\}, l\in[L],i\in[N_{l}]\] (29f) \[\hat{f}_{nadir,m}^{csmn}=\theta_{i0}^{L}+\sum_{j\in\mathcal{N}^{l-1}} \theta_{ij}^{L}v_{j}^{L-1}\quad m\in[N_{M}],i\in[N_{L}] \tag{29g}\]

where \([N_{l}]\) is the set of input neurons in layer \(l\), and \([L]\) is the set of output neurons in layer \(l\).

#### Iv-C3 Emergency Regulation Formulation

Eq. (30) provides the headroom regulation capacity for the primary frequency response from synchronous and converter-based generators.

\[R_{g,t}=p_{g}^{max}-p_{g,t}\geq u_{g,t}\frac{K_{g}}{R_{g}}p_{g}^{ max}\gamma(f_{0}-f_{min}) \tag{30a}\] \[R_{w,t}=\hat{p}^{w,t}-p_{w,t}\geq u_{w,t}\frac{1}{R_{w}}\hat{p}^{ w,t}\gamma(f_{0}-f_{min})\] (30b) \[R_{pv,t}=\hat{p}^{pv,t}-p_{pv,t}\geq u_{pv,t}\frac{1}{R_{pv}} \hat{p}^{pv,t}\gamma(f_{0}-f_{min})\] (30c) \[\forall g\in\mathcal{G},w\in\mathcal{W},pv\in\mathcal{P}\mathcal{V}, \quad\forall t.\]

The largest frequency deviation (\(f_{0}-f_{min}\)) is larger the quasi-steady state frequency deviation. According to Ref. [10], the \(\gamma\) is set as 0.5 for emergency reserve capacity.

So the combination of unit commitment modeling and data-enhanced frequency constraints constructs the final data-enhanced FCUC with converter-based DER considering both the system reserve for uncertainty and the regulation capacity for emergency, which follows the mixed-integer linear programming form and can be solved by the off-the-shelf solvers efficiently.

## V Case Study

In the case study, the modified IEEE 118-bus and 1888-bus systems with multiple PV and WP is utilized to verify the effectiveness and efficiency of the data-enhanced frequency constrained unit commitment model with converter-based DER. The proposed model is composed of the learning and optimization stages. So we construct the learning models with the Pytorch package and the optimization models with the Cvxpy package equipped by the Gurobi solver. All the experiments are implemented in a MacbookPro laptop with RAM of 16 GB, CPU Intel Core I7 (2.6 GHz). The other detailed system parameter setting of the modified system is attached in Ref. [34] and Ref. [35].

### _Data Preparation and Experiment Setting_

This part mainly prepares the essential data and problem settings in the OCL framework for the data-enhanced FCUC
model of Fig. 3, including 1) the neural network parameter setting of the learning stage 2) and the inertia parameter setting of the optimization stage.

#### V-A1 Learning Stage

In the learning stage, we first generate 10000 feasible samples based on the system frequency dynamics of Eq. (5) and Eq. (8) to construct the training dataset for the stability region and learning model training. Then the proposed CSNNs take the system inertia parameter \(x=(M,D,R_{g},F_{g})\) as the feature vector, and the input feature vector is normalized into the scale of 0-1 for model training based on their maximum value. We compare the proposed conservative sparse neural network (CSNN) with the conservative neural network (C-NN) and the conventional neural network (NN) under the same initial parameters of full connected neural networks in Tab. I. The hyperparameter configuration in Tab. I is determined based on the hyperparameter tuning with the high approximation accuracy of learning models. The change of these hyperparameter values does not enhance the approximation accuracy of the learning models in our cases.

We clarify the relationship among CSNN, C-NN, and NN, where C-NN further utilizes the conservative loss of Eq. (16) compared to NN, and CSNN further employs the sparse training of algorithm 1 compared to C-NN. The same hyperparameters of Tab. I are utilized to initialize the CSNN, C-NN, and NN to avoid the hyperparameter effect on model comparison of different neural networks.

#### V-A2 Optimization Stage

In the optimization stage, we prepare the inertia parameters of different generators and VSM/droop control parameters of PV and wind power converters from Ref. [15], as illustrated in Tab. II. The frequency nadir, stepwise frequency, and QSS requirement are set based on the ENTSO-E standard [32] and Ref. [8].

### _Frequency Approximation Performance Evaluation_

This part firstly analyzes the approximation performance of the proposed CSNN in describing the frequency dynamics. It then verifies its effectiveness in the data-enhanced frequency constrained model with the stability region design.

#### V-B1 CSNN Analysis

Training ProcessFig. 4 compares CSNN, C-NN, and NN training processes for the frequency nadir and stepwise relationship approximation. In the training process, NN achieves a lower approximation error than CSNN and C-NN due to the consideration of the conservative loss function, and CSNN exhibits a little lower error than C-NN thanks to the sparse designs.

#### V-B2 Approximation Error

We further compare the detailed approximation performance of CSNN with C-NN and NN. Fig. 5 demonstrates the approximation error distribution of the above four models by the boxen plot.

As shown in Fig. 5, the approximation errors of NN are located around zero with negative and positive values, and in contrast, the approximation errors of CSNN and C-NN are located below zero with only negative values, demonstrating their conservativeness. The median error of NN is above zero. CSNN exhibits a more accurate approximation with a more concentrated error distribution than C-NN.

We utilize the mean square error (MSE), mean absolute percentage error (MAPE) metrics in Eq. (31), and negative rate to measure the approximation performance numerically.

\[\mathcal{L}_{MSE}=\frac{1}{N}\sum_{i}^{N}(f_{i}-\hat{f}_{i})^{2},\quad\mathcal{ L}_{MAPE}=\frac{1}{N}\sum_{i}^{N}|\frac{f_{i}-\hat{f}_{i}}{f_{i}}|. \tag{31}\]

As illustrated in Tab. III, for MAPE, CSNN achieves 0.87% lower MAPE than NN, 0.76% lower MAPE than C-NN, and 0.11% lower MAPE than PWL; for MSE, CSNN increases 142.14% MSE of NN but decrease 91.35% MSE of C-NN and

Fig. 4: The training process of frequency nadir and stepwise frequency constraint learning.

Fig. 5: The approximation errors of different models in boxen plot.
74.85% MSE of C-NN, which sacrifices some approximation accuracy to guarantee conservativeness. As for the negative rate, both CSNN and C-NN exhibit a 100% negative rate, demonstrating the effectiveness of the conservative loss design. In contrast, the negative rate of NN is only 85.43%, which may result in the frequency requirement violation.

Sparsity ComparisonTo verify the sparsity of CSNN, we compare the non-zero parameter number of the above four models, where lower parameters mean a higher sparsity.

Sparsity ComparisonTo verify the sparsity of CSNN, we compare the non-zero parameter number of the above four models, where lower parameters mean a higher sparsity.

For the frequency nadir constraint learning of Eq. (15a) in Tab. IV, the corresponding CSNN has only 1395 parameters and achieves the 86.96% reduction of the dense neural networks of C-NN and NN, verifying the effectiveness of sparse training.

For the stepwise frequency constraint learning of Eq. (15b) in Tab. V, the corresponding CSNN has only 1442 parameters and achieves the 86.77% reduction of the dense neural networks of C-NN and NN.

### _Comparison of Optimization Scenarios_

In this part, we first compare the operational performance of the data-enhanced frequency constrained unit commitment model and then verify the efficacy of the sparse design of neural networks, stability region, and the stepwise frequency constraints.

#### Vi-C1 Operation Performance

We further compare the data-enhanced FCUC with DER to the conventional unit commitment for verifying the necessity of frequency constraints and the effectiveness of DER participation.

ResultsTab. VI compares the operational costs and renewable abandoned rates of the scheduling model with/without frequency constraints.

The data-enhanced FCUC increases the operational cost by 8.24% and the renewable abandoned rate by 2.64% but decreases the system frequency violation rate from 100% to 0% under large contingency, verifying the effectiveness of the proposed model. The increase of abandoned renewable supports system inertia. Through the frequency constraints, the system will enhance the system inertia and frequency response by increasing the online units and exploiting the frequency support from DER, leading to a higher operational cost, abandoned rate, and more stable system operation.

Fig. 6 further compares the operational unit status between the convention scheduling and frequency-constrained scheduling, demonstrating that the frequency constraints enforce the unit start-up to guarantee the system stability.

Dynamics AnalysisWe simulate the frequency dynamics under the scheduling models with and without frequency constraints under the 500 MW power loss contingency in Fig. 7, verifying their effectiveness.

As shown in Fig. 7, the orange line of dynamics under FCUC satisfies the frequency nadir, stepwise, and QSS requirements compared to the blue line under the conventional scheduling.

#### Vi-C2 Benefits of Sparse Neural Networks

Compared with the piece-wise linear regression, the high representational capacity of sparse neural networks will help capture the relationship between frequency dynamics and inertia parameters in a more optimization-efficient way.

Tab. VII compares the solving time and costs of the data-enhanced FCUC integrated with different neural networks. The solving time under CSNN is 17.23 times faster than C-NN and 21.57 times faster than NN, verifying the solution acceleration effectiveness of sparsity design.

Fig. 6: The unit status under different scheduling scenarios in the modified 118-bus system.
#### V-C3 Benefits of Stability Region

We should guarantee the performance of the data-driven method design because robustness matters more than optimality. So we construct the clustered convex hulls from the data to build the stability region adding to the optimization models. The below Fig. 8 shows the area of infeasible points and the convex hulls of clustered feasible points.

### _Scalability and Comparison Analysis_

For the generality of the proposed data-enhanced FCUC, we further discuss the scalability of the proposed framework via the modified 1888-bus system experiments based on Ref. [35] and verify the effectiveness and efficiency of the proposed CSNN via the comparison the state-of-the-art machine learning algorithms [36, 37, 38].

#### V-D1 Scalability Analysis

We apply the data-enhanced FCUC model in a modified 1888-bus system to verify the scalability of the proposed method that the proposed data-enhanced FCUC increases 3.6% operational cost and 4.23% renewable abandoned rate to achieve the 0% frequency violation rate under contingency and ensure system stable operation, as shown in the following Tab. VIII.

#### V-D2 Comparison Analysis

To verify the efficiency and effectiveness, we further compare the proposed CSNN model with other state-of-the-art machine learning models including the optimal regression trees (ORT) [36], random forest (RF) [37], and support vector regression (SVR) [38] models.

As shown in Tab. IX, though the prediction accuracy of CSNN is lower than ORT but higher than RL and SVR, the proposed CSNN achieve 100% negative rate compared to ORT, RF, and SVR, verifying its prediction conservativeness.

To summarize, our proposed data-enhanced FCUC model exhibits scalability for various testing systems and effectiveness for approximation conservativeness compared to various ML models.

## VI Conclusion

Faced with the complex frequency dynamics under the high penetration of the converter-based DER, this paper proposes to learn the frequency dynamics by CSNN and incorporate CSNN into the system optimization to facilitate system reliable operation, composed of learning and optimization stages. In the learning stage, the proposed CSNN can achieve the conservativeness against frequency violation and the sparsity for solving acceleration; in the optimization stage, the trained CSNNs are transformed into MILP constraints using the big-M method and embedded into the conventional UC model to establish the final data-enhanced FCUC model. The case study verifies 1) the effectiveness of the proposed model by achieving higher approximation accuracy, around 87% fewer parameters, and 21.57 times faster solving speed compared to that of the conventional NN in the modified 118-bus system; 2) the stable system operation against the frequency requirement violation under contingency. The proposed data-enhanced FCUC model leverages and incorporates the CSNN to manage the system inertia with DERs effectively and boost the system reliability.

Fig. 8: Analysis of convex hulls as stability region.

Fig. 7: Frequency dynamics comparison in the modified 118-bus system.