Harmonic detection method and detection device based on active filter

By combining multiple sliding mean filters with Kalman filters in series and a sliding mode predictive controller, the contradiction between dynamic response and steady-state accuracy of active filters is resolved, improving the accuracy and stability of harmonic detection, and enhancing power grid quality and equipment lifespan.

CN122171878APending Publication Date: 2026-06-09JIANGSU UNIV OF TECH +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU UNIV OF TECH
Filing Date
2026-02-05
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing active power filter harmonic detection methods suffer from slow dynamic response, low accuracy, poor dynamic performance and robustness of PI control under nonlinear and disturbance conditions, which affect power grid quality and equipment lifespan.

Method used

A sliding mean filter and a Kalman filter are connected in series and combined with a sliding mode predictive controller. The sliding mean filter removes high-frequency components, the Kalman filter extracts DC components, and the sliding mode predictive controller optimizes the sliding mode parameters to generate an adjustment current to extract harmonic current.

Benefits of technology

It significantly improves the harmonic component extraction process, enhances the compensation performance and operational stability of active filters, provides reliable current tracking control commands, and improves power quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122171878A_ABST
    Figure CN122171878A_ABST
Patent Text Reader

Abstract

This invention provides a harmonic detection method and device based on an active power filter. The method includes: using a multiple sliding average filter to remove high-frequency components of active and reactive currents to obtain a low-frequency signal; predicting and updating the low-frequency signal using a Kalman filter to extract the DC component; designing a sliding mode predictive controller based on the predicted value of the DC-side voltage error of the active power filter; and dynamically optimizing the sliding mode parameters of the sliding mode predictive controller. , The optimized sliding mode parameters are used to generate the regulating current. This regulating current is superimposed on the DC component, and the fundamental current is separated and the harmonic current is obtained through coordinate transformation. This invention resolves the contradiction between dynamic response and steady-state accuracy in low-pass filters by connecting a sliding mean filter and a Kalman filter in series. By using sliding mode predictive control of the DC-side voltage, it overcomes the problems of poor dynamic performance and robustness under nonlinear and disturbance conditions, thereby comprehensively improving the compensation performance and operational stability of active filters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of harmonic detection technology, specifically to a harmonic detection method and a harmonic detection device based on an active filter. Background Technology

[0002] Harmonics are a persistent problem in power grids due to the nature of power electronic devices. Harmonics not only degrade power quality but also affect equipment lifespan and can even cause permanent damage. An Active Power Filter (APF) consists of a harmonic current detection circuit and a compensation current generation circuit. It has good adaptability to grid impedance and harmonic frequencies and can compensate for harmonics and reactive power. Harmonic detection, as one of the key technologies of active power filters, can accurately and quickly detect the fundamental current and harmonic currents in the load current.

[0003] Currently, harmonic detection methods for active power filters are divided into time-domain methods and frequency-domain methods. A representative example of the time-domain method is based on instantaneous reactive power. i p - i q Law, etc. i p - i q Harmonic detection methods are limited by the phase lag and slow dynamic response of low-pass filters, making it difficult to achieve fast and accurate extraction of harmonic components, thus restricting the overall performance of active filters. Harmonic compensation in active filters generally uses PI (Proportional-Integral) control, which has poor dynamic performance and robustness under nonlinear and disturbance conditions, and poor compensation performance and stability of DC-side voltage under complex conditions such as sudden load changes. Summary of the Invention

[0004] To solve the above-mentioned technical problems, the present invention provides a harmonic detection method based on an active filter.

[0005] The present invention also proposes a harmonic detection device based on an active filter.

[0006] The technical solution adopted in this invention is as follows: A first aspect of the present invention provides a harmonic detection method based on an active power filter, comprising the following steps: acquiring instantaneous values ​​of three-phase circuit voltage and three-phase load current in a power system; obtaining a synchronous rotation signal based on the three-phase circuit voltage; performing Clark transformation on the three-phase load current and performing coordinate rotation based on the synchronous rotation signal to obtain the active current. i p and reactive current i qThe active current is removed using a multiple moving average filter. i p and reactive current i q The high-frequency components are used to obtain the low-frequency signal. i pm 、i qm The low-frequency signal i pm 、i qm The input signal to the Kalman filter is used to predict and update the low-frequency signal to extract the DC component. A sliding mode predictive controller is designed based on the predicted value of the DC-side voltage error of the active filter, and the sliding mode parameters of the sliding mode predictive controller are dynamically optimized. , The regulated current is generated using optimized sliding mode parameters. Δ i p ; to adjust the current Δ i p The corrected DC component is obtained by superimposing it onto the DC component; the fundamental current is separated and the harmonic current is obtained by coordinate transformation of the corrected DC component.

[0007] The harmonic detection method based on active filters described above in this invention also includes the following additional technical features: According to one embodiment of the present invention, the multiple moving average filter is obtained using the following formula: ; in, The current command pre-allocated during the To period after the Kth filtering; T o To control the step size; K is the number of filtering iterations. N K Let K be the window size for the Kth filtering iteration. For the ( K -1) After filtering T o Pre-allocated current command for a specific time period, window size N K A window sequence with progressively decreasing values ​​is used.

[0008] According to one embodiment of the present invention, a low-frequency signal is predicted and updated using a Kalman filter to extract a DC component, specifically including: predicting the state at time k based on the state at time (k-1) of the Kalman filter, and calculating the covariance matrix of the state prediction error at time (k-1); estimating the covariance matrix of the prediction error at time k based on the covariance matrix of the prediction error at time (k-1); calculating the Kalman gain based on the covariance matrix of the prediction error at time k; updating the state at time k based on the Kalman gain, and updating the covariance matrix of the state prediction error at time k; and directly extracting the DC component from the final state prediction.

[0009] According to one embodiment of the present invention, a sliding mode predictive controller is designed, and the sliding mode parameters of the sliding mode predictive controller are dynamically optimized based on the predicted value of the DC-side voltage error of the active filter. , The adjusted current Δ is generated using optimized sliding mode parameters. i p Specifically, this includes: designing a sliding mode surface function s based on the DC-side voltage error of the active filter; selecting a power-law approach as the sliding mode approach law; and constructing an objective function to evaluate control performance based on the DC-side voltage error predicted by the active filter and the sliding mode surface function s. J Based on the predicted DC-side voltage from the active filter, the sliding mode parameters of the power-law approach are dynamically adjusted. When the objective function J reaches its optimal value, the optimal sliding mode parameters are obtained. The regulating current is then determined based on these optimal sliding mode parameters. Δ i p .

[0010] According to one embodiment of the present invention, the regulating current is specifically obtained according to the following formula. Δ i p : ; in, For the DC-side voltage error of the active filter, e d Let be the amplitude of the voltage synchronization component in the three-phase circuit, c be the convergence parameter, k be the first sliding mode parameter, ε be the second sliding mode parameter, and s be the sliding mode surface function. i p,dc This refers to the DC component of the instantaneous active current. i L This represents the equivalent component of the three-phase load current. This is the difference between the actual voltage error at the current moment and the predicted value from the previous cycle.

[0011] A second aspect of the present invention provides a harmonic detection device based on an active filter, comprising: an acquisition module for acquiring instantaneous values ​​of three-phase circuit voltage and three-phase load current in a power system, and acquiring a synchronous rotation signal based on the three-phase circuit voltage; and a conversion module for performing Clark transformation on the load three-phase current and performing coordinate rotation based on the synchronous rotation signal to obtain the active current. i p and reactive current i q The filtering module is used to remove the active current using a multiple moving average filter. i p and reactive current i q The high-frequency components are used to obtain the low-frequency signal. i pm 、i qm Extraction module, the extraction module is used to extract the low frequency signal i pm 、i qm The input signal to the Kalman filter is used to predict and update the low-frequency signal to extract the DC component; the optimization module is used to design a sliding mode predictive controller based on the predicted value of the DC-side voltage error of the active filter, and dynamically optimize the sliding mode parameters of the sliding mode predictive controller. , The regulated current is generated using optimized sliding mode parameters. Δ i p Correction module, the correction module is used to adjust the current. Δ i p The corrected DC component is obtained by superimposing it onto the DC component; the separation module is used to separate the fundamental current and obtain the harmonic current from the corrected DC component through coordinate transformation.

[0012] The harmonic detection device based on an active filter described above in this invention also has the following additional technical features: According to one embodiment of the present invention, the multiple moving average filter is obtained using the following formula: ; in, The current command pre-allocated for the To time period after the Kth filtering; T o To control the step size; K is the number of filtering iterations. N K Let K be the window size for the Kth filtering iteration. For the ( K-1) After filtering T o Pre-allocated current command for a specific time period, window size N K A window sequence with progressively decreasing values ​​is used.

[0013] According to one embodiment of the present invention, the extraction module is specifically configured to: predict the state at time k based on the state at time (k-1) of the Kalman filter, and calculate the covariance matrix of the state prediction error at time (k-1); estimate the covariance matrix of the prediction error at time k based on the covariance matrix of the prediction error at time (k-1); calculate the Kalman gain based on the covariance matrix of the prediction error at time k; update the state at time k based on the Kalman gain, and update the covariance matrix of the state prediction error at time k; and directly extract the DC component from the final state prediction.

[0014] According to one embodiment of the present invention, the optimization module is specifically used for: designing a sliding mode surface function s based on the DC-side voltage error of the active filter; selecting a power-law as the sliding mode approach law; and constructing an objective function to evaluate the control performance based on the DC-side voltage error predicted by the active filter and the sliding mode surface function s. J Based on the predicted DC-side voltage from the active filter, the sliding mode parameters of the power-law approach are dynamically adjusted. When the objective function J reaches its optimal value, the optimal sliding mode parameters are obtained. The regulating current is then determined based on these optimal sliding mode parameters. Δ i p .

[0015] According to one embodiment of the present invention, the optimization module specifically obtains the regulating current according to the following formula. Δ i p : ; in, For the DC-side voltage error of the active filter, e d Let be the amplitude of the voltage synchronization component in the three-phase circuit, c be the convergence parameter, k be the first sliding mode parameter, ε be the second sliding mode parameter, and s be the sliding mode surface function. i p,dc This refers to the DC component of the instantaneous active current. i L This represents the equivalent component of the three-phase load current. This is the difference between the actual voltage error at the current moment and the predicted value from the previous cycle.

[0016] The beneficial effects of this invention are: This invention resolves the contradiction between dynamic response and steady-state accuracy in traditional low-pass filters by connecting a sliding average filter and a Kalman filter in series. On the other hand, by using sliding mode predictive control of the DC-side voltage and a real-time processing mechanism, it significantly improves the extraction process of harmonic components, overcoming the problems of poor dynamic performance and robustness of traditional PI control under nonlinear and disturbance conditions. This comprehensively improves the compensation performance and operational stability of the active filter, providing a reliable command current for subsequent current tracking control, and demonstrating unique superior performance in engineering practice. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the hardware structure of an active filter according to an embodiment of the present invention; Figure 2 This is a flowchart of a harmonic detection method based on an active filter according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the principle of a harmonic detection method based on an active filter according to an embodiment of the present invention. Figure 4 This is a block diagram of a harmonic detection device based on an active filter according to an embodiment of the present invention. Detailed Implementation

[0018] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0019] The harmonic detection method of this invention is based on a three-phase parallel active filter, and its hardware structure diagram is shown below. Figure 1 As shown, its system hardware consists of: a load current detection circuit, a command current calculation circuit, a drive circuit, and a main circuit. (See figure.) e a , e b , e c This is the three-phase power supply voltage.

[0020] A current sensor is connected to the input terminal of the nonlinear load to measure the three-phase load current. The input terminal of the load current detection circuit is connected to the current sensor, and the output terminal is connected to the command current calculation circuit to extract the harmonic components of the nonlinear load in real time and accurately. The input terminal of the command current calculation circuit is connected to the load current detection circuit and the grid voltage synchronization signal, and the output terminal is connected to the drive circuit to generate a low-power command signal. The input terminal of the drive circuit is connected to the command current calculation circuit, and the output terminal is connected to the control terminal of the main circuit to convert the low-power command signal into a high-power drive signal to drive the power devices in the main circuit. The main circuit consists of multiple inverter units. The input terminal is connected to the grid through a circuit breaker to obtain energy from the grid. Its output terminal is connected between the grid and the load after parallel connection of inductor C1 to generate and inject compensation current according to the command of the drive signal to cancel harmonics and improve power quality.

[0021] Figure 2 This is a flowchart of a harmonic detection method based on an active filter according to an embodiment of the present invention. Figure 3 This is a schematic diagram illustrating the principle of a harmonic detection method based on an active filter according to an embodiment of the present invention.

[0022] like Figure 2 As shown, the harmonic detection method based on an active filter according to an embodiment of the present invention includes the following steps: S1 collects the instantaneous values ​​of the three-phase circuit voltage and the three-phase load current in the power system, and obtains the synchronous rotation signal based on the three-phase circuit voltage.

[0023] Specifically, in a power system, the instantaneous values ​​of the three-phase circuit voltage are ea, eb, ec, and the instantaneous values ​​of the current are ia, ib, ic. The grid voltage is phase-locked to the instantaneous signals of the three-phase circuit voltage through a PLL (Phase-Locked Loop). Then, a sine and cosine generator is used to generate a synchronous rotation signal of sine and cosine with the same frequency and phase as the three-phase circuit voltage for subsequent coordinate transformation.

[0024] S2, perform Clark transformation on the three-phase load current and rotate the coordinates according to the synchronous rotation signal to obtain the active current. i p and reactive current i q ;

[0025] Three-phase load current i a , i b , i c The α and β axis currents are obtained after Clark transformation. i α ,i β The active current is then obtained through the Park transformation. i p and reactive current i q .

[0026] S3, using a multiple sliding average filter to remove active current. i p and reactive current i q The high-frequency components are used to obtain the low-frequency signal. i pm 、i qm .

[0027] Specifically, the Moving Average Filter (MAF) is essentially a low-pass filter. Due to its simple principle and ease of implementation, it is widely used in signal processing. This invention draws on the concept of "multi-level decomposition" in mode decomposition, employing multiple moving average filters (MMAF) for multiple filtering to process the current command. i p , i q As an input signal, the corresponding low-frequency and high-frequency components can be obtained by passing through multiple sliding mean filters. The low-frequency components obtained after each filtering are processed to remove the high-frequency components mixed in with the low-frequency components to the greatest extent.

[0028] Let the first K The window size of the second moving average filter is N K ,and N K ∈ N + Assuming in each T o ∈[ t , t +△ t Current command during the time period It means that △ t =60s, t is time, then by recursion and induction we can obtain the result after the first filtering. T o The pre-allocated current command within the interval is: ; in, N 1 represents the window size for the first filtering step; T o To control the step size; for T oCurrent command at any given moment; After the first filtering T o Current command pre-allocated for a specific time period.

[0029] After the first filtering, most of the high-frequency signals in the current command are separated. At this point, some high-frequency components still remain in the filtered low-frequency components. Therefore, a second filtering is performed on the low-frequency signal obtained after the first filtering, resulting in: ; in, After the second filtering T o Pre-allocated current command for a specific time period N 2 represents the window size for the second filtering step.

[0030] And so on up to the 1st K For the second filtering step, the moving average filter is obtained using the following formula: ; in, The current command pre-allocated during the To period after the Kth filtering; T o To control the step size; K is the number of filtering iterations. N K Let K be the window size for the Kth filtering iteration. For the ( K -1) After filtering T o Current command pre-allocated for a specific time period.

[0031] In an embodiment of the present invention, the window size N K A window sequence with progressively decreasing values ​​is used.

[0032] To achieve "multi-level decomposition" and balance accuracy and speed, the window size of this invention... N K A successively decreasing window sequence is used, i.e., the window size of the next filter is... N K Smaller than the previous window size N K-1 The initial filtering window is relatively large, aiming to coarsely screen and remove the most prominent high-frequency components; subsequent filtering windows gradually decrease to perform fine filtering, gradually eliminating other high-frequency components remaining in the low-frequency components.

[0033] After the first K The low-frequency components obtained after the second moving average filtering effectively separated all the high-frequency components. KMore is not necessarily better; a balance needs to be struck between filtering effectiveness and computational burden. Ideally, the number of filters should meet the system's accuracy and response speed requirements. Therefore, the number of filters is typically... K After filtering two to three times with different window sizes, most of the high-frequency components in the signal have been effectively separated, and the low-frequency signal at this point is... i pm 、i qm This signal serves as the input for subsequent Kalman filtering.

[0034] S4 will transmit low-frequency signals i pm 、i qm The input signal to the Kalman filter is used to predict and update the low-frequency signal to extract the DC component.

[0035] In a specific embodiment of the present invention, the low-frequency signal is predicted and updated using a Kalman filter to extract the DC component, specifically including the following steps S41-S45: S41, predict the state at time k based on the state at time (k-1) of the Kalman filter, and calculate the covariance matrix of the state prediction error at time (k-1).

[0036] The Kalman filtering process is mainly divided into a prediction part and an update part. It uses a set prediction equation and the obtained input to predict the next time step. , For observing signals, harmonics x n Let be the state vector, and the state equation be: in, A The state matrix, For state vectors, w ( k ) is the noise vector.

[0037] When the harmonic order is n, the measurement equation is:

[0038] in, H n =[1 0]; w ( k ) is the noise vector.

[0039] S42, Estimate the covariance matrix of the prediction error at time k based on the covariance matrix of the prediction error at time (k-1); The Kalman prediction process includes: 1. Set initial values: ; x (1|1) represents the initial state variable prediction, H is the observation matrix, and P(1|1) is the covariance matrix of the initial prediction error.

[0040] 2. State variable prediction:

[0041] in: This represents the predicted state at time k. This represents the state at time (k-1).

[0042] Prediction error covariance: ; in, Let be the covariance matrix of the prediction error at time k. Let be the covariance matrix of the state prediction error at time (k-1), and Q be Gaussian white noise.

[0043] S43, calculate the Kalman gain based on the covariance matrix of the prediction error at time k.

[0044] Kalman gain G ( k The following formula can be used to obtain it: ; Where H is the observation matrix.

[0045] S44 updates the state at time k based on the Kalman gain and updates the covariance matrix of the state prediction error at time k.

[0046] Specifically, the state at time k is updated according to the following formula. x ( k | k ), and update the covariance matrix P(of the state prediction error at time k). k | k ): ; ; This is the observation vector.

[0047] S45 directly extracts the DC component from the final state prediction.

[0048] Specifically, based on the theory of instantaneous reactive power i p - i qIn harmonic detection, the DC component corresponding to the fundamental current is needed for inverse transformation. After multiple passes through a moving average filter and a Kalman filter, an optimal estimated state vector is obtained. The DC component is then directly extracted from the final state estimate. and : and .

[0049] S5. Based on the predicted value of the DC-side voltage error of the active filter, a sliding mode predictive controller is designed, and the sliding mode parameters of the sliding mode predictive controller are dynamically optimized. , The regulated current is generated using optimized sliding mode parameters. Δ i p .

[0050] For the DC side voltage U of the active filter dc ( Figure 1 To control the voltage across C1, this invention employs a sliding mode predictive control method that combines sliding mode control with predictive control.

[0051] The idea behind sliding mode control is to modify the control law based on the deviation of the system's current state and its derivatives, enabling the system to quickly reach the sliding surface from its initial state and then perform sliding mode motion on the sliding surface according to the expected trajectory. This invention defines the DC-side voltage error. U dc This is the actual value of the DC-side voltage. To eliminate steady-state error, a sliding surface incorporating error integrals is designed to meet the target DC-side voltage value.

[0052] In one specific embodiment of the present invention, a sliding mode predictive controller is designed, and the sliding mode parameters of the sliding mode predictive controller are dynamically optimized based on the predicted value of the DC-side voltage error of the active filter. , The regulated current is generated using optimized sliding mode parameters. Δ i p Specifically, it includes the following steps S51-S55: S51, Design of sliding mode surface function s based on DC side voltage error of active filter.

[0053] In one embodiment of the present invention, the sliding surface can be s Designed as follows: ; Where c is the convergence parameter.

[0054] For sliding surfaces s Differentiation yields: .

[0055] S52, the power-law approaching law is selected as the sliding mode approaching law.

[0056] The reaching law is a direct specification of the dynamics of the sliding surface function s itself. It defines the derivative of s. This controls how s approaches zero. To ensure that the DC-side voltage can move from any initial state to the sliding mode surface with good motion performance and error range, a suitable reaching law needs to be selected. This invention selects a power-law reaching law as the sliding mode reaching law, that is:

[0057] k is the first sliding mode parameter, and ε is the second sliding mode parameter.

[0058] The aforementioned convergence law can converge rapidly when the state is far from the sliding surface and slow down when it approaches the sliding surface, effectively suppressing chattering.

[0059] S53, using the DC-side voltage error Δ predicted by the active filter. U dc ( k Based on +1) and the sliding surface function s, an objective function for evaluating control performance is constructed. J .

[0060] Specifically, when the DC side voltage is in steady state: That is, △ U dc ( k +1) is basically equal to the voltage error value of the previous cycle.

[0061] When the DC-side voltage is transient (such as a sudden load change), the Lagrange interpolation method is used to predict Δ. U dc ( k The value of +1), taking second-order prediction as an example, can be obtained as follows: , where △ U dc ( k ), △ U dc ( k- 1) respectively the first k and k The error value of the DC side voltage at time -1.

[0062] With the predicted voltage error Δ U dc ( k +1) and sliding surface function s Based on this, construct an objective function to evaluate control performance. J : ; in,s ( k +1) is based on the prediction error Δ U dc ( k +1) The sliding surface value calculated for the next moment; , , These are the first weighting coefficient, the second weighting coefficient, and the third weighting coefficient, which are used to balance the convergence speed of the sliding surface, the accuracy of voltage control, and the magnitude of parameter transformation, respectively. The first sliding mode parameter k The nominal value, introduced This is to prevent excessive jumps during parameter optimization and ensure smooth control.

[0063] S54 dynamically adjusts the sliding mode parameters of the power-law approaching law based on the predicted value of the DC-side voltage from the active filter. When the objective function J reaches its optimal value, the optimal sliding mode parameters are obtained.

[0064] S55, obtains the adjustment current based on the optimal sliding mode parameters. Δ i p .

[0065] To overcome external disturbances and other factors, a closed-loop correction mechanism is introduced. Definition The error is the difference between the actual value of the voltage error of the active filter at the current moment and the predicted value of the previous cycle. Then, an error correction amount is generated through feedback adjustment and added to the prediction link to correct the predicted value of the next cycle in real time, thus forming a complete prediction-correction closed loop, which significantly improves the accuracy and robustness of the control.

[0066] In one specific embodiment of the present invention, the regulating current is obtained according to the following formula. Δ i p : ; in, For the DC-side voltage error of the active filter, e d Let be the amplitude of the voltage synchronization component in the three-phase circuit, c be the convergence parameter, k be the first sliding mode parameter, ε be the second sliding mode parameter, and s be the sliding mode surface function. i p,dc This refers to the DC component of the instantaneous active current. i L This represents the equivalent component of the three-phase load current. This is the difference between the actual voltage error at the current moment and the predicted value from the previous cycle.

[0067] Use optimized parameters k , By generating the sliding mode control law and substituting it into the above formula, the corresponding regulating current can be output. Δ i p .

[0068] S6 will adjust the current. Δ i p The corrected DC component is obtained by superimposing it onto the DC component.

[0069] Specifically, the regulating current obtained above Δ i p Overlay In this process, the corrected active DC component is obtained.

[0070] S7 separates the fundamental current and obtains the harmonic current by transforming the corrected DC component using coordinate transformation.

[0071] Specifically, the final obtained DC component and The fundamental component of the nonlinear load current is obtained through the inverse Park transform and the inverse Park transform. i af , i bf , i cf .

[0072] Fundamental current i ah , i bh , i ch It can be represented as: ; Subtract the fundamental component from the three-phase current. i af , i bf , i cf Then the final harmonic components can be obtained. i ah , i bh , i ch ,Right now: .

[0073] In summary, the active filter-based harmonic detection method according to embodiments of the present invention resolves the contradiction between dynamic response and steady-state accuracy of traditional low-pass filters by connecting a sliding average filter and a Kalman filter in series. On the other hand, by controlling the DC-side voltage through sliding mode prediction, the extraction process of harmonic components is significantly improved through a real-time processing mechanism. This overcomes the problems of poor dynamic performance and robustness of traditional PI control under nonlinear and disturbance conditions, thereby comprehensively improving the compensation performance and operational stability of the active filter and providing a reliable command current for subsequent current tracking control. It has demonstrated unique superior performance in engineering practice.

[0074] Corresponding to the aforementioned harmonic detection method based on active filters, this invention also proposes a harmonic detection device based on active filters. Since the device embodiments of this invention correspond to the method embodiments described above, details not disclosed in the device embodiments can be found in the method embodiments described above, and will not be repeated here.

[0075] Figure 4 This is a block diagram of a harmonic detection device based on an active filter according to an embodiment of the present invention, as shown below. Figure 4 As shown, the harmonic detection device includes: an acquisition module 100, a conversion module 200, a filtering module 300, an extraction module 400, an optimization module 500, a correction module 600, and a separation module 700.

[0076] The acquisition module 100 is used to collect the instantaneous values ​​of the three-phase circuit voltage and the three-phase load current in the power system, and to obtain the synchronous rotation signal based on the three-phase circuit voltage; the conversion module 200 is used to perform Clark transformation on the load three-phase current and to perform coordinate rotation based on the synchronous rotation signal to obtain the active current. i p and reactive current i q The filter module 300 is used to remove active current using a multiple moving average filter. i p and reactive current i q The high-frequency components are used to obtain the low-frequency signal. i pm 、i qm The extraction module 400 is used to extract low-frequency signals. i pm 、i qm The input signal to the Kalman filter is used to predict and update the low-frequency signal to extract the DC component; the optimization module 500 is used to design a sliding mode predictive controller based on the predicted value of the DC side voltage error of the active filter, and dynamically optimize the sliding mode parameters of the sliding mode predictive controller., The regulated current is generated using optimized sliding mode parameters. Δ i p The correction module 600 is used to adjust the current. Δ i p The corrected DC component is obtained by superimposing it onto the DC component; the separation module 700 is used to separate the fundamental current and obtain the harmonic current from the corrected DC component through coordinate transformation.

[0077] According to one embodiment of the present invention, a multiple moving average filter is obtained using the following formula: ; in, The current command pre-allocated during the To period after the Kth filtering; T o To control the step size; K is the number of filtering iterations. N K Let K be the window size for the Kth filtering iteration. For the ( K -1) After filtering T o Pre-allocated current command for a specific time period, window size N K A window sequence with progressively decreasing values ​​is used.

[0078] According to one embodiment of the present invention, the extraction module 400 is specifically configured to: predict the state at time k based on the state at time (k-1) of the Kalman filter, and calculate the covariance matrix of the state prediction error at time (k-1); estimate the covariance matrix of the prediction error at time k based on the covariance matrix of the prediction error at time (k-1); calculate the Kalman gain based on the covariance matrix of the prediction error at time k; update the state at time k based on the Kalman gain, and update the covariance matrix of the state prediction error at time k; and directly extract the DC component from the final state prediction.

[0079] According to one embodiment of the present invention, the optimization module 500 is specifically used for: designing the sliding mode surface function s based on the DC-side voltage error of the active filter; selecting a power-law as the sliding mode approach law; and constructing an objective function for evaluating control performance based on the DC-side voltage error predicted by the active filter and the sliding mode surface function s. J Based on the predicted DC-side voltage from the active power filter, the sliding mode parameters of the power-law approach are dynamically adjusted. When the objective function J reaches its optimal value, the optimal sliding mode parameters are obtained. The regulating current is then determined based on these optimal sliding mode parameters. Δ i p .

[0080] According to one embodiment of the present invention, the optimization module 500 specifically obtains the regulating current according to the following formula. Δ i p : ; in, For the DC-side voltage error of the active filter, e d Let be the amplitude of the voltage synchronization component in the three-phase circuit, c be the convergence parameter, k be the first sliding mode parameter, ε be the second sliding mode parameter, and s be the sliding mode surface function. i p,dc This refers to the DC component of the instantaneous active current. i L This represents the equivalent component of the three-phase load current. This is the difference between the actual voltage error at the current moment and the predicted value from the previous cycle.

[0081] The active filter-based harmonic detection device according to embodiments of the present invention resolves the contradiction between dynamic response and steady-state accuracy of traditional low-pass filters by connecting a sliding average filter and a Kalman filter in series. On the other hand, by controlling the DC-side voltage through sliding mode prediction, the extraction process of harmonic components is significantly improved through a real-time processing mechanism. This overcomes the problems of poor dynamic performance and robustness of traditional PI control under nonlinear and disturbance conditions, thereby comprehensively improving the compensation performance and operational stability of the active filter and providing a reliable command current for subsequent current tracking control. It has demonstrated unique superior performance in engineering practice.

[0082] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. "A plurality of" means two or more, unless otherwise explicitly specified.

[0083] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions 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 suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0084] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.

[0085] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0086] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0087] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0088] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0089] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A harmonic detection method based on an active filter, characterized in that, Includes the following steps: The instantaneous values ​​of three-phase circuit voltage and three-phase load current in the power system are collected, and the synchronous rotation signal is obtained based on the three-phase circuit voltage. The three-phase load current is subjected to Clark transformation, and the coordinates are rotated according to the synchronous rotation signal to obtain the active current. i p and reactive current i q ; The active current is removed using a multiple moving average filter. i p and reactive current i q The high-frequency components are used to obtain the low-frequency signal. i pm 、i qm ; The low-frequency signal i pm 、i qm The input signal to the Kalman filter is used to predict and update the low-frequency signal to extract the DC component. A sliding mode predictive controller is designed based on the predicted value of the DC-side voltage error of an active filter, and the sliding mode parameters of the sliding mode predictive controller are dynamically optimized. , The regulated current is generated using optimized sliding mode parameters. Δ i p ; The regulating current Δ i p The corrected DC component is obtained by superimposing it onto the DC component. The corrected DC component is used to separate the fundamental current and obtain the harmonic current through coordinate transformation.

2. The harmonic detection method based on an active filter according to claim 1, characterized in that, The multiple moving average filter is obtained using the following formula: ; in, The current command pre-allocated for the To time period after the Kth filtering; T o To control the step size; K is the number of filtering iterations. N K Let K be the window size for the Kth filtering iteration. For the ( K -1) After filtering T o Pre-allocated current command for a specific time period, window size N K A window sequence with progressively decreasing values ​​is used.

3. The harmonic detection method based on an active filter according to claim 1, characterized in that, The low-frequency signal is predicted and updated using a Kalman filter to extract the DC component, specifically including: Predict the state at time k based on the state at time (k-1) of the Kalman filter, and calculate the covariance matrix of the state prediction error at time (k-1). Estimate the covariance matrix of the prediction error at time k based on the covariance matrix of the prediction error at time (k-1); The Kalman gain is calculated based on the covariance matrix of the prediction error at time k. Update the state at time k based on the Kalman gain, and update the covariance matrix of the state prediction error at time k. The DC component is directly extracted from the final state prediction.

4. The harmonic detection method based on an active filter according to claim 1, characterized in that, Design a sliding mode predictive controller and dynamically optimize its sliding mode parameters based on the predicted value of the DC-side voltage error of the active filter. , The regulated current is generated using optimized sliding mode parameters. Δ i p Specifically, it includes: Design of sliding mode surface function s based on DC-side voltage error of active filter; A power-law approach law is chosen as the approach law for the sliding mode. Based on the DC-side voltage error predicted by the active filter and the sliding mode surface function s, an objective function for evaluating control performance is constructed. J : Based on the predicted DC-side voltage value predicted by the active filter, the sliding mode parameters of the power-law approach are dynamically adjusted. When the objective function J reaches the optimal value, the optimal sliding mode parameters are obtained. The adjustment current is obtained based on the optimal sliding mode parameters. Δ i p .

5. The harmonic detection method based on an active filter according to claim 4, characterized in that, The regulating current is obtained specifically according to the following formula. Δ i p : ; in, For the DC-side voltage error of the active filter, e d Let be the amplitude of the voltage synchronization component in the three-phase circuit, c be the convergence parameter, k be the first sliding mode parameter, ε be the second sliding mode parameter, and s be the sliding mode surface function. i p,dc This refers to the DC component of the instantaneous active current. i L This represents the equivalent component of the three-phase load current. This is the difference between the actual voltage error at the current moment and the predicted value from the previous cycle.

6. A harmonic detection device based on an active filter, characterized in that, include: The acquisition module is used to collect the instantaneous values ​​of the three-phase circuit voltage and the three-phase load current in the power system, and to acquire the synchronous rotation signal based on the three-phase circuit voltage. The conversion module performs Clark transformation on the three-phase load current and rotates the coordinates according to the synchronous rotation signal to obtain the active current. i p and reactive current i q ; The filtering module is used to remove the active current using a multiple moving average filter. i p and reactive current i q The high-frequency components are used to obtain the low-frequency signal. i pm 、i qm ; Extraction module, the extraction module is used to extract the low frequency signal i pm 、i qm The input signal to the Kalman filter is used to predict and update the low-frequency signal to extract the DC component. The optimization module is used to design a sliding mode predictive controller based on the predicted value of the DC-side voltage error of the active filter, and to dynamically optimize the sliding mode parameters of the sliding mode predictive controller. , The regulated current is generated using optimized sliding mode parameters. Δ i p ; Correction module, the correction module is used to adjust the current. Δ i p The corrected DC component is obtained by superimposing it onto the DC component. The separation module is used to separate the fundamental current and obtain the harmonic current by transforming the corrected DC component through coordinate transformation.

7. The harmonic detection device based on an active filter according to claim 6, characterized in that, The multiple moving average filter is obtained using the following formula: ; in, The current command pre-allocated for the To time period after the Kth filtering; T o To control the step size; K is the number of filtering iterations. N K Let K be the window size for the Kth filtering iteration. For the ( K -1) After filtering T o Pre-allocated current command for a specific time period, window size N K A window sequence with progressively decreasing values ​​is used.

8. The harmonic detection device based on an active filter according to claim 6, characterized in that, The extraction module is specifically used for: Predict the state at time k based on the state at time (k-1) of the Kalman filter, and calculate the covariance matrix of the state prediction error at time (k-1). Estimate the covariance matrix of the prediction error at time k based on the covariance matrix of the prediction error at time (k-1); The Kalman gain is calculated based on the covariance matrix of the prediction error at time k. Update the state at time k based on the Kalman gain, and update the covariance matrix of the state prediction error at time k. The DC component is directly extracted from the final state prediction.

9. The harmonic detection device based on an active filter according to claim 6, characterized in that, The optimization module is specifically used for: Design of sliding mode surface function s based on DC-side voltage error of active filter; A power-law approach law is chosen as the approach law for the sliding mode. Based on the DC-side voltage error predicted by the active filter and the sliding mode surface function s, an objective function for evaluating control performance is constructed. J : Based on the predicted DC-side voltage value predicted by the active filter, the sliding mode parameters of the power-law approach are dynamically adjusted. When the objective function J reaches the optimal value, the optimal sliding mode parameters are obtained. The adjustment current is obtained based on the optimal sliding mode parameters. Δ i p .

10. The harmonic detection device based on an active filter according to claim 9, characterized in that, The optimization module specifically obtains the regulating current according to the following formula. Δ i p : ; in, For the DC-side voltage error of the active filter, e d Let be the amplitude of the voltage synchronization component in the three-phase circuit, c be the convergence parameter, k be the first sliding mode parameter, ε be the second sliding mode parameter, and s be the sliding mode surface function. i p,dc This refers to the DC component of the instantaneous active current. i L This represents the equivalent component of the three-phase load current. This is the difference between the actual voltage error at the current moment and the predicted value from the previous cycle.