A microgrid harmonic control method and system

CN122992775APending Publication Date: 2026-10-27ZHEJIANG DONGGAO FUTURE ENERGY TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611170377.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-27

Smart Images

  • Figure CN122992775A_ABST
    Figure CN122992775A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of micro-grid control, and discloses a micro-grid harmonic control method and system. The method comprises the following steps: a first device and a second device respectively acquire AC currents of a bus, extract odd harmonic currents in the AC currents of the bus, determine corresponding peak currents, and respectively determine a first reference virtual impedance of the first device and a second reference virtual impedance of the second device according to the peak currents. A first reference harmonic compensation voltage corresponding to the first reference virtual impedance is determined, and a second reference harmonic compensation voltage corresponding to the second reference virtual impedance is determined. The sum of a first harmonic compensation current corresponding to the first reference harmonic compensation voltage and a second harmonic compensation current corresponding to the second reference harmonic compensation voltage is equal to the odd harmonic current. In this way, the two devices cooperatively compensate for the odd harmonic, reduce the bus voltage distortion rate, improve the load-carrying capacity of the micro-grid, and optimize the power quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of microgrid control technology, and in particular to a microgrid harmonic control method and system. Background Technology

[0002] A typical independent photovoltaic-storage microgrid includes a power conversion system (PCS), a photovoltaic inverter, and loads. The PCS provides voltage to the loads, while the photovoltaic inverter injects photovoltaic energy into the bus as a fundamental current to supply power to the loads. The fundamental current can refer to a standard sinusoidal current at power frequency such as 50Hz or 60Hz, which is the basic component for transmitting effective electrical energy.

[0003] However, loads in microgrids often include nonlinear loads. The nonlinear volt-ampere characteristics of these loads (due to built-in rectifiers and switching power electronic devices) distort the current flowing through them, generating odd-order harmonic currents. These are harmonic currents in the bus AC current with frequencies that are odd multiples of the fundamental frequency. When these harmonic currents flow through the line impedance, they generate harmonic voltages, which are superimposed on the original bus AC voltage, leading to waveform distortion of the bus AC voltage and overload problems for the energy storage converter. Summary of the Invention

[0004] To address the aforementioned problems, this application provides a microgrid harmonic control method and system.

[0005] In a first aspect, a harmonic control method for a microgrid is provided, applied to a microgrid control system, the microgrid control system including a first device and a second device connected in parallel via a bus; the method includes: the first device and the second device respectively acquiring the AC current of the bus, extracting the odd harmonic current from the AC current of the bus, and acquiring the corresponding peak current based on the odd harmonic current; the first device determining a first virtual impedance adjustment coefficient based on the first peak current acquired by the first device, and the second device determining a second virtual impedance adjustment coefficient based on the second peak current acquired by the second device; the first device determining a first reference virtual impedance corresponding to the first device through the first virtual impedance adjustment coefficient, and determining a corresponding first reference harmonic compensation voltage based on the first reference virtual impedance; the second device determining a second reference virtual impedance corresponding to the second device through the virtual impedance adjustment coefficient corresponding to the second device, and determining a corresponding second reference harmonic compensation voltage based on the second reference virtual impedance; wherein, the sum of the first harmonic compensation current corresponding to the first reference harmonic compensation voltage and the second harmonic compensation current corresponding to the second reference harmonic compensation voltage is equal to the odd harmonic current.

[0006] It should be noted that the first device is a network-type device at the fundamental frequency, and the second device is a follow-network type device at the fundamental frequency.

[0007] In some embodiments of this application, the first device and the second device may be an energy storage converter and a photovoltaic inverter in sequence, or the first device and the second device may be a photovoltaic inverter and an energy storage converter in sequence. In other embodiments of this application, the first device and the second device may also be other control devices, such as wind power grid-connected inverters, active power filters, etc., which are not specifically limited in this application.

[0008] In some embodiments of this application, the first device determines a first virtual impedance adjustment coefficient based on a first peak current it acquires. Specifically, this may include: the first device calculating the difference between its first current margin and the first peak current, and determining the corresponding first virtual impedance adjustment coefficient based on this difference. It should be understood that the first current margin can characterize the maximum harmonic current that the first device can carry.

[0009] Thus, based on the difference between the first current margin and the first peak current, which characterizes the remaining harmonic carrying capacity of the first device, an appropriate virtual impedance adjustment coefficient is determined to ensure that the harmonic compensation current corresponding to the first device does not exceed its own carrying capacity. For example, the larger the difference value, the more sufficient the remaining harmonic carrying capacity of the first device. According to the virtual impedance adjustment coefficient, the preset virtual impedance of the first device is reduced, allowing the first device to bear more harmonic compensation current; the smaller the difference value, the more limited the remaining harmonic carrying capacity of the first device. According to the virtual impedance adjustment coefficient, the preset virtual impedance of the first device is increased, reducing the harmonic compensation current of the first device.

[0010] In some embodiments of this application, the second device determines a second virtual impedance adjustment coefficient based on a second peak current it acquires. Specifically, this may include: the second device calculating the difference between its second current margin and the second peak current, and determining the corresponding second virtual impedance adjustment coefficient based on this difference. It should be understood that the second current margin can characterize the maximum harmonic current that the second device can carry.

[0011] Thus, based on the difference between the second current margin and the second peak current, which characterizes the remaining harmonic carrying capacity of the second device, an appropriate virtual impedance adjustment coefficient is determined to ensure that the harmonic compensation current corresponding to the second device does not exceed its own carrying capacity. For example, the larger the difference, the more sufficient the remaining harmonic carrying capacity of the second device. Based on the virtual impedance adjustment coefficient, the preset virtual impedance of the second device is reduced, allowing the second device to bear more harmonic compensation current. Conversely, the smaller the difference, the limited the remaining harmonic carrying capacity of the second device. Based on the virtual impedance adjustment coefficient, the preset virtual impedance of the second device is increased, reducing the harmonic compensation current of the second device.

[0012] It should be noted that odd-order harmonic current refers to harmonic current with an order that is an odd multiple of the fundamental frequency. In a three-phase six-pulse rectification scenario, the odd-order harmonics injected into the grid by this nonlinear load satisfy 6n±1. Odd-order harmonic currents can include positive-sequence harmonic currents and negative-sequence harmonic currents, where the 6n+1th harmonic current is a positive-sequence harmonic current and the 6n-1th harmonic current is a negative-sequence harmonic current, and n is a positive integer. It should be understood that the corresponding harmonic order relationship will change depending on the operating conditions that generate harmonics, and this application does not specifically limit this.

[0013] It should be noted that, in the embodiments of this application, a harmonic extraction algorithm can be used to extract odd-order harmonic currents from the AC current of the bus. For example, harmonic extraction can be performed using methods such as the synchronous reference frame (SRF), cascaded second-order generalized integrator (CSOGI), sliding discrete fourier transform (DFT), notch filter, and adaptive Kalman filter, etc., and this application does not specifically limit the methods used.

[0014] Based on this, this application sets a virtual impedance adjustment coefficient by matching the peak current, and determines the respective reference virtual impedance and harmonic compensation voltage of the first and second devices, enabling the first and second devices to collaboratively compensate for odd harmonic currents. This avoids the problem of excessively high current peaks caused by the first or second device bearing all odd harmonic currents alone, effectively improving the problem of excessively high current peaks caused by the first or second device bearing all odd harmonic currents alone, suppressing the peak output current of the devices, improving the load-carrying capacity of the microgrid, reducing the AC voltage distortion rate of the bus, and optimizing the power quality of the microgrid.

[0015] In one possible implementation of the first aspect described above, the odd harmonic current includes positive-sequence harmonic current and negative-sequence harmonic current, and the virtual impedance adjustment coefficient determined by the peak value of the positive-sequence harmonic current is different from the virtual impedance adjustment coefficient determined by the peak value of the negative-sequence harmonic current.

[0016] In the embodiments of this application, since odd harmonic currents include positive-sequence harmonic currents and negative-sequence harmonic currents, the corresponding virtual impedance adjustment coefficients can be determined based on the peak values ​​of the positive-sequence harmonic currents and the negative-sequence harmonic currents, respectively. That is to say, under the same conditions, the virtual impedance adjustment coefficient obtained from the peak value of the positive-sequence harmonic current can be different from the virtual impedance adjustment coefficient obtained from the peak value of the negative-sequence harmonic current.

[0017] Based on this, different virtual impedance adjustment coefficients are determined according to the peak values ​​of the positive-sequence harmonic current and the negative-sequence harmonic current, respectively. Differentiated collaborative compensation can be performed on the positive and negative sequence odd-order harmonic currents, accurately adapting to the harmonic distribution characteristics under actual operating conditions, further suppressing the peak output current of the energy storage converter, reducing the bus voltage distortion rate, and improving the power quality and load-carrying capacity of the microgrid.

[0018] In one possible implementation of the first aspect above, the first device determines the first reference virtual impedance corresponding to the first device through a first virtual impedance adjustment coefficient, and determines the corresponding first reference harmonic compensation voltage based on the first reference virtual impedance, including: calculating the first reference virtual impedance by multiplying the first virtual impedance adjustment coefficient corresponding to the first device and the preset virtual impedance of the first device; and calculating the first harmonic compensation voltage of the first device by multiplying the first reference virtual impedance and the odd harmonic current.

[0019] In some embodiments of this application, the corresponding virtual impedance adjustment coefficients are obtained based on the positive sequence harmonic current and the negative sequence harmonic current respectively. The virtual impedances of the first device corresponding to the positive sequence and the negative sequence odd harmonics are calculated independently, and then the harmonic compensation voltages corresponding to each sequence are obtained. The first reference harmonic compensation voltage of the first device is then synthesized.

[0020] Based on this, by distinguishing between positive-sequence and negative-sequence harmonics and performing virtual impedance and harmonic compensation voltage calculations separately, differentiated compensation strategies can be configured for positive-sequence and negative-sequence harmonics, adapting to the actual operating characteristics of different harmonic orders and improving the flexibility and adaptability of harmonic compensation.

[0021] In one possible implementation of the first aspect described above, the method further includes: acquiring a reference power frequency voltage of the first device, combining a first harmonic compensation voltage and the reference power frequency voltage of the first device to obtain a reference AC output voltage of the first device; acquiring the actual AC output voltage of the first device, calculating a first voltage difference between the first reference AC output voltage and the actual AC output voltage of the first device; performing closed-loop processing on the first voltage difference to obtain a first reference modulation voltage, performing pulse width modulation on the first reference modulation voltage to obtain a first modulation signal, and using the first modulation signal to control the second device to output the first reference AC voltage.

[0022] In some embodiments of this application, the first voltage difference characterizes the deviation between the reference AC output voltage of the target output of the first device and the actual AC output voltage of the first device acquired in real time. When performing closed-loop processing on the first voltage difference, adjustments are made for both the fundamental component and the odd harmonic components. For the odd harmonic components, either of the following two methods can be used: Method one is to use a proportional-resonant (PR) controller in a stationary coordinate system to adjust the harmonic components in the first voltage difference, using the resonant circuit to eliminate the steady-state error of the odd harmonics. Method two is to convert the odd AC harmonic components into DC quantities using a synchronous rotating coordinate system (SRF), and then use a proportional-integral (PI) controller to adjust the converted DC quantities, eliminating the steady-state error corresponding to the odd harmonics.

[0023] Based on this, the energy storage converter performs closed-loop processing on the first voltage difference to obtain a first reference modulation voltage. This first modulation signal is then generated via pulse width modulation to control the actual AC output voltage of the energy storage converter to approximate the first reference AC output voltage. The first reference AC output voltage is formed by combining a reference power frequency voltage and a first harmonic compensation voltage. This first harmonic compensation voltage is calculated from the first reference virtual impedance and the odd-order harmonic current. Simultaneously, the energy storage converter injects the corresponding harmonic compensation current into the bus while outputting this voltage, thereby partially compensating for the odd-order harmonic currents within the microgrid.

[0024] It should be understood that the first reference virtual impedance, after being adjusted by the virtual impedance adjustment coefficient, can limit the amplitude of the harmonic compensation voltage, ensuring that the harmonic compensation current output by the energy storage converter will not exceed the corresponding available current margin of the energy storage converter. The current margin refers to the remaining current capacity of the energy storage converter that can be used for harmonic compensation after removing the fundamental output current under rated operating conditions and real-time load constraints.

[0025] In other embodiments of this application, after the first device (taking an energy storage converter as an example) determines the first voltage difference, it can perform closed-loop processing on the first voltage difference to obtain the first reference AC output current corresponding to the first reference AC output voltage. Then, it can collect the actual AC output current of the first device, determine the corresponding reference AC output current according to the first reference modulation voltage, calculate the first current difference between the reference AC output current and the actual AC output current of the first device, perform closed-loop processing on the first current difference to obtain the first reference modulation voltage, and perform pulse width modulation on the updated first reference modulation voltage to obtain the first modulation signal. The first modulation signal is used to control the first device to output the reference AC output voltage.

[0026] In one possible implementation of the first aspect above, the second device determines the second reference virtual impedance corresponding to the second device through the virtual impedance adjustment coefficient corresponding to the second device, and determines the corresponding second reference harmonic compensation voltage based on the second reference virtual impedance, including: calculating the second reference virtual impedance by multiplying the second virtual impedance adjustment coefficient corresponding to the second device and the preset virtual impedance of the second device; and calculating the second harmonic compensation voltage of the second device by multiplying the second reference virtual impedance and the odd harmonic current.

[0027] In one possible implementation of the first aspect described above, the method further includes: acquiring the actual AC output voltage of the second device, extracting harmonic voltages from the actual AC output voltage of the second device, and calculating a second voltage difference between the second harmonic compensation voltage of the second device and the actual harmonic voltage of the second device; performing closed-loop processing on the second voltage difference to obtain a second reference harmonic compensation current corresponding to the second device; acquiring the actual AC output current of the second device, extracting harmonic currents from the actual AC output current, and calculating a second current difference between the second reference harmonic compensation current and the actual harmonic current of the second device; performing closed-loop processing on the second current difference to obtain a reference harmonic modulation voltage corresponding to the second device; acquiring the fundamental modulation voltage of the second device, and superimposing the reference harmonic modulation voltage corresponding to the second device with the fundamental modulation voltage to obtain a second reference modulation voltage of the second device; performing pulse width modulation on the second reference modulation voltage of the second device to generate a second modulation signal, the second modulation signal being used to control the second device to output a second reference AC voltage including a power frequency reference voltage and a second reference harmonic compensation voltage.

[0028] It should be noted that the second voltage difference represents the deviation between the target harmonic compensation voltage of the second device and the actual output harmonic voltage. The second current difference represents the deviation between the target harmonic compensation current of the second device and the actual output harmonic current.

[0029] In one possible implementation of the first aspect above, the method for determining the fundamental modulation voltage includes: obtaining the reference power and actual power of the second device, calculating the power difference between the reference power and the actual power, and performing closed-loop processing on the power difference to obtain the fundamental reference current; obtaining the actual fundamental current of the second device, calculating the fundamental current difference between the fundamental reference current and the actual fundamental current; and performing closed-loop processing on the fundamental current difference to obtain the fundamental modulation voltage.

[0030] Secondly, a microgrid control system is provided, comprising a first device and a second device connected in parallel via a bus. The first device includes a first virtual impedance adjustment module, and the second device includes a second virtual impedance adjustment module. The first virtual impedance adjustment module is used to acquire the AC current of the bus, extract the odd harmonic current from the AC current of the bus, determine the first peak current corresponding to the odd harmonic current, and determine the corresponding first virtual impedance adjustment coefficient based on the first peak current. The second virtual impedance adjustment module is used to acquire the AC current of the bus, extract the odd harmonic current from the AC current of the bus, determine the second peak current corresponding to the odd harmonic current, and determine the corresponding second virtual impedance adjustment coefficient based on the second peak current. The first virtual impedance adjustment module is also used to determine the first reference virtual impedance corresponding to the first device through the first virtual impedance adjustment coefficient, and determine the corresponding first reference harmonic compensation voltage based on the first reference virtual impedance. The second virtual impedance adjustment module is also used to determine the second reference virtual impedance corresponding to the second device through the virtual impedance adjustment coefficient corresponding to the second device, and determine the corresponding second reference harmonic compensation voltage based on the second reference virtual impedance. The sum of the first harmonic compensation current corresponding to the first reference harmonic compensation voltage and the second harmonic compensation current corresponding to the second reference harmonic compensation voltage is equal to the odd harmonic current.

[0031] Thirdly, an electronic device is provided, which is either a first device or a second device, comprising: one or more processors; and one or more memories storing one or more programs, which, when executed by one or more processors, cause the electronic device to perform the methods provided by the first aspect and possible implementations thereof.

[0032] Fourthly, a readable storage medium is provided, on which a computer program or instructions are stored, which, when executed, cause an electronic device to perform the methods provided by the first aspect and possible implementations thereof.

[0033] Fifthly, a computer program product is provided, comprising a computer program / instructions that, when executed on an electronic device, cause the electronic device to implement the methods provided by the first aspect and possible implementations of the first aspect.

[0034] It should be noted that the beneficial effects of the second to fifth aspects mentioned above can be referred to the beneficial effects described in the first aspect, and will not be repeated here. Attached Figure Description

[0035] Figure 1 According to some embodiments of this application, a schematic diagram of a microgrid control system simulation structure is shown;

[0036] Figure 2According to some embodiments of this application, a flowchart of a microgrid harmonic control method is shown;

[0037] Figure 3 According to some embodiments of this application, a schematic diagram of the system architecture of a microgrid control system is shown;

[0038] Figure 4 According to some embodiments of this application, a hierarchical topology diagram of a microgrid control system is shown. Detailed Implementation

[0039] The illustrative embodiments of this application include, but are not limited to, a microgrid harmonic control method and system.

[0040] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0041] As mentioned earlier, loads in microgrids typically include nonlinear loads. The nonlinear volt-ampere characteristics of these loads (due to their built-in rectifiers and switching power electronic devices) distort the current flowing through them, generating odd-order harmonic currents. Odd-order harmonic currents refer to harmonic currents with frequencies that are odd multiples of the fundamental frequency. When these harmonic currents flow through the line impedance, they generate harmonic voltages, which are superimposed on the original bus AC voltage, leading to waveform distortion of the bus AC voltage and overload problems for the energy storage converter.

[0042] For example, Figure 1 A schematic diagram of a simulation structure for a microgrid control system is shown. Figure 1 As shown, both the energy storage converter and the photovoltaic inverter are three-phase devices, each with six terminals. Terminals A, B, and C are AC output terminals used to connect to the busbar, while terminals a, b, and c are control or sampling terminals used for internal control signal connections. The A, B, and C phases of both the energy storage converter and the photovoltaic inverter are connected in parallel to the same busbar, which is also used for both linear and nonlinear loads. The busbar serves as the common power transmission line connecting all the devices.

[0043] When a nonlinear load is connected to the bus, the waveform of the current flowing through it will be distorted due to the operating characteristics of its internal circuitry. This current will no longer be a standard 50Hz or 60Hz power frequency sine wave, but rather a distorted waveform containing odd harmonic components. When the power frequency of the bus AC voltage is 50Hz (fundamental frequency), typical harmonic frequencies in the distorted current include harmonics relative to this fundamental frequency, such as 250Hz and 350Hz. When the power frequency of the bus AC voltage is 60Hz (fundamental frequency), typical harmonic frequencies in the distorted current include harmonics relative to this fundamental frequency, such as 300Hz and 420Hz. Since the bus AC voltage in islanded mode is maintained by the energy storage converter, the aforementioned harmonic current needs to be provided by the energy storage converter and flows through the line impedance and the output internal resistance of the energy storage converter, thus generating corresponding harmonic voltages. These harmonic voltages are applied to the fundamental voltage, ultimately causing the bus AC voltage waveform to be distorted.

[0044] To maintain a sinusoidal AC bus voltage, the energy storage converter must output corresponding harmonic compensation current to offset the harmonic voltage generated across the line impedance. However, since photovoltaic inverters only output a fundamental current at 50Hz or 60Hz, they lack the capability to actively output harmonic compensation current. Therefore, the entire harmonic compensation current required to offset harmonic voltage fluctuations is borne by the energy storage converter. This leads to two problems: First, the energy storage converter must simultaneously output both fundamental and harmonic currents, significantly increasing its instantaneous current peak value, which can easily exceed the tolerance range of power devices, posing a risk of overload damage. Second, if the energy storage converter's capacity is insufficient, it cannot completely offset harmonic voltage fluctuations, resulting in continued distortion of the AC bus voltage, reduced power quality, and consequently affecting the normal operation of linear loads.

[0045] Furthermore, the odd-order harmonic currents generated by nonlinear loads are superimposed on the total load current of the bus, significantly increasing the peak current compared to the pure fundamental current and thus increasing the current peak factor. The peak factor of a standard sinusoidal current is 1.414; when the load current includes harmonic currents, the peak factor is greater than 1.414. Under the premise of constant output effective power, excessively high current peaks reduce the effective utilization of electrical energy, while increasing the current stress on inverter power devices, filter inductors, capacitors, and other electrical equipment, thereby reducing equipment lifespan and system stability.

[0046] To address the aforementioned problems, this application proposes a microgrid harmonic control method applicable to microgrid control systems. The microgrid control system includes a first device (such as an energy storage converter) and a second device (such as a photovoltaic inverter) connected in parallel via a bus. The method includes: the first and second devices respectively acquire the AC current of the bus, extract the odd-order harmonic currents from the AC current of the bus and determine the corresponding peak currents, and respectively determine the corresponding virtual impedance adjustment coefficients based on the peak currents to determine the first reference virtual impedance of the first device and the second reference virtual impedance of the second device. A corresponding first reference harmonic compensation voltage is determined based on the first reference virtual impedance, and a corresponding second reference harmonic compensation voltage is determined based on the second reference virtual impedance; the sum of the first harmonic compensation current corresponding to the first reference harmonic compensation voltage and the second harmonic compensation current corresponding to the second reference harmonic compensation voltage equals the odd-order harmonic current.

[0047] It is understandable that when the energy storage converter and the photovoltaic inverter are connected in parallel to the same bus, their equivalent impedance to harmonic currents follows Kirchhoff's current law. The harmonic current can be distributed between them according to the magnitude of the harmonic impedance; the larger the harmonic impedance, the smaller the harmonic current flowing through it. This method sets and adjusts the harmonic impedance of the photovoltaic inverter, enabling the energy storage converter and the photovoltaic inverter to collaboratively bear the harmonic current generated by the nonlinear load. This avoids the overcurrent risk and reduced load-carrying capacity problem caused by the energy storage converter bearing all the harmonic current alone.

[0048] Furthermore, with the harmonic current shared by the energy storage converter and the photovoltaic inverter, the proportion of harmonics in the output current of a single device decreases, effectively suppressing the peak output current of the energy storage converter and reducing the current peak factor. The degree of AC voltage distortion on the bus is reduced, power quality is improved, energy storage capacity is fully utilized, and the overall load-carrying capacity of the microgrid is enhanced.

[0049] It should be noted that the reference virtual impedance of the energy storage converter is the equivalent impedance of the energy storage converter corresponding to the odd harmonics. The reference virtual impedance of the photovoltaic inverter is the equivalent impedance of the photovoltaic inverter corresponding to the odd harmonics. For the negative-sequence and positive-sequence harmonic currents in the odd harmonic currents, corresponding virtual impedance adjustment coefficients are configured respectively. The harmonic compensation reference voltage is generated in real time by multiplying the harmonic current by the virtual impedance. Adjusting the virtual impedance value can separately adjust the harmonic output capability of the energy storage converter and the photovoltaic inverter, realizing the distribution of harmonic compensation current between the two devices and coordinating the compensation of odd harmonic currents.

[0050] It should be noted that odd-order harmonic current refers to harmonic current with a frequency that is an odd multiple of the fundamental frequency. For a three-phase six-pulse rectification scenario, the odd-order harmonic frequencies injected into the grid by this type of nonlinear load satisfy the order 6n±1. The odd-order harmonic current can include both positive-sequence and negative-sequence harmonic currents. The 6n+1th harmonic current is the positive-sequence harmonic current, and the 6n-1th harmonic current is the negative-sequence harmonic current, where n is a positive integer. It should be understood that when the pulse topology changes (e.g., in 12-pulse rectification), the corresponding harmonic order relationship changes accordingly; this application does not specifically limit this.

[0051] For ease of understanding, this application will use the example of odd harmonics satisfying the 6n±1 order relationship to illustrate the following explanation.

[0052] In the embodiments of this application, the first device is a network-type device at the fundamental frequency, and the second device is a follow-network type device at the fundamental frequency.

[0053] In some embodiments of this application, the first device and the second device can be an energy storage converter and a photovoltaic inverter, respectively, or the first device and the second device can be a photovoltaic inverter and an energy storage converter, respectively. In other embodiments of this application, the first device and the second device can also be other power devices, such as wind power grid-connected inverters, active power filters, etc., which are not specifically limited in this application.

[0054] For ease of understanding, this application embodiment uses an energy storage converter as the first device and a photovoltaic inverter as the second device for illustration.

[0055] For example, Figure 2 According to an embodiment of this application, a flowchart of a microgrid harmonic control method is shown.

[0056] S101: The first device and the second device respectively acquire the AC current of the bus, extract the odd harmonic current in the AC current of the bus, and determine the corresponding peak current based on the odd harmonic current.

[0057] In some embodiments of this application, the microgrid control system may include at least one first device (such as an energy storage converter) and at least one second device (such as a photovoltaic inverter). The energy storage converter and the photovoltaic inverter can respectively acquire the AC current of the bus, respectively extract the odd harmonic current in the AC current of the bus, and respectively determine their corresponding peak current based on the odd harmonic current.

[0058] It should be noted that when an energy storage converter supplies power to a load, it means that the energy storage converter receives DC power input from the energy storage battery side, converts the DC power into AC power at the power frequency through an internal inverter circuit, and then processes it through an LC filter circuit composed of a filter inductor and a filter capacitor, outputting a smooth AC output voltage to the common bus, thereby supplying power to the load.

[0059] It should be noted that photovoltaic inverters supplying power to loads means that the photovoltaic inverter receives the DC power input from the photovoltaic array side, converts the DC power into power frequency AC current through the internal inverter circuit, and can also output odd harmonic compensation current. After being processed by the LC filter circuit composed of filter inductor and filter capacitor, it is output to the common bus and works with the energy storage converter to supply power to the load.

[0060] In some embodiments of this application, the microgrid control system can acquire the AC current of the bus, extract the odd harmonic current in the AC current of the bus, and determine the peak current of the odd harmonic current.

[0061] It should be noted that the microgrid control system can use harmonic extraction algorithms to extract odd-order harmonic currents from the AC current of the bus. For example, harmonic extraction can be performed using SRF, cascaded second-order generalized integrator (CSOGI), sliding discrete fourier transform (DFT), notch filter, and adaptive Kalman filter, etc., and this application does not make specific limitations on these methods.

[0062] It should be noted that odd-order harmonic current refers to harmonic currents in the bus AC current whose frequency is an odd multiple of the fundamental frequency. Odd-order harmonics can also refer to the characteristic harmonics injected into the power grid by nonlinear loads. The peak current corresponding to the odd-order harmonic current refers to the maximum instantaneous amplitude that the odd-order harmonic current can reach within one signal cycle. Assuming the bus AC current is ig, and the odd-order harmonic current extracted by the harmonic extraction algorithm is ih, ih is continuously sampled periodically, collecting multiple sets of instantaneous sample values ​​within one complete signal cycle. The maximum value among the sampled data can then be used to calculate the corresponding peak current.

[0063] For example, suppose the extracted expression for the 5th odd harmonic current is: ih = 10sin(5ωt), and the peak current of this harmonic current is 10A. Suppose the extracted expression for the 7th odd harmonic current is: ih = 8sin(7ωt), and the peak current of this harmonic current is 8A. The control system can calculate the peak current of the corresponding harmonic current based on the extracted odd harmonic currents.

[0064] S102: The first device determines the corresponding first virtual impedance adjustment coefficient based on the first peak current obtained by the first device, and the second device determines the corresponding second virtual impedance adjustment coefficient based on the second peak current obtained by the second device.

[0065] In some embodiments of this application, the energy storage converter can determine the corresponding first virtual impedance adjustment coefficient based on the first peak current extracted by the AC current through the bus, and the photovoltaic inverter can determine the corresponding second virtual impedance adjustment coefficient based on the second peak current extracted by the AC current through the bus.

[0066] In some embodiments of this application, the energy storage converter determines a first virtual impedance adjustment coefficient based on a first peak current it acquires. Specifically, this may include: the energy storage converter calculating the difference between its first current margin and the first peak current, and determining the corresponding first virtual impedance adjustment coefficient based on this difference. It should be understood that the first current margin can characterize the maximum harmonic current that the energy storage converter can carry.

[0067] Thus, the difference between the first current margin and the first peak current characterizes the residual harmonic carrying capacity of the energy storage converter, and a suitable virtual impedance adjustment coefficient is determined to ensure that the harmonic compensation current corresponding to the energy storage converter does not exceed its own carrying capacity. For example, the larger the difference value, the more sufficient the residual harmonic carrying capacity of the energy storage converter. Based on the virtual impedance adjustment coefficient, the preset virtual impedance of the energy storage converter is reduced, allowing the energy storage converter to bear more harmonic compensation current. Conversely, the smaller the difference value, the more limited the residual harmonic carrying capacity of the energy storage converter. Based on the virtual impedance adjustment coefficient, the preset virtual impedance of the energy storage converter is increased, reducing the harmonic compensation current of the energy storage converter.

[0068] In some embodiments of this application, the photovoltaic inverter determines a second virtual impedance adjustment coefficient based on a second peak current it acquires. Specifically, this may include: the photovoltaic inverter calculating the difference between its second current margin and the second peak current, and determining the corresponding second virtual impedance adjustment coefficient based on this difference. It should be understood that the second current margin can characterize the maximum harmonic current that the second device can carry.

[0069] Thus, the difference between the second current margin and the second peak current characterizes the residual harmonic carrying capacity of the photovoltaic inverter, determining the appropriate virtual impedance adjustment coefficient to ensure that the harmonic compensation current corresponding to the photovoltaic inverter does not exceed its own carrying capacity. For example, a larger difference indicates a more sufficient residual harmonic carrying capacity of the photovoltaic inverter. Based on the virtual impedance adjustment coefficient, the preset virtual impedance of the photovoltaic inverter is reduced, allowing the photovoltaic inverter to handle more harmonic compensation current. Conversely, a smaller difference indicates a limited residual harmonic carrying capacity of the photovoltaic inverter. Based on the virtual impedance adjustment coefficient, the preset virtual impedance of the photovoltaic inverter is increased, reducing the harmonic compensation current of the photovoltaic inverter.

[0070] In some embodiments of this application, after the energy storage converter and the photovoltaic inverter each extract the odd-order harmonic currents from the AC bus current, they can further distinguish between the positive-sequence harmonic currents and the negative-sequence harmonic currents within the odd-order harmonic currents, and obtain the peak currents corresponding to the positive-sequence and negative-sequence harmonic currents respectively. For both the positive-sequence and negative-sequence harmonic components, the corresponding differences can be calculated in conjunction with the equipment current margin, and then the independent positive-sequence virtual impedance adjustment coefficients and negative-sequence virtual impedance adjustment coefficients can be obtained respectively.

[0071] In some embodiments of this application, a mapping relationship between the virtual impedance adjustment coefficient and the difference can be pre-established. The difference is the difference between the current margin of the device and the peak current. This application does not specifically limit the mapping relationship; the mapping relationship can be linear or nonlinear. Thus, the energy storage converter and the photovoltaic inverter can calculate the difference based on the peak current corresponding to the odd harmonic current, and adjust the virtual impedance of the energy storage converter and the photovoltaic inverter based on the difference, thereby adjusting the distribution ratio of the odd harmonic current between the energy storage converter and the photovoltaic inverter.

[0072] S103: The first device determines the first reference virtual impedance corresponding to the first device through the first virtual impedance adjustment coefficient, and determines the corresponding first reference harmonic compensation voltage based on the first reference virtual impedance.

[0073] In some embodiments of this application, after determining the first virtual impedance adjustment coefficient, the energy storage converter can obtain its first reference virtual impedance by multiplying the first virtual impedance adjustment coefficient by a preset virtual impedance. Then, the first harmonic compensation voltage of the energy storage converter is obtained by multiplying the first reference virtual impedance by the odd harmonic current.

[0074] In some embodiments of this application, the specific process of obtaining the first reference virtual impedance of the energy storage converter by calculating the product of a virtual impedance adjustment coefficient and a preset virtual impedance of the energy storage converter may include: for the positive-sequence harmonic current in the odd-order harmonic current, obtaining the positive-sequence virtual impedance adjustment coefficient based on this component, and multiplying the positive-sequence virtual impedance adjustment coefficient by the preset virtual impedance of the energy storage converter to obtain the positive-sequence reference virtual impedance. For the negative-sequence harmonic current in the odd-order harmonic current, obtaining the negative-sequence virtual impedance adjustment coefficient based on this component, and multiplying the negative-sequence virtual impedance adjustment coefficient by the preset virtual impedance of the energy storage converter to obtain the negative-sequence reference virtual impedance. The first reference virtual impedance of the energy storage converter may include the positive-sequence reference virtual impedance and the negative-sequence reference virtual impedance corresponding to the energy storage converter.

[0075] In some embodiments of this application, the specific process of obtaining the first harmonic compensation voltage of the energy storage converter by calculating the product of the first reference virtual impedance and the odd harmonic current may include: multiplying the positive-sequence reference virtual impedance of the energy storage converter with the positive-sequence harmonic current in the odd harmonic current to obtain the positive-sequence harmonic compensation voltage; multiplying the negative-sequence reference virtual impedance with the negative-sequence harmonic current in the odd harmonic current to obtain the negative-sequence harmonic compensation voltage; and combining the positive-sequence harmonic compensation voltage and the negative-sequence harmonic compensation voltage to obtain the first harmonic compensation voltage of the energy storage converter.

[0076] In some embodiments of this application, after the energy storage converter determines the first harmonic compensation voltage corresponding to the energy storage converter, the reference power frequency voltage of the energy storage converter can be obtained, and the first harmonic compensation voltage and the reference power frequency voltage of the energy storage converter can be combined to obtain the first reference AC output voltage of the energy storage converter.

[0077] In some embodiments of this application, after the energy storage converter obtains the first reference AC output voltage of the energy storage converter, it can collect the actual AC output voltage of the energy storage converter, calculate the first voltage difference between the first reference AC output voltage and the actual AC output voltage of the energy storage converter, perform closed-loop processing on the first voltage difference to obtain the first reference modulation voltage, and generate the first modulation signal through pulse width modulation to control the actual AC output voltage of the energy storage converter to approach the first reference AC output voltage.

[0078] It should be noted that the first voltage difference characterizes the deviation between the reference AC output voltage of the first device's target output and the actual AC output voltage of the first device acquired in real time. When performing closed-loop processing on the first voltage difference, it can be decomposed into a fundamental component and odd harmonic components, and adjusted separately. The fundamental component undergoes fundamental voltage closed-loop regulation; for the odd harmonic components, either of the following two methods can be used: Method one is to use a proportional-resonant (PR) controller in a stationary coordinate system to adjust the odd harmonic components in the first voltage difference, utilizing the resonant element to eliminate the steady-state error of the odd harmonics. Method two is to convert the odd AC harmonic components into DC quantities using a synchronous rotating coordinate system (SRF), and then use a proportional-integral (PI) controller to adjust the converted DC quantities, eliminating the steady-state error corresponding to the odd harmonics.

[0079] In other embodiments of this application, after the energy storage converter determines the first voltage difference, it can also perform closed-loop processing on the first voltage difference to obtain the first reference AC output current corresponding to the first reference AC output voltage, then collect the actual AC output current of the first device, determine the corresponding reference AC output current according to the first reference modulation voltage, calculate the first current difference between the reference AC output current and the actual AC output current of the first device, perform closed-loop processing on the first current difference to obtain the first reference modulation voltage; and perform pulse width modulation on the updated first reference modulation voltage to obtain the first modulation signal, which is used to control the first device to output the reference AC output voltage.

[0080] It should be noted that the first current difference characterizes the deviation between the first reference AC output current of the energy storage converter and the actual AC output current of the energy storage converter obtained in real time. The energy storage converter obtains a first reference modulation voltage, and pulse-width modulates the first reference modulation voltage to obtain a first modulation signal. Specifically, this may include: comparing the first reference modulation voltage with a carrier signal to generate a first modulation signal; using the first modulation signal to drive the power switching devices inside the energy storage converter; and controlling the output voltage of the energy storage converter to follow the first reference AC output voltage.

[0081] It should be understood that the carrier signal is a pre-set high-frequency periodic oscillation signal within the microgrid control system. It is typically a triangular or sawtooth wave with a fixed frequency and amplitude, and its frequency is much higher than the fundamental frequency and the 6n±1st harmonic frequency of the power grid. During pulse width modulation (PWM), the first reference modulation voltage, serving as the modulation wave, is compared with the high-frequency carrier signal in real time. The output level is flipped in real time based on the amplitude relationship between the two, thereby generating a series of high-frequency pulse signals with real-time changing duty cycles—the first modulation signal. By adjusting the duty cycle of the modulation pulses, the target voltage waveform is obtained equivalent to the high-frequency pulse sequence, enabling the AC output voltage of the energy storage converter to accurately follow the reference voltage waveform resulting from the superposition of the base power frequency voltage and harmonic compensation voltage.

[0082] Based on this, a first reference modulation voltage is obtained by closed-loop processing according to the first current difference corresponding to the energy storage converter. This voltage is then used to generate a first modulation signal via pulse width modulation, precisely controlling the actual AC output voltage of the energy storage converter to follow the first reference AC output voltage. The first reference AC output voltage is formed by combining a reference power frequency voltage and a first harmonic compensation voltage. This first harmonic compensation voltage is obtained through calculation using a first reference virtual impedance and odd-order harmonic currents. While following the first reference AC output voltage, the energy storage converter outputs a harmonic compensation current, achieving partial compensation for the 6n±1 harmonic current within the microgrid. It should be understood that the first reference virtual impedance, adjusted by a virtual impedance adjustment coefficient, can limit the amplitude of the harmonic compensation voltage, ensuring that the harmonic compensation current output by the energy storage converter does not exceed the available current margin corresponding to the energy storage converter. The current margin refers to the remaining current capacity of the energy storage converter under rated operating conditions and real-time load constraints, after removing the fundamental output current, which can be used for harmonic compensation.

[0083] S104: The second device determines the second reference virtual impedance corresponding to the second device through the second virtual impedance adjustment coefficient, and determines the corresponding second reference harmonic compensation voltage according to the second reference virtual impedance; wherein, the sum of the first harmonic compensation current corresponding to the first reference harmonic compensation voltage and the second harmonic compensation current corresponding to the second reference harmonic compensation voltage is equal to the odd harmonic current.

[0084] In some embodiments of this application, after determining the second virtual impedance adjustment coefficient based on the acquired second peak current, the photovoltaic inverter can obtain its second reference virtual impedance by calculating the product of the second device virtual impedance adjustment coefficient and the preset virtual impedance of the photovoltaic inverter. Then, the second harmonic compensation voltage of the photovoltaic inverter is obtained by calculating the product of the second reference virtual impedance and the odd harmonic current.

[0085] In some embodiments of this application, the specific process of obtaining the second reference virtual impedance of the photovoltaic inverter by calculating the product of the virtual impedance adjustment coefficient and the preset virtual impedance of the photovoltaic inverter may include: for the positive-sequence harmonic current in the odd-order harmonic current, obtaining the positive-sequence virtual impedance adjustment coefficient based on this component, and multiplying the positive-sequence virtual impedance adjustment coefficient by the preset virtual impedance of the photovoltaic inverter to obtain the positive-sequence reference virtual impedance corresponding to the photovoltaic inverter. For the negative-sequence harmonic current in the odd-order harmonic current, obtaining the negative-sequence virtual impedance adjustment coefficient based on this component, and multiplying the negative-sequence virtual impedance adjustment coefficient by the preset virtual impedance of the photovoltaic inverter to obtain the negative-sequence reference virtual impedance corresponding to the photovoltaic inverter. The second reference virtual impedance of the photovoltaic inverter may include the positive-sequence reference virtual impedance and the negative-sequence reference virtual impedance corresponding to the photovoltaic inverter.

[0086] In some embodiments of this application, the specific process of obtaining the second harmonic compensation voltage of a photovoltaic inverter by calculating the product of the second reference virtual impedance of the photovoltaic inverter and the odd harmonic current may include: multiplying the positive-sequence reference virtual impedance corresponding to the photovoltaic inverter with the positive-sequence harmonic current in the odd harmonic current to obtain the positive-sequence harmonic compensation voltage corresponding to the photovoltaic inverter; multiplying the negative-sequence reference virtual impedance corresponding to the photovoltaic inverter with the negative-sequence harmonic current in the odd harmonic current to obtain the negative-sequence harmonic compensation voltage corresponding to the photovoltaic inverter; and synthesizing the positive-sequence harmonic compensation voltage and the negative-sequence harmonic compensation voltage corresponding to the photovoltaic inverter to obtain the second harmonic compensation voltage of the photovoltaic inverter.

[0087] In some embodiments of this application, after the photovoltaic inverter determines the second harmonic compensation voltage, the actual AC output voltage of the photovoltaic inverter can be collected, and the harmonic voltage can be extracted from the actual AC output voltage of the photovoltaic inverter. The second voltage difference between the second harmonic compensation voltage of the photovoltaic inverter and the actual harmonic voltage of the photovoltaic inverter can be calculated. The microgrid control system can perform closed-loop processing on the second voltage difference to obtain the second reference harmonic compensation current corresponding to the photovoltaic inverter.

[0088] It should be noted that this second voltage difference characterizes the deviation between the target harmonic compensation voltage and the actual output harmonic voltage of the photovoltaic inverter. Closed-loop regulation of this second voltage difference yields the second reference harmonic compensation current of the photovoltaic inverter. Specifically, closed-loop regulation of the 6n±1 harmonic can be achieved in two ways: Method one involves using a proportional-resonant controller in a stationary coordinate system to eliminate the steady-state deviation corresponding to the 6n±1 harmonic, relying on the resonant element. Method two involves converting the 6n±1 AC harmonic current into a DC current using an SRF (Sequentially Variable Resonant Controller), and then using a proportional-integral controller for closed-loop regulation to eliminate the steady-state deviation corresponding to the 6n±1 harmonic.

[0089] In some embodiments of this application, after determining the second reference harmonic compensation current corresponding to the photovoltaic inverter, the microgrid control system can collect the actual AC output current of the photovoltaic inverter, extract the actual harmonic current of the photovoltaic inverter from the actual AC output current, calculate the second current difference between the second reference harmonic compensation current and the actual harmonic current of the photovoltaic inverter, and perform closed-loop processing on the second current difference to obtain the reference harmonic modulation voltage corresponding to the photovoltaic inverter. Next, the fundamental modulation voltage of the photovoltaic inverter is obtained, and the reference harmonic modulation voltage corresponding to the photovoltaic inverter is superimposed with the fundamental modulation voltage to obtain the second reference modulation voltage of the photovoltaic inverter. Finally, pulse width modulation is applied to the second reference modulation voltage of the photovoltaic inverter to generate a second modulation signal. The second modulation signal is used to control the photovoltaic inverter to output a second reference AC voltage, which includes the power frequency reference voltage and the second reference harmonic compensation voltage.

[0090] It should be noted that the second current difference characterizes the deviation between the target harmonic compensation current and the actual output harmonic current of the photovoltaic inverter. Its closed-loop regulation method is consistent with the harmonic regulation method of the second voltage difference, which can eliminate the steady-state deviation corresponding to the 6n±1 harmonic.

[0091] In some embodiments of this application, the determination of the fundamental modulation voltage of a photovoltaic inverter may include: obtaining the reference power and actual power of the photovoltaic inverter, calculating the power difference between the reference power and the actual power, and performing closed-loop processing on the power difference to obtain the fundamental reference current; obtaining the actual fundamental current of the photovoltaic inverter, calculating the fundamental current difference between the fundamental reference current and the actual fundamental current; and performing closed-loop processing on the fundamental current difference to obtain the fundamental modulation voltage.

[0092] Specifically, the photovoltaic inverter is equipped with a maximum power point tracking (MPPT) mechanism to adjust the operating voltage of the photovoltaic array so that the array operates at its maximum power output point, thereby generating a reference power. The power difference is calculated by collecting the actual power generated by the photovoltaic inverter during operation. This power difference is then processed in a closed loop, i.e., proportional-integral calculation is performed on the power difference to obtain the fundamental reference current. Further, the actual fundamental current of the photovoltaic inverter is collected, and the fundamental current difference between the fundamental reference current and the actual fundamental current is calculated. This fundamental current difference is then processed in a closed loop to obtain the fundamental modulation voltage.

[0093] In some embodiments of this application, the microgrid control system superimposes a reference harmonic modulation voltage onto the fundamental modulation voltage to obtain a second reference modulation voltage for the photovoltaic inverter. The second reference modulation voltage is compared in real time with a system-preset high-frequency carrier signal, and the output level is flipped in real time according to the amplitude relationship to generate a dynamically adjustable high-frequency pulse signal as the second modulation signal. The second modulation signal drives the power switching devices of the photovoltaic inverter, controlling the AC output voltage of the photovoltaic inverter to accurately follow the target voltage waveform formed by the superposition of the reference power frequency voltage and the second harmonic compensation voltage, so that the photovoltaic inverter outputs a matched second harmonic compensation current.

[0094] Based on this, photovoltaic inverters can be used in conjunction with energy storage converters to achieve graded harmonic compensation. The energy storage converter partially compensates for the 6n±1st harmonic current within its own current margin range. The remaining harmonic current is offset by the second harmonic compensation current output by the photovoltaic inverter. The superposition of the two compensation currents can completely compensate for the odd-order harmonic currents within the microgrid. Simultaneously, since the second reference virtual impedance is also adaptively tuned via a virtual impedance adjustment coefficient, the harmonic output amplitude of the photovoltaic inverter can be strictly constrained, ensuring that the harmonic compensation output of the photovoltaic inverter does not exceed its own current margin. This achieves precise harmonic compensation across the entire range without affecting the stable operation of the equipment.

[0095] The above methods achieve two main advantages. First, the harmonic compensation current required to offset harmonic voltage fluctuations can be distributed between the photovoltaic inverter and the energy storage converter, preventing the energy storage converter from bearing the entire harmonic compensation task alone. This effectively reduces the instantaneous current peak of the energy storage converter and eliminates the risk of power device damage due to overload. Even if the available capacity of the energy storage converter is limited, the photovoltaic inverter can supplement the remaining harmonic compensation components, still effectively suppressing bus voltage distortion, ensuring power quality, and maintaining the bus AC voltage close to a sinusoidal waveform. Second, the energy storage converter and the photovoltaic inverter share the 6n±1st harmonic current, reducing the peak value and peak factor of the total bus current, thereby improving the energy utilization efficiency while maintaining the same output effective power.

[0096] Furthermore, this solution eliminates the need for an additional active power filter (APF) and a central controller to issue harmonic compensation commands. It autonomously distributes harmonic output using a virtual impedance mechanism, reducing hardware investment and lowering the complexity of the control system. The harmonic compensation logic is executed based on real-time sampling on the device itself, eliminating cross-device command transmission delays and improving harmonic suppression under transient conditions such as sudden load changes.

[0097] This application also provides a microgrid control system, for example, Figure 3 According to an embodiment of this application, a schematic diagram of the system architecture of a microgrid control system 300 is shown.

[0098] refer to Figure 3 The microgrid control system 300 includes a first device and a second device connected in parallel via a bus, the bus, and a load. The first device includes a first virtual impedance regulation module, and the second device includes a second virtual impedance regulation module. It should be noted that the load includes both linear and nonlinear loads.

[0099] The first virtual impedance adjustment module is used to acquire the AC current of the bus, extract the odd harmonic current in the AC current of the bus, determine the first peak current corresponding to the odd harmonic current, and determine the corresponding first virtual impedance adjustment coefficient based on the first peak current; the second virtual impedance adjustment module is used to acquire the AC current of the bus, extract the odd harmonic current in the AC current of the bus, determine the second peak current corresponding to the odd harmonic current, and determine the corresponding second virtual impedance adjustment coefficient based on the second peak current.

[0100] The first virtual impedance adjustment module is further configured to determine the first reference virtual impedance corresponding to the first device through the first virtual impedance adjustment coefficient, and determine the corresponding first reference harmonic compensation voltage based on the first reference virtual impedance; the second virtual impedance adjustment module is further configured to determine the second reference virtual impedance corresponding to the second device through the virtual impedance adjustment coefficient corresponding to the second device, and determine the corresponding second reference harmonic compensation voltage based on the second reference virtual impedance; wherein, the sum of the first harmonic compensation current corresponding to the first reference harmonic compensation voltage and the second harmonic compensation current corresponding to the second reference harmonic compensation voltage is equal to the odd harmonic current.

[0101] Continue to refer to Figure 3 The microgrid control system 300 also includes a first closed-loop control module, a second closed-loop control module and a third closed-loop control module.

[0102] In some embodiments of this application, the first closed-loop regulation module is used to obtain the reference power frequency voltage of the first device, combine the first harmonic compensation voltage and the reference power frequency voltage of the energy storage converter to obtain the reference AC output voltage of the first device, collect the actual AC output voltage of the first device, calculate the first voltage difference between the first reference AC output voltage and the actual AC output voltage of the first device, and perform closed-loop processing on the first voltage difference to obtain the first reference modulation voltage.

[0103] In other embodiments of this application, the first closed-loop regulation module is used to obtain the reference power frequency voltage of the first device, combine the first harmonic compensation voltage and the reference power frequency voltage of the energy storage converter to obtain the reference AC output voltage of the first device, collect the actual AC output voltage of the first device, calculate the first voltage difference between the first reference AC output voltage and the actual AC output voltage of the first device, perform closed-loop processing on the first voltage difference to obtain the first reference AC output current corresponding to the first reference AC output voltage, collect the actual AC output current of the first device, calculate the first current difference between the first reference AC output current and the actual AC output current of the energy storage converter, and perform closed-loop processing on the first current difference to obtain the first reference modulation voltage.

[0104] In some embodiments of this application, the microgrid control system 300 further includes a modulation loop corresponding to the first device. The modulation loop can be used to pulse-width modulate the first reference modulation voltage to obtain a first modulation signal. The first modulation signal is used to control the first device to output a first reference AC voltage.

[0105] The second closed-loop regulation module corresponding to the second device is used to collect the actual AC output voltage of the second device, extract the harmonic voltage from the actual AC output voltage of the photovoltaic inverter, calculate the second voltage difference between the second harmonic compensation voltage of the second device and the actual harmonic voltage of the second device, perform closed-loop processing on the second voltage difference to obtain the second reference harmonic compensation current corresponding to the second device, collect the actual AC output current of the second device, extract the harmonic current from the actual AC output current, calculate the second current difference between the second reference harmonic compensation current and the actual harmonic current of the second device, and perform closed-loop processing on the second current difference to obtain the reference harmonic modulation voltage corresponding to the second device.

[0106] The third closed-loop regulation module corresponding to the second device is used to obtain the reference power and actual power of the second device, calculate the power difference between the reference power and the actual power, perform closed-loop processing on the power difference to obtain the fundamental reference current; obtain the actual fundamental current of the second device, calculate the fundamental current difference between the fundamental reference current and the actual fundamental current; and perform closed-loop processing on the fundamental current difference to obtain the fundamental modulation voltage.

[0107] In some embodiments of this application, the microgrid control system 300 further includes a modulation loop corresponding to the second device. The modulation loop can be used to superimpose the reference harmonic modulation voltage output by the second closed-loop regulation module with the fundamental modulation voltage output by the third closed-loop regulation module to obtain a second reference modulation voltage. The second reference modulation voltage is pulse-width modulated to obtain a second modulation signal. The second modulation signal is used to control the second device to output a second AC voltage containing a fundamental component and harmonic compensation components.

[0108] Figure 4 According to an embodiment of this application, a schematic diagram of the hierarchical topology of the software control module and hardware power loop of a microgrid control system is shown.

[0109] refer to Figure 4 The topology is Figure 3 The detailed system architecture of the microgrid control system 300 is shown. The microgrid control system 300 includes an energy storage converter (corresponding to...). Figure 3 The first device), first virtual impedance regulation module 30, voltage closed-loop control module 31, current closed-loop control module 32, modulation loop 33, photovoltaic inverter (corresponding to Figure 3 The second device), second virtual impedance adjustment module 40, voltage closed-loop control module 41, current closed-loop control module 42, power control module 51, fundamental current control module 52 and modulation loop 43.

[0110] The first virtual impedance adjustment module 30 is used to acquire the AC current of the bus, extract the odd harmonic current in the AC current of the bus, determine the first peak current of the odd harmonic current, determine the corresponding first virtual impedance adjustment coefficient based on the first peak current, determine the first harmonic impedance of the energy storage converter through the first virtual impedance adjustment coefficient, and determine the corresponding first reference harmonic compensation voltage based on the first harmonic impedance.

[0111] The voltage closed-loop control module 31 and the current closed-loop control module 32 together constitute the first closed-loop control module corresponding to the energy storage converter. The voltage closed-loop control module 31 is used to acquire the reference power frequency voltage of the energy storage converter, combine the first harmonic compensation voltage and the reference power frequency voltage of the energy storage converter to obtain the reference AC output voltage of the energy storage converter, acquire the actual AC output voltage of the energy storage converter, calculate the first voltage difference between the first reference AC output voltage and the actual AC output voltage of the energy storage converter, and perform closed-loop processing on the first voltage difference to obtain the first reference AC output current corresponding to the first reference AC output voltage. The current closed-loop control module 32 is used to acquire the actual AC output current of the energy storage converter, calculate the first current difference between the first reference AC output current and the actual AC output current of the energy storage converter, and perform closed-loop processing on the first current difference to obtain the first reference modulation voltage. It should be noted that the actual AC output voltage of the energy storage converter can refer to the voltage across the filter capacitor of the energy storage converter. The actual AC output current of the energy storage converter can refer to the current of the filter inductor of the energy storage converter.

[0112] The modulation loop 33 is used to pulse-width modulate the first reference modulation voltage to obtain a first modulation signal, and the first modulation signal is used to control the energy storage converter to output a first reference AC voltage.

[0113] The energy storage converter is used to receive the first modulation signal to perform AC-DC power conversion, output AC power to the common bus, and output the first harmonic compensation current to work with the photovoltaic inverter to cancel the odd harmonic current generated by the nonlinear load on the bus side.

[0114] Specifically, the hardware circuit of the energy storage converter includes a power transistor (IGBT) 1, a filter inductor Lf1, a line inductor Lg1, a damping resistor Rf1, a line resistor Rg1, a filter capacitor Cf1, and a bleeder resistor Rc1. IGBT 1 is the internal power switching device of the energy storage converter, used to receive the first modulation signal output from the modulation loop 33 to perform high-frequency chopping of the DC power, outputting a high-frequency pulse voltage that follows the instantaneous reference voltage change. The filter inductor Lf1 and the line inductor Lg1 work together to filter out the high-frequency switching harmonics generated by the switching action of IGBT 1, smoothing the converter output current and effectively suppressing current ripple. The damping resistor Rf1 and the line resistor Rg1 are connected in series in the inductor branch, effectively damping the resonance phenomenon of the LC filter network and preventing oscillations and waveform distortion in the output voltage and current. The filter capacitor Cf1 is connected in parallel to the AC output terminal of the energy storage converter to stabilize the port AC voltage and improve the steady-state characteristics of the output voltage. A bleeder resistor Rc1 is connected in parallel across the filter capacitor Cf1 to reduce harmonic voltage distortion under steady-state and load abrupt changes, and to optimize the output waveform quality under harmonic compensation conditions. The high-frequency pulse voltage output by IGBT1 is processed by the LC filter branch composed of Lf1, Lg1, and Cf1 to obtain a smooth AC voltage that matches the instantaneous reference voltage at each moment. Finally, AC power containing the first harmonic compensation component is output to the common bus to cancel the odd harmonics of the bus and realize the system harmonic collaborative compensation.

[0115] The second virtual impedance adjustment module 40 is used to obtain the AC current of the bus, extract the odd harmonic current in the AC current of the bus, determine the second peak current of the odd harmonic current, and also to determine the second harmonic impedance of the photovoltaic inverter through the virtual impedance adjustment coefficient, and determine the corresponding second reference harmonic compensation voltage based on the second harmonic impedance.

[0116] The voltage closed-loop control module 41 and the current closed-loop control module 42 together constitute the second closed-loop control module. The voltage closed-loop control module 41 is used to acquire the actual AC output voltage of the photovoltaic inverter, extract harmonic voltages from the actual AC output voltage, calculate the second voltage difference between the second harmonic compensation voltage and the actual harmonic voltage of the photovoltaic inverter, and perform closed-loop processing on the second voltage difference to obtain the corresponding second reference harmonic compensation current of the photovoltaic inverter. The current closed-loop control module 42 is used to acquire the actual AC output current of the photovoltaic inverter, extract harmonic currents from the actual AC output current, calculate the second current difference between the second reference harmonic compensation current and the actual harmonic current of the photovoltaic inverter, and perform closed-loop processing on the second current difference to obtain the corresponding reference harmonic modulation voltage of the photovoltaic inverter. It should be noted that the actual AC output voltage of the photovoltaic inverter can refer to the voltage across the filter capacitor of the photovoltaic inverter. The actual AC output current of the photovoltaic inverter can refer to the current of the filter inductor of the photovoltaic inverter.

[0117] The power control module 51 and the fundamental current control module 52 together constitute the third closed-loop control module. The power control module 51 acquires the reference power and actual power of the photovoltaic inverter, calculates the power difference between the reference power and the actual power, and performs closed-loop processing on the power difference to obtain the fundamental reference current. The fundamental current control module 52 acquires the actual fundamental current of the photovoltaic inverter, calculates the fundamental current difference between the fundamental reference current and the actual fundamental current, and performs closed-loop processing on the fundamental current difference to obtain the fundamental modulation voltage. It should be noted that the actual fundamental current of the photovoltaic inverter can refer to the current obtained after extracting the fundamental component from the filter inductor current of the photovoltaic inverter.

[0118] The modulation loop 43 is used to superimpose the reference harmonic modulation voltage output by the second closed-loop regulation module with the fundamental modulation voltage output by the third closed-loop regulation module to obtain the second reference modulation voltage, and to perform pulse width modulation on the second reference modulation voltage to obtain the second modulation signal.

[0119] The photovoltaic inverter is used to receive the second modulation signal to complete the AC-DC power conversion, and output the fundamental current and the second harmonic compensation current to the common bus. It works with the energy storage converter to jointly offset the odd harmonic current generated by the nonlinear load on the bus side.

[0120] Specifically, the hardware circuit of the photovoltaic inverter includes IGBT2, filter inductor Lf2, line inductor Lg2, damping resistor Rf2, line resistor Rg2, filter capacitor Cf2, and bleeder resistor Rc2. IGBT2 is the power switching device inside the photovoltaic inverter, used to receive the second modulation signal output from modulation loop 43 to chop the DC power, outputting a high-frequency pulse voltage that varies with the instantaneous reference voltage. Filter inductor Lf2 and line inductor Lg2 are used to filter out high-frequency switching harmonics generated by the IGBT2 switch, smoothing the output current and reducing current ripple. Damping resistor Rf2 and line resistor Rg2 are connected in series in the inductor branch to suppress resonance in the LC filter circuit and prevent voltage and current waveform oscillation distortion. Filter capacitor Cf2 is connected in parallel at the output of the photovoltaic inverter to stabilize the AC output voltage. Bleeder resistor Rc2 is connected in parallel across filter capacitor Cf2 to weaken harmonic voltage distortion under steady-state and load abrupt changes, optimizing the output waveform quality under harmonic compensation conditions. The high-frequency pulse voltage output by IGBT2 is processed by the LC filter branch composed of filter inductor Lf2, line inductor Lg2, and filter capacitor Cf2 to obtain a smooth AC voltage containing the fundamental component and the second harmonic compensation component. This smooth AC voltage is then transmitted to the common bus and works with the energy storage converter to jointly offset the odd harmonic current generated by the nonlinear load of the bus, thus achieving harmonic collaborative compensation.

[0121] based on Figure 4 The layered topology shown allows for decoupling of the software control module from the hardware power circuit. A virtual impedance regulation module dynamically allocates the harmonic compensation ratio between the energy storage converter and the photovoltaic inverter. The energy storage converter establishes the bus voltage and undertakes part of the harmonic compensation task through voltage-type closed-loop control. The photovoltaic inverter, through independent fundamental wave control and harmonic compensation control channels, shares the remaining harmonic compensation task while outputting power. Together, they manage odd-order harmonics on the bus. This layered structure facilitates control algorithm iteration and hardware fault diagnosis, while effectively reducing the harmonic current stress on a single converter, improving the operational stability of the islanded microgrid and the power quality of the common bus.

[0122] This application also provides an electronic device, which is a first device or a second device, including: one or more processors; one or more memories storing one or more programs, which, when executed by one or more processors, cause the electronic device to perform the method provided in this application.

[0123] This application also provides a readable storage medium storing a computer program or instructions, which, when executed, causes an electronic device to perform the method provided in this application.

[0124] This application also provides a computer program product, which includes a computer program / instructions that, when executed on an electronic device, cause the electronic device to implement the method provided in this application.

[0125] The embodiments disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0126] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digit gate processor, a microcontroller, an application-specific integrated circuit, or a microprocessor.

[0127] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0128] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, optical discs, magneto-optical disks, ROM, RAM, magnetic cards or optical cards, or tangible machine-readable memories for transmitting information using electrical, optical, acoustic, or other forms of propagation signals via the Internet (e.g., carrier waves, infrared signal digit gating, etc.). Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.

[0129] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, including structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.

[0130] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.

[0131] It should be noted that in the examples and description of this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0132] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.

Claims

1. A microgrid harmonic control method, characterized in that, Applied to a microgrid control system, the microgrid control system including a first device and a second device connected in parallel via a bus; The method includes: The first device and the second device respectively acquire the AC current of the bus, extract the odd harmonic current in the AC current of the bus, and obtain the corresponding peak current based on the odd harmonic current. The first device determines a first virtual impedance adjustment coefficient based on a first peak current obtained by the first device, and the second device determines a second virtual impedance adjustment coefficient based on a second peak current obtained by the second device. The first device determines the first reference virtual impedance corresponding to the first device through the first virtual impedance adjustment coefficient, and determines the corresponding first reference harmonic compensation voltage based on the first reference virtual impedance. The second device determines the second reference virtual impedance corresponding to the second device through the virtual impedance adjustment coefficient corresponding to the second device, and determines the corresponding second reference harmonic compensation voltage based on the second reference virtual impedance; Wherein, the sum of the first harmonic compensation current corresponding to the first reference harmonic compensation voltage and the second harmonic compensation current corresponding to the second reference harmonic compensation voltage is equal to the odd harmonic current.

2. The method according to claim 1, characterized in that, The odd harmonic currents include positive-sequence harmonic currents and negative-sequence harmonic currents. The virtual impedance adjustment coefficient determined by the peak value of the positive-sequence harmonic current is different from the virtual impedance adjustment coefficient determined by the peak value of the negative-sequence harmonic current.

3. The method according to claim 1, characterized in that, The first device determines the first reference virtual impedance corresponding to the first device through the first virtual impedance adjustment coefficient, and determines the corresponding first reference harmonic compensation voltage based on the first reference virtual impedance, including: The first reference virtual impedance is obtained by multiplying the first virtual impedance adjustment coefficient corresponding to the first device and the preset virtual impedance of the first device. The first harmonic compensation voltage of the first device is obtained by calculating the product of the first reference virtual impedance and the odd harmonic current.

4. The method according to claim 3, characterized in that, The method further includes: Obtain the reference power frequency voltage of the first device, and combine the first harmonic compensation voltage and the reference power frequency voltage of the first device to obtain the reference AC output voltage of the first device; Collect the actual AC output voltage of the first device, and calculate the first voltage difference between the first reference AC output voltage and the actual AC output voltage of the first device; The first voltage difference is processed in a closed loop to obtain a first reference modulation voltage. The first reference modulation voltage is pulse-width modulated to obtain a first modulation signal. The first modulation signal is used to control the second device to output a first reference AC voltage.

5. The method according to claim 1, characterized in that, The second device determines the second reference virtual impedance corresponding to the second device through the virtual impedance adjustment coefficient corresponding to the second device, and determines the corresponding second reference harmonic compensation voltage based on the second reference virtual impedance, including: The second reference virtual impedance is obtained by multiplying the second virtual impedance adjustment coefficient corresponding to the second device and the preset virtual impedance of the second device. The second harmonic compensation voltage of the second device is obtained by calculating the product of the second reference virtual impedance and the odd harmonic current.

6. The method according to claim 5, characterized in that, The method further includes: The actual AC output voltage of the second device is collected, the harmonic voltage is extracted from the actual AC output voltage of the second device, and the second voltage difference between the second harmonic compensation voltage of the second device and the actual harmonic voltage of the second device is calculated. The second reference harmonic compensation current corresponding to the second device is obtained by performing closed-loop processing on the second voltage difference; The actual AC output current of the second device is collected, the harmonic current is extracted from the actual AC output current, and the second current difference between the second reference harmonic compensation current and the actual harmonic current of the second device is calculated. The reference harmonic modulation voltage corresponding to the second device is obtained by performing closed-loop processing on the second current difference; Obtain the fundamental modulation voltage of the second device, and superimpose the reference harmonic modulation voltage corresponding to the second device with the fundamental modulation voltage to obtain the second reference modulation voltage of the second device; The second reference modulation voltage of the second device is pulse-width modulated to generate a second modulation signal. The second modulation signal is used to control the output of the second device to include a second reference AC voltage, which includes a power frequency reference voltage and a second reference harmonic compensation voltage.

7. The method according to claim 6, characterized in that, The method for determining the fundamental modulation voltage includes: Obtain the reference power and actual power of the second device, calculate the power difference between the reference power and the actual power, and perform closed-loop processing on the power difference to obtain the fundamental reference current; Obtain the actual fundamental current of the second device, and calculate the fundamental current difference between the fundamental reference current and the actual fundamental current; The fundamental current difference is processed in a closed loop to obtain the fundamental modulation voltage.

8. A microgrid control system, characterized in that, The microgrid control system includes a first device and a second device connected in parallel via a bus. The first device includes a first virtual impedance adjustment module, and the second device includes a second virtual impedance adjustment module. The first virtual impedance adjustment module is used to acquire the AC current of the bus, extract the odd harmonic current in the AC current of the bus, determine the first peak current corresponding to the odd harmonic current, and determine the corresponding first virtual impedance adjustment coefficient based on the first peak current. The second virtual impedance adjustment module is used to acquire the AC current of the bus, extract the odd harmonic current in the AC current of the bus, determine the second peak current corresponding to the odd harmonic current, and determine the corresponding second virtual impedance adjustment coefficient based on the second peak current. The first virtual impedance adjustment module is further configured to determine the first reference virtual impedance corresponding to the first device through the first virtual impedance adjustment coefficient, and determine the corresponding first reference harmonic compensation voltage based on the first reference virtual impedance. The second virtual impedance adjustment module is further configured to determine the second reference virtual impedance corresponding to the second device through the virtual impedance adjustment coefficient corresponding to the second device, and determine the corresponding second reference harmonic compensation voltage based on the second reference virtual impedance; Wherein, the sum of the first harmonic compensation current corresponding to the first reference harmonic compensation voltage and the second harmonic compensation current corresponding to the second reference harmonic compensation voltage is equal to the odd harmonic current.

9. An electronic device, characterized in that, The electronic device is a first device or a second device, comprising: one or more processors; the one or more memories storing one or more programs, which, when executed by the one or more processors, cause the electronic device to perform the method of any one of claims 1 to 7.

10. A readable storage medium, characterized in that, The readable storage medium stores a computer program or instructions that, when executed, cause the electronic device to perform the method of any one of claims 1 to 7.

11. A computer program product, characterized in that, Includes a computer program / instruction that, when executed on an electronic device, causes the electronic device to perform the method of any one of claims 1 to 7.