Abnormal current fluctuation detection and adjustment method and system
By preprocessing and feature extraction of the time series data of the current value, combining the moving average method and standard score analysis, the current limiting resistance value is dynamically adjusted, which solves the problems of inaccurate detection of current abnormal fluctuations and lag response problems, and achieves efficient and reliable operation of the power system.
Patent Information
- Application Number
- CN202510348501.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, current abnormal fluctuations are detected inaccurately and the response is lagging, making it difficult to achieve precise control, lack of effective monitoring and prevention mechanisms, which affects circuit stability and safety.
By preprocessing and feature extraction of the time series data of current values, using moving average method and standard score analysis, combined with dynamic adjustment of the current limiting resistance value to keep the current within the preset safety threshold, fast response and precise control are achieved.
It improves the reliability and stability of the power system, reduces equipment damage and downtime, provides timely alarms and detailed data support, and ensures the continuous and safe operation of the system.
Smart Images

Figure CN120405211A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of leakage current detection, and particularly relates to a method for detecting and adjusting abnormal current fluctuations. Background Art
[0002] With the wide application of electronic devices, especially in the field of industrial automation, the requirements for circuit stability and safety are increasing day by day. The leakage current in the control loop may not only cause abnormal operation or failure of the device, but also cause misoperation of the circuit breaker, affecting the reliable operation of the entire system. Although some measures have been taken in the prior art to reduce the impact of leakage current, it is often difficult to achieve precise control, and there is a lack of effective monitoring and prevention mechanisms. Summary of the Invention
[0003] This application provides a method for detecting and adjusting abnormal current fluctuations to solve the problems of inaccurate detection and response lag of abnormal current fluctuations in the prior art.
[0004] The technical solution adopted by this application is as follows:
[0005] An embodiment of this application provides a method for detecting and adjusting abnormal current fluctuations, including:
[0006] Performing time series analysis on the time series data of the current value to obtain the current change trend;
[0007] Selecting two adjacent sampling points in the current change trend to calculate the current change rate between the two adjacent sampling points, and determining whether the current change rate exceeds a preset safety threshold. If it exceeds the preset safety threshold, calculating a standard score according to the current change trend, and determining whether there is an abnormal current fluctuation through the standard score;
[0008] If there is the abnormal current fluctuation, dynamically adjusting the value of the current limiting resistor to keep the current value within the preset safety threshold.
[0009] According to an embodiment of this application, before performing time series analysis on the characteristic data of the current value to obtain the current change trend, it further includes:
[0010] Preprocessing the collected current data;
[0011] Extracting the time series data from the current data, where the time series data includes: current average value, current peak value, current fluctuation range, and moving window statistic.
[0012] According to an embodiment of this application, the performing time series analysis on the time series data of the current value to obtain the current change trend is specifically:
[0013] The current change trend is obtained by using the moving average method to extract the time series data, and the specific formula is:
[0014]
[0015] where n is the size of the moving window, I(t) is the current value at time t, and i represents the time offset in the time series.
[0016] According to an embodiment of the present application, the adjacent two sampling points in the current change trend are selected to calculate the current change rate between the adjacent two sampling points, and it is determined whether the current change rate exceeds a preset safety threshold, specifically:
[0017] The current change rate between adjacent two sampling points is calculated, and the specific formula is:
[0018]
[0019] I(t2): This represents the current value measured at time t2, I(t1): This represents the current value measured at time t1, t2: This is the second time point, usually a time after t1, t1: This is the first time point, usually a time before t2, t2 - t1: This is the difference between the two time points, representing the time interval, I(t2) - I(t1): This is the change in the current value between the two time points;
[0020] If the current change rate exceeds the preset safety threshold, it is preliminarily determined as an abnormal current fluctuation.
[0021] According to an embodiment of the present application, if it exceeds the preset safety threshold, a standard score is calculated based on the current change trend, and it is determined whether there is an abnormal current fluctuation through the standard score, specifically:
[0022] For the data points preliminarily determined as the abnormal current fluctuation, calculate their standard score (Z - score):
[0023]
[0024] where X is the data point of the abnormal current fluctuation, μ is the average value of the data set, and σ is the standard deviation of the data set;
[0025] If the standard score Z exceeds 3 or is lower than - 3, it is confirmed as the abnormal current fluctuation.
[0026] According to an embodiment of the present application, if there is the abnormal current fluctuation, the current value is kept within the preset safety threshold by dynamically adjusting the value of the current - limiting resistor, specifically:
[0027] Adjust the current-limiting resistance value using the following formula:
[0028] R new = R old ×(1 + k·(I measured - I threshold ))
[0029] Wherein, R old is the current resistance value, I measured is the measured current value, I threshold is the preset safety threshold, and K is the adjustment coefficient.
[0030] An abnormal current fluctuation detection and adjustment system, comprising:
[0031] An analysis module for performing time series analysis on the time series data of the current value to obtain the current change trend;
[0032] A judgment module for selecting two adjacent sampling points in the current change trend to calculate the current change rate between the two adjacent sampling points, judging whether the current change rate exceeds the preset safety threshold, and if it exceeds the preset safety threshold, calculating a standard score according to the current change trend to judge whether there is an abnormal current fluctuation;
[0033] An adjustment module for, if there is an abnormal current fluctuation, dynamically adjusting the current-limiting resistance value to keep the current value within the preset safety threshold.
[0034] An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of the method are implemented.
[0035] A computer-readable storage medium, on which a computer program is stored, and is characterized in that when the computer program is executed by a processor, the steps of the method are implemented.
[0036] A computer program product containing instructions, which when running on a device causes the device to execute the steps in the method.
[0037] Due to the adoption of the above technical solution, the beneficial effects obtained by this application are:
[0038] By preprocessing and feature extraction of the time series data of the current value, the system can more accurately capture the trends and patterns of current changes, thereby reducing noise interference and improving data quality. Secondly, using the moving average method for time series analysis can effectively smooth the data, reveal the long-term trend, and make anomaly detection more reliable. When the current change rate between two adjacent sampling points exceeds the preset safety threshold, the system can quickly make a preliminary judgment and further confirm whether there is abnormal current fluctuation by calculating the standard score. This method combines rapid response and precise statistical analysis, greatly reducing the false alarm rate.
[0039] Once an abnormal current fluctuation is confirmed, the system will dynamically adjust the value of the current-limiting resistor to bring the current value back within the safe range. This real-time control mechanism can not only quickly respond to emergencies, but also optimize the response speed and accuracy by adapting the adjustment coefficient K to ensure the efficient operation of the system. In addition, the system also has an alarm and recording function, which can immediately notify relevant personnel when an anomaly is detected and generate a detailed report for subsequent analysis and improvement.
[0040] Through this series of measures, this technical solution not only improves the reliability and stability of the power system, reduces equipment damage and downtime caused by current fluctuations, but also provides timely alarms and detailed data support for operators, helping them take prompt actions to ensure the continuous safe operation of the system. Generally speaking, this solution comprehensively applies technical means such as data preprocessing, time series analysis, anomaly detection, and dynamic control to achieve comprehensive monitoring and intelligent management of the power system, improving the operation efficiency and safety of the entire system. Brief Description of the Drawings
[0041] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0042] Figure 1 It is a schematic flowchart of a method for detecting and adjusting abnormal current fluctuations provided by an embodiment of the present application. Detailed Embodiments
[0043] In order to more clearly illustrate the overall concept of the present application, the following will be described in detail by way of examples in combination with the drawings of the specification.
[0044] In the following description, many specific details are set forth to provide a thorough understanding of the present application. However, the present application may be implemented in other ways different from those described herein. Therefore, the scope of protection of the present application is not limited by the specific embodiments disclosed below. It should be noted that, without conflict, the embodiments of the present application and the features in each embodiment may be combined with each other.
[0045] In the present application, unless otherwise clearly defined and limited, the first feature being "on" or "under" the second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. 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 this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. <( <(
[0046] As <( Figure 1 shown, an abnormal current fluctuation detection and adjustment method includes: <( <(
[0047] Performing time series analysis on the time series data of the current value to obtain the current change trend.<( <(
[0048] Specifically, the time series data <( <(
[0049] Definition: Time series data refers to the data points collected at different time points, and these data points are arranged in chronological order. <( <(
[0050] Example: The current values collected once per second or per minute form a time series. <( <(
[0051] The purpose of time series analysis <( <(
[0052] Identifying trends: Determining the long-term direction (rising, falling, or stable) of the current value changing over time. <( <(
[0053] Detecting periodicity: Identifying whether there are periodic fluctuations in the current value, such as regular changes on a daily, weekly, or monthly basis. Discovering seasonality: Identifying whether there are repeating patterns related to specific time periods in the current value, such as peak hours of the day. Predicting the future: Predicting future current values based on historical data to help take measures in advance. <( <(
[0054] The specific steps of time series analysis <( <(
[0055] Data preprocessing for denoising: Use a filter (such as a low-pass filter) to remove high-frequency noise and ensure the smoothness and reliability of the data.
[0056] Missing value handling: Fill or delete missing data points in the time series to ensure the continuity and integrity of the data.
[0057] Trend analysis
[0058] Moving average method: Calculate the average value over a period of time to smooth the data and identify trends.
[0059] Simple moving average:
[0060]
[0061] where n is the size of the moving window, I(t) is the current value at time t, and i represents the time offset in the time series. Weighted moving average: Assign higher weights to recent data points to better reflect the recent trends.
[0062] Exponential smoothing method: Use exponentially weighted moving average to smooth the data and identify trends.
[0063] Single exponential smoothing:
[0064] S t = αI t +(1 - α)S t-1
[0065] where α is the smoothing coefficient (0 < α < 1), I t is the current value at time t, and S t is the smoothed value.
[0066] Seasonal analysis
[0067] Seasonal decomposition method: Decompose the time series into trend, seasonal, and residual components.
[0068] STL decomposition: A commonly used seasonal decomposition method that can separate the trend component, seasonal component, and residual component.
[0069] I(t) = T(t) + S(t) + R(t)
[0070] where T(t) is the trend component, S(t) is the seasonal component, and R(t) is the residual component.
[0071] Periodic analysis Frequency domain analysis: Use the Fourier transform (FFT) to transform the time series into the frequency domain and identify the periodic components.
[0072] Fast Fourier transform: Calculate the power spectral density (PSD) to identify the main frequency components.
[0073]
[0074] Among them, represents the Fourier transform, and f is the frequency.
[0075] The model fits an autoregressive model (AR): Assume that the current value depends on some past values.
[0076] AR(1) model:
[0077] I t = c + φ1I t-1 + ∈ t
[0078] Among them, c is the constant term, φ1 is the autoregressive coefficient, and ∈ t is white noise.
[0079] Moving average model (MA): Assume that the current value depends on past error terms.
[0080] MA(1) model:
[0081] I t = μ + θ1∈ t-1 + ∈ t
[0082] Among them, μ is the mean, θ1 is the moving average coefficient, and ∈ t is white noise.
[0083] Autoregressive moving average model (ARMA): Combines the AR and MA models.
[0084] ARMA(p,q) model:
[0085]
[0086] I t : The observed value at time t (such as the current value).
[0087] c: The constant term of the model, representing the mean level of the time series.
[0088] p: The order of the autoregressive (AR) part, representing the influence of the observed values at the past p time points on the current value.
[0089] φ i (read as "phi"): The autoregressive coefficient, representing the degree of influence of the i-th lagged observed value It-i on the current observed value It. Where i ranges from 1 to p.
[0090] I t-i : The observed value at time t-i, that is, the observed value at the i-th time point before the current time point t.
[0091] q: The order of the moving average (MA) part, which represents the impact of the error term at the past q time points on the current value.
[0092] θ j (pronounced "theta"): Moving average coefficient that indicates the influence of the j-th lagged error term εt-j on the current observation I t. Where j ranges from 1 to q.
[0093] t - j: White noise or random error term at time tj, representing the part that cannot be explained by the model.
[0094] t: White noise or random error term at time t, representing the random fluctuation at the current time point.
[0095] Application of results
[0096] Trend identification: The above method is used to identify the long-term trend of current value, such as increase, decrease or stability.
[0097] Anomaly detection: Anomaly detection is performed by combining trends with other features (such as standard scores) to determine whether there are abnormal current fluctuations.
[0098] Prediction: Predict future current values based on historical data to provide a basis for system control.
[0099] For example, consider a power system that collects current values every second, forming a time series dataset. The goal is to identify current trends through time series analysis.
[0100] Data Collection
[0101] Data: Collect current values for 24 hours on a certain day, recording once per second, for a total of 86,400 data points.
[0102] Example data (simplified version):
[0103] Time point (seconds): 0, 1, 2, 3, ..., 86399
[0104] Current value (ampere): I(0),I(1),I(2),I(3),...,I(86399)
[0105] Data preprocessing
[0106] Noise removal: Use an RC low-pass filter to remove high-frequency noise.
[0107] Smoothing data: Use sliding window averaging to smooth data and reduce instantaneous fluctuations.
[0108] Time series analysis methods
[0109] Moving average method: Calculate the average value over a period of time to smooth the data and extract trends.
[0110] Exponential smoothing method: Assign higher weights to the most recent data points to better capture the latest changing trends.
[0111] Seasonal decomposition: Separate the trend, seasonal, and residual components to more clearly see the long-term trend.
[0112] Frequency domain analysis: Use the Fourier transform to convert the time series into the frequency domain and analyze the frequency components.
[0113] Specific steps
[0114] Moving average method
[0115] Select the window size: For example, select a window size of 5 seconds.
[0116] Calculate the moving average:
[0117]
[0118] where t is the current time point and I(t) is the current value at time t. For example, for time point t = 5:
[0119]
[0120] By calculating the moving average at each time point, a smoothed trend line can be obtained.
[0121] Select the smoothing coefficient: For example, select the smoothing coefficient α = 0.2.
[0122] Calculate the exponential smoothing value:
[0123] S t = α·I(t)+(1 - α)·S t-1
[0124] where S t is the smoothed value at time t, and S0 is usually taken as the first data point I(0). For example, for time point t = 1:
[0125] S1 = 0.2·I(1)+0.8·I(0)
[0126] By calculating the exponential smoothing value at each time point, a more sensitive trend line can be obtained.
[0127] Seasonal decomposition
[0128] Use STL decomposition: Decompose the time series into trend, seasonal, and residual components.
[0129] Decomposition formula:
[0130] I(t) = T(t) + S(t) + R(t)
[0131] where T(t) is the trend component, S(t) is the seasonal component, and R(t) is the residual component.
[0132] For example, for 24-hour-a-day data, the STL decomposition can be used to decompose the current value into daily trend, seasonal, and residual parts. Through the decomposition, the long-term trend, periodic changes, and random fluctuations of the current value can be seen more clearly.
[0133] Frequency domain analysis
[0134] Use the Fast Fourier Transform (FFT): Convert the time series to the frequency domain and analyze the frequency components.
[0135] Calculate the Power Spectral Density (PSD):
[0136]
[0137] where denotes the Fourier transform and f is the frequency.
[0138] Through frequency domain analysis, the main frequency components in the current signal can be identified, thereby understanding its periodic changes.
[0139] Furthermore, long-term trends and short-term fluctuations can also be introduced: In addition to identifying the overall trend, long-term trends (such as seasonal or annual trends) and short-term fluctuations (such as daily or weekly fluctuations) can be further distinguished. This can be achieved by decomposing the time series data.
[0140] Furthermore, trend change point detection can also be introduced: Use statistical methods (such as the CUSUM control chart) or machine learning algorithms (such as the change point detection algorithm) to automatically detect the change points of the trend in order to timely discover abnormal situations in the system.
[0141] Furthermore, periodic pattern recognition can also be introduced: Identify the periodic patterns in the current signal through frequency domain analysis (such as the Fourier transform). For example, daily cycles, weekly cycles, etc. that may exist in the power system.
[0142] Furthermore, seasonal adjustment can also be introduced: For data with obvious seasonality, seasonal adjustment techniques (such as X-13ARIMA-SEATS) can be applied to remove the seasonal component, thereby more clearly observing the non-seasonal trend.
[0143] Furthermore, anomaly detection based on trends can also be introduced: combining the results of trend analysis to set dynamic thresholds for anomaly detection. For example, if the current value deviates from the long-term trend line by more than a certain standard deviation, a warning is issued.
[0144] Furthermore, multi-model fusion can also be introduced: combining the results of multiple time series models (such as ARIMA, SARIMA, LSTM, etc.) for comprehensive anomaly detection to improve the accuracy and robustness of detection.
[0145] Furthermore, short-term prediction can also be introduced: using time series models (such as ARIMA, SARIMA, LSTM, etc.) to predict short-term current values to help dispatchers make preparations in advance.
[0146] Furthermore, long-term prediction can also be introduced: combining historical data and external factors (such as weather, holidays, etc.) to predict long-term current demand and provide support for power grid planning.
[0147] Furthermore, an optimized control strategy can also be introduced: dynamically adjusting system parameters (such as the value of the current-limiting resistor) according to the prediction results to optimize system performance and energy efficiency.
[0148] Furthermore, fault mode recognition can also be introduced: identifying specific fault modes (such as motor overload, short circuit, etc.) by analyzing the current change trend and establishing a fault library.
[0149] Furthermore, predictive maintenance can also be introduced: combining the results of trend analysis and anomaly detection to evaluate the health status of equipment, formulate a predictive maintenance plan, and reduce unexpected downtime.
[0150] Furthermore, trend visualization can also be introduced: displaying the current change trend in the form of a chart for easy intuitive understanding by operators.
[0151] Furthermore, regular reporting can also be introduced: generating regular reports on the current change trend, including key indicators, abnormal events, prediction results, etc., to provide a basis for decision-making.
[0152] Furthermore, multivariate time series analysis can also be introduced: combining other relevant variables (such as voltage, temperature, humidity, etc.) for multivariate time series analysis to more comprehensively understand system behavior.
[0153] Furthermore, causality analysis can also be introduced: analyzing the causal relationship between different variables through methods such as Granger causality test to find out the main factors affecting current changes.
[0154] Furthermore, real-time trend update can also be introduced: establishing a real-time monitoring system to continuously update the current change trend and display it in real time through a dashboard.
[0155] Furthermore, a feedback mechanism can also be introduced: when an abnormal trend is detected, an alarm is automatically triggered and the information is fed back to relevant personnel so that timely measures can be taken.
[0156] Furthermore, deep learning applications can also be introduced: use deep learning models (such as convolutional neural network CNN, recurrent neural network RNN, etc.) for more complex pattern recognition and prediction.
[0157] Furthermore, data mining can also be introduced: by mining a large amount of historical data, hidden patterns and rules are discovered to provide new insights for system optimization.
[0158] Furthermore, system integration can also be introduced: integrate the time series analysis module with other systems (such as SCADA system, energy management system, etc.) to achieve data sharing and linkage.
[0159] Furthermore, an automated process can also be introduced: establish an automated process that is fully automated from data collection, preprocessing, analysis to report generation to improve work efficiency.
[0160] Select two adjacent sampling points in the current change trend to calculate the current change rate between the two adjacent sampling points, and determine whether the current change rate exceeds a preset safety threshold. If it exceeds the preset safety threshold, calculate a standard score according to the current change trend, and judge whether there is abnormal current fluctuation through the standard score.
[0161] Specifically, select two adjacent sampling points
[0162] Data collection: Assume that we have collected the current value once per second through a sensor to form a time series data set.
[0163] Select sampling points: Select two adjacent sampling points from the time series data. For example, select the current values I(t) and I(t + 1) at time points t and t + 1.
[0164] Calculate the current change rate
[0165] Calculation formula: Use the following formula to calculate the current change rate between two adjacent sampling points:
[0166]
[0167] I(t2): This represents the current value measured at time t2, I(t1): This represents the current value measured at time t1, t2: This is the second time point, usually some time after t1, t1: This is the first time point, usually the time point before t2, t2 - t1: This is the difference between the two time points, representing the time interval, I(t2) - I(t1): This is the change in the current value between the two time points;
[0168] Where, Δt is the time interval between two sampling points (1 second in this example). For example, if I(t) = 10 amperes and I(t + 1) = 12 amperes, then the rate of change is:
[0169]
[0170] Determine whether the rate of change of current exceeds the preset safety threshold
[0171] Set the safety threshold: Set a preset safety threshold according to the requirements and experience of the system. For example, assume the preset safety threshold is 1 ampere per second.
[0172] Comparison and judgment: Compare the calculated rate of change with the preset safety threshold.
[0173] If the rate of change is less than or equal to the preset safety threshold, it is considered that the current change is normal.
[0174] If the rate of change is greater than the preset safety threshold, it is initially judged as abnormal current fluctuation.
[0175] For example, if the rate of change is 2 amperes per second and the preset safety threshold is 1 ampere per second, then the rate of change exceeds the safety threshold, and it is initially judged as abnormal current fluctuation.
[0176] Calculate the standard score according to the current change trend
[0177] Calculate the average value and standard deviation: Calculate the average value μ and standard deviation σ of the current values over a period of time.
[0178] ο Average value μ:
[0179]
[0180] ο Standard deviation σ:
[0181]
[0182] Where, n is the number of samples, and I(i) is the current value at the i-th sampling point.
[0183] Calculating the Standard Score: For a data point X initially judged to have abnormal current fluctuations, calculate its standard score (Z-score) using the following formula:
[0184]
[0185] For example, if X = 12 amperes, μ = 10 amperes, and σ = 1.5 amperes, then the standard score is:
[0186]
[0187] Judging Abnormal Current Fluctuations through the Standard Score
[0188] Setting the Standard Score Threshold: Usually, data points with a standard score exceeding 3 or below -3 are considered outliers.
[0189] Judging Abnormalities: If the standard score Z exceeds 3 or is below -3, it is finally confirmed as abnormal current fluctuations; otherwise, it is considered normal fluctuations. For example, if the standard score Z = 1.33, since it does not exceed 3, it is not considered abnormal current fluctuations.
[0190] Summary
[0191] Through the above steps, abnormal fluctuations in current changes can be effectively detected and corresponding measures can be taken. The specific process is as follows:
[0192] Selecting Two Adjacent Sampling Points: Select two adjacent current values from the time series data.
[0193] Calculating the Current Change Rate: Use the formula to calculate the current change rate between two adjacent sampling points.
[0194] Judging Whether It Exceeds the Safety Threshold: Compare the change rate with the preset safety threshold to judge whether it exceeds.
[0195] Calculating the Standard Score: For data points that exceed the safety threshold, calculate their standard scores.
[0196] Judging Whether There Are Abnormalities: Judge whether there are abnormal current fluctuations through the standard score.
[0197] For example, suppose there is a power system that collects current values once per second. The goal is to detect abnormal current fluctuations by calculating the current change rate between two adjacent sampling points and use the standard score for further confirmation.
[0198] Data Collection
[0199] Data: Collect the current values within 24 hours of a certain day, record once per second, for a total of 86,400 data points.
[0200] Example Data (Simplified Version):
[0201] Time points (seconds): 0, 1, 2, 3,..., 86399
[0202] Current values (amperes): I(0), I(1), I(2), I(3),..., I(86399)
[0203] Data preprocessing
[0204] Remove noise: Use an RC low-pass filter to remove high-frequency noise.
[0205] Smooth data: Use the moving window average method to smooth the data and reduce instantaneous fluctuations.
[0206] Calculate the current change rate
[0207] Select two adjacent sampling points: For example, select time points t and t + 1.
[0208] Calculate the current change rate:
[0209]
[0210] Where I(t) is the current value at time t. For example, for time points t = 1 and t + 1 = 2:
[0211] Change rate(1) = I(2) - I(1)
[0212] Judge whether the current change rate exceeds the preset safety threshold
[0213] Set the preset safety threshold: For example, set the safety threshold of the current change rate to ±10% (i.e., 0.1 ampere / second).
[0214] Judge whether it exceeds the threshold:
[0215] If |Change rate(t)| > 0.1, it is considered to exceed the preset safety threshold
[0216] For example, if the change rate(1) = 0.15 ampere / second, it is considered that the current change rate exceeds the preset safety threshold at time point t = 1.
[0217] Calculate the standard score
[0218] Calculate the mean and standard deviation: Calculate the mean μ and standard deviation σ of the current values over a period of time.
[0219]
[0220] Where n is the number of data points in the time period. For example, calculate the mean and standard deviation for the first 10 seconds:
[0221]
[0222] Calculate the standard score:
[0223]
[0224] where I(t) is the current value at time t. For example, for time point t = 1:
[0225]
[0226] Judge whether there is abnormal current fluctuation through the standard score
[0227] Set the standard score threshold: Usually, data points with a standard score exceeding 3 or less than -3 are considered outliers.
[0228] Judge whether it is an outlier:
[0229] If |Z| > 3
[0230] then it is considered that there is abnormal current fluctuation
[0231] If |Z| > 3, then it is considered that there is abnormal current fluctuation
[0232] For example, if Z1 = 3.5, then it is considered that there is abnormal current fluctuation at time point t = 1.
[0233] Through the above steps, the change rate of the current can be extracted from the time series data of the current value, and whether there is abnormal current fluctuation can be judged through the preset safety threshold and the standard score. These methods can more accurately identify and respond to abnormal situations in the current, thereby improving the reliability and safety of the system.
[0234] Summary of examples
[0235] Data collection: Collect the current value once per second.
[0236] Data preprocessing: Remove noise and smooth the data.
[0237] Calculate the current change rate: Calculate the current change rate between two adjacent sampling points.
[0238] Judge whether it exceeds the preset safety threshold: Set the safety threshold to ±0.1 amperes per second and judge whether it exceeds.
[0239] Calculate the standard score: Calculate the mean and standard deviation, and then calculate the standard score.
[0240] Judge whether there is abnormal current fluctuation: Set the standard score threshold to ±3 and judge whether it is an outlier.
[0241] Furthermore, multi-time scale analysis can also be introduced: in addition to the change rate between two adjacent sampling points, the change rates at different time intervals (such as 1 second, 5 seconds, 10 seconds, etc.) can also be calculated to more comprehensively understand the current change situation.
[0242] Furthermore, the weighted average change rate can also be introduced: by introducing the method of weighted average, higher weights are given to the latest data points to better reflect the latest change trend.
[0243] Furthermore, adaptive threshold setting can also be introduced: according to historical data and current operating conditions, the preset safety threshold is dynamically adjusted. For example, under high load or special weather conditions, the threshold can be appropriately relaxed or tightened.
[0244] Furthermore, a multi-level threshold system can also be introduced: multiple levels of thresholds are set, corresponding to different alarm levels and response measures respectively, to achieve more refined control.
[0245] Furthermore, multi-feature fusion can also be introduced: the current change rate is combined with other features (such as current mean, peak value, standard deviation, skewness, kurtosis, etc.), and machine learning models (such as support vector machine SVM, random forest RF, etc.) are used for comprehensive judgment.
[0246] Furthermore, pattern recognition can also be introduced: clustering algorithms (such as K-means, DBSCAN, etc.) are used to classify the current change patterns, and common normal patterns and abnormal patterns are identified.
[0247] Furthermore, control charts can also be introduced: control charts in statistical process control (SPC) (such as X-bar chart, R chart, CUSUM chart, etc.) are used to monitor the trend and variation of the current change rate and detect abnormalities in a timely manner.
[0248] Furthermore, Bayesian methods can also be introduced: using Bayesian statistical methods, combining prior knowledge and real-time data to update the posterior probability of abnormal current fluctuations and improve the accuracy of judgment.
[0249] Furthermore, a real-time alarm system can also be introduced: a real-time alarm system is established. When abnormal current fluctuations are detected, the alarm is immediately triggered, and relevant personnel are notified by text message, email, etc.
[0250] Furthermore, automatic recording and reporting can also be introduced: the time, duration, and severity of each abnormal event are automatically recorded, and a detailed report is generated for subsequent analysis and improvement.
[0251] Furthermore, a fault mode library can also be introduced: a database containing common fault modes is established. When abnormal current fluctuations are detected, the fault mode library is automatically matched to quickly locate the possible fault causes.
[0252] Furthermore, root cause analysis can be introduced: combining other sensor data (such as temperature, voltage, humidity, etc.), conduct root cause analysis to find the root cause of the abnormal current fluctuation.
[0253] Furthermore, health status assessment can be introduced: based on the current change rate and other characteristics, regularly assess the health status of the equipment, formulate a predictive maintenance plan, and reduce unexpected downtime.
[0254] Furthermore, remaining useful life prediction can be introduced: using machine learning models (such as survival analysis, regression models, etc.), predict the remaining useful life of key components, and replace or repair them in advance.
[0255] Furthermore, adaptive control can be introduced: according to the real-time current change rate and standard score, dynamically adjust the control parameters of the system (such as current limiting resistance value, voltage regulation, etc.) to keep the system running stably.
[0256] Furthermore, intelligent scheduling can be introduced: combining the prediction results, optimize the power scheduling strategy to ensure the stability and efficiency of the power grid.
[0257] Furthermore, a real-time dashboard can be introduced: develop a real-time dashboard to display key indicators such as current change rate, standard score, alarm information, etc., which is convenient for operators to monitor intuitively.
[0258] Furthermore, an interactive analysis tool can be introduced: provide an interactive analysis tool that allows users to customize analysis parameters and thresholds for in-depth data exploration and analysis.
[0259] Furthermore, a data analysis report can be introduced: regularly generate a data analysis report to summarize the situation, causes, and treatment measures of abnormal current fluctuations, providing decision-making support for management.
[0260] Furthermore, an intelligent advice system can be introduced: based on the data analysis results, provide intelligent advice to guide operators to take optimal countermeasures.
[0261] If there is such abnormal current fluctuation, dynamically adjust the current limiting resistance value to keep the current value within the preset safety threshold.
[0262] Specifically, confirmation of abnormal current fluctuation
[0263] Preliminary judgment: First, according to the current change rate between two adjacent sampling points, judge whether it exceeds the preset safety threshold.
[0264] Standard score calculation: For the data points preliminarily judged to be abnormal, calculate their standard score (Z-score) to further verify whether there is abnormal current fluctuation.
[0265] Method for dynamically adjusting the current limiting resistor value
[0266] Feedback control mechanism: Using the feedback control mechanism, the current limiting resistor value is dynamically adjusted according to the deviation between the real-time monitored current value and the preset safety threshold.
[0267] PID controller: A proportional-integral-derivative (PID) controller can be used. This is a commonly used feedback control algorithm that adjusts the output based on the error, the integral of the error, and the rate of change of the error to achieve stable control.
[0268] Specific implementation steps
[0269] Define the target current range
[0270] Preset safety threshold: Determine a safe current range, for example, set the current upper limit I max and lower limit I min .
[0271] Real-time monitoring of current value
[0272] Data acquisition: Continuously collect data from the current sensor to obtain the real-time current value I(t).
[0273] Calculate the error: Calculate the error e(t) between the current current value and the target current value (usually the middle value of the preset safety threshold):
[0274] e(t)=I target -I(t)
[0275] PID controller design
[0276] Proportional term (P): The proportional term adjusts the output based on the current error e(t). The formula is:
[0277] P(t)=K p ·e(t)
[0278] where K p is the proportional gain.
[0279] Integral term (I): The integral term adjusts the output based on the accumulation of error. The formula is:
[0280] I(t)=K i ∫0 t e(τ)dτ
[0281] where K i is the integral gain.
[0282] Total output: The total output u(t) of the PID controller is:
[0283]
[0284] Adjust the current-limiting resistance value
[0285] Convert the output to a resistance value: Convert the output u(t) of the PID controller to the actual current-limiting resistance value R(t). This can be done through the following formula:
[0286] R(t) = R base + u(t)
[0287] where R base is the base resistance value.
[0288] Implement the adjustment: Adjust the actual value of the current-limiting resistance electronically or mechanically to bring the current value back within the preset safe range.
[0289] Optimization and parameter tuning
[0290] Parameter tuning: The performance of the PID controller depends on the selection of K p , K i and K d . Appropriate parameter values can be determined through experiments or automatic parameter tuning methods (such as the Ziegler-Nichols method).
[0291] Adaptive control: Introduce an adaptive control strategy to automatically adjust the PID parameters according to the real-time state of the system to improve control accuracy and robustness.
[0292] Monitoring and recording
[0293] Real-time monitoring: Continuously monitor the current value and the current-limiting resistance value to ensure that the system is within the safe range.
[0294] Log recording: Record the actions and results of each adjustment for subsequent analysis and improvement.
[0295] Fault handling and alarm
[0296] Fault detection: If the current value still cannot be brought back within the safe range after multiple adjustments, it may be necessary to check whether there are other faults in the system.
[0297] Alarm notification: Trigger the alarm mechanism to notify relevant personnel for further inspection and handling.
[0298] For example, assume there is a power system that contains a critical load device and it is necessary to ensure that the current value is within the safe range. Through time series analysis and standard score calculation, abnormal current fluctuations are detected and it is determined that measures need to be taken to adjust the current value. The specific steps are as follows:
[0299] Detection of abnormal current fluctuations
[0300] Data acquisition: Collect the current value I(t) once per second.
[0301] Calculation of current change rate: Select two adjacent sampling points t1 and t2, and calculate the current change rate:
[0302]
[0303] Judgment of threshold: If the change rate exceeds the preset safety threshold (e.g., 10%), it is preliminarily judged as abnormal current fluctuation.
[0304] Calculation of standard score: For the data points preliminarily judged as abnormal current fluctuations, calculate their standard score (Z-score):
[0305]
[0306] where X is the current current value, μ is the average value of historical current values, and σ is the standard deviation of historical current values.
[0307] Final judgment: If the standard score Z exceeds 3 or is lower than -3, it is finally confirmed as abnormal current fluctuation.
[0308] Dynamic adjustment of the current-limiting resistance value
[0309] Preset safety threshold: Set the safety range of the current value, e.g., Imin = 5 amperes and Imax = 10 amperes.
[0310] Initial current-limiting resistance value: Assume the initial current-limiting resistance value Rinitial = 5 ohms.
[0311] Adjustment strategy: According to the situation of abnormal current fluctuations, dynamically adjust the current-limiting resistance value R to bring the current value back within the safe range.
[0312] Adjustment when the current is too high
[0313] Situation description: Assume the current value I(t) = 12 amperes, which exceeds the preset maximum safety threshold Imax = 10 amperes.
[0314] Adjustment method: Increase the current-limiting resistance value R to reduce the current.
[0315] Adjustment formula:
[0316] R new = R old + k·(I(t) - I max )
[0317] where R old is the current current-limiting resistance value, and k is the adjustment coefficient (e.g., 0.1 ohm / ampere).
[0318] Calculation Example:
[0319] R new = 5 + 0.1·(12 - 10) = 5 + 0.2 = 5.2 ohms
[0320] Adjustment when Current is Too Low
[0321] Situation Description: Assume the current value I(t) = 4 amperes, which is lower than the preset minimum safety threshold Imin = 5 amperes.
[0322] Adjustment Method: Reduce the value of the current-limiting resistor R to increase the current.
[0323] Adjustment Formula:
[0324] R new = R old - k·(I min - I(t))
[0325] where R old is the current value of the current-limiting resistor, and k is the adjustment coefficient (e.g., 0.1 ohm / ampere).
[0326] Calculation Example:
[0327] R new = 5 - 0.1·(5 - 4) = 5 - 0.1 = 4.9 ohms
[0328] Implementation Steps
[0329] Real-time Monitoring: Continuously collect the current value and calculate the current change rate.
[0330] Anomaly Detection: Use the standard score to determine if there is abnormal current fluctuation.
[0331] Dynamic Adjustment: Dynamically adjust the value of the current-limiting resistor according to the situation of abnormal current fluctuation.
[0332] Feedback and Verification: After adjustment, continue to monitor the current value to ensure it returns to the safe range. If the expected effect is not achieved, further adjustment can be made.
[0333] Precautions
[0334] Selection of Adjustment Coefficient: The adjustment coefficient k needs to be selected according to the actual situation of the system. Being too large may lead to over-adjustment, and being too small may lead to untimely adjustment.
[0335] Preventing Oscillation: To avoid oscillation caused by frequent adjustment, hysteresis control can be introduced or a minimum adjustment step size can be set.
[0336] Protection Mechanism: During the adjustment process, ensure there is a protection mechanism to prevent the current value from exceeding the safe range and avoid equipment damage.
[0337] Furthermore, adaptive PID control can also be introduced: Use an adaptive proportional-integral-derivative (PID) controller to automatically adjust the PID parameters according to real-time feedback to achieve more precise current control.
[0338] Furthermore, fuzzy logic control can also be introduced: Introduce fuzzy logic control and dynamically adjust the value of the current-limiting resistor according to the current rate of change of the current and the standard score to better handle non-linear systems.
[0339] Furthermore, a hierarchical response mechanism can also be introduced: Set multiple levels of control strategies, for example:
[0340] First-level response: When the rate of change of the current exceeds the first-level threshold, slightly adjust the value of the current-limiting resistor.
[0341] Second-level response: When the rate of change of the current exceeds the second-level threshold, adjust the value of the current-limiting resistor to a greater extent.
[0342] Third-level response: When the rate of change of the current exceeds the third-level threshold, take emergency measures such as disconnecting the circuit or switching to a backup power supply.
[0343] Furthermore, multi-objective optimization can also be introduced: When adjusting the value of the current-limiting resistor, consider multiple objectives simultaneously, such as current stability, minimum energy consumption, and maximum equipment life.
[0344] Furthermore, model predictive control (MPC) can also be introduced: Use the model predictive control method to adjust the value of the current-limiting resistor in advance based on the current state and future predictions to avoid future abnormal current fluctuations.
[0345] Furthermore, feedforward control can also be introduced: Combine the feedforward control strategy and adjust the value of the current-limiting resistor in advance according to known external disturbances (such as load changes, environmental temperature, etc.) to reduce the lag effect.
[0346] Furthermore, an expert system can also be introduced: Establish an expert system to provide the best suggestions for adjusting the current-limiting resistor based on historical data and the expert knowledge base.
[0347] Furthermore, machine learning optimization can also be introduced: Use machine learning methods such as reinforcement learning to train a model to learn the optimal current-limiting resistor adjustment strategy to adapt to different working conditions and environmental conditions.
[0348] Furthermore, a closed-loop control system can also be introduced: Build a closed-loop control system, continuously monitor the current value, and dynamically adjust the value of the current-limiting resistor according to real-time feedback to ensure that the current is always within a safe range.
[0349] Furthermore, fault detection and isolation can also be introduced: Combining fault detection and isolation technologies, when abnormal current fluctuations are detected, not only the value of the current-limiting resistor is adjusted, but the faulty part is also automatically isolated to prevent the spread of the fault.
[0350] Furthermore, multi-energy coordination can also be introduced: In the power system, by combining the outputs of multiple energy sources (such as solar energy, wind energy, etc.), the value of the current-limiting resistor is dynamically adjusted to balance the input of different energy sources and improve the overall efficiency of the system.
[0351] Furthermore, demand-side management can also be introduced: According to the demand-side management strategy of the power grid, the value of the current-limiting resistor is dynamically adjusted to optimize power distribution and usage and reduce peak loads.
[0352] Furthermore, hardware redundancy design can also be introduced: Add redundant current-limiting resistors or other protection devices in the system to improve the reliability and fault tolerance of the system.
[0353] Furthermore, software optimization can also be introduced: Optimize the algorithms and execution efficiency of the control software, reduce calculation latency, and improve the response speed.
[0354] Furthermore, a real-time monitoring interface can also be introduced: Develop an intuitive real-time monitoring interface to display key information such as current values, current-limiting resistor values, and adjustment processes, facilitating operators to monitor and intervene.
[0355] Furthermore, an alarm and notification system can also be introduced: Establish an alarm and notification system to promptly notify relevant personnel when abnormal current fluctuations are detected and adjustments are made for a quick response.
[0356] Furthermore, data analysis can also be introduced: Regularly analyze the current change trend and current-limiting resistor adjustment records to identify potential problems and improvement points.
[0357] Furthermore, report generation can also be introduced: Generate detailed adjustment records and performance reports to provide decision-making support for management.
[0358] Furthermore, safety verification can also be introduced: Regularly conduct system safety verification to ensure that the current-limiting resistor adjustment strategy complies with safety standards and regulatory requirements.
[0359] Furthermore, compliance checking can also be introduced: Ensure that all adjustment strategies and operations comply with relevant industry standards and regulations, such as ISO, IEC, etc.
[0360] According to an embodiment of the present application, before performing time series analysis on the characteristic data according to the current value to obtain the current change trend, it further includes:
[0361] Preprocess the collected current data;
[0362] Extract the time - series data from the current data, where the time - series data includes: average current, current peak, current fluctuation range, and moving - window statistic.
[0363] Specifically, data pre - processing
[0364] Data cleaning
[0365] Remove invalid data: Check and delete or repair data points with missing values, outliers, or incorrect records.
[0366] Smoothing: Use a low - pass filter (such as an RC low - pass filter) to remove high - frequency noise, making the data smoother and reducing the impact of instantaneous fluctuations.
[0367] Data normalization
[0368] Normalization: Convert the current data to a unified scale, for example, between 0 and 1, for subsequent analysis and comparison.
[0369] Detrending: If there is an obvious long - term trend in the data, this trend can be removed first to better observe short - term fluctuations.
[0370] Feature extraction
[0371] Extract time - series data
[0372] Extract multiple time - series features from the pre - processed current data. These features can reflect different aspects of the current and help to understand the changes in the current more comprehensively.
[0373] Average current
[0374] Definition: The average current per second, which reflects the overall level of the current during this time period.
[0375] Function: The average current can help identify the overall trend and steady state, and is an important indicator for evaluating the operating state of the system.
[0376] Current peak
[0377] Definition: The maximum current value per second, which reflects the maximum fluctuation of the current during this time period.
[0378] Function: The current peak can be used to detect sudden high - current events, such as short - circuits or overloads, and timely discover potential safety hazards.
[0379] Current fluctuation range
[0380] Definition: The difference between the maximum and minimum current values per second, which reflects the degree of current fluctuation.
[0381] Function: The current fluctuation range can be used to evaluate the stability of the current. A larger fluctuation range may indicate the existence of unstable factors or external interference in the system.
[0382] Moving window statistic
[0383] Definition: Statistics calculated within a certain time window, such as moving average, moving standard deviation, etc.
[0384] Function:
[0385] Moving average: By calculating the average value over a period of time, the data can be smoothed, the influence of noise can be reduced, and the trend can be highlighted.
[0386] Moving standard deviation: By calculating the standard deviation over a period of time, the volatility of the data can be measured, and the periods of abnormal fluctuations can be identified.
[0387] Other statistics: Other statistics can also be calculated, such as moving median, moving range, etc., to provide more dimensional information.
[0388] Summary
[0389] By preprocessing and feature extraction of the collected current data, we can obtain high-quality time series data, including current average value, current peak value, current fluctuation range, and moving window statistics. These feature data not only help to more accurately identify the current change trend, but also provide rich information for subsequent anomaly detection, control strategy adjustment, and system optimization.
[0390] Application scenarios
[0391] Real-time monitoring: In the power system, by real-time monitoring of these feature data, abnormal current fluctuations can be detected in a timely manner, and corresponding control measures can be taken.
[0392] Fault diagnosis: Combining historical data, specific fault patterns can be identified to help quickly locate problems.
[0393] Prediction and maintenance: Using these feature data for predictive maintenance, potential problems can be detected in advance, and unexpected downtime can be reduced.
[0394] According to an embodiment of the present application, the time series analysis is performed on the time series data of the current value to obtain the current change trend, specifically:
[0395] The time series data is extracted by using the moving average method to obtain the current change trend, and the formula is specifically:
[0396]
[0397] Among them, n is the size of the moving window, and I(t) is the current value at time t.
[0398] Specifically, an overview of the moving average method
[0399] The moving average method is a simple and powerful technique used to smooth time series data, reduce the impact of short-term fluctuations and noise, and thus better reveal the long-term trend of the data. By calculating the average value over a period of time, the high-frequency noise in the data can be effectively filtered out, making the trend more obvious.
[0400] Specific steps
[0401] Select the moving window size
[0402] Definition: The moving window size (n) refers to the number of data points used to calculate the average value. For example, if a window size of 5 seconds is selected, then the data of the most recent 5 seconds will be considered each time the average value is calculated.
[0403] Function: The choice of window size depends on the characteristics of the data and the degree of smoothing required. A larger window can smooth the data more effectively, but may lose some short-term details; a smaller window retains more details, but the smoothing effect may not be ideal.
[0404] Calculate the moving average
[0405] Process: For each time point t, calculate the average value of the previous n data points. This process is "moving" because as each new data point arrives, the window slides forward by one unit and a new average value is recalculated.
[0406] Example: Suppose a window size of 5 seconds is selected, then at time point t = 5, calculate the average value of the 5 data points from t = 1 to t = 5; at time point t = 6, calculate the average value of the 5 data points from t = 2 to t = 6, and so on.
[0407] Smooth the data
[0408] Result: By calculating the moving average value of each time point, we can obtain a new time series data set, which is smoother than the original data and can better reflect the long-term trend of the current.
[0409] Function: The smoothed data can help us more easily identify the change patterns of the current, such as upward trends, downward trends, or periodic fluctuations.
[0410] Application example
[0411] Suppose there is a power system that collects current values once per second, forming a time series data set. The goal is to extract the change trend of the current through the moving average method.
[0412] Data Collection
[0413] Data: We collected current values for 24 hours on a single day, recording them once per second for a total of 86,400 data points.
[0414] Example data (simplified version):
[0415] Time point (seconds): 0, 1, 2, 3, ..., 86399
[0416] Current value (ampere): I(0),I(1),I(2),I(3),...,I(86399)
[0417] Select window size
[0418] Selection: Assume that we choose a window size of 5 seconds (n=5), which can balance the need for smoothing and preserving details.
[0419] Calculating Moving Averages
[0420] Procedure: For each time point t, calculate the average of the five preceding data points.
[0421] For example, at time point t=5, the average value of the five data points from t=1 to t=5 is calculated.
[0422] At time point t=6, the average of the five data points from t=2 to t=6 is calculated.
[0423] And so on until all data points have been processed.
[0424] Smoothing data
[0425] Results: By calculating the moving average at each time point, we obtained a new time series dataset that is smoother than the original data and can better reflect the long-term trend of current.
[0426] Summarize
[0427] By using the moving average method, we can effectively smooth time series data of current values, thereby better identifying current trends. This method is simple and applicable to a variety of applications, such as real-time monitoring, fault diagnosis, and predictive maintenance. Smoothed data not only reduces noise but also highlights long-term trends, providing a reliable basis for subsequent analysis and decision-making.
[0428] According to one embodiment of the present application, selecting two adjacent sampling points in the current change trend to calculate the current change rate between the two adjacent sampling points, and determining whether the current change rate exceeds a preset safety threshold, specifically:
[0429] Calculate the current change rate between two adjacent sampling points. The specific formula is as follows:
[0430]
[0431] If the current change rate exceeds the preset safety threshold, it is initially judged as abnormal current fluctuation.
[0432] Specifically, select two adjacent sampling points
[0433] Definition: From the current change trend data obtained through time series analysis, select the data of two adjacent time points.
[0434] Function: The selection of two adjacent sampling points is to calculate the change of current between these two points, so as to evaluate the change speed of the current.
[0435] Calculate the current change rate
[0436] Definition: The current change rate refers to the ratio of the change amount of the current value between two adjacent sampling points to the time interval. It reflects the speed at which the current value changes with time.
[0437] Process: Calculate the current difference between these two adjacent sampling points and divide it by the time interval between them. In this way, a value representing the speed of current change can be obtained.
[0438] Example: Suppose we have two adjacent sampling points, one is the current value I(0) at t = 0 seconds, and the other is the current value I(1) at t = 1 second. Calculating the current change rate between these two points is to see how fast the current value changes from I(0) to I(1).
[0439] Preset safety threshold
[0440] Definition: The preset safety threshold is a pre-set upper or lower limit of the current change rate, used to judge whether the current change is within the normal range.
[0441] Function: This threshold is obtained based on the design requirements of the system, the safety standards of the equipment, and historical data analysis, in order to ensure the stability and safety of the system.
[0442] Setting: The setting of the threshold needs to consider the actual operating conditions of the system and historical data, and usually a reasonable range is determined through multiple tests and adjustments.
[0443] Judge whether the current change rate exceeds the preset safety threshold
[0444] Comparison: Compare the calculated current change rate with the preset safety threshold.
[0445] Result:
[0446] Not exceeding the threshold: If the current change rate is within the preset safety threshold range, it indicates that the current change is normal, and the system continues to operate normally.
[0447] Exceeding the threshold: If the current change rate exceeds the preset safety threshold, it indicates that the current changes too fast, and there may be abnormal current fluctuations, which requires further analysis and processing.
[0448] Preliminarily judged as abnormal current fluctuation
[0449] Definition: When the current change rate exceeds the preset safety threshold, it is preliminarily judged as abnormal current fluctuation.
[0450] Function: This preliminary judgment can trigger further analysis and response measures, such as alarming, recording abnormal events, starting protection mechanisms, etc.
[0451] Subsequent steps: Once it is preliminarily judged as abnormal current fluctuation, the following measures can be taken:
[0452] Alarm notification: Immediately issue an alarm to notify relevant personnel for inspection and handling.
[0453] Detailed analysis: Conduct a more detailed analysis of the abnormal current fluctuation to find the cause.
[0454] Automatic control: Start automatic control measures, such as dynamically adjusting the value of the current-limiting resistor, to restore the current value to the safe range.
[0455] Recording and reporting: Record the time, duration, and severity of the abnormal event, and generate a detailed report for subsequent analysis and improvement.
[0456] According to an embodiment of the present application, if it exceeds the preset safety threshold, calculate the standard score according to the current change trend, and determine whether there is abnormal current fluctuation through the standard score. Specifically:
[0457] For the data point preliminarily judged as the abnormal current fluctuation, calculate its standard score (Z-score):
[0458]
[0459] Wherein, X is the data point of the abnormal current fluctuation, μ is the average value of the data set, and σ is the standard deviation of the data set;
[0460] If the standard score Z exceeds 3 or is lower than -3, it is confirmed as the abnormal current fluctuation.
[0461] Specifically, preliminarily judged as abnormal current fluctuation
[0462] Definition: When the current change rate between two adjacent sampling points exceeds a preset safety threshold, we preliminarily judge that there may be abnormal current fluctuations in these data points.
[0463] Function: This preliminary judgment can help us quickly identify potential problem points and provide a basis for further analysis.
[0464] Calculating the Standard Score (Z-score)
[0465] Definition: The standard score (Z-score) is a statistic used to measure how many standard deviations a data point deviates from the mean of the data set it belongs to.
[0466] Procedure:
[0467] Data point X: Select the data points preliminarily judged to have abnormal current fluctuations.
[0468] Mean μ of the data set: Calculate the mean of the entire data set.
[0469] Standard deviation σ of the data set: Calculate the standard deviation of the entire data set.
[0470] Calculate the Z-score: Subtract the mean μ of the data set from the data point X, and then divide by the standard deviation σ of the data set to obtain the standard score of this data point.
[0471] Judge whether the standard score exceeds the normal range
[0472] Definition: Data points with a standard score Z exceeding 3 or less than -3 are usually considered outliers.
[0473] Reason: In a normal distribution, approximately 99.7% of the data points lie within 3 standard deviations of the mean. Therefore, data points with a Z-score exceeding 3 or less than -3 are very rare and are likely to be outliers.
[0474] Function: Through the standard score, we can more accurately judge whether a data point is truly abnormal, thereby reducing the possibility of false alarms.
[0475] Confirming abnormal current fluctuations
[0476] Judgment: If the calculated standard score Z exceeds 3 or is less than -3, confirm that this data point has abnormal current fluctuations.
[0477] Subsequent steps:
[0478] Alarm notification: Immediately send an alarm to notify relevant personnel for inspection and handling.
[0479] Detailed analysis: Conduct a more detailed analysis of the data points confirmed to have abnormal current fluctuations to find the specific reasons.
[0480] Automatic control: Activate automatic control measures, such as dynamically adjusting the value of the current-limiting resistor, to restore the current value to the safe range.
[0481] Recording and reporting: Record the time, duration, and severity of abnormal events, and generate a detailed report for subsequent analysis and improvement.
[0482] Summary
[0483] By calculating the standard score of the data points initially judged to have abnormal current fluctuations and determining whether it exceeds 3 or is lower than -3, it is possible to more accurately confirm the existence of abnormal current fluctuations. This method combines initial judgment and statistical analysis, which can effectively reduce false alarms and improve the accuracy of anomaly detection. The following is a simplified flowchart:
[0484] Data acquisition: Collect the current value once per second.
[0485] Time series analysis: Use the moving average method to extract the current change trend. [[ID=I9]]
[0486] Calculate the current change rate: Calculate the current change rate between two adjacent sampling points.
[0487] Initial judgment: If the current change rate exceeds the preset safety threshold, it is initially judged as abnormal current fluctuations.
[0488] Calculate the standard score: For the data points initially judged as abnormal, calculate their standard scores.
[0489] Confirm anomaly: If the standard score exceeds 3 or is lower than -3, confirm it as abnormal current fluctuations.
[0490] Response measures: Take measures such as alarm, detailed analysis, and automatic control.
[0491] According to an embodiment of the present application, if there are the abnormal current fluctuations, by dynamically adjusting the value of the current-limiting resistor to keep the current value within the preset safety threshold, specifically:
[0492] Use the following formula to adjust the value of the current-limiting resistor:
[0493] R new = R old ×(1 + k·(I measured - I threshold ))
[0494] Wherein, R old is the current resistance value, I measured is the measured current value, I threshold is the preset safety threshold, and K is the adjustment coefficient.
[0495] Specifically, the process of adjusting the current-limiting resistance
[0496] Obtain the current parameters
[0497] Current resistance value (R_old): Obtain the current current-limiting resistance value.
[0498] Measured current value (I_measured): Obtain the actually measured current value.
[0499] Preset safety threshold (I_threshold): This is the upper or lower limit of the safe current set by the system, used to determine whether the current is within the safe range.
[0500] Adjustment coefficient (K): This is a preset coefficient used to control the amplitude of the resistance value adjustment. The value of K can be adjusted according to the specific requirements and response speed of the system.
[0501] Calculate the new resistance value
[0502] Calculation process: According to the above parameters, calculate the new current-limiting resistance value. This calculation process takes into account the current resistance value, the measured current value, the preset safety threshold, and the adjustment coefficient.
[0503] Function: By calculating the new resistance value, the current-limiting resistance can be precisely adjusted to bring the current value back within the safe range.
[0504] Adjust the current-limiting resistance
[0505] Execute the adjustment: Apply the calculated new resistance value to the system to adjust the actual value of the current-limiting resistance.
[0506] Real-time monitoring: The adjusted resistance value will take effect immediately, and the system will continue to monitor the current value in real time to ensure that it remains within the safe range.
[0507] Specific steps
[0508] Detect abnormal current fluctuations:
[0509] Through time series analysis and standard score calculation, preliminarily judge and confirm the existence of abnormal current fluctuations.
[0510] Obtain the current parameters:
[0511] Read the current current-limiting resistance value (R_old).
[0512] Measure the current value (I_measured) at present.
[0513] Confirm the preset safety threshold (I_threshold).
[0514] Determine the adjustment coefficient (K).
[0515] Calculate the new resistance value:
[0516] Based on the obtained parameters, calculate the new current-limiting resistance value. This calculation process is based on a certain logic and algorithm, aiming to restore the current value to the safe range.
[0517] Adjust the current-limiting resistance:
[0518] Apply the calculated new resistance value to the system to adjust the actual value of the current-limiting resistance.
[0519] The system will immediately execute this adjustment and continue to monitor the current value to ensure that it remains within the safe range.
[0520] Continuous monitoring and feedback:
[0521] The system will continuously monitor the current value. If it is found that the current value still exceeds the safe range, adjustments will be made again until the current value stabilizes within the safe range.
[0522] If the current value returns to normal, the system will record the situation of this adjustment and generate a report for subsequent analysis and optimization.
[0523] Advantages and effects
[0524] Quick response: By dynamically adjusting the current-limiting resistance value, it can quickly respond to abnormal current fluctuations and prevent the system from being in an unsafe state for a long time.
[0525] Precise control: The method of calculating the new resistance value takes into account multiple factors, enabling more precise control of the current and reducing the risk of overshoot or undershoot.
[0526] Improve reliability: The dynamic adjustment mechanism improves the reliability and stability of the system, reducing failures and downtime caused by current fluctuations.
[0527] Strong adaptability: By adjusting the coefficient K, the response speed and sensitivity of the system can be flexibly adjusted to adapt to different application scenarios and requirements.
[0528] Example 2
[0529] Data acquisition and preprocessing
[0530] Data acquisition:
[0531] Collect the current value once per second to form a time series data set.
[0532] For example, a data set for 24 hours a day contains 86,400 data points.
[0533] Data preprocessing:
[0534] Noise removal: Use a low-pass filter to remove high-frequency noise.
[0535] Data smoothing: Smooth the data using the moving window average method to reduce instantaneous fluctuations.
[0536] Feature extraction
[0537] Extract time series data:
[0538] Extract the average current, peak current, current fluctuation range, and moving window statistics (such as the moving average).
[0539] Time series analysis
[0540] Moving average method:
[0541] Calculate the moving average using a 5-second moving window to obtain the smoothed current change trend.
[0542] Calculate the current change rate
[0543] Select two adjacent sampling points:
[0544] Select two adjacent sampling points, for example, the current values I(0) and I(1) at t = 0 seconds and t = 1 second.
[0545] Calculate the current change rate:
[0546] Calculate the current change rate between these two sampling points.
[0547] Judge whether it exceeds the preset safety threshold:
[0548] If the current change rate exceeds the preset safety threshold (for example, changes by more than 1 ampere per second), it is initially judged as abnormal current fluctuation.
[0549] Calculate the standard score
[0550] Data points initially judged as abnormal current fluctuations:
[0551] For data points initially judged as abnormal current fluctuations, calculate their standard score (Z-score).
[0552] Confirm abnormal current fluctuations:
[0553] If the standard score exceeds 3 or is lower than -3, it is confirmed as abnormal current fluctuation.
[0554] Dynamically adjust the value of the current-limiting resistor
[0555] Obtain the current parameters:
[0556] Obtain the current value of the current-limiting resistor (R_old).
[0557] Measure the current value (I_measured).
[0558] Confirm the preset safety threshold (I_threshold).
[0559] Determine the adjustment factor (K).
[0560] Adjust the current limiting resistor:
[0561] Calculate the new current limiting resistor value based on the obtained parameters.
[0562] Apply the new resistor value to the system and adjust the actual value of the current limiting resistor.
[0563] Continuous monitoring:
[0564] The system continues to monitor the current value in real time to ensure it remains within a safe range.
[0565] If the current value is still outside the safe range, the system will adjust again until the current value stabilizes within the safe range.
[0566] Alarm and recording
[0567] Alarm notification:
[0568] When abnormal current fluctuations are detected and adjusted, the system immediately issues an alarm to notify relevant personnel for inspection and processing.
[0569] Records and Reports:
[0570] Record the time, duration, and severity of unusual events.
[0571] Generate detailed reports to facilitate subsequent analysis and improvement.
[0572] Specific steps example
[0573] Data collection:
[0574] The system collects the current value once per second. For example, at a certain time of a day, the current value collected by the system is 10 amperes.
[0575] Data preprocessing:
[0576] Use a low-pass filter to remove high-frequency noise.
[0577] The data is smoothed using the sliding window averaging method to obtain the smoothed current value.
[0578] Feature extraction:
[0579] Extract the current average value, current peak value, current fluctuation range and moving window statistics in each time period.
[0580] Time series analysis:
[0581] Calculate the moving average using a 5 - second moving window to obtain the smoothed current change trend.
[0582] Calculate the current change rate:
[0583] Select two adjacent sampling points. For example, the current values at t = 0 seconds and t = 1 second are 10 amperes and 11 amperes respectively.
[0584] Calculate the current change rate between these two sampling points as 1 ampere / second.
[0585] Judge whether it exceeds the preset safety threshold (for example, the change per second does not exceed 1 ampere). Since the change rate is 1 ampere / second, it is initially judged as an abnormal current fluctuation.
[0586] Calculate the standard score:
[0587] For the data points initially judged as abnormal current fluctuations, calculate their standard scores.
[0588] If the standard score exceeds 3 or is lower than - 3, it is confirmed as an abnormal current fluctuation.
[0589] Dynamically adjust the value of the current - limiting resistor:
[0590] Obtain the current value of the current - limiting resistor (for example, R_old = 10 ohms).
[0591] Measure the current value (for example, I_measured = 11 amperes).
[0592] Confirm the preset safety threshold (for example, I_threshold = 10 amperes).
[0593] Determine the adjustment coefficient (for example, K = 0.5).
[0594] Calculate the new value of the current - limiting resistor and apply it to the system to adjust the actual value of the current - limiting resistor.
[0595] The system continues to monitor the current value in real - time to ensure that it remains within the safe range.
[0596] Alarm and recording:
[0597] The system immediately issues an alarm to notify relevant personnel for inspection and handling. [[ID=5 (3]]
[0598] Record the time, duration, and severity of the abnormal event.
[0599] Generate a detailed report for subsequent analysis and improvement.
[0600] Example 3
[0601] An abnormal current fluctuation detection and adjustment system, comprising:
[0602] An analysis module, configured to perform time series analysis based on the time series data of current values to obtain the current change trend;
[0603] A judgment module, configured to select two adjacent sampling points in the current change trend to calculate the current change rate between the two adjacent sampling points, judge whether the current change rate exceeds a preset safety threshold, and if it exceeds the preset safety threshold, calculate a standard score according to the current change trend, and judge whether there is an abnormal current fluctuation through the standard score;
[0604] An adjustment module, configured to, if there is the abnormal current fluctuation, dynamically adjust the value of the current-limiting resistor to keep the current value within the preset safety threshold.
[0605] An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method are implemented.
[0606] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method are implemented.
[0607] A computer program product containing instructions, which, when running on a device, causes the device to execute the steps in the method.
[0608] What is not described in this application can be implemented by adopting or referring to the existing technologies.
[0609] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments.
[0610] The above are only the embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. An abnormal current fluctuation detection and adjustment method, characterized in that Including: Performing time series analysis on the time series data of the current value to obtain the current change trend; Selecting two adjacent sampling points in the current change trend to calculate the current change rate between the two adjacent sampling points, determining whether the current change rate exceeds a preset safety threshold, and if it exceeds the preset safety threshold, calculating a standard score based on the current change trend, and determining whether there is abnormal current fluctuation through the standard score; If there is the abnormal current fluctuation, dynamically adjusting the value of the current-limiting resistor to keep the current value within the preset safety threshold.
2. The method according to claim 1, characterized in that, Before performing the time series analysis on the characteristic data of the current value to obtain the current change trend, it further includes: Preprocessing the collected current data; Extracting the time series data from the current data, and the time series data includes: current average value, current peak value, current fluctuation range, and moving window statistic.
3. The method according to claim 1, wherein The performing time series analysis on the time series data of the current value to obtain the current change trend is specifically: Extracting the time series data by using the moving average method to obtain the current change trend, and the formula is specifically: where n is the size of the moving window, I(t) is the current value at time t, and i represents the time offset in the time series.
4. The method according to claim 1, wherein The selecting two adjacent sampling points in the current change trend to calculate the current change rate between the two adjacent sampling points and determining whether the current change rate exceeds the preset safety threshold is specifically: Calculating the current change rate between two adjacent sampling points, and the specific formula is: I(t2): This represents the measured current value at time t2, I(t1): This represents the measured current value at time t1, t2: This is the second time point, usually some time after t1, t l : This is the first time point, usually the time point before t2, t2 - t1: This is the difference between the two time points, representing the time interval, I(t2) - I(t1): This is the change in the current value between the two time points; If the current change rate exceeds the preset safety threshold, it is preliminarily determined as abnormal current fluctuation.
5. The method according to claim 1, characterized in that The if it exceeds the preset safety threshold, calculating a standard score based on the current change trend and determining whether there is abnormal current fluctuation through the standard score is specifically: For the data point preliminarily determined as the abnormal current fluctuation, calculating its standard score (Z-score): where X is the data point of the abnormal current fluctuation, μ is the average value of the data set, and σ is the standard deviation of the data set; If the standard score Z exceeds 3 or is lower than -3, it is confirmed as the abnormal current fluctuation.
6. The method according to claim 1, wherein The if there is the abnormal current fluctuation, dynamically adjusting the value of the current-limiting resistor to keep the current value within the preset safety threshold is specifically: Using the following formula to adjust the value of the current-limiting resistor: R new = R old ×(1 + k·(I measured - I threshold )) Among them, R old is the current resistance value, I measured is the measured current value, I threshold is the preset safety threshold, and K is the adjustment coefficient.
7. An abnormal current fluctuation detection and adjustment system, characterized in that, Including: An analysis module, configured to perform time series analysis on the time series data of the current value to obtain the current change trend; A judgment module, configured to select two adjacent sampling points in the current change trend to calculate the current change rate between the two adjacent sampling points, determine whether the current change rate exceeds the preset safety threshold, and if it exceeds the preset safety threshold, calculate a standard score based on the current change trend, and determine whether there is abnormal current fluctuation through the standard score; An adjustment module, configured to if there is the abnormal current fluctuation, dynamically adjust the value of the current-limiting resistor to keep the current value within the preset safety threshold.
8. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising instructions, when run on a device, characterized in that, The device is caused to execute the steps of the method according to any one of claims 1 to 6.