A dynamic collaborative compensation control method and device for micro-grid power quality
Patent Information
- Application Number
- CN202611094663.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]本发明的目的在于提出了一种针对微电网电能质量的动态协同补偿控制方法及装置,旨在解决现有在微电网环境下,无法根据电网实时需求动态分配容量的问题
将谐波补偿、无功补偿设置为两条并行独立的参考指令运算支路,通过动态权重分配控制器实现两路补偿指令的容量灵活分配,控制架构模块化程度高,既可以实现谐波、无功同步协同补偿,也可按需单独投入单一补偿模式;模块化的控制架构便于后续拓展不平衡电流抑制、电压暂降治理等多类电能质量治理功能,适配光伏、风电、工业园区等多类型微电网应用场景,具备良好的工程推广价值。采用矢量比例积分控制算法对并网补偿电流进行无静差闭环调节,相较于传统 PI 控制,能够对交流谐波、无功类周期性电流指令实现零稳态误差跟踪,显著提升复杂畸变电网下的补偿控制精度;同时设置全链路全局反馈机制,将微电网母线电压、逆变器实际并网电流周期性回送至信号采集输入端,可实时抑制负载突变、新能源随机出力、电网电压畸变、器件温漂、采样噪声带来的控制偏差,降低现场控制参数整定调试工作量,提升装置在微电网复杂随机工况下的动态响应速度与抗干扰能力。以总谐波畸变率为一级强制判定指标、功率因数为二级经济判定指标,优先保障谐波指标合规,再优化无功功率因数,能够根据微电网实时运行工况自适应切换谐波优先、无功优先两种补偿模式,动态调整谐波补偿权重系数与无功补偿权重系数;避免了传统固定权重方式下单一指标治理不达标的缺陷,又可防止权重频繁微调引发的并网电流扰动、系统谐振振荡问题,在满足电力行业强制谐波标准的前提下,最大化利用装置额定容量实现谐波、无功协同精准治理,大幅降低微电网线路损耗与供电考核罚款风险。
Smart Images

Figure CN122968982A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power grid management technology, and in particular to a dynamic collaborative compensation control method and device for power quality of microgrids. Background Technology
[0002] Current microgrid power quality management primarily relies on active power filters (APFs) or static var compensators (SVGs). Existing technologies typically employ methods based on instantaneous reactive power theory (ip). Harmonic detection is performed using the IQ method. By detecting the load current and extracting its harmonic components, the inverter is controlled to generate a compensation current of equal magnitude but opposite direction to cancel the harmonics. Existing solutions mostly use traditional PI regulators to perform closed-loop control of the fundamental reactive current to maintain the power factor at the grid connection point.
[0003] In microgrid environments, distributed generation (DER) switching is frequent, and traditional detection methods (such as IP based on low-pass filters) are insufficient. The IQ method suffers from sampling delays, leading to decreased compensation accuracy under complex operating conditions and even causing system oscillations. When the system simultaneously faces high-order harmonic pollution and severe reactive power fluctuations, existing equipment often prioritizes harmonic or reactive power mitigation, lacking an intelligent coordination algorithm that can dynamically allocate capacity based on real-time grid demand, resulting in low equipment utilization. Microgrids exhibit significant weak grid characteristics, with large grid impedance fluctuations. Existing PI control parameters are fixed, easily leading to insufficient system stability margins when impedance changes. Summary of the Invention
[0004] The purpose of this invention is to propose a dynamic collaborative compensation control method and device for power quality in microgrids, which aims to solve the problem that existing microgrids cannot dynamically allocate capacity according to the real-time demand of the power grid.
[0005] To achieve one, some, or all of the above objectives, or other objectives, in a first aspect, the present invention proposes a dynamic collaborative compensation control method for power quality in microgrids, the method comprising: The bus voltage signal and load current signal of the input side of the microgrid under control are collected, and the harmonic current component and reactive current component are extracted from the load current signal to generate harmonic compensation reference command for the harmonic current component and reactive compensation reference command for the reactive current component. The total harmonic distortion rate of the microgrid under control is calculated based on the bus voltage signal, and the load power factor of the microgrid under control is calculated based on the bus voltage signal and the load current signal. Based on the total harmonic distortion rate and the load power factor, a first weight data for the total harmonic distortion rate and a second weight data for the load power factor are determined according to a preset weighting rule. The harmonic compensation reference instruction is corrected according to the first weight data to obtain the harmonic compensation current given signal, and the reactive power compensation reference instruction is corrected according to the second weight data to obtain the reactive power compensation current given signal. The harmonic compensation current given signal and the reactive power compensation current given signal are superimposed to obtain the total compensation current given signal, and the current deviation between the total compensation current given signal and the actual feedback compensation current is calculated. The current deviation is adjusted by a closed-loop system with zero static error to obtain a three-phase modulation voltage command signal. A drive pulse signal is then generated based on the three-phase modulation voltage command signal to complete the compensation of the power quality of the microgrid under control.
[0006] Optionally, the step of calculating the total harmonic distortion rate of the microgrid under control based on the bus voltage signal includes: The bus voltage signal is subjected to a discrete Fourier transform to separate the fundamental voltage component and the harmonic components of the bus voltage signal. The effective value of the fundamental voltage is calculated based on the fundamental voltage component, and the total effective value of the harmonics is calculated based on the harmonic components. The ratio of the total effective value of harmonics to the effective value of the fundamental voltage is taken as the total harmonic distortion rate of the microgrid under control.
[0007] Optionally, the step of calculating the load power factor of the microgrid under control based on the bus voltage signal and the load current signal includes: Extract the first fundamental phase of the bus voltage signal and the second fundamental phase of the load current signal, and calculate the phase difference between the first fundamental phase and the second fundamental phase; Calculate the phase difference value and obtain the cosine value to get the power factor of the current load; Alternatively, the active power and apparent power for the microgrid under control can be obtained by integrating the bus voltage signal and the load current signal, and the ratio of active power to apparent power can be used as the load power factor.
[0008] Optionally, the step of determining first weighted data for the total harmonic distortion (THD) and second weighted data for the load power factor according to a preset weighting rule based on the THD and the load power factor includes: Based on the comparison result of the total harmonic distortion rate with a preset first threshold, and the comparison result of the load power factor with a preset second threshold, the first weight data and the second weight data are determined according to a preset weighting rule, so that: When the total harmonic distortion rate is greater than the first threshold, the first weight data is assigned a higher weight data than the second weight data; When the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is greater than the second threshold, the second weight data is assigned to be greater than the first weight data. When the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is less than or equal to the second threshold, the first weight data is assigned equal to the second weight data.
[0009] Optionally, the step of assigning the first weight data to be greater than the second weight data when the total harmonic distortion rate is greater than the first threshold includes: The step size adjustment of the first weight data is determined based on the ratio of the absolute value of the difference between the total harmonic distortion rate and the first threshold to the first threshold. When the ratio of the absolute value of the difference to the first threshold is greater than the first preset deviation threshold, the updated first weight data is obtained by accumulating the current value of the first weight data using a large step adjustment. When the ratio of the absolute value of the difference to the first threshold is less than or equal to the first preset deviation threshold, the updated first weight data is obtained by accumulating the current value of the first weight data using a small step adjustment amount, wherein the large step adjustment amount is greater than the small step adjustment amount.
[0010] Optionally, the step of assigning the second weight data to be greater than the first weight data when the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is greater than the second threshold includes: The step size adjustment of the second weight data is determined based on the ratio of the absolute value of the difference between the load power factor and the second threshold to the second threshold. When the ratio of the absolute value of the difference to the second threshold is greater than the second preset deviation threshold, the updated second weight data is obtained by accumulating the current value of the second weight data using a large step adjustment. When the ratio of the absolute value of the difference to the second threshold is less than or equal to the second preset deviation threshold, the updated second weight data is obtained by accumulating the current value of the second weight data using a small step adjustment amount, wherein the large step adjustment amount is greater than the small step adjustment amount.
[0011] Optionally, the step of assigning the second weight data to be greater than the first weight data when the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is greater than the second threshold further includes: Collect the bus voltage amplitude of the microgrid under control; When the bus voltage amplitude is lower than a preset voltage threshold, the second weight data is increased and the first weight data is decreased accordingly. When the bus voltage amplitude is not lower than the preset voltage threshold, the system switches to the current operating condition and assigns weights based on the total harmonic distortion rate and the load power factor according to the preset weighting rules.
[0012] Optionally, the step of calculating the current deviation between the total compensation current given signal and the actual feedback compensation current includes: The output current of the three-level neutral point clamping inverter corresponding to the microgrid under control is collected, and the output current is used as the actual feedback compensation current. The three-level neutral point clamping inverter includes two three-level H-bridge inverter units connected in parallel at the AC terminal. Calculate the current deviation between the given total compensation current and the actual feedback compensation current.
[0013] Optionally, the step of acquiring the output current of the three-level neutral point clamping inverter corresponding to the microgrid under control, and using the output current as the actual feedback compensation current, includes: The output currents of the two sets of the three-level H-bridge inverter units were collected respectively. The current sharing deviation is calculated based on the output current of the two sets of three-level H-bridge inverter units. Calculate the flow equalization adjustment duty cycle offset based on the aforementioned flow equalization deviation. The neutral point balance duty cycle offset is calculated based on the DC bus neutral point potential offset of the three-level neutral point clamping inverter. The current sharing adjustment duty cycle offset is superimposed with the midpoint balance duty cycle offset to obtain the total duty cycle offset. The PWM duty cycle of the corresponding two sets of three-level H-bridge inverter units is adjusted according to the total duty cycle offset to balance the output power of the two sets of three-level H-bridge inverter units and suppress the DC bus midpoint potential offset.
[0014] Optionally, the step of generating a drive pulse signal based on the three-phase modulated voltage command signal to complete the power quality compensation of the microgrid under control includes: Based on the three-phase modulation voltage command signal, a complementary drive pulse signal is generated through a three-level modulation strategy; The complementary drive pulse signal is input to the three-level neutral point clamping inverter corresponding to the microgrid under control to complete the power quality compensation of the microgrid under control.
[0015] On the other hand, this application provides a dynamic collaborative compensation control device for power quality in microgrids, the device comprising: The instruction generation module is used to collect the bus voltage signal and load current signal on the input side of the microgrid under control, and extract the harmonic current component and reactive current component from the load current signal to generate harmonic compensation reference instructions for the harmonic current component and reactive compensation reference instructions for the reactive current component. The calculation module is used to calculate the total harmonic distortion rate of the microgrid under control based on the bus voltage signal, and to calculate the load power factor of the microgrid under control based on the bus voltage signal and the load current signal. The weight calculation module is used to determine, according to the total harmonic distortion rate and the load power factor, a first weight data for the total harmonic distortion rate and a second weight data for the load power factor according to a preset weighting rule. The update module is used to modify the harmonic compensation reference instruction according to the first weight data to obtain the harmonic compensation current given signal, and to modify the reactive power compensation reference instruction according to the second weight data to obtain the reactive power compensation current given signal. The deviation calculation module is used to superimpose the harmonic compensation current given signal and the reactive power compensation current given signal to obtain the total compensation current given signal, and to calculate the current deviation between the total compensation current given signal and the actual feedback compensation current. The compensation module is used to perform zero-steady-state-error closed-loop regulation on the current deviation to obtain a three-phase modulation voltage command signal, and generate a drive pulse signal based on the three-phase modulation voltage command signal to complete the compensation of the power quality of the microgrid under control.
[0016] Thirdly, this application provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the dynamic collaborative compensation control method for microgrid power quality as described above.
[0017] Fourthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the dynamic collaborative compensation control method for power quality of microgrids as described above.
[0018] The embodiments of the present invention have the following beneficial effects: Harmonic compensation and reactive power compensation are set as two parallel and independent reference command calculation branches. The capacity of the two compensation commands is flexibly allocated through a dynamic weight allocation controller. The control architecture has a high degree of modularity. It can realize synchronous and coordinated compensation of harmonics and reactive power, or it can be put into a single compensation mode as needed. The modular control architecture facilitates the subsequent expansion of various power quality management functions such as unbalanced current suppression and voltage sag control. It is suitable for various microgrid application scenarios such as photovoltaic, wind power, and industrial parks, and has good engineering promotion value. The vector proportional-integral control algorithm is used to perform zero steady-state error closed-loop regulation of the grid-connected compensation current. Compared with traditional PI control, it can achieve zero steady-state error tracking of AC harmonics and reactive power periodic current commands, significantly improving the compensation control accuracy under complex distorted power grids. At the same time, a full-link global feedback mechanism is set up to periodically send the microgrid bus voltage and the actual grid-connected current of the inverter back to the signal acquisition input terminal. This can suppress control deviations caused by load surges, random power output of new energy sources, grid voltage distortion, device temperature drift, and sampling noise in real time, reduce the workload of on-site control parameter tuning and debugging, and improve the dynamic response speed and anti-interference capability of the device under complex random operating conditions of the microgrid. Using total harmonic distortion (THD) as the primary mandatory criterion and power factor as the secondary economic criterion, this system prioritizes ensuring compliance with harmonic indicators before optimizing reactive power factor. It can adaptively switch between harmonic-priority and reactive power-priority compensation modes based on the real-time operating conditions of the microgrid, dynamically adjusting the harmonic and reactive power compensation weight coefficients. This avoids the shortcomings of traditional fixed-weight methods where a single indicator fails to meet standards, and prevents grid-connected current disturbances and system resonance oscillations caused by frequent weight adjustments. While meeting the mandatory harmonic standards of the power industry, it maximizes the utilization of the device's rated capacity to achieve precise harmonic and reactive power coordinated management, significantly reducing microgrid line losses and the risk of power supply assessment penalties. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] in: Figure 1 This is a flowchart of a dynamic collaborative compensation control method for power quality in microgrids, provided in an embodiment of this application. Figure 2 This is a flowchart illustrating the adaptive adjustment of the step size of reactive power compensation weight in a dynamic collaborative compensation control method for power quality in microgrids, as provided in an embodiment of this application. Figure 3This is a topology diagram of the main circuit of a three-level NPC inverter in a dynamic collaborative compensation control method for power quality in microgrids provided in an embodiment of this application. Figure 4 This is a schematic diagram of the dual H-bridge current sharing control principle of a three-level NPC inverter in a dynamic collaborative compensation control method for power quality in microgrids, provided in an embodiment of this application. Figure 5 This is a schematic diagram of a dynamic collaborative compensation control device for power quality in a microgrid, provided in an embodiment of this application. Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a storage medium provided in an embodiment of this application. Detailed Implementation
[0021] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0022] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0023] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0024] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."
[0025] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0026] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0027] like Figure 1 As shown, this invention provides a dynamic collaborative compensation control method for power quality in microgrids, comprising: S101. Collect the bus voltage signal and load current signal on the input side of the microgrid to be controlled, and extract the harmonic current component and reactive current component from the load current signal to generate a harmonic compensation reference command for the harmonic current component and a reactive compensation reference command for the reactive current component. For example, based on the instantaneous reactive power theory (pq method), the three-phase load current is decomposed by coordinate transformation, and in synchronous rotation d q The fundamental active current, fundamental reactive current, and harmonic current are separated in a coordinate system, enabling accurate extraction of reactive current components and harmonic current components.
[0028] S102. Calculate the total harmonic distortion rate of the microgrid under control based on the bus voltage signal, and calculate the load power factor of the microgrid under control based on the bus voltage signal and the load current signal. In one possible implementation, the step of calculating the total harmonic distortion rate of the microgrid under control based on the bus voltage signal includes: The bus voltage signal is subjected to a discrete Fourier transform to separate the fundamental voltage component and the harmonic components of the bus voltage signal. The effective value of the fundamental voltage is calculated based on the fundamental voltage component, and the total effective value of the harmonics is calculated based on the harmonic components. The ratio of the total effective value of harmonics to the effective value of the fundamental voltage is taken as the total harmonic distortion rate of the microgrid under control.
[0029] For example, a discrete Fourier transform is performed on a discrete voltage sequence within a power frequency sampling period to convert the voltage signal from the time domain to the frequency domain, and the voltage amplitude and phase information at different frequencies are obtained. Through frequency domain decomposition, the fundamental voltage component and each harmonic component (k=2, 3, 4...) at each frequency are separated.
[0030] For example, the amplitude of the fundamental voltage is extracted, and the effective value of the fundamental voltage is obtained according to the formula for calculating the effective value of a sinusoidal quantity. The effective values of all harmonic voltages of the second order and above are squared and the square root is taken to obtain the total effective value of harmonics. The ratio of the total effective value of harmonics to the effective value of the fundamental voltage is calculated as the total harmonic distortion rate of the microgrid to be controlled.
[0031] In one possible implementation, the step of calculating the load power factor of the microgrid under control based on the bus voltage signal and the load current signal includes: Extract the first fundamental phase of the bus voltage signal and the second fundamental phase of the load current signal, and calculate the phase difference between the first fundamental phase and the second fundamental phase; Calculate the phase difference value and obtain the cosine value to get the power factor of the current load; Alternatively, the active power and apparent power for the microgrid under control can be obtained by integrating the bus voltage signal and the load current signal, and the ratio of active power to apparent power can be used as the load power factor.
[0032] For example, the power factor is essentially the cosine of the phase difference between the fundamental voltage and the fundamental current. Harmonic currents do not consume average active power; the power factor is calculated using only the fundamental component, and the calculation result meets the power industry's assessment standards. The fundamental phases of the bus voltage and load current are extracted using DFT / FFT algorithms, and the phase difference is calculated followed by a cosine operation to obtain the current load power factor. Alternatively, the fundamental phases of the bus voltage and load current are extracted using Discrete Fourier Transform, and the phase difference between them is calculated. The cosine result of this phase difference is used as the load power factor of the microgrid under control. Calculation based solely on the fundamental component avoids interference from harmonics in the power factor detection results, resulting in high detection accuracy and good real-time performance.
[0033] For example, the average active power is calculated by integrating the instantaneous values of voltage and current over one power frequency cycle. The apparent power is then calculated by combining this with the effective values of voltage and current. The ratio of apparent power to average active power is the load power factor. This active power to apparent power ratio method aligns with power grid metering rules, avoiding overcompensation and undercompensation issues.
[0034] S103. Based on the total harmonic distortion rate and the load power factor, determine the first weight data for the total harmonic distortion rate and the second weight data for the load power factor according to a preset weighting rule; In one possible implementation, the step of determining first weighted data for the total harmonic distortion (THD) and second weighted data for the load power factor according to a preset weighting rule based on the THD and the load power factor includes: Based on the comparison result of the total harmonic distortion rate with a preset first threshold, and the comparison result of the load power factor with a preset second threshold, the first weight data and the second weight data are determined according to a preset weighting rule, so that: When the total harmonic distortion rate is greater than the first threshold, the first weight data is assigned a higher weight data than the second weight data; When the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is greater than the second threshold, the second weight data is assigned to be greater than the first weight data. When the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is less than or equal to the second threshold, the first weight data is assigned equal to the second weight data.
[0035] For example, the calculated total harmonic distortion (THD) is compared with the system's preset THD safety threshold: If the determination result is THD > preset threshold: the system switches to harmonic priority compensation mode, increases the harmonic compensation weight coefficient, simultaneously decreases the reactive power compensation weight coefficient, and prioritizes the allocation of the device's rated capacity for grid harmonic suppression. If the determination result is THD ≤ preset threshold (first threshold): it indicates that the current microgrid harmonic index meets the specification requirements, and proceeds to the second-level determination: load power factor target value determination. Compare the load power factor PF with the preset power factor assessment target value: If the judgment result is PF < preset target value (second threshold): the system switches to reactive power priority compensation mode, reduces the harmonic compensation weight coefficient, and simultaneously increases the reactive power compensation weight coefficient, and prioritizes the use of device capacity to carry out reactive power compensation. If the determination result is PF ≥ preset target value: it means that both the microgrid harmonics and power factor power quality indicators meet the operational assessment requirements, so that the second weighted data is equal to the first weighted data equal to 0.5, or, the weight preservation strategy is executed: When the system operates in harmonic priority compensation mode and the weight parameters are updated, or when both THD and PF indicators meet the standards, the current values of the harmonic compensation weight coefficient (first weight data) and reactive power compensation weight coefficient (second weight data) are locked. The two sets of weight coefficients are no longer increased or decreased to avoid frequent fluctuations in weights that could cause oscillations in compensation commands and distortion of grid-connected current.
[0036] In one possible implementation, the step of assigning the first weight data to be greater than the second weight data when the total harmonic distortion rate is greater than the first threshold further includes: The step size adjustment of the first weight data is determined based on the ratio of the absolute value of the difference between the total harmonic distortion rate and the first threshold to the first threshold. When the ratio of the absolute value of the difference to the first threshold is greater than the first preset deviation threshold, the updated first weight data is obtained by accumulating the current value of the first weight data using a large step adjustment. When the ratio of the absolute value of the difference to the first threshold is less than or equal to the first preset deviation threshold, the updated first weight data is obtained by accumulating the current value of the first weight data using a small step adjustment amount, wherein the large step adjustment amount is greater than the small step adjustment amount.
[0037] It should be noted that the ratio of the absolute value of the difference between the total harmonic distortion (THD) and the first threshold to the first threshold is used to quantify the degree of THD exceeding the standard. For example, assuming the first threshold is the commonly accepted THD compliance limit of 5% in the power industry, and the current measured THD is 7%, then the absolute value of the difference is 2%, and the ratio of the difference to the first threshold is 2% / 5% = 0.4, meaning the degree of exceeding the standard is 40%. If the current measured THD is 12%, then the ratio of the difference to the first threshold is 7% / 5% = 1.4, meaning the degree of exceeding the standard is 140%. The former is considered a slight exceedance, while the latter is considered a severe exceedance.
[0038] In this embodiment, the first preset deviation threshold is a critical ratio preset by the system to distinguish between slight and severe exceedances. For example, it can be set to 0.5, i.e., exceedance of 50%. When the difference ratio is greater than 0.5, it is determined to be a severe exceedance, and a large step adjustment is used to quickly increase the harmonic compensation weight; when the difference ratio is less than or equal to 0.5, it is determined to be a slight exceedance, and a small step adjustment is used for smooth adjustment. The size of the step adjustment can be preset by the system or dynamically determined by the proportional-integral controller. For example, a large step adjustment can be set to 0.05, and a small step adjustment can be set to 0.01. The specific values do not constitute a limitation of the present invention. Accumulation refers to adding the step adjustment to the current weight value. For example, if the current first weight data is 0.6 and the large step adjustment is 0.05, then the updated first weight data is 0.65.
[0039] By quantifying and classifying the degree of THD exceedance, a large-step rapid increase in harmonic compensation weights is adopted when THD is severely exceeded. This enables the system to respond quickly to severe harmonic pollution events, preventing the continuous harm of excessive harmonics from jeopardizing the safety of microgrid equipment and power supply quality. When THD is only slightly exceeded, a small-step fine-tuning is adopted to prevent sudden weight changes from causing grid-connected current surges and resonant oscillations, thus improving the stability of system operation. This graded step-size strategy of large-step rapid adjustment for severe cases and small-step fine adjustment for minor cases balances the dynamic response speed and steady-state stability of the system. It avoids the dilemma of large-step adjustment being prone to oscillation and small-step adjustment being slow in traditional fixed-step adjustment methods, significantly improving the adaptive capability and robustness of microgrid power quality management.
[0040] In one possible implementation, the step of assigning the second weight data to be greater than the first weight data when the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is greater than the second threshold includes: The step size adjustment of the second weight data is determined based on the ratio of the absolute value of the difference between the load power factor and the second threshold to the second threshold. When the ratio of the absolute value of the difference to the second threshold is greater than the second preset deviation threshold, the updated second weight data is obtained by accumulating the current value of the second weight data using a large step adjustment. When the ratio of the absolute value of the difference to the second threshold is less than or equal to the second preset deviation threshold, the updated second weight data is obtained by accumulating the current value of the second weight data using a small step adjustment amount, wherein the large step adjustment amount is greater than the small step adjustment amount.
[0041] It should be noted that the second threshold is the target value for the load power factor. For example, the power industry typically requires a power factor of no less than 0.90 or 0.95, and the second threshold can be set to 0.90. Reactive power compensation is required when the load power factor is below this value. When the current measured power factor (PF) is 0.85, the difference is 0.05, and the ratio of this difference to the second threshold is 0.05 / 0.90≈0.056, meaning the undercompensation is approximately 5.6%. If the current measured PF is 0.70, the difference is 0.20, and the ratio of this difference to the second threshold is 0.20 / 0.90≈0.222, meaning the undercompensation is approximately 22.2%. The former is considered slight undercompensation, and the latter is considered severe undercompensation. The second preset deviation threshold is a system-preset critical ratio used to distinguish between slight and severe undercompensation; for example, it can be set to 0.10, meaning an undercompensation of 10%. When the difference ratio is greater than 0.10, it is judged as a serious undercompensation, and a large step adjustment is used to quickly increase the reactive power compensation weight; when the difference ratio is less than or equal to 0.10, it is judged as a slight undercompensation, and a small step adjustment is used for smooth adjustment. Similar to the above implementation method, the large step adjustment can be set to 0.05, and the small step adjustment can be set to 0.01.
[0042] It should be understood that the second preset deviation threshold and the first preset deviation threshold are independent of each other; they can be the same or different, and the specific values are preset by the system based on the actual working conditions. Accumulating based on the current value means adding the step size adjustment to the current value of the second weight data. For example, if the current second weight data is 0.55 and the large step size adjustment is 0.05, then the updated second weight data will be 0.60.
[0043] Once the system meets the THD (Total Harmonic Distortion) requirements, the governance objective shifts to power factor optimization. By quantifying and grading the degree of power factor undercompensation, a large-step approach is used to rapidly increase the reactive power compensation weight when the power factor is severely substandard, quickly raising the power factor to the compliant range and avoiding power factor penalties due to excessively low power factors. When the power factor is close to the target value, a small-step fine-tuning is used to prevent overcompensation of reactive power from causing the power factor to lead and deteriorate power quality again. This tiered step control strategy makes reactive power compensation both fast and accurate, maximizing the efficiency and accuracy of reactive power compensation while ensuring that harmonic indicators meet requirements, thereby reducing microgrid line losses and electricity costs.
[0044] like Figure 2 In one possible implementation, the step of assigning the second weight data to be greater than the first weight data when the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is greater than the second threshold further includes: Collect the bus voltage amplitude of the microgrid under control; When the bus voltage amplitude is lower than a preset voltage threshold, the second weight data is increased and the first weight data is decreased accordingly. When the bus voltage amplitude is not lower than the preset voltage threshold, the system switches to the current operating condition and assigns weights based on the total harmonic distortion rate and the load power factor according to the preset weighting rules.
[0045] It should be noted that, based on the three-level weight allocation rule, the bus voltage amplitude can be further introduced. In the actual operation of a microgrid, the bus voltage amplitude is an important indicator reflecting the balance of reactive power supply and demand in the system. When the system's reactive power is insufficient, the bus voltage will drop significantly; conversely, when reactive power is excessive, the bus voltage will rise. The preset voltage threshold is a preset lower limit of voltage for the system, for example, it can be set to 0.95 times the rated voltage, i.e., 0.95pu. When the bus voltage is lower than this threshold, it indicates that the system faces a serious reactive power deficit and insufficient voltage support. At this time, the system actively increases the reactive power compensation weight (second weight data) and correspondingly decreases the harmonic compensation weight (first weight data), prioritizing the use of device capacity for reactive power compensation to raise the bus voltage and ensure the voltage safety of the microgrid. For example, if the standard weight allocation is harmonic weight 0.4 and reactive power weight 0.6, and the bus voltage detection value is 0.93pu, which is lower than the 0.95pu threshold, then the system will increase the reactive power weight to 0.75 and decrease the harmonic weight to 0.25. When the bus voltage recovers to 0.95 pu or above, the system switches back to the standard weight allocation of 0.4 / 0.6. This switching refers to changing from the current weight allocation adjusted due to low voltage to the standard weight allocation recalculated based on the current THD and PF, rather than reverting to the weight values from a historical point in time.
[0046] In microgrids, the output of distributed power sources such as photovoltaics and wind power is random and intermittent, with frequent load fluctuations that can easily lead to voltage drops on the bus. Traditional power quality management equipment typically focuses only on harmonics and reactive power factor, neglecting voltage support requirements. By monitoring the bus voltage in conjunction with other systems, some harmonic mitigation capacity is proactively sacrificed to strengthen reactive power support when the voltage is low, achieving voltage priority while also considering harmonics. This dynamic weight redistribution mechanism prioritizes voltage safety when the microgrid faces voltage instability risks, effectively avoiding the risk of system collapse caused by neglecting voltage safety in the pursuit of harmonic indicators or power factor, and significantly improving the operational reliability and power supply security of the microgrid under complex operating conditions.
[0047] S104. Correct the harmonic compensation reference instruction according to the first weight data to obtain the harmonic compensation current given signal, and correct the reactive power compensation reference instruction according to the second weight data to obtain the reactive power compensation current given signal. S105. The harmonic compensation current given signal and the reactive power compensation current given signal are superimposed to obtain the total compensation current given signal, and the current deviation between the total compensation current given signal and the actual feedback compensation current is calculated. In one possible implementation, the step of calculating the current deviation between the total compensation current given signal and the actual feedback compensation current includes: The output current of the three-level neutral point clamping inverter corresponding to the microgrid under control is collected, and the output current is used as the actual feedback compensation current. The three-level neutral point clamping inverter includes two three-level H-bridge inverter units connected in parallel at the AC terminal. Calculate the current deviation between the given total compensation current and the actual feedback compensation current.
[0048] For example, such as Figure 3 As shown, V is the input voltage source on the microgrid side; S 11 -S 14 With S 21 -S 24 For power switching devices; D 11 D 12 D 21 D 22 The diode is the midpoint clamping diode; the capacitor is the DC-side series voltage divider support capacitor; the filter (LCL) is the three-phase LCL grid-connected filter circuit; and the PCC is the microgrid common coupling point. The grid voltage source V is connected to the DC bus input. The DC side consists of an upper support capacitor C1 and a lower support capacitor C2 connected in series to form a voltage divider DC bus. Two sets of three-level H-bridge inverter units share this series DC bus, achieving DC-side cascading. This distributes the total bus voltage evenly to the two sets of inverter units, with each inverter unit only bearing half of the DC bus voltage, reducing the voltage stress on individual power switching devices. The first set of three-level H-bridge inverter units consists of power switching transistor S... 11 -S 14 and the midpoint clamping diode D 11 Midpoint clamping diode D 12 This forms a diode-neutral-clamped three-level inverter topology; the clamping diodes are used to clamp the DC bus midpoint potential, suppress capacitor midpoint potential drift, and ensure reliable three-level output. The second three-level H-bridge inverter unit consists of power switching transistors S... 21 -S 24 and the midpoint clamping diode D 21 D 22 The two sets of inverter units form a three-level H-bridge topology identical to the first set. The DC sides of the two sets of inverter units are cascaded in series, and the AC outputs are connected in parallel, effectively doubling the capacity of a single H-bridge. After the AC outputs of the two sets of three-level H-bridge inverter units are connected in parallel, they are connected to a three-phase LCL filter. The LCL filter performs PWM high-frequency switching harmonic filtering and grid-connected current smoothing, ultimately connecting to the microgrid's common coupling point (PCC) to inject harmonic and reactive power compensation current into the microgrid.
[0049] like Figure 4 In one possible implementation, the step of acquiring the output current of the three-level neutral point clamping inverter corresponding to the microgrid under control and using the output current as the actual feedback compensation current further includes: The output currents of the two sets of the three-level H-bridge inverter units were collected respectively. The current sharing deviation is calculated based on the output current of the two sets of three-level H-bridge inverter units. Calculate the flow equalization adjustment duty cycle offset based on the aforementioned flow equalization deviation. The neutral point balance duty cycle offset is calculated based on the DC bus neutral point potential offset of the three-level neutral point clamping inverter. The current sharing adjustment duty cycle offset is superimposed with the midpoint balance duty cycle offset to obtain the total duty cycle offset. The PWM duty cycle of the corresponding two sets of three-level H-bridge inverter units is adjusted according to the total duty cycle offset to balance the output power of the two sets of three-level H-bridge inverter units and suppress the DC bus midpoint potential offset.
[0050] It should be noted that, as in the three-level neutral-point clamped inverter main circuit topology of this application, two sets of three-level H-bridge inverter units are cascaded in series on the DC side and connected in parallel at the output terminals on the AC side. Ideally, the two sets of inverter units should share the load current equally. However, due to factors such as differences in device parameters (e.g., different on-state voltage drops of power switches, different drive circuit delays), PWM carrier phase differences, and DC bus midpoint potential drift, the actual output current of the two sets of inverter units may deviate. The current sharing deviation refers to the difference in output current between the two sets of three-level H-bridge inverter units. For example, if the first set's output current is 50A and the second set's output current is 45A, then the current sharing deviation is 5A. Based on this deviation, the current sharing adjustment duty cycle offset can be calculated. If the first set's current is too large, the duty cycle of the corresponding bridge arm of the first set is appropriately reduced or the duty cycle of the corresponding bridge arm of the second set is increased to make the two sets of currents more consistent. The current sharing adjustment duty cycle offset is calculated by the proportional-integral controller based on the current sharing deviation. The DC bus midpoint potential offset refers to the offset of the midpoint potential of the DC-side series voltage divider capacitors C1 and C2 relative to the ideal midpoint potential, and is usually determined by the difference in voltage between the two sets of capacitors (V). C1 -V C2 The value is represented as ) / 2. When the midpoint potential shifts, the shift can be suppressed by adjusting the small vector allocation of the PWM duty cycle. The midpoint balance duty cycle shift is calculated by the proportional-integral controller based on the DC bus midpoint potential shift.
[0051] In this embodiment, the duty cycle offset of the current sharing adjustment and the duty cycle offset of the midpoint balance are calculated separately and then superimposed to obtain the total duty cycle offset. This superposition can be an arithmetic addition. It should be understood that when the total duty cycle offset exceeds a preset limit, amplitude limiting can be performed to ensure the linearity of PWM modulation.
[0052] It is understandable that when two sets of three-level H-bridge inverter units operate in parallel, uneven output current can lead to overcurrent heating and shortened lifespan of some power switching devices, potentially even burning them out. It also reduces the control accuracy of the compensation current and the overall system efficiency. By real-time acquisition of the output current of the two H-bridges, calculating the current sharing adjustment duty cycle offset and the midpoint balance duty cycle offset separately, and then superimposing both to uniformly adjust the PWM duty cycle, synergistic optimization of current sharing control and midpoint potential balance control is achieved. On one hand, current sharing control ensures balanced output power of the two inverter units, avoiding overload in a single unit, extending the lifespan of power switching devices, and improving the reliability and capacity utilization of the device. On the other hand, midpoint potential balance control suppresses DC bus midpoint potential drift, ensuring the symmetry and stability of the three-level inverter output voltage. This superimposed control strategy avoids conflicts and coupling between multi-objective controls, enabling the two sets of H-bridge inverter units to achieve balanced output and stable midpoint potential, significantly improving the operational performance and engineering practicality of the dual H-bridge parallel topology in high-power compensation scenarios in microgrids.
[0053] S106. Perform zero-static-error closed-loop regulation on the current deviation to obtain a three-phase modulation voltage command signal, and generate a drive pulse signal based on the three-phase modulation voltage command signal to complete the compensation of power quality of the microgrid under control.
[0054] In one possible implementation, the step of generating a drive pulse signal based on the three-phase modulated voltage command signal to complete the power quality compensation of the microgrid under control includes: Based on the three-phase modulation voltage command signal, a complementary drive pulse signal is generated through a three-level modulation strategy; The complementary drive pulse signal is input to the three-level neutral point clamping inverter corresponding to the microgrid under control to complete the power quality compensation of the microgrid under control.
[0055] For example, based on the three-phase modulation voltage command signal output by the PI controller, multiple complementary drive pulse signals are generated to drive two sets of DC cascaded and AC parallel three-level NPC type H-bridge inverter units in this topology, realizing accurate compensation of microgrid harmonics and reactive power; this modulation strategy can realize DC bus midpoint potential balance control, adapt to the common DC bus dual inverter unit topology of this invention, effectively suppress capacitor midpoint potential drift, and ensure reliable operation of the device under high power conditions.
[0056] On the other hand, such as Figure 5 As shown, this application provides a dynamic collaborative compensation control device for power quality in microgrids, the device comprising: The instruction generation module 201 is used to collect the bus voltage signal and load current signal on the input side of the microgrid under control, and extract the harmonic current component and reactive current component from the load current signal to generate harmonic compensation reference instruction for the harmonic current component and reactive compensation reference instruction for the reactive current component. The calculation module 202 is used to calculate the total harmonic distortion rate of the microgrid under control based on the bus voltage signal, and to calculate the load power factor of the microgrid under control based on the bus voltage signal and the load current signal. The weight calculation module 203 is used to determine, according to the total harmonic distortion rate and the load power factor, a first weight data for the total harmonic distortion rate and a second weight data for the load power factor according to a preset weighting rule. The update module 204 is used to modify the harmonic compensation reference instruction according to the first weight data to obtain the harmonic compensation current given signal, and to modify the reactive power compensation reference instruction according to the second weight data to obtain the reactive power compensation current given signal. The deviation calculation module 205 is used to superimpose the harmonic compensation current given signal and the reactive power compensation current given signal to obtain the total compensation current given signal, and to calculate the current deviation between the total compensation current given signal and the actual feedback compensation current. The compensation module 206 is used to perform zero-steady-state-error closed-loop regulation on the current deviation to obtain a three-phase modulation voltage command signal, and generate a drive pulse signal based on the three-phase modulation voltage command signal to complete the compensation of the power quality of the microgrid under control.
[0057] In one possible implementation, such as Figure 6 As shown, this application embodiment provides an electronic device 300, including: a memory 310, a processor 320, and machine-readable instructions 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the machine-readable instructions 311, it realizes: acquiring the bus voltage signal and load current signal of the input side of the microgrid to be controlled, and extracting the harmonic current component and the reactive current component in the load current signal to generate a harmonic compensation reference instruction for the harmonic current component and a reactive compensation reference instruction for the reactive current component; The total harmonic distortion rate of the microgrid under control is calculated based on the bus voltage signal, and the load power factor of the microgrid under control is calculated based on the bus voltage signal and the load current signal. Based on the total harmonic distortion rate and the load power factor, a first weight data for the total harmonic distortion rate and a second weight data for the load power factor are determined according to a preset weighting rule. The harmonic compensation reference instruction is corrected according to the first weight data to obtain the harmonic compensation current given signal, and the reactive power compensation reference instruction is corrected according to the second weight data to obtain the reactive power compensation current given signal. The harmonic compensation current given signal and the reactive power compensation current given signal are superimposed to obtain the total compensation current given signal, and the current deviation between the total compensation current given signal and the actual feedback compensation current is calculated. The current deviation is adjusted in a closed-loop manner without steady-state error to obtain a three-phase modulation voltage command signal, and a drive pulse signal is generated based on the three-phase modulation voltage command signal to complete the step of compensating for the power quality of the microgrid under control.
[0058] In one possible implementation, such as Figure 7 As shown, this application embodiment provides a computer-readable storage medium 400, on which a computer program 411 is stored. When the computer program 411 is executed by the processor, it performs the following: acquiring the bus voltage signal and load current signal of the input side of the microgrid to be controlled, and extracting the harmonic current component and reactive current component in the load current signal to generate a harmonic compensation reference instruction for the harmonic current component and a reactive compensation reference instruction for the reactive current component. The total harmonic distortion rate of the microgrid under control is calculated based on the bus voltage signal, and the load power factor of the microgrid under control is calculated based on the bus voltage signal and the load current signal. Based on the total harmonic distortion rate and the load power factor, a first weight data for the total harmonic distortion rate and a second weight data for the load power factor are determined according to a preset weighting rule. The harmonic compensation reference instruction is corrected according to the first weight data to obtain the harmonic compensation current given signal, and the reactive power compensation reference instruction is corrected according to the second weight data to obtain the reactive power compensation current given signal. The harmonic compensation current given signal and the reactive power compensation current given signal are superimposed to obtain the total compensation current given signal, and the current deviation between the total compensation current given signal and the actual feedback compensation current is calculated. The current deviation is adjusted in a closed-loop manner without steady-state error to obtain a three-phase modulation voltage command signal, and a drive pulse signal is generated based on the three-phase modulation voltage command signal to complete the step of compensating for the power quality of the microgrid under control.
[0059] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0060] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0061] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0062] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0063] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computing device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0064] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
[0065] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A dynamic collaborative compensation control method for power quality in microgrids, characterized in that, The method includes: The bus voltage signal and load current signal of the input side of the microgrid under control are collected, and the harmonic current component and reactive current component are extracted from the load current signal to generate harmonic compensation reference command for the harmonic current component and reactive compensation reference command for the reactive current component. The total harmonic distortion rate of the microgrid under control is calculated based on the bus voltage signal, and the load power factor of the microgrid under control is calculated based on the bus voltage signal and the load current signal. Based on the total harmonic distortion rate and the load power factor, a first weight data for the total harmonic distortion rate and a second weight data for the load power factor are determined according to a preset weighting rule. The harmonic compensation reference instruction is corrected according to the first weight data to obtain the harmonic compensation current given signal, and the reactive power compensation reference instruction is corrected according to the second weight data to obtain the reactive power compensation current given signal. The harmonic compensation current given signal and the reactive power compensation current given signal are superimposed to obtain the total compensation current given signal, and the current deviation between the total compensation current given signal and the actual feedback compensation current is calculated. The current deviation is adjusted by a closed-loop system with zero static error to obtain a three-phase modulation voltage command signal. A drive pulse signal is then generated based on the three-phase modulation voltage command signal to complete the compensation of the power quality of the microgrid under control.
2. The dynamic collaborative compensation control method for power quality in microgrids according to claim 1, characterized in that, The step of calculating the total harmonic distortion rate of the microgrid under control based on the bus voltage signal includes: The bus voltage signal is subjected to a discrete Fourier transform to separate the fundamental voltage component and the harmonic components of the bus voltage signal. The effective value of the fundamental voltage is calculated based on the fundamental voltage component, and the total effective value of the harmonics is calculated based on the harmonic components. The ratio of the total effective value of harmonics to the effective value of the fundamental voltage is taken as the total harmonic distortion rate of the microgrid under control.
3. The dynamic collaborative compensation control method for power quality in microgrids according to claim 1, characterized in that, The step of calculating the load power factor of the microgrid under control based on the bus voltage signal and the load current signal includes: Extract the first fundamental phase of the bus voltage signal and the second fundamental phase of the load current signal, and calculate the phase difference between the first fundamental phase and the second fundamental phase; Calculate the phase difference value and obtain the cosine value to get the power factor of the current load; Alternatively, the active power and apparent power for the microgrid under control can be obtained by integrating the bus voltage signal and the load current signal, and the ratio of active power to apparent power can be used as the load power factor.
4. The dynamic collaborative compensation control method for power quality in microgrids according to claim 1, characterized in that, The step of determining, according to the total harmonic distortion (THD) and the load power factor, a first weighted data for the THD and a second weighted data for the load power factor according to a preset weighting rule includes: Based on the comparison result of the total harmonic distortion rate with a preset first threshold, and the comparison result of the load power factor with a preset second threshold, the first weight data and the second weight data are determined according to a preset weighting rule, so that: When the total harmonic distortion rate is greater than the first threshold, the first weight data is assigned a higher weight data than the second weight data; When the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is greater than the second threshold, the second weight data is assigned to be greater than the first weight data. When the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is less than or equal to the second threshold, the first weight data is assigned equal to the second weight data.
5. The dynamic collaborative compensation control method for power quality in microgrids according to claim 4, characterized in that, The step of assigning the first weight data to be greater than the second weight data when the total harmonic distortion rate is greater than the first threshold includes: The step size adjustment of the first weight data is determined based on the ratio of the absolute value of the difference between the total harmonic distortion rate and the first threshold to the first threshold. When the ratio of the absolute value of the difference to the first threshold is greater than the first preset deviation threshold, the updated first weight data is obtained by accumulating the current value of the first weight data using a large step adjustment. When the ratio of the absolute value of the difference to the first threshold is less than or equal to the first preset deviation threshold, the updated first weight data is obtained by accumulating the current value of the first weight data using a small step adjustment amount, wherein the large step adjustment amount is greater than the small step adjustment amount.
6. The dynamic collaborative compensation control method for power quality in microgrids according to claim 4, characterized in that, The step of allocating the second weight data to be greater than the first weight data when the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is greater than the second threshold includes: The step size adjustment of the second weight data is determined based on the ratio of the absolute value of the difference between the load power factor and the second threshold to the second threshold. When the ratio of the absolute value of the difference to the second threshold is greater than the second preset deviation threshold, the updated second weight data is obtained by accumulating the current value of the second weight data using a large step adjustment. When the ratio of the absolute value of the difference to the second threshold is less than or equal to the second preset deviation threshold, the updated second weight data is obtained by accumulating the current value of the second weight data using a small step adjustment amount, wherein the large step adjustment amount is greater than the small step adjustment amount.
7. The dynamic collaborative compensation control method for power quality in microgrids according to claim 4, characterized in that, The step of allocating the second weight data to be greater than the first weight data when the total harmonic distortion rate is less than or equal to the first threshold and the load power factor is greater than the second threshold further includes: Collect the bus voltage amplitude of the microgrid under control; When the bus voltage amplitude is lower than a preset voltage threshold, the second weight data is increased and the first weight data is decreased accordingly. When the bus voltage amplitude is not lower than the preset voltage threshold, the system switches to the current operating condition and assigns weights based on the total harmonic distortion rate and the load power factor according to the preset weighting rules.
8. The dynamic collaborative compensation control method for power quality in microgrids according to claim 1, characterized in that, The step of calculating the current deviation between the total compensation current given signal and the actual feedback compensation current includes: The output current of the three-level neutral point clamping inverter corresponding to the microgrid under control is collected, and the output current is used as the actual feedback compensation current. The three-level neutral point clamping inverter includes two three-level H-bridge inverter units connected in parallel at the AC terminal. Calculate the current deviation between the given total compensation current and the actual feedback compensation current.
9. The dynamic collaborative compensation control method for power quality in microgrids according to claim 8, characterized in that, The step of collecting the output current of the three-level neutral point clamping inverter corresponding to the microgrid under control and using the output current as the actual feedback compensation current includes: The output currents of the two sets of the three-level H-bridge inverter units were collected respectively. The current sharing deviation is calculated based on the output current of the two sets of three-level H-bridge inverter units. Calculate the flow equalization adjustment duty cycle offset based on the aforementioned flow equalization deviation. The neutral point balance duty cycle offset is calculated based on the DC bus neutral point potential offset of the three-level neutral point clamping inverter. The current sharing adjustment duty cycle offset is superimposed with the midpoint balance duty cycle offset to obtain the total duty cycle offset. The PWM duty cycle of the corresponding two sets of three-level H-bridge inverter units is adjusted according to the total duty cycle offset to balance the output power of the two sets of three-level H-bridge inverter units and suppress the DC bus midpoint potential offset.
10. The dynamic collaborative compensation control method for power quality in microgrids according to claim 1, characterized in that, The step of generating a drive pulse signal based on the three-phase modulated voltage command signal to complete the power quality compensation of the microgrid under control includes: Based on the three-phase modulated voltage command signal, a complementary drive pulse signal is generated through a three-level modulation strategy; The complementary drive pulse signal is input to the three-level neutral point clamping inverter corresponding to the microgrid under control to complete the power quality compensation of the microgrid under control.
11. A dynamic collaborative compensation control device for power quality in microgrids, characterized in that, The device includes: The instruction generation module is used to collect the bus voltage signal and load current signal on the input side of the microgrid under control, and extract the harmonic current component and reactive current component from the load current signal to generate harmonic compensation reference instructions for the harmonic current component and reactive compensation reference instructions for the reactive current component. The calculation module is used to calculate the total harmonic distortion rate of the microgrid under control based on the bus voltage signal, and to calculate the load power factor of the microgrid under control based on the bus voltage signal and the load current signal. The weight calculation module is used to determine, according to the total harmonic distortion rate and the load power factor, a first weight data for the total harmonic distortion rate and a second weight data for the load power factor according to a preset weighting rule. The update module is used to modify the harmonic compensation reference instruction according to the first weight data to obtain the harmonic compensation current given signal, and to modify the reactive power compensation reference instruction according to the second weight data to obtain the reactive power compensation current given signal. The deviation calculation module is used to superimpose the harmonic compensation current given signal and the reactive power compensation current given signal to obtain the total compensation current given signal, and to calculate the current deviation between the total compensation current given signal and the actual feedback compensation current. The compensation module is used to perform zero-steady-state-error closed-loop regulation on the current deviation to obtain a three-phase modulation voltage command signal, and generate a drive pulse signal based on the three-phase modulation voltage command signal to complete the compensation of the power quality of the microgrid under control.
12. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the dynamic collaborative compensation control method for power quality of a microgrid as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the dynamic collaborative compensation control method for power quality of a microgrid as described in any one of claims 1 to 10.