Power grid signal stability analysis method and system
By collecting and preprocessing power grid signal data in real time, extracting time domain features and evaluating stability, the problem that the existing technology cannot directly reflect the instantaneous changes and sudden changes in the signal are solved, and efficient evaluation and intuitive display of power grid signal stability are achieved.
Patent Information
- Application Number
- CN202411766051.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing grid signal stability analysis methods cannot more directly reflect the instantaneous changes and mutations of the signal, and cannot provide an intuitive visual display.
By collecting power grid signal operation data in real time, pre-processing is performed to remove noise and supplement missing data, extract time domain characteristic information, evaluate signal stability, and visualize outliers and stability.
It realizes a more direct and accurate assessment of the stability of the power grid signal, can detect instantaneous changes and sudden changes in the signal in a timely manner, and provides intuitive results display through graphical methods.
Smart Images

Figure CN119619722A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power grid signal detection, and in particular relates to a power grid signal stability analysis method and system. Background Art
[0002] With the large-scale grid connection of renewable energy, traditional power equipment, grid structure and operation technology have become increasingly incapable of accommodating large-scale intermittent energy. The DC grid is an intelligent and stable DC wide-area transmission network with an advanced energy management system. It can realize multi-power supply and multi-point power reception. It is an important means to solve the problem of high-proportion renewable energy collection and consumption. Its construction will greatly alleviate the above-mentioned problems of existing technologies.
[0003] The stability of power grid signals is one of the key factors to ensure the safe operation of power systems. Power grid signal detection technology has been widely used in modern power systems, mainly for real-time monitoring of power grid operation status and timely detection and processing of power grid anomalies.
[0004] However, the existing power grid signal stability analysis methods mainly rely on frequency domain analysis technology, which cannot more directly reflect the instantaneous changes and mutations of the signal, and cannot provide an intuitive visual display of the results. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a method and system for analyzing the stability of a power grid signal, aiming to solve the problem raised in the third part of the background technology.
[0006] The embodiment of the present invention is implemented as follows: a method for analyzing the stability of a power grid signal, the method comprising:
[0007] Collecting grid signal operation data in real time, including voltage, current and frequency;
[0008] Preprocessing the running data, wherein the preprocessing includes removing noise and supplementing missing data in the data by interpolation;
[0009] Extracting and processing characteristic information of the preprocessed signal, wherein the characteristic information is a time domain characteristic, and evaluating the stability of the power grid signal through the processed characteristic information;
[0010] The preprocessed signal is compared with the threshold. If the preprocessed signal exceeds the threshold, it is determined to be an outlier. The detected outlier and stability are visualized. The visualization is to display the outlier and stability through graphics.
[0011] Preferably, the preprocessing of the operating data includes the steps of removing noise and supplementing missing data in the data by interpolation, specifically including:
[0012] Preprocess the running data and remove noise by adjusting the filter parameters of the adaptive filter;
[0013] Identify power grid signal data with missing values, mark them as missing data, and supplement the missing data through interpolation;
[0014] The supplemented power grid signal data is standardized and normalized, wherein the standardization is used for data with different dimensions and large differences in numerical ranges, and the normalization is used to process data with large differences.
[0015] Preferably, the step of extracting and processing characteristic information of the preprocessed signal, wherein the characteristic information is a time domain characteristic, and evaluating the stability of the power grid signal through the processed characteristic information specifically includes:
[0016] Extracting time domain features of the preprocessed signal, wherein the time domain features include mean, variance, standard deviation and peak value;
[0017] Compare the real-time grid signal operation data with the time domain characteristics. If the comparison result exceeds the preset value, it is determined that a fault has occurred in the grid;
[0018] If the comparison result does not exceed the preset value, the stability of the real-time power grid signal operation data is judged by the comparison result.
[0019] Preferably, the pre-processed signal is compared with a threshold value, and if the pre-processed signal exceeds the threshold value, it is determined to be an outlier, and the detected outlier value and stability are visualized, and the visualization is a step of displaying the outlier value and stability through graphics, specifically including:
[0020] The mean and standard deviation in the time domain features are processed by the standard score to obtain the processing result, which is compared with the threshold. If the processing result exceeds the threshold, it is determined to be an abnormal value;
[0021] Visualize the detected outliers and stability, and process the outliers and stability into line graphs according to the time domain characteristics;
[0022] Send the visualization processing results to the terminal and receive the terminal confirmation signal.
[0023] Preferably, the visualization process processes outliers and stability into a bar graph.
[0024] Another object of an embodiment of the present invention is to provide a power grid signal stability analysis system, the system comprising:
[0025] A data collection module collects power grid signal operation data in real time, wherein the operation data includes voltage, current and frequency;
[0026] A data preprocessing module is used to preprocess the running data, wherein the preprocessing includes removing noise and supplementing missing data in the data by interpolation;
[0027] A feature extraction module extracts and processes feature information of the preprocessed signal, wherein the feature information is a time domain feature, and the stability of the power grid signal is evaluated through the processed feature information;
[0028] The visualization module compares the preprocessed signal with the threshold. If the preprocessed signal exceeds the threshold, it is determined to be an outlier. The detected outlier and stability are visualized. The visualization is to display the outlier and stability through graphics.
[0029] Preferably, the data preprocessing module includes:
[0030] Preprocess the running data and remove noise by adjusting the filter parameters of the adaptive filter;
[0031] Identify power grid signal data with missing values, mark them as missing data, and supplement the missing data through interpolation;
[0032] The supplemented power grid signal data is standardized and normalized, wherein the standardization is used for data with different dimensions and large differences in numerical ranges, and the normalization is used to process data with large differences.
[0033] Preferably, the feature extraction module includes:
[0034] Extracting time domain features of the preprocessed signal, wherein the time domain features include mean, variance, standard deviation and peak value;
[0035] Compare the real-time grid signal operation data with the time domain characteristics. If the comparison result exceeds the preset value, it is determined that a fault has occurred in the grid;
[0036] If the comparison result does not exceed the preset value, the stability of the real-time power grid signal operation data is judged by the comparison result.
[0037] Preferably, the visualization module includes:
[0038] The mean and standard deviation in the time domain features are processed by the standard score to obtain the processing result, which is compared with the threshold. If the processing result exceeds the threshold, it is determined to be an abnormal value;
[0039] Visualize the detected outliers and stability, and process the outliers and stability into line graphs according to the time domain characteristics;
[0040] Send the visualization processing results to the terminal and receive the terminal confirmation signal.
[0041] Preferably, the visualization process processes outliers and stability into a bar graph.
[0042] A power grid signal stability analysis method provided by an embodiment of the present invention collects power grid signal operation data in real time. By combining different types of sensor data, more comprehensive power grid status information can be provided. The data collected by various sensors may have different sampling frequencies and timestamps. In this case, the operation data needs to be preprocessed to ensure data quality and analysis accuracy. After missing values appear in the power grid signal data, the missing data is supplemented by interpolation to ensure the smoothness of the supplemented power grid data. The time domain characteristics of the preprocessed signal are extracted and processed. The stability of the power grid signal is judged by calculating the mean, variance, standard deviation and peak value. The preprocessed signal is compared with a threshold. If the preprocessed signal exceeds the threshold, it is judged as an abnormal value, such as an emergency, a fault or an abnormal fluctuation. The detected abnormal value and stability are visualized, which solves the problem that the instantaneous change and mutation of the signal cannot be reflected more directly and the result cannot be provided with an intuitive visual display. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of a power grid signal stability analysis method provided by an embodiment of the present invention;
[0044] Figure 2 A flowchart of preprocessing operation data provided by an embodiment of the present invention, wherein the preprocessing includes removing noise and supplementing missing data in the data by interpolation;
[0045] Figure 3 A flowchart of the steps of extracting and processing characteristic information of a preprocessed signal provided by an embodiment of the present invention, wherein the characteristic information is a time domain characteristic, and evaluating the stability of a power grid signal through the processed characteristic information;
[0046] Figure 4 The embodiment of the present invention provides a method for comparing the preprocessed signal with a threshold value. If the preprocessed signal exceeds the threshold value, it is determined to be an outlier. The detected outlier and stability are visualized. The visualization is a flowchart showing the steps of the outlier and stability through graphics.
[0047] Figure 5 An architecture diagram of a power grid signal stability analysis system provided by an embodiment of the present invention;
[0048] Figure 6 An architecture diagram of a data preprocessing module provided in an embodiment of the present invention;
[0049] Figure 7 An architecture diagram of a feature extraction module provided in an embodiment of the present invention;
[0050] Figure 8 An architectural diagram of a visualization module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0052] like Figure 1 As shown, a method for analyzing the stability of a power grid signal is provided in an embodiment of the present invention, and the method includes:
[0053] S100, collecting power grid signal operation data in real time, where the operation data includes voltage, current and frequency.
[0054] In this step, the power grid signal operation data is collected in real time. By combining different types of sensor data, more comprehensive power grid status information can be provided. The multi-source data fusion method helps to obtain more dimensional power grid operation information and improve the accuracy of monitoring and analysis.
[0055] Voltage sensors can be used to monitor voltage changes, current sensors can be used to monitor current fluctuations, frequency sensors can be used to monitor grid frequency, temperature sensors can be used to monitor equipment and ambient temperature, vibration sensors can be used to monitor vibration conditions of transformers and other equipment, and environmental sensors can be used to monitor environmental factors such as humidity and air pressure.
[0056] For example, by combining current and temperature data, the temperature rise of the transformer under different load conditions can be analyzed to evaluate the thermal stability of the transformer. By combining current and vibration data, it can be identified whether abnormal vibration is related to load fluctuations and whether there is a mechanical or electrical fault.
[0057] By combining different types of sensor data, more comprehensive grid status information can be provided, helping grid operators to more accurately monitor and analyze grid operation status, improve the efficiency of fault detection and location, and enhance the safety and stability of the grid. In specific applications, it can be configured according to actual needs and sensors.
[0058] S200, preprocessing the running data, wherein the preprocessing includes removing noise and supplementing missing data in the data by interpolation.
[0059] In this step, the operation data is preprocessed. Since the power grid information is collected by a variety of sensors, the data collected by various sensors may have different sampling frequencies and timestamps. Therefore, data preprocessing and time synchronization are required. Adaptive filters are used to dynamically adjust the filter parameters according to the signal characteristics, which can more effectively remove noise.
[0060] During the operation of the power grid, missing values often appear in the power grid signal data due to sensor failures, communication problems and other reasons. If these missing values are not processed, they will affect the accuracy and reliability of subsequent data analysis and power grid operation monitoring. Therefore, timely and accurate filling of missing values is crucial to the safe operation of the power grid system. The KNN algorithm can be used to fill missing values. KNN (K-NearestNeighbors) is a commonly used non-parametric classification and regression algorithm. Its basic idea is to predict the value of an unknown sample point based on the known values of the nearest K sample points in space. Specifically, in the processing of missing values, the known values in its neighborhood are used to estimate the missing values.
[0061] S300, extracting and processing characteristic information of the preprocessed signal, wherein the characteristic information is a time domain characteristic, and evaluating the stability of the power grid signal through the processed characteristic information.
[0062] In this step, the characteristic information of the preprocessed signal is extracted and processed. Signal feature extraction is the process of extracting useful information from the original signal data for further analysis, modeling and decision-making. The time domain feature is the feature extracted directly from the time series data, which is used to describe the change of the signal in the time dimension, so as to evaluate the stability of the power grid signal.
[0063] For example, for a set of voltage signal data, its mean, standard deviation and peak value can be calculated to understand the central trend, fluctuation range and maximum voltage value of the voltage. In voltage signal processing, the mean can help determine the average level of the voltage and then determine whether there is a long-term voltage offset problem.
[0064] S400, comparing the preprocessed signal with a threshold value, if the preprocessed signal exceeds the threshold value, it is determined to be an outlier, and the detected outlier and stability are visualized, wherein the visualization is to display the outlier and stability through graphics.
[0065] In this step, the preprocessed signal is compared with the threshold to detect and analyze abnormal phenomena in the signal, such as emergencies, failures, or abnormal fluctuations. The Z-score detection method is used to detect abnormal values using the mean and standard deviation of the signal. When the result exceeds a certain threshold, it is considered an abnormal value;
[0066] Result visualization is to display the detected anomaly results and analysis results in a graphical way to facilitate understanding and decision-making. Line charts are suitable for displaying trends and anomalies in time series data, and bar charts are suitable for comparing the number of anomalies at different time points or in different categories.
[0067] For example, a time series line chart of voltage data highlights abnormal points and the number of abnormal voltage events in different time periods.
[0068] like Figure 2 As shown, as a preferred embodiment of the present invention, the operation data is preprocessed, and the preprocessing includes the steps of removing noise and supplementing missing data in the data by interpolation, specifically including:
[0069] S201, pre-processing the operating data to remove noise by adjusting the filtering parameters of the adaptive filter.
[0070] In this step, the operating data is preprocessed, and the adaptive filter is used to dynamically adjust the filter parameters according to the signal characteristics, which can more effectively remove noise;
[0071] For example, the Kalman filter can provide the best signal estimation based on the system state and the estimation of measurement noise. In the grid voltage data processing, the Kalman filter is applied to remove the high-frequency noise in the voltage signal in real time and retain the valid signal.
[0072] S202, identifying power grid signal data containing missing values, marking them as missing data, and supplementing the missing data by interpolation.
[0073] In this step, the power grid signal data containing missing values is identified and marked as missing data. Linear interpolation is used to apply spline interpolation to the time series data to generate smooth interpolation results. The KNN algorithm can also be used to predict and fill in missing values based on adjacent sensor data to improve data integrity.
[0074] Linear interpolation is a simple and commonly used interpolation method used to generate new data points between existing data points to fill in missing values. It estimates missing values based on the linear relationship between known data points. Suppose there is a set of voltage data, some of which are missing:
[0075] Time (t): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
[0076] Voltage (V): 10, 12, 14, NA, NA, 18, 20, NA, 24, 26
[0077] Find the location of the missing values. For the data above, the missing values are located at time points t=4, 5, and 8.
[0078] For two known data points (x0, y0) and (x1, y1), the interpolation formula is:
[0079]
[0080] Where x is the location of the missing value and y is the value calculated by interpolation;
[0081] The first missing point t = 4
[0082] The known data points are t=3 (V=14) and t=6 (V=18);
[0083] Interpolation calculation:
[0084]
[0085] The second missing point t = 5
[0086] The known data points are t=3 (V=14) and t=6 (V=18).
[0087] Interpolation calculation:
[0088]
[0089] The third missing point t = 8
[0090] The known data points are t=7 (V=20) and t=9 (V=24);
[0091] Interpolation calculation:
[0092]
[0093] Fill the interpolation results into the original data to get the complete voltage data:
[0094] Time (t): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
[0095] Voltage(V):10,12,14,15.33,16.67,18,20,22,24,26.
[0096] Assume that in a power grid monitoring system, the voltage, current and other signal data of multiple sensors are recorded. At a certain moment, due to a sensor failure, the data at that moment is missing. To apply the KNN algorithm to fill this missing value, you can follow the following steps:
[0097] Collect normal working data of other sensors over a period of time.
[0098] Normalize these data and calculate the distance.
[0099] Select the nearest K neighbors and calculate their average to fill in the missing values.
[0100] Through the above steps, the KNN algorithm can effectively fill the dynamic missing values of power grid signals and improve the integrity and reliability of data.
[0101] S203, standardizing and normalizing the supplemented power grid signal data, wherein the standardization is used for data with different dimensions and large differences in numerical ranges, and the normalization is used for processing data with large differences.
[0102] In this step, the supplemented power grid signal data is standardized and normalized, and the data is converted into a standard normal distribution with a mean of 0 and a standard deviation of 1 to eliminate the dimension effect. For example, the Z-score normalization method is used to scale the data to a range of 0 to 1 to facilitate the comparison and processing of data of different magnitudes. For example, the Min-Max normalization method is used;
[0103] Among them, Z-score, also known as standard score, is a statistic used to describe the position of a data point in a standard normal distribution. Specifically, Z-score represents the distance between a data point and the mean of the distribution, measured in standard deviation. Z-score can help us understand and compare the relative positions of data points in different data sets; Min-Max normalization method is a commonly used data preprocessing technique used to scale data to a specified range (usually 0 to 1). This method can make data with different features on the same scale, which is convenient for subsequent analysis and processing;
[0104] The Z-score formula is:
[0105] Where x is the original data, μ is the mean of the data, σ is the standard deviation of the data, and z is the standardized data.
[0106] The Min-Max formula is:
[0107] Where x is the original data, x min and x max are the minimum and maximum values of the data set, respectively, and x′ is the normalized data.
[0108] like Figure 3 As shown, as a preferred embodiment of the present invention, the step of extracting and processing the characteristic information of the preprocessed signal, wherein the characteristic information is a time domain feature, and evaluating the stability of the power grid signal through the processed characteristic information specifically includes:
[0109] S301, extracting time domain features of the preprocessed signal, wherein the time domain features include mean, variance, standard deviation and peak value.
[0110] In this step, the time domain features of the preprocessed signal are extracted. The time domain features are features extracted directly from time series data and are often used to describe the changes in the signal in the time dimension.
[0111] Mean: The average value of a signal, indicating the central trend of the signal. The mean provides the average level of the signal and is a basic statistic for evaluating the signal. As a reference point, the mean can help detect abnormal signals that deviate from the average level. In voltage signal processing, the mean can help determine the average level of the voltage and thus determine whether there is a long-term voltage offset problem.
[0112]
[0113] Where N is the number of samples of the signal, x i is the i-th sample.
[0114] Variance: The degree of discreteness of signal data. Variance indicates the volatility of the signal. A high variance indicates that the signal has large fluctuations, and a low variance indicates that the signal is relatively stable.
[0115]
[0116] where μ is the mean of the signal.
[0117] Standard Deviation: The square root of the discreteness of signal data. Standard deviation can be used to describe the distribution characteristics of data and help identify outliers.
[0118]
[0119] Peak Value: The maximum value in a signal, indicating the extreme value of the signal. In power signal processing, the peak value is used to evaluate the maximum power load of the signal.
[0120] Peak=max(x i ).
[0121] For example, for a set of voltage signal data, its mean, standard deviation, and peak value can be calculated to understand the central trend, fluctuation range, and maximum voltage value of the voltage.
[0122] S302, comparing the real-time power grid signal operation data with the time domain characteristics, if the comparison result exceeds a preset value, it is determined that a fault occurs in the power grid.
[0123] In this step, the real-time grid signal operation data is compared with the time domain features, and the time domain signal feature extraction provides the basic data required for stability assessment. By extracting important features from the time domain signal, such as voltage and current fluctuations, frequency changes, etc., the stability assessment can conduct in-depth analysis based on these features and identify potential problems in the system;
[0124] If the comparison result exceeds the preset value, it is judged that a fault has occurred in the power grid. For example, by analyzing the amplitude and frequency characteristics of the signal, when the comparison result exceeds the preset value, problems such as short circuit and harmonic distortion can be detected. This information is very important for stability assessment because it can indicate potential stability problems of the system and help take preventive or corrective measures in time.
[0125] S303: If the comparison result does not exceed the preset value, the stability of the real-time power grid signal operation data is determined by the comparison result.
[0126] In this step, if the comparison result does not exceed the preset value, the stability of the signal can be determined by the mean and variance. The closer to the mean, the more stable the signal, and the smaller the variance, the more stable the signal.
[0127] Mean: The average value of a signal, indicating the central trend of the signal. The mean provides the average level of the signal and is a basic statistic for evaluating the signal. As a reference point, the mean can help detect abnormal signals that deviate from the average level. In voltage signal processing, the mean can help determine the average level of the voltage and thus determine whether there is a long-term voltage offset problem.
[0128]
[0129] Where N is the number of samples of the signal, x i is the i-th sample.
[0130] Variance: The degree of discreteness of signal data. Variance indicates the volatility of the signal. A high variance indicates that the signal has large fluctuations, and a low variance indicates that the signal is relatively stable.
[0131]
[0132] where μ is the mean of the signal.
[0133] like Figure 4 As shown in FIG. 1 , as a preferred embodiment of the present invention, the pre-processed signal is compared with a threshold value. If the pre-processed signal exceeds the threshold value, it is determined to be an abnormal value, and the detected abnormal value and stability are visualized. The visualization is a step of displaying the abnormal value and stability through graphics, which specifically includes:
[0134] S401, the mean and standard deviation in the time domain feature are processed by the standard score to obtain a processing result, which is compared with the threshold. If the processing result exceeds the threshold, it is determined to be an abnormal value.
[0135] In this step, the mean and standard deviation in the time domain features are processed by the standard score to obtain the processing result, which is compared with the threshold;
[0136] For example, there is a set of voltage data of the power system:
[0137] Time (t): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
[0138] Voltage (V): 220, 230, 240, 300, 260, 250, 240, 230, 225, 215 Using the Z-score method:
[0139] μ V =237.5,σ V =26.91
[0140] Calculate the Z-score: If the threshold is set to 2, 300 is detected as an outlier.
[0141] S402, visualizing the detected outliers and stability, and processing the outliers and stability into a line graph according to the time domain characteristics.
[0142] In this step, the detected outliers and stability are visualized, and the detected anomaly results and analysis results are displayed in a graphical way to facilitate understanding and decision-making. Commonly used visualization tools and methods include line charts and bar charts. Line charts are suitable for displaying trends and anomalies in time series data, and bar charts are suitable for comparing the number of anomalies at different time points or in different categories.
[0143] Line chart visualization code:
[0144]
[0145] Histogram visualization code:
[0146] import matplotlib.pyplot as plt
[0147] #Time period and number of anomalies
[0148] time_periods=['1-3', '4-6', '7-9', '10-12']
[0149] anomaly_counts=[1, 2, 0, 1]
[0150] plt.figure(figsize=(10,5))
[0151] plt.bar(time_periods, anomaly_counts, color='orange')
[0152] plt.xlabel('Time Period')
[0153] plt.ylabel('Number ofAnomalies')
[0154] plt.title('Anomalies Detected in Different Time Periods')
[0155] plt.show()
[0156] S403, sending the visualization processing result to the terminal, and receiving a confirmation signal from the terminal.
[0157] In this step, the visualization processing result is sent to the terminal. After the terminal browses the line chart or bar chart, after confirmation, a confirmation message is sent. When a terminal confirmation signal is received, the generated line chart or bar chart is saved.
[0158] like Figure 5 As shown, a power grid signal stability analysis system provided by an embodiment of the present invention includes:
[0159] The data collection module 100 is used to collect power grid signal operation data in real time, and the operation data includes voltage, current and frequency.
[0160] In this system, the data collection module 100 collects power grid signal operation data in real time. By combining different types of sensor data, more comprehensive power grid status information can be provided. The multi-source data fusion method helps to obtain more dimensional power grid operation information and improve the accuracy of monitoring and analysis.
[0161] Voltage sensors can be used to monitor voltage changes, current sensors can be used to monitor current fluctuations, frequency sensors can be used to monitor grid frequency, temperature sensors can be used to monitor equipment and ambient temperature, vibration sensors can be used to monitor vibration conditions of transformers and other equipment, and environmental sensors can be used to monitor environmental factors such as humidity and air pressure.
[0162] For example, by combining current and temperature data, the temperature rise of the transformer under different load conditions can be analyzed to evaluate the thermal stability of the transformer. By combining current and vibration data, it can be identified whether abnormal vibration is related to load fluctuations and whether there is a mechanical or electrical fault.
[0163] By combining different types of sensor data, more comprehensive grid status information can be provided, helping grid operators to more accurately monitor and analyze grid operation status, improve the efficiency of fault detection and location, and enhance the safety and stability of the grid. In specific applications, it can be configured according to actual needs and sensors.
[0164] The data preprocessing module 200 is used to preprocess the operating data, wherein the preprocessing includes removing noise and supplementing missing data in the data by interpolation.
[0165] In this system, the data preprocessing module 200 preprocesses the operation data. Since the power grid information is collected through a variety of sensors, the data collected by various sensors may have different sampling frequencies and timestamps, so data preprocessing and time synchronization are required. Adaptive filters are used to dynamically adjust the filter parameters according to signal characteristics, which can more effectively remove noise.
[0166] During the operation of the power grid, missing values often appear in the power grid signal data due to sensor failures, communication problems and other reasons. If these missing values are not processed, they will affect the accuracy and reliability of subsequent data analysis and power grid operation monitoring. Therefore, timely and accurate filling of missing values is crucial to the safe operation of the power grid system. The KNN algorithm can be used to fill missing values. KNN (K-NearestNeighbors) is a commonly used non-parametric classification and regression algorithm. Its basic idea is to predict the value of an unknown sample point based on the known values of the nearest K sample points in space. Specifically, in the processing of missing values, the known values in its neighborhood are used to estimate the missing values.
[0167] The feature extraction module 300 is used to extract and process the feature information of the preprocessed signal, wherein the feature information is a time domain feature, and the stability of the power grid signal is evaluated through the processed feature information.
[0168] In this system, the feature extraction module 300 extracts and processes the feature information of the preprocessed signal. Signal feature extraction is the process of extracting useful information from the original signal data for further analysis, modeling and decision-making. The time domain feature is a feature directly extracted from the time series data, which is used to describe the change of the signal in the time dimension, so as to evaluate the stability of the power grid signal.
[0169] For example, for a set of voltage signal data, its mean, standard deviation and peak value can be calculated to understand the central trend, fluctuation range and maximum voltage value of the voltage. In voltage signal processing, the mean can help determine the average level of the voltage and then determine whether there is a long-term voltage offset problem.
[0170] The visualization module 400 is used to compare the preprocessed signal with a threshold. If the preprocessed signal exceeds the threshold, it is determined to be an outlier. The detected outlier and stability are visualized. The visualization is to display the outlier and stability through graphics.
[0171] In this system, the visualization module 400 compares the pre-processed signal with the threshold value to detect and analyze abnormal phenomena in the signal, such as emergencies, failures or abnormal fluctuations. The Z-score detection method is used to detect abnormal values using the mean and standard deviation of the signal. When the result exceeds a certain threshold, it is considered to be an abnormal value;
[0172] Result visualization is to display the detected anomaly results and analysis results in a graphical way to facilitate understanding and decision-making. Line charts are suitable for displaying trends and anomalies in time series data, and bar charts are suitable for comparing the number of anomalies at different time points or in different categories.
[0173] For example, a time series line chart of voltage data highlights abnormal points and the number of abnormal voltage events in different time periods.
[0174] like Figure 6 As shown, as a preferred embodiment of the present invention, the data preprocessing module 200 includes:
[0175] The preprocessing unit 201 is used to preprocess the operating data and remove noise by adjusting the filtering parameters of the adaptive filter.
[0176] In this module, the preprocessing unit 201 preprocesses the operating data and uses an adaptive filter to dynamically adjust the filter parameters according to the signal characteristics, which can more effectively remove noise;
[0177] For example, the Kalman filter can provide the best signal estimation based on the system state and the estimation of measurement noise. In the grid voltage data processing, the Kalman filter is applied to remove the high-frequency noise in the voltage signal in real time and retain the valid signal.
[0178] The missing value supplement unit 202 is used to identify the power grid signal data containing missing values, mark them as missing data, and supplement the missing data by interpolation.
[0179] In this module, the missing value supplementation unit 202 identifies the power grid signal data containing missing values and marks them as missing data. It uses linear interpolation to apply spline interpolation to the time series data to generate a smooth interpolation result. It can also use the KNN algorithm to predict and fill in the missing values based on the adjacent sensor data to improve data integrity.
[0180] Linear interpolation is a simple and commonly used interpolation method used to generate new data points between existing data points to fill in missing values. It estimates missing values based on the linear relationship between known data points. Suppose there is a set of voltage data, some of which are missing:
[0181] Time (t): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
[0182] Voltage (V): 10, 12, 14, NA, NA, 18, 20, NA, 24, 26
[0183] Find the location of the missing values. For the data above, the missing values are located at time points t=4, 5, and 8.
[0184] For two known data points (x0, y0) and (x1, y1), the interpolation formula is:
[0185]
[0186] Where x is the location of the missing value and y is the value calculated by interpolation;
[0187] The first missing point t = 4
[0188] The known data points are t=3 (V=14) and t=6 (V=18);
[0189] Interpolation calculation:
[0190]
[0191] The second missing point t = 5
[0192] The known data points are t=3 (V=14) and t=6 (V=18).
[0193] Interpolation calculation:
[0194]
[0195] The third missing point t = 8
[0196] The known data points are t=7 (V=20) and t=9 (V=24);
[0197] Interpolation calculation:
[0198]
[0199] Fill the interpolation results into the original data to get the complete voltage data:
[0200] Time (t): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
[0201] Voltage(V):10,12,14,15.33,16.67,18,20,22,24,26.
[0202] Assume that in a power grid monitoring system, the voltage, current and other signal data of multiple sensors are recorded. At a certain moment, due to a sensor failure, the data at that moment is missing. To apply the KNN algorithm to fill this missing value, you can follow the following steps:
[0203] Collect normal working data of other sensors over a period of time.
[0204] Normalize these data and calculate the distance.
[0205] Select the nearest K neighbors and calculate their average to fill in the missing values.
[0206] Through the above steps, the KNN algorithm can effectively fill the dynamic missing values of power grid signals and improve the integrity and reliability of data.
[0207] The standardization unit 203 is used to perform standardization and normalization processing on the supplemented power grid signal data. The standardization is used for data with different dimensions and large differences in numerical ranges, and the normalization is used to process data with large differences.
[0208] In this module, the standardization unit 203 performs standardization and normalization processing on the supplemented power grid signal data, converting the data into a standard normal distribution with a mean of 0 and a standard deviation of 1 to eliminate the dimension effect. For example, the Z-score standardization method is used to scale the data to a range of 0 to 1, which facilitates the comparison and processing of data of different magnitudes. For example, the Min-Max normalization method is used;
[0209] Among them, Z-score, also known as standard score, is a statistic used to describe the position of a data point in a standard normal distribution. Specifically, Z-score represents the distance between a data point and the mean of the distribution, measured in standard deviation. Z-score can help us understand and compare the relative positions of data points in different data sets; Min-Max normalization method is a commonly used data preprocessing technique used to scale data to a specified range (usually 0 to 1). This method can make data with different features on the same scale, which is convenient for subsequent analysis and processing;
[0210] The Z-score formula is:
[0211] Where x is the original data, μ is the mean of the data, σ is the standard deviation of the data, and z is the standardized data.
[0212] The Min-Max formula is:
[0213] Where x is the original data, x min and x max are the minimum and maximum values of the data set, respectively, and x′ is the normalized data.
[0214] like Figure 7 As shown, as a preferred embodiment of the present invention, the feature extraction module 300 includes:
[0215] The time domain feature unit 301 is used to extract the time domain features of the preprocessed signal, wherein the time domain features include mean, variance, standard deviation and peak value.
[0216] In this module, the time domain feature unit 301 extracts the time domain features of the preprocessed signal. The time domain features are features extracted directly from time series data and are often used to describe changes in the signal in the time dimension.
[0217] in
[0218] Mean: The average value of a signal, indicating the central trend of the signal. The mean provides the average level of the signal and is a basic statistic for evaluating the signal. As a reference point, the mean can help detect abnormal signals that deviate from the average level. In voltage signal processing, the mean can help determine the average level of the voltage and thus determine whether there is a long-term voltage offset problem.
[0219]
[0220] Where N is the number of samples in the signal, x i is the i-th sample.
[0221] Variance: The degree of discreteness of signal data. Variance indicates the volatility of the signal. A high variance indicates that the signal has large fluctuations, and a low variance indicates that the signal is relatively stable.
[0222]
[0223] where μ is the mean of the signal.
[0224] Standard Deviation: The square root of the discreteness of signal data. Standard deviation can be used to describe the distribution characteristics of data and help identify outliers.
[0225]
[0226] Peak Value: The maximum value in a signal, indicating the extreme value of the signal. In power signal processing, the peak value is used to evaluate the maximum power load of the signal.
[0227] Peak=max(x i ).
[0228] For example, for a set of voltage signal data, its mean, standard deviation, and peak value can be calculated to understand the central trend, fluctuation range, and maximum voltage value of the voltage.
[0229] The comparison unit 302 is used to compare the real-time power grid signal operation data with the time domain characteristics. If the comparison result exceeds a preset value, it is determined that a fault occurs in the power grid.
[0230] In this module, the comparison unit 302 compares the real-time grid signal operation data with the time domain features, and the time domain signal feature extraction provides the basic data required for stability assessment. By extracting important features from the time domain signal, such as voltage and current fluctuations, frequency changes, etc., the stability assessment can conduct in-depth analysis based on these features and identify potential problems in the system;
[0231] If the comparison result exceeds the preset value, it is judged that a fault has occurred in the power grid. For example, by analyzing the amplitude and frequency characteristics of the signal, when the comparison result exceeds the preset value, problems such as short circuit and harmonic distortion can be detected. This information is very important for stability assessment because it can indicate potential stability problems of the system and help take preventive or corrective measures in time.
[0232] The stability judgment unit 303 is used to judge the stability of the real-time power grid signal operation data through the comparison result if the comparison result does not exceed the preset value.
[0233] In this module, if the comparison result does not exceed the preset value, the stability judgment unit 303 can judge the stability of the signal by the mean and variance. The closer to the mean, the more stable the signal, and the smaller the variance, the more stable the signal.
[0234] Mean: The average value of a signal, indicating the central trend of the signal. The mean provides the average level of the signal and is a basic statistic for evaluating the signal. As a reference point, the mean can help detect abnormal signals that deviate from the average level. In voltage signal processing, the mean can help determine the average level of the voltage and thus determine whether there is a long-term voltage offset problem.
[0235]
[0236] Where N is the number of samples in the signal, x i is the i-th sample.
[0237] Variance: The degree of discreteness of signal data. Variance indicates the volatility of the signal. A high variance indicates that the signal has large fluctuations, and a low variance indicates that the signal is relatively stable.
[0238]
[0239] where μ is the mean of the signal.
[0240] like Figure 8 As shown, as a preferred embodiment of the present invention, the visualization module 400 includes:
[0241] The outlier determination unit 401 is used to process the mean and standard deviation in the time domain feature through the standard score to obtain a processing result, compare it with the threshold, and if the processing result exceeds the threshold, it is determined to be an outlier.
[0242] In this module, the outlier determination unit 401 processes the mean and standard deviation in the time domain feature through the standard score, obtains the processing result, and compares it with the threshold;
[0243] For example, there is a set of voltage data of the power system:
[0244] Time (t): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
[0245] Voltage (V): 220, 230, 240, 300, 260, 250, 240, 230, 225, 215 Using the Z-score method:
[0246] μ V =237.5,σ V =26.91
[0247] Calculate the Z-score: If the threshold is set to 2, 300 is detected as an outlier.
[0248] The visualization unit 402 is used to visualize the detected abnormal values and stability, and process the abnormal values and stability into a line graph according to the time domain characteristics.
[0249] In this module, the visualization unit 402 visualizes the detected outliers and stability, and displays the detected anomaly results and analysis results in a graphical manner for easy understanding and decision-making. Common visualization tools and methods include line graphs and bar graphs, where line graphs are suitable for displaying trends and anomalies of time series data, and bar graphs are suitable for comparing the number of anomalies at different time points or in different categories.
[0250] Line chart visualization code:
[0251]
[0252]
[0253]
[0254] The confirmation unit 403 is used to send the visualization processing result to the terminal and receive a confirmation signal from the terminal.
[0255] In this module, the confirmation unit 403 sends the visualization processing result to the terminal. After the terminal browses the line chart or bar chart, it sends confirmation information after confirmation. When the terminal confirmation signal is received, the generated line chart or bar chart is saved.
[0256] In one embodiment, a computer device is provided, the computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0257] Collecting grid signal operation data in real time, including voltage, current and frequency;
[0258] Preprocessing the running data, wherein the preprocessing includes removing noise and supplementing missing data in the data by interpolation;
[0259] Extracting and processing characteristic information of the preprocessed signal, wherein the characteristic information is a time domain characteristic, and evaluating the stability of the power grid signal through the processed characteristic information;
[0260] The preprocessed signal is compared with the threshold. If the preprocessed signal exceeds the threshold, it is determined to be an outlier. The detected outlier and stability are visualized. The visualization is to display the outlier and stability through graphics.
[0261] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the processor performs the following steps:
[0262] Collecting grid signal operation data in real time, including voltage, current and frequency;
[0263] Preprocessing the running data, wherein the preprocessing includes removing noise and supplementing missing data in the data by interpolation;
[0264] Extracting and processing characteristic information of the preprocessed signal, wherein the characteristic information is a time domain characteristic, and evaluating the stability of the power grid signal through the processed characteristic information;
[0265] The preprocessed signal is compared with the threshold. If the preprocessed signal exceeds the threshold, it is determined to be an outlier. The detected outlier and stability are visualized. The visualization is to display the outlier and stability through graphics.
[0266] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0267] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0268] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0269] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0270] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for analyzing power grid signal stability, characterized in that: The method comprises: Collecting grid signal operation data in real time, including voltage, current and frequency; Preprocessing the running data, wherein the preprocessing includes removing noise and supplementing missing data in the data by interpolation; Extracting and processing characteristic information of the preprocessed signal, wherein the characteristic information is a time domain characteristic, and evaluating the stability of the power grid signal through the processed characteristic information; The preprocessed signal is compared with the threshold. If the preprocessed signal exceeds the threshold, it is determined to be an outlier. The detected outlier and stability are visualized. The visualization is to display the outlier and stability through graphics.
2. A method for analyzing power grid signal stability according to claim 1, characterized in that: The preprocessing of the running data includes the steps of removing noise and supplementing missing data in the data by interpolation, specifically including: Preprocess the running data and remove noise by adjusting the filter parameters of the adaptive filter; Identify power grid signal data with missing values, mark them as missing data, and supplement the missing data through interpolation; The supplemented power grid signal data is standardized and normalized, wherein the standardization is used for data with different dimensions and large differences in numerical ranges, and the normalization is used to process data with large differences.
3. A method for analyzing power grid signal stability according to claim 2, characterized in that: The step of extracting and processing characteristic information of the preprocessed signal, wherein the characteristic information is a time domain characteristic, and evaluating the stability of the power grid signal through the processed characteristic information specifically includes: Extracting time domain features of the preprocessed signal, wherein the time domain features include mean, variance, standard deviation and peak value; Compare the real-time grid signal operation data with the time domain characteristics. If the comparison result exceeds the preset value, it is determined that a fault has occurred in the grid; If the comparison result does not exceed the preset value, the stability of the real-time power grid signal operation data is judged by the comparison result.
4. A method for analyzing power grid signal stability according to claim 3, characterized in that: The pre-processed signal is compared with the threshold value. If the pre-processed signal exceeds the threshold value, it is determined to be an abnormal value, and the detected abnormal value and stability are visualized. The visualization process is a step of displaying the abnormal value and stability through graphics, which specifically includes: The mean and standard deviation in the time domain features are processed by the standard score to obtain the processing result, which is compared with the threshold. If the processing result exceeds the threshold, it is determined to be an abnormal value; Visualize the detected outliers and stability, and process the outliers and stability into line graphs according to the time domain characteristics; Send the visualization processing results to the terminal and receive the terminal confirmation signal.
5. A method for analyzing the stability of a power grid signal according to claim 4, characterized in that: The visualization process processes outliers and stability into histograms.
6. A power grid signal stability analysis system, characterized in that: The system comprises: A data collection module collects power grid signal operation data in real time, wherein the operation data includes voltage, current and frequency; A data preprocessing module is used to preprocess the running data, wherein the preprocessing includes removing noise and supplementing missing data in the data by interpolation; A feature extraction module extracts and processes feature information of the preprocessed signal, wherein the feature information is a time domain feature, and the stability of the power grid signal is evaluated through the processed feature information; The visualization module compares the preprocessed signal with the threshold. If the preprocessed signal exceeds the threshold, it is determined to be an outlier. The detected outlier and stability are visualized. The visualization is to display the outlier and stability through graphics.
7. A power grid signal stability analysis system according to claim 6, characterized in that: The data preprocessing module comprises: A preprocessing unit preprocesses the operating data and removes noise by adjusting the filter parameters of the adaptive filter; A missing value supplement unit identifies power grid signal data containing missing values, marks them as missing data, and supplements the missing data by interpolation; The standardization unit performs standardization and normalization processing on the supplemented power grid signal data, wherein the standardization is used for data with different dimensions and large differences in numerical ranges, and the normalization is used for processing data with large differences.
8. A power grid signal stability analysis system according to claim 7, characterized in that: The feature extraction module comprises: A time domain feature unit, which extracts the time domain features of the preprocessed signal, wherein the time domain features include mean, variance, standard deviation and peak value; A comparison unit compares the real-time power grid signal operation data with the time domain characteristics. If the comparison result exceeds the preset value, it is determined that a fault has occurred in the power grid; The stability judgment unit judges the stability of the real-time power grid signal operation data through the comparison result if the comparison result does not exceed the preset value.
9. A power grid signal stability analysis system according to claim 8, characterized in that: The visualization module comprises: The outlier determination unit processes the mean and standard deviation in the time domain feature through the standard score to obtain the processing result, and compares it with the threshold. If the processing result exceeds the threshold, it is determined to be an outlier; A visualization unit visualizes the detected outliers and stability and processes the outliers and stability into line graphs according to the time domain characteristics; The confirmation unit sends the visualization processing result to the terminal and receives the terminal confirmation signal.
10. A power grid signal stability analysis system according to claim 9, characterized in that: The visualization process processes outliers and stability into histograms.