A UPQC harmonic compensation method and system based on repetitive control

By constructing a hybrid feedforward and feedback control architecture, and combining an adaptive filter and a frequency adaptive repetitive controller, the problems of harmonic suppression accuracy and delay caused by frequency fluctuations and load abrupt changes in UPQC harmonic compensation are solved, achieving high-precision and fast-response harmonic compensation effects.

CN121097695BActive Publication Date: 2026-02-06HANGZHOU YUNUO ELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511639422.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-02-06
Estimated Expiration
2045-11-11

AI Technical Summary

Technical Problem

When faced with fluctuations in the fundamental frequency of the power grid, the existing UPQC harmonic compensation technology cannot be accurately matched by traditional repetitive control schemes, resulting in a decrease in harmonic suppression accuracy. Furthermore, the compensation action is delayed and the transient response performance is insufficient in scenarios of sudden changes in load harmonics.

Method used

The UPQC harmonic compensation method based on repetitive control is adopted. By acquiring the load current signal, a hybrid control architecture of feedforward and feedback is constructed using an adaptive filter and a frequency adaptive repetitive controller. The fundamental frequency of the power grid is monitored in real time, the control parameters are dynamically adjusted, and feedforward and feedback control quantities are generated to achieve harmonic compensation.

Benefits of technology

It achieves high-precision harmonic suppression within the range of power grid fundamental frequency fluctuations, improves the system's transient adaptability to load harmonic abrupt changes, reduces compensation delay, and ensures the stability and compliance of power grid current.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121097695B_ABST
    Figure CN121097695B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of power system, and particularly relates to a UPQC harmonic compensation method and system based on repetitive control, comprising: obtaining a load current signal and a voltage signal of a power distribution network, and extracting a harmonic instruction current based on the load current signal; inputting the harmonic instruction current to a feedforward channel constructed based on an adaptive filter to generate a feedforward control amount, the present application tracks the phase and frequency of the voltage signal of the power distribution network in real time through a digital phase-locked loop, accurately calculates the fundamental frequency of the power grid, and dynamically calculates the internal mode period and phase lead compensation amount of the frequency adaptive repetitive controller according to the same, by updating the two core parameters in real time, the internal mode structure of the repetitive controller is always matched with the current power grid frequency, the compensation accuracy degradation caused by frequency deviation is avoided, and high-precision suppression of periodic harmonics can be achieved within the normal fluctuation range of the fundamental frequency of the power grid.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power systems, in particular to a UPQC harmonic compensation method and system based on repetitive control. BACKGROUND

[0002] As a comprehensive power quality control device, the unified power quality conditioner (UPQC) can solve multiple power quality problems such as harmonics, voltage sag / rise, and reactive power imbalance in distribution networks. Its core components include a parallel unit and a series unit. The parallel unit is mainly responsible for compensating for harmonic currents and reactive currents generated by the load by injecting compensation currents with the same amplitude and opposite phase as the harmonic currents into the power grid to purify the grid current.

[0003] However, the existing UPQC harmonic compensation technology still has the following problems in actual engineering applications: In actual distribution network operation, the fundamental frequency may fluctuate around the rated value due to factors such as generator unit output adjustment and load fluctuation. When the frequency deviates from the design value, the traditional repetitive control scheme cannot accurately match the changing signal period, resulting in a decrease in harmonic suppression accuracy. Moreover, the traditional repetitive control logic relies on the memory and use of error information from the previous period, and the dynamic response process requires at least one power grid fundamental period. In the face of load harmonic mutation scenarios, the compensation action has a certain delay, and the transient response performance is insufficient. SUMMARY

[0004] The main purpose of the present application is to provide a UPQC harmonic compensation method and system based on repetitive control, which aims to solve the technical problems raised in the background technology.

[0005] The present application provides a UPQC harmonic compensation method based on repetitive control, which comprises:

[0006] Obtain the load current signal and voltage signal of the distribution network, and extract the harmonic instruction current based on the load current signal;

[0007] Input the harmonic instruction current into the feedforward channel constructed based on the adaptive filter to generate the feedforward control quantity;

[0008] Obtain the compensation current output by the UPQC parallel unit in real time, and calculate the error component between the harmonic instruction current and the compensation current;

[0009] Real-time monitoring of the power grid fundamental frequency is performed by a phase-locked loop, and the core parameters of the feedback channel constructed based on the frequency adaptive repetitive controller are dynamically adjusted based on the power grid fundamental frequency;

[0010] Input the error component into the feedback channel after adjusting the core parameters to generate the feedback control quantity;

[0011] The feedforward control quantity and the feedback control quantity are weighted and fused to generate a final control quantity, and the final control quantity is modulated by PWM to drive the power switch tube of the UPQC to complete harmonic compensation.

[0012] Preferably, the step of obtaining the load current signal and the voltage signal of the power distribution network and extracting the harmonic instruction current based on the load current signal comprises:

[0013] The load current signal of the power distribution network is obtained by a current sampling module, and the load current signal comprises a three-phase load current signal;

[0014] The three-phase load current signal is converted to a current component in a two-phase stationary coordinate system by Clarke transformation, and the current component in the two-phase stationary coordinate system is converted to a current component in a two-phase rotating coordinate system by Park transformation;

[0015] The current component in the two-phase rotating coordinate system is input to a low-pass filter to extract a fundamental active component and a fundamental reactive component;

[0016] The fundamental active component and the fundamental reactive component are subjected to Park inverse transformation and Clarke inverse transformation to reconstruct a three-phase fundamental current component;

[0017] A difference value is calculated according to the three-phase load current signal and the three-phase fundamental current component to obtain a harmonic instruction current.

[0018] Preferably, the step of inputting the harmonic instruction current to a feedforward channel constructed based on an adaptive filter to generate a feedforward control quantity comprises:

[0019] The harmonic instruction current is input as an input signal to an adaptive filter based on a normalized least mean square algorithm;

[0020] A current weight coefficient vector of the adaptive filter is obtained, and an output signal of the adaptive filter is obtained according to the harmonic instruction current and the current weight coefficient vector;

[0021] An instantaneous error is obtained according to the harmonic instruction current and the output signal of the adaptive filter, and is used for feedback adjustment of the weight coefficient of the adaptive filter;

[0022] The weight coefficient vector of the adaptive filter is updated by using the normalized least mean square algorithm according to the instantaneous error and the input signal;

[0023] The feedforward control quantity is calculated and obtained according to the updated weight coefficient vector and the input signal.

[0024] Preferably, the step of acquiring the compensation current output by the UPQC parallel unit in real time and calculating the error component between the harmonic instruction current and the compensation current comprises:

[0025] Based on the topology of the UPQC parallel unit, the compensation current flowing into the power grid is detected in real time by a current sensor to acquire a three-phase compensation current signal;

[0026] According to the harmonic instruction current and the three-phase compensation current signal, an instantaneous error signal of each phase is calculated;

[0027] The instantaneous error signal of each phase is converted by Clarke transformation to obtain an error component in a two-phase stationary coordinate system.

[0028] Preferably, the step of monitoring the fundamental frequency of the power grid in real time by a phase-locked loop and dynamically adjusting the core parameters in the feedback channel constructed based on the frequency adaptive repetitive controller based on the fundamental frequency of the power grid comprises:

[0029] The voltage signal of the power distribution network is acquired, and the phase and frequency of the voltage signal are tracked in real time by a digital phase-locked loop to calculate the fundamental frequency of the power grid;

[0030] The system sampling frequency is acquired, and the inner mode period of the frequency adaptive repetitive controller is calculated according to the fundamental frequency of the power grid and the system sampling frequency;

[0031] The phase lag characteristic curve of the controlled object at different frequencies stored by offline identification is called, the corresponding phase lag angle is determined from the phase lag characteristic curve according to the fundamental frequency of the power grid, and the phase lead compensation amount is calculated according to the phase lag angle and the inner mode period;

[0032] According to the fundamental frequency of the power grid, the characteristic harmonic frequency is acquired, and the resonance frequency of the proportional-resonant controller in the feedback channel is adjusted to the characteristic harmonic frequency in real time according to the parameters of the updated frequency adaptive repetitive controller.

[0033] Preferably, the step of inputting the error component into the feedback channel with adjusted core parameters to generate a feedback control quantity comprises:

[0034] The error component is input into the frequency adaptive repetitive controller in the feedback channel, and the periodic harmonic error is suppressed by the inner mode structure of the frequency adaptive repetitive controller to output a first intermediate control quantity;

[0035] According to the compensation demand of the system to the non-periodic disturbance, the error component is simultaneously input into the parallel proportional-resonant controller in the feedback channel, and the second intermediate control quantity is obtained by discrete processing through the bilinear transformation method;

[0036] According to the first intermediate control quantity and the second intermediate control quantity, a feedback control quantity is obtained by superposition.

[0037] Preferably, the step of weighting and fusing the feedforward control quantity and the feedback control quantity to generate a final control quantity, and driving the power switch tube of the UPQC after PWM modulation to complete the harmonic compensation comprises:

[0038] According to the load current signal, a load change index is obtained, and according to the load change index, a feedforward channel weighting coefficient and a feedback channel weighting coefficient are obtained.

[0039] According to the feedforward channel weighting coefficient and the feedback channel weighting coefficient, the feedforward control quantity and the feedback control quantity are weighted and fused to generate a final control quantity.

[0040] A space vector PWM modulation method is adopted, and a PWM signal with variable duty cycle is generated based on the final control quantity.

[0041] According to the PWM signal, the switching state of the power switch tube in the UPQC parallel unit inverter is controlled through the driving circuit amplification.

[0042] According to the switching state of the power switch tube, the compensation current output by the UPQC is adjusted to complete the harmonic compensation.

[0043] The application also provides a UPQC harmonic compensation system based on repetitive control, comprising:

[0044] A harmonic detection module is configured to obtain a load current signal and a voltage signal of a power distribution network, and extract a harmonic instruction current based on the load current signal.

[0045] A feedforward generation module is configured to input the harmonic instruction current into a feedforward channel constructed based on an adaptive filter to generate a feedforward control quantity.

[0046] An error calculation module is configured to obtain a compensation current output by a UPQC parallel unit in real time, and calculate an error component between the harmonic instruction current and the compensation current.

[0047] A parameter adjustment module is configured to monitor the power grid fundamental frequency in real time through a phase-locked loop, and dynamically adjust the core parameters of a feedback channel constructed based on a frequency adaptive repetitive controller based on the power grid fundamental frequency.

[0048] A feedback generation module is configured to input the error component into the feedback channel after adjustment of the core parameters to generate a feedback control quantity.

[0049] The compensation control module is configured to weight and fuse the feedforward control quantity and the feedback control quantity to generate a final control quantity, and drive power switches of the UPQC after PWM modulation to complete harmonic compensation.

[0050] The application further provides a computer device comprising a memory and a processor, and the memory stores a computer program.

[0051] The application further provides a computer readable storage medium storing a computer program.

[0052] The application has the advantages that the digital phase-locked loop is used to track the phase and frequency of a power distribution network voltage signal in real time, accurately calculate the power grid fundamental frequency, and dynamically calculate the inner mode period and phase lead compensation of the frequency adaptive repetitive controller according to the power grid fundamental frequency.

[0053] The application constructs a feedforward and feedback hybrid control architecture, and the feedforward channel based on the adaptive filter compensates for the response short board of the traditional repetitive control. BRIEF DESCRIPTION OF DRAWINGS

[0054] Figure 1 It is a method flowchart of an embodiment of the application.

[0055] Figure 2 It is a system structure schematic diagram of an embodiment of the application.

[0056] The implementation, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

[0058] As Figure 1 shown, the application provides a UPQC harmonic compensation method based on repetitive control, comprising:

[0059] S1, acquiring the load current signal and voltage signal of the power distribution network, and extracting a harmonic instruction current based on the load current signal;

[0060] S2, inputting the harmonic instruction current to a feedforward channel constructed based on an adaptive filter to generate a feedforward control quantity;

[0061] S3, acquiring the compensation current output in real time by the UPQC shunt unit, and calculating the error component between the harmonic instruction current and the compensation current;

[0062] S4, monitoring the power grid fundamental frequency in real time through a phase-locked loop, and dynamically adjusting the core parameters of the feedback channel constructed based on the frequency adaptive repetitive controller based on the power grid fundamental frequency;

[0063] S5, inputting the error component to the feedback channel after the core parameter adjustment to generate a feedback control quantity;

[0064] S6, weighting and fusing the feedforward control quantity and the feedback control quantity to generate a final control quantity, and driving the power switch tube of the UPQC after PWM modulation to complete harmonic compensation.

[0065] As described above in steps S1-S6, the present application realizes the accurate compensation of harmonics by the UPQC (unified power quality conditioner) in the power distribution network through the schemes of harmonic instruction extraction, feedforward control quantity generation, error component calculation, feedback channel parameter adaptive adjustment, feedback control quantity generation, control quantity weighting fusion and execution, ultimately improves the power quality of the power distribution network, and ensures the stability and compliance of the current and voltage at the load end and the power grid side.

[0066] In the actual scene of power quality management of distribution network, the core function of unified power quality conditioner (UPQC) is to suppress the harmonic current generated in the operation of the load in real time, and to ensure that the harmonic content of the current flowing into the public power grid meets the relevant standards. A large number of nonlinear loads (such as frequency converters, rectifier devices, electric arc furnaces, etc.) in the distribution network will generate harmonic currents that are integer multiples of the fundamental frequency of the power grid when they are working due to the high-frequency on-off characteristics of power electronic switches. These harmonic currents injected into the power grid not only increase the additional loss of transformers and transmission lines, reduce energy efficiency, but also may interfere with the normal operation of precision electrical equipment (such as medical instruments and industrial control systems), and even cause power grid resonance under certain conditions, threatening the overall operation safety of the power grid. At the same time, in the actual operation of the power grid, affected by factors such as power generation end unit output adjustment and power load fluctuation, the fundamental frequency of the power grid does not remain constant, but fluctuates within a certain range around the rated value. This frequency fluctuation will cause the harmonic frequency to change synchronously. Therefore, the harmonic compensation control scheme of UPQC needs to meet two key requirements: one is to ensure the accuracy of the compensation direction and size; the other is to have the ability to adapt to the frequency fluctuation of the power grid to avoid the problem of compensation accuracy decline or system stability caused by frequency change. The present application is around these two core requirements, through the coordinated design of stages and functions, to build a scheme from harmonic information acquisition, compensation instruction generation, control parameter adaptation to compensation execution, to gradually realize higher precision and wider frequency range adaptive compensation of distribution network harmonics, and meet the power quality management requirements under different working conditions.

[0067] In existing technologies, various technical paths have been developed for control schemes of harmonic compensation in UPQC. Each scheme can play a certain role in specific application scenarios. However, from the perspective of comprehensive engineering applications, two types of technical problems still exist: first, how to better balance dynamic response speed and steady-state compensation accuracy; and second, how to improve adaptability to grid frequency fluctuations. Specifically, some control schemes directly generate compensation control quantities based on the extracted harmonic command current. The advantage of this architecture is that it can quickly respond to changes in load harmonics, especially when sudden load connection or disconnection causes harmonic abrupt changes, it can quickly initiate compensation actions to reduce the harmonic impact during transient processes. However, due to interference from objective factors such as grid voltage fluctuations, power device parameter drift, and line impedance changes, the actual output compensation current is prone to deviation from the command current, making it difficult to maintain high steady-state compensation accuracy during long-term stable operation. Another approach employs repetitive control technology, which is based on the internal model principle. By embedding a delay element in the control loop that matches the grid cycle, it can theoretically achieve zero steady-state error suppression of periodic harmonic signals, exhibiting excellent compensation accuracy during steady-state operation. However, since traditional repetitive control logic relies on remembering and utilizing error information from the previous cycle, the dynamic response process requires at least one grid fundamental cycle. When facing sudden changes in load harmonics, the compensation action has a certain delay, resulting in insufficient transient response performance. This invention addresses these technical directions by constructing a hybrid feedforward and feedback control architecture and introducing a frequency adaptive adjustment mechanism.

[0068] Firstly, the load current signal and voltage signal of the power distribution network are acquired through S1 step, and the harmonic instruction current is extracted based on the load current signal. The load current signal is collected in real time by a current sampling module (such as a Hall current sensor), covering the load current of three phases of the power distribution network; the voltage signal is collected by a voltage sensor, providing basic data for subsequent power grid fundamental frequency monitoring. The step of the application first determines the "harmonic current size and phase that needs to be compensated", thereby providing a target basis for the compensation action of UPQC. The current generated by the nonlinear load contains a fundamental component and a harmonic component, and the core task of UPQC is to offset the harmonic component, so the harmonic part needs to be separated from the load current as the "instruction reference" for compensation. Specifically, the three-phase load current signal collected is first converted into a two-phase static coordinate system current component through Clarke transformation. The purpose of this transformation is to decouple the complex three-phase coupled signal into two independent orthogonal components, simplifying subsequent calculations. Then, the two-phase static coordinate system current component is converted into a two-phase rotating coordinate system current component through Park transformation, so that the originally alternating fundamental current component with time is converted into a direct current, which is convenient for filtering out harmonics. Subsequently, the two-phase rotating coordinate system current component is input into a low-pass filter (usually set to a cutoff frequency of 50Hz, matching the rated fundamental frequency of the power grid), to filter out harmonic components above 50Hz, thereby extracting the fundamental active component and the fundamental reactive component. Then, the fundamental active component and the fundamental reactive component are subjected to Park inverse transformation and Clarke inverse transformation to restore the direct current to a three-phase fundamental current component. This step is to compare the original three-phase load current signal in the same coordinate system. Finally, the harmonic instruction current that needs to be compensated is obtained by calculating the difference between the three-phase load current signal and the three-phase fundamental current component. For example, when the A-phase load current is 100A and the corresponding A-phase fundamental current component is 80A at a certain moment, the difference of 20A is the A-phase harmonic instruction current. The size and phase of the current directly determine the target value of the compensation current that UPQC needs to output.

[0069] After the harmonic command current is extracted, the harmonic command current is input to a feedforward channel based on an adaptive filter to generate a feedforward control quantity. The adaptive filter herein uses a normalized least mean square algorithm, and its core function is to dynamically adjust its weight coefficients so that the output feedforward control quantity can quickly track the changes in the harmonic command current, compensate for the harmonics in advance, and reduce compensation delay. The input signal of this step is the harmonic command current extracted in S1. The specific technical implementation includes five sub-steps: first, the harmonic command current is input into the adaptive filter as an input signal; then the current weight coefficient vector of the filter (the weight coefficient vector is set to a zero vector in the initial state, and is updated iteratively subsequently) is obtained, and the output signal of the filter is calculated in combination with the current harmonic command current. The dimension of the weight coefficient vector is usually matched with the filter order (such as 8 or 16, and the order selection needs to balance the compensation accuracy and the calculation complexity, and the higher the order, the higher the tracking accuracy, but the demand for computing power also increases accordingly); then the instantaneous error is obtained according to the difference between the harmonic command current and the filter output signal, which reflects the deviation between the current filter output and the target harmonic command current, and is the key basis for adjusting the weight coefficient subsequently; then the weight coefficient vector is updated using the normalized least mean square algorithm, and a step factor and a normalization constant are introduced in the updating process - the step factor is usually set to 0.01-0.1, which is used to control the updating speed of the weight coefficient, and a large step size will cause system oscillation, and a small step size will slow down the tracking speed, and the normalization constant is set to 0.001-0.01, which is used to prevent the denominator from tending to zero when the amplitude of the input signal is too small, causing calculation overflow; finally, the feedforward control quantity is calculated according to the updated weight coefficient vector and the input harmonic command current. The technical effect of this step is that the feedforward channel can use the dynamic tracking characteristics of the adaptive algorithm to quickly respond when the harmonic command current changes suddenly (such as sudden increase or decrease of the load), and output the control signal in advance to drive the UPQC. Compared with the traditional fixed gain feedforward control, it has stronger adaptability to dynamic loads and can reduce transient compensation error.

[0070] The core of the S3 step is to obtain the compensation current output by the UPQC parallel unit in real time, and calculate the error component between the harmonic instruction current and the compensation current. This step is the key link connecting the feedforward control and the feedback control, and the purpose is to provide the basis for the parameter adjustment and control quantity generation of the subsequent feedback channel through the deviation between the actual compensation effect and the target instruction. Among them, the compensation current of the UPQC parallel unit is detected in real time by a current sensor, which is installed on the connection line between the UPQC parallel unit and the power grid, and can directly collect the three-phase compensation current signal flowing into the power grid. In the specific implementation, first, the installation position of the current sensor is determined based on the topology of the UPQC parallel unit (such as three-phase full-bridge topology), to ensure that the collected compensation current signal can accurately reflect the actual output of the UPQC; then, the instantaneous error signal is calculated phase by phase according to the three-phase harmonic instruction current obtained in S1 and the real-time collected three-phase compensation current, for example, when the A-phase harmonic instruction current is 20A and the A-phase actual compensation current is 18A, the A-phase instantaneous error signal is 2A; finally, the three-phase instantaneous error signal is converted to the error component in the two-phase stationary coordinate system through Clarke transformation. This transformation is consistent with the principle of Clarke transformation in S1, both of which are decoupled three-phase signals, which is convenient for the subsequent digital controller in the feedback channel to process, and can also reduce the calculation amount, improve the control real-time performance. Compared with directly performing feedback control in the three-phase coordinate system, the error component in the two-phase stationary coordinate system is more easily adapted to the discretization algorithm of the frequency self-adaptive repetitive controller and the proportional-resonant controller, avoiding the problem of increased calculation complexity caused by three-phase coupling.

[0071] The S4 step focuses on monitoring the power grid fundamental frequency in real time through a phase-locked loop, and dynamically adjusting the core parameters of the feedback channel constructed based on the frequency adaptive repetitive controller based on the frequency, which is the key to realizing the "frequency adaptive" function of the application, and aims to solve the problem of decreased compensation accuracy of the traditional fixed parameter frequency adaptive repetitive controller when the power grid frequency fluctuates. The monitoring of the power grid fundamental frequency depends on the voltage signal of the distribution network.The specific technical implementation is divided into five sub-steps: first, the voltage signal of the power distribution network is obtained, and the phase change of the voltage signal is tracked in real time through a digital phase-locked loop (preferably a synchronous rotating coordinate system phase-locked loop). The phase-locked loop can quickly lock the fundamental phase of the power grid voltage through closed-loop regulation, and then calculate the fundamental frequency of the power grid. For example, when the phase of the power grid voltage changes 314 rad per second (corresponding to 50 Hz), the calculated fundamental frequency is 50 Hz. Then, the system sampling frequency is obtained, which is a preset parameter of the UPQC digital control system (usually set to 5 kHz-20 kHz, determined according to the control chip computing power and compensation accuracy requirements, such as a sampling frequency of 10 kHz, which can meet the harmonic compensation accuracy and will not occupy excessive computing power). Combined with the calculated power grid fundamental frequency, the inner mode period of the frequency adaptive repetitive controller is calculated. The physical meaning of the inner mode period is the number of sampling points contained in one power grid fundamental period. For example, when the system sampling frequency is 10 kHz and the power grid fundamental frequency is 50 Hz, the inner mode period is 200 sampling points. This parameter determines the simulation accuracy of the frequency adaptive repetitive controller for harmonic periodicity and must match the actual frequency of the power grid. Then, the phase lag characteristic curve of the controlled object stored in advance through offline identification is called. This curve is obtained by sweeping the frequency of the controlled object composed of the UPQC parallel unit inverter and the output filter (the frequency range covers 45 Hz-55 Hz), and the phase lag angle of the controlled object at different frequencies is recorded. When using, the corresponding phase lag angle is obtained according to the current power grid fundamental frequency, and then the phase lead compensation amount is calculated combined with the inner mode period. For example, when the phase lag angle is 36° and the inner mode period is 200, the phase lead compensation amount is 20 sampling points. Its function is to offset the phase lag of the controlled object and avoid system instability caused by phase delay. Subsequently, the calculated inner mode period and phase lead compensation amount are updated in real time to the inner mode memory and phase lead compensation module of the frequency adaptive repetitive controller in the feedback channel. The inner mode memory is used to store the error signal in one fundamental period, realizing the "repetitive learning" function. The phase lead compensation module adjusts the signal output timing to output the control quantity in advance to compensate for the phase lag. Finally, the characteristic harmonic frequency (i.e. the frequency corresponding to 5 times, 7 times, 11 times, etc. of the fundamental frequency) is obtained according to the power grid fundamental frequency, and the resonance frequency of the proportional-resonant controller in the feedback channel is adjusted to the characteristic harmonic frequency in real time combined with the updated frequency adaptive repetitive controller parameters, ensuring that the proportional-resonant controller can present high gain to the main harmonic component, improving the compensation accuracy. For example, when the power grid fundamental frequency changes to 49 Hz, the characteristic harmonic frequency also changes to 245 Hz (5 times) and 343 Hz (7 times), and the resonance frequency of the proportional-resonant controller is adjusted accordingly to avoid mismatch between the resonance point and the harmonic frequency due to frequency deviation.

[0072] S5 is to input the error component into the feedback channel adjusted by the core parameter to generate the feedback control quantity. This step is realized by the parallel cooperation of the frequency adaptive repetitive controller and the proportional resonant controller, which respectively suppresses the periodic harmonic error and the non-periodic disturbance to form the supplement and correction of the feedforward control. Among them, the error component is the error component in the two-phase stationary coordinate system converted in S3, which ensures the coherence of data transmission. In specific implementation, the error component is first input into the frequency adaptive repetitive controller. The inner mode structure of this controller stores the error signal in a fundamental period to "repeatedly suppress" the periodic harmonic error. For example, for the periodic error such as the 5th harmonic, the frequency adaptive repetitive controller gradually reduces the error amplitude by continuously learning the error law, and outputs the first intermediate control quantity. In the transfer function design, the stability compensator usually uses a first-order low-pass filter (such as a low-pass filter with a coefficient of 0.95) to suppress high-frequency noise and parameter disturbance and enhance the robustness of the system. At the same time, according to the compensation demand of the system to the non-periodic disturbance, the error component is input into the parallel proportional resonant controller. The proportional term of the controller provides a fast transient response to suppress non-periodic errors (such as instantaneous errors caused by sudden load switching), and the resonant term presents high gain to specific harmonics (5th, 7th, 11th, 13th) to achieve accurate compensation. In order to adapt to the digital control system, the proportional resonant controller needs to be discretized by the bilinear transformation method, and the discretization time interval is consistent with the system sampling period (calculated from the system sampling frequency). For example, when the system sampling frequency is 10 kHz, the discretization time interval is 100 microseconds. The continuous domain transfer function is converted into the discrete domain by bilinear transformation to avoid frequency distortion caused by discretization, and finally the second intermediate control quantity is output. Finally, the first intermediate control quantity and the second intermediate control quantity are superimposed to obtain the feedback control quantity. The advantage of this parallel structure is that the frequency adaptive repetitive controller is good at processing periodic harmonics, and the proportional resonant controller is good at processing non-periodic disturbances and specific harmonics. The cooperation of the two can cover a wider range of error types. Compared with a single controller, the dynamic response speed of the feedback control quantity is improved, and the steady-state error is reduced.

[0073] S6 is to weight and fuse the feedforward control quantity and the feedback control quantity to generate a final control quantity, and to drive the power switch tube of the UPQC after PWM modulation to complete harmonic compensation. This is the final link from "calculation" to "execution" of the control instruction, and the weighting coefficient needs to be adjusted in combination with the dynamic change of the load to ensure the balance between compensation effect and system stability. Among them, the load change index is calculated based on the load current signal collected in S1, and specifically includes the load current mutation rate (the difference between the current of the current sampling period and the previous period divided by the sampling period) and the total harmonic distortion rate (the ratio of the effective value of the harmonic current to the effective value of the fundamental current). For example, when the load current mutation rate is greater than 10 A / ms or the total harmonic distortion rate is greater than 20%, it indicates that the load is in a state of dynamic change or high harmonic content, and the weighting coefficient needs to be adjusted to enhance the response speed of the feedforward control. In specific implementation, first, the feedforward channel weighting coefficient and the feedback channel weighting coefficient are obtained according to the load change index. When the load changes dynamically, the feedforward channel weighting coefficient is 0.6-0.7, and the feedback channel weighting coefficient is 0.3-0.4, and the rapidity of the feedforward control is used to suppress the instantaneous error. When the load is stable, the feedforward channel weighting coefficient is 0.3-0.4, and the feedback channel weighting coefficient is 0.6-0.7, and the accuracy of the feedback control is used to reduce the steady-state error. Then, the feedforward control quantity (generated in S2) and the feedback control quantity (generated in S5) are weighted and fused according to the weighting coefficients. For example, when the feedforward control quantity is 10V, the feedback control quantity is 8V, the feedforward weighting coefficient is 0.6, and the feedback weighting coefficient is 0.4, the final control quantity is 9.2V. This fusion method can balance the rapidity of the feedforward and the accuracy of the feedback. Then, the space vector PWM modulation method is used to generate a PWM signal with variable duty cycle based on the final control quantity. The specific process is to convert the three-phase voltage command corresponding to the final control quantity into a voltage space vector in the two-phase stationary coordinate system, determine the sector where the vector is located according to the amplitude and phase of the vector, calculate the action time of the effective voltage vector and the zero vector in the sector, and then generate the PWM signal based on the seven-segment switching sequence. Compared with the traditional sine PWM, the voltage utilization rate can be improved by about 15%, and the power switch tube can be driven more efficiently. Subsequently, according to the PWM signal, the switching state of the power switch tube (such as IGBT) in the UPQC parallel unit inverter is controlled through the driving circuit (such as optical coupling isolation driving circuit). The change of the switching state will change the output voltage of the inverter, and then adjust the output current. Finally, according to the switching state of the power switch tube, the compensation current output by the UPQC is adjusted, so that the compensation current is equal in size and opposite in phase to the harmonic current injected into the power grid by the load, thereby canceling the harmonic component and completing the harmonic compensation.

[0074] Compared with the traditional scheme, the application designs a feedforward and feedback mixed control architecture, wherein the feedforward channel adopts an adaptive filter-based design, utilizes its fast tracking characteristics to respond to the real-time changes of the harmonic instruction current, and realizes the preliminary compensation of the harmonic mutation; the feedback channel combines a frequency adaptive repetitive controller and a proportional resonant controller, wherein the frequency adaptive repetitive controller is responsible for suppressing periodic harmonics to ensure steady-state accuracy, the proportional resonant controller assists in coping with non-periodic disturbances, and through real-time monitoring of the fundamental frequency of the power grid and adjustment of the core parameters, it ensures that the control module always adapts to the current power grid operating state, finally realizes the cooperative optimization of dynamic response and steady-state accuracy, and good adaptability to power grid frequency fluctuations.

[0075] In an embodiment of the application, the step of obtaining the load current signal and the voltage signal of the power distribution network, and extracting the harmonic instruction current based on the load current signal comprises:

[0076] S11, obtaining the load current signal of the power distribution network through a current sampling module, wherein the load current signal comprises a three-phase load current signal;

[0077] S12, converting the three-phase load current signal to a current component in a two-phase stationary coordinate system through Clarke transformation, and then converting the current component in the two-phase stationary coordinate system to a current component in a two-phase rotating coordinate system through Park transformation;

[0078] S13, inputting the current component in the two-phase rotating coordinate system into a low-pass filter to extract the fundamental active component and the fundamental reactive component;

[0079] S14, performing Park inverse transformation and Clarke inverse transformation on the fundamental active component and the fundamental reactive component to reconstruct the three-phase fundamental current component;

[0080] S15, calculating the difference value according to the three-phase load current signal and the three-phase fundamental current component to obtain the harmonic instruction current.

[0081] As described in steps S11-S15, the application separates the fundamental component and the harmonic component in the load current by collecting the three-phase load current signal of the power distribution network, combining coordinate transformation and filtering processing, and finally calculating the harmonic instruction current for subsequent compensation control, which provides an accurate compensation target reference for the entire UPQC harmonic compensation scheme, and ensures that the generation of subsequent feedforward and feedback control quantities can accurately match the actual harmonic condition of the load.

[0082] In actual operation of the power distribution network, the load current includes fundamental current and harmonic current, wherein the fundamental current is a necessary component to maintain normal operation of the load, and the harmonic current is a main factor causing power quality problems. The core task of the UPQC is to compensate for the harmonic current rather than the fundamental current. Therefore, if the fundamental and harmonic components cannot be accurately separated, the compensation target will be confused, either the fundamental current is miscompensated to affect the load operation, or the harmonic current is missed to cause incomplete compensation. Therefore, the step extracts pure harmonic instruction current through a special signal processing procedure.

[0083] Specifically, the S11 step is the basis of the whole process. The load current signal of the power distribution network is obtained through the current sampling module, and it is clear that the load current signal includes three-phase load current signals. The current sampling module here is composed of a current sensor (such as a Hall current sensor) and a signal conditioning circuit. The current sensor detects the current signal of the three-phase load side of the power distribution network in real time, and the signal conditioning circuit amplifies, filters and digitizes the weak signal output by the sensor, converts the analog signal into a digital signal that can be processed by the digital control system. The digital signal is the original data processed in the subsequent steps. Complete acquisition of three-phase current signals can fully reflect the overall characteristics of the load current.

[0084] The S12 step converts the three-phase load current signal to the current component in the two-phase stationary coordinate system through Clarke transformation, and then converts the current component in the two-phase stationary coordinate system to the current component in the two-phase rotating coordinate system through Park transformation. The core purpose is to decouple the three-phase current signal. The essence of Clarke transformation is to project the three-phase orthogonal current signal into the two-phase orthogonal stationary coordinate system, eliminating the amplitude coupling between the three phases. Park transformation converts the alternating component in the two-phase stationary coordinate system into the direct current in the two-phase rotating coordinate system (d, q coordinate system, rotating synchronously with the fundamental frequency). At this time, the fundamental current corresponds to the direct current component of the d, q axis, and the harmonic current corresponds to the alternating component of the d, q axis. This conversion greatly reduces the difficulty of separating the fundamental and harmonic currents. The direct current only needs to be extracted through simple low-pass filtering, without complex band-pass filtering, effectively reducing signal distortion.

[0085] The current component in the two-phase rotating coordinate system is input to the low-pass filter in step S13 to extract the fundamental active component and the fundamental reactive component. The low-pass filter in this embodiment is a first-order or second-order RC low-pass filter, and the cut-off frequency is set to be slightly higher than the fundamental frequency of the power grid (e.g. 60 Hz for a 50 Hz power grid). The purpose is to allow only the direct current corresponding to the fundamental frequency to pass through and filter out the alternating current corresponding to the harmonics. After the Park transformation, the d-axis component corresponds to the fundamental active current, and the q-axis component corresponds to the fundamental reactive current. Both of them are direct currents, and the low-pass filter can retain these two direct currents while suppressing the high-frequency alternating current generated by the harmonics, ensuring that the extracted fundamental active component and fundamental reactive component are pure and free from interference. If the cut-off frequency of the low-pass filter is too high, some high-frequency harmonic components will be mixed into the fundamental frequency. If the cut-off frequency is too low, the fundamental component will be attenuated. Therefore, the reasonable setting of the cut-off frequency is the key to ensuring the accuracy of this step. In this step, the cut-off frequency is set by matching the fundamental frequency of the power grid, balancing the filtering accuracy and the retention effect of the fundamental frequency.

[0086] In step S14, the Park inverse transformation and the Clarke inverse transformation are performed on the fundamental active component and the fundamental reactive component to reconstruct the three-phase fundamental current component. The Park inverse transformation converts the direct current of the d, q coordinate system into alternating current in the two-phase stationary coordinate system, restoring the alternating characteristics of the fundamental current. The Clarke inverse transformation converts the two-phase stationary coordinate system into the three-phase stationary coordinate system, reconstructing the three-phase fundamental current with the same phase and frequency as the original three-phase load current. The subsequent calculation of the harmonic current needs to be in three-phase form to correspond to the original three-phase load current. Therefore, the d, q axis components cannot be used for three-phase difference calculation. Therefore, the present application restores the fundamental component to three-phase form through inverse transformation, ensuring that the phase and amplitude of the reconstructed fundamental component are consistent with the original fundamental component. For example, the amplitude of the A-phase fundamental current is 10 A, and the phase is 0°. The amplitude and phase of the reconstructed A-phase fundamental current should be consistent to avoid introducing errors in the transformation process.

[0087] In step S15, the difference between the three-phase load current signal and the three-phase fundamental current component is calculated to obtain the harmonic instruction current. The specific calculation method is as follows: the three-phase load current collected in step S11 is subtracted from the three-phase fundamental current reconstructed in step S14 to obtain the three-phase harmonic instruction current. The difference directly reflects the size and phase of the harmonic current that needs to be compensated by the UPQC. The control amount of the subsequent feedforward channel and feedback channel is generated based on the harmonic instruction current. For example, if the amplitude of the A-phase 5th harmonic current is 2 A, the UPQC parallel unit needs to output a 5th harmonic compensation current with an amplitude of 2 A and an opposite phase to cancel the harmonic current generated by the load.

[0088] The application decouples three-phase signals through complete Clarke-Park transformation and inverse transformation, avoids cross interference, and improves fundamental wave extraction accuracy; a low-pass filter is designed for the transformed direct current in the filtering link to reduce fundamental wave distortion in the filtering process and ensure the accuracy of fundamental wave reconstruction; and finally, a harmonic instruction current with higher purity is obtained.

[0089] The step mainly develops around the three-phase load current signal, but the processing flow of the single-phase load current signal can be expanded based on the same technical framework, and the single-phase power distribution network scene is also applicable. Compared with the three-phase load current signal, the single-phase load current signal does not need to be separated into fundamental wave and harmonic wave through three-phase-two-phase coordinate transformation.

[0090] In one embodiment of the application, the step of inputting the harmonic instruction current into a feedforward channel constructed based on an adaptive filter to generate a feedforward control quantity comprises:

[0091] S21, inputting the harmonic instruction current as an input signal into an adaptive filter based on a normalized least mean square algorithm;

[0092] S22, obtaining a current weight coefficient vector of the adaptive filter, and obtaining an output signal of the adaptive filter according to the harmonic instruction current and the current weight coefficient vector;

[0093] S23, obtaining an instantaneous error according to the harmonic instruction current and the output signal of the adaptive filter, which is used for feedback adjustment of the weight coefficient of the adaptive filter;

[0094] S24, updating the weight coefficient vector of the adaptive filter according to the instantaneous error and the input signal by using the normalized least mean square algorithm, and the update formula is:

[0095] ;

[0096] In the formula, indicates the weight coefficient vector of the adaptive filter updated in the m-th sampling period, indicates the weight coefficient vector of the adaptive filter in the m-th sampling period, indicates the weight coefficient vector of the adaptive filter in the m-th sampling period, indicates the weight coefficient vector of the adaptive filter in the m-th sampling period, indicates a step factor (used for controlling the weight coefficient vector update speed, balancing the convergence speed and output stability), indicates the instantaneous error in the m-th sampling period, indicates the input signal (i.e. the harmonic instruction current to be processed) in the m-th sampling period, indicates the input signal (i.e. the harmonic instruction current to be processed) in the m-th sampling period, indicates the input signal (i.e. the harmonic instruction current to be processed) in the m-th sampling period, indicates a normalization constant;

[0097] S25, calculate the feedforward control quantity according to the updated weight coefficient vector and the input signal.

[0098] As described in steps S21-S25, the application uses an adaptive filter based on the normalized least mean square algorithm to perform real-time signal processing on the harmonic instruction current extracted in step S1, dynamically adjusts the filter weight coefficients to track changes in the harmonic instruction current, and generates a feedforward control quantity that can quickly respond to load harmonic mutations. This allows UPQC to quickly output compensation current and reduce the impact of harmonics during the transient process when load harmonics suddenly change.

[0099] The core value of feedforward control is predictive compensation. Compared to feedback control, which adjusts after the error occurs, feedforward control can generate control quantities in advance based on harmonic instruction current, which is very important for load mutation scenarios common in power distribution networks, such as sudden startup of industrial equipment or concentrated use of residential electricity. In such scenarios, load harmonics can change significantly in a short time. If the feedforward control quantity cannot be quickly tracked, it will result in transient harmonic exceeding the standard. The application uses an adaptive filter to match the dynamic characteristics of the harmonic instruction current by adjusting the weight coefficients in real time, ensuring the accuracy and timeliness of the feedforward control quantity.

[0100] Specifically, step S21 inputs the harmonic instruction current as an input signal to the adaptive filter based on the normalized least mean square algorithm. The harmonic instruction current in this step comes from the final output of step S1, i.e., the three-phase (or single-phase in the single-phase extension scenario) harmonic instruction current obtained after collection, transformation, filtering, and reconstruction in steps S11-S15. This current signal has eliminated the fundamental component and only contains the harmonic component that needs to be compensated, ensuring the purity of the signal input to the adaptive filter and avoiding interference from the fundamental component with the adjustment of the filter weight coefficients. The input signal is used because the core of feedforward control is to generate compensation based on the harmonic instruction current. Based on accurate harmonic instruction current, the filter can output a feedforward control quantity that matches the target.

[0101] Step S22 obtains the current weight coefficient vector of the adaptive filter and the output signal of the adaptive filter based on the harmonic instruction current and the current weight coefficient vector. The weight coefficient vector of the adaptive filter is the core parameter that determines its filtering characteristics. In the initial state, the weight coefficient vector is set to a zero vector and is gradually updated by the algorithm as the system runs. In each sampling period, the current weight coefficient vector (i.e., the result updated in the previous sampling period) is first read, and then it is convolved with the harmonic instruction current input signal of the current period to obtain the output signal of the filter. This process is a signal fitting process in which the filter uses the current weight coefficient to fit the input harmonic instruction current. The ideal state of the output signal is to match the harmonic instruction current perfectly, and then generate the corresponding feedforward control quantity.

[0102] S23 step obtains the instantaneous error according to the harmonic instruction current and the output signal of the adaptive filter, which is used for feedback adjustment of the adaptive filter weight coefficient. The calculation method of the instantaneous error is the harmonic instruction current of the current period minus the output signal of the adaptive filter in the same period. This error directly reflects the deviation degree of the current filter output and the target harmonic instruction current. If the error is positive, it means that the filter output is less than the harmonic instruction current, and the weight coefficient needs to be adjusted to increase the output. If the error is negative, the output needs to be reduced. The instantaneous error is the core basis for updating the weight coefficient. Through error feedback, the filter can achieve dynamic tracking of the harmonic instruction current, and avoid the weight coefficient deviating from the optimal value. For example, when the load suddenly increases, causing the amplitude of the harmonic instruction current to increase, the instantaneous error will become positive, triggering the adjustment of the weight coefficient in the direction of increasing the output, so that the filter output quickly follows.

[0103] S24 step updates the weight coefficient vector of the adaptive filter using the normalized least mean square algorithm according to the instantaneous error and the input signal. The core of the update formula is "normalization" and "error feedback", wherein, is used for normalizing the input signal to avoid abnormal weight coefficient update caused by too large or too small amplitude of the input signal, The value of is usually a small positive number (such as 0.001) to prevent the denominator from tending to zero and causing calculation overflow; is used for adjusting the weight coefficient update amplitude according to the instantaneous error and the input signal direction. The step factor is determined by offline debugging (typical value is 0.01-0.1), and needs to be balanced between convergence speed and output stability. For example, when the load harmonic changes frequently, the step factor can be appropriately increased to improve the tracking speed. When the power grid has slight noise, the step factor can be reduced to reduce the output fluctuation. This update process enables the weight coefficient to follow the changes of the harmonic instruction current in real time.

[0104] S25 step calculates the feedforward control quantity according to the updated weight coefficient vector and the input signal. After the weight coefficient update in S24 step, the weight coefficient vector of the first sampling period is convolved with the harmonic instruction current input signal of the current sampling period to obtain the updated filter output signal, which is the feedforward control quantity. The feedforward control quantity directly corresponds to the compensation current instruction that the UPQC feedforward channel needs to output. After subsequent PWM modulation, the feedforward control quantity can drive the UPQC power switch tube to output the corresponding compensation current, which offsets the harmonic current generated by the load. For example, when the 5th harmonic amplitude in the feedforward control quantity generated by S25 step is 1.5A, the UPQC feedforward channel will output 1.5A of 5th harmonic compensation current, which is opposite to the direction of the load 5th harmonic current, achieving transient compensation.

[0105] The step ensures the stability of the weight coefficient updating process through normalization, is not affected by the change of the input harmonic instruction current amplitude, and can stably output the feedforward control amount under different load conditions; and through real-time feedback of the instantaneous error and reasonable setting of the step factor, the dynamic tracking speed and output smoothness of the feedforward control are considered, the feedforward control amount matching the load harmonic mutation scene can be quickly generated, and the transient harmonic over-standard time is reduced.

[0106] In one embodiment of the application, the step of obtaining the compensation current output by the UPQC parallel unit in real time and calculating the error component between the harmonic instruction current and the compensation current comprises:

[0107] S31, based on the topology structure of the UPQC parallel unit, the compensation current flowing into the power grid is detected in real time through a current sensor, and three-phase compensation current signals are obtained;

[0108] S32, instantaneous error signals of each phase are calculated according to the harmonic instruction current and the three-phase compensation current signals;

[0109] S33, the instantaneous error signals of each phase are converted through Clarke transformation to obtain error components in a two-phase stationary coordinate system.

[0110] As described in steps S31-S33, the three-phase compensation current output by the UPQC parallel unit is collected in real time, compared with the three-phase harmonic instruction current extracted in step S1, and instantaneous error signals of each phase are obtained, which are then converted into error components in a two-phase stationary coordinate system through coordinate transformation, providing error basis for adjusting feedback channel parameters in step S4 and generating feedback control amount in step S5, so that the feedback control can correct the residual deviation of the feedforward compensation, and the overall harmonic compensation accuracy is improved.

[0111] Specifically, in step S31, based on the topology structure of the UPQC parallel unit, the compensation current flowing into the power grid is detected in real time through a current sensor, and three-phase compensation current signals are obtained. The UPQC parallel unit topology structure includes a three-phase full-bridge inverter (composed of 6 power switching tubes), the compensation current flows into the power grid from the output end of the inverter through a filter inductor, and the current sensor (such as a Hall current sensor) needs to be installed on the line between the output end of the inverter and the power grid to ensure that the actual compensation current injected into the power grid can be directly detected. The sampling frequency of the current sensor needs to be consistent with the system sampling frequency (such as 10 kHz), and after signal conditioning circuit (amplification, filtering, analog-to-digital conversion), the digital signal of the three-phase compensation current is output, which is the actual value reference for subsequent error calculation.

[0112] The step S32 calculates the instantaneous error signals of each phase according to the harmonic instruction current and the three-phase compensation current signal. The calculation method of the instantaneous error signal is that the harmonic instruction current of each phase is subtracted by the compensation current of the corresponding phase, that is, the instantaneous error signal of the A phase is equal to the harmonic instruction current of the A phase minus the compensation current of the A phase, the instantaneous error signal of the B phase is equal to the harmonic instruction current of the B phase minus the compensation current of the B phase, and the instantaneous error signal of the C phase is equal to the harmonic instruction current of the C phase minus the compensation current of the C phase. The error signal directly reflects the deviation degree of the current compensation current of each phase from the target value: if the instantaneous error signal of the A phase is positive, it indicates that the compensation current of the A phase is less than the harmonic instruction current of the A phase, and the compensation current of the A phase needs to be increased through feedback control; if the instantaneous error signal of the A phase is negative, the compensation current of the A phase needs to be reduced.

[0113] The step S33 converts the instantaneous error signals of each phase through Clarke transformation to obtain error components in the two-phase stationary coordinate system. The core of Clarke transformation is to project the three-phase orthogonal error signals (the instantaneous error signals of the A phase, the B phase and the C phase) into the two-phase orthogonal stationary coordinate system to eliminate the coupling relationship between the three phases. The significance of the transformation is to simplify the three-dimensional three-phase error signal into a two-dimensional two-phase independent signal, so that the frequency self-adaptive repetitive controller of the subsequent feedback channel does not need to process the three-phase coupling relationship, but only needs to adjust the parameters for the two-phase error components respectively, thereby reducing the control complexity. Meanwhile, Clarke transformation is a linear transformation, as long as the input three-phase instantaneous error signal is accurate, the α-axis and β-axis error components after the transformation can truly reflect the error distribution.

[0114] The application collects the compensation current through the current sensor synchronized with the system sampling frequency, ensures the real-time performance of error calculation, avoids the inaccurate feedback adjustment caused by the lagging collection, and ensures that the two-phase error components after the transformation can truly reflect the actual deviation through the Clarke transformation logic and the deviation correction combined with the sensor calibration data.

[0115] In an embodiment of the application, the step of monitoring the power grid fundamental frequency in real time through a phase-locked loop and dynamically adjusting the core parameters in the feedback channel constructed based on the frequency self-adaptive repetitive controller based on the power grid fundamental frequency comprises:

[0116] S41, acquiring a voltage signal of a power distribution network, tracking the phase and frequency of the voltage signal in real time through a digital phase-locked loop, and calculating the power grid fundamental frequency;

[0117] S42, acquiring a system sampling frequency, calculating the inner mode period of the frequency self-adaptive repetitive controller according to the power grid fundamental frequency and the system sampling frequency, and the calculation formula is:

[0118] ;

[0119] In the formula, denotes the inner mode period of the frequency adaptive repetitive controller (i.e. the number of system sampling points corresponding to one power grid fundamental period), denotes the system sampling frequency, denotes the power grid fundamental frequency;

[0120] S43, a phase lag characteristic curve of the controlled object at different frequencies stored in advance through offline identification is called, a corresponding phase lag angle is determined from the phase lag characteristic curve according to the power grid fundamental frequency, and a phase advance compensation amount is calculated according to the phase lag angle and the inner mode period, and the calculation formula is:

[0121] ;

[0122] In the formula, denotes the phase advance compensation amount (used to offset the phase lag of the controlled object, in the unit of sampling points), denotes the phase lag angle (the phase lag angle of the controlled object (inverter of the UPQC parallel unit, filter, etc.) at the current power grid fundamental frequency), denotes the inner mode period;

[0123] S44, the inner mode period and the phase advance compensation amount are updated in real time to the inner mode memory and the phase advance compensation module of the frequency adaptive repetitive controller in the feedback channel;

[0124] S45, according to the power grid fundamental frequency, the characteristic harmonic frequency is obtained, and according to the updated parameters of the frequency adaptive repetitive controller, the resonance frequency of the proportional-resonant controller in the feedback channel is adjusted in real time to the characteristic harmonic frequency.

[0125] As described in the above steps S41-S45, the power grid fundamental frequency is tracked in real time by the digital phase-locked loop, and the inner mode period and the phase advance compensation amount of the frequency adaptive repetitive controller are dynamically calculated and updated according to this, and the resonance frequency of the proportional-resonant controller is adjusted at the same time, so as to ensure that the core parameters of the feedback channel always match the current power grid operating state, and avoid the degradation of feedback control performance caused by power grid frequency fluctuation.

[0126] The power grid fundamental frequency is the core reference for determining the harmonic frequency. The characteristic harmonic frequency in the distribution network is an integer multiple of the fundamental frequency. When the power grid fundamental frequency fluctuates due to power output adjustment at the power generation end, load fluctuation, and other factors, the harmonic frequency will change synchronously. The frequency adaptive repetitive controller in the feedback channel relies on the accurate matching of the inner mode period and the power grid fundamental period to suppress periodic harmonics. The proportional resonant controller needs to match the resonant frequency and the target harmonic frequency to achieve high gain suppression. If these parameters do not match, the inner mode period and the actual fundamental period will be mismatched, and the resonant frequency and the harmonic frequency will deviate, resulting in a significant decrease in the suppression effect of the feedback control on harmonics, and even causing system stability risks. Therefore, the present application monitors the power grid fundamental frequency in real time and dynamically adjusts the core parameters of the feedback channel to ensure that the feedback control always adapts to the change in the power grid frequency.

[0127] Specifically, the S41 step obtains the voltage signal of the distribution network, and tracks the phase and frequency of the voltage signal in real time through a digital phase-locked loop to calculate the power grid fundamental frequency. The voltage signal here comes from the voltage sampling module of the distribution network. The line voltage or phase voltage signal of the distribution network is collected through a voltage sensor, and after being processed by a signal conditioning circuit (voltage reduction, filtering, and analog-to-digital conversion), it is converted into a digital signal input to the digital phase-locked loop. The core function of the digital phase-locked loop is to track the phase change of the input voltage signal in real time through a phase comparator, a loop filter, and a voltage-controlled oscillator module, and then calculate the power grid fundamental frequency. The tracking accuracy determines the accuracy of subsequent parameter adjustment. At the same time, to avoid the influence of voltage harmonics on the phase-locked accuracy, a low-pass filter can be added in front of the digital phase-locked loop to filter out high-frequency harmonics in the voltage signal, ensuring that the phase-locked loop only tracks the phase and frequency of the fundamental voltage.

[0128] S42, a system sampling frequency is obtained, and an inner mode period of the frequency adaptive repetitive controller is calculated according to the power grid fundamental frequency and the system sampling frequency. The system sampling frequency is an inherent parameter of the UPQC digital control system and is pre-set in the system design stage (for example, 10 kHz). The system sampling frequency needs to meet the Nyquist sampling theorem to ensure that the signal of the highest order characteristic harmonic (for example, the 13th harmonic) in the power grid can be accurately collected. The calculation logic of the inner mode period is the system sampling frequency divided by the power grid fundamental frequency. The inner mode period represents the number of system sampling points in one power grid fundamental period. For example, when the system sampling frequency is 10 kHz and the power grid fundamental frequency is 50 Hz, the inner mode period is 200 sampling points, which means that the frequency adaptive repetitive controller needs to store 200 sampling points of data to simulate a one-cycle delay. This is the core structure basis for the frequency adaptive repetitive controller to achieve periodic harmonic suppression. If the inner mode period is not adjusted according to the power grid fundamental frequency, the delay period of the frequency adaptive repetitive controller will not match the actual fundamental period, and the periodic harmonic cannot be effectively suppressed. Therefore, the inner mode period is calculated in real time to ensure that the inner mode structure of the frequency adaptive repetitive controller is always synchronized with the current power grid fundamental period.

[0129] In S43, a phase lag characteristic curve of the controlled object at different frequencies is called, a corresponding phase lag angle is determined from the phase lag characteristic curve according to the power grid fundamental frequency, and a phase lead compensation amount is calculated according to the phase lag angle and the inner mode period. The controlled object here refers to the hardware links such as the inverter and the output filter of the UPQC parallel unit. These links will cause the compensation current to lag behind the control signal due to the frequency characteristics of inductors and capacitors. If no phase compensation is performed, the output of the frequency adaptive repetitive controller will not match the phase of the harmonic, affecting the suppression effect and even causing system oscillation. The phase lag characteristic curve is obtained by offline frequency sweeping experiments in the system debugging stage. At different power grid fundamental frequencies, a test signal of a specific frequency is input to the controlled object, and the phase difference between the output signal and the input signal is measured to obtain the phase lag angle corresponding to the different frequencies. The phase lag angle is stored as a characteristic curve. In actual operation, the corresponding phase lag angle is queried from the characteristic curve according to the current power grid fundamental frequency obtained in S41, and the phase lead compensation amount is calculated in combination with the inner mode period calculated in S42. Finally, the calculation result is rounded to ensure that the compensation amount is an integer number of sampling points. For example, when the phase lag angle is 18 degrees and the inner mode period is 200 sampling points, the phase lead compensation amount is 10 sampling points, which means that the output of the frequency adaptive repetitive controller needs to be advanced by 10 sampling points to offset the 18-degree phase lag of the controlled object, so that the compensation current and the harmonic current are in opposite phases, thereby improving the suppression effect.

[0130] S44 updates the inner model period and the phase lead compensation amount in real time to the inner model memory and the phase lead compensation module of the frequency adaptive repetitive controller in the feedback channel. The inner model memory is a storage unit in the frequency adaptive repetitive controller for storing historical sampling data, and the storage depth thereof needs to match the inner model period. When the inner model period is updated, the storage depth of the inner model memory needs to be adjusted synchronously. For example, when the inner model period changes from 200 sampling points to 201 sampling points, the inner model memory needs to add a storage space of 1 sampling point to ensure that the historical data of one fundamental period can be completely stored. The phase lead compensation module is responsible for implementing the phase lead adjustment of the output of the frequency adaptive repetitive controller. When the phase lead compensation amount is updated, the module needs to adjust the position of the data reading pointer. For example, when the compensation amount changes from 10 sampling points to 11 sampling points, the reading position of the data in the inner model memory needs to be advanced by 11 sampling points to implement the phase lead compensation. The real-time update in this step ensures that the core parameters of the frequency adaptive repetitive controller can adapt to the grid frequency change in time, avoiding the degradation of the control performance caused by the delay of parameter update. For example, when the grid fundamental frequency fluctuates continuously, the inner model period and the phase lead compensation amount need to be updated in real time according to the frequency change, so that the frequency adaptive repetitive controller can always maintain the best periodic harmonic suppression effect.

[0131] S45 obtains the characteristic harmonic frequency according to the grid fundamental frequency, and adjusts the resonance frequency of the proportional-resonant controller in the feedback channel to the characteristic harmonic frequency in real time according to the updated parameters of the frequency adaptive repetitive controller. The characteristic harmonic frequency is an integer multiple of the grid fundamental frequency. In combination with the harmonic distribution characteristics of the distribution network, the main characteristic harmonics such as 5th, 7th, 11th and 13th can be selected as the compensation objects. The frequency calculation logic is that the grid fundamental frequency is multiplied by the corresponding harmonic order. For example, when the grid fundamental frequency is 50 Hz, the 5th characteristic harmonic frequency is 250 Hz. The core function of the proportional-resonant controller is to provide high gain to the signal of a specific frequency. Therefore, the resonance frequency of the proportional-resonant controller needs to be matched with the target characteristic harmonic frequency to achieve the best suppression effect. Therefore, when the grid fundamental frequency fluctuates to cause the characteristic harmonic frequency to change, the resonance frequency of the proportional-resonant controller needs to be adjusted synchronously. Meanwhile, since the proportional-resonant controller and the frequency adaptive repetitive controller work in parallel in the feedback channel, both of them need to adapt to the grid frequency change. For example, when the frequency adaptive repetitive controller adjusts the inner model period to adapt to the fundamental period change, the proportional-resonant controller adjusts the resonance frequency to adapt to the characteristic harmonic frequency change, so as to ensure that the feedback channel can effectively suppress the periodic harmonics and the non-periodic disturbances, and avoid the imbalance of the overall performance of the feedback control caused by the adjustment of a single controller parameter.

[0132] This invention achieves real-time calculation of the fundamental frequency of the power grid through a digital phase-locked loop (PLL), and calculates the internal mode period in real time by combining the system sampling frequency, ensuring that the internal mode structure of the frequency adaptive repetitive controller is always synchronized with the current fundamental frequency of the power grid. Furthermore, it obtains the phase lag angle through the offline identified phase lag characteristic curve, calculates and updates the phase lead compensation in real time, and counteracts the phase lag effect of the controlled object. Moreover, by synchronously adjusting the resonant frequency of the proportional resonant controller, it achieves parameter coordination between the frequency adaptive repetitive controller and the proportional resonant controller, ensuring that the feedback channel maintains excellent harmonic suppression performance even under power grid frequency fluctuation scenarios.

[0133] In one embodiment of the present invention, the step of inputting the error component into the feedback channel adjusted by the core parameters to generate a feedback control quantity includes:

[0134] S51, the error component is input to the frequency adaptive repetitive controller in the feedback channel. The periodic harmonic error is suppressed by the internal model structure of the frequency adaptive repetitive controller, and a first intermediate control quantity is output. The transfer function of the frequency adaptive repetitive controller is:

[0135] ;

[0136] In the formula, The transfer function of the frequency adaptive repetitive controller is given. This indicates the gain of the repetitive controller (used to adjust the strength of the repetitive controller's suppression of periodic errors). Indicates delay An operator for each sampling period (implementing the internal model delay function of the repetitive controller). The delay indicates the amount of phase lead compensation. Operator for each sampling period (with phase advance compensation added on top of the delay). This refers to a stability compensator (which can be a low-pass filter characteristic (e.g., a constant of 0.95-0.99) used to suppress high-frequency noise and prevent system oscillations).

[0137] S52, based on the system's compensation requirements for aperiodic disturbances, the error components are simultaneously input into the proportional resonant controller connected in parallel in the feedback channel. The second intermediate control quantity is obtained through discretization using the bilinear transform method. The transfer function of the proportional resonant controller is:

[0138] ;

[0139] In the formula, The transfer function of a proportional resonant controller (describes the gain characteristics of the controller to a signal of a specific frequency). This represents the proportional coefficient of the proportional resonant controller (used for fast response to the DC or low-frequency component of the input error). Indicates the first The resonance coefficient of the second harmonic (used to adjust the controller for the first harmonic) Subharmonic suppression gain This specifically refers to the 5th, 7th, 11th, and 13th characteristic harmonics, which are the main harmonic components of the power distribution network. It indicates the cutoff angular frequency (used to determine the bandwidth of the resonant term, balancing harmonic suppression accuracy and anti-interference capability). Represents the Laplace operator. Indicates the first The angular frequency of the subharmonic (calculated from the fundamental frequency of the power grid) );

[0140] Bilinear Transformation Formula:

[0141] ;

[0142] In the formula, The Laplace operator in the continuous domain (the original operator of the transfer function of the proportional resonant controller, which needs to be converted to the discrete domain). Representing the discrete domain Transformation operator (in the transfer function of the frequency adaptive repetitive controller) Consistent (using a context-appropriate expression here). Indicates the discretization time interval. The discretization core term of the bilinear transformation (converting the differential relation in the continuous domain into the difference relation in the discrete domain).

[0143] S53, the feedback control quantity is obtained by superimposing the first intermediate control quantity and the second intermediate control quantity.

[0144] As described in steps S51-S53 above, the present invention inputs the error components into the frequency adaptive repetitive controller and the proportional resonant controller connected in parallel in the feedback channel. The former suppresses periodic harmonic errors, and the latter responds to non-periodic disturbances. The intermediate control quantities output by the two are then superimposed to generate a feedback control quantity that has both steady-state accuracy and transient disturbance rejection capability, thereby improving the overall harmonic compensation effect.

[0145] The core of feedback control is error correction, that is, adjusting the control quantity by the error component to reduce the deviation, but a single controller is difficult to meet the dual needs of periodic harmonic suppression and non-periodic disturbance response. The frequency adaptive repetitive controller based on the internal model principle has excellent no-static error suppression capability for periodic signals, but it responds slowly to non-periodic disturbances (such as impact harmonics at the moment of load mutation and current fluctuations caused by grid voltage sag). The proportional-resonant controller can quickly generate high gain for specific frequency signals and can quickly suppress non-periodic disturbances and part of non-characteristic harmonics, but it cannot suppress periodic harmonics in a wide range as accurately as the frequency adaptive repetitive controller. Therefore, the application realizes complementary advantages by the parallel structure of the two and the adaptive parameters adjusted by the S4 step.

[0146] Specifically, first, the error component is input to the frequency adaptive repetitive controller in the feedback channel through the S51 step, and the periodic harmonic error is suppressed by the internal model structure of the frequency adaptive repetitive controller to output a first intermediate control quantity. The error component here comes from the final output of the S3 step, that is, the error component in the two-phase stationary coordinate system after Clarke transformation, which has eliminated the three-phase coupling effect and is suitable for direct input to the frequency adaptive repetitive controller. The core of the frequency adaptive repetitive controller is the internal model structure, and its parameters (internal model period, phase lead compensation) have been updated to adapt to the current grid fundamental frequency value through the S4 step. The internal model memory stores one period of error data, and through delaying N sampling periods (internal model period) and superimposing phase lead compensation L, it realizes "repeated learning" and suppression of periodic error. For example, when the error component contains a 5th periodic harmonic, the frequency adaptive repetitive controller stores the historical error data of the harmonic through the internal model structure, and outputs a reverse compensation signal in the next period to gradually offset the harmonic error. At the same time, the transfer function of the frequency adaptive repetitive controller is constructed based on the repetitive controller gain, delay operator and stability compensator parameters. The stability compensator adopts a low-pass filter characteristic (such as Q(z) taking a constant of 0.95-0.99) to suppress high-frequency noise and avoid system oscillation, ensuring stable suppression of periodic error. The final output of the first intermediate control quantity is mainly used to offset the periodic harmonic component in the error component of the S3 step.

[0147] S52 step, according to the compensation demand of the system to the non-periodic disturbance, the error component is input into the parallel proportional-resonant controller in the feedback channel at the same time, and the second intermediate control quantity is obtained by discrete processing through the bilinear transformation method. Synchronized with S51 step, the error component (α-axis and β-axis error component) is input into the proportional-resonant controller, and the resonant frequency of the controller has been adjusted to the characteristic harmonic frequency (such as 5 times, 7 times, etc.) corresponding to the current power grid fundamental frequency through S4 step. The transfer function of the proportional-resonant controller is composed of a proportional coefficient and a plurality of resonant terms, the proportional coefficient is used to quickly respond to the direct current or low frequency component of the error component, and the resonant term generates high gain for a specific harmonic, for example, when a 7th non-periodic harmonic disturbance suddenly appears in the error component, the resonant term corresponding to the 7th harmonic quickly generates high gain output to suppress the disturbance. Since the transfer function of the proportional-resonant controller is initially in continuous domain form, it needs to be converted into discrete domain to adapt to the digital control system. The core of the discretization process is to convert the continuous domain Laplace operator into a discrete domain transform operator, and the transform coefficient is calculated through the discrete time interval (consistent with the system sampling period), so as to ensure that the characteristics of the discretized controller are consistent with the continuous domain design, and avoid introducing additional errors due to discretization. The finally output second intermediate control quantity is mainly used to quickly suppress non-periodic disturbances and non-characteristic harmonics in the error component, and provides transient disturbance rejection capability support.

[0148] S53 step, according to the first intermediate control quantity and the second intermediate control quantity, the feedback control quantity is obtained by superposition. The superposition process is to directly add the control quantities in the same coordinate system (α-axis and β-axis), that is, the α-axis feedback control quantity is equal to the α-axis first intermediate control quantity output by the frequency adaptive repetitive controller plus the α-axis second intermediate control quantity output by the proportional-resonant controller, and the β-axis is the same. This superposition is not a simple signal superposition, but a complementary optimization based on the functional division of the two. When the error component is mainly periodic harmonic, the first intermediate control quantity accounts for a higher proportion, ensuring steady-state accuracy; when non-periodic disturbance occurs, the second intermediate control quantity quickly generates gain to quickly suppress the disturbance. For example, when the power grid fundamental frequency is stable and the error is mainly 5th periodic harmonic, the first intermediate control quantity accurately cancels the harmonic, and the second intermediate control quantity only assists in suppressing a small amount of interference; when the load is suddenly put into operation and non-periodic impact appears in the error, the second intermediate control quantity quickly outputs a compensation signal, and the first intermediate control quantity gradually optimizes the periodic error. After superposition, the two realize more rapid and accurate error correction.

[0149] The application considers the high-precision suppression of periodic harmonic errors and the fast response of non-periodic disturbances through the parallel architecture of the dual controllers with clear functional division; and ensures that the controller parameters are highly matched with the current power grid conditions based on the frequency adaptation parameters updated in the S4 step, thereby avoiding performance degradation caused by parameter mismatch; and the advantages of the two are directly integrated through the superposition of control quantities, and the finally generated feedback control quantity can guarantee both the steady-state compensation accuracy and excellent transient disturbance rejection capability.

[0150] In one embodiment of the application, the step of generating the final control quantity by weighting and fusing the feedforward control quantity and the feedback control quantity, and driving the power switch tube of the UPQC through PWM modulation to complete harmonic compensation includes:

[0151] S61, obtaining a load change index according to the load current signal, and obtaining a feedforward channel weighting coefficient and a feedback channel weighting coefficient according to the load change index;

[0152] S62, weighting and fusing the feedforward control quantity and the feedback control quantity according to the feedforward channel weighting coefficient and the feedback channel weighting coefficient to generate a final control quantity;

[0153] S63, generating a PWM signal with variable duty cycle based on the final control quantity by using a space vector PWM modulation method;

[0154] S64, controlling the switching state of the power switch tube in the UPQC parallel unit inverter through the driving circuit amplification according to the PWM signal;

[0155] S65, adjusting the compensation current output by the UPQC according to the switching state of the power switch tube to complete harmonic compensation.

[0156] As described in steps S61-S65, the application dynamically adjusts the weighting coefficients of the feedforward and feedback channels according to the load change, combines the control quantities of the two through weighting fusion into a final control quantity that takes into account both dynamic response and steady-state accuracy, and then generates a driving signal through space vector PWM modulation to control the UPQC power switch tube to act to adjust the compensation current, thereby ultimately realizing accurate cancellation of the power distribution network harmonics and completing the entire harmonic compensation closed loop.

[0157] The feedforward control quantity and the feedback control quantity each have technical advantages but also limitations: the feedforward control quantity can quickly respond to changes in the harmonic instruction current and is suitable for dealing with transient scenarios such as load mutations, but is easily affected by device parameter drift and line disturbances, and has limited steady-state accuracy; the feedback control quantity is generated based on error correction and can suppress periodic steady-state errors with higher accuracy, but its response speed depends on error accumulation and its transient performance is weak. Therefore, the application combines the two to take into account both dynamic response and steady-state accuracy, and realizes the conversion of control quantity to physical action through the modulation and driving link.

[0158] Specifically, the S61 step obtains a load change index according to the load current signal, and obtains a feedforward channel weighting coefficient and a feedback channel weighting coefficient according to the load change index. The load current signal herein is derived from the three-phase load current signal collected by the current sampling module in the foregoing step, and the load change index is obtained by analyzing the change characteristics of the signal, including a load current mutation rate (a current difference between a current period and a previous period divided by a sampling period) and a total harmonic distortion rate (a ratio of a harmonic current effective value to a fundamental current effective value). For example, when the load is suddenly put into operation, the current mutation rate increases, and the total harmonic distortion rate rises, indicating that the system is in a transient state at this time, and the feedforward channel weight needs to be increased to speed up the response; when the load is in stable operation, the current mutation rate is small, and the total harmonic distortion rate is low, and the feedback channel weight needs to be increased to optimize the steady-state accuracy. The acquisition of the weighting coefficient is realized through a preset mapping relationship. In the system debugging stage, for different load change index corresponding working conditions, the optimal feedforward and feedback weighting coefficient combination (for example, the feedforward coefficient is 0.6-0.7, and the feedback coefficient is 0.3-0.4 in the transient state, and vice versa in the steady state) is determined offline, and is stored as a lookup table. In the running time, the corresponding coefficient in the table is queried according to the real-time calculation of the load change index, so as to ensure that the weighting coefficient can dynamically adapt to the load state.

[0159] The S62 step weights and fuses the feedforward control quantity and the feedback control quantity according to the feedforward channel weighting coefficient and the feedback channel weighting coefficient, to generate a final control quantity. The feedforward control quantity is derived from the output of the adaptive filter in the S2 step, and the feedback control quantity is derived from the superposition of the two intermediate control quantities in the S5 step. Both of them are control quantities in the two-phase static coordinate system (α axis, β axis), and the fusion process is carried out in the same coordinate system. The α axis final control quantity is equal to the α axis component of the feedforward control quantity multiplied by the feedforward weighting coefficient, plus the α axis component of the feedback control quantity multiplied by the feedback weighting coefficient. The same applies to the β axis. This weighted fusion is not a simple superposition, but an advantage complementary based on the working condition demand. For example, when the load mutation causes the feedforward control quantity to respond quickly but has a small deviation, the feedback control quantity responds slowly but has high accuracy. Through reasonable weighting, the final control quantity can retain the rapidity of the feedforward and correct the deviation through the feedback, avoiding the short board of a single control quantity. At the same time, the amplitude and phase of the feedforward and feedback control quantities need to be matched in the fusion process, which depends on the consistency of the coordinate transformation in the foregoing steps (such as Clarke transformation to the αβ coordinate system), to avoid fusion errors caused by coordinate system differences.

[0160] The step S63 adopts a space vector PWM modulation mode to generate a PWM signal with variable duty ratio based on the final control quantity. Compared with the traditional sine wave PWM, the space vector PWM improves the utilization rate of the DC bus voltage (up to 1.15 times) by synthesizing voltage space vectors, and has lower output current harmonic content, which is more suitable for the requirements of UPQC on compensation current quality. The implementation process needs to convert the final control quantity (α-axis and β-axis voltage commands) in the two-phase static coordinate system into a voltage space vector, determine the sector where the vector is located according to the amplitude and phase of the vector, and calculate the action time of the two effective voltage vectors and zero vectors in the sector to ensure that the equivalent voltage matched with the final control quantity is obtained by vector synthesis in one sampling period. For example, when the voltage vector corresponding to the final control quantity is located in the first sector, the action time of the U4 and U6 effective vectors and the U0 and U7 zero vectors in the sector needs to be calculated, and then the action time of each vector is allocated according to the preset switching sequence (such as a seven-segment switching sequence) to generate the PWM duty ratio signals of the three-phase bridge arm power switches. The change of the duty ratio directly corresponds to the change of the amplitude of the voltage vector, so that the modulated signal can accurately reflect the demand of the final control quantity.

[0161] The step S64 controls the switching state of the power switch tube in the UPQC parallel unit inverter through the driving circuit amplification based on the PWM signal. The UPQC parallel unit inverter is usually a three-phase full-bridge topology, which includes six power switch tubes (such as IGBT). The PWM signal is a low-voltage digital signal and cannot directly drive the switch tube to turn on and off, so it needs to be amplified and isolated through a driving circuit. The driving circuit is composed of an optical coupling isolation module, a power amplification module and a protection module. The optical coupling isolation module realizes the electrical isolation between the control circuit and the power circuit to avoid damage to the control chip caused by high-voltage interference. The power amplification module amplifies the PWM signal to a voltage signal (such as 15V driving voltage) that can drive the IGBT gate. The protection module quickly turns off the driving signal when there is an overcurrent, overvoltage or other fault to protect the switch tube. For example, when the PWM signal is high, the driving circuit outputs a 15V voltage to trigger the IGBT to turn on. When the PWM signal is low, the output is 0V to make the IGBT turn off. Through such high-frequency switching action, the inverter can convert the DC bus voltage into an alternating voltage matched with the PWM signal duty ratio, laying a foundation for generating compensation current.

[0162] The step S65 adjusts the compensation current output by the UPQC according to the switching state of the power switch tube, and completes the harmonic compensation. The switching state of the power switch tube directly determines the AC voltage waveform output by the inverter, and the voltage is applied to the filter inductance at the output end of the inverter. According to the voltage-current characteristic (voltage is equal to the inductance value multiplied by the current change rate) of the inductance, the change of the voltage will cause the inductance current to change, thereby adjusting the compensation current output by the UPQC. For example, when the switch tube is turned on, the inverter outputs a forward voltage, and the inductance current increases. When the switch tube is turned off, a reverse voltage or zero voltage is output, and the inductance current decreases. Through the alternating action of the high-frequency switch, the amplitude and phase of the compensation current accurately track the demand of the final control quantity. Finally, the compensation current is injected into the power distribution network, and the harmonic current generated by the load is equal in size and opposite in phase, so that the harmonics are cancelled out, and the entire compensation process is completed. At this time, the current flowing into the power grid only contains the fundamental component, and the power quality is purified, achieving the core goal of UPQC harmonic compensation.

[0163] The step dynamically adjusts the proportion of feedforward and feedback according to the load change through the dynamic weighting coefficient, so that the final control quantity can be flexibly adjusted. Excellent performance can be maintained in both transient and steady state scenarios. The space vector PWM improves the utilization rate of DC voltage, reduces the harmonic content of the compensation current, and reduces the burden of the filter link. The UI and complete drive protection design ensure the safe operation of the power switch tube, improve the system reliability, and ultimately enable the UPQC to quickly respond to load changes and achieve high-precision harmonic compensation in complex power distribution network conditions.

[0164] As shown in Figure 2 The application also provides a UPQC harmonic compensation system based on repetitive control, which comprises:

[0165] A harmonic detection module is configured to acquire a load current signal and a voltage signal of a power distribution network, and extract a harmonic instruction current based on the load current signal.

[0166] A feedforward generation module is configured to input the harmonic instruction current into a feedforward channel constructed based on an adaptive filter, and generate a feedforward control quantity.

[0167] An error calculation module is configured to acquire a compensation current output by a UPQC shunt unit in real time, and calculate an error component between the harmonic instruction current and the compensation current.

[0168] A parameter adjustment module is configured to monitor the fundamental frequency of the power grid in real time through a phase-locked loop, and dynamically adjust the core parameters of a feedback channel constructed based on a frequency adaptive repetitive controller based on the fundamental frequency of the power grid.

[0169] A feedback generation module is configured to input the error component into the feedback channel adjusted by the core parameters, and generate a feedback control quantity.

[0170] The compensation control module is configured to weight and fuse the feedforward control quantity and the feedback control quantity to generate a final control quantity, and drive power switches of the UPQC after PWM modulation to complete harmonic compensation.

[0171] The application further provides a computer device comprising a memory and a processor, and the memory stores a computer program.

[0172] The application further provides a computer readable storage medium, which stores a computer program.

[0173] It should be noted that, in the present document, the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, device, article or method. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, device, article or method comprising the element.

[0174] The above description is only preferred embodiments of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation obtained by using the content of the present application specification and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A UPQC harmonic compensation method based on repetitive control, characterized in that, include: Obtain the load current signal and voltage signal of the power distribution network, and extract the harmonic command current based on the load current signal; The harmonic command current is input to the feedforward channel constructed based on the adaptive filter to generate a feedforward control quantity; Obtain the compensation current output in real time from the UPQC parallel unit, and calculate the error component between the harmonic command current and the compensation current; The fundamental frequency of the power grid is monitored in real time by a phase-locked loop, and the core parameters of the feedback channel constructed based on the frequency adaptive repetitive controller are dynamically adjusted based on the fundamental frequency of the power grid. The error component is input into the feedback channel after the core parameters have been adjusted to generate a feedback control quantity. The feedforward control quantity and the feedback control quantity are weighted and fused to generate the final control quantity, which is then modulated by PWM to drive the power switch of UPQC to complete harmonic compensation.

2. The UPQC harmonic compensation method based on repetitive control according to claim 1, characterized in that, The steps of acquiring the load current signal and voltage signal of the distribution network, and extracting the harmonic command current based on the load current signal include: The load current signal of the distribution network is obtained through a current sampling module, and the load current signal includes three-phase load current signals; The three-phase load current signal is converted into a current component in a two-phase stationary coordinate system by Clarke transformation, and then the current component in the two-phase stationary coordinate system is converted into a current component in a two-phase rotating coordinate system by Park transformation. The current components in the two-phase rotating coordinate system are input to a low-pass filter to extract the fundamental active component and the fundamental reactive component. The fundamental active and reactive components are subjected to inverse Park and inverse Clarke transforms to reconstruct the three-phase fundamental current components. The harmonic command current is obtained by calculating the difference between the three-phase load current signal and the three-phase fundamental current component.

3. The UPQC harmonic compensation method based on repetitive control according to claim 1, characterized in that, The step of inputting the harmonic command current into the feedforward channel constructed based on the adaptive filter to generate the feedforward control quantity includes: The harmonic command current is input as an input signal to an adaptive filter based on the normalized least mean square algorithm. Obtain the current weight coefficient vector of the adaptive filter, and obtain the output signal of the adaptive filter based on the harmonic command current and the current weight coefficient vector; The instantaneous error is obtained based on the harmonic command current and the output signal of the adaptive filter, and is used to adjust the weight coefficients of the adaptive filter. Based on the instantaneous error and the input signal, the weight coefficient vector of the adaptive filter is updated using the normalized least mean square algorithm; The feedforward control quantity is calculated based on the updated weight coefficient vector and the input signal.

4. The UPQC harmonic compensation method based on repetitive control according to claim 1, characterized in that, The steps of obtaining the compensation current output in real time by the UPQC parallel unit and calculating the error component between the harmonic command current and the compensation current include: Based on the topology of the UPQC parallel unit, the compensation current flowing into the power grid is detected in real time by the current sensor to obtain the three-phase compensation current signal. The instantaneous error signal of each phase is calculated based on the harmonic command current and the three-phase compensation current signal; The instantaneous error signals of each phase are converted by Clarke transform to obtain the error components in the two-phase stationary coordinate system.

5. The UPQC harmonic compensation method based on repetitive control according to claim 1, characterized in that, The steps of monitoring the fundamental frequency of the power grid in real time through a phase-locked loop and dynamically adjusting the core parameters in the feedback channel constructed based on the frequency adaptive repetitive controller based on the fundamental frequency of the power grid include: The voltage signal of the distribution network is acquired, and the phase and frequency of the voltage signal are tracked in real time through a digital phase-locked loop to calculate the fundamental frequency of the power grid. Obtain the system sampling frequency, and calculate the internal mode period of the frequency adaptive repetitive controller based on the fundamental frequency of the power grid and the system sampling frequency; The phase lag characteristic curves of the controlled object at different frequencies are called up in advance through offline identification and storage. The corresponding phase lag angle is determined from the phase lag characteristic curve according to the fundamental frequency of the power grid. The phase lead compensation amount is calculated according to the phase lag angle and the internal mode period. The internal model period and the phase lead compensation amount are updated in real time to the internal model memory and phase lead compensation module of the frequency adaptive repetitive controller in the feedback channel. The characteristic harmonic frequency is obtained based on the fundamental frequency of the power grid, and the resonant frequency of the proportional resonant controller in the feedback channel is adjusted to the characteristic harmonic frequency in real time according to the updated parameters of the frequency adaptive repetitive controller.

6. The UPQC harmonic compensation method based on repetitive control according to claim 1, characterized in that, The step of inputting the error component into the feedback channel adjusted by the core parameters to generate the feedback control quantity includes: The error component is input to the frequency adaptive repetitive controller in the feedback channel. The periodic harmonic error is suppressed by the internal model structure of the frequency adaptive repetitive controller, and the first intermediate control quantity is output. Based on the system's compensation requirements for non-periodic disturbances, the error components are simultaneously input into the proportional resonant controller connected in parallel in the feedback channel, and the second intermediate control quantity is obtained by discretization processing through the bilinear transformation method. The feedback control quantity is obtained by superimposing the first intermediate control quantity and the second intermediate control quantity.

7. The UPQC harmonic compensation method based on repetitive control according to claim 1, characterized in that, The step of weightedly fusing the feedforward control quantity and the feedback control quantity to generate the final control quantity, and then driving the power switch of the UPQC after PWM modulation to complete harmonic compensation includes: The load change index is obtained based on the load current signal, and the weighting coefficients of the feedforward channel and the feedback channel are obtained based on the load change index. Based on the weighting coefficients of the feedforward channel and the feedback channel, the feedforward control quantity and the feedback control quantity are weighted and fused to generate the final control quantity; A space vector PWM modulation method is adopted to generate a PWM signal with a variable duty cycle based on the final control quantity; Based on the PWM signal, the switching state of the power switching transistor in the UPQC parallel unit inverter is controlled after being amplified by the drive circuit. Adjust the compensation current output by UPQC according to the switching state of the power switching transistor to complete harmonic compensation.

8. A UPQC harmonic compensation system based on repetitive control, characterized in that, include: The harmonic detection module is used to acquire the load current signal and voltage signal of the power distribution network, and extract the harmonic command current based on the load current signal; The feedforward generation module is used to input the harmonic command current into the feedforward channel constructed based on the adaptive filter to generate the feedforward control quantity. The error calculation module is used to obtain the compensation current output in real time by the UPQC parallel unit and to calculate the error component between the harmonic command current and the compensation current. The parameter adjustment module is used to monitor the fundamental frequency of the power grid in real time through a phase-locked loop, and dynamically adjust the core parameters of the feedback channel constructed based on the frequency adaptive repetitive controller based on the fundamental frequency of the power grid. The feedback generation module is used to input the error component into the feedback channel after the core parameters have been adjusted to generate a feedback control quantity. The compensation control module is used to weight and fuse the feedforward control quantity and the feedback control quantity to generate the final control quantity, and then drive the power switch of UPQC after PWM modulation to complete harmonic compensation.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Repeated controller with frequency adaptive capability, and control method

    CN105137757A

  • Photovoltaic inverter harmonic suppression method based on improved PI+ repetition control

    CN109687460A