A harmonic compensation and control method and system for a large-capacity current source

By performing harmonic compensation and control of large-capacity current sources, using nonlinear adjustment PID controller and harmonic compensation algorithm, the problem of low-order harmonics in the output current of large-capacity current source is solved, the quality and response speed of the output current are improved, and the reliability of the test process is ensured.

CN115395766BActive Publication Date: 2025-08-26WENZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211128305.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-16
Publication Date
2025-08-26
Estimated Expiration
2042-09-16

AI Technical Summary

Technical Problem

There are a large number of low-order harmonics in the output current of large-capacity current source that cannot be filtered out by low-pass filters, and the prior art cannot effectively suppress it.

Method used

By detecting the output current, performing single-period significant value calculation and fast Fourier transformation, calculating the amplitude and phase of the harmonic current, calculating the modulation ratio using the nonlinear tuned PID controller, generating a harmonic compensation array and a sinusoidal modulation array, generating a control signal to control the converter's output bus voltage, and generating a high-voltage sine wave through the LCR low-pass filter and upstream transformer.

Benefits of technology

It improves the response speed and accuracy of the output current of the large current constant current source, effectively eliminates harmonics in the output current, and ensures the quality of the load current and the reliability of the test process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115395766B_ABST
    Figure CN115395766B_ABST
Patent Text Reader

Abstract

The present invention relates to a harmonic compensation and control method and system for a large-capacity current source. By applying a nonlinearly tuned PID algorithm to the large-capacity current source, the response speed and accuracy of the output current of the large-capacity current source are improved. By performing real-time harmonic compensation on the output current of the large-capacity current source, the quality of the output current of the large-capacity current source is improved. In addition, since the harmonic compensation algorithm has good real-time performance, the harmonic interference caused by changes in device characteristics and load characteristics during actual use of the large-capacity current source can be reduced, thereby ensuring the reliability of the use of the large-capacity current source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power supply control, and in particular to a harmonic compensation and control method and system for a large-capacity current source. Background Art

[0002] Large-capacity current sources are widely used in type testing of low-voltage electrical appliances, such as fuses, leakage protectors, molded case circuit breakers, and other electrical products, as well as low-voltage switchgear and control equipment assemblies composed of multiple low-voltage electrical products. Large-capacity current sources are core components for electrical performance testing or examination, and their accuracy, stability, and output current quality directly impact test results. However, due to the use of digital controllers, the dead-zone effects inherent in the inverter structure of large-capacity current sources, and changes in their device characteristics during long-delay load testing, the output current harmonics are simultaneously affected by multiple nonlinear factors, resulting in the output current containing a large number of low-order harmonics that cannot be filtered out by low-pass filters.

[0003] To improve the output current quality of bulk current sources, domestic and international researchers have conducted extensive research on current source harmonic suppression methods, which can be roughly divided into two categories: controller use and filter design. However, neither method can suppress the low-order harmonics of bulk current source output current.

[0004] Therefore, to address the above problems, a harmonic compensation and control method and system for a large-capacity current source are proposed. Summary of the Invention

[0005] In view of the above-mentioned deficiencies in the prior art, the object of the present invention is to provide a harmonic compensation and control method and system for a large-capacity current source to solve the above-mentioned problems.

[0006] The present invention provides a harmonic compensation and control method for a large-capacity current source, which includes:

[0007] Detect and obtain the output current of the large-capacity current source;

[0008] Performing single-cycle effective value calculation on the output current to obtain a detection current;

[0009] Calculating a current difference between a preset output current and the detection current;

[0010] Performing a fast Fourier transform on the output current to obtain the amplitude and phase of the 1st, 3rd, 5th, and 7th harmonic currents;

[0011] Performing a nonlinear PID adjustment calculation based on the current difference to obtain a modulation ratio;

[0012] generating a harmonic compensation array according to the amplitude and phase of the harmonic current;

[0013] Generate a sine modulation array according to the standard sine array and the harmonic compensation array;

[0014] generating a control signal according to the modulation ratio and the sinusoidal modulation array; wherein the control signal acts on a control converter to generate a bus voltage;

[0015] The bus voltage is filtered by an LCR low-pass filter to generate a high-voltage sine wave.

[0016] The high voltage sine wave acts on the load through the current-boosting transformer to generate output current.

[0017] In one embodiment, performing a fast Fourier transform on the output current specifically includes: performing a fast Fourier transform (FFT) on the output current using a fast Fourier transform (FFT) function provided by the digital controller.

[0018] In one embodiment, the digital controller is an STM32F4 series single chip microcomputer.

[0019] In one embodiment, the modulation ratio and the sinusoidal modulation array generate a control signal, which is specifically implemented using an SPWM (Sinusoidal Pulse Width Modulation) control algorithm.

[0020] In one embodiment, a harmonic compensation and control system for a large-capacity current source includes: an output current acquisition module, an effective value calculation module, a fast Fourier transform module, a current difference calculation module, a nonlinear adjustment PID calculation module, a harmonic compensation array generation module, a sinusoidal modulation array generation module, a control signal generation module, a converter, an LCR low-pass filter, and a current boost transformer; wherein,

[0021] The output current acquisition module is used to detect and obtain the output current of the large-capacity current source;

[0022] The effective value calculation module is used to calculate the effective value of the output current of the large-capacity current source in a single cycle to obtain the detection current;

[0023] The fast Fourier transform module is used to obtain the amplitude and phase of the 1st, 3rd, 5th and 7th harmonic currents according to the output current of the large-capacity current source obtained by the output current acquisition module;

[0024] The current difference calculation module is used to calculate the current difference between the preset output current and the detection current obtained by the effective value calculation module;

[0025] The nonlinear adjustment PID calculation module is used to calculate the modulation ratio according to the current difference obtained by the current difference calculation module;

[0026] The harmonic compensation array generation module is used to generate a harmonic compensation array according to the amplitude and phase of the harmonic current obtained by the fast Fourier transform module;

[0027] The sinusoidal modulation array generation module is used to generate a sinusoidal modulation array according to the standard sinusoidal array and the harmonic compensation array;

[0028] The control signal generating module is used to generate a control signal based on the modulation ratio calculated by the nonlinear adjustment PID calculation module and the sinusoidal modulation array generated by the sinusoidal modulation array generating module.

[0029] The converter is used to generate a bus voltage according to the control signal generated by the control signal generating module.

[0030] The LCR low-pass filter is used to generate a high-voltage sine wave according to the bus voltage generated by the converter.

[0031] The current boosting transformer is used to generate an output current according to the high voltage sine wave generated by the LCR low-pass filter. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 is a flow chart of a harmonic compensation and control method for a large-capacity current source according to an embodiment of the present invention;

[0033] Figure 2 is a schematic diagram of a harmonic compensation and control method for a large-capacity current source according to an embodiment of the present invention;

[0034] Figure 3 is a block diagram of a harmonic compensation and control system for a large-capacity current source according to an embodiment of the present invention;

[0035] Figure 4 This is a comparison chart of the output current of a large-capacity current source before and after applying the nonlinear tuning PID algorithm;

[0036] Figure 5 This is the harmonic distribution diagram of the output current of the large-capacity current source before and after applying the harmonic compensation algorithm. DETAILED DESCRIPTION

[0037] Figure 1 FIG. 1 is a flow chart of a method for harmonic compensation and control of a large-capacity current source according to an embodiment of the present invention. Figure 1 As shown, the harmonic compensation and control method of the large-capacity current source may include:

[0038] S101: Detect and obtain output current.

[0039] An output current may be detected and obtained, and the output current may be a current at an output end of a current-boosting transformer.

[0040] S102: Calculate the single-cycle effective value of the output current to obtain a detection current.

[0041] The output current can be calculated for a single cycle effective value. Specifically, calculating the effective value of the current is to calculate its root mean square value. According to the definition of the effective value of a periodic continuous function, the effective value of any periodic function f(x) is:

[0042]

[0043] Where T is the period of the f(x) function.

[0044] The result of sampling a continuous function is a discrete time function. When calculating, the integral of the continuous function needs to be converted into the sum of discrete quantities. Therefore, the expression for calculating the effective value of current is:

[0045]

[0046] Among them, F is the effective value of current; N is the total number of sampling points within one cycle; f n is the program sampling value of the current at point n.

[0047] S103: Performing a fast Fourier transform on the output current to obtain the amplitudes and phases of the 1st, 3rd, 5th, and 7th harmonic currents.

[0048] The output current is fast Fourier transformed to obtain the amplitude and phase of the 1st, 3rd, 5th and 7th harmonic currents. Specifically, the output current is fast Fourier transformed using the FFT function of the digital controller to obtain the amplitude and phase of the harmonic current. The FFT function in the DSP library of the digital controller STM32F4 series microcontroller is used to analyze the collected output current data and calculate the amplitude of the 1st, 3rd, 5th and 7th harmonics of the output current. THD (k) and phase w k (where k = 1, 3, 5, 7).

[0049] S104: Calculating a current difference between a preset standard current and the detection current.

[0050] A current difference between a preset standard current and the detection current may be calculated.

[0051] S105: Calculate a modulation ratio M according to the current difference.

[0052] According to the current difference, the modulation ratio M can be calculated. Specifically, the digital controller calculates the modulation ratio M according to the current difference ΔI through a nonlinearly regulated PID calculation program.

[0053] The nonlinear PID calculation program adjusts the proportional coefficient K of the PID controller according to the current difference ΔI P , integral coefficient K i and differential coefficient K d When ΔI is large, the proportional coefficient K P Should be larger, and at the same time, in order to reduce the overshoot, when the current difference ΔI gradually decreases, the proportional coefficient K P When the current difference ΔI increases in the reverse direction due to overshoot, K P should gradually increase, therefore, the proportional coefficient K P The following nonlinear function can be constructed between the current difference ΔI:

[0054] K p =a p +b p (1-sech(c p *ΔI))

[0055] Among them, a p 、b p 、c p are all positive real constants, adjust c p The size of K can be adjusted p The rate of change.

[0056] For the integral coefficient K i For example, when ΔI is large, in order to prevent the occurrence of oscillation, K i Should be relatively small in order to reduce overshoot; when ΔI is small, it is hoped that K i Increase to eliminate the steady-state error of the system. Therefore, the integral coefficient K i The following nonlinear function can be constructed between the current difference ΔI:

[0057] K i =a i sech(c i *ΔI)

[0058] Among them, a i 、c i are all positive real constants.

[0059] For the differential coefficient K d In order to reduce the space occupied by the system calculation program and to ensure the processing speed of the digital controller, the differential coefficient K is fixed. d , only for K p , K i Perform dynamic tuning.

[0060] The present invention adopts a digital PID controller. The digital PID controller needs to be discretized. This design adopts a discretized incremental PID. The discretized incremental PID formula is:

[0061] u(n)=K p [ΔI(n)-ΔI(n-1)]+K i ΔI(n)+K d [ΔI(n)-2ΔI(n-1)+ΔI(n-2)]

[0062] Where u(n) is the output of the PID controller, ΔI(n) is the nth current difference, ΔI(n-1) is the (n-1)th error, and ΔI(n-2) is the (n-2)th current difference.

[0063] The modulation ratio M(n-1) of the (n-1)th period is added to the output u(n) of the PID controller of the nth period to calculate the modulation ratio M(n) of the nth period.

[0064] S106: Generate a harmonic compensation array according to the amplitude and phase of the harmonic current.

[0065] According to the amplitude and phase of the harmonic current, a harmonic compensation array can be generated. Specifically, the digital controller uses the harmonic compensation function T k Calculate the 1st, 3rd, 5th, and 7th harmonic compensation arrays B respectively THD (1) B THD (3) B THD (5) B THD (7), harmonic compensation function T k for:

[0066]

[0067] Among them, T k is the kth harmonic compensation function, A SIN is a standard sine array, max(A SIN ) is the amplitude of the standard sine array.

[0068] S107: Generate a sine modulation array according to the standard sine array and the harmonic compensation array.

[0069] A sine modulation array can be generated based on the standard sine array and the harmonic compensation array. Specifically, the sine modulation array can be obtained by subtracting the harmonic compensation array from the standard sine array. The formula for generating the modulation array is:

[0070] C MOD =A SIN -BTHD(n)

[0071] Among them, C MOD is a sinusoidal modulation array, B THD(n) The nth harmonic compensation array.

[0072] S108: Generate a control signal according to the modulation ratio and the sinusoidal modulation array.

[0073] According to the modulation ratio and the sinusoidal modulation array, a control signal can be generated. Specifically, an SPWM control algorithm can be used for implementation. The digital controller STM32F4 series single-chip microcomputer (Micro Control Unit, MCU) has a pulse width modulation (Pulse-Width Modulation, PWM) wave output function. The PWM wave output mode of the MCU is set to count up, and the capture / compare register (Capture / Compare Register, CCR) stores the set value. When the counter (Count, CNT) count is less than the CCR storage set value, the logic output is a low level. When the CNT count is greater than the CCR storage set value, the logic output is a high level. According to the area equivalence method, the MCU loads the sine function into the CCR register to realize the output pulse width of the SPWM wave with sinusoidal transformation. In the present invention, the MCU combines the modulation ratio M with the sinusoidal modulation array C MOD The values ​​in are multiplied one by one and then loaded into the CCR register, and the SPWM wave control signal is generated in this cycle.

[0074] The control signal can be applied to a converter to control the converter to output a bus voltage. The bus voltage is filtered by an LCR low-pass filter to generate a high-voltage sine wave. The high-voltage sine wave can be applied to a current-boosting transformer to cause the current-boosting transformer to output current.

[0075] Figure 2 FIG is a schematic diagram of a harmonic compensation and control method for a large-capacity current source according to an embodiment of the present invention. Figure 2 As shown in the figure, I ref Can represent the preset output current; I load It can represent the detection current. The detection current is the single-cycle effective value of the output current obtained by output current sampling and effective value calculation. The difference between the preset output current and the detection current can be processed by the nonlinear PID controller to obtain the modulation ratio, which can be represented by M. SIN Represents the standard sine array; B THD The difference between the standard sine array and the harmonic compensation array is the sine modulation array, which can be expressed as C MODRepresents. The modulation ratio is multiplied by the sinusoidal modulation array to generate a control signal. The control signal is used to control the output bus voltage of the converter. The bus voltage is filtered by a low-pass filter to generate a high-voltage sine wave. The high-voltage sine wave is boosted by a current-boosting transformer to generate an output current. By applying a nonlinearly adjusted PID controller to a large-current constant-current source, the response speed and accuracy of the output current of the large-current constant-current source are improved. By performing harmonic analysis on the output current to obtain a harmonic compensation array, and adding the harmonic compensation array inversely to the standard sinusoidal array, low-order harmonics generated by the use of a digital controller, the dead zone effect of the inverter structure itself in the large-capacity current source, and the changes in the characteristics of the device itself during the long-delay test of the large-capacity current source can be compensated in real time, thereby ensuring the quality of the output current provided by the large-capacity current source to the load. On the other hand, during the implementation process, since the loads carried by the current source during use are all resistive and inductive loads, long-term testing will cause the harmonics of the load current to continue to change; since the harmonic compensation and control method of the large-capacity current source of the present application has good real-time performance, the quality of the load current output by the large-capacity current source can be guaranteed during the entire test process.

[0076] From the above description, it can be seen that the embodiments of the present invention achieve the following technical effects: the application of the nonlinearly adjusted PID controller to the large current constant current source improves the response speed and accuracy of the output current of the large current constant current source. The harmonic compensation algorithm is used to perform harmonic analysis and compensation on the output current of the large current source, which can effectively eliminate the harmonics in the output current, thereby improving the current quality of the output current of the large current source. On the other hand, since the harmonic compensation algorithm has good real-time performance, it can reduce the harmonic interference caused by the transformation of device characteristics and load characteristics of the large-capacity current source during actual use, thereby ensuring the reliability of the use of the large current source.

[0077] Based on the same inventive concept, an embodiment of the present invention further provides a harmonic compensation and control system for a large-capacity current source, as described in the following embodiments. Since the principle of solving the problem by the harmonic compensation and control system of a large-capacity current source is similar to the harmonic compensation and control method of a large-capacity current source, the implementation of the harmonic compensation and control system of a large-capacity current source can refer to the implementation of the harmonic compensation and control method of a large-capacity current source, and the repeated parts will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and conceivable. Figure 3 is a block diagram of a harmonic compensation and control system for a large-capacity current source according to an embodiment of the present invention, such as Figure 3As shown, the system may include: an output current acquisition module 301, a fast Fourier transform module 302, an effective value calculation module 303, a harmonic compensation array generation module 304, a current difference calculation module 305, a sinusoidal modulation array generation module 306, a nonlinear adjustment PID calculation module 307, a control signal generation module 308, a converter 309, an LCR low-pass filter 310 and a current boost transformer 311; wherein,

[0078] The output current acquisition module 301 can be used to detect and obtain the current output by the current boosting transformer 311 .

[0079] The fast Fourier transform module 302 may be configured to perform a fast Fourier transform on the output current acquired by the output current acquisition module 301 to obtain the amplitude and phase of the harmonic current.

[0080] The effective value calculation module 303 may be configured to perform single-cycle effective value calculation on the output current obtained by the output current acquisition module 301 to obtain a detection current.

[0081] The harmonic compensation array generation module 304 may be configured to generate a harmonic compensation array according to the amplitude and phase of the harmonic current obtained by the fast Fourier transform module 302 .

[0082] The current difference calculation module 305 may be used to calculate the current difference between the preset output current and the detection current obtained by the effective value calculation module 303 .

[0083] The sinusoidal modulation array generation module 306 may be configured to generate a sinusoidal modulation array based on the harmonic compensation array and the standard sinusoidal array obtained by the harmonic compensation array generation module 304 .

[0084] The nonlinearly tuned PID calculation module 307 may be configured to generate a modulation ratio according to the current difference obtained by the current difference calculation module 305 .

[0085] The control signal generating module 308 may be configured to generate a control signal based on the modulation ratio calculated by the nonlinearly tuned PID calculating module 307 and the sinusoidal modulation array obtained by the sinusoidal modulation array generating module 306 .

[0086] The converter 309 may be configured to generate a bus voltage according to the control signal obtained by the control signal generating module 308 .

[0087] The LCR low-pass filter 310 may be configured to generate a high voltage sine wave according to the bus voltage generated by the converter 309 .

[0088] The current boosting transformer 311 may be configured to generate an output current according to the high voltage sine wave generated by the low-pass filter 310 .

[0089] Depend on Figure 4 It can be seen that the fourth cycle of the large-capacity current source output can reach the preset current value, and the constant current output is achieved and stable compared to the 13th cycle before optimization. Its response time is shortened, and the overshoot phenomenon is significantly improved. The waiting time in detecting the circuit breaker protection characteristics is significantly shortened, and the product testing efficiency is improved.

[0090] like Figure 5 As shown in the figure, the output current of a large-capacity current source was measured using an oscilloscope, and the data was exported for harmonic analysis in Matlab software. The analysis results show that after using the harmonic compensation algorithm, the total harmonic distortion (THD) of the output current was reduced from 5.27% to 1.81%, achieving excellent harmonic compensation results.

[0091] Obviously, those skilled in the art should understand that the various modules or steps of the above-mentioned embodiments of the present invention can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present invention are not limited to any specific combination of hardware and software.

[0092] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Various modifications and variations are possible in the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A harmonic compensation and control method for a large-capacity current source, characterized in that: include: S1, detect and obtain the output current of the current source; S2, calculates the single-cycle effective value of the current source output current to obtain the detection current; S3, calculating the current difference between the preset output current and the detection current; S4, performing fast Fourier transform calculation on the output current of the current source to obtain the amplitude and phase of the 1st, 3rd, 5th and 7th harmonic currents of the output current of the current source; S5, performing nonlinear PID adjustment calculation on the current difference to obtain the modulation ratio; S6, calculating based on the obtained harmonic current amplitude and phase to obtain a harmonic compensation array; S7, calculating based on the standard sine array and the harmonic compensation array to obtain a sine modulation array; S8, generating a control signal using an SPWM control algorithm according to the modulation ratio and the sinusoidal modulation array; S9, the control signal is used to control the converter to generate a bus voltage; S10, the bus voltage is filtered by an LCR low-pass filter to generate a high-voltage sine wave; the high-voltage sine wave acts on the load through a current-boosting transformer to generate an output current; The modulation ratio in S5 is calculated by the PID calculation program by adjusting the proportional coefficient KP, integral coefficient Ki and differential coefficient Kd of the PID controller according to the current difference ΔI; The following nonlinear function can be constructed between the proportional coefficient KP and the current difference ΔI: K p =a p +b p (1-six(c p *ΔI)); Among them, ap, bp, and cp are all positive real constants. Adjusting the size of cp can adjust the rate of change of Kp. The following nonlinear function can be constructed between the integral coefficient Ki and the current difference ΔI: K i =a i themselves(c i *ΔI); Among them, ai and ci are both positive real constants; The discretized incremental PID formula is: u(n)=K p [ΔI(n)-ΔI(n-1)]+K i ΔI(n)+K d [ΔI(n)-2ΔI(n-1)+ΔI(n-2)]; Where u(n) is the output of the PID controller, ΔI(n) is the nth current difference, ΔI(n-1) is the (n-1)th error, and ΔI(n-2) is the (n-2)th current difference; The modulation ratio M(n-1) of the (n-1)th cycle is added to the output u(n) of the PID controller of the nth cycle to calculate the modulation ratio M(n) of the Nth cycle. The initial modulation ratio is set and the modulation ratio is continuously updated according to the PID control to achieve the output current stable at the set value. The harmonic compensation data in S6 is generated by calculating the amplitude and phase of the harmonic current; Specifically, the digital controller uses the harmonic compensation function T k Calculate the 1st, 3rd, 5th, and 7th harmonic compensation arrays B respectively THD (1) B THD (3) B THD (5) B THD (7), harmonic compensation function T k for: Among them, T k is the kth harmonic compensation function, A SIN is a standard sine array, max(A SIN ) is the amplitude of the standard sine array.

2. The harmonic compensation and control method of a large-capacity current source according to claim 1, characterized in that: The method also includes calculating the single-cycle effective value of the output current of the current source, specifically including: using a digital controller to calculate the effective value of the discrete time function.

3. The harmonic compensation and control method of a large-capacity current source according to claim 1, characterized in that: A nonlinear PID calculation is performed on the current difference, and adjustment parameters of the PID controller are adjusted online according to the current difference at different moments.

4. The harmonic compensation and control method of a large-capacity current source according to claim 1, characterized in that: The harmonic current amplitude and phase are calculated to obtain the harmonic compensation array, which is implemented through the harmonic compensation algorithm.

5. The harmonic compensation and control method of a large-capacity current source according to claim 1, characterized in that: A control signal is generated according to the modulation ratio and the sinusoidal modulation array, and is specifically implemented by a sinusoidal pulse width modulation control algorithm.

6. The harmonic compensation and control method of a large-capacity current source according to claim 5, characterized in that: In S7, a sine modulation array is generated according to the standard sine array and the harmonic compensation array; Specifically, the sine modulation array can be obtained by subtracting the harmonic compensation array from the standard sine array. The formula for generating the modulation array is: C MOD =A SIN -B THD(n) Among them, C MOD is a sinusoidal modulation array, B THD(n) The nth harmonic compensation array.

7. The harmonic compensation and control method of a large-capacity current source according to claim 6, characterized in that: In S8, a control signal is generated according to the modulation ratio and the sinusoidal modulation array; Specifically, the SPWM control algorithm is adopted. The digital controller STM32F4 series microcontroller has a pulse width modulation wave output function. The PWM wave output mode of the MCU is set to up counting, and the capture / compare register stores the set value. When the counter count is less than the CCR storage set value, the logic output is a low level. When the CNT count is greater than the CCR storage set value, the logic output is a high level. According to the area equivalence method, the MCU loads the sine function into the CCR register to realize the SPWM wave with the output pulse width following the sine transformation.

8. A harmonic compensation and control system for a large-capacity current source, characterized in that: include: Output current acquisition module, fast Fourier transform module, effective value calculation module, harmonic compensation array generation module, current difference calculation module, sinusoidal modulation array generation module, nonlinear adjustment PID calculation module, control signal generation module, converter, LCR low-pass filter and current boost transformer; among which: The output current acquisition module is used to detect and obtain the output current of the large-capacity current source; The effective value calculation module is used to calculate the effective value of a single cycle of the output current of the large-capacity current source to obtain the detection current. According to the definition of the effective value of a periodic continuous function, the effective value of any periodic function f(x) is: Where T is the period of the f(x) function, The expression for calculating the effective value of current is: Among them, F is the effective value of current; N is the total number of sampling points within one cycle; f n is the program sampling value of the current at point n; The fast Fourier transform module is used to obtain the amplitude and phase of the 1st, 3rd, 5th and 7th harmonic currents according to the output current of the large-capacity current source obtained by the output current acquisition module; the output current is fast Fourier transformed using the FFT function provided by the digital controller to obtain the amplitude and phase of the harmonic current; the FFT function in the DSP library of the digital controller STM32F4 series single-chip computer is used to analyze the collected output current data and calculate the amplitude of the 1st, 3rd, 5th and 7th harmonics of the output current. THD (k) and phase w k (where k = 1, 3, 5, 7); The current difference calculation module is used to calculate the current difference between the preset output current and the detection current obtained by the effective value calculation module; The nonlinear adjustment PID calculation module is used to calculate the modulation ratio according to the current difference obtained by the current difference calculation module; The harmonic compensation array generation module is used to generate a harmonic compensation array according to the amplitude and phase of the harmonic current obtained by the fast Fourier transform module; The sinusoidal modulation array generation module is used to generate a sinusoidal modulation array according to a standard sinusoidal array and the harmonic compensation array; The control signal generating module is configured to generate a control signal according to the modulation ratio calculated by the nonlinear adjustment PID calculating module and the sinusoidal modulation array generated by the sinusoidal modulation array generating module; The converter is configured to generate a bus voltage according to the control signal generated by the control signal generating module; The LCR low-pass filter is used to generate a high voltage sine wave according to the bus voltage generated by the converter; The current boosting transformer is used to generate an output current according to the high voltage sine wave generated by the LCR low-pass filter; S102: Calculating a single-cycle effective value of the output current to obtain a detection current; According to the definition of the effective value of a periodic continuous function, the effective value of any periodic function f(x) is: Where T is the period of the f(x) function; The result of sampling a continuous function is a discrete time function. When calculating, the integral of the continuous function needs to be converted into the sum of discrete quantities. The expression for calculating the effective value of current is: Among them, F is the effective value of current; N is the total number of sampling points within one cycle; f n is the program sampling value of the current at point n.

Citation Information

Patent Citations

  • Grid power quality control system and method based on unified power quality conditioner

    CN106451466A

  • Device for providing load compensation and harmonic mitigation in an alternating current power system

    IN201821003085A