1. Introduction
The emission of carbon dioxide has reached the highest levels since its monitoring began, which is regarded as a key factor contributing to the increase in extreme climate events [
1]. As an important energy source in modern industry, the power industry contributes the largest proportion of carbon emissions, which accordingly plays a pivotal role in carbon reduction efforts [
2]. In China, carbon emissions from the power industry account for over 40% of the nation’s total carbon emissions [
3]. The dual carbon goals were proposed in order to achieve carbon peaking by 2030 and carbon neutrality by 2060 [
4]. The construction of a new type of power system centered on renewable energy generation has been initiated as a key strategy [
5]. Accurate estimation of carbon emissions in power systems can indicate the carbon transmission from the generation side to the consumption side. As a result, the emission responsibilities of each segment in the power system can be identified during energy consumption. Carbon emission estimation will lay a solid foundation for developing emission reduction measures and achieving carbon neutrality goals.
Currently, carbon emission estimation methods in power systems primarily fall into two categories: model-driven and data-driven methods [
6,
7]. Model-driven methods were proposed by Chongqing Kang et al. [
8], combining carbon emission analysis with power flow, whose computational efficiency is improved in [
9]. Power transmission loss is further considered in [
10]. Theoretically, the carbon emission factor of each node can be derived directly based on measurements of power flow for a whole power system [
11]. However, due to issues such as electromagnetic interference and the degradation of measurement equipment performance, noise and anomalies are inevitably present in sensor measurement data, making model-driven methods inadequate for tracing carbon emissions from noise-contaminated measurements. As a consequence, model-based methods suffer from enormous uncertainty and the resulting computational burdens [
12].
In contrast, data-driven methods explore the intrinsic relationship between carbon emissions and electrical quantities, leveraging intelligent algorithms to learn from historical data. In Ref. [
13], different periods of carbon emission factors in the time dimension are mainly considered and integrated by the algorithm TimesNet. Aiming at short-term prediction of carbon emissions, Sun et al. present a combined model of decomposition and prediction, composed of ensemble empirical mode decomposition and a backpropagation neural network [
14]. The accuracy of short-term carbon emission prediction was confirmed to be improved by decomposing before predicting [
14]. For community carbon emissions, a support vector regression model is trained in [
15]. A Long Short-Term Memory (LSTM)-based carbon emission factor prediction method shows superior performance in time series modeling [
16]. Ref. [
17] proposes a discounted mean square forecast error combination model optimized by the quantum harmony search algorithm, enhancing prediction accuracy through dynamic adjustment of discount factors. Although data-driven approaches allow for the prediction of carbon emissions in power systems, the noisy data measured by power system sensors make it difficult for existing methods to capture carbon emission features fully, which limits the accuracy and resistance to noise in carbon emission calculations. Meanwhile, the complexity of power grids is rising with the integration of renewable energy sources as well as the growing demand due to the electrification of the heat and mobility sectors, leading to difficulties in global convergence of carbon emission calculations, especially for large-scale systems. A hybrid model is employed in [
18], integrating a generalized regression neural network and grey wolf optimization, achieving carbon emission prediction by decomposing non-stationary emission sequences. Furthermore, Particle Swarm Optimization is combined with Convolutional Neural Network (CNN)-LSTM to predict carbon emission, improving accuracy through wavelet packet decomposition denoising [
19]. However, its random initialization strategy may result in uneven population distribution, hindering comprehensive coverage of the global search space.
Dung Beetle Optimization (DBO) is a swarm intelligence meta-heuristic algorithm, inspired by the natural behaviors of dung beetles, designed to address complex optimization problems. This algorithm has been widely applied in maximum power point tracking for photovoltaic systems [
20] and photovoltaic power prediction [
21]. However, traditional DBO faces issues such as susceptibility to local optima and relatively low search accuracy and convergence speed in high-dimensional or complex problems. In this case, several methods have been developed, including the Enhanced DBO (EDBO) [
22] and the Multi-Strategy Improved DBO (MDBO) [
23].
To address the computational efficiency and noisy sensitivity issues in existing data-driven methods, this paper proposes a Modified Dung Beetle Optimization (MDBO) enhanced CNN-LSTM method, i.e., MDBO-CNN-LSTM, for carbon emission factor prediction in power systems. The MDBO enhances the global search capability of the traditional Dung Beetle Optimization (DBO) algorithm by integrating spatial–temporal–multi-dimensional (SPM) chaotic mapping for population initialization, adaptive probability threshold adjustment, and differential mutation perturbation. Therefore, in this paper, combined with CNN’s spatial feature extraction and LSTM’s complex relationship modeling, the MDBO-CNN-LSTM framework is proposed for carbon emission factor prediction, which can maintain robust performance even under strong noise interference and has not been applied to carbon emission analysis. The main contributions are summarized as follows:
- (1)
Hybrid strategies are utilized to modify and improve the global search capability of the Dung Beetle Optimization algorithm.
- (2)
The MDBO-CNN-LSTM model is proposed to improve accuracy and robustness under noise interference for carbon emission prediction of power systems.
- (3)
Simulation experiments of different scale test systems are conducted to verify the effectiveness and generalization of the proposed method.
The rest of this paper is organized as follows.
Section 2 analyzes the calculation method for nodal carbon emission factors of power systems based on the carbon flow theory.
Section 3 constructs the MDBO-CNN-LSTM model. And subsequently, the model is utilized to predict the nodal carbon emission factors of power systems and the overall process of the proposed method is carried out in
Section 4.
Section 5 presents various experimental verification, and finally,
Section 6 gives the conclusions and suggests future work.
2. Calculation of Nodal Carbon Emission Factors for Power Systems
In the power system, power generation and power consumption are contributed by nodes of the power system. As the power is transmitted from power plants to nodes, due to the line loss, the actual power reaching the user side is less than the generated power, thus triggering changes in the node carbon emission factor [
8]. The carbon emission factor is not only a reflection of carbon emissions in the power system but also an essential basis for distribution network optimization and energy saving.
- (1)
Branch carbon emissions
Branch carbon emissions are the most basic physical quantity describing the carbon flow. It is used to characterize the size of the carbon flow on the tributary, expressed by F. Branch carbon emissions are defined as the cumulative amount of carbon emissions corresponding to the carbon flow that passes through a specific tributary with the current in a given time. The unit of carbon emission is generally expressed as tCO2 or kgCO2. In this way, the mass of CO2 is used as the basis for calculating the mass of greenhouse gases in the emitted gases.
- (2)
Branch carbon flow rate
The branch carbon flow rate is defined as the carbon flow through a feeder in a unit of time with the tidal current, denoted by the symbol
R. It is numerically equal to the derivative of the nodal carbon flow with respect to time in tCO
2/h or kgCO
2/s:
where
R is the nodal carbon flow rate, Δ
F is the product of the electrical energy passed to generate a pulse and the carbon emission factor, and Δ
t denotes the moment difference between the
ith and the
i-1th pulse generated.
- (3)
Branch carbon flow rate
Considering that carbon emissions in the power system are mainly related to the active tidal current, to characterize the combination of the two, the ratio of the carbon flow rate to the active power flow in any branch of the power system is defined as the carbon flow density of that branch, denoted by the symbol
ρ:
where
R is the carbon flow rate at the node,
P is the power passing through the node, and
ρ is in kgCO
2/kWh.
Since both the nodal carbon flow rate and the active power flow describe instantaneous values, the branch carbon flow density varies in the system as the power flow changes. The average nodal carbon flow density
for a given time period is defined as
where the average carbon flow density of the node is obtained from the cumulative volume calculation, i.e., the ratio of carbon emissions over a period of time to the amount of electricity passing through the branch.
- (4)
The calculation of nodal carbon potential
The nodal carbon potential of the power system is denoted by the symbol
e, expressed as follows:
where
N+ is the set of all branches connected to the node that have current flowing into the node and
i is the branch number. The physical meaning of the node carbon potential is the equivalent value of carbon emissions on the generation side caused by consuming a unit of electricity at the node. For a power plant node, its nodal carbon potential is equal to the real-time carbon emission intensity of the power plant’s power generation. The node carbon potential has the same magnitude as the node carbon flow density, both kgCO
2/kWh. It is numerically equal to the weighted average of the carbon flow density
ρi of all the tributaries that flow into the node with respect to the active power flow
Pi.
5. Results and Discussion
In order to verify the effectiveness of the proposed method, modified IEEE 30-bus, 118-bus, and 300-bus system simulation models are constructed using the MATLAB 2023b platform [
27]. The topology of the modified IEEE 30-bus system is illustrated in
Figure 6. In this system, thermal generating units are located at Bus 1, 2, 5, 8, 11, and 13, in which those at Bus 8 and 11 are replaced with wind power and photovoltaic power sources of the same capacity, respectively. The carbon emission intensity of the other thermal generating units is 0.875, 0.875, 0.525, and 0.525 kgCO
2/kWh, respectively. For the IEEE 118-bus system, referred from [
28], Bus 31, 46, 49, and 65 are integrated with wind power generation, while Bus 66, 80, 89, 100, and 103 are integrated with photovoltaic power generation. For the IEEE 300-bus system, referred from [
29], Bus 122 and 165 are integrated with wind power generation, while Bus 215 and 248 interface with photovoltaic power generation.
By performing the method in
Section 4.1, the real-time wind power and photovoltaic power generation are probabilistically fitted to obtain output data close to the actual distribution. The output curves of 300 scenarios within 24 h for the wind power and the photovoltaic power are generated, respectively, according to the probabilistic models of photovoltaic and wind power [
30]; the results are shown in
Figure 7.
After data preprocessing, each system topology generates a dataset containing 10,000 samples. These datasets are partitioned into training, validation, and test sets in a 6:2:2 ratio.
5.1. Analysis of Nodal Carbon Emission Factor Prediction Results
To verify the proposed carbon emission factor prediction model, the MDBO-CNN-LSTM model is compared with the traditional CNN-LSTM model and Transformer model. The platform used to run code is Python 3.11, with an Intel(R) Xeon(R) w5-3435X 2.98 GHz processor and a computing memory of 512 GB. The predicted and theoretical value scatter plots for all models in different system scales are presented in
Figure 8,
Figure 9 and
Figure 10, which illustrate the distribution characteristics of prediction errors for node carbon emission factors from three models in power systems of different scales.
The horizontal axis of the scatterplot represents the theoretical node carbon emission factor values calculated using the carbon flow analysis method, while the vertical axis denotes the model-predicted values. The red dashed line indicates the perfect prediction baseline for evaluating model fitting accuracy, where closer proximity to this line signifies higher consistency between predictions and theoretical values. Each point represents the prediction result of a node within a sample, with color intensity determined by the magnitude of absolute error, where larger errors correspond to lighter colors. The results demonstrate that both algorithms exhibit predictive capabilities for nodal carbon emission factors across power systems of varying scales. However, as the scale of system nodes expands, model complexity increases significantly, leading to greater prediction difficulty. The expansion of feature space dimensionality amplifies the dispersion of predicted values from the theoretical baseline.
To further compare the preprocessing performance of the three aforementioned models, the evaluation results of the three models across the modified IEEE 30-bus, 118-bus, and 300-bus systems are listed in
Table 2. The comparative analysis indicates that the other two algorithms exhibit smaller prediction errors compared to the Transformer model. Furthermore, the proposed MDBO-CNN-LSTM model achieves reduced prediction errors relative to the traditional CNN-LSTM model. It can be concluded that MDBO-CNN-LSTM outperforms across all metrics (MAE, MSE, R
2) in systems of varying scales, demonstrating superior prediction performance.
The 30-bus, 118-bus, and 300-bus power systems are configured with different renewable energy generation ratios of 35.7%, 54.6%, and 13.3%, respectively. To further illustrate the impact of different renewable energy capacity on model performance, two additional cases are added to the 30-bus system, with renewable energy generation ratios of 43.8% and 56.5%, covering a typical renewable energy installation scenario. The prediction results are shown in
Figure 11, and the performance of the model is presented in
Table 3. The results indicate that under the same node system and varying renewable energy output conditions, the MDBO-CNN-LSTM model demonstrates accurate predictions with tiny error across different scenarios, reflecting the transferability of the proposed method across real-world energy transition contexts.
For assessing the generalization capability of the proposed MDBO-CNN-LSTM model and reducing dependence on the single data partition, five-fold cross-validation is conducted on all test systems. The results of cross-validation for the MDBO model under different conditions are shown in
Table 4. The average metric values of the MAE, MSE, and R
2 for the IEEE 30-bus system performs well across all folds. In larger systems of the 118-bus and 300-bus systems, the model also demonstrates stability across all metrics between folds. The experimental results indicate that the proposed method maintains stable prediction accuracy regardless of data partitioning, effectively mitigating the risk of overfitting in the model, which provides confidence in the model’s generalization.
In response to overfitting risks in high-dimensional power system scenarios, the dropout rate has been set in the proposed model as described in
Section 3.3. The results under different dropout rates are shown in
Table 5.
Through systematic experimental analysis, the impact of dropout regularization on the model’s generalization ability is examined. In a small dataset scenario with 800 samples, the model without dropout exhibited significant overfitting. As the dropout rate increases, the overfitting gap continuously decreases. At a dropout rate of 0.3, both the training and validation errors, as well as the overfitting gap, reach their minimum values. The experimental results show that dropout effectively addresses the overfitting problem, particularly in small dataset scenarios, significantly improving the model’s generalization ability.
5.2. Hyperparameter Sensitivity and Interpretability Metric Analysis of MDBO-CNN-LSTM
To ensure the robustness of the MDBO-CNN-LSTM model and propose applicable ranges for future power system applications, we conducted a systematic sensitivity analysis on five key hyperparameters of the proposed model for identifying the most influential hyperparameters on model performance, including the learning rate, number of convolutional kernels, number of LSTM hidden units, number of fully connected layer neurons, and batch size. The sensitivity analysis adopts a single-variable perturbation strategy: for each hyperparameter, seven values within a ±70% range of the best value are scanned. During each scan, other parameters are fixed at their optimized values. Each configuration is evaluated using three random seeds to reduce variance [
31]. The calculation formula for the log-sensitivity score is as follows:
The logarithmic sensitivity value is dimensionless and represents the percentage change in MSE for every percentage change in the parameter value. For example, a score of 0.5 means that a 1% increase in the parameter will result in a 0.5% increase in MSE.
Figure 12,
Figure 13,
Figure 14,
Figure 15,
Figure 16 and
Figure 17 display the relationship between various hyperparameters and the validation set MSE of the MDBO-CNN-LSTM model in three different power systems, along with sensitivity rankings.
Positive sensitivity scores indicate that increasing the hyperparameter leads to improved model performance, with a decrease in the validation set MSE. Negative sensitivity scores suggest that increasing the hyperparameter results in a decline in model performance, with an increase in the validation set MSE. The absolute value of the sensitivity score reflects the strength of the influence, with larger values indicating higher sensitivity.
Seen from
Figure 12 and
Figure 13, in the 30-bus system, the learning rate (0.3604) is the most sensitive parameter, exhibiting strong negative correlation. Increasing the learning rate significantly degrades model performance. The second most sensitive parameter is the number of fully connected layer neurons; reducing the complexity of the fully connected layer mitigates overfitting risks. The results of the 118-bus system shown in
Figure 14 and
Figure 15 indicate that the number of fully connected layer neurons (0.147) is the most sensitive parameter, with its negative correlation indicating a need for simplified model architecture. The positive effects of the learning rate (0.020) and number of LSTM hidden units (0.017) suggest their values can be moderately increased. The sensitivity of the batch size approaches zero (0.0002), confirming its weak association with generalization capability. The results of the 300-bus system are shown in
Figure 16 and
Figure 17, in which the learning rate remains the most sensitive parameter, while the importance of convolutional channels increases substantially. The learning rate is the most sensitive parameter globally, with significant negative correlations in 30-/300-bus systems requiring reduced values. The number of fully connected layer neurons is the second most sensitive parameter, consistently showing negative influence, necessitating reduced structural complexity. Additionally, batch size exhibits minimal global impact.
In practical applications, priority should be given to precise tuning of the learning rate and number of fully connected layer neurons within recommended ranges, while adopting default values for batch size to reduce optimization costs. Recommended hyperparameter ranges for different power systems are provided in
Table 6.
To enhance the interpretability of carbon emission prediction models and identify key influencing factors, this study employs the SHAP (SHapley Additive exPlanations) method for systematic analysis. SHAP, based on game theory principles, quantifies the contribution of each feature to the model’s output, providing a consistent and reliable framework for explanation [
32]. It satisfies the requirements of local accuracy and consistency to offer both global feature importance and local prediction explanations, making it particularly suitable for interpretability analysis in high-dimensional and complex systems such as power systems. The analysis process includes two key steps: (1) Local Explanation: For a single node’s carbon emission factor, SHAP values for each input feature are calculated. (2) Global Analysis: The feature importance is integrated across all nodes to identify system-level key influencing factors.
The SHAP code library in Python 3.11 is used for interpretability analysis of the model.
Table 7 illustrates the top three most important features in the three different power systems. Through a comparative analysis of systems with 30, 118, and 300 nodes, it is found that the key factor influencing carbon emission prediction is the power injection of units, including wind, solar, and fossil fuel. This aligns with carbon flow theory, where carbon emissions originate from power sources and are allocated to power system nodes. Consequently, the most influential parameter on nodal carbon emissions is the carbon emission attributes of power sources.
5.3. Resistance to Noise in Carbon Emission Factor Prediction
Measurement data such as load and power generation of the power system will introduce unavoidable noise, causing errors in calculating carbon emission factors. In order to verify the robustness of the method in this paper, Gaussian white noise is introduced into the power generation measurement data of the power system to reflect the possible uncertainty. It is mainly divided into three kinds of noise scenarios: (1) In the weak noise environment, the noise amplitude is ±5%, simulating the low-intensity noise operation of the system. (2) In the stronger noise environment, the noise amplitude is ±15%, simulating more complex scenarios. (3) In an environment with a noise amplitude of ±20%, the robustness limits of the proposed method under high-uncertainty scenarios are further determined. The prediction results of the three methods under varying noise levels are compared in
Table 8.
The experimental results in
Table 8 indicate that increased noise intensity significantly raises prediction errors for both models. The CNN-LSTM model exhibits higher noise sensitivity, leading to substantial error increments. In contrast, the MDBO-CNN-LSTM model demonstrates stronger robustness, effectively mitigating noise impacts on predictions. This advantage is more pronounced in larger-scale systems (e.g., 118-bus and 300-bus). Even under significant Gaussian white noise interference, up to 20% amplitude, the proposed model maintains high prediction accuracy, while conventional methods exhibit notable performance degradation. This capability ensures stable performance in real-world applications with noisy power system data. The robustness limit of the proposed approach in high-uncertainty scenarios is about 20% noise.
To further validate the model’s noise resistance under different types of noise, impulse noise and sinusoidal noise are introduced into the data. The impulse noise probabilities were set at 1%, 5%, and 10%, with an amplitude five times the mean of the input data. The sinusoidal noise amplitudes were 1%, 5%, and 10% of the input data mean, with a frequency of 0.01 Hz. Predicted and theoretical carbon emission factor results are shown in
Table 9. From the results in the table, it can be concluded that, under the same noise conditions, the MDBO-CNN-LSTM model consistently outperformed the CNN-LSTM model.
As the impulse probability and sinusoidal noise amplitude increases from 1% to 10%, both models exhibit a notable rise in MAE and MSE. However, the MDBO-CNN-LSTM model demonstrates a smaller degradation range, indicating higher tolerance to impulsive noise, greater stability, and stronger noise resistance. Moreover, in larger power systems (e.g., 118-bus and 300-bus), the MDBO-CNN-LSTM model maintains its advantage, though the performance gap slightly narrowed. The MDBO-CNN-LSTM model exhibits superior anti-interference capability and prediction accuracy across various noise types, noise intensities, and system scales through hyperparameter optimization. These results confirm its potential for practical applications in power systems.
5.4. Computational Efficiency of Carbon Emission Factor Prediction
For analyzing the model’s scalability and computational efficiency in online operational environments, this section compares the computation time in IEEE 30-bus, 118-bus, and 300-bus systems, respectively. Furthermore, a model-driven carbon emission factor computation method is added as a comparison against the data-driven method [
33]. The inference time is evaluated over 2000 test runs under increasing node loads, representing the total time and latency metric required for the complete computational workflow with the training process not included. A remote computer first simulates data acquisition from online monitoring devices. Then, the local computer establishes communication for measured electricity consumption data, followed by carbon factor prediction through local program processing. Finally, carbon emission factor outputs are generated, with the mean value and standard deviation calculated for all single-input executions under controlled experimental conditions. The comparison results for computational efficiency between the model-driven method and the three data-driven methods are shown in
Table 10.
In the IEEE 30-bus system, the computation time of the model-driven method is 23.939 ms, which increases to 35.192 ms when the node count rises to 300, indicating significant computational burden with system scale expansion. In contrast, the three data-driven models show better computational efficiency. With their computational time significantly lower than that of the model-driven method at different system scales, the growth rate of computational time is much smaller as the node scale increases. The CNN-LSTM and MDBO-CNN-LSTM models are superior to the Transformer model. After optimizing the hyperparameters of the CNN-LSTM model using the MDBO algorithm, the model’s number of parameters increases, leading to a slight extension in computational time. Therefore, in spite of the computational efficiency decreasing slightly compared with the CNN-LSTM model, the MDBO-CNN-LSTM prediction performance improves significantly. Through systematic hyperparameter optimization, the MDBO algorithm allows the CNN-LSTM model to approach near-theoretical optimal performance for specific tasks, though a trade-off between computational cost and prediction performance must be considered in practical applications. These results indicate that the computational efficiency of the proposed method remains stable even in large-scale power systems, making it highly suitable for nodal carbon emission factor prediction.
5.5. Analysis of Actual Power System on Carbon Emission Prediction
The proposed model is validated using real power system data to verify its feasibility for practical applications and credibility. Twenty representative cities in Guangdong Province in China are selected to collect hourly measurement data on power consumption and carbon emission factors at their gateway nodes over 6 months. The collected results are shown in
Figure 18. The data from the first five months are used as the training set, the data from the first half of the sixth month are used as the validation set, and the data from the latter half of the sixth month are used as the test set.
A comparison between predicted and actual values of carbon emission factors in the test set reveals MAE, MSE, and R2 values of 0.020038, 0.000651, and 0.925592, respectively. This suggests that the proposed method demonstrates a relatively high level of accuracy when applied to real-world power grids. However, due to the noise present in the actual measurement sensor data, some bias occurs in the results. On the other hand, this finding corroborates the feasibility and reliability of the method in practical applications, providing empirical evidence for the model’s applicability and credibility in actual power systems.
6. Conclusions
At present, data-driven methods for carbon emission analysis in noise-contaminated sensor measurements and large-scale power systems exhibit deficiencies of model convergence efficiency, accuracy, and robustness. To address these issues, this study proposes a hybrid MDBO-CNN-LSTM prediction method. By integrating hybrid modified strategies, the population initialization, search strategy, and iteration mechanism of the algorithm are enhanced, improving the global search and local exploitation capability. Tests across 30-, 118-, and 300-bus systems, as well as an actual power system, demonstrate that the proposed method accurately predicts nodal carbon emission factors under renewable energy fluctuations, offering high computational efficiency, generalization capability, scalability, and robustness under noisy measurement data and large-scale power systems. To the best of the authors’ knowledge, this enhanced strategy-based algorithm represents the first application in carbon emission prediction within power systems, demonstrating a novel integration of optimization techniques in energy data analytics. This novel approach may provide a technical foundation for optimizing carbon emissions and advancing energy conservation in power systems, offering robust computational support for data-driven emission reduction strategies. However, limitations include strong data dependency and high computational resource demands. Future research will focus on lightweight model design and enhancing cross-scenario generalization capabilities. Subsequent research will also incorporate more large-scale field validation and address the problem caused by the lack of sensors, which hinders wider application.