A power load risk warning method based on ARIMA model residual analysis
By combining the ARIMA model and residual analysis, and dynamically adjusting the threshold setting, the problems of accuracy and real-time performance in detecting abnormal power loads are solved, enabling efficient and reliable early warning of power grid loads, and making it suitable for power systems of various sizes.
Patent Information
- Application Number
- CN202511101767.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-07
AI Technical Summary
Existing technologies suffer from low accuracy and poor real-time performance in detecting abnormal power loads. They are unable to accurately capture the nonlinear characteristics of load changes and are not sufficiently targeted at handling abnormal fluctuations in power grid loads, resulting in high false alarm and false miss rates. They cannot meet the real-time and adaptability requirements of complex power grid load scenarios.
The ARIMA model is used for load forecasting. By combining residual analysis and dynamic threshold setting with exponential smoothing adjustment and Bayesian dynamic updates, real-time and accurate early warning of load anomalies can be achieved, reducing false alarm rate and missed alarm rate.
It improves the versatility and fault tolerance of power load anomaly detection, adapts to complex load scenarios, significantly reduces false alarms and missed alarms, and improves the safety and efficiency of power grid operation.
Smart Images

Figure CN120611997B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power systems, and specifically to a method for early warning of electricity load risks based on time series analysis and residual detection using an ARIMA model. Background Technology
[0002] With the increasing complexity of power systems and the diversification of load demands, abnormal changes in electricity load pose a potential threat to the safe operation of the power grid. Traditional load forecasting methods mainly rely on statistical models (such as fixed threshold methods and autoregressive moving average models) and machine learning techniques (such as support vector regression (SVR) and long short-term memory networks (LSTM). While these methods perform well in predicting overall trends, their ability to detect and warn of abnormal load fluctuations in real time is limited. For example, conventional load monitoring methods are usually based on fixed thresholds or simple trend analysis, making it difficult to accurately capture the nonlinear characteristics of load changes and prone to false alarms or missed alarms. In addition, machine learning methods are highly dependent on the amount of data and have high computational complexity, making it difficult to meet real-time requirements. Furthermore, existing technologies (such as CN116163807A) use the ARIMA model for dynamic early warning of abnormal data in tunnel health monitoring. Through dynamic modeling and hierarchical threshold settings, it achieves improved accuracy in multi-step prediction and dynamic early warning of abnormal data. However, this method is mainly aimed at monitoring the health of tunnel structures and lacks targeted processing for the characteristics of abnormal fluctuations in power grid load. Moreover, its hierarchical threshold settings are based on multiples of standard deviation and fail to fully consider the seasonal and periodic characteristics of power grid load. Therefore, existing technologies have significant shortcomings in terms of accuracy and real-time performance in load anomaly detection. There is an urgent need for an efficient and reliable load risk early warning method to consider the impact of unexpected load fluctuations on the early warning results, in order to reduce misjudgments and improve the adaptability of the early warning system to complex load scenarios. Summary of the Invention
[0003] This invention addresses the shortcomings of existing technologies in detecting abnormal electricity loads by proposing an electricity load risk early warning method based on residual analysis of the ARIMA (Autoregressive Integrated Moving Average Model, time series analysis model), thus solving the problems of low detection accuracy and poor real-time performance of traditional methods.
[0004] The present invention adopts the following technical solution.
[0005] The technical solution of the present invention includes the following steps:
[0006] Collect and preprocess historical electricity load data to remove outliers and noise;
[0007] An ARIMA model is built based on historical data, and the model is used to make short-term forecasts of future loads.
[0008] The residuals between the predicted values and the actual observed values are analyzed to extract the statistical characteristics of the residuals. In particular, the predicted value sequence is processed in combination with the load characteristics of the target area, taking into full account the unexpected load fluctuations in the target area caused by unforeseen circumstances such as uncertain demand or seasonal cycles. The residual values are then obtained based on the above-processed predicted sequence. Each residual value in the residual value sequence is an interval range with a maximum and a minimum value.
[0009] Set a residual abnormality threshold and dynamically adjust the threshold based on the standard deviation or probability distribution method;
[0010] Based on the degree and frequency of residuals exceeding the threshold, a graded risk warning is triggered (for example, divided into three levels: low, medium, and high).
[0011] Based on the early warning results, visualized reports or real-time alarm information are generated so that the power grid dispatch center can take timely countermeasures.
[0012] The significant technical effects of this invention include the following aspects:
[0013] This invention addresses the seasonal and periodic characteristics of power grid loads, or unexpected loads caused by other uncertain demands. It can further enhance the versatility and fault tolerance of abnormal situation detection, adapting to temporary power load changes caused by human factors or emergencies, abnormal fluctuations caused by seasons or severe weather, and improving the adaptability of the early warning system to complex scenarios.
[0014] This invention proposes a method for detecting anomalies based on dynamic standardized residuals. After calculating the residual mean σ and standard deviation σ, an exponential smoothing adjustment (ESA) is introduced to perform weighted smoothing on the residuals, reducing the impact of sudden noise and improving the stability of anomaly detection.
[0015] This invention employs a risk threshold setting method based on Bayesian dynamic updates. It calculates the risk threshold using data from the past N time steps and adjusts it adaptively. That is, under the premise that the aforementioned residual value takes into account dynamic values, the setting of the dynamic threshold is further improved, which solves the problem of high false alarm rate and false negative rate of traditional methods.
[0016] This invention achieves real-time and accurate early warning of electricity load risks by combining the time series forecasting capabilities of the ARIMA model with the anomaly detection mechanism of residual analysis. Residual analysis can identify minute load anomalies, significantly reducing false alarms and missed alarms; the model has low computational complexity and can respond quickly to load changes; it is applicable to power systems of various sizes and complex load scenarios.
[0017] The application of this invention will significantly improve the safety and operational efficiency of the power system, and provide strong technical support for power grid operation risk management. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the steps of the early warning method of this application;
[0019] Figure 2 This is a flowchart illustrating the process of risk assessment and risk classification based on residuals and dynamic thresholds. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this invention.
[0021] Step 1: Data Collection and Preprocessing
[0022] Obtain electricity load data for the target area through smart meters or electricity monitoring systems, and process the data as follows:
[0023] Data cleaning: Remove outliers and missing values, and fill data gaps using interpolation or smoothing.
[0024] Separating trends and seasonality: Eliminating trend and periodic characteristics in data through methods such as differencing and logarithmic transformation to ensure data stability;
[0025] Data normalization: scaling the data to the [0,1] range to facilitate subsequent model processing.
[0026] Step 2: Building the ARIMA model
[0027] Parameter identification: Using the autocorrelation function (ACF) and partial autocorrelation function (PACF) plots, determine the autoregression order p, difference order d, and moving average order q of the ARIMA model;
[0028] Model training: Use historical data to fit the ARIMA model, optimize the model parameters, and ensure that it can accurately reflect the load change trend;
[0029] Predicted output: The pre-trained ARIMA model is used to predict the load for future time periods, generating a first predicted value sequence;
[0030] Sequence processing: Subtract a specific constant δ from the first predicted value in the first predicted value sequence to obtain the second predicted value sequence, making the mean of the second predicted values in the second predicted value sequence 0. This step is a crucial step in locating and observing unexpected load fluctuations. It aims to generate a curve with the X-axis as the median and the Y-axis representing the fluctuation of the load value by setting the median of all predicted load values to zero. This curve best reflects the range of load values in most scenarios, i.e., the cases where the second predicted value fluctuates around 0 account for a large proportion of the overall load. This generates the second predicted value data in a more intuitive way and in a way that is easier for subsequent model calculations.
[0031] Unexpected Load Considerations: Data in the second predicted value sequence with a range of [-a, a] are defined as dynamic disturbance zone data where the output is close to 0. Consecutive second predicted value data segments within the [-a, a] interval are defined as dynamic disturbance segments. The load scenarios of the time series corresponding to the dynamic disturbance zone data and dynamic disturbance segments are analyzed to obtain the time-series dynamic disturbance zone value [-b, b]. It should be noted that the absolute value of b should be a value between [0, a], and its value should be set based on the specific load characteristics of the target area. This set value can be determined by the specific power supply... The network management department sets the values based on load characteristics and the requirements for early warning or protection actions. When the second predicted value fluctuates slightly around the X-axis where Y is 0, the proportion of the time period when the second predicted value fluctuates around 0 is the highest. Therefore, it can better capture the hard-to-observe influences and changes in the load value, such as temporary power load changes caused by human factors or emergencies, and abnormal fluctuations caused by seasons or severe weather. In other words, the proportion of such unexpected abnormal fluctuations is higher in the above-mentioned time periods. Locating the fluctuations in the most stable curve can best capture unexpected load fluctuations. Obtaining the value of this dynamic disturbance through intuitive or algorithmic means can provide a more reliable reference for risk judgment in subsequent residual analysis.
[0032] Step 3: Residual Analysis
[0033] Residual calculation: Calculate the difference between the predicted value and the actual observed value to obtain the residual sequence;
[0034] Residual = Actual value - Predicted value
[0035] The difference between the first predicted value in the first predicted value sequence and the measured value corresponding to the first predicted value is calculated to obtain the first residual sequence; the first residual value in the first residual sequence is summed with the dynamic disturbance zone value [-b, b] to obtain the second residual sequence with the second residual value that has a maximum value and a minimum value.
[0036] Residual feature extraction: Analyze the mean μ, variance σ², standard deviation σ and distribution characteristics of the second residual sequence to determine whether it conforms to the characteristics of white noise;
[0037] Anomaly threshold setting: Based on the statistical characteristics of the second residual, a dynamic threshold is set, for example:
[0038] Threshold = μ + kσ
[0039] Where μ is the mean of the second residual, σ is the standard deviation of the second residual, and k is the adjustment coefficient.
[0040] Step 4: Anomaly Detection and Early Warning
[0041] Anomaly detection: When the second residual value exceeds the set threshold range, it is considered an abnormal load.
[0042] Risk Classification: Risk classification is performed based on the magnitude and frequency of the second residual exceeding the threshold. The specific classifications are defined as follows:
[0043] Low risk: The second residual value exceeds the threshold but does not exceed 1.5σ (i.e., the second residual is in the range of [μ+σ,μ+1.5σ] or [μ-1.5σ,μ-σ]), and the number of anomalies does not exceed 2 in the past 30 time steps;
[0044] Medium risk: The second residual value exceeds 1.5σ but does not exceed 3σ (i.e. the second residual is in the range of [μ+1.5σ,μ+3σ] or [μ-3σ,μ-1.5σ]), or the number of anomalies is between 3 and 6 in the past 30 time steps;
[0045] High risk: The second residual value exceeds 3σ (i.e., the second residual exceeds the range of [μ+3σ] or [μ-3σ]), or the number of anomalies exceeds 6 in the past 30 time steps.
[0046] It should be noted that since the second residual value of this invention is an interval value that has both a maximum and a minimum value, the definition of the threshold here should be: the interval value as a whole falls within the risk classification interval. For example, in the low-risk classification, the minimum value of the second residual value is greater than μ+σ and the maximum value is less than μ+1.5σ, or the minimum value is greater than μ-1.5σ and the maximum value is less than μ-σ. The specific area limitations for medium-risk and high-risk are the same as above and will not be repeated here. It is foreseeable that when judging the residual value, compared with the general method, the judgment interval of the residual value and the threshold considering the dynamic disturbance zone value with time-series characteristics has a wider range than the judgment interval of the residual value and the threshold considering the dynamic disturbance zone value without time-series characteristics. That is, unexpected load fluctuations are taken into account, thereby reducing false warnings.
[0047] Real-time alerts: Issue alerts to users through alarm systems or visualization platforms (such as dashboards) and provide specific explanations of the anomalies.
[0048] Step 5: Application of Early Warning Results
[0049] Power grid dispatch optimization: Based on early warning results, dynamically adjust power generation plans and load allocation strategies to avoid supply and demand imbalances;
[0050] Equipment protection measures: In response to high-risk warnings, backup equipment or distributed energy systems are activated in advance to reduce system load pressure;
[0051] Data recording and review: Save early warning data for subsequent model optimization and event review analysis.
[0052] To verify the effectiveness of the method of the present invention, this section uses actual power load data for example analysis and compares it with traditional methods to demonstrate the advantages of the present invention in anomaly detection and risk warning.
[0053] The experimental data selected were power grid load data from a certain region from October 2023 to November 2024. The data sampling frequency was 15 minutes, totaling 35,040 data points. Data preprocessing steps included:
[0054] (1) Z-score standardization is used to eliminate the influence of dimensions;
[0055] (2) Use the IQR (interquartile range) method to remove extreme outliers;
[0056] (3) Use the first-order difference method to eliminate trends and ensure the stationarity of the time series.
[0057] Risk warning calculation process based on the method of this invention
[0058] ARIMA Model Construction and Short-Term Forecasting:
[0059] (1) Use the ADF (Augmented Dickey-Fuller) test to determine the stationarity of the data and determine the optimal difference order d=1.
[0060] (2) The combination of PACF (partial autocorrelation function) and ACF (autocorrelation function) is used to determine the order (p,d,q) of the ARIMA model, and ARIMA(2,1,2) is finally selected as the best model.
[0061] (3) Use data from October 2023 to September 2024 for training, data from October to November 2024 for testing, and use the trained ARIMA model for short-term load forecasting.
[0062] Residual analysis and dynamic threshold setting:
[0063] (1) Calculate the residual sequence between the predicted value and the actual value, and calculate its mean μ and standard deviation σ.
[0064] (2) The weighted residuals were calculated using the exponential smoothing adjustment (ESA) method, with the weights set at α=0.8. The smoothing formula is as follows: R t =αR t +(1-α)R t-1 ′wherein, R t R is the residual at the current time. t ′ represents the residual after smoothing.
[0065] (3) Dynamic threshold setting: Based on the Bayesian dynamic update method, the risk threshold is recalculated every 100 time steps to make it adaptively adjusted.
[0066] Risk classification and early warning
[0067] Based on the magnitude and frequency of residuals exceeding the threshold, the risk classification criteria are set as follows:
[0068] Low risk (0.674σ ≤ residual < 1.28σ, and outlier percentage ≤ 5%)
[0069] Medium risk (1.28σ ≤ residual < 1.96σ, and outlier percentage > 5% and ≤ 15%)
[0070] High risk (residuals ≥ 1.96σ, or outlier percentage > 15%)
[0071] When the residuals meet the risk conditions for a certain period of time, the system generates an early warning report and displays the abnormal load situation in a visual way.
[0072] Comparative Analysis of Experimental Results
[0073] To evaluate the effectiveness of the method of the present invention, comparative experiments were conducted with the fixed threshold method (traditional empirical method), the load anomaly detection method based on K-means clustering (comparison method 1), and the load prediction anomaly detection method based on LSTM (comparison method 2).
[0074] (1) Comparison of anomaly detection accuracy
[0075] Table 1
[0076]
[0077] (2) Comparison of False Positive Rate (FPR)
[0078] Table 2
[0079]
[0080] (3) Comparison of calculation time (unit: seconds)
[0081] Table 3
[0082]
[0083] Experimental conclusions
[0084] The method of this invention improves the anomaly detection accuracy by 4-10 percentage points, and achieves an F1-score of 90.7%, which is superior to existing methods.
[0085] The false alarm rate was reduced to 5.2%, which is more than 60% lower than that of traditional methods, thus avoiding unnecessary warning interference.
[0086] It offers superior computational efficiency, reducing training time by 83.7% and prediction time by 68.4% compared to the LSTM method, making it suitable for real-time load warning.
[0087] Compared to the fixed threshold method: traditional methods have a fixed threshold and cannot adapt to dynamic changes in power grid load, while the dynamic threshold adjustment mechanism of this invention can change with load characteristics and reduce false alarms.
[0088] Compared to the K-means clustering method, which requires manually setting the number of clusters and is sensitive to data distribution, this invention is more robust because it adaptively adjusts the threshold based on residual statistical characteristics.
[0089] Compared to the LSTM prediction method, although LSTM has the ability to predict time series, it has high computational complexity. This invention is based on ARIMA + dynamic residual analysis, which reduces computational overhead while ensuring high accuracy, and is suitable for large-scale power grid load early warning applications.
[0090] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A method for early warning of electricity load risk based on ARIMA model residual analysis, characterized in that, Includes the following steps: Acquire electricity load data for the target area and preprocess the data; Construct an ARIMA model and determine its autoregressive order, differencing order, and moving average order. The ARIMA model is fitted using historical data from the first specific time period of the target region, and the model parameters are optimized to obtain a trained ARIMA model. The trained ARIMA model is used to predict the load for the second specific time period, generating the first predicted value sequence. Subtract a specific constant δ from the first predicted value in the first predicted value sequence to obtain the second predicted value sequence, so that the mean of the second predicted value in the second predicted value sequence is 0; The data in the second predicted value sequence with a second predicted value range of [-a, a] are defined as dynamic disturbance zone data with an output close to 0. The data segment of continuous second predicted value data in the second predicted value sequence located in the interval [-a, a] is defined as dynamic disturbance segment. The load scenario of the time series corresponding to the dynamic disturbance zone data and the dynamic disturbance segment is analyzed to obtain the dynamic disturbance zone value [-b, b] with time series characteristics. The difference between the first predicted value in the first predicted value sequence and the measured value corresponding to the first predicted value time series is calculated to obtain the first residual sequence; the first residual value in the first residual sequence is summed with the dynamic disturbance zone value [-b, b] to obtain the second residual sequence with the second residual value having the maximum and minimum values; Analyze the distribution characteristics of the second residual sequence and set a dynamic threshold; calculate the mean μ, variance σ², and standard deviation σ of the second residual sequence; use the exponentially smoothed ESA method to calculate the weighted residuals, with the weight set to α=0.
8. The smoothing formula is as follows: R t′ =αR t +(1-α)R t-1′ Where Rt is the residual at the current time, and Rt′ is the smoothed residual; based on the Bayesian dynamic update method, the dynamic threshold is recalculated every 100 time steps to adaptively adjust the dynamic threshold; Dynamic threshold = μ + kσ, where μ is the mean of the residuals, σ is the standard deviation of the residuals, and k is the adjustment coefficient; When the second residual value exceeds the set threshold range, it is considered an abnormal load. Risk classification and early warning are conducted based on the magnitude and frequency of the second residual value exceeding the threshold.
2. The early warning method according to claim 1, characterized in that: The steps for determining the autoregressive order, differencing order, and moving average order of the ARIMA model include: using the ADF test to determine the stationarity of the data and determining the optimal differencing order d; and using the autocorrelation function (ACF) and partial autocorrelation function (PACF) plots to determine the autoregressive order p and the moving average order q of the ARIMA model.
3. The early warning method according to claim 1, characterized in that: The risk classification and early warning based on the magnitude and frequency of the second residual exceeding the threshold includes: The risk classification criteria are set as follows: Low risk: 0.674σ ≤ second residual value < 1.28σ, and outlier percentage ≤ 5%; Medium risk: 1.28σ ≤ second residual value < 1.96σ, and outlier percentage > 5% and ≤ 15%; High risk: Second residual value ≥ 1.96σ, or outlier percentage > 15%.
4. The early warning method according to claim 1, characterized in that: The risk classification and early warning based on the magnitude and frequency of the second residual exceeding the threshold includes: The risk classification criteria are set as follows: Low risk: The residual value exceeds the threshold but does not exceed 1.5σ, that is, the residual is in the range of [μ+σ,μ+1.5σ] or [μ-1.5σ,μ-σ], and the number of anomalies does not exceed 2 in the past 30 time steps; Medium risk: The residual value exceeds 1.5σ but does not exceed 3σ, that is, the residual is in the range of [μ+1.5σ,μ+3σ] or [μ-3σ,μ-1.5σ], or the number of anomalies is between 3 and 6 in the past 30 time steps; High risk: The residual value exceeds 3σ, that is, the residual exceeds the range of [μ+3σ] or [μ-3σ], or the number of anomalies exceeds 6 in the past 30 time steps.
5. The early warning method according to claim 1, characterized in that: The data preprocessing includes: Z-score standardization was used to eliminate the influence of dimensions; the IQR interquartile range method was used to remove extreme outliers; and the first-order difference method was used to eliminate trends and ensure the stationarity of the time series.
6. The early warning method according to claim 1, characterized in that: For the dynamic disturbance region data [-a, a] and the dynamic disturbance region value [-b, b], the absolute value of b is a value between [0, a].
Citation Information
Patent Citations
Tunnel health monitoring abnormal data dynamic early warning method based on ARIMA model
CN116163807A
Method, device and equipment for detecting abnormal characteristic value of time sequence of substation equipment
CN114708119A
Medium and long term power load prediction method and system based on improved seasonal ARIMA model
CN116995668A