Power grid surge control method, system and equipment based on Kalman filtering and medium

Through the dual-channel Kalman filtering architecture and dynamic threshold recognition technology, the problem of difficulty in separating electromagnetic interference and surge signals in existing surge control solutions is solved, and precise suppression of different types of surges and improved system stability is achieved.

CN120262337APending Publication Date: 2025-07-04ZHUHAI COPOWER ELECTRIC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510313811.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing surge control scheme is difficult to effectively separate electromagnetic interference from surge signals, and the effect of suppressing transient interference with strong randomness is limited, resulting in frequent malfunctions of distribution terminal equipment, affecting the safe and stable operation of the distribution network.

Method used

A dual-channel Kalman filtering architecture is adopted to establish a state space model by synchronously collecting three-phase voltage and current signals, and combined with parallel filtering of main and auxiliary channels to realize surge characteristic recognition, and compensation control and parameter adaptive adjustment are performed based on the recognition results. Dynamic thresholds are used instead of fixed thresholds, and precise suppression of different types of surges is achieved through compensation control and parameter adaptive adjustment.

Benefits of technology

It improves the anti-interference ability of the system, improves the accuracy and suppression effect of surge recognition, avoids malfunctions, and ensures the stable operation of the distribution network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120262337A_ABST
    Figure CN120262337A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power grid surge control, in particular to a power grid surge control method, system and device based on Kalman filtering and a medium. According to the invention, a dual-channel Kalman filtering architecture is adopted, a state space model is established by synchronously acquiring three-phase voltage and current signals, surge feature recognition is realized by combining main and auxiliary channel parallel filtering, and compensation control and parameter adaptive adjustment are executed based on a recognition result; the anti-interference capability of the system is improved through a dual-channel architecture, the identification accuracy is improved by replacing a fixed threshold value with a dynamic threshold value, and accurate suppression of different types of surges is realized through compensation control and parameter adaptive adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of power grid surge control, and particularly to a power grid surge control method, system, device and medium based on Kalman filtering. Background Art

[0002] With the continuous improvement of the automation level of the distribution network, distribution terminal equipment plays an increasingly important role in the power system. However, due to the complex operating environment of the distribution network, various surge interferences occur frequently, resulting in the problem of misoperation of distribution terminal equipment becoming increasingly prominent, seriously affecting the safe and stable operation of the distribution network.

[0003] At present, metal oxide varistors (MOV) and RC filter circuits are generally used in distribution terminals for surge suppression, and surge detection is performed through voltage comparators and FFT transforms. This traditional surge control scheme mainly relies on the physical characteristics of hardware devices and simple signal processing algorithms to achieve surge suppression and detection functions. It is difficult to effectively separate electromagnetic interference and surge signals, and the suppression effect on random transient interference is limited. This situation needs to be further improved. Summary of the Invention

[0004] In order to solve the problem that the existing surge control scheme is difficult to effectively separate electromagnetic interference and surge signals, and the suppression effect on random transient interference is limited, this application provides a power grid surge control method, system, device and medium based on Kalman filtering, and adopts the following technical solutions: In the first aspect, this application provides a power grid surge control method based on Kalman filtering, including the following steps: Synchronously collect three-phase voltage and current signals at a preset sampling frequency to obtain original sampling data; According to the original sampling data, construct a state equation and an observation equation to obtain Kalman filter initialization parameters; Based on the initialization parameters, perform main-channel and auxiliary-channel filtering calculations respectively to obtain dual-channel filtering output values; According to the dual-channel filtering output values, calculate a dynamic threshold and perform surge feature recognition to obtain a surge recognition result; Based on the surge recognition result, perform compensation control and parameter adaptive adjustment.

[0005] By adopting the above technical solutions, this application adopts a dual-channel Kalman filtering architecture, establishes a state space model by synchronously collecting three-phase voltage and current signals, combines parallel filtering of the main and auxiliary channels to achieve surge feature recognition, and performs compensation control and parameter adaptive adjustment based on the recognition result; the anti-interference ability of the system is improved through the dual-channel architecture, the recognition accuracy is improved by using a dynamic threshold instead of a fixed threshold, and precise suppression of different types of surges is achieved through compensation control and parameter adaptive adjustment.

[0006] Optionally, based on the original sampling data, construct a state equation and an observation equation to obtain the initial parameters of the Kalman filter, which specifically include the following steps: Based on the original sampling data, construct a state equation that includes the system state and the state transition relationship, and an observation equation that includes the relationship between the measured value and the state; Set the initial system parameters, where the initial system parameters include the initial value of the process noise covariance and the observation noise covariance based on the chip error; Based on the state equation, the observation equation, and the initial system parameters, execute the prediction update loop, and sequentially perform state prediction, covariance prediction, gain calculation, state correction, and covariance update.

[0007] By adopting the above technical solution, the present application first constructs a state equation and an observation equation that include the complete state transition relationship based on the original sampling data, then sets the initial values of the process noise and the observation noise covariance considering the chip error characteristics, and finally realizes the dynamic estimation of the state through the prediction update loop; by introducing state space modeling and considering the actual hardware characteristics, a system model that better conforms to the physical essence is established, and the prediction update loop mechanism ensures the real-time performance and accuracy of the state estimation.

[0008] Optionally, based on the initialization parameters, perform filtering calculations on the main channel and the auxiliary channel respectively to obtain the dual-channel filtering output value, which specifically includes the following steps: Based on the initialization parameters, perform main channel filtering calculation using an improved adaptive Kalman algorithm, and dynamically adjust the process noise covariance according to the real-time noise variance to obtain the main channel state estimation value; Based on the initialization parameters, perform auxiliary channel filtering calculation using a Kalman algorithm dedicated to high-frequency noise extraction, and identify the surge starting point through frequency domain characteristics to obtain the auxiliary channel state estimation value; Based on the main channel state estimation value and the auxiliary channel state estimation value, obtain the dual-channel filtering output value.

[0009] By adopting the above technical solution, the present application proposes a dual-channel parallel filtering architecture, realizes the dynamic adjustment of the process noise covariance in the main channel using an improved adaptive Kalman algorithm, simultaneously introduces a Kalman algorithm dedicated to high-frequency noise extraction in the auxiliary channel for frequency domain characteristic identification, and finally obtains the final output by fusing the dual-channel state estimation values; through the complementary advantages of the main and auxiliary channels, it not only ensures the ability to quickly respond to surges but also provides reliable characteristic identification results. By using the improved adaptive algorithm and the dedicated high-frequency feature extraction method, the comprehensive performance of the system is significantly improved.

[0010] Optionally, based on the dual-channel filtering output value, calculate a dynamic threshold and perform surge feature recognition to obtain a surge recognition result, specifically including the following steps: Calculate the standard deviation of the dual-channel filtering output value and perform exponential weighting based on a preset time constant to obtain a dynamic threshold; Calculate the difference between the main-channel state estimation value and the auxiliary-channel state estimation value; When the difference exceeds the dynamic threshold, trigger the execution of time-domain analysis and frequency-domain analysis; Based on the results of the time-domain analysis and the frequency-domain analysis, obtain a surge recognition result; Among them, when performing time-domain analysis, determine whether the voltage rising slope is greater than a preset threshold; when performing frequency-domain analysis, perform a Fourier transform on the difference to detect whether the high-frequency band energy ratio exceeds a preset ratio.

[0011] By adopting the above technical solution, the present application first calculates an exponentially weighted dynamic threshold based on the standard deviation of the dual-channel filtering output, then triggers a dual-analysis mechanism through the main-auxiliary channel difference, and finally combines the time-domain rising slope judgment and the frequency-domain energy ratio analysis to obtain a final recognition result; the adaptive calculation of the dynamic threshold adapts to the system state change, the dual time-domain and frequency-domain analysis is adopted to improve the reliability of feature recognition, and the exponential weighting mechanism is introduced to enhance the response ability to transient features.

[0012] Optionally, based on the surge recognition result, perform compensation control, specifically including the following steps: When it is confirmed that a surge occurs, calculate and inject a reverse compensation current according to the surge characteristics; Freeze the protection outlet during the duration of the surge to prevent misoperation.

[0013] In practical applications, when a surge occurs, relying solely on passive devices such as MOVs for absorption often results in excessive residual voltage. At the same time, due to the lack of protection coordination strategies, it is easy to trigger misoperation of the protection device and cause unplanned power outages; the present application proposes a control scheme for active compensation and protection coordination, which realizes rapid suppression by calculating and injecting a reverse compensation current that matches the surge characteristics in real time, and at the same time takes measures to freeze the protection outlet during the duration of the surge to ensure the stable operation of the system; the surge suppression effect is significantly improved through active compensation, and the misoperation risk is effectively avoided by adopting the protection coordination strategy.

[0014] Optionally, based on the surge recognition result, perform parameter adaptive adjustment, specifically including the following steps: Based on the surge recognition result, use the gradient descent method to online optimize the Kalman filter parameters to converge the state estimation error to a preset range; Dynamically adjust the process noise covariance and the observation noise covariance through a fuzzy controller, where: Increase the process noise covariance during strong surges to improve the tracking speed; Reduce the observation noise covariance during steady state to improve the measurement accuracy.

[0015] In actual operation, when the system needs to simultaneously meet the requirements of fast tracking during strong surges and high-precision measurement during steady state, fixed parameter configurations often lead to problems such as tracking lag or amplified measurement noise, making it difficult to achieve the dynamic balance of performance indicators. This application proposes a parameter adaptive optimization scheme based on gradient descent and fuzzy control, which enables the state estimation error to quickly converge through online optimization, and dynamically adjusts the process noise and observation noise covariance according to the surge intensity to achieve the optimal parameter configuration under different working conditions; rapid parameter optimization is achieved through gradient descent, and the intelligent balance of dynamic response and steady-state accuracy is realized by adopting a fuzzy control strategy.

[0016] In a second aspect, this application provides a power grid surge control system based on Kalman filtering, including: An original sampling data acquisition module, configured to synchronously acquire three-phase voltage and current signals at a preset sampling frequency to obtain original sampling data; A filtering initialization parameter acquisition module, configured to construct a state equation and an observation equation based on the original sampling data to obtain Kalman filtering initialization parameters; A dual-channel filtering output value acquisition module, configured to perform main-channel and auxiliary-channel filtering calculations respectively based on the initialization parameters to obtain dual-channel filtering output values; A surge identification module, configured to calculate a dynamic threshold and perform surge feature identification based on the dual-channel filtering output values to obtain a surge identification result; A compensation control and parameter adjustment module, configured to perform compensation control and parameter adaptive adjustment based on the surge identification result.

[0017] In a third aspect, this application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned power grid surge control method based on Kalman filtering are implemented.

[0018] In a fourth aspect, this application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned power grid surge control method based on Kalman filtering are implemented.

[0019] In summary, this application includes at least one of the following beneficial technical effects: 1. This application adopts a dual-channel Kalman filtering architecture. By synchronously collecting three-phase voltage and current signals, a state space model is established. Combining parallel filtering of the main and auxiliary channels to achieve surge feature recognition, and based on the recognition results, compensation control and parameter adaptive adjustment are executed; the anti-interference ability of the system is improved through the dual-channel architecture, the recognition accuracy is improved by using a dynamic threshold instead of a fixed threshold, and precise suppression of different types of surges is achieved through compensation control and parameter adaptive adjustment; 2. This application proposes a dual-channel parallel filtering architecture. In the main channel, an improved adaptive Kalman algorithm is used to dynamically adjust the process noise covariance. At the same time, in the auxiliary channel, a Kalman algorithm dedicated to high-frequency noise extraction is introduced for frequency domain feature recognition. Finally, the final output is obtained by fusing the state estimates of the two channels; through the complementary advantages of the main and auxiliary channels, both the ability to quickly respond to surges and reliable feature recognition results are ensured. By using an improved adaptive algorithm and a dedicated high-frequency feature extraction method, the comprehensive performance of the system is significantly improved; 3. This application first calculates an exponentially weighted dynamic threshold based on the standard deviation of the dual-channel filtering output, then triggers a dual-analysis mechanism through the difference between the main and auxiliary channels, and finally obtains the final recognition result by combining the judgment of the time-domain rising slope and the analysis of the frequency-domain energy ratio; the adaptive calculation of the dynamic threshold adapts to the changes in the system state, the reliability of feature recognition is improved by using dual time-domain and frequency-domain analysis, and the response ability to transient features is enhanced by introducing an exponentially weighted mechanism. Description of the Drawings

[0020] Figure 1 is a schematic flow chart of a power grid surge control method based on Kalman filtering according to an embodiment of this application; Figure 2 is a schematic flow chart of step S200 in a power grid surge control method based on Kalman filtering according to an embodiment of this application; Figure 3 is a schematic flow chart of step S300 in a power grid surge control method based on Kalman filtering according to an embodiment of this application; Figure 4 is a schematic flow chart of step S400 in a power grid surge control method based on Kalman filtering according to an embodiment of this application; Figure 5 is a schematic flow chart of step S500 in a power grid surge control method based on Kalman filtering according to an embodiment of this application; Figure 6 is a schematic module diagram of a power grid surge control system based on Kalman filtering according to an embodiment of this application; Figure 7 is an internal structure diagram of an electronic device according to an embodiment of this application. Detailed Embodiments

[0021] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular forms "a", "an", "the", "above-mentioned", "said", and "this" are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations including one or more of the listed items.

[0022] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and should not be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.

[0023] The embodiments of the present application will be further described in detail below with reference to the accompanying drawings of the specification.

[0024] In a first aspect, the present application provides a power grid surge control method based on Kalman filtering. Referring to Figure 1 , the method includes the following steps: S100: Synchronously collect three-phase voltage and current signals at a preset sampling frequency to obtain original sampling data.

[0025] In this embodiment, the sampling frequency refers to the fixed frequency value at which the system collects three-phase voltage and current signals of the power grid. Considering the spectral characteristics of the power grid surge signal and the requirements of digital signal processing, the sampling frequency of 12.8 kHz is adopted in this embodiment. This frequency can effectively cover the main frequency components of the surge signal and avoid the computational burden caused by excessive sampling data volume. The sampling data is grouped in units of 20 ms, and each data packet contains 256 sampling points, forming a sliding sampling window.

[0026] Specifically, the system uses a 16-bit high-precision ADC chip to synchronously sample three-phase voltage and current signals of the power grid. The full-scale range of the ADC chip is ±10V, and the differential input mode is adopted to improve the anti-interference ability. An RC low-pass filter circuit is configured at the analog front end, and the cut-off frequency is set to 5 kHz to suppress high-frequency interference and prevent aliasing. The data acquisition channels include six channels of three-phase voltage and current of A, B, and C. The sampling data is transmitted to the DSP processor through the DMA method. The system sets two alternately used data buffers, and the length of each buffer is 256 points. When one buffer completes data acquisition, it immediately switches to the other buffer to achieve continuous data acquisition and real-time update.

[0027] S200. Construct a state equation and an observation equation based on the original sampling data to obtain the initial parameters of the Kalman filter.

[0028] In this embodiment, the state equation describes the evolution law of the system state, and the observation equation describes the relationship between the state variables and the measured values. By analyzing the physical characteristics of the power grid surge, a second-order state space model is established, where the state variables are selected as the voltage amplitude and the change rate, and the observed variable is the sampled voltage value.

[0029] Specifically, first preprocess the original sampling data, including operations such as removing the power frequency component and normalization. Then, according to the preset state transition matrix and observation matrix, initialize the system noise covariance matrix Q and the measurement noise covariance matrix R in combination with empirical values. To adapt to different operating conditions, establish a parameter mapping table based on statistical characteristics for quickly determining the initial parameters.

[0030] S300. Based on the initial parameters, perform filtering calculations for the main channel and the auxiliary channel respectively to obtain the dual-channel filtering output values.

[0031] In this embodiment, the dual-channel filtering architecture includes two parallel processing branches: the main channel and the auxiliary channel. The main channel uses the Kalman filtering algorithm to focus on accurately estimating the voltage amplitude; the auxiliary channel focuses on extracting high-frequency feature components.

[0032] Specifically, in the main channel, perform prediction-update iterative calculations based on the initial parameters. The state prediction value is obtained through the state equation, and the gain matrix is dynamically adjusted according to the prediction error covariance. In the auxiliary channel, identify the starting point of the surge through frequency domain feature recognition.

[0033] S400. Calculate the dynamic threshold based on the dual-channel filtering output values and perform surge feature recognition to obtain the surge recognition result.

[0034] In this embodiment, the dynamic threshold calculation is based on the statistical characteristics of the dual-channel output and is implemented using the sliding time window method for adaptive update.

[0035] Specifically, first calculate the mean and standard deviation of the difference between the main and auxiliary channel outputs, and establish a dynamic threshold criterion based on statistics. When the difference exceeds the threshold, further extract the feature vectors, including the amplitude change rate, duration, etc., and match them with the pre-established feature template library. Determine whether a surge occurs according to the matching degree. The feature template library is constructed through offline statistical analysis and contains the feature parameters of typical surge waveforms.

[0036] S500. Based on the surge recognition result, perform compensation control and parameter adaptive adjustment.

[0037] Specifically, a compensation strategy is determined based on the surge identification result. For known types of surges, the compensation characteristic curve is directly called to calculate the compensation amount; for new types of surges, a conservative compensation strategy is adopted for gradual adjustment. At the same time, a parameter adjustment mapping table is established, and the filter gain and noise covariance are dynamically adjusted according to the surge intensity level to optimize the system performance.

[0038] In one embodiment, referring to Figure 2 , in step S200, based on the original sampling data, a state equation and an observation equation are constructed to obtain the Kalman filter initialization parameters, which specifically include the following steps: S210. Based on the original sampling data, a state equation including the system state and the state transition relationship, and an observation equation including the relationship between the measured value and the state are constructed.

[0039] In this embodiment, the discrete-time state space model is used to describe the surge dynamic characteristics. The state equation adopts a linear expression form x_k = Ax_{k - 1}+Bu_{k - 1}+w_k, where the state vector x_k includes the voltage amplitude component; w_k is the process noise, which follows a Gaussian distribution with a mean of 0. The observation equation is expressed as z_k = Hx_k + v_k, where z_k is the sampled voltage value and v_k is the observation noise.

[0040] Specifically, the state transition matrix A adopts a scalar form with a value of 0.98, reflecting the inertial characteristics of the system. When the external control action is not considered, the Bu_{k - 1} term can be simplified and omitted. The observation matrix H is the identity matrix, indicating that the state quantity can be directly observed. The process noise w_k and the observation noise v_k are both assumed to be Gaussian white noise, and their statistical characteristics are described by the covariance matrices Q and R.

[0041] S220. Set the system initial parameters, which include the initial value of the process noise covariance and the observation noise covariance based on the chip error.

[0042] In this embodiment, the system initial parameters include the noise statistical characteristics and the initial state estimate. The initial value of the process noise covariance Q is set to 0.01, which is obtained through offline simulation optimization. The observation noise covariance R is determined based on the quantization characteristics of the AD chip, taking the 3σ value of the chip nominal error, which reflects the uncertainty of the measurement system.

[0043] Specifically, assuming the quantization error of the AD chip is ±1LSB, then the observation noise standard deviation σ = LSB / √12, and the observation noise covariance R takes 9σ². For the used 16-bit AD chip, the specific value of R is calculated. The initial state estimate value takes the first measurement value, and the initial estimation error covariance matrix P_0 is set to the identity matrix, indicating a large initial uncertainty.

[0044] S230. According to the state equation, the observation equation, and the system initial parameters, perform the prediction update loop, and sequentially perform state prediction, covariance prediction, gain calculation, state correction, and covariance update.

[0045] In this embodiment, each time a new sampling value is received, a Kalman filter iteration calculation is triggered. In the prediction stage, the prior state estimate \(\hat{x}_{k}^{-}\) and the prior error covariance \(P_{k}^{-}\) are calculated; in the update stage, the Kalman gain \(K_{k}\), the posterior state estimate \(\hat{x}_{k}\), and the posterior error covariance \(P_{k}\) are calculated in sequence.

[0046] Specifically, the filtering iteration calculation first calculates the predicted value of the current state \(\hat{x}_{k}^{-}=A\hat{x}_{k - 1}+Bu_{k - 1}\) based on the state estimate value at the previous moment and the state transition matrix, and simultaneously updates the predicted error covariance \(P_{k}^{-}=AP_{k - 1}A^{T}+Q\); then calculates the optimal Kalman gain \(K_{k}=P_{k}^{-}H^{T}(HP_{k}^{-}H^{T}+R)^{-1}\) in combination with the current predicted error covariance. This gain can adaptively balance the weights of the predicted value and the observed value; then adds the predicted value and the weighted observation residual to obtain the optimal state estimate \(\hat{x}_{k}=\hat{x}_{k}^{-}+K_{k}(z_{k}-H\hat{x}_{k}^{-})\), and finally updates the estimated error covariance \(P_{k}=(I - K_{k}H)P_{k}^{-}\) to complete one iteration. The entire calculation process forms a closed-loop feedback structure, and continuously improves the state estimation accuracy through the prediction-correction mechanism.

[0047] In one embodiment, referring to Figure 3 , in step S300, based on the initialization parameters, perform filtering calculations on the main channel and the auxiliary channel respectively to obtain the dual-channel filtering output values, which specifically include the following steps: S310. Based on the initialization parameters, perform main-channel filtering calculation using an improved adaptive Kalman algorithm, and dynamically adjust the process noise covariance according to the real-time noise variance to obtain the main-channel state estimate value.

[0048] In this embodiment, the main channel uses an improved adaptive Kalman algorithm for filtering calculation, and dynamically adjusts the process noise covariance Q by real-time evaluating the measurement noise level. The algorithm introduces a noise variance estimation link in the standard Kalman filter framework, improving the tracking ability for rapid changes in surges.

[0049] Specifically, the system calculates the measurement noise variance based on a sliding window of the last 32 sampling points. When the variance mutation exceeds the preset threshold, the process noise covariance Q value is correspondingly increased, and the Q value is adaptively adjusted within the range of [0.01, 0.1] under typical working conditions. At the same time, median filtering preprocessing is used to eliminate single-point pulse interference in the sampling data, improving the reliability of the state estimation.

[0050] S320. Based on the initialization parameters, perform auxiliary channel filtering calculations using the Kalman algorithm dedicated to high-frequency noise extraction, identify the surge starting point through frequency domain characteristics, and obtain the auxiliary channel state estimation value.

[0051] In this embodiment, the auxiliary channel adopts a specially designed high-frequency feature extraction algorithm. By adjusting the observation equation and noise model, it focuses on the high-frequency components of the signal. The algorithm maintains a relatively large process noise covariance, making the filter more sensitive to high-frequency disturbances.

[0052] Specifically, the auxiliary channel sets the observation noise covariance R value to 1 / 5 of the main channel, and at the same time introduces a high-frequency component extractor in the state prediction stage. The system establishes a frequency domain feature database to store the energy ratio characteristic values of typical surge signals in the 0.1 - 1 MHz frequency band. When the matching degree between the FFT analysis result and the characteristic value exceeds 80%, it is marked as a potential surge starting point.

[0053] S330. Obtain the dual-channel filtering output value according to the main channel state estimation value and the auxiliary channel state estimation value.

[0054] In this embodiment, the dual-channel output value is used for surge detection by calculating the difference Δ = |y_main - y_aux| of the main and auxiliary channel state estimation values. A dynamic threshold criterion is set, and comprehensive analysis is carried out by combining time domain and frequency domain characteristics.

[0055] Specifically, the system first calculates the output difference between the main and auxiliary channels. When the difference exceeds the dynamic threshold, it triggers the feature analysis process. The time domain feature mainly examines whether the signal rising slope exceeds 500 V / ms, and the frequency domain feature focuses on whether the energy ratio in the 0.1 - 1 MHz frequency band exceeds 40%. A three-level early warning mechanism is established. When only the difference exceeds the limit, a primary early warning is generated. When the time domain feature is also satisfied, it is upgraded to a medium-level early warning. When all three conditions are met, a high-level early warning is triggered. The early warning results are mapped to corresponding processing strategies through a look-up table, including alarm, recording, and protection actions, etc.

[0056] In one embodiment, referring to Figure 4 , in step S400, according to the dual-channel filtering output value, calculate the dynamic threshold and perform surge feature recognition to obtain the surge recognition result, which specifically includes the following steps: S410. Calculate the standard deviation of the dual-channel filtering output value and perform exponential weighting based on a preset time constant to obtain the dynamic threshold.

[0057] In this embodiment, the dynamic threshold calculation adopts an adaptive method based on exponential weighting. First, calculate the sliding standard deviation σ of the dual-channel filtering output, and then introduce a time constant τ = 10 ms for exponential weighting to obtain the dynamic threshold expression Threshold = σ + 3(1 + 0.2e^{-t / τ}).

[0058] Specifically, the system calculates the standard deviation using a 32-point sliding window, and the window is updated once for each data point it slides over. The exponential term coefficient of 0.2 and the time constant of 10 ms are determined through offline data analysis. When the system starts up or there is a sudden change in operating conditions, the exponential term gives a large margin and gradually decays to the steady-state value over time, achieving dynamic adjustment of the threshold.

[0059] S420. Calculate the difference between the main-channel state estimate and the auxiliary-channel state estimate.

[0060] In this embodiment, the difference Δ between the main and auxiliary channel state estimates is calculated as Δ = |y_main - y_aux|. The main-channel estimate reflects the basic trend of the signal, and the auxiliary-channel estimate highlights the high-frequency characteristics. The difference between the two can effectively reflect the characteristics of surge disturbances.

[0061] Specifically, a difference calculation buffer is established to store the most recent 8 difference samples. Using a circular buffer structure ensures real-time calculation while providing the necessary historical data for subsequent slope calculation.

[0062] S430. When the difference exceeds the dynamic threshold, trigger the execution of time-domain analysis and frequency-domain analysis.

[0063] In this embodiment, when the calculated difference exceeds the dynamic threshold, the feature analysis process is triggered. The analysis includes two dimensions: time domain and frequency domain, focusing on the instantaneous change characteristics and spectral distribution characteristics of the signal respectively.

[0064] Specifically, the system maintains a state machine that includes three states: idle, monitoring, and analysis. When the difference first exceeds the threshold, the state machine switches from the idle state to the monitoring state; if three consecutive sampling points exceed the limit, it enters the analysis state, and at the same time, time-domain and frequency-domain feature extraction are started.

[0065] S440. Obtain the surge identification result based on the results of time-domain analysis and frequency-domain analysis.

[0066] Among them, when performing time-domain analysis, it is judged whether the voltage rise slope is greater than the preset threshold; when performing frequency-domain analysis, the difference is subjected to Fourier transform to detect whether the energy ratio in the high-frequency band exceeds the preset ratio.

[0067] In this embodiment, surge identification is based on dual time-domain and frequency-domain feature criteria. Time-domain feature extraction calculates the voltage rise slope and judges whether it exceeds 500 V / ms; frequency-domain analysis is calculated through 32-point FFT to detect whether the energy ratio in the 0.1 - 1 MHz frequency band exceeds 40%.

[0068] Specifically, the time-domain slope calculation uses the differential mean of the adjacent 8 samples, and the digital quantity is converted into the actual voltage slope by means of look-up table. The frequency-domain analysis uses a fixed-point FFT algorithm, and a quick look-up table of the energy ratio of frequency bands is established in advance. The FFT result is mapped to 8 frequency bands to quickly obtain the energy ratio of the target frequency band (0.1-1MHz). When the time-domain and frequency-domain characteristics simultaneously meet the criteria, a surge identification confirmation signal is output. The system sets a minimum repeated trigger interval of 50ms to prevent repeated identification in a single surge event.

[0069] Furthermore, in some embodiments, for the periodic load change characteristics during normal operation of the device, the system first establishes a 24-hour load characteristic period table, divides a day into 48 time periods, and records three typical values during normal operation for each period: no-load voltage V0, operating voltage V1, and maximum fluctuation amplitude ΔV. The current detection uses a relative deviation index RD: RD = |V_current - V_expected| / V_expected, where V_expected is the expected voltage value for the current period and is linearly interpolated within the range of V0 - V1 according to the real-time power level. The system also introduces a working condition identification logic. By detecting the power change trend ΔP of the nearest 8 sampling points, the working condition is divided into three states: startup, stable operation, and shutdown. Different relative deviation threshold values [0.4, 0.25, 0.3] are set for each state. When RD exceeds the corresponding threshold and is greater than the historical maximum fluctuation amplitude ΔV of this period, it is determined as a surge. By utilizing the periodic law of load operation, through the time period characteristic table and the working condition adaptive threshold, the detection reliability is improved while keeping the algorithm simple, which is especially suitable for industrial devices with a fixed operation mode.

[0070] In one embodiment, referring to Figure 5 , in step S500, based on the surge identification result, compensation control is performed, which specifically includes the following steps: S510. When it is confirmed that a surge occurs, calculate and inject a reverse compensation current according to the surge characteristics.

[0071] In this embodiment, the system calculates the compensation current by using the characteristic parameter query method, and a surge characteristic-compensation amount mapping table containing 100 groups of typical working conditions is established in advance. The mapping table is constructed based on a large amount of experimental data, and records the corresponding relationship between the waveform characteristics and the optimal compensation parameters under different surge types (such as inductive, capacitive, resistive load switching, etc.).

[0072] Specifically, the system searches for the nearest reference working condition in the mapping table according to the currently detected surge characteristics (rise time tr, peak value Vp, duration td), and calculates the amplitude (0.8 - 1.2 times the peak value) and phase angle (0 - 60° leading) of the compensation current by linear interpolation.

[0073] S520. Freeze the protection outlet during the surge duration to prevent misoperation.

[0074] In this embodiment, the system adopts an adaptive delay strategy to control the protection output according to the surge type. Based on the pre - statistically typical durations of different types of surges, a delay reference table is established.

[0075] Specifically, the system first determines the surge type (inductive / capacitive / resistive) according to the surge characteristics, then obtains the reference delay value (8 - 15 ms) from the reference table, and dynamically adjusts the actual delay according to the real - time monitored surge decay situation.

[0076] In step S500, based on the surge recognition result, parameter adaptive adjustment is performed, which specifically includes the following steps: S530. Based on the surge recognition result, the Kalman filter parameters are optimized online using the gradient descent method to converge the state estimation error to a preset range.

[0077] In this embodiment, the system designs a parameter optimization scheme. The statistical characteristics of the state estimation error are calculated through a 32 - point sliding window, and a performance index is constructed using the error mean and variance. Specifically, when the error exceeds the preset range (±1%), the system adjusts the parameters along the error gradient direction at a learning rate of 0.01 - 0.05, and at the same time introduces a damping coefficient of 0.3 - 0.5 to prevent parameter oscillation.

[0078] S540. Dynamically adjust the process noise covariance and the observation noise covariance through a fuzzy controller.

[0079] Among them, the process noise covariance is increased during strong surges to improve the tracking speed; the observation noise covariance is decreased during the steady state to improve the measurement accuracy.

[0080] In this embodiment, the system adopts a three - level fuzzy rule to adjust the noise covariance. The rule base is constructed based on expert experience and contains 9 basic rules. The rule base divides the system state into three types: surge, transition, and steady state, corresponding to different parameter adjustment strategies.

[0081] Specifically, the Q value is increased to 0.1 during strong surges to improve the tracking speed, the R value is decreased to 0.05 during the steady state to improve the accuracy, and the default values (Q = 0.01, R = 0.1) are maintained during the transition state.

[0082] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0083] Second aspect, the present application provides a power grid surge control system based on Kalman filtering. Below, in combination with the above-mentioned power grid surge control method based on Kalman filtering, the power grid surge control system based on Kalman filtering of the present application will be described.

[0084] Referring to Figure 6 , a power grid surge control system based on Kalman filtering includes: An original sampling data acquisition module, configured to synchronously acquire three-phase voltage and current signals at a preset sampling frequency to obtain original sampling data; A filtering initialization parameter acquisition module, configured to construct a state equation and an observation equation according to the original sampling data to obtain Kalman filtering initialization parameters; A dual-channel filtering output value acquisition module, configured to perform main-channel and auxiliary-channel filtering calculations respectively based on the initialization parameters to obtain dual-channel filtering output values; A surge identification module, configured to calculate a dynamic threshold and perform surge feature identification according to the dual-channel filtering output values to obtain a surge identification result; A compensation control and parameter adjustment module, configured to perform compensation control and parameter adaptive adjustment based on the surge identification result.

[0085] In one embodiment, the present application provides an electronic device, which may be a server, and its internal structure diagram may be as Figure 7 shown. The electronic device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a power grid surge control method based on Kalman filtering.

[0086] Those skilled in the art can understand that Figure 7 the structure shown in

[0087] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0088] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The above computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0089] The above are all preferred embodiments of this application. The protection scope of this application is not limited thereby. Therefore, all equivalent changes made according to the structure, shape, and principle of this application should be covered within the protection scope of this application.

Claims

1. A power grid surge control method based on Kalman filtering, characterized in that, It includes the following steps: Synchronously collect three-phase voltage and current signals at a preset sampling frequency to obtain original sampling data; According to the original sampling data, construct a state equation and an observation equation to obtain Kalman filter initialization parameters; Based on the initialization parameters, perform filtering calculations on the main channel and the auxiliary channel respectively to obtain dual-channel filtering output values; According to the dual-channel filtering output values, calculate a dynamic threshold and perform surge feature recognition to obtain a surge recognition result; Based on the surge recognition result, perform compensation control and parameter adaptive adjustment.

2. The method for controlling power grid surges based on Kalman filtering according to claim 1, wherein According to the original sampling data, construct a state equation and an observation equation to obtain Kalman filter initialization parameters, which specifically includes the following steps: According to the original sampling data, construct a state equation including system states and state transition relationships, and an observation equation including the relationship between measurement values and states; Set system initial parameters, where the system initial parameters include the initial value of the process noise covariance and the observation noise covariance based on chip errors; According to the state equation, the observation equation, and the system initial parameters, perform a prediction-update loop, and sequentially perform state prediction, covariance prediction, gain calculation, state correction, and covariance update.

3. The method for controlling power grid surges based on Kalman filtering according to claim 2, characterized in that, Based on the initialization parameters, perform filtering calculations on the main channel and the auxiliary channel respectively to obtain dual-channel filtering output values, which specifically includes the following steps: Based on the initialization parameters, perform main-channel filtering calculation using an improved adaptive Kalman algorithm, and dynamically adjust the process noise covariance according to the real-time noise variance to obtain the main-channel state estimation value; Based on the initialization parameters, perform auxiliary-channel filtering calculation using a Kalman algorithm dedicated to high-frequency noise extraction, and identify the surge starting point through frequency-domain characteristics to obtain the auxiliary-channel state estimation value; According to the main-channel state estimation value and the auxiliary-channel state estimation value, obtain the dual-channel filtering output value.

4. The method for controlling power grid surges based on Kalman filtering according to claim 3, wherein, According to the dual-channel filtering output values, calculate a dynamic threshold and perform surge feature recognition to obtain a surge recognition result, which specifically includes the following steps: Calculate the standard deviation of the dual-channel filtering output values, and perform exponential weighting based on a preset time constant to obtain a dynamic threshold; Calculate the difference between the main-channel state estimation value and the auxiliary-channel state estimation value; When the difference exceeds the dynamic threshold, trigger the execution of time-domain analysis and frequency-domain analysis; According to the results of the time-domain analysis and the frequency-domain analysis, obtain the surge recognition result; Among them, when performing time-domain analysis, judge whether the voltage rising slope is greater than a preset threshold; when performing frequency-domain analysis, perform a Fourier transform on the difference to detect whether the energy ratio in the high-frequency band exceeds a preset ratio.

5. The method for controlling power grid surges based on Kalman filtering according to claim 1, characterized in that, Based on the surge recognition result, perform compensation control, which specifically includes the following steps: When it is confirmed that a surge occurs, calculate and inject a reverse compensation current according to the surge characteristics; Freeze the protection outlet during the duration of the surge to prevent misoperation.

6. The method for controlling power grid surges based on Kalman filtering according to claim 2, wherein Based on the surge recognition result, perform parameter adaptive adjustment, which specifically includes the following steps: Based on the surge recognition result, use the gradient descent method to online optimize the Kalman filter parameters to make the state estimation error converge within a preset range; Dynamically adjust the process noise covariance and the observation noise covariance through a fuzzy controller, where: Increase the process noise covariance during strong surges to improve the tracking speed; Reduce the observation noise covariance during steady state to improve the measurement accuracy.

7. A power grid surge control system based on Kalman filtering, characterized in that, It includes: An original sampling data acquisition module, which is used to synchronously acquire three-phase voltage and current signals at a preset sampling frequency to obtain original sampling data; A filter initialization parameter acquisition module, which is used to construct a state equation and an observation equation according to the original sampling data to obtain Kalman filter initialization parameters; A dual-channel filter output value acquisition module, which is used to perform main-channel and auxiliary-channel filter calculations respectively based on the initialization parameters to obtain dual-channel filter output values; A surge identification module, which is used to calculate a dynamic threshold and perform surge feature identification according to the dual-channel filter output values to obtain a surge identification result; A compensation control and parameter adjustment module, which is used to perform compensation control and parameter adaptive adjustment based on the surge identification result.

8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the Kalman filter-based power grid surge control method according to any one of claims 1-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 Kalman filter-based power grid surge control method according to any one of claims 1-6 are implemented.

Citation Information

Cited By

  • Satellite-borne power supply chip surge protection test system and method

    CN120686003A