Electric energy quality early warning threshold calculation method and device
By using multi-source heterogeneous data to predict load and employing a hybrid evolutionary optimization method, the adaptive and multi-index comprehensive problems of the power quality management system were solved. This enabled dynamic adjustment and economic optimization of the power quality early warning threshold, thereby improving the accuracy and robustness of the early warning system.
Patent Information
- Application Number
- CN202511754031.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-02-06
AI Technical Summary
Existing power quality management systems lack adaptability and cannot adjust according to the dynamic changes in actual power load on the user side, resulting in decreased accuracy of early warnings. Furthermore, they fail to comprehensively consider the importance and economic costs of multiple power quality indicators, and optimization methods are prone to getting trapped in local optima.
A load forecasting and hybrid evolutionary optimization method based on multi-source heterogeneous data is adopted. The future load is predicted by an adaptive integrated prediction model of multi-source correlation features. The subjective weighting method and the objective weighting method are combined for weighting. The early warning threshold is optimized by an adaptive cooperative growth-local perturbation hybrid evolutionary algorithm with the goal of minimizing the adjustment cost.
It enables dynamic adaptive adjustment of power quality early warning thresholds, improves the accuracy and economy of early warning, avoids false alarms and missed alarms, ensures global optimization and robustness, and enhances the intelligence and systematization of power quality management.
Smart Images

Figure CN121484907A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power systems, in particular to a dynamic calculation method and device for power quality early warning threshold. BACKGROUND
[0002] Power quality is an important indicator to measure the quality of power supply. With the large-scale access of distributed energy and various sensitive loads, it is crucial to manage power quality in a fine-grained manner.
[0003] In the prior art, the power quality management system usually adopts a fixed threshold early warning mechanism, that is, a set of static early warning limits are set according to national or industry standards. However, this method has the defect of lacking adaptability, and cannot be adjusted according to the dynamic changes of actual power consumption load on the user side, resulting in a decrease in the accuracy of early warning during load peak or trough periods, and easy to produce false alarm or miss report. In addition, the existing method usually considers each power quality indicator in isolation, such as voltage deviation, harmonic distortion, etc., without considering the importance difference of different indicators to the user and the economic cost required to take adjustment measures, resulting in a relatively conservative adjustment strategy and unnecessary economic waste.
[0004] To solve the above-mentioned problems, some technical solutions propose to combine subjective weighting method and objective weighting method to comprehensively evaluate multiple power quality indicators, so as to obtain a more scientific evaluation result. However, this kind of method mainly focuses on "post-evaluation" of power quality, and the result still lacks foresight and does not take into account the future load change trend and economic cost of adjustment measures, so it cannot dynamically and prospectively generate threshold for "early warning". At the same time, although some researches have tried to introduce time series prediction network for trend prediction, or use genetic algorithm for parameter optimization, these methods often have problems such as insufficient model generalization ability, not deeply combined with economic cost, and easy to fall into local optimal solution, etc., and it is difficult to form a dynamic threshold decision scheme that takes into account prediction, economy and global optimality. SUMMARY
[0005] The purpose of the present application is to provide a power quality early warning threshold calculation method and device based on load prediction and hybrid evolutionary optimization, aiming to solve the problems in the prior art that the power quality early warning threshold is set statically, lacks adaptability, does not comprehensively consider the importance of multiple indicators and economic cost, and the optimization method is easy to fall into local optimum.
[0006] In order to achieve the above-mentioned purpose, the present application provides the following technical solutions: In a first aspect, the embodiments of the present application provide a power quality early warning threshold calculation method, which comprises: based on multi-source heterogeneous data, using a first preset prediction model to predict the future load of the user side to obtain a predicted load result; based on a subjective weighting method and an objective weighting method, combining the weights of a plurality of power quality indicators to obtain the combined weights of each indicator; based on the predicted load result and the combined weights, using a second preset intelligent optimization algorithm to solve a preset optimization model with the minimum adjustment cost as the target to obtain the early warning threshold of the plurality of power quality indicators.
[0007] Optionally, the first preset prediction model is a multi-source associated feature adaptive integrated prediction model; and the step of predicting the future load of the user side using the first preset prediction model specifically comprises: fusing and collecting the multi-source heterogeneous data through a multi-source feature fusion acquisition module; realizing information interaction and coupling of different feature sources through a deep interaction memory unit; and making integrated decisions on the prediction result through an adaptive integrated decision layer to obtain the predicted load result.
[0008] Optionally, the deep interaction memory unit realizes information interaction and coupling of different feature sources at the same time through setting an interaction door.
[0009] Optionally, the subjective weighting method is an analytic hierarchy process method, and the objective weighting method is an entropy weighting method; and the subjective weight obtained through the analytic hierarchy process method and the objective weight obtained through the entropy weighting method are fused through a weighted average method or a product normalization method to form the combined weight.
[0010] Optionally, the second preset intelligent optimization algorithm is an adaptive collaborative growth-local perturbation hybrid evolutionary algorithm.
[0011] Optionally, the adaptive collaborative growth-local perturbation hybrid evolutionary algorithm comprises: performing local adaptive perturbation to exert non-Gaussian, non-uniformly distributed random micro-perturbation on the current optimal and sub-optimal individuals; and performing dynamic adaptation and memory to introduce a historical optimal solution cluster memory pool to record elite solutions and exclude mediocre solutions.
[0012] Optionally, the constraint conditions set by the preset optimization model include that the early warning thresholds of the plurality of power quality indicators are within the national standard limits, and the total power of the user side after adjustment does not exceed the maximum bearing power thereof.
[0013] In a second aspect, the embodiments of the present application also provide an electric energy quality early warning threshold calculation device, which corresponds to the above method and comprises: a load prediction module configured to predict future load at a user side based on multi-source heterogeneous data by using a first preset prediction model to obtain a predicted load result; a combined weighting module configured to combine and weight a plurality of electric energy quality indexes based on a subjective weighting method and an objective weighting method to obtain combined weights of each index; and an optimization solving module configured to solve a preset optimization model with the minimum adjustment cost as the target by using a second preset intelligent optimization algorithm based on the predicted load result and the combined weights to obtain early warning thresholds of the plurality of electric energy quality indexes.
[0014] Optionally, the first preset prediction model is a multi-source correlation feature adaptive integrated prediction model.
[0015] Optionally, the second preset intelligent optimization algorithm is an adaptive co-evolution-local perturbation hybrid evolutionary algorithm.
[0016] Compared with the prior art, the present application has the following beneficial effects: By introducing the prediction of future load, the early warning threshold can be dynamically adjusted, overcoming the hysteresis of the static threshold in the prior art, and being able to adaptively adjust according to the actual power load change at the user side, thereby significantly improving the accuracy of early warning and effectively reducing false positives and false negatives. At the same time, the present application takes the adjustment cost as the optimization target and combines the dynamic combined weights of each index, so as to solve the combination of early warning thresholds with the lowest economic cost under the premise of ensuring that the electric energy quality meets the standard and the power supply safety, realizing the collaborative optimization of economy and safety. In addition, by using the preferred adaptive co-evolution-local perturbation hybrid evolutionary algorithm, the unique global exploration, local perturbation and dynamic memory mechanism can effectively avoid falling into a local optimal solution in the solving process, ensuring the globality of the optimization result and improving the robustness of the algorithm under complex working conditions. Finally, the present application organically integrates the three links of load prediction, combined weighting and optimization solving into a closed-loop intelligent decision-making process, realizes systematic collaborative optimization driven by data, and comprehensively improves the intelligent, refined and systematic level of electric energy quality management. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application. In addition, these drawings and the text description are not intended to restrict the scope of the concept of the present application in any way by means of the particular embodiments described, but to illustrate the concept of the present application for a person skilled in the art.
[0018] Figure 1A system architecture schematic diagram of a power quality early warning threshold calculation method provided in an embodiment of the present application is provided. Figure 2 A flowchart of a power quality early warning threshold calculation method provided in an embodiment of the present application is provided. Figure 3 A structure schematic diagram of a multi-source correlation feature adaptive ensemble prediction model (MCAE) in an embodiment of the present application is provided. Figure 4 A flowchart of an adaptive co-evolutionary growth-local perturbation hybrid evolutionary algorithm (ACGLEA) in an embodiment of the present application is provided. Figure 5 A comparison chart of load prediction results and actual loads in an embodiment of the present application is provided. Figure 6 A convergence curve chart of total cost of an optimization process in an embodiment of the present application is provided. Figure 7 A convergence curve chart of each power quality index threshold in an embodiment of the present application is provided. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
[0020] Embodiment 1 The present embodiment provides a power quality early warning threshold calculation method and device based on load prediction and hybrid evolutionary optimization. Specifically, the scheme aims to dynamically generate a set of optimal power quality early warning thresholds by accurately predicting future loads, scientifically evaluating the importance of multiple power quality indicators, and globally optimizing the adjustment cost, so as to maximize economic benefits under the premise of ensuring power supply safety.
[0021] Reference Figure 1Fig. 1 shows a system architecture of a power quality early warning threshold calculation method provided by an embodiment of the present application. Physically, the system can be deployed on one or more servers, industrial computers or embedded devices, and its core functions are realized by software programs. In terms of logical architecture, the system can be divided into a data input layer, a model calculation layer and a result output layer. The data input layer is responsible for providing multi-source heterogeneous data required for calculation, such as historical load data, power quality monitoring data, weather data, user behavior characteristic data, etc. from power dispatch automation systems, user power consumption information collection systems, weather information service systems, etc. The model calculation layer, as the core of the system, includes three function modules that cooperate with each other, i.e. a load prediction module 10, a combination weighting module 20 and a threshold optimization module 30. The result output layer is responsible for presenting or issuing the optimal early warning threshold combination calculated by the threshold optimization module 30.
[0022] Specifically, the multi-source heterogeneous data provided by the data input layer flow into the load prediction module 10 and the combination weighting module 20 respectively. The load prediction module 10 uses historical load, weather, etc. data related to load changes to predict the load curve of a user side in a future period of time (e.g. 24 hours in the future) using a first preset prediction model, and outputs a predicted load result. The combination weighting module 20 uses a subjective and objective combined weighting method to comprehensively weight a plurality of power quality indexes (e.g. voltage deviation, harmonic distortion rate, three-phase unbalance degree, etc.) that need to be warned based on historical power quality data and domain expert knowledge, to obtain the combination weight of each index under the current working condition. Correspondingly, the predicted load result output by the load prediction module 10 and the combination weight output by the combination weighting module 20 are jointly used as the input of the threshold optimization module 30. The threshold optimization module 30 internally constructs a preset optimization model with the objective of minimizing the adjustment cost, and uses a second preset intelligent optimization algorithm to solve the model, finally calculates the optimal early warning threshold combination that can balance safety and economy, and outputs it through the result output layer.
[0023] The specific flow of the method provided by the embodiment will be described in more detail below. Figure 2 The method can be executed by the processor of the system described above, and specifically includes the following steps: Step S100: data collection and preprocessing. This step provides a data basis for subsequent processing. In this embodiment, the multi-source heterogeneous data of a certain industrial park in the past year are collected, including but not limited to: 1) historical load data, such as active power and reactive power data of every 15-minute sampling point, which can be obtained from the power monitoring system of the park substation; 2) Weather data, including temperature, humidity, wind speed, light intensity, etc., which are closely related to power consumption, can be obtained from public weather data interfaces or self-built weather stations; 3) User behavior feature data, such as workday / holiday identification, production planning, electricity price policy, etc., which helps the model understand the periodicity and suddenness of the load; 4) Historical power quality data, including continuous monitoring records of indicators that need to be warned, such as voltage deviation, total harmonic distortion rate, voltage fluctuation and flicker, frequency deviation, etc.
[0024] After data collection, preprocessing is required, which can include: Data cleaning, filling missing values in the data (e.g., using the mean of the previous and subsequent values or Lagrange interpolation method), and identifying and correcting outliers (e.g., using the 3-sigma principle or boxplot method); Data normalization, to eliminate the influence of different data source dimensions and accelerate the convergence of subsequent model training, the minimum-maximum normalization method can be used to scale all numerical features to the [0, 1] interval; And feature engineering, according to business requirements to build new features, such as extracting periodic features from timestamps, such as hours, days of the week, months, or calculating moving averages, growth rates, and other trend features of the load. After preprocessing, a high-quality, uniformly formatted dataset is obtained, providing support for subsequent steps.
[0025] Step S200: Load prediction. This step is used to provide forward-looking load change information for threshold optimization. As an optional implementation, the first preset prediction model in this embodiment can use a multi-source correlation adaptive ensemble prediction model (Multi-source Correlation Adaptive Ensemble, MCAE). Referring to Figure 3 which shows the internal structure of the model, and its execution process is as follows: First, the multi-source heterogeneous data (such as historical load, weather data, etc.) preprocessed in step S100 is input through multi-source feature input 110 into different feature processing channels in the correlation analysis model. The analysis model is essentially a feature selection network based on attention mechanism, and its mathematical expression is:
[0026] Where, is the dynamic correlation weight of the ith feature at time t to the prediction target, can be designed as dot product, mutual information or other nonlinear correlation score function, is the ith source feature vector, The algorithm targets the workload. By calculating dynamic correlation scores for all feature sources, it automatically filters and sorts the most predictive input information channels at each time step, laying a solid foundation for subsequent deep interaction.
[0027] Subsequently, the multidimensional feature flow is fed into the core component of the model, namely the deep interactive memory unit 120, which aims to capture the complex nonlinear coupling relationships between different data sources. Unlike standard units such as RNN and LSTM, the deep interactive memory unit 120 introduces a cross-source bidirectional intent flow mechanism, meaning that information can travel in the time dimension and jump across sources in the feature space. Specifically, the deep interactive memory unit 120 sets an interaction gate 121 to realize the nonlinear interaction of lateral information and weight assignment between different feature sources at the same time, thereby expressing more complex human-machine-environment coupling effects.
[0028] For example, when processing data at time t, the hidden states from the load feature channel and the meteorological feature channel can exchange information through an interaction gate 121. The interaction gate 121 can be designed as a neural network consisting of a fully connected layer and an activation function (such as the sigmoid function). It dynamically generates an interaction weight between 0 and 1 based on the two input features, controlling the fusion ratio of the two feature streams. This mechanism enables the model to learn complex correlation patterns such as "under high-temperature weather, the historical load growth trend will have a greater impact on future loads," thereby significantly improving prediction accuracy.
[0029] Traditional temporal modeling approaches are limited to "information sliding over time," but in multi-source heterogeneous feature scenarios, the interaction and coupling between lateral features play equally important roles. To address this, MCAE proposes a cross-source bidirectional intent transfer mechanism: on the one hand, traditional time step transitions are implemented by gating units (such as GRU / LSTM) to achieve a "vertical" information flow of memory states over time; on the other hand, the protocol incorporates the "lateral" information flow between different source features into the modeling framework, meaning that at each time step, each feature dimension can aggregate, diffuse, and redistribute information through specific interaction gates. This mechanism can be mathematically abstracted as follows:
[0030] in, This represents the current hidden state of the DI-Memory Block. Represents the activation function (ReLU). and These are the weight matrices for the input and memory units, respectively.
[0031] denotes the interaction gate operation between different feature sources at the same time, is a dynamically learnable interaction weight matrix.
[0032] Here, a multi-head attention or gating mechanism can be further introduced to deal with information redundancy and interaction complexity in high-dimensional feature space. For example, after introducing a multi-head hierarchical gating mechanism, the interaction is:
[0033] wherein is the number of gating layers, and are the interaction weight and feature input of the first head, respectively.
[0034] This design can effectively capture the time-varying coupling effect under the complex human-machine-environment multi-drive force, providing more abundant representation ability for downstream prediction tasks.
[0035] Inside the deep interaction memory unit 120, in addition to realizing the above information flow, a feature cross-time sequence adaptive normalization and residual modulation mechanism can be introduced to prevent the model from having problems such as gradient disappearance and overfitting on long-term sequences. The specific approach is to perform layer normalization on the current hidden state after each step update, and introduce a short-circuit residual connection:
[0036] wherein, is a layer normalization operation, is a learnable residual weight, is the mean of the current batch.
[0037] This measure improves the numerical stability and generalization ability of the model, and can also maintain a sharp response to the load trajectory under high-frequency disturbance or sudden scenarios.
[0038] After processing by the deep interaction memory unit 120, the features carrying rich interaction information are sent to the adaptive integrated decision layer 130. The decision layer can include multiple parallel prediction sub-networks, each of which predicts the future load from a different perspective. The role of the adaptive integrated decision layer 130 is to dynamically assign weights to the outputs of these sub-networks and perform weighted summation to obtain the final predicted load output 140.
[0039] The prediction output is not a single model value, but the output of several memory units of different "feature source flows", which are then dynamically weighted to solve the final load prediction result (e.g., a Bayesian learnable ensemble model). The integrated weight can be modified online by real-time error feedback, making the overall result more robust and significantly enhancing the ability to resist abnormalities.
[0040] Let the kth source stream sub-model prediction output be The overall integrated weight is The final prediction result is:
[0041] The overall integrated weight is not static, and the model can be corrected in real time according to the characteristics of the input data through Bayesian posterior estimation or online EM (expectation maximization) algorithm, that is, automatically determine which sub-network prediction result is more reliable under the current situation (the smaller the prediction error of the sub-model, the more reliable it is), and thus give it a higher weight. This integration strategy enhances the robustness and generalization ability of the entire prediction model.
[0042] In addition, the MCAE algorithm also has online learning ability. The online learning mechanism not only allows new features and sudden event information (such as policy adjustments such as epidemic situation and power restriction order) outside the historical window to be injected in real time, but also realizes the continuous self-evolution of the model through the sliding window retraining strategy and weight self-feedback mechanism. The sliding window is set to a length of W, and as soon as a new batch of data is obtained
[0043] From the overall process perspective, the core advantages of the MCAE algorithm are reflected in the following aspects. First, the multi-source feature fusion collection stage maximizes the richness of the input information system of load prediction, eliminating the prediction blind area caused by information silos and single-source bias. Second, the introduction of deep interactive memory units realizes full-dimensional information interconnection and coupling expression in time and feature space, greatly improving the modeling ability of the model for complex nonlinear relationships. Third, the adaptive integrated decision layer with online weight self-feedback provides the model with fine-grained dynamic optimization capability and excellent anti-exception and anti-failure characteristics, suitable for high-frequency and dynamic load changes in smart park and diversified power consumption scenarios.
[0044] In summary, the multi-source associated feature adaptive integrated prediction algorithm not only meets the complexity requirements of modern park load prediction, but also has a qualitative breakthrough in precision, real-time performance, robustness and self-evolution ability. Whether it is a large-scale multi-user smart power consumption scenario or a special occasion severely disturbed by external disturbances, MCAE can provide stable and effective prediction support, and is a solid foundation for realizing intelligent power quality management and economic optimization scheduling.
[0045] Finally, the model outputs the predicted load results for a future period of time (for example, 24 hours, one point per hour).
[0046] Step S300: Combination weighting. This step is used to scientifically quantify the relative importance of different power quality indicators under specific working conditions. In an embodiment of the present application, the combination weighting process combines subjective weighting method and objective weighting method. Specifically, the subjective weighting method can use the analytic hierarchy process (AHP), and the objective weighting method can use the entropy weight method.
[0047] To obtain the subjective weight, the analytic hierarchy process can be performed. 3-5 experts with rich experience in power quality management are organized, and pairwise comparison is performed for multiple power quality indicators (for example, voltage deviation, total harmonic distortion, voltage fluctuation, and frequency deviation) that need to be optimized. According to their experience, the experts judge which of the two indicators has a greater impact on system safety and user experience under the current industrial park power environment, and give the importance degree according to the 1-9 scale method, thereby constructing a judgment matrix. Then, the maximum eigenvalue of the judgment matrix and the corresponding eigenvector are calculated, and the normalized eigenvector is taken as the subjective weight of each indicator, and consistency check is performed to ensure the logical consistency of the expert judgment.
[0048] Specifically, in the AHP method, the importance of the indicators is compared by experts in the relevant field, and a human experience matrix is formed , where represents the importance evaluation score of the ith indicator compared with the jth indicator according to the expert judgment. According to the rules, if the indicator is more important than , then ; if it is weaker, then ; if they are equal, then . This matrix directly reflects the relative priority relationship between all pairs of indicators according to the subjective experience of experts. The AHP weight solving process includes the following steps:
[0049]
[0050] , where is the weight number of the ith indicator obtained by the pair-wise product method, is its normalized subjective weight. Then, the consistency index CI and the consistency ratio CR need to be calculated to verify the rationality of the judgment matrix.
[0051] The consistency index is expressed as:
[0052] , where is the maximum eigenvalue of the matrix.
[0053] The final consistency ratio can be expressed as:
[0054] wherein Rl is the random consistency index (given according to the number of indexes). If , the expert judgment matrix is considered to have sufficient consistency, and the subjective weight is reliable.
[0055] To obtain the objective weight, the entropy weight method can be performed. The theoretical basis of the entropy weight method is that if the data distribution of a certain index is more dispersed, the discrimination ability of the index in the evaluation system is stronger, and the corresponding weight should be larger.
[0056] In this embodiment, the historical power quality data collected in step S100 is used to construct an m x n evaluation matrix, where m is the number of samples (for example, the number of sampling points in the past month), and n is the number of indexes (4 in this example). According to the information entropy theory, the greater the dispersion of the index data value, the smaller the information entropy, indicating that the index provides more information, and the weight should be larger. The calculation process includes: normalizing the evaluation matrix, calculating the information entropy of each index, and finally calculating the objective weight of each index according to the information entropy. In this way, each index has an objective weighting factor based on the category distribution, which can reflect the actual significance of the index changes between samples.
[0057] Finally, the subjective weight and the objective weight obtained are fused to form a combined weight. In this embodiment, the weighted average method can be used for fusion, and the formula is:
[0058] wherein is the final combined weight of the jth index, is the subjective weight thereof, is the objective weight thereof. The fusion coefficient can be set according to the degree of emphasis on expert experience and data driving. If the expert information is reliable, a larger value can be taken, and if the scene is dynamic and complex, the entropy weight contribution can be increased. For example, in this embodiment, = 0.5, indicating that both are equally important. The combined weight obtained in this way reflects both the prior knowledge of experts and the distribution characteristics of data itself, making the weight distribution more scientific and reasonable.
[0059] It can be understood that the method of fusing the subjective weight and the objective weight can also choose other methods, for example, the product normalization method, which combines the weights to obtain the combined weight by normalization. This method is smoother under extreme weight distribution, and is convenient to highlight consensus indexes and avoid weight imbalance from the perspective of probability theory.
[0060] In the implementation process, the following operation sequence is set: first, a multi-disciplinary expert team independently completes the pairwise comparison matrix and conducts AHP consistency test to obtain the subjective weight subset ; at the same time, the system automatically captures all monitoring samples in the target period and calculates the objective entropy weight ; finally, the two types of weights are fused to output the final index combination weight . To further ensure the openness and transparency of weight distribution and auditability, the weight calculation process retains a log trace, which can support visual traceability.
[0061] It is worth emphasizing that the subjective and objective fusion weight has dynamic adaptability. That is, as the monitoring time elapses, the sample set expands, new experts are supplemented, and new operation experience is accumulated, the AHP and entropy weight parameters will be updated in real time, meeting the daily monitoring (such as seasonal replacement and event impact) and responding to major changes (such as large-scale energy consumption structure adjustment and introduction of new technologies), ensuring the timeliness and universality of the weight system. Further, the comprehensive weight system can be integrated into the subsequent data optimization and threshold determination process - the model is automatically reweighted / retrained in each cycle, continuously feedbacks and optimizes, and ensures the optimal efficiency of risk response and resource allocation.
[0062] In summary, the AHP-entropy weight hybrid weighting method not only fully reflects the theoretical knowledge and practical experience of management experts, but also ensures objective and real-time reflection of data distribution characteristics, greatly improving the scientificity and adaptability of index weight distribution. This hybrid strategy provides a high-accuracy and robust foundation for the construction of power quality index early warning threshold models, effectively balancing the system's forward-looking, fine-grained, and economic sustainability in a complex and changing electricity environment.
[0063] Step S400: Optimization solution. This step is the core link of calculating the optimal early warning threshold, which is based on the predicted load result obtained in step S200 and the combined weight obtained in step S300, and solves a preset optimization model with the objective of minimizing the adjustment cost.
[0064] First, the preset optimization model is constructed.
[0065] The objective function is to minimize the total adjustment cost:
[0066] wherein is the cost of adjusting each index, is the cost of adjusting the unit index value, is the early warning threshold, is the load value at the moment of user-side load mutation.
[0067] To ensure the practical feasibility and safety of the scheme, the optimization model must satisfy the following constraint conditions: 1. Threshold range constraint: the range of each index benchmark limit value is greater than 0 and less than the value required by the national standard, which ensures that the power quality meets the standard even when the early warning threshold is running. That is:
[0068] wherein, is the required value of the national standard.
[0069] 2. Power constraint: according to the predicted load result, the total power of the user side after taking the adjustment measure should not exceed the maximum demand allowed by the power grid or the maximum bearing power allowed by the transformer capacity, so as to prevent overload caused by adjustment measures. That is:
[0070] wherein, is the actual power of the user side, is the maximum power that the user side can bear Subsequently, a second preset intelligent optimization algorithm is used to solve the model. As an optional implementation manner, the present embodiment can adopt an adaptive cooperative growth and local perturbation evolutionary algorithm (ACGLEA). Referring to Figure 4 which shows the internal process of the algorithm.
[0071] The execution process of the algorithm is as follows: Step S410: initialize the population. A group (for example, 20) of candidate solutions is randomly generated, and each candidate solution (referred to as an "individual") is a vector containing all the early warning thresholds of the to-be-optimized indexes. The individual is driven by the load prediction result and the weight vector to evolve cooperatively along the gradient direction at an adaptive speed. In each round of update, global exploration and information sharing are realized through pheromone diffusion and neighborhood learning mechanism.
[0072] Step S420: population cooperative growth. In this stage, the individuals in the population produce new offspring through the simulation of cross and mutation operations in biological evolution, and perform global exploration. The algorithm evaluates the "fitness" of each individual according to the objective function (total adjustment cost), and the individual with high fitness (i.e., the scheme with low cost) has a greater probability of being selected to participate in reproduction.
[0073] Step S430: Local Adaptive Perturbation. This design is understandably a feature of the hybrid evolutionary algorithm. To prevent premature convergence to a local optimum, the algorithm selects the individuals with the highest and second-highest fitness in the current population and applies a non-Gaussian, non-uniformly distributed random small perturbation to them. For example, a perturbation strategy based on Lévy flight can be used. This long-tailed perturbation ensures a fine search near the optimum while also having a certain probability of generating large step jumps, thus effectively escaping the local optimum trap.
[0074] Step S440: Dynamic Adaptation and Memory. Another feature of this algorithm is the introduction of a dynamic adaptation and memory mechanism. The algorithm introduces a historical best-solution cluster memory pool to record and retain a series of elite solutions discovered during the evolutionary process. When a new individual is generated, it is compared with solutions in the memory pool. If the new individual is superior to some solutions in the memory pool, it is replaced. This mechanism can also identify and reject "mediocre solutions" that repeatedly appear during the evolutionary process but have low fitness, thereby avoiding the waste of computational resources and guiding the search process to concentrate on more promising regions.
[0075] Specifically, ACGLEA maintains a scale of The optimal solution cluster "memory pool" This algorithm records the trajectories of recently encountered global and local optima. If a candidate solution appears multiple times in recent rounds and the improvement in the objective function approaches zero, it is considered a "stagnant" solution and is automatically replaced in the population. Replacement methods can include "black hole search" or random global resampling to actively create new search routes. This strategy solves the problem of conventional population evolution algorithms repeatedly getting trapped in the same local optima, improving performance in solving multi-modal problems. Simultaneously, the individual population adaptively adjusts core hyperparameters such as learning parameters, perturbation amplitude, and pheromone diffusion intensity based on the current solution space distribution and gradient trend, dynamically switching the weights of global exploration and local development. An "adaptive weighting coefficient" is introduced, automatically increasing the weight of local search when the objective function converges quickly to improve accuracy; while increasing the probability of global exploration when convergence is slow, enhancing the overall robustness and versatility of the algorithm.
[0076] Step S450 / S500: Convergence judgment. After each iteration, it is judged whether the termination condition is met. The termination condition can be that the preset maximum number of iterations (for example, 300 times) is reached, or the improvement amplitude of the optimal solution of the continuous multiple generations is less than a small threshold. If not, return to step S420 to continue the next round of iteration; if yes, the optimization process ends. As the core computing engine of the adaptive optimization of power quality index early warning threshold, the dynamic evolutionary optimization algorithm needs to be optimized in a highly complex, strongly coupled, and multi-constrained solution space. ACGLEA (adaptive co-evolution-local perturbation hybrid evolutionary algorithm) is designed for such problems. Its multi-stage, hybrid-driven optimization framework combines the globality of group collaborative exploration and the delicacy of individual adaptive perturbation, effectively breaking through the local convergence and dimension disaster of traditional single optimization algorithms.
[0077] The efficiency and controllability of the entire evolutionary process are greatly attributed to the dynamic adaptive mechanism of key parameters and operators. These include, but are not limited to, the time-decreasing strategy of individual learning rate, the feedback tuning of perturbation amplitude based on fitness gradient, and the self-adjustment of global and local weight adaptive coefficients based on population entropy increase.
[0078] Step S600: Output the optimal early warning threshold. When the algorithm converges, the individual with the highest fitness in the historical optimal solution cluster memory pool is the global optimal solution. The threshold combination represented by this individual is the final output of the optimal early warning threshold.
[0079] Reference Figure 6 and Figure 7 . Figure 6 It shows the change curve of the total cost with the number of iterations in the optimization process. It can be seen that the cost finally converges to a stable minimum value. Figure 7 It shows the change of the early warning threshold of each index with the number of iterations. It can be seen that all the thresholds finally converge to a stable set of values. The above results collectively show that the method of the embodiment has good effectiveness and stability.
[0080] In summary, the ACGLEA algorithm couples multiple mechanisms such as group intelligence (co-evolution), individual perturbation (diversity enhancement), and memory elimination (self-evolution) to achieve global in-depth search and fine development of specific peak regions in the context of complex constraints and high-dimensional samples of power systems. Its flexible coordination and robust dynamic parameter adjustment mechanism perfectly meet the extreme requirements of efficient, accurate, and noise-resistant adaptive adjustment of dynamic thresholds, and inject strong algorithmic power and engineering innovation value into modern power quality risk early warning and economic decision-making.
[0081] In order to verify the feasibility of the optimization algorithm, the present application takes a certain pilot park in Dali as the research object, takes the total cost generated by adjusting each index as the objective function, and the simulation data comes from a certain pilot park in Dali. The experimental parameters are set as follows: the orbital eccentricity =0.8, which is the maximum value required by the national standard, the population size is 20, , the mutation rate is 0.2, , the number of iterations is 300. The relationship between the total cost and the number of iterations in the simulation results is shown in It can be seen from
[0082] that the optimization algorithm of the present application has basically converged when it is iterated to about the 200th time, and the final total cost is stabilized at about 6400 yuan, which can save 3800 yuan for the park, which provides a new strategy for the park to reduce costs and increase benefits. Figure 6 Figure 6 In addition, the changes of each power quality index threshold with the number of iterations are shown in The experimental simulation results of
[0083] can show that the warning threshold of the voltage deviation index finally converges to 1.9%, the warning threshold of the voltage fluctuation index finally converges to 1.5%, the warning threshold of the voltage flicker index finally converges to 0.58Pst, and the warning threshold of the frequency deviation index finally converges to 0.15Hz, so it can be considered that the method has feasibility in solving the warning threshold. Figure 7 Figure 7 Embodiment 2 As another embodiment, the load prediction module 10 in the scheme of the present application can also use other models to illustrate the flexibility of its framework. The overall process of this embodiment is basically the same as that of embodiment 1, and also follows the steps shown in
[0084] The difference mainly lies in the specific type of the first preset prediction model used in step S200 "load prediction". Figure 2 In embodiment 1, the first preset prediction model is preferably a multi-source associated feature adaptive integrated prediction model. In this embodiment, the first preset prediction model can be replaced by another advanced time series prediction model, such as a prediction model based on the Transformer architecture.
[0085]
[0086] Specifically, in step S200, the multi-source heterogeneous data preprocessed in step S100 is input into a Transformer-based prediction model. The core of the Transformer model lies in its self-attention mechanism, which can calculate the correlation between any two positions in the input sequence, thereby capturing long-distance dependencies of data in the time dimension. For example, for the load prediction task, today's load may have a strong correlation with the load at the same time 7 days ago, and the self-attention mechanism can effectively capture this periodic dependence. In addition, through the multi-head attention mechanism, the model can learn different dependencies from different representation subspaces, further enhancing the expression ability of the model.
[0087] The Transformer model can also process multi-source feature input 110, and through its encoder-decoder structure, it encodes the historical multi-source data sequence into a context vector, and then generates the future load prediction sequence, i.e., the predicted load output 140, by the decoder.
[0088] The subsequent steps S300 "combination weighting" and S400 "optimization solution" remain consistent with embodiment 1, i.e., the combination weighting module 20 still uses the combination of the analytic hierarchy process and the entropy weight method, and the threshold optimization module 30 still uses the aforementioned adaptive synergistic growth-local perturbation hybrid evolutionary algorithm for solution.
[0089] Through the simulation experiment of the present embodiment, it can be found that although the load prediction models are different, the predicted load results output by the Transformer model also have high accuracy due to its strong multi-source data processing and high-precision prediction capabilities. Therefore, the optimal warning threshold combination calculated by the threshold optimization module 30 is very similar to the result of embodiment 1, and can also achieve dynamic adaptive adjustment of the warning threshold and significant reduction of operating costs.
[0090] As can be seen, the technical framework proposed in the present application has good compatibility and scalability, and its core idea is not limited to a certain specific prediction algorithm. As long as the first preset prediction model selected can provide accurate future load prediction based on multi-source heterogeneous data, it can be integrated into the framework of the present application and achieve the corresponding technical effects.
[0091] Embodiment 3 Alternatively, in another embodiment, the method selection of the combination weighting module 20 also has flexibility and scalability. The overall process of the present embodiment is basically consistent with that of embodiment 1, and the main difference lies in the specific types of subjective and objective weighting methods used in step S300 "combination weighting".
[0092] In Embodiment 1, the combination weighting preferably adopts the analytic hierarchy process as the subjective weighting method and the entropy weight method as the objective weighting method. In this embodiment, the two methods can be replaced.
[0093] Specifically, in step S300: the subjective weighting method can adopt the network analysis method instead of the analytic hierarchy process. The network analysis method is an extension of the analytic hierarchy process, which not only considers the hierarchical relationship between indicators, but also handles the mutual influence and feedback relationship between indicators at the same level and between indicators at different levels. For example, the deterioration of voltage deviation may exacerbate harmonic distortion, and vice versa. When using the network analysis method, experts need to construct a more complex network structure model and give a mutual influence judgment matrix between elements. By calculating the limit relative ordering vector of the supermatrix, a subjective weight that can better reflect the complex coupling relationship between indicators can be obtained.
[0094] The objective weighting method can adopt the CRITIC method instead of the entropy weight method. The CRITIC method determines the weight based on the contrast intensity of the evaluation index and the conflict between the indicators. The contrast intensity is represented by the standard deviation of the index. The larger the standard deviation, the greater the fluctuation of the index value under different schemes, the more information it contains, and the higher weight it should be given. The conflict between indicators is represented by the correlation coefficient between indicators. The stronger the correlation between an indicator and other indicators, the higher the repetition of the information it reflects, and its weight should be appropriately reduced. The CRITIC method combines these two aspects to calculate the objective weight, which can more comprehensively reflect the internal information of the data.
[0095] After obtaining the new subjective weight and objective weight by the network analysis method and the CRITIC method respectively, the weighted average method or the product normalization method in Embodiment 1 can be used for fusion to form the final combination weight.
[0096] The subsequent step S400 "optimization solution" remains the same as Embodiment 1. After receiving the new combination weight, the threshold optimization module 30 still uses the adaptive co-evolution-local perturbation hybrid evolutionary algorithm described above for optimization solution.
[0097] The simulation results of this embodiment show that since the network analysis method and the CRITIC method are also mature and scientific decision analysis methods, the combination weight obtained by them can still effectively reflect the comprehensive importance of each power quality indicator. Therefore, based on this, the optimization solution is carried out, and the final optimal warning threshold combination can still achieve the expected purpose of dynamic adjustment and cost optimization. This proves that the combination weighting link of the present application has strong flexibility, and can select the most suitable subjective and objective weighting methods for combination according to the complexity of the actual problem and the characteristics of the data.
[0098] Embodiment 4 Moreover, the algorithm selection of the threshold optimization module 30 in the scheme of the present application is not unique. The overall flow of the embodiment is basically consistent with that of Embodiment 1, and the main difference lies in the specific type of the second preset intelligent optimization algorithm adopted in the step S400 of "optimization solving".
[0099] In Embodiment 1, the second preset intelligent optimization algorithm is preferably a self-adaptive cooperative growth-local perturbation hybrid evolutionary algorithm. In the present embodiment, it can be replaced by another advanced global optimization algorithm, such as an adaptive differential evolution algorithm with elite archive.
[0100] Specifically, in step S400, after the optimization model with the objective of minimizing the adjustment cost is constructed, the adaptive differential evolution algorithm is used for solving. This algorithm is a famous variant of the differential evolution algorithm, and its core idea is to generate new candidate solutions through the difference vectors between individuals in the population. Its execution process mainly includes: 1. Initialization: Similar to Embodiment 1, an initial population is randomly generated, and each individual represents a set of candidate early warning thresholds.
[0101] 2. Mutation: The algorithm uses a "current-to-p-best / 1" mutation strategy, which performs a difference operation between the current individual, a random individual in the population, and a randomly selected individual from the top p% individuals in the current population to generate a mutation vector. This strategy maintains the diversity of the population while also using the information of the optimal solution to guide the search direction.
[0102] 3. Crossover: The mutation vector and the original individual vector are crossed according to a certain crossover probability to generate a trial vector.
[0103] 4. Selection: Compare the fitness (i.e., the total adjustment cost) of the trial vector and the original individual vector, and keep the individual with better fitness to enter the next generation.
[0104] It should be noted that the key advantage of the adaptive differential evolution algorithm lies in its "adaptive" feature. Two key control parameters in the algorithm, the scaling factor F and the crossover rate CR, are not fixed values, but are dynamically adjusted based on the parameter values that successfully generate better individuals in each generation, which enables the algorithm to automatically adapt to different optimization stages of the problem without tedious manual parameter tuning. In addition, the algorithm also introduces an external archive for storing the parent individuals that are eliminated in the evolution process. When generating the mutation vector, part of the difference vector can be selected from this archive, which further increases the diversity of the population and helps to avoid premature convergence.
[0105] After replacing the optimization algorithm in Embodiment 1 with the adaptive differential evolution algorithm in this embodiment, a simulation experiment is performed. The results show that the algorithm can also effectively solve the optimization model proposed in this application, and the optimal early warning threshold combination and the lowest total adjustment cost found by the algorithm are highly consistent with the results obtained in Embodiment 1.
[0106] This embodiment proves that the core idea of the technical solution of this application, i.e. constructing a cost optimization model with predicted load and dynamic weight as input, does not depend on a unique specific optimization algorithm. Other global intelligent optimization algorithms with superior performance, such as improved particle swarm optimization algorithm, simulated annealing algorithm, etc., as long as they have strong global search and local optimal avoidance capabilities, can be applied to the framework of this application as the second preset intelligent optimization algorithm to achieve the same technical effect.
[0107] Based on the schemes of the above embodiments, compared with the prior art, the present application has the following beneficial effects: By introducing the prediction of future load, the early warning threshold can be dynamically adjusted, overcoming the hysteresis of the static threshold in the prior art, and can be adaptively adjusted according to the actual power load change of the user side, thereby significantly improving the accuracy of early warning and effectively reducing false positives and false negatives. At the same time, this application takes the adjustment cost as the optimization target, and combines the dynamic combination weight of each index, so as to solve the early warning threshold combination with the lowest economic cost under the premise of ensuring that the power quality meets the standard and the power supply safety, realizing the collaborative optimization of economy and safety. In addition, by using the preferred adaptive collaborative growth-local perturbation hybrid evolutionary algorithm, using its unique global exploration, local perturbation and dynamic memory mechanism, it can effectively avoid falling into a local optimal solution in the solving process, ensuring the globality of the optimization result and improving the robustness of the algorithm under complex working conditions. Finally, this application organically integrates load prediction, combination weighting and optimization solving into a closed-loop intelligent decision-making process, realizes systematic collaborative optimization driven by data, and comprehensively improves the intelligent, refined and systematic level of power quality management.
[0108] It can be understood that the same or similar parts in the above embodiments can be mutually referred to, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0109] It should be noted that in the description of the present application, the terms "first", "second" and the like are only for the purpose of description and cannot be understood as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise specified, the meaning of "a plurality of" is at least two.
[0110] Any procedural or methodological descriptions in flow charts or otherwise described herein can be understood to represent modules, segments, or portions of code that include executable instructions for implementing the specific logical functions or steps, and the scope of preferred embodiments of the present application includes additional implementations in which the functions are performed in a different order, including substantially simultaneously, or in reverse order, as will be understood by those skilled in the art to which embodiments of the present application pertain.
[0111] It should be understood that portions of the present application can be realized with hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be realized as software or firmware to be executed by a suitable instruction-executing system and stored in a storage. For example, if realized with hardware, and as in another embodiment, any one or a combination of the following technologies known in the art can be used: discrete logic circuitry having logic gates for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.
[0112] Those skilled in the art of the present technology can understand that all or part of the steps carried out by the above-mentioned embodiments can be completed by programs instructing relevant hardware, and the programs can be stored in a computer-readable storage medium, and when executed, include one or a combination of steps of the method embodiments.
[0113] In addition, each functional unit in each embodiment of the present application can be integrated into one processing module, or each unit can exist physically independently, or two or more units can be integrated into one module. The above-mentioned integrated module can be realized in the form of hardware or in the form of a software functional module. When the integrated module is realized in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a magnetic disk or an optical disk, etc.
[0114] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0115] Although the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are exemplary and are not to be construed as limiting the present application, and that changes, modifications, substitutions and variations can be made by those skilled in the art without departing from the scope of the present application.
Claims
1. A method for calculating power quality early warning thresholds, characterized in that, Includes the following steps: Based on multi-source heterogeneous data, the first preset prediction model is used to predict the future load on the user side, and the predicted load results are obtained. Based on subjective and objective weighting methods, multiple power quality indicators are combined and weighted to obtain the combined weights of each indicator. Based on the predicted load results and the combined weights, a second preset intelligent optimization algorithm is used to solve a preset optimization model with the goal of minimizing adjustment costs, thereby obtaining the warning thresholds for the multiple power quality indicators.
2. The method according to claim 1, characterized in that, The first preset prediction model is a multi-source correlation feature adaptive integrated prediction model; Furthermore, the step of predicting future load on the user side using the first preset prediction model specifically includes: The multi-source heterogeneous data is collected by fusing and acquiring the multi-source feature fusion acquisition module; Through deep interactive memory units, information interaction and coupling between different feature sources are achieved; And through an adaptive integrated decision layer, the prediction results are integrated and decided to obtain the predicted load results.
3. The method according to claim 2, characterized in that, The deep interactive memory unit enables information interaction and coupling between different feature sources at the same time by setting an interaction gate.
4. The method according to claim 1, characterized in that, The subjective weighting method is the analytic hierarchy process (AHP), and the objective weighting method is the entropy weighting method. Furthermore, the subjective weights obtained through the analytic hierarchy process and the objective weights obtained through the entropy weighting method are fused using a weighted average method or a product normalization method to form the combined weights.
5. The method according to claim 1, characterized in that, The second preset intelligent optimization algorithm is an adaptive collaborative growth-local perturbation hybrid evolution algorithm.
6. The method according to claim 5, characterized in that, The adaptive collaborative growth-local perturbation hybrid evolution algorithm includes: Perform local adaptive perturbation by applying non-Gaussian, non-uniformly distributed random small perturbations to the current best and second-best individuals; It also performs dynamic adaptation and memory, introducing a historical best solution cluster memory pool to record elite solutions and exclude mediocre solutions.
7. The method according to claim 1, characterized in that, The constraints set by the preset optimization model include: the warning thresholds of the multiple power quality indicators are within the national standard limits, and the total power on the user side after adjustment does not exceed its maximum withstand power.
8. A power quality early warning threshold calculation device, characterized in that, include: The load forecasting module is used to forecast the future load on the user side based on multi-source heterogeneous data and a first preset forecasting model, and obtain the forecasted load results. The combined weighting module is used to combine and assign weights to multiple power quality indicators based on subjective and objective weighting methods to obtain the combined weights of each indicator. The optimization solution module is used to solve a preset optimization model with the goal of minimizing adjustment costs based on the predicted load results and the combined weights, using a second preset intelligent optimization algorithm, to obtain the warning thresholds of the multiple power quality indicators.
9. The apparatus according to claim 8, characterized in that, The first preset prediction model is a multi-source correlation feature adaptive integrated prediction model.
10. The apparatus according to claim 8, characterized in that, The second preset intelligent optimization algorithm is an adaptive collaborative growth-local perturbation hybrid evolution algorithm.