Voltage prediction method and system suitable for power distribution network under distributed aggregation resource access
By combining the improved CSO-OIF Elman model and the XGBoost model, the problems of fluctuation and multi-source data processing faced by the grid voltage prediction model under the access of distributed power sources are solved, realizing high-precision and real-time voltage prediction, and improving the operation stability and economy of the power grid.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID ANHUI ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST
- Filing Date
- 2025-12-16
- Publication Date
- 2026-05-01
AI Technical Summary
Existing voltage prediction models are ill-suited to grid scenarios with large fluctuations in distributed power output and high dimensionality of multi-source data, leading to inaccurate voltage predictions and unstable grid operation.
An improved CSO-OIF Elman model is used to make real-time predictions of time series data. Combined with an XGBoost model driven by multi-dimensional heterogeneous data, the prediction mode is dynamically adjusted through residual threshold filtering and switching mechanisms to ensure the accuracy and stability of voltage prediction.
It improves the accuracy and robustness of voltage prediction, effectively addresses the output fluctuations of distributed power sources, enhances the economic efficiency and reliability of power grid operation, and reduces model training time and computational complexity.
Smart Images

Figure CN121965604A_ABST
Abstract
Description
Voltage prediction method and system applicable to distribution networks with distributed aggregated resource access Technical Field
[0001] This invention relates to the field of voltage fluctuation prediction technology in distribution networks, specifically to a voltage prediction method and system applicable to distribution networks with distributed aggregated resource access. Background Technology
[0002] As a crucial link connecting the power system and end users, the distribution network is facing the widespread integration of massive distributed power sources such as distributed photovoltaic power, energy storage, and electric vehicle charging stations. These distributed power sources are characterized by intermittency, randomness, and volatility, altering the power flow distribution and voltage characteristics of traditional distribution networks and posing a severe challenge to the safe and stable operation of the power grid.
[0003] Most distributed generation (DG) sources are connected to the grid via power electronic inverters, possessing rapid and precise reactive power regulation capabilities, providing a new technical path for distribution network voltage control. However, individual DG sources are small in capacity, scattered in distribution, and exhibit random behavior. Without coordinated control, their spontaneous regulation behavior may adversely affect the power grid. The widespread integration of DG sources has also had a significant and specific impact on several aspects of distribution network voltage forecasting, increasing the volatility and randomness of the forecast input. The output of distributed photovoltaic and wind power, among other renewable energy sources, is significantly affected by natural conditions such as sunlight and wind speed, exhibiting strong intermittency and volatility. The charging behavior of electric vehicle charging piles and the charging and discharging strategies of user-side energy storage exhibit obvious randomness and uncertainty. These factors lead to a complex bidirectional flow characteristic of active and reactive power in the distribution network, rendering traditional voltage forecasting models based on "source follows load" (with load data as the main input) inapplicable, significantly increasing the complexity of the forecast input variables. Secondly, the small capacity and decentralized connection of DG sources can lead to prominent local fluctuations in distribution network voltage. For example, the concentrated photovoltaic output of a certain feeder may only cause a rise in the voltage of the nodes in that area, rather than a change in the voltage of the entire grid. This requires voltage prediction to shift from the traditional "grid-wide prediction" to refined prediction by node and time period, requiring higher spatiotemporal resolution (such as minute-level or substation-level) to capture the voltage change patterns of local nodes.
[0004] Furthermore, it increases the need for dynamic adaptability in prediction models. Traditional distribution network voltage changes are primarily driven by load fluctuations, resulting in relatively gradual trends. However, with the integration of distributed generation, voltage fluctuates rapidly due to sudden changes in power output (such as a sharp drop in photovoltaic output caused by cloud cover). This requires voltage prediction models to have rapid dynamic response capabilities, able to track the coupling changes between power sources and loads in real time, rather than relying on static fitting of historical data. Traditional statistical prediction models (such as ARIMA) will experience a significant decrease in accuracy.
[0005] On the one hand, high-penetration distributed photovoltaic systems are prone to local feeder voltage exceeding limits during peak midday power generation periods, which can seriously lead to malfunctions in protection devices and equipment damage. On the other hand, rapid changes in distributed power output and the random start-stop of impulsive loads such as electric vehicles cause frequent fluctuations in grid voltage, deteriorating power quality and affecting users' electricity experience. Traditional distribution network voltage regulation methods, such as on-load tap changer operation of substation main transformers and switching of line capacitors, mainly rely on mechanical switch actions, which have limitations such as slow response speed, low regulation accuracy, and single control method, making it difficult to adapt to the dynamic and complex voltage regulation needs of new distribution networks.
[0006] Therefore, enhancing the reliance of forecasting technology on multi-source heterogeneous data has become an indispensable requirement. With the integration of distributed power sources, voltage forecasting no longer relies solely on load data but also needs to integrate multi-source heterogeneous information such as distributed power output data, energy storage charging and discharging data, charging pile operation data, and meteorological data. For example, the accuracy of photovoltaic power output forecasting directly affects the node voltage forecasting results, while the accuracy of meteorological data determines the reliability of photovoltaic power output forecasting. This significantly increases the requirements for data acquisition, transmission, and fusion; missing or inaccurate data will directly lead to deviations in voltage forecasting results.
[0007] Existing power grid voltage prediction technologies, including traditional time-series and statistical methods, classical machine learning (deep learning)-based methods, and hybrid and probabilistic prediction methods, all have certain limitations. They are poorly adaptable to nonlinear dynamics and abrupt changes in operating conditions and struggle to integrate multiple influencing factors. Current power system prediction technologies are evolving towards a fusion of physical models and data-driven approaches, and a shift from deterministic to probabilistic prediction.
[0008] In summary, studying voltage prediction in distribution networks under various distributed aggregated resource access conditions can not only effectively address the voltage stability challenges brought about by high access ratios, but also has significant theoretical and engineering application value for improving the acceptance capacity, operational flexibility, and economy of distribution networks.
[0009] Voltage fluctuations are influenced by multiple factors, including load, weather, and DG (distributed generation) output. Applying neural network prediction to these fluctuations presents several challenges: Single neural networks often suffer from overfitting or underfitting due to redundant input features. Ordinary neural networks (such as BP and Elman) with randomly initialized weights / thresholds are prone to getting trapped in local optima. Furthermore, voltage fluctuations are a time-series dynamic process (e.g., voltage drops caused by sudden load changes, or the cascading effects of DG output fluctuations). Ordinary BP networks lack temporal memory, and while LSTMs have memory, their complex structure and slow training time (often several hours) make them unsuitable for the "real-time prediction" requirements of grid voltage.
[0010] Current prediction models do not classify the initial data but instead use data fusion, inputting the fused data into the prediction model. While this seems "comprehensive," it is actually prone to internal interference between features. The temporal inertia and short-term fluctuations of grid voltage are strong patterns hidden within the historical voltage sequence itself, with clear signals and high frequency of change. External data such as meteorological conditions and equipment status are slowly changing or abrupt sources of interference / conditional variables, and their relationship with voltage is complex, indirect, and often lags. Summary of the Invention
[0011] The technical problem to be solved by this invention is that current voltage prediction models are not suitable for power grid scenarios with large fluctuations in distributed power output and high dimensionality of multi-source data.
[0012] To address the aforementioned technical problems, this invention provides the following technical solution: a voltage prediction method applicable to distribution networks with distributed aggregated resource access, comprising: partitioning the distribution network based on the dynamic response of distributed power sources; classifying multi-source data into time-series data and multi-dimensional heterogeneous data for the partitioned regions; applying an improved CSO-OIF Elman model to the time-series data to predict voltage fluctuations within the region in real time; establishing a residual threshold filtering and switching mechanism, wherein when the prediction residual of the improved CSO-OIF Elman model exceeds the standard, the method switches to the voltage fluctuation prediction result of the XGBoost model driven by multi-dimensional heterogeneous data.
[0013] In this embodiment, the time-series data includes historical voltage sequences, DG output time sequences, load time sequences, and bus power time sequences; the multi-dimensional heterogeneous data includes static / semi-static features, time-series derived features, and cross features; wherein, static / semi-static features include meteorological data, grid constraints, and equipment status; time-series derived features include voltage fluctuation predictions and prediction residuals output from the improved CSO-OIF Elman model, as well as statistical features of DG output, peak-valley differences in load, and historical statistical features of voltage; cross features are features that characterize the coupling relationship between time-series data and static / semi-static features.
[0014] In this embodiment, the improved CSO-OIF Elman model is as follows: the position vector of the "cat" in the improved CSO algorithm is mapped to the weights and thresholds of the OIF Elman neural network; and the cat group is divided into a global exploration search mode and a local fine search tracking mode according to the proportional relationship combination rate. The search is iterated by switching between the two modes until the fitness function of the OIF Elman neural network is minimized, and the optimal combination of weights and thresholds is determined.
[0015] In this embodiment, the global exploration search mode is represented by the following formula: In the formula, For the first The fitness function value is optimal for each cat, and each cat represents a set of weights and thresholds of an OIF Elman neural network. For the first Only cat in the first Wei, Di Fitness of the next iteration For the first Only cat in the first Wei, Di The current speed in the next iteration. For the first Only cat in the first Wei, Di The speed of the next iteration As a constant, For a variable, , These represent the upper and lower bounds of the velocity, respectively; the tracking mode of local fine-tuning search is expressed by the following formula: ;in, The probability of a cat being selected. To track fitness in the pattern, To achieve the optimal fitness in the tracking pattern, To maximize fitness, This represents the minimum fitness value.
[0016] In this embodiment, the global exploration search mode adopts a periodic vibration-based selection method to determine the first... Only cat in the first Wei, Di Fitness of the next iteration: In the formula, For user-defined amplitude values, The number of periods. for function, This is the parity flag. The period is the period of the sine function.
[0017] In this embodiment, the residual threshold filtering and switching mechanism includes: statistically analyzing the residual distribution of the CSO-OIF Elman model output over N historical days, and taking the 95th quantile of the residuals as the initial residual threshold. Secondly, the residual threshold is dynamically calibrated, the 95th percentile of the residual is recalculated according to the time sliding window, and voltage rating normalization is introduced to update the residual threshold and adapt to the seasonal or time-period changes in new energy output and load.
[0018] In this embodiment, the updated residual threshold is expressed by the following formula: In the formula, The updated residual threshold, The initial residual threshold, This is the rated voltage. This is a correction factor.
[0019] In this embodiment, the residual threshold filtering and switching mechanism includes a hysteresis mechanism: firstly, a hysteresis window is set. When continuous hysteresis window If the time-series residual exceeds the residual threshold, a switch is triggered, switching to the multi-dimensional heterogeneous data-driven mode of the XGBoost model; when the continuous hysteresis window... Only when the time residual is below the residual threshold can the time-series dominant mode be restored.
[0020] In this embodiment, hysteresis window The specific method for setting the time length is as follows: extract the residual sequences of "real abnormal working conditions" and "noise disturbances" from historical data; statistically analyze the duration distribution of residuals exceeding the residual threshold under the two scenarios; and set the window based on the maximum duration of noise disturbances.
[0021] In this embodiment, the distribution network is partitioned based on the dynamic response of distributed power sources, including: establishing dynamic response characteristic models of photovoltaic power, wind power, and energy storage system power; evaluating the regulation potential in the distribution network based on the dynamic response characteristic models, so as to divide the distribution network into several independent blocks through the minimum cut set method, each block can independently perform voltage regulation and power control, and the partitioning is carried out with the goal of minimizing voltage deviation.
[0022] This invention also provides a system for voltage prediction of a distribution network under distributed aggregated resource access as described above, comprising: a partitioning module for partitioning the distribution network based on the dynamic response of distributed power sources; a classification module for classifying multi-source data, including time-series data and multi-dimensional heterogeneous data, into the partitioned regions; a time-series prediction module for applying an improved CSO-OIF Elman model to the time-series data to predict voltage fluctuations within the region in real time; and a switching and multi-dimensional prediction module for establishing a residual threshold filtering and switching mechanism, which switches to the voltage fluctuation prediction result of the XGBoost model driven by multi-dimensional heterogeneous data when the prediction residual of the improved CSO-OIF Elman model exceeds the limit.
[0023] Compared with existing technologies, the beneficial effects of this invention are as follows: Traditional voltage zoning methods are mostly based on steady-state models or simple assumptions, while the zoning method of this invention can accurately reflect the time-varying characteristics of photovoltaic and wind power power fluctuations and the charging and discharging response speed of energy storage systems, making voltage control closer to actual operating conditions. This invention establishes dynamic response characteristic models of distributed resources such as photovoltaic, wind, and energy storage, accurately characterizing the intermittent and random characteristics of their output, and performs voltage zoning on the distribution network. Through zoning coordination, it achieves source-grid-load-storage coordinated voltage regulation, avoiding global contradictions caused by local regulation, effectively alleviating problems such as voltage exceeding limits and frequent fluctuations caused by high-penetration distributed generation (DG) access. Combined with the flexible adjustment of energy storage systems, it alleviates voltage exceeding limit problems, enhances the grid's ability to withstand distributed energy fluctuations, and improves the economy and reliability of grid operation.
[0024] This invention improves the CSO-OIF Elman model by filtering features (maximizing information content and minimizing redundancy), eliminating invalid features, reducing noise interference, and allowing the model to focus on core influencing factors, thus improving prediction accuracy. It also addresses the issue of poor stability caused by random parameter initialization. Ordinary neural networks (such as BP and Elman) often have randomly initialized weights / thresholds, making them prone to getting trapped in local optima. The improved CSO cat swarm algorithm in this invention provides optimal initial parameters for the OIF-Elman neural network through global optimization, avoiding local optima and making the model's prediction accuracy more stable across different training sets, thus solving the problem of prediction fluctuations caused by parameter sensitivity.
[0025] This solution addresses the problem of inaccurate trend prediction due to insufficient capture of temporal dynamics. Voltage fluctuations are temporally dynamic processes (such as voltage drops caused by sudden load changes and the chain reaction of DG output fluctuations). Ordinary BP networks lack temporal memory capabilities, and while LSTMs have memory, their complex structure and slow training make them problematic. The OIF-Elman layer can memorize the temporal characteristics of historical voltages. Combined with parameters optimized by the CSO algorithm, it can more accurately capture the "dynamic trends" of voltage changes (such as voltage correlations at consecutive moments), solving the problem of insufficient modeling of temporal correlations. Deep neural networks such as LSTMs have complex structures and require long training times (often several hours), making them unsuitable for the "real-time prediction" requirements of grid voltage. The OIF-Elman neural network has a simple structure, and combined with the rapid optimization of the CSO algorithm, its training efficiency is far superior to that of deep networks, solving the problems of slow training and difficulty in real-time application.
[0026] This invention categorizes multi-source data during data preprocessing, separating time-series data from multi-dimensional heterogeneous data (static / quasi-static data and discontinuous time-series data, etc.) that affect grid voltage fluctuations. Compared to other "direct fusion" models, this avoids feature "hedging" and information dilution, ensuring the "purity" and accuracy of core time-series patterns. When predictions are inaccurate, this invention can also promptly pinpoint whether the time-series model has failed (generally large residuals) or whether the external factor model has failed to capture key influences (such as new equipment failure modes). Root cause analysis is easier, the system's error correction capability is stronger, and it brings significant operational and maintenance value.
[0027] The core innovation of the "time-series main force + multi-source correction" serial multi-model conditional hybrid architecture established in this invention lies in the introduction of residual threshold filtering as an intelligent decision switch. It does not pursue complex inter-model weight learning, but instead establishes a clear set of logical rules: under normal circumstances, it trusts time-series patterns; under abnormal circumstances, it trusts multi-source comprehensive analysis. This makes model engineering more practical and provides better defense and switching capabilities against "black swan" events. Traditional model fusion (such as weighted averaging and stacking) typically uses static or trained fixed weights, assuming that the relative performance of each model is stable across all scenarios. However, in reality, the accuracy of Elman neural networks and XGBoost algorithms is scenario-dependent: Elman neural networks predict more accurately during stable periods, while XGBoost algorithms may predict more accurately during periods of rapid change. Fixed fusion strategies cannot adapt to such dynamic changes. The establishment of residual threshold filtering and switching mechanisms cleverly realizes dynamic weight allocation based on real-time performance, enabling the system to flexibly adapt to different operating conditions. Positioning the XGBoost model as a "corrector" essentially gives it the dual role of supervisor and backup executor. It continuously monitors the health of the main model (the improved CSO-OIF Elman model). When the residual exceeds a threshold, it means that the current scenario may have exceeded the range of experience learned by the improved CSO-OIF Elman model from historical data (i.e., encountering an "unknown pattern"). At this point, instead of perpetuating the erroneous predictions of the failed model, the system can intelligently switch to the XGBoost model, which is based on broader and more real-time multi-source data, to make decisions. This is equivalent to adding a backup engine based on real-time panoramic data to the core prediction engine that relies on historical experience, greatly improving the system's adaptability and predictive continuity when facing sudden, extreme, and unexperienced scenarios.
[0028] This invention fully utilizes the complementarity of multi-source data, capturing both the temporal dynamics of voltage under distributed generation (DG) access and the nonlinear correlation of multi-dimensional features. Compared with a single model, it can significantly improve voltage prediction accuracy, and is especially suitable for power grid scenarios with large output fluctuations of distributed generation and high dimensionality of multi-source data. Attached Figure Description
[0029] Figure 1 is a flowchart of a voltage prediction method for a distribution network under distributed aggregated resource access according to an embodiment of the present invention.
[0030] Figure 2 is a voltage prediction block diagram of an embodiment of the present invention.
[0031] Figure 3 is a block diagram of a voltage prediction system for a distribution network with distributed aggregated resource access according to an embodiment of the present invention. Detailed Implementation
[0032] To facilitate understanding of the technical solution of the present invention by those skilled in the art, the technical solution of the present invention will now be further described in conjunction with the accompanying drawings.
[0033] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0034] Please refer to Figures 1 and 2. The present invention provides a voltage prediction method for distribution networks under distributed aggregated resource access, including: S10, dividing the distribution network into zones based on the dynamic response of distributed power sources.
[0035] In one embodiment of the present invention, in order to solve the problem of source-load aggregation regulation in the distribution network, it is first necessary to model the dynamic response characteristics of distributed resources such as photovoltaic, wind power and energy storage.
[0036] The dynamic response characteristic model of photovoltaic power is as follows: In the formula, for Photovoltaic power at any given time Light intensity The area of the photovoltaic panel. This refers to the conversion efficiency of the photovoltaic panel.
[0037] The dynamic response characteristic model of wind power is as follows: In the formula, For wind power, This represents the power coefficient of the wind turbine. air density, For the area of the wind turbine, This refers to wind speed.
[0038] The dynamic response characteristic model of the power of the energy storage system is as follows: In the formula, For the power of the energy storage system, , These represent charge and discharge efficiencies, and This refers to the energy used for charging and discharging energy in an energy storage system.
[0039] These dynamic response characteristic models can be used to analyze the regulation capabilities of various resources under different environmental conditions and their relationship with load changes, thereby assessing their regulation potential in the power grid.
[0040] In this embodiment, the regulation potential in the distribution network is evaluated based on the dynamic response characteristic model, so that the distribution network is divided into several independent blocks by the minimum cut set method. Each block can independently perform voltage regulation and power control. When dividing the blocks, the goal is to minimize the voltage deviation.
[0041] The distribution network is initially divided into several independent blocks using the minimum cut set method, each capable of independent voltage regulation and power control. The electrical characteristic model of each block includes the power, load, and energy storage system status of the source-load aggregation block, aiming to achieve safe, stable, and efficient grid operation. The voltage regulation objective function for each block is: In the formula, In each block, the first The voltage of each node, The reference voltage is used. The objective function is designed to stabilize the grid voltage by minimizing voltage deviations through resource adjustments in each zone.
[0042] S20 involves classifying the multi-source data within the divided regions, including time-series data and multi-dimensional heterogeneous data.
[0043] In one embodiment of the present invention, during data preprocessing, multi-source data is classified. Historical voltage sequences, DG output (PV / wind power) time series, load time series, and bus power time series are used as input data for the improved CSO-OIF Elman model. Multi-dimensional heterogeneous data, including static / semi-static features, time-derived features, and cross-features, are used as input for the XGBoost model. Furthermore, outliers and missing values are removed from the input data to the improved CSO-OIF Elman model, and normalization is applied to map all data to the [0,1] or [-1,1] interval to avoid interference from data of different magnitudes on model training.
[0044] In this embodiment, static / semi-static features include preprocessed meteorological data (light intensity, temperature, etc.), grid constraints (node voltage limits, line capacity), and equipment status (energy storage SOC, photovoltaic panel efficiency), etc.
[0045] The time-series derived features include: voltage predictions, prediction residuals, statistical characteristics of DG output (such as mean, variance, and peak value), peak-to-valley load difference, and historical voltage statistical characteristics of the improved CSO-OIF Elman model.
[0046] Cross-features include interactions between time-series and static features. Essentially, they are new features generated by mathematical operations or feature combinations of "dynamically changing time-series features" (such as predicted photovoltaic output and load power) and "relatively stable static / semi-static features" (such as equipment parameters, grid constraints, and geographical attributes). The core purpose is to uncover the coupling relationship between "dynamic time-series changes" and "static constraints" (such as "differences in photovoltaic panel output with different efficiencies under high light intensity"), allowing the XGBoost model to more accurately capture the correlation patterns of multi-source data and improve the prediction accuracy after fusion.
[0047] S30 applies an improved CSO-OIF Elman model to time-series data to predict voltage fluctuations within the region in real time.
[0048] In one embodiment of the present invention, after the distribution network is initially partitioned, an improved CSO-OIFElman (Cat Swarm Optimization-OIF Elman Neural Network) model is used to predict voltage fluctuations in the distribution network in real time, and to predict trends such as transient voltage drops / voltage recovery caused by distributed power source access. Furthermore, since the OIF Elman neural network excels at capturing short-term dynamics and time-series dependencies, and the XGBoost algorithm excels at capturing nonlinear feature interactions and global patterns, a multi-source data fusion model is constructed using the XGBoost algorithm. The improved CSO-OIF Elman model is used to focus on accurate prediction of time-series data, while the XGBoost model is responsible for integrating multi-dimensional heterogeneous data (such as meteorological, grid constraints, and equipment status), and a "residual threshold filtering and switching mechanism" is established to form an intelligent switching logic: under normal operating conditions, the improved CSO-OIFElman model's time-series prediction is the primary method to maintain stability. When extreme weather or equipment failure causes residuals to exceed the limit, it is determined that the prediction of the improved CSO-OIF Elman model may fail. The system automatically switches to the multi-source data-driven mode of the XGBoost model to correct the residuals, avoid the propagation of anomalies, enhance the reliability of the prediction results, significantly improve robustness, and finally output a unified and high-precision prediction result.
[0049] Furthermore, since the predictive performance of the OIF Elman neural network is highly dependent on the selection of initial weights and thresholds, the traditional gradient descent method's random parameter initialization easily leads to model overfitting or local optima. The improved CSO algorithm, however, possesses advantages such as strong global search capability and simple parameter setting. It can obtain a set of optimal weights and thresholds through iterative optimization, which is then fed into the OIF Elman neural network for training, ultimately constructing a high-precision improved CSO-OIF Elman model for voltage prediction. Therefore, this invention proposes a solution combining the improved CSO cat swarm optimization algorithm with the OIF Elman neural network. By adjusting the neural network parameters through the CSO cat swarm optimization algorithm to guide the algorithm's convergence, the algorithm achieves better convergence and faster convergence speed.
[0050] In this embodiment, the core parameters (number of hidden layer nodes, learning rate, forgetting factor, feedback gain factor, and thresholds for each layer) of the OIF Elman neural network are optimized using an improved CSO algorithm. The model is then trained using preprocessed time-series core data to output preliminary time-series prediction results. The mathematical expression of the OIF Elman neural network model is as follows: In the formula, The input value is the preprocessed time series data. Representing the The next iteration step. , , , These are the connection weights from the input layer to the hidden layer, from the hidden layer to the output layer, from the first receiving layer to the hidden layer, and from the second receiving layer to the hidden layer. , , , These are the threshold values for the hidden layer, output layer, first receiving layer, and second receiving layer, respectively. It is the self-connection feedback gain factor of the second receiving layer. This is the self-connection feedback gain factor for the first receiving layer. The output state value of the hidden layer. This is the state value of layer 1. The output layer provides feedback on the state value of the receiving layer. The activation function for the hidden layer. The activation function for the output layer is , the activation function for the hidden layers is the sigmoid function, and the activation function for the output layer is a linear function. Output the target.
[0051] In this embodiment, due to the access of a large number of distributed generation (DG) devices, the power flow of the distribution network will change significantly, and the solution space of its voltage regulation strategy will become more complex. In the traditional CSO algorithm, there are two modes: search mode and tracking mode. The search mode corresponds to the local search in the optimization problem, and has four key parameters: the search pool (SMP, used to store copies of the cat's own position); the search dimension range ratio (SRD, which determines the probability of mutation in the selected mutation dimension); the dimension change amount (CDC); and the self-position determination (SPC, which determines whether a cat will move to this position in the next time step). Its mathematical expression is as follows: ;in, The probability of a cat being selected. To track fitness in the pattern, To achieve the optimal fitness in the tracking pattern, To maximize fitness, This represents the minimum fitness value. It should be noted that in the CSO algorithm, a single cat is used as a weight and threshold combination in the OIF Elman neural network; multiple initial weight and threshold combinations form a cat population.
[0052] The tracking pattern corresponds to the global search in optimization problems. The mathematical expression for the tracking pattern is: In the formula, For the first The fitness function value is optimal for each cat, and each cat represents a set of weights and thresholds of an OIF Elman neural network. For the first Only cat in the first Wei, Di Fitness of the next iteration For the first Only cat in the first Wei, Di The current speed in the next iteration. For the first Only cat in the first Wei, Di The speed of the next iteration As a constant, As a variable, its value range is typically [0,1]. , These refer to the previous and next sessions in terms of speed.
[0053] In this embodiment, the tracking mode corresponds to a global search, and according to the proportional relationship associativity (MR), the number of cats executing the tracking mode accounts for the majority of the total cat population. Because the speed update formula itself has limitations, if all cats executing the tracking mode cannot find the global optimum within their respective regions, the algorithm can easily get trapped in local optima. The inherent characteristics of the tracking mode reduce the diversity of the cat population; as iterations increase, the cat population gradually becomes more concentrated, and diversity cannot be fundamentally guaranteed. Therefore, this invention proposes a CSO algorithm based on periodic vibration, the specific principle of which is as follows: In the formula, The amplitude value is defined by the user; in this algorithm, it is defined as the amplitude value of the first position in the current cycle. Let T be the number of periods. for function, This is the parity flag; it is set to 0 when the period is odd and to 1 when the period is even. The period of the sine function is given. Regarding the improvements to the CSO algorithm described above, its optimization performance remains significantly enhanced with increasing dimensionality, and the diversity of the cat population further highlights its advantages, making it less prone to getting trapped in local optima and increasing the likelihood of finding the global optimum. Furthermore, changes in population size have a relatively small impact on this improved algorithm, as it provides sufficient population diversity, requiring a smaller population size and less computation time, thus maintaining its advantage even with a small population.
[0054] In this embodiment, the position vector of a "cat" in the CSO algorithm is mapped to the weights and thresholds of the OIF Elman neural network. The cat swarm is divided into search mode (global exploration) and tracking mode (local fine-grained search) based on the proportional relationship and the ratio of the MR (Mean Differential) to the search mode. Through the search mode, the power grid parameters are continuously adjusted to avoid local optima. The search mode simulates the cat's prey-tracking behavior, moving closer to the current optimal solution and improving convergence speed. The OIF Elman neural network parameters are optimized by improving the cat swarm algorithm to determine the optimal initial weights and thresholds. Based on the actual needs of the distribution network, the MR is adaptively adjusted to determine the proportion of "cats" in the swarm allocated to the two modes in each iteration. In the early stages of iteration, the MR is set relatively small, with "searching" as the primary task. Multiple replicas are created to explore the space around the current position, avoiding getting trapped in local optima. As the number of iterations increases, the MR (Mean Ratio) increases, and "tracking" becomes the primary task. Once the search mode roughly determines the weight range of the OIF Elman neural network, the tracking mode fine-tunes the network parameters and performs a refined search on the known high-quality solution region. This avoids blind random searching in the neural network parameter space, significantly reducing the number of iterations required to reach a satisfactory solution and achieving rapid convergence of the algorithm. The combination and balance of the two modes in the improved CSO algorithm prevents the algorithm from diverging due to overexploration in the early stages of optimization or stagnating due to lack of development in the later stages.
[0055] In this embodiment, the parameter combination of the OIF Elman neural network is optimized using the CSO algorithm until the fitness function of the OIF Elman neural network is minimized, thus determining the optimal weight and threshold combination. Furthermore, the fitness function of the OIF Elman neural network is set to mean absolute error (AAE) and accuracy (Ac).
[0056] The mean absolute error and accuracy are expressed using the following formulas: In the formula, To predict the number of samples, The target output value is the output of the OIF Elman neural network. This is the actual output value.
[0057] In this embodiment, an optimized neural network is used to predict the voltage of the distribution network. The optimized weights and thresholds are assigned to the OIF Elman neural network. The preprocessed dataset is divided into a training set and a test set, and the model is trained using the training set. During training, the network adjusts parameters through feedback from the relay layer. Training stops if the training error reaches a preset threshold or the maximum number of iterations is reached. The input features from the test set are then fed into the trained model to obtain a preliminary prediction of the grid voltage.
[0058] S40. Establish a residual threshold filtering and switching mechanism. When the prediction residual of the improved CSO-OIF Elman model exceeds the standard, switch to the voltage fluctuation prediction result of the XGBoost model driven by multi-dimensional heterogeneous data.
[0059] In one embodiment of the present invention, the XGBoost model is initialized with parameters and then trained and tuned. Parameters can be optimized on the validation set using grid search / Bayesian optimization, with the objective function being to minimize the predicted accuracy (AAE) of the XGBoost model. The XGBoost algorithm is a type of Boosting algorithm in ensemble learning. Each decision tree learns the residual between the predicted and true values of the previous tree and combines their predictions additively to form the final prediction output. By fitting the residuals of the previous decision trees, the prediction error is gradually reduced. The core optimization objective of the XGBoost model integrates the loss function and the regularization term; the expression for the objective function is: In the formula, The total number of samples, The maximum number of iterations, Represents the loss function. It is the first The true value of each sample It is the first The predicted value for each sample, Indicates generation The predicted value for the number of trees, Ω ( The regularization term can adjust the complexity of the model, minimize structural risk, and effectively avoid overfitting.
[0060] Among them, regular terms Expressed using the following formula: In the formula, , These are hyperparameters used to control the severity of the penalty. The number of leaf nodes. The weights of the leaf nodes are used. The loss function is optimized using a second-order approximation, expanding the loss function in the objective function into a second-order Taylor form to obtain the optimal objective function. : In the formula, The optimal weight for the leaf node is... This represents the accumulation of the first derivatives of the loss function. This represents the sum of the second derivatives of the loss function.
[0061] In this embodiment, within the fusion framework of "residual threshold filtering and switching mechanism," the input of the XGBoost model needs to be designed to compensate for and improve the shortcomings of the CSO-OIF Elman model. The core is to integrate "multi-dimensional heterogeneous features affecting grid voltage" (not simply time-series data), and to adapt to the feature differences between "normal / abnormal operating conditions" (enhancing key features under abnormal operating conditions). Under abnormal operating conditions, the feature input of the XGBoost model consists of static / semi-static features, time-derived features, and cross-features.
[0062] In this embodiment, a residual threshold filtering and switching mechanism is established. Under normal operating conditions, the improved CSO-OIF Elman model is primarily used for prediction to maintain stability. When extreme weather or equipment failure causes the residuals of the improved CSO-OIF Elman model to exceed the limit, the system automatically switches to the multi-source data-driven mode of the XGBoost model to avoid anomaly propagation, significantly improve robustness, and realize intelligent switching logic. The following formula is the definition of residual: ;in, To improve the predicted values output by the CSO-OIF Elman model, For the observed true value, The residuals are used as the initial threshold. The specific steps are as follows, taking a residual threshold of 5% as an example: Statistically analyze the residual distribution of the improved CSO-OIF Elman model output over N historical days (e.g., 30 days), and take the 95th quantile of the residuals as the initial residual threshold. (Covering 95% of normal operating conditions and 5% of abnormal operating conditions), enabling the calculation of basic thresholds. Secondly, the residual thresholds are dynamically calibrated, and the 95th percentile of the residuals is recalculated according to a time sliding window (which can be set to 7 days). Voltage rating normalization is introduced to avoid incomparability of thresholds for different voltage levels. The residual thresholds are updated to adapt to seasonal or time-of-day changes in new energy output and load.
[0063] In the formula, The updated residual threshold, The initial residual threshold, This is the rated voltage. For correction factors, correction factors Determined by data such as scene physical characteristics, engineering standards, real-time operating conditions and historical data statistics, the false / false alarm rate can be adjusted through feedback loop and machine learning optimization to dynamically match real-time operation requirements.
[0064] In the forecasting process, residuals are calculated in real time and operating conditions are determined. The actual voltage value at any given time , thus calculate ,Right now The residual of time; if If so, it is considered normal operating condition. This is considered an abnormal operating condition.
[0065] In this embodiment, a hysteresis mechanism is introduced to prevent the prediction process from repeatedly switching modes. First, a hysteresis window is set. (For example, if set to 3 time steps, each time step is 15 minutes), the length of the hysteresis window should be combined with the characteristics of the power grid data, operating conditions, and model performance objectives. It is important to ensure that it does not exceed the time-series inertia period of the prediction model and matches the actual data transmission and computation delays. When there is a continuous hysteresis window... If the time-series residual exceeds the residual threshold, a switch is triggered, switching to the multi-dimensional heterogeneous data-driven mode of the XGBoost model. This applies to continuous hysteresis windows. Only when the time-series residuals are below the residual threshold can the time-series dominant mode be restored, that is, the prediction mode using the improved CSO-OIF Elman model be restored.
[0066] And, hysteresis window The specific method for setting the time length is as follows: Extract the residual sequences of "real abnormal operating conditions" and "noise disturbances" from historical data, statistically analyze the duration distribution of residuals exceeding the residual threshold under both scenarios, and set the window based on the maximum duration of noise disturbances. For example, if 99% of noise disturbance residuals exceed the standard by no more than 2 time steps, setting the window to 3 time steps can filter out almost all noise. It should be explained that the residuals caused by both "abnormal operating conditions" and "noise disturbances" may exceed the residual threshold, but their durations are different. "Noise disturbances" are temporary and short-lived fluctuations (such as data transmission fluctuations or accidental measurement errors), with a short duration. However, "real abnormal operating conditions" are actual anomalies in the power grid, with a longer duration. The purpose is to only trigger the switching mode of real anomalies, while preventing noise disturbances from triggering them.
[0067] In one embodiment of the present invention, multi-source data fusion is achieved through the deployment of the aforementioned hybrid models (improved CSO-OIF Elman model and XGBoost model). The core objective of model integration deployment is to transfer the trained dual models and residual switching logic from the offline training environment to the industrial-grade operating environment, achieving end-to-end capabilities of "real-time data input → automatic mode determination → voltage prediction output," while simultaneously meeting the real-time, stability, and maintainability requirements of power grid scenarios.
[0068] In one embodiment of the present invention, 1) a distributed architecture based on the power grid dispatching system is implemented, and operating environments are constructed at the edge (local substation) and the cloud (dispatch center): the edge adopts a lightweight computing framework and a cross-platform inference engine to meet the requirements of low-latency localized operation. The cloud uses containerization technology to achieve elastic expansion of model services, while completing consistency verification of environment dependencies to ensure the computing power and compatibility of hybrid model inference. Standardization of interfaces is ensured, defining a unified input (timestamp, time series / heterogeneous features, historical residuals) and output (predicted voltage, operating mode, residuals, confidence level) format to adapt to power grid data interaction specifications.
[0069] 2) Lightweighting is performed on the trained improved CSO-OIF Elman and XGBoost models. The model complexity is reduced through weight quantization and structural pruning, and then it is converted into a cross-platform compatible standardized format to achieve lossless transfer of the model from the training environment to the deployment environment. At the same time, the input and output feature dimensions and normalized parameters are fixed to ensure the consistency of the inference process.
[0070] 3) The inference logic is encapsulated into HTTP / HTTPS interfaces, including prediction and health check interfaces, supporting calls from the power grid system, thus achieving interface encapsulation. In terms of environment deployment, the edge devices are configured with an auto-start service via systemd, bound to an internal network IP. A Docker image is built in the cloud, and a Kubernetes cluster is used for load balancing. Through joint debugging tests, the operational stability under normal and abnormal conditions is verified, the fault tolerance and degradation mechanism is tested, and it is ensured that the interface response conforms to the specifications.
[0071] 4) Real-time logging of prediction modes, residuals, and latency; monitoring switching frequency and inference time; setting warnings to trigger when thresholds are exceeded. Regarding model updates, ensure regular offline retraining of the model, lightweighting before updating the online model, and adaptively adjusting residual thresholds. Use TensorRT to accelerate inference at the edge, and enable multi-threading in the cloud to dynamically adjust the number of service processes to adapt to peak and off-peak demand.
[0072] Please refer to Figure 3. The present invention also provides a system for voltage prediction of distribution networks under the above-described method for distributed aggregated resource access, comprising: a partitioning module for partitioning the distribution network based on the dynamic response of distributed power sources.
[0073] The classification module is used to classify multi-source data into different regions, including time-series data and multi-dimensional heterogeneous data.
[0074] The time series prediction module is used to apply the improved CSO-OIF Elman model to time series data to make real-time predictions of voltage fluctuations within the region.
[0075] The switching and multidimensional prediction module is used to establish a residual threshold filtering and switching mechanism. When the prediction residual of the improved CSO-OIF Elman model exceeds the limit, it switches to the voltage fluctuation prediction result based on the XGBoost model driven by multidimensional heterogeneous data.
[0076] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention, and no reference numerals in the claims should be construed as limiting the scope of the claims.
[0077] The above embodiments are merely examples of implementation methods of the invention. The scope of protection of the present invention is not limited to the above embodiments. For those skilled in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention.
Claims
1. A voltage prediction method applicable to distribution networks with distributed aggregated resource access, characterized in that, include: Based on the dynamic response of distributed power sources, the distribution network is divided into zones; After dividing the region, the multi-source data is classified, including time-series data and multi-dimensional heterogeneous data; An improved CSO-OIF Elman model is applied to time-series data to predict voltage fluctuations in the region in real time. Establish a residual threshold filtering and switching mechanism. When the prediction residual of the improved CSO-OIF Elman model exceeds the standard, switch to the voltage fluctuation prediction result of the XGBoost model driven by multi-dimensional heterogeneous data.
2. The voltage prediction method for distribution networks under distributed aggregated resource access as described in claim 1, characterized in that, Time-series data includes historical voltage sequences, distributed generation (DG) output time series, load time series, and bus power time series; multi-dimensional heterogeneous data includes static / semi-static features, time-series derived features, and cross-features; among them, static / semi-static features include meteorological data, grid constraints, and equipment status; time-series derived features include voltage fluctuation predictions and prediction residuals output from the improved CSO-OIF Elman model, as well as statistical features of DG output, peak-valley load differences, and historical voltage statistical features; cross-features are features that characterize the coupling relationship between time-series data and static / semi-static features.
3. The voltage prediction method for distribution networks with distributed aggregated resource access as described in claim 1, characterized in that, The improved CSO-OIF Elman model is as follows: the position vector of the "cat" in the improved CSO algorithm is mapped to the weights and thresholds of the OIF Elman neural network; and the cat group is divided into a global exploration search mode and a local fine search tracking mode according to the proportional relationship combination rate. The search is iterated by switching between the two modes until the fitness function of the OIF Elman neural network is minimized, and the optimal combination of weights and thresholds is determined.
4. The voltage prediction method for distribution networks with distributed aggregated resource access according to claim 3, characterized in that, The global exploration search mode is represented by the following formula: In the formula, For the first The fitness function value is optimal for each cat, and each cat represents a set of weights and thresholds of an OIF Elman neural network. For the first Only cat in the first Wei, Di Fitness of the next iteration For the first Only cat in the first Wei, Di The current speed in the next iteration. For the first Only cat in the first Wei, Di The speed of each iteration As a constant, For a variable, 、 These represent the upper and lower bounds of the velocity, respectively; the tracking mode of local fine-tuning search is expressed by the following formula: ;in, The probability of a cat being selected. To track fitness in the pattern, To achieve the optimal fitness in the tracking pattern, To maximize fitness, This represents the minimum fitness value.
5. The voltage prediction method for distribution networks under distributed aggregated resource access as described in claim 4, characterized in that, The global exploration search mode employs a periodic vibration-based selection method to determine the first... Only cat in the first Wei, Di Fitness of the next iteration: In the formula, For user-defined amplitude values, Let T be the number of periods. for function, This is the parity flag. The period is the period of the sine function.
6. The voltage prediction method for distribution networks under distributed aggregated resource access as described in claim 1, characterized in that, The residual threshold filtering and switching mechanism includes: statistically analyzing the residual distribution of the CSO-OIF Elman model output over N days to improve its accuracy, and using the 95th quantile of the residuals as the initial residual threshold. Secondly, the residual threshold is dynamically calibrated, the 95th percentile of the residual is recalculated according to the time sliding window, and voltage rating normalization is introduced to update the residual threshold and adapt to the seasonal or time-period changes in new energy output and load.
7. The voltage prediction method for distribution networks under distributed aggregated resource access as described in claim 6, characterized in that, The updated residual threshold is expressed by the following formula: In the formula, The updated residual threshold, The initial residual threshold, This is the rated voltage. This is a correction factor.
8. The voltage prediction method for distribution networks under distributed aggregated resource access as described in claim 5, characterized in that, The residual threshold filtering and switching mechanism includes a hysteresis mechanism: first, a hysteresis window is set. When continuous hysteresis window If the time-series residual exceeds the residual threshold, a switch is triggered, switching to the multi-dimensional heterogeneous data-driven mode of the XGBoost model; when the continuous hysteresis window... Only when the time residual is below the residual threshold can the time-series dominant mode be restored.
9. The voltage prediction method for distribution networks under distributed aggregated resource access as described in claim 8, characterized in that, Hysteresis window The specific method for setting the time length is as follows: extract the residual sequences of "real abnormal working conditions" and "noise disturbances" from historical data; statistically analyze the duration distribution of residuals exceeding the residual threshold under the two scenarios; and set the window based on the maximum duration of noise disturbances.
10. A system for voltage prediction in a distribution network under distributed aggregated resource access according to any one of claims 1-9, characterized in that, include: The partitioning module is used to partition the distribution network based on the dynamic response of distributed power sources. The classification module is used to classify multi-source data into different regions, including time-series data and multi-dimensional heterogeneous data. The time series prediction module is used to apply the improved CSO-OIF Elman model to time series data to make real-time predictions of voltage fluctuations in the region; the switching and multidimensional prediction module is used to establish a residual threshold filtering and switching mechanism. When the prediction residual of the improved CSO-OIF Elman model exceeds the limit, it switches to the voltage fluctuation prediction results of the XGBoost model driven by multidimensional heterogeneous data.