Harmonic detection method for novel power grid
By combining adaptive filters and fine filters, the problem of insufficient harmonic detection accuracy in new power grids was solved, achieving high-precision harmonic detection and reducing equipment losses and electromagnetic interference.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGBO INST OF INFORMATION TECH APPL CHINESE ACAD OF SCI
- Filing Date
- 2024-10-25
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies cannot accurately detect fine harmonics in new power grids, leading to problems such as increased equipment losses, overheating, shortened lifespan, and electromagnetic interference.
An adaptive filter is used to initially extract principal harmonic components, and a fine filter is used for fine processing. High-precision harmonic detection is achieved by defining state vectors, measurement vectors, state estimation, and covariance matrix updates.
It improves the accuracy and robustness of harmonic detection, enabling high-precision harmonic detection in new power grids and reducing equipment losses and electromagnetic interference.
Smart Images

Figure CN121933805A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of harmonic detection in the context of new power grids, and specifically relates to a harmonic detection method for new power grids. Background Technology
[0002] Harmonics refer to components in the current or voltage waveform that have frequencies that are integer multiples of the fundamental frequency, present in modern power grids. The main sources of harmonics include: nonlinear loads such as power electronic equipment (frequency converters, rectifiers), computers, fluorescent lamps, etc.; and internal components of the power system such as transformer magnetic saturation and resonance.
[0003] Harmonics increase equipment losses, leading to overheating and shortened lifespan. They also affect voltage waveform quality, generate electromagnetic interference, and impact other electronic equipment, potentially causing malfunctions in protection devices and compromising system safety.
[0004] Existing technologies often use Fourier Transform (FT), Fast Fourier Transform (FFT), and Wavelet Transform (WT) to detect harmonics in power systems. However, all of these methods have the problem of failing to detect fine harmonics. Summary of the Invention
[0005] To address the problems in the prior art, this invention provides a novel method for detecting harmonics in power grids, comprising the following steps:
[0006] The voltage signal of the power system is collected to obtain the raw signal. The raw signal is then preprocessed to obtain the preprocessed signal. The preprocessing includes removing the DC component and high-frequency noise.
[0007] The preprocessed signal is subjected to adaptive filter processing to extract the principal harmonic components;
[0008] The principal harmonic components are processed by a fine filter to extract the harmonic components;
[0009] The principal harmonic components are subjected to fine filter processing to extract harmonic components, including:
[0010] S1 defines the state vector;
[0011] S2 measurement vector;
[0012] S3 maps the state vector to the measurement space;
[0013] S4 Initialization State Estimation;
[0014] S5 Initializes the covariance matrix;
[0015] S6 then predicts the state;
[0016] S7 predicts covariance;
[0017] S8 calculates system gain;
[0018] S9 updates state estimation;
[0019] S10 updates the covariance matrix.
[0020] Further, the step of performing adaptive filter processing on the preprocessed signal to extract the principal harmonic components includes:
[0021] The filter weights are initialized to a zero vector:
[0022] w(0) = [w0(0), w1(0), ..., w N-1 (0)] T ,
[0023] Where N is the filter order, w(0) is the initial weight value of the 0th order filter, and w1(0) is the initial weight value of the 1st order filter. N-1 (0) represents the initial weight values of the (N-1)th order filter;
[0024] At each time point k, construct the input signal vector X. k :
[0025] X k =[x(k),x(k-1)...x(k-N+1)],
[0026] X k Let x(k) represent the input signal vector at the current time point k, including the signals of the current and the previous N-1 sampling points. Let x(k) represent the signal at the current time point k, and x(k-N+1) represent the signals at the previous N-1 time points.
[0027] Filter output y(k):
[0028]
[0029] The output signal of the y(k) filter is the inner product of the current weight vector and the input signal vector. The output signal y(k) represents the initially extracted principal harmonic components.
[0030] w T (k) represents the transpose of the weight vector at the current time point k; w i (k) represents the i-th weight at the current time point k;
[0031] Calculate the error e(k):
[0032] e(k) = D(k) - y(k),
[0033] Where D(k) is the desired signal;
[0034] Update the filter weights w(k+1):
[0035] w(k+1)=w(k)+2ue(k)x k ,
[0036] u is the step size factor;
[0037] w(k+1) represents the weight vector at time k+1, which is updated using the current weight, error, and step size factor. 3. A novel harmonic detection method for power grids according to claim 2, characterized in that the desired signal is obtained through the following method:
[0038] Assuming the signal contains a fundamental frequency of 50Hz and a third harmonic of 150Hz, construct the desired signal:
[0039] D(k)=A1cos(2πf1kT)+A3cos(2πf3kT),
[0040] Where f1 = 50Hz, f3 = 150Hz, T is the sampling period, and A1 and A3 are the amplitudes of the fundamental frequency and harmonics, respectively.
[0041] Furthermore, the principal harmonic components are subjected to fine filter processing to extract harmonic components, including:
[0042] The defined state vector is z(k):
[0043] z(k) = [z1(k), z2(k), ..., z m (k)] T ,
[0044] z(k) represents the state vector at time k; z(k) represents the i-th state vector at time k;
[0045] The measurement vector is y(k), which is the output y(k) of the adaptive filter;
[0046] y(k)=Hz(k)+v(k),
[0047] Where H represents the measurement matrix, which maps the state vector to the measurement space, and v(k) represents the measurement noise at time k;
[0048] The state transition equation is:
[0049] z(k+1)=Az(k)+w(k),
[0050] Where A represents the state transition matrix, which describes how the system state transitions from time k to time k+1, and w(k) represents the process noise at time k;
[0051] The initialization state is estimated to be z^(0|0);
[0052] The initial covariance matrix is P(0|0);
[0053] The predicted state:
[0054] z^(k|k-1)=Az^(k-1|k-1),
[0055] Where z^(k|k-1) represents the predicted state estimate at time k based on information at time k-1, and Az^(k-1|k-1) represents the state at time k-1;
[0056] The predicted covariance is:
[0057] P(k|k-1)=AP(k-1|k-1)A T +Q,
[0058] Where P(k|k-1) represents the prediction covariance matrix based on the information at time k-1, P(k-1|k-1) represents the covariance matrix at time k-1, and Q represents the process noise covariance matrix, which describes the statistical characteristics of the process noise.
[0059] The gain of the computing system:
[0060] K(k)=P(k-1|k-1)H T (HP(k|k-1)H T +R) -1 ,
[0061] Where z^(k|k) represents the state estimate after the update at time k, which is the more accurate harmonic component extracted after further fine processing by the fine filter;
[0062] The updated covariance matrix is:
[0063] P(k|k)=(IK(k)H)P(k|k-1),
[0064] Where P(k|k) represents the covariance matrix updated at time k, reflecting the change in uncertainty of the state estimate after the update.
[0065] Furthermore, the state vector is obtained in the following manner:
[0066] For the fundamental wave and the first two harmonics, the state vector is represented as:
[0067]
[0068] Among them, A i (k) is the amplitude of the i-th harmonic, θ i z(k) is the phase angle of the i-th harmonic, and z(k) represents the i-th state variable at time k.
[0069] Furthermore, if there is no prior knowledge of the system state, the initial state estimate is set as the zero vector.
[0070] Furthermore, if there is prior knowledge about the system state, the prior estimate is used as the initial state.
[0071] Furthermore, if there is no specific information about the uncertainty of the initial state, the covariance matrix is initialized by multiplying the identity matrix by a constant.
[0072] Furthermore, if there is prior knowledge, then the prior covariance matrix is used.
[0073] In another aspect, the present invention provides a novel harmonic detection system for power grids, comprising the following modules:
[0074] The acquisition module is used to acquire voltage signals from the power system to obtain the raw signal, and then remove the DC component and high-frequency noise from the raw signal to obtain the preprocessed signal.
[0075] The initial processing module is used to perform adaptive filter processing on the preprocessed signal and extract the principal harmonic components;
[0076] The fine processing module is used to perform fine filter processing on the principal harmonic components and extract the harmonic components.
[0077] The principal harmonic components are subjected to fine filter processing to extract harmonic components, including:
[0078] S1 defines the state vector;
[0079] S2 measurement vector;
[0080] S3 maps the state vector to the measurement space;
[0081] S4 Initialization State Estimation;
[0082] S5 Initializes the covariance matrix;
[0083] S6 then predicts the state;
[0084] S7 predicts covariance;
[0085] S8 calculates system gain;
[0086] S9 updates state estimation;
[0087] S10 updates the covariance matrix.
[0088] The present invention, through the above technical solution, can produce the following beneficial effects:
[0089] A harmonic detection method combining adaptive and fine filters is proposed. The adaptive filter initially extracts the principal harmonic components, while the fine filter performs further processing to obtain a more accurate state estimate. This enables high-precision harmonic detection in new power grids. The adaptive filter features real-time performance and fast response, while the fine filter provides accurate state estimation and noise filtering capabilities. Combining the two effectively improves the accuracy and robustness of harmonic detection. Attached Figure Description
[0090] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0091] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0092] The invention will now be described in preferred form with reference to the accompanying drawings and specific embodiments.
[0093] This embodiment solves the above problems through the following steps: In one embodiment, refer to Figure 1 This invention provides a novel method for detecting harmonics in a power grid, comprising the following steps:
[0094] 1. Data Acquisition and Preprocessing
[0095] Voltage signals from a new power grid system are acquired to obtain the original signal x(k). The DC component refers to the average value or DC offset of the signal. In power systems, the DC component in the signal does not provide useful information for AC analysis; instead, it interferes with the analysis of harmonics and other AC components. High-frequency noise refers to high-frequency components in the signal that exceed the frequency range of interest. These high-frequency components are usually random noise caused by electromagnetic interference, switching operations, etc., and can interfere with the analysis of the actual signal. Therefore, signal preprocessing is required, including removing the DC component and high-frequency noise, to obtain the preprocessed signal d(k).
[0096] 2. Adaptive filter processing to extract the main harmonic components.
[0097] The filter weights are initialized to a zero vector.
[0098] w(0) = [w0(0), w1(0), ..., w N-1 (0)] T ,
[0099] Where N is the filter order, w(0) is the initial weight value of the 0th order filter, and w1(0) is the initial weight value of the 1st order filter. N-1 (0) represents the initial weight values of the (N-1)th order filter;
[0100] At each time point k, construct the input signal vector X. k :
[0101] X k =[x(k),x(k-1)...x(k-N+1)],
[0102] X k Let x(k) represent the input signal vector at the current time point k, including the signals of the current and the previous N-1 sampling points. Let x(k) represent the signal at the current time point k, and x(k-N+1) represent the signals at the previous N-1 time points.
[0103] Filter output y(k):
[0104]
[0105] The output signal of the y(k) filter is the inner product of the current weight vector and the input signal vector. The output signal y(k) represents the initially extracted principal harmonic components.
[0106] w T (k) represents the transpose of the weight vector at the current time point k; w i (k) represents the i-th weight at the current time point k;
[0107] Calculate the error e(k):
[0108] e(k) = D(k) - y(k),
[0109] Where D(k) is the desired signal. For example, assuming the signal contains a fundamental frequency of 50Hz and a third harmonic of 150Hz, a desired signal can be constructed as follows:
[0110] D(k)=A1cos(2πf1kT)+A3cos(2πf3kT),
[0111] Where f1 = 50Hz, f3 = 150Hz, T is the sampling period, and A1 and A3 are the amplitudes of the fundamental frequency and harmonic, respectively. Similarly, other desired signals can be constructed to collect harmonic signals of different harmonic frequencies.
[0112] Update the filter weights w(k+1):
[0113] w(k+1)=w(k)+2ue(k)x k ,
[0114] w(k+1) represents the weight vector at time k+1, which is updated using the current weight, error, and step size factor.
[0115] Through the above steps, the output y(k) of the adaptive filter extracts the principal harmonic components of the signal.
[0116] In the above steps, the adaptive filter dynamically adjusts the weights so that the output signal y(k) can accurately track specific frequency components (i.e., harmonic components) in the input signal. As the weights are continuously updated, the filter gradually adapts to the harmonic frequencies in the input signal, ensuring that the output signal primarily contains these harmonic components.
[0117] The goal of an adaptive filter is to minimize the error between the output signal and the desired signal. When the input signal contains significant harmonic components, the filter adjusts the weights so that the output signal primarily contains these harmonic components, thereby minimizing the error.
[0118] Because adaptive filters can identify and track specific frequency components (such as harmonics) in the input signal, the output signal will primarily reflect these frequency components. The process of adjusting the filter weights is essentially optimizing the filter's response to harmonic components in the input signal.
[0119] 3. Perform fine filtering on the principal harmonic components.
[0120] Define the state vector z(k).
[0121] z(k) = [z1(k), z2(k), ..., z m (k)] T ,
[0122] z(k) represents the state vector at time k, containing all the system's state variables. These state variables describe the harmonic characteristics and dynamic behavior of the power signal within the system. The specific choice of state variables depends on the complexity of the model and the required harmonic components.
[0123] For example, for the fundamental frequency and the first two harmonics (fundamental frequency, third harmonic, and fifth harmonic), the state vector can be represented as:
[0124]
[0125] Among them, A i (k) is the amplitude of the i-th harmonic, θ i z(k) is the phase angle of the i-th harmonic, and z(k) represents the i-th state variable at time k.
[0126] The measurement vector y(k) is the output y(k) of the adaptive filter;
[0127] y(k)=Hz(k)+v(k),
[0128] Where H represents the measurement matrix, which maps the state vector to the measurement space, and v(k) represents the measurement noise at time k, which is set to Gaussian white noise in this implementation;
[0129] The state transition equation is:
[0130] z(k+1)=Az(k)+w(k),
[0131] A represents the state transition matrix, which describes how the system state transitions from time k to time k+1. w(k) represents the process noise at time k, which is set to Gaussian white noise in this implementation.
[0132] The initial state estimate is z^(0|0). If there is no prior knowledge of the system state, the initial state estimate can be set as the zero vector. If there is some prior knowledge of the system state, the prior estimate can be used as the initial state, and historical data can also be used to estimate the initial state.
[0133] Initialize the covariance matrix as P(0|0). If there is no specific information about the uncertainty of the initial state, it can be initialized by multiplying the identity matrix by a large constant. If there is prior knowledge, a prior covariance matrix can be used. Alternatively, variance estimates from historical data can be used for initialization.
[0134] Predicted status:
[0135] z^(k|k-1)=Az^(k-1|k-1),
[0136] Where z^(k|k-1) represents the predicted state estimate based on the information at time k-1, and Az^(k-1|k-1) represents the state at time k-1. k-1 is the previous time slot, which has already occurred, so this is the actual state. For the sake of consistency between program implementation and mathematical expression, it is written as z^(k-1|k-1).
[0137] Predicting covariance:
[0138] P(k|k-1)=AP(k-1|k-1)A T +Q,
[0139] P(k|k-1) represents the prediction covariance matrix at time k based on information at time k-1;
[0140] P(k-1|k-1) represents the covariance matrix at time k-1. Similar to the state, this expression is for the convenience of consistency between program implementation and numerical representation.
[0141] Q represents the process noise covariance matrix, which describes the statistical characteristics of process noise;
[0142] Calculate the system gain:
[0143] K(k)=P(k-1|k-1)H T (HP(k|k-1)H T +R) -1 ,
[0144] K(k) represents the Kalman gain at time k, a tradeoff between prediction and measurement;
[0145] R represents the measurement noise covariance matrix, which describes the statistical characteristics of the measurement noise.
[0146] Update state estimation
[0147] z^(k|k)=z^(k|k-1)+K(k)(y(k)-Hz^(k|k-1)),
[0148] z^(k|k) represents the state estimate updated at time k, which is corrected by combining prediction and measurement information. Here, z^(k|k) is the more accurate harmonic component extracted after further refinement by the fine filter.
[0149] Update the covariance matrix:
[0150] P(k|k)=(IK(k)H)P(k|k-1),
[0151] P(k|k) represents the covariance matrix updated at time k, reflecting the change in uncertainty of the state estimate after the update.
[0152] A harmonic detection method combining adaptive and fine filters is proposed. The adaptive filter initially extracts the principal harmonic components, while the fine filter performs further processing to obtain a more accurate state estimate. This enables high-precision harmonic detection in new power grids. The adaptive filter features real-time performance and fast response, while the fine filter provides accurate state estimation and noise filtering capabilities. Combining the two effectively improves the accuracy and robustness of harmonic detection.
[0153] On the other hand, the present invention also provides a novel harmonic detection system for power grids, comprising:
[0154] The acquisition module is used to acquire voltage signals from the power system to obtain the raw signal, and then remove the DC component and high-frequency noise from the raw signal to obtain the preprocessed signal.
[0155] The initial processing module is used to perform adaptive filter processing on the preprocessed signal and extract the principal harmonic components;
[0156] The fine processing module is used to perform fine filter processing on the principal harmonic components and extract the harmonic components.
[0157] The principal harmonic components are subjected to fine filter processing to extract harmonic components, including:
[0158] S1 defines the state vector;
[0159] S2 measurement vector;
[0160] S3 maps the state vector to the measurement space;
[0161] S4 Initialization State Estimation;
[0162] S5 Initializes the covariance matrix;
[0163] S6 then predicts the state;
[0164] S7 predicts covariance;
[0165] S8 calculates system gain;
[0166] S9 updates state estimation;
[0167] S10 updates the covariance matrix.
[0168] Furthermore, the specific implementation methods of the aforementioned novel power grid harmonic detection system are all the same as those of the novel power grid harmonic detection method, and all further technical solutions in the novel power grid harmonic detection method are fully incorporated into the novel power grid harmonic detection system.
[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
[0170] For any module structures not specifically defined in this invention, the existing technical specifications shall prevail. The existing technical specifications mentioned in the foregoing background and specific embodiments sections are considered part of this invention and are used to understand the meaning of certain technical features or parameters. The scope of protection of this invention is determined by the actual contents of the claims.
Claims
1. A novel method for detecting harmonics in a power grid, characterized in that, The method includes the following steps: The voltage signal of the new power grid system is collected to obtain the raw signal. The raw signal is then preprocessed to obtain the preprocessed signal. The preprocessing includes removing DC component and high-frequency noise. The preprocessed signal is subjected to adaptive filter processing to extract the principal harmonic components; The principal harmonic components are processed by a fine filter to extract the harmonic components; The principal harmonic components are subjected to fine filter processing to extract harmonic components, including: S1 defines the state vector; S2 measurement vector; S3 maps the state vector to the measurement space; S4 Initialization State Estimation; S5 Initializes the covariance matrix; S6 then predicts the state; S7 predicts covariance; S8 calculates system gain; S9 updates state estimation; S10 updates the covariance matrix.
2. The novel harmonic detection method for power grids according to claim 1, characterized in that, The preprocessed signal is subjected to adaptive filter processing to extract the principal harmonic components, including: The filter weights are initialized to a zero vector: w(0)=[w0(0),w1(0),......,w N-1 (0)] T , Where N is the filter order, w(0) is the initial weight value of the 0th order filter, and w1(0) is the initial weight value of the 1st order filter. N-1 (0) represents the initial weight values of the (N-1)th order filter; At each time point k, construct the input signal vector X. k : X k =[x(k),x(k-1)...x(k-N+1)], X k Let x(k) represent the input signal vector at the current time point k, including the signals of the current and the previous N-1 sampling points. Let x(k) represent the signal at the current time point k, and x(k-N+1) represent the signals at the previous N-1 time points. Filter output y(k): The output signal of the y(k) filter is the inner product of the current weight vector and the input signal vector. The output signal y(k) represents the initially extracted principal harmonic components. w T (k) represents the transpose of the weight vector at the current time point k; w i (k) represents the i-th weight at the current time point k; Calculate the error e(k): e(k) = D(k) - y(k), Where D(k) is the desired signal; Update the filter weights w(k+1): w(k+1)=w(k)+2ue(k)x k , u is the step size factor; w(k+1) represents the weight vector at time k+1, which is updated using the current weight, error, and step size factor.
3. The novel harmonic detection method for power grids according to claim 2, characterized in that, The desired signal is obtained through the following method: Assuming the signal contains a fundamental frequency of 50Hz and a third harmonic of 150Hz, construct the desired signal: D(k)=A1 cos(2πf1kT)+A3cos(2πf3kT), Where f1 = 50Hz, f3 = 150Hz, T is the sampling period, and A1 and A3 are the amplitudes of the fundamental frequency and harmonics, respectively.
4. The novel harmonic detection method for power grids according to claim 1, characterized in that, The principal harmonic components are subjected to fine filter processing to extract harmonic components, including: The defined state vector is z(k): z(k)=[z1(k),z2(k),...,z m (k)] T , z(k) represents the state vector at time k; z(k) represents the i-th state vector at time k; The measurement vector is y(k), which is the output y(k) of the adaptive filter; y(k) = Hz(k) + v(k), Where H represents the measurement matrix, which maps the state vector to the measurement space, and v(k) represents the measurement noise at time k; The state transition equation is: z(k+1)=Az(k)+w(k), Where A represents the state transition matrix, which describes how the system state transitions from time k to time k+1, and w(k) represents the process noise at time k; The initialization state is estimated to be z. ^ (0|0); The initial covariance matrix is P(0|0); The predicted state: z ^ (k|k-1)=Az ^ (k-1|k-1), Where z^(k|k-1) represents the predicted state estimate at time k based on information at time k-1, and Az^(k-1|k-1) represents the state at time k-1; The predicted covariance is: P(k|k-1)=AP(k-1|k-1)A T +Q, Where P(k|k-1) represents the prediction covariance matrix based on the information at time k-1, P(k-1|k-1) represents the covariance matrix at time k-1, and Q represents the process noise covariance matrix, which describes the statistical characteristics of the process noise. The gain of the computing system: K(k)=P(k-1|k-1)H T (HP(k|k-1)H T +R) -1 , Where z^(k|k) represents the state estimate after the update at time k, which is the more accurate harmonic component extracted after further fine processing by the fine filter; The updated covariance matrix is: P(k|k)=(IK(k)H)P(k|k-1), Where P(k|k) represents the covariance matrix updated at time k, reflecting the change in uncertainty of the state estimate after the update.
5. A novel harmonic detection method for a power grid according to claim 4, characterized in that, The state vector is obtained in the following way: For the fundamental wave and the first two harmonics, the state vector is represented as: Among them, A i (k) is the amplitude of the i-th harmonic, θ i z(k) is the phase angle of the i-th harmonic, and z(k) represents the i-th state variable at time k.
6. The novel harmonic detection method for power grids according to claim 4, characterized in that: If there is no prior knowledge of the system state, the initial state estimate is set to the zero vector.
7. A novel harmonic detection method for power grids according to claim 4, characterized in that: If there is prior knowledge about the system state, use the prior estimate as the initial state.
8. A novel harmonic detection method for power grids according to claim 4, characterized in that: If there is no specific information about the uncertainty of the initial state, the covariance matrix is initialized by multiplying the identity matrix by a constant.
9. A novel harmonic detection method for power grids according to claim 4, characterized in that: If there is prior knowledge, then use the prior covariance matrix.
10. A novel harmonic detection system for power grids, characterized in that... The system includes the following modules: a data acquisition module, used to acquire voltage signals from the new power grid system to obtain the raw signal, and remove DC components and high-frequency noise from the raw signal to obtain a preprocessed signal; The initial processing module is used to perform adaptive filter processing on the preprocessed signal and extract the principal harmonic components; The fine processing module is used to perform fine filter processing on the principal harmonic components and extract the harmonic components. The principal harmonic components are subjected to fine filter processing to extract harmonic components, including: S1 defines the state vector; S2 measurement vector; S3 maps the state vector to the measurement space; S4 Initialization State Estimation; S5 Initializes the covariance matrix; S6 then predicts the state; S7 predicts covariance; S8 calculates system gain; S9 updates state estimation; S10 updates the covariance matrix.