1. Introduction
The increasing integration of high proportions of renewable energy and the widespread application of power electronic devices have led to reduced system inertia, weakened disturbance resistance, and accelerated frequency change rates, making the maintenance of system frequency stability an unprecedented challenge [
1]. In grid frequency regulation tasks, PFR provides an automatic and rapid response to frequency fluctuations caused by load changes. It is the most fundamental and fastest automatic mechanism for maintaining real-time power balance and frequency stability in power systems. As the proportion of renewable energy sources further increases in the new electricity system, coal-fired power generation units are transitioning from the main power source to supporting and regulating sources, and undertaking grid frequency regulation tasks more frequently [
2].
In actual operation, due to complex factors such as boiler inertia, regulation system performance, operating conditions, and equipment health status, many units cannot meet grid requirements for PFR in terms of response time, droop coefficient, actual action integral electricity, and other regulation capabilities, thereby affecting grid frequency stability [
1,
3]. Additionally, units with constrained regulation capabilities are subject to assessments under the power grid’s “Two Detailed Rules,” leading to economic losses for power plants.
Currently, there is constrained research on comprehensive diagnostic analysis of the constrained regulation capabilities of coal-fired units in PFR. Existing studies mainly focus on modeling the PFR process for coal-fired units and analyzing some constraining factors. In terms of mechanistic models, ref. [
4] analyzes the impact of main steam pressure fluctuations on PFR, incorporating a boiler dynamic model that includes heat exchange processes into a generic unit PFR model, thereby improving model accuracy. Reference [
5] establishes a mathematical model for extraction condensing steam turbines applicable to various PFR technologies and operating condition changes, analyzing the effects of different frequency regulation technologies and condition variations on unit PFR capabilities. Reference [
6] examines the limiting mechanisms and influencing factors of unit PFR capabilities from three aspects: main steam valve opening, main steam pressure, and power limits, and builds an assessment model for PFR capabilities of deep peak-shaving units. Reference [
7] establishes a unit PFR capability assessment model based on system identification technology, analyzing the decoupling of main steam pressure from unit power response. Reference [
8] studies the influence of patterns of boiler heat storage coefficients and main steam pressure on unit PFR capabilities, establishing a PFR mechanistic model based on observer PID. In terms of data-driven models, ref. [
9] develops a data-driven model for predicting PFR capabilities, with inputs including load commands, actual power, main steam pressure, valve opening, and rotational speed, aiding in the analysis of limiting factors for unit PFR capabilities. Reference [
10] creates a fully data-driven model for online estimation of PFR capabilities in deep peak-shaving thermal power units using an LSTM neural network, enabling the assessment of unit PFR capabilities. While the aforementioned models for coal-fired unit PFR can identify deviations in unit PFR capabilities and analyze some limiting factors, they cannot achieve a comprehensive diagnosis of constrained PFR capabilities.
Thermal power units are highly complex nonlinear systems with strongly coupled dynamic variables, making it difficult to comprehensively analyze the reasons for constrained PFR capabilities through mechanistic modeling. Compared to mechanistic modeling approaches, data-driven methods can achieve comprehensive analysis of unit regulation capability constraints without prior knowledge [
11]. Due to the strong correlations among unit equipment and the multiple, highly coupled causes of constrained PFR capabilities, each reason for constrained regulation can be treated as a label. Thus, the problem of diagnosing constrained regulation capabilities in coal-fired units can be transformed into a multi-label classification problem. Currently, methods for solving multi-label classification problems are mainly divided into two categories: problem transformation and algorithm adaptation. Mainstream algorithms in problem transformation include binary relevance, classifier chains [
12], and label powerset [
13]. Algorithm adaptation methods mainly include K-nearest neighbors (KNN) [
14], random forests (RF) [
15], gradient boosting, support vector machines (SVM), neural networks, etc. Among these, random forest is an ensemble classification model based on decision trees, with few hyperparameters and no need for extensive parameter tuning. Therefore, random forest is adopted as the diagnostic classification algorithm in this paper. Random forest is an ensemble of decision trees, and the number of decision trees, their depth, and other hyperparameters affect the final classification diagnostic results. Optimizing the hyperparameters of a random forest can improve the accuracy of classification diagnosis. Common algorithms for hyperparameter optimization include particle swarm optimization (PSO) [
16], gray wolf optimizer (GWO) [
17], genetic algorithm (GA) [
18], snake optimizer (SO) [
19], and Bayesian algorithm (BYS) [
20].
To benchmark performance against state-of-the-art advancements, the snake optimizer (SO) proposed by Hussien [
21] is incorporated. This selection is predicated on SO’s distinctive dynamic exploration-exploitation mechanism, which epitomizes the latest evolutionary trends in swarm intelligence. However, despite its efficacy, SO often faces challenges in convergence speed and stability when tackling high-dimensional feature selection for diagnostic tasks. Therefore, to address these limitations and further enhance model transparency, this study proposes a novel hybrid framework, ISOMLRF. By integrating the strengths of the improved snake optimizer with random forest, our method aims to achieve a superior balance between diagnostic accuracy and computational efficiency.
In summary, high renewable integration intensifies the demand for precise PFR; coal-fired units often fail to meet grid codes due to complex, coupled constraints. Existing diagnostic approaches face limitations: mechanism models struggle with system nonlinearity, while current data-driven methods lack comprehensive multi-factor analysis. To bridge this gap, this study reframes PFR diagnosis as a multi-label classification task. The main contributions of this paper are
- ⮚
A comprehensive set of parameters and constraint factors is systematically analyzed and established to address the strong coupling effects in coal-fired units.
- ⮚
An improved snake optimizer featuring dynamic update mechanisms and novel search strategies is proposed to optimize the hyperparameters of a multi-label random forest, significantly enhancing convergence speed and diagnostic accuracy.
- ⮚
The proposed method is validated using real-world operational data, demonstrating superior performance with low FAR and MAR, providing high-precision online diagnosis for constrained PFR capacity.
The remainder of this paper is organized as follows.
Section 2 presents the mechanism analysis of constrained PFR capacity.
Section 3 provides a detailed description of the proposed fault diagnosis method.
Section 4 presents the simulation analysis of the proposed method.
Section 5 concludes the paper and presents the limitations of the proposed study.
3. Methodology
3.1. Snake Optimizer Algorithm
In 2022, Professor Abdelazim G. Hussien drew inspiration from the predatory, combat, and mating behaviors of snakes in nature to pioneer the snake optimizer (SO) algorithm. According to [
21], SO equally divides the snake population into two groups: male and female, as shown in Equation (1). Females only fight or mate with males when the temperature (
Temp) is low, and the food quantity (
Q) is sufficient.
Temp and
Q are given by Equations (2) and (3), respectively.
Among them,
N represents the total number of individuals, while
Nm and
Nf denote the number of male and female individuals, respectively.
T and
t denote the maximum number of iterations and the current iteration number, respectively, and
c1 takes the value of 0.5. Then, the positions of male snakes can be updated as follows [
21].
Here, Xi,m and Xrand,m represent the positions of male snakes, with their fitness values denoted as fi,m and frand,m. Xmax and Xmin represent the upper and lower bounds of the positions, rand is a random number between 0 and 1, and c2 is set to 0.05. The position update method for female snakes is the same as that for male snakes.
If the food quantity is sufficient (
Q > 0.25), the snake population enters the exploration stage. If
Temp > 0.6, the snake population will move entirely toward the direction of the food according to the rule specified in Equation [
21].
where
Xi,j and
Xfood represent the position of the snake (male or female) and the position of the best individual, respectively, and
c3 is set to 2.
If the environmental temperature is low (
Temp < 0.6), the snakes enter either combat or mating mode. The combat mode for males is described by Equation (6). Conversely, the mating mode is expressed by Equation (7). Finally, the worst-performing males and females are updated using Equations (8) and (9), and the algorithm continues to run until the termination conditions are met [
21].
where
Xbest,f represents the position of the best female snake.
fbest,f and
fi represent the fitness values of the best female snake and the snake population, respectively. The update process for female snakes is the same as that for male snakes.
Xworst,m and
Xworst,f correspond to the positions of the worst-performing male and female snakes, respectively.
3.2. Improved Snake Optimizer Algorithm
Although the snake optimizer (SO) algorithm has made significant progress compared to previous algorithms, it still faces considerable challenges when dealing with complex and high-dimensional optimization problems. Due to insufficient population diversity in the SO algorithm, it encounters issues such as slow convergence speed and low convergence accuracy when solving complex optimization problems in engineering applications that involve different dimensions and multiple nonlinear constraints. To address these issues, this paper introduces dynamic update and search mechanisms to enhance the performance of the snake optimization algorithm.
- (1)
Dynamic Update Mechanism
In the SO algorithm, the food quantity is crucial for determining whether the algorithm is in the exploration stage or the exploitation stage. Based on ref. [
27], a disturbance factor is introduced into Equation (3) to achieve a new dynamic update for
c1. The new
c1 is calculated according to Equation (10).
Here, r1 is a random number between 0 and 1.
During the exploration stage, the position updates for male and female snakes as they search for food are calculated using Equation (4). In this paper, a disturbance factor is added to achieve a new dynamic update for
c2. The new
c2 is calculated according to Equation (11).
Here, r2 is a random number between 0 and 1.
During the exploitation stage, the positions of male and female snakes are calculated by Equations (5)–(7). A sine factor is introduced here to improve the algorithm’s convergence speed, and the new
c3 is calculated according to Equation (12).
- (2)
BPED Search Mechanism
To enhance population diversity in the SO algorithm and improve its optimization capability, an innovative strategy called Bidirectional Population Evolution Dynamics (BPED) is introduced, which replaces the random search during egg hatching in the original SO.
First, based on the widely observed Pareto principle in nature, the top 20% of individuals with the highest fitness in the population are retained and allowed to undergo natural variation. For this high-quality population composed of the top 20% of individuals, new mutated individuals, denoted as
X′, are obtained according to Equations (13) and (14) based on [
28].
Here,
Xq and
Xk represent two high-quality individuals distinct from
Xi, both belonging to the top 20% of the population;
Xbest denotes the fittest individual in the population, while
w represents a mutation factor based on a sine function, with its exact expression given by Equation (15).
Here, Dim represents the dimension of the data, T denotes the total number of iterations, and t indicates the current iteration count of the algorithm.
The second component of the BPED strategy involves mutation, elimination, and population migration, applying the PED strategy to the remaining 80% of individuals. This process generates new individuals, denoted as
X′. The latter 80% of individuals are randomly divided into two groups. Individuals randomly assigned to the first group undergo variation around the best individual in the population, as shown in Equation (16).
Among the remaining 80% of individuals, the other part will migrate according to Equation (17), relocating themselves near their initial positions to conduct further exploration.
Through the two strategies proposed in this study, the original snake optimizer (SO) has been enhanced. These skillfully designed modifications have significantly improved the algorithm’s convergence speed, accuracy, and stability.
3.3. Algorithm Validation
In this study, four test functions (F1–F4) from the CEC2017 benchmark set are selected to validate the convergence performance of the ISO algorithm. To ensure a comprehensive evaluation, the performance of the proposed ISO is compared against four widely recognized benchmark optimizers: the standard snake optimizer (SO), whale optimization algorithm (WOA), gray wolf optimizer (GWO), and particle swarm optimization (PSO).
- (1)
The WOA is a nature-inspired metaheuristic algorithm proposed by Mirjalili and Lewis [
29]. It mimics the social behavior and unique hunting strategy of humpback whales, specifically the bubble-net feeding technique. The algorithm mathematically models three main phases: encircling prey, spiral bubble-net attacking, and searching for prey. The WOA updates the position of a search agent (whale) using the following key equations:
Whales circle the prey during the hunt. This behavior is formulated as
where
is the position of the best solution obtained so far (prey), and
is the position of the current whale.
To simulate the spiral bubble-net attacking motion, a helix-shaped movement is formulated as
where
represents the distance between the whale and the prey, b is a constant defining the shape of the logarithmic spiral, and l is a random number in [−1, 1].
- (2)
The GWO algorithm is a population-based metaheuristic algorithm proposed by Mirjalili [
30]. It mimics the social hierarchy and cooperative hunting mechanisms of gray wolves in nature. The algorithm mathematically models four types of agents: Alpha (α, the leader), Beta (β, the subordinates), Delta (δ, the followers), and Omega (ω, the lowest ranking). The optimization process relies on three main phases: encircling prey, hunting, and attacking. The GWO algorithm updates the position of a search agent (wolf) using the following key equations:
Wolves circle the prey during the hunt. This behavior is formulated as
where
is the position of the prey (optimal solution), and
is the position of the current gray wolf.
Since the Alpha, Beta, and Delta wolves have better knowledge of the prey’s location, they guide the Omega wolves. The position update is calculated using these three leaders:
where
X1,
X2, and
X3 are the updated positions influenced by Alpha, Beta, and Delta, respectively, calculated using the encircling equations.
- (3)
The PSO algorithm was originally proposed by Kennedy and Eberhart [
31]. The canonical PSO algorithm updates the velocity and position of each particle
i in a D-dimensional search space using the following two equations.
The velocity of particle
i at iteration
t + 1 is calculated as
The new position of particle
i is determined by adding the updated velocity to its current position:
Here, and are the position and velocity of particle i in dimension d at iteration t; w is the inertial weight; c1 and c2 are acceleration coefficients; r1 and r2 are random numbers uniformly distributed in [0, 1]; is the personal best position achieved by particle i so far; is the global best position found by the entire swarm so far.
These three algorithms were selected because they represent the evolutionary trajectory of swarm intelligence algorithms and are commonly applied in hyperparameter tuning tasks for machine learning models, providing a robust baseline for comparison.
The convergence curves of each optimization algorithm are shown in
Figure 1.
It can be seen that compared to the SO algorithm and other classical optimization algorithms, the ISO algorithm has achieved significant improvements in convergence speed, stability, and accuracy. Therefore, this paper applies the ISO algorithm to the hyperparameter optimization of the multi-label random forest.
3.4. Hyperparameter Optimization of Multi-Label Random Forest Based on ISO
While the standard snake optimizer (SO) demonstrates promising performance, it may encounter limitations such as premature convergence when handling complex feature spaces. To address this, we propose an improved snake optimizer (ISO). Subsequently, we integrate this enhanced optimizer with a multi-label random forest classifier, resulting in the ISOMLRF hybrid model, which serves as the primary experimental framework for this study.
The hyperparameter optimization process of the MLRF based on the improved snake optimizer (ISO) algorithm is illustrated in
Figure 2. First, a feature parameter dataset and a multi-label dataset for model training are constructed. Next, the hyperparameters of the MLRF (including the number of trees, maximum depth, minimum leaf size, and feature selection ratio) are introduced from the iterative ISO algorithm, and multi-label decision trees are built accordingly. Finally, the MLRF classification model is trained using the dataset, and the training error (Hamming Loss) is computed as the fitness to iteratively optimize the hyperparameters.
3.5. Diagnostic Procedure for Constrained PFR Capability in Units
The diagnostic procedure for constrained PFR capability in coal-fired units, based on the ISOMLRF, is illustrated in
Figure 3.
In practical applications, online diagnosis of constrained PFR capability can be achieved by identifying the constrained regulation process online, extracting the characterization parameters of the PFR capability, and utilizing the ISO-MLRF diagnostic model to obtain predicted classification labels.
3.6. Evaluation of Model Effectiveness
Multi-label classification algorithms are typically evaluated using the following metrics [
12]:
where
n is the number of samples in the test set;
L is the number of labels;
ypredictij is the predicted value;
ytestij is the test/true value.
- (2)
Macro-averaging F1 Score
- (3)
Alarm Rates
Missed Alarm Rate (MAR):
where
TN is the number of correctly predicted normal samples;
TP refers to the number of correctly predicted abnormal samples (True Positives);
FN refers to the number of incorrectly predicted normal samples (False Negatives);
FP refers to the number of incorrectly predicted abnormal samples (False Positives).
3.7. Experimental Platform and Implementation Details
To ensure computational efficiency, all experiments were performed on a workstation configured with an Intel Core i7-14700KF processor (up to 5.6 GHz), an NVIDIA RTX 4090 graphics card (24 GB GDDR6X), and 32 GB of DDR5 RAM, operating on Windows 11. The proposed methodology was developed within the MATLAB R2024a environment. Specifically, we leveraged the Parallel Computing Toolbox to accelerate computations and the Statistics and Machine Learning Toolbox for data analysis.