Multifunctional power quality flexible compensation device and method

By using a multifunctional power quality flexible compensation device, which utilizes DC bus capacitors and power quality flexible compensation modules, combined with adaptive control of the control module, the problems of grid voltage fluctuations and harmonic distortion in traditional methods are solved. This enables power mutual assistance and power quality management between grids, thereby improving grid stability and adaptability.

CN122512419APending Publication Date: 2026-08-04SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN POWER SUPPLY BUREAU
Filing Date
2026-05-08
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Traditional methods cannot achieve multi-objective power quality management based on real-time grid operating conditions. Especially after a high proportion of distributed power sources such as photovoltaic and wind power are connected to the grid, problems such as grid voltage fluctuations and current harmonic distortion are difficult to solve effectively.

Method used

A multifunctional power quality flexible compensation device is adopted, including a DC bus capacitor and two power quality flexible compensation modules. The control module acquires grid signals in real time and adaptively selects modes such as active power mutual assistance, voltage stabilization or harmonic suppression to realize power mutual assistance and power quality management between the two grids.

Benefits of technology

It achieves active power mutual assistance between the two power grids, stabilizes voltage and suppresses harmonics, improves the stability of power grid operation and power quality, adapts to various power grid disturbance scenarios, has strong general reusability of control logic, and has a wide range of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122512419A_ABST
    Figure CN122512419A_ABST
Patent Text Reader

Abstract

The application relates to a multifunctional power quality flexible compensation device and method. The device comprises a DC bus capacitor, a first power quality flexible compensation module, a second power quality flexible compensation module and a control module; the AC side of the first power quality flexible compensation module is used for being connected with a first power grid, and the DC side is connected with the DC bus capacitor; the AC side of the second power quality flexible compensation module is used for being connected with a second power grid, and the DC side is connected with the DC bus capacitor; the control module is used for acquiring a first electric signal of the first power grid and a second electric signal of the second power grid, determining a target mode from multiple preset modes according to the first electric signal and the second electric signal, and controlling the first power quality flexible compensation module and the second power quality flexible compensation module to work in the target mode. The device can adaptively select a target working mode and flexibly adapt to different power grid disturbance scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power electronics technology, and in particular to a multifunctional power quality flexible compensation device and method. Background Technology

[0002] When distributed power sources such as photovoltaics and wind power are connected to the grid at a high proportion via power electronic converters, power quality problems such as grid voltage fluctuations and current harmonic distortion are easily caused. In traditional technology, a shared DC bus architecture is used in the control of frequency converter well groups. Energy saving and DC bus voltage stabilization are achieved through energy mutual feedback of multiple frequency converters, and power setting and energy consumption optimization are only performed under fixed operating conditions.

[0003] However, current traditional methods have the technical problem of being unable to achieve multi-objective power quality management based on real-time grid operating conditions. Summary of the Invention

[0004] Therefore, it is necessary to provide a multifunctional flexible power quality compensation device and method capable of multi-objective power quality management to address the aforementioned technical problems.

[0005] In a first aspect, this application provides a multifunctional power quality flexible compensation device, comprising:

[0006] DC bus capacitor;

[0007] The first power quality flexible compensation module has its AC side connected to the first power grid and its DC side connected to the DC bus capacitor.

[0008] The second power quality flexible compensation module has its AC side connected to the second power grid and its DC side connected to the DC bus capacitor.

[0009] The control module is used to acquire the first electrical signal of the first power grid and the second electrical signal of the second power grid, determine the target mode from multiple preset modes based on the first electrical signal and the second electrical signal, and control the first power quality flexible compensation module and the second power quality flexible compensation module to work in the target mode.

[0010] In one embodiment, the target mode includes an active power mutual assistance mode, a voltage stabilization mode, or a harmonic suppression mode; wherein,

[0011] In the active power mutual assistance mode, the first power quality flexible compensation module and the second power quality flexible compensation module are used to transmit active power from the third power grid to the fourth power grid. The third power grid is the one with higher voltage between the first power grid and the second power grid, and the fourth power grid is the one with lower voltage between the first power grid and the second power grid.

[0012] The voltage stabilization mode is used to stabilize AC voltage or DC bus voltage. When stabilizing AC voltage, the first power quality flexible compensation module and the second power quality flexible compensation module are used to suppress voltage fluctuations in the first power grid and the second power grid, respectively, to maintain AC voltage stability. When stabilizing DC bus voltage, the first power quality flexible compensation module and the second power quality flexible compensation module work together to stabilize the voltage of the DC bus capacitor and suppress DC bus voltage fluctuations.

[0013] The harmonic suppression mode is used to suppress AC current harmonics. In the harmonic suppression mode, the first power quality flexible compensation module and the second power quality flexible compensation module are used to cancel and suppress the current harmonics of the first power grid and the second power grid, respectively.

[0014] In one embodiment, the target mode includes an active power mutual assistance mode; the first electrical signal includes a first voltage of a first power grid, and the second electrical signal includes a second voltage of a second power grid;

[0015] The control module is also used to determine the target mode as active power mutual assistance mode when the deviation between the first voltage and the second voltage exceeds a preset deviation threshold, and to control the first power quality flexible compensation module and the second power quality flexible compensation module to work in active power mutual assistance mode.

[0016] In one embodiment, the target mode includes a voltage stabilization mode; the first electrical signal includes a first voltage and a first current of a first power grid, and the second electrical signal includes a second voltage and a second current of a second power grid;

[0017] The control module is also used to determine the target mode as voltage stability mode when the AC voltages of the first power grid and the second power grid are both normal and the harmonics of the first current and the second current are both below the preset limit value, and to control the first power quality flexible compensation module and the second power quality flexible compensation module to work in voltage stability mode.

[0018] In one embodiment, the target mode includes a harmonic suppression mode; the first electrical signal includes a first voltage and a first current of a first power grid, and the second electrical signal includes a second voltage and a second current of a second power grid;

[0019] The control module is also used to determine the target mode as harmonic suppression mode when the AC voltages of the first power grid and the second power grid are normal and the harmonics of the first current or the second current exceed the preset limit value, and to control the first power quality flexible compensation module and the second power quality flexible compensation module to work in harmonic suppression mode.

[0020] In one embodiment, the target mode includes an active power mutual assistance mode; the control module has built-in identical control logic adapted to both compensation modules respectively. For the first power quality flexible compensation module, the first electrical signal includes the three-phase voltage and the three-phase current of the first power grid. The control module includes:

[0021] The first transformation unit is used to perform Parker transformation on the first electrical signal to obtain the actual d-axis voltage, actual q-axis voltage, actual d-axis current, and actual q-axis current.

[0022] The first control unit is used to obtain the actual DC bus voltage of the DC bus capacitor, calculate the difference between the given DC bus voltage and the actual DC bus voltage, and generate a d-axis current command through a proportional-integral controller; obtain the reactive power of the corresponding grid load, and obtain a q-axis current command by combining the actual d-axis voltage; calculate the difference between the actual d-axis current and the d-axis current command, subtract the decoupling compensation term from the difference through a proportional-integral controller, and add the actual d-axis voltage to obtain the d-axis voltage command; calculate the difference between the actual q-axis current and the q-axis current command, subtract the decoupling compensation term from the difference through a proportional-integral controller, and add the actual q-axis voltage to obtain the q-axis voltage command.

[0023] The second conversion unit is used to perform inverse Parker transformation on the d-axis voltage command and the q-axis voltage command to generate a three-phase modulated voltage command to control the first power quality flexible compensation module.

[0024] In one embodiment, the target mode includes a voltage stability mode; the control module has built-in identical control logic adapted to both compensation modules respectively. For the first power quality flexible compensation module, the first electrical signal includes the three-phase current of the first power grid, and the control module includes:

[0025] The third transformation unit is used to perform Parker transformation on the first electrical signal to obtain the actual d-axis current and the actual q-axis current.

[0026] The second control unit is used to perform low-pass filtering on the actual d-axis current and the actual q-axis current respectively to obtain the fundamental d-axis current component and the fundamental q-axis current component; to superimpose the fundamental d-axis current component with the compensation current reference command to synthesize the d-axis control current; and to switch to the q-axis given reference current through the mode switching unit to replace the fundamental q-axis current component and synthesize the q-axis control current.

[0027] The fourth transformation unit is used to perform inverse Parker transformation on the d-axis control current and the q-axis control current to obtain the fundamental current command; the fundamental current command is subtracted from the first electrical signal to generate a compensation current reference command to control the first power quality flexible compensation module.

[0028] In one embodiment, the target mode includes a harmonic suppression mode; the control module has built-in identical control logic adapted to both compensation modules. For the first power quality flexible compensation module, the first electrical signal includes the three-phase current of the first power grid, and the control module includes:

[0029] The fifth transformation unit is used to perform Parker transformation on the first electrical signal to obtain the actual d-axis current and the actual q-axis current.

[0030] The third control unit is used to perform low-pass filtering on the actual d-axis current and the actual q-axis current respectively to obtain the fundamental d-axis current component and the fundamental q-axis current component; to superimpose the fundamental d-axis current component with the compensation current reference command to synthesize the d-axis control current; and to directly use the fundamental q-axis current component as the q-axis control current.

[0031] The sixth transformation unit is used to perform inverse Parker transformation on the d-axis control current and the q-axis control current to obtain the fundamental current command; the fundamental current command is subtracted from the first electrical signal to generate a compensation current reference command to control the first power quality flexible compensation module.

[0032] Secondly, this application also provides a power grid system, including a first power grid, a second power grid, and a multifunctional power quality flexible compensation device, comprising:

[0033] The first power grid is used to output three-phase alternating current.

[0034] The multifunctional power quality flexible compensation device is used to acquire electrical signals from the first power grid and the second power grid, and switch to any one of the active power mutual assistance mode, voltage stability mode, and harmonic suppression mode according to the electrical signals to perform power quality flexible compensation and power coordination control on the first power grid and the second power grid.

[0035] The second power grid is used to output three-phase alternating current.

[0036] Thirdly, this application also provides a multifunctional power quality flexible compensation method, including:

[0037] Acquire the first electrical signal from the first power grid and the second electrical signal from the second power grid;

[0038] The target mode is determined from multiple preset modes based on the first and second electrical signals;

[0039] Control the first power quality flexible compensation module and the second power quality flexible compensation module to operate in the target mode.

[0040] The aforementioned multifunctional power quality flexible compensation device, method, and power grid system include a DC bus capacitor, a first power quality flexible compensation module, a second power quality flexible compensation module, and a control module. The AC side of the first power quality flexible compensation module is connected to a first power grid, and the DC side is connected to the DC bus capacitor. The AC side of the second power quality flexible compensation module is connected to a second power grid, and the DC side is connected to the DC bus capacitor. The control module is used to acquire a first electrical signal from the first power grid and a second electrical signal from the second power grid, determine a target mode from multiple preset modes based on the first and second electrical signals, and control the first and second power quality flexible compensation modules to operate in the target mode. Two flexible power quality compensation modules are set up to connect to the first and second power grids respectively. The two modules share a DC bus capacitor to form a common DC bus, which can realize active power mutual assistance and energy exchange between the two power grids, effectively suppress power fluctuations in the power grid and improve the overall operational stability of the power grid. By independently configuring a control module to uniformly collect electrical signals from the two power grids and adaptively select the target operating mode, the operation of the two flexible power quality compensation modules can be adjusted as needed, flexibly adapting to different power grid disturbance scenarios, realizing multi-mode flexible power quality compensation. The overall structure is simple and compact, the control logic is universal and reusable, the application range is wider, and it has good engineering practical value. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 A diagram of a multifunctional power quality flexible compensation device in one embodiment;

[0043] Figure 2 This is a schematic diagram of a multifunctional power quality flexible compensation device in one embodiment.

[0044] Figure 3 This is a diagram of the active power mutual assistance mode control strategy in one embodiment;

[0045] Figure 4 This is a diagram illustrating a voltage stabilization mode or harmonic suppression mode control strategy in one embodiment;

[0046] Figure 5 This is a flowchart illustrating the steps of a multifunctional power quality flexible compensation system in one embodiment.

[0047] Figure 6 This is a diagram illustrating the voltage stabilization control function.

[0048] Figure 7 This is a diagram illustrating the effect of current harmonic suppression.

[0049] Figure 8 This is a diagram illustrating the effect of DC voltage fluctuation suppression.

[0050] Figure 9 This is a diagram illustrating the effect of active power mutual assistance.

[0051] Explanation of reference numerals in the attached drawings: 101, First power grid; 102, First power quality flexible compensation module; 103, DC bus capacitor; 104, Second power quality flexible compensation module; 105, Second power grid; 106, Control module; 1061, First conversion unit; 1062, First control unit; 1063, Second conversion unit; 1064, Third conversion unit; 1065, Second control unit; 1066, Fourth conversion unit; 1067, Fifth conversion unit; 1068, Third control unit; 1069, Sixth conversion unit. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0053] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0054] In one exemplary embodiment, such as Figure 1 , 2 As shown, a method for a multifunctional power quality flexible compensation device is provided, comprising:

[0055] DC bus capacitor 103;

[0056] The first power quality flexible compensation module 102 has its AC side connected to the first power grid 101 and its DC side connected to the DC bus capacitor 103.

[0057] The second power quality flexible compensation module 104 has its AC side connected to the second power grid 105 and its DC side connected to the DC bus capacitor 103.

[0058] The control module 106 is used to acquire the first electrical signal of the first power grid 101 and the second electrical signal of the second power grid 105, determine the target mode from multiple preset modes based on the first electrical signal and the second electrical signal, and control the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to work in the target mode.

[0059] For example, both the first power grid 101 and the second power grid 105 are three-phase AC distribution networks. Both the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 adopt a three-phase voltage source converter structure. The DC side of the two compensation modules is connected to both ends of the DC bus capacitor 103, and the common DC bus capacitor 103 is shared to realize the active power interconnection and energy mutual assistance between the two power grids.

[0060] The control module 106 acquires the three-phase current and three-phase voltage of the first power grid 101 as the first electrical signal, and acquires the three-phase current and three-phase voltage of the second power grid 105 as the second electrical signal.

[0061] The control module 106 can communicate with the host computer. The host computer sends mode scheduling instructions, operating parameters and threshold configurations to the control module 106. The control module 106 combines the configuration parameters of the host computer with the first electrical signal and the second electrical signal collected in real time, and adaptively determines the current target mode from the preset voltage stabilization mode and harmonic suppression mode.

[0062] After determining the target mode, the control module 106 calls the built-in unified control logic to perform corresponding control operations on the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 respectively: first, the acquired first electrical signal and second electrical signal are sequentially processed by Parker transformation and low-pass filtering; then, according to the determined target mode, the d / q axis current synthesis and mode switching operations are completed; finally, through inverse Parker transformation and current difference calculation, the corresponding compensation current reference command is generated to drive the two compensation modules to run synchronously in the target mode, so as to realize grid harmonic suppression, voltage stability and power mutual assistance between the two grids.

[0063] Meanwhile, the control module 106 can transmit the system's operating status and mode information back to the host computer, enabling remote monitoring and remote mode scheduling.

[0064] The aforementioned multifunctional power quality flexible compensation device includes a DC bus capacitor 103, a first power quality flexible compensation module 102, a second power quality flexible compensation module 104, and a control module 106. The AC side of the first power quality flexible compensation module 102 is connected to the first power grid 101, and the DC side is connected to the DC bus capacitor 103. The AC side of the second power quality flexible compensation module 104 is connected to the second power grid 105, and the DC side is connected to the DC bus capacitor 103. The control module 106 is used to acquire the first electrical signal of the first power grid 101 and the second electrical signal of the second power grid 105, and determine the target mode from multiple preset modes based on the first and second electrical signals, and control the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to work in the target mode. By setting up a first power quality flexible compensation module 102 and a second power quality flexible compensation module 104, which are respectively connected to the first power grid 101 and the second power grid 105, and the two modules share a DC bus capacitor 103 to form a common DC bus structure, active power mutual assistance and energy allocation between the two power grids can be realized, effectively suppressing power disturbances and improving the stability of power grid supply. At the same time, the control module 106 uniformly acquires the electrical signals of the two power grids and autonomously determines the target operating mode, which can flexibly manage the two compensation modules to adapt to different power quality management needs. The overall topology layout is simple, the control logic is highly universal, and it can be compatible with multiple operating scenarios, significantly improving engineering practicality and adaptability.

[0065] In one embodiment, the target mode includes an active power mutual assistance mode, a voltage stabilization mode, or a harmonic suppression mode; wherein,

[0066] In the active power mutual assistance mode, the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 are used to transmit active power from the third power grid to the fourth power grid. The third power grid is the one with higher voltage among the first power grid 101 and the second power grid 105, and the fourth power grid is the one with lower voltage among the first power grid 101 and the second power grid 105.

[0067] The voltage stabilization mode is used to stabilize the AC voltage or the DC bus capacitor 103 voltage. When stabilizing the AC voltage, the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 are used to suppress voltage fluctuations in the first power grid 101 and the second power grid 105, respectively, to maintain AC voltage stability. When stabilizing the DC bus voltage, the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 work together to stabilize the voltage of the DC bus capacitor 103 and suppress DC bus voltage fluctuations.

[0068] The harmonic suppression mode is used to suppress AC current harmonics. In the harmonic suppression mode, the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 are used to cancel and suppress the current harmonics of the first power grid 101 and the second power grid 105, respectively.

[0069] For example, in the active power mutual assistance mode, based on the voltage levels of the first grid 101 and the second grid 105, the grid with the higher voltage is designated as the third grid and the grid with the lower voltage as the fourth grid. The first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 complete the cross-grid transmission of active power from the third grid to the fourth grid. The voltage stabilization mode combines AC voltage stabilization and DC bus capacitor 103 voltage stabilization functions. When stabilizing the AC voltage, the two compensation modules suppress voltage fluctuations in the first grid 101 and the second grid 105 to maintain AC voltage stability. When stabilizing the DC bus voltage, the two compensation modules work together to suppress voltage fluctuations in the DC bus capacitor 103. The harmonic suppression mode focuses on AC current harmonic mitigation. The first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 cancel and filter the current harmonics in the first grid 101 and the second grid 105, respectively.

[0070] In the above embodiments, by setting three operating modes—active power mutual assistance, voltage stabilization, and harmonic suppression—the device achieves functional integration and switchable operating conditions. The active power mutual assistance mode can automatically achieve bidirectional power exchange and mutual assistance based on the voltage status of the first grid 101 and the second grid 105, balancing the power differences between the grids and smoothing load fluctuations. The voltage stabilization mode can take into account both AC side voltage regulation and common DC bus capacitor 103 voltage stabilization, simultaneously improving the system voltage operation stability from both AC and DC sides. The harmonic suppression mode can accurately manage the harmonics of the currents in the first grid 101 and the second grid 105 respectively, improving the power quality of the grid. The overall mode division is clear and the functional division is well-defined, which can adapt to various practical application scenarios such as grid power allocation, voltage support, and harmonic management, greatly improving the operational flexibility and adaptability to operating conditions.

[0071] In one embodiment, the target mode includes an active power mutual assistance mode; the first electrical signal includes a first voltage of the first power grid 101, and the second electrical signal includes a second voltage of the second power grid 105;

[0072] The control module is also used to determine the target mode as active power mutual assistance mode when the deviation between the first voltage and the second voltage exceeds a preset deviation threshold, and to control the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to work in active power mutual assistance mode.

[0073] For example, the target mode is set with an active power mutual assistance mode. The first electrical signal includes the first voltage of the first power grid 101, and the second electrical signal includes the second voltage of the second power grid 105. The first voltage and the second voltage are both single-phase voltages of the corresponding power grids. After the control module 106 obtains the first voltage of the first power grid 101 and the second voltage of the second power grid 105, when the voltage difference between the two exceeds the preset deviation threshold, it determines that the current target mode is the active power mutual assistance mode, and controls the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to operate in the active power mutual assistance mode accordingly.

[0074] In the above embodiments, the control module 106 acquires the voltage signals of the first power grid 101 and the second power grid 105 in real time, and automatically switches to the active power mutual assistance mode with the voltage deviation between the two power grids as the trigger condition. This drives the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to carry out cross-power grid power allocation. There is no need to manually set the mode, which realizes the adaptive intelligent switching of the operation mode. It can quickly balance the voltage difference between the first power grid 101 and the second power grid 105, smooth the power grid fluctuations, and effectively improve the voltage balance and overall power supply reliability of the parallel operation of the two power grids.

[0075] In one embodiment, the target mode includes a voltage stabilization mode; the first electrical signal includes a first voltage and a first current of the first power grid 101, and the second electrical signal includes a second voltage and a second current of the second power grid 105;

[0076] The control module is also used to determine the target mode as voltage stability mode when the AC voltages of the first power grid 101 and the second power grid 105 are normal and the harmonics of the first current and the second current are both lower than the preset limit value, and to control the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to work in voltage stability mode.

[0077] For example, the target mode includes a voltage stabilization mode, which can stabilize AC and DC voltages. The first electrical signal includes the first voltage and first current of the first power grid 101, and the second electrical signal includes the second voltage and second current of the second power grid 105. The first voltage and second voltage are both single-phase voltages of the corresponding power grids, and the first current and second current are both single-phase currents of the corresponding power grids. When the AC voltages of the first power grid 101 and the second power grid 105 are both within the normal range, and the harmonic content of the first current corresponding to the first power grid 101 and the second current corresponding to the second power grid 105 are both lower than preset limits, the control module 106 determines that the target mode is a voltage stabilization mode and controls the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to operate in the voltage stabilization mode.

[0078] In the above embodiments, the control module 106 uses the voltage conditions and current harmonic levels of the first power grid 101 and the second power grid 105 as judgment conditions to adaptively switch to the voltage stability mode and schedule the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to work, realizing intelligent and autonomous switching of the operating mode; it provides dedicated voltage steady-state support under the condition of normal grid voltage and low harmonic pollution, without the need for additional harmonic mitigation functions. The division of labor is clear and the operating conditions are highly adaptable, which can continuously maintain the AC voltage stability of the first power grid 101 and the second power grid 105, effectively improving the voltage quality and power supply stability of the dual power grids.

[0079] In one embodiment, the target mode includes a harmonic suppression mode; the first electrical signal includes a first voltage and a first current of the first power grid 101, and the second electrical signal includes a second voltage and a second current of the second power grid 105;

[0080] The control module is also used to determine the target mode as harmonic suppression mode when the AC voltages of the first power grid 101 and the second power grid 105 are normal and the harmonics of the first current or the second current exceed the preset limit value, and to control the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to work in harmonic suppression mode.

[0081] For example, the target mode includes a harmonic suppression mode. The first electrical signal includes the first voltage and the first current of the first power grid 101, and the second electrical signal includes the second voltage and the second current of the second power grid 105. The first voltage and the second voltage are both single-phase voltages of the corresponding power grids, and the first current and the second current are both single-phase currents of the corresponding power grids. When the AC voltages of the first power grid 101 and the second power grid 105 are both within the normal range, and the harmonic content of the first current of the first power grid 101 or the second current of the second power grid 105 exceeds a preset limit, the control module 106 determines that the target mode is a harmonic suppression mode and controls the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to work in the harmonic suppression mode.

[0082] In the above embodiments, the control module 106 uses the AC voltage status and current harmonic content of the first power grid 101 and the second power grid 105 as criteria to automatically switch to harmonic suppression mode when the power grid voltage is normal but the current harmonic of any line exceeds the limit. This drives the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to carry out targeted harmonic cancellation and management, realizing adaptive identification of operating conditions and intelligent mode switching. This can accurately suppress harmonic interference of the first power grid 101 and the second power grid 105, effectively improve the waveform quality of the power grid, reduce the adverse effects of harmonics on electrical equipment and lines, and improve the power quality and reliability of the dual power grid system.

[0083] In one embodiment, the target mode includes an active power mutual assistance mode; the control module 106 has built-in identical control logic adapted to the two compensation modules respectively. For the first power quality flexible compensation module 102, the first electrical signal includes the three-phase voltage and the three-phase current of the first power grid 101. The control module 106 includes:

[0084] The first transformation unit 1061 is used to perform Parker transformation processing on the first electrical signal to obtain the actual d-axis voltage, actual q-axis voltage, actual d-axis current, and actual q-axis current.

[0085] The first control unit 1062 is used to obtain the actual DC bus voltage of the DC bus capacitor, calculate the difference between the given DC bus voltage and the actual DC bus voltage, and generate a d-axis current command through a proportional-integral controller; obtain the reactive power of the corresponding grid load, and obtain a q-axis current command by combining the actual d-axis voltage; calculate the difference between the actual d-axis current and the d-axis current command, subtract the decoupling compensation term from the difference through a proportional-integral controller, and add the actual d-axis voltage to obtain a d-axis voltage command; calculate the difference between the actual q-axis current and the q-axis current command, subtract the decoupling compensation term from the difference through a proportional-integral controller, and add the actual q-axis voltage to obtain a q-axis voltage command.

[0086] The second conversion unit 1063 is used to perform inverse Parker transformation processing on the d-axis voltage command and the q-axis voltage command to generate a three-phase modulated voltage command to control the first power quality flexible compensation module.

[0087] For example, such as Figure 3 As shown, the target mode includes an active power mutual assistance mode. The control module 106 has built-in control logic that is adapted to the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 respectively. For the first power quality flexible compensation module 102, the first electrical signal obtained includes the three-phase voltage and three-phase current of the first power grid 101. The control module 106 is provided with a first conversion unit 1061, a first control unit 1062, and a second conversion unit 1063.

[0088] The first conversion unit 1061 is used to perform Parker conversion processing on the three-phase voltage and three-phase current of the first power grid 101, and decouple them to obtain the actual d-axis voltage up1, the actual q-axis voltage uq1, the actual d-axis current ip1, and the actual q-axis current iq1 respectively;

[0089] The first control unit 1062 includes a current command generation stage and a current decoupling control stage: the current command generation stage acquires the actual DC bus voltage Udc of the DC bus capacitor 103, calculates the difference between the given DC bus voltage U*dc and the actual DC bus voltage Udc, and uses the difference to generate the d-axis current command ip1 via a proportional-integral controller. Simultaneously, it acquires the reactive power command Q1I of the corresponding grid load, and calculates and generates the q-axis current command iq1* based on the actual d-axis voltage up1; the current decoupling control stage calculates the difference between the actual d-axis current ip1 and the d-axis current command ip1, and subtracts the decoupling compensation term from the difference after adjustment by the proportional-integral controller. The actual d-axis voltage up1 is superimposed to obtain the d-axis voltage command up1. At the same time, the difference between the actual q-axis current iq1 and the q-axis current command iq1 is calculated, and the difference is adjusted by the proportional-integral controller and then a decoupling compensation term is added. And superimpose the actual q-axis voltage uq1 to obtain the q-axis voltage command uq1;

[0090] The second conversion unit 1063 is used to perform inverse Parker transformation on the d-axis voltage command up1 and the q-axis voltage command uq1 to generate three-phase modulation signals Sa2, Sb2, and Sc2. At the same time, the actual DC bus voltage Udc of the DC bus capacitor 103 is halved to obtain hudc1. The three-phase modulation signals Sa2, Sb2, and Sc2 are divided by hudc1 to generate the final drive signals Sa1, Sb1, and Sc1, so as to control the first power quality flexible compensation module 102.

[0091] In the above embodiments, the first conversion unit 1061, the first control unit 1062, and the second conversion unit 1063 are configured through the control module 106. The coordinate decoupling of the three-phase voltage and three-phase current of the first power grid 101 is achieved by relying on Parker transformation and inverse Parker transformation. Combined with the voltage closed loop of DC bus capacitor 103 and the current command generated by reactive power, and then through proportional integral regulation, decoupling compensation, and feedforward voltage superposition, the modulation voltage command is accurately generated. This enables high-precision decoupling control of the first power quality flexible compensation module 102, dynamically adapts to the power scheduling requirements under the active power mutual assistance mode, effectively realizes accurate transmission of active power and flexible adjustment of reactive power, stabilizes the voltage of DC bus capacitor 103, suppresses system coupling disturbances and steady-state errors, has regular control logic, and the two sets of compensation modules can share the same control architecture. It has strong reusability, fast dynamic response, and significantly improves the operational stability and control accuracy of the active power mutual assistance process of the dual power grid.

[0092] In one embodiment, the target mode includes a voltage stability mode; the control module 106 has built-in identical control logic adapted to the two compensation modules respectively. For the first power quality flexible compensation module 102, the first electrical signal includes the three-phase current of the first power grid. The control module 106 includes:

[0093] The third transformation unit 1064 is used to perform Parker transformation on the first electrical signal to obtain the actual d-axis current and the actual q-axis current.

[0094] The second control unit 1065 is used to perform low-pass filtering on the actual d-axis current and the actual q-axis current respectively to obtain the fundamental d-axis current component and the fundamental q-axis current component; to superimpose the fundamental d-axis current component with the compensation current reference command to synthesize the d-axis control current; and to switch to the q-axis given reference current through the mode switching unit to replace the fundamental q-axis current component and synthesize the q-axis control current.

[0095] The fourth transformation unit 1066 is used to perform inverse Park transformation processing on the d-axis control current and the q-axis control current to obtain the fundamental current command; the fundamental current command is subtracted from the first electrical signal to generate a compensation current reference command to control the first power quality flexible compensation module 102.

[0096] For example, such as Figure 4 As shown, the target mode includes a voltage stability mode. The control module 106 has built-in identical control logic adapted to the first power quality flexible compensation module 102 and the second power quality flexible compensation module 105, respectively. For the first power quality flexible compensation module 102, the first electrical signal includes the three-phase current of the first power grid. The control module 106 includes a third conversion unit 1064, a second control unit 1065, and a fourth conversion unit 1066. The third conversion unit 1064 is used to perform Parker transformation on the first electrical signal to obtain the actual d-axis current. Actual q-axis current The second control unit 1065 controls the actual d-axis current. With actual q-axis current Low-pass filtering is performed separately to obtain the fundamental d-axis current component. With the fundamental q-axis current component The fundamental d-axis current component I Ld Compensation current reference command The currents are superimposed to obtain the d-axis control current, and the q-axis reference current is switched in by mode switching. Replace the original fundamental q-axis current component The q-axis control current is then synthesized; the fourth transformation unit 1066 performs inverse Parker transformation on the d-axis control current and the q-axis control current to obtain the three-phase fundamental current command, and then combines the fundamental current command with the first electrical signal. Perform interpolation calculations to generate compensation current reference instructions. This enables the regulation of the first power quality flexible compensation module 102.

[0097] In the above embodiments, the control module 106 works collaboratively through the third conversion unit 1064, the second control unit 1065, and the fourth conversion unit 1066. It relies on Parker transformation to achieve decoupling control of the three-phase current of the first power grid 101. It accurately extracts the fundamental current component through low-pass filtering and flexibly configures the q-axis current reference in combination with the mode switching unit. Finally, it generates a compensation current reference command through inverse Parker transformation and difference calculation, driving the first power quality flexible compensation module 102 to work in voltage stability mode. This scheme can effectively filter out harmonic components in the load current, and at the same time achieve grid voltage support by actively regulating reactive current. It has fast dynamic response, high control accuracy, and the two compensation modules can reuse the same set of control logic. While ensuring voltage stability control effect, it improves the device's operating condition adaptability and operational reliability.

[0098] In one embodiment, the target mode includes a harmonic suppression mode; the control module has built-in identical control logic adapted to both compensation modules. For the first power quality flexible compensation module 102, the first electrical signal includes the three-phase current of the first power grid. The control module 106 includes:

[0099] The fifth transformation unit 1067 is used to perform Parker transformation on the first electrical signal to obtain the actual d-axis current and the actual q-axis current.

[0100] The third control unit 1068 is used to perform low-pass filtering on the actual d-axis current and the actual q-axis current respectively to obtain the fundamental d-axis current component and the fundamental q-axis current component; to superimpose the fundamental d-axis current component with the compensation current reference command to synthesize the d-axis control current; and to directly use the fundamental q-axis current component as the q-axis control current.

[0101] The sixth transformation unit 1069 is used to perform inverse Park transformation processing on the d-axis control current and the q-axis control current to obtain the fundamental current command; the fundamental current command is subtracted from the first electrical signal to generate a compensation current reference command to control the first power quality flexible compensation module 102.

[0102] For example, such as Figure 4 As shown, the target mode includes a voltage stability mode. The control module 106 has built-in identical control logic adapted to the first power quality flexible compensation module 102 and the second power quality flexible compensation module 105, respectively. For the first power quality flexible compensation module 102, the first electrical signal includes the three-phase current of the first power grid. The control module 106 includes a fifth conversion unit 1067, a third control unit 1068, and a sixth conversion unit 1069. The fifth conversion unit 1064 is used to perform Parker transformation on the first electrical signal to obtain the actual d-axis current. Actual q-axis current ; The third control unit 1068 performs low-pass filtering on the actual d-axis current and the actual q-axis current respectively, so as to obtain the fundamental wave d-axis current component and the fundamental wave q-axis current component . The fundamental wave d-axis current component I Ld is superimposed with the compensation current reference command to synthesize the d-axis control current. The fundamental wave q-axis current component is directly used as the q-axis control current. The sixth transformation unit 1069 performs an inverse Park transformation on the d-axis control current and the q-axis control current to obtain a three-phase fundamental wave current command, and then performs a difference operation on the fundamental wave current command and the first electrical signal to generate a compensation current reference command S to realize the regulation of the first power quality flexible compensation module 102.

[0103] In the above embodiment, the control module 106 uses the fifth transformation unit 1067 to perform a Park transformation on the three-phase phase currents of the first power grid 101, decouples to obtain the actual d-axis current and the actual q-axis current, and then accurately extracts the fundamental wave d-axis and q-axis current components by the third control unit 1068 in a low-pass filtering manner. The fundamental wave d-axis current component is superimposed with the compensation current reference command to synthesize the d-axis control current, and the fundamental wave q-axis current component is directly used as the q-axis control current. After performing an inverse Park transformation by the sixth transformation unit 1069 to obtain the fundamental wave current command, and then taking the difference with the first electrical signal to generate the compensation current reference command, thereby regulating the first power quality flexible compensation module 102 to operate in a harmonic suppression mode; with the help of the Park transformation and low-pass filtering, the fundamental wave current and harmonic current can be accurately separated, the control logic is simple and clear, the amount of calculation is small, accurate compensation current can be quickly generated, effectively offset the harmonic current and distorted current in the power grid, improve the waveform quality of the power grid current, reduce the interference loss of harmonics to the distribution equipment and electrical loads, and the control module 106 can reuse the same control logic to adapt to two compensation modules, with strong architecture versatility and good working condition adaptability, greatly improving the power grid harmonic governance effect and system operation stability.

[0104] In an exemplary embodiment, as Figure 5 shown, a multifunctional power quality flexible compensation method is provided, which is applied to Figure 1 the provided multifunctional power quality flexible compensation device. This method includes the following steps 502 to step 506. Among them:

[0105] Step 502, obtain the first electrical signal of the first power grid 101 and the second electrical signal of the second power grid 105;

[0106] Among them, the first electrical signal and the second electrical signal are power grid side operation status acquisition signals, which serve as the basic sampling input quantities for subsequent mode discrimination, coordinate transformation, closed-loop control and power compensation adjustment.

[0107] Specifically, voltage sampling units and current sampling units are set up for the first power grid 101 and the second power grid 105 respectively. The original analog signals of the three-phase voltage and three-phase current of the two power grids are collected in real time and synchronously. After signal conditioning, filtering isolation and analog-to-digital conversion, they are converted into digital electrical quantities that can be recognized by the control module. After being uploaded to the host, the digital electrical quantities of the two power grids are encapsulated and defined as the first electrical signal and the second electrical signal respectively, and uploaded to the control module for caching and subsequent logic operations. This provides complete original sampling data support for the switching of target modes such as active power mutual assistance, voltage stability, and harmonic suppression, as well as the corresponding control strategy calculations.

[0108] Step 504: Determine the target mode from multiple preset modes based on the first electrical signal and the second electrical signal;

[0109] Among them, several preset modes are pre-configured and stored in the control module as power grid governance control operation modes, including at least active power mutual assistance mode, voltage stability mode, and harmonic suppression mode; the target mode is the optimal control operation mode that needs to be executed at present, selected based on the real-time electrical status of the power grid.

[0110] Specifically, the control module 106 receives and parses the first and second electrical signals, extracts key electrical characteristics such as voltage amplitude, current harmonic content, reactive power of the grid load, and voltage difference between the two grids, compares each characteristic with a preset threshold range, performs priority discrimination and logical filtering according to preset mode matching logic, matches the operating mode that is suitable for the current grid operating conditions from multiple preset modes, marks the matching result as the target mode, and locks the current operating mode identifier, providing a mode basis for subsequent calling of the corresponding control algorithm and driving the power quality flexible compensation module to perform precise regulation.

[0111] Step 506: Control the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 to work in the target mode.

[0112] Specifically, the control module 106 performs Parker transformation, filter component extraction, current command synthesis, and inverse Parker transformation on the first and second electrical signals according to the target mode, respectively, to generate corresponding compensation current reference commands. The compensation commands are then sent to the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104, driving the two compensation modules to output compensation amounts synchronously according to the control strategy corresponding to the target mode. This completes the active power mutual assistance, voltage support, or harmonic suppression regulation of the dual power grid, enabling the two compensation modules to operate stably under the current matching target mode conditions.

[0113] In one embodiment, a multifunctional power quality flexible compensation device is specifically designed to provide multifunctional power quality flexible compensation for high-proportion renewable energy power systems. Employing a shared DC bus architecture, the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 can achieve mutual compensation capabilities between the two connected power grids. Relying on the shared DC bus capacitor 103, it can simultaneously achieve DC voltage stabilization, AC voltage stabilization, and harmonic suppression. The two modules can independently address the power quality issues of their respective AC power grids while simultaneously achieving power quality management along the shared DC bus. It can also achieve energy mutual support between the two AC ports, possessing multiple functions including DC voltage regulation, AC voltage stabilization, AC current harmonic suppression, and active power mutual support.

[0114] The device includes: a first power grid 101, a first power quality flexible compensation module 102, a DC bus capacitor 103, a second power quality flexible compensation module 104, a second power grid 105, and a control module 106.

[0115] The first power quality flexible compensation module 102 is connected to the first power grid 101 on the AC side and to the DC bus capacitor 103 on the DC side. The second power quality flexible compensation module 104 is connected to the second power grid 105 on the AC side and shares the DC bus capacitor 103 on the DC side. The control module 106 collects the first electrical signal from the first power grid 101 and the second electrical signal from the second power grid 105, and determines the target mode from multiple preset modes based on the two electrical signals, and controls the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104. It operates in the target mode; the preset modes include active power mutual assistance mode, voltage stabilization mode, and harmonic suppression mode. When the voltage deviation between the first grid 101 and the second grid 105 exceeds the preset deviation threshold, it is determined to be active power mutual assistance mode, which transmits active power from the grid with higher voltage to the grid with lower voltage. When the AC voltage of both grids is normal and the current harmonics are both below the preset limit, it is determined to be voltage stabilization mode, which can suppress AC voltage fluctuations of the first grid 101 and the second grid 105 respectively, and can also stabilize the voltage of the DC bus capacitor 103 and suppress DC bus voltage fluctuations. When the AC voltage of both grids is normal and the current harmonics of any grid exceed the preset limit, it is determined to be harmonic suppression mode, in which the first power quality flexible compensation module 102 and the second power quality flexible compensation module 104 respectively cancel and suppress the AC current harmonics of the first grid 101 and the second grid 105, realizing multi-mode adaptive switching and multi-functional power quality flexible compensation.

[0116] To verify the performance of the device proposed in this patent in actual operation, a detailed simulation experiment was designed.

[0117] 1) Voltage stabilization control function

[0118] Turn the voltage stabilization control function off and on respectively. For example... Figure 6 As shown, Ua1 has the voltage stabilization control function disabled, while Ua2 has it enabled. An inductive load was added between 0.2 and 0.4 seconds, and a capacitive load was added between 0.6 and 0.8 seconds. Figure 6 In the comparison, the voltage of Ua2 remains constant after the voltage regulation function is enabled, while the voltage of Ua1 fluctuates with the load changes after the voltage regulation function is disabled. The comparison results prove the effectiveness of the function.

[0119] 2) Current harmonic suppression function

[0120] Turn the current harmonic suppression function off and on respectively. For example... Figure 7 As shown, Ia1 disables the current harmonic suppression function, while Ia2 enables the current harmonic suppression function. Figure 7 In the comparison, the Ia2 current, after the current harmonic suppression function is enabled, always maintains a sine wave, while the Ia1 current, after the current harmonic suppression function is disabled, is obviously distorted and contains a large number of harmonics. The comparison results prove the effectiveness of this function.

[0121] 3) DC voltage fluctuation suppression function

[0122] Modify the rated value of the DC voltage via the host computer, such as... Figure 8 As shown, the DC voltage setpoint is 450V for 0-0.5 seconds and 350V for 0.5-1 seconds. Figure 8 In the process, the voltage of Udc reaches the given value after a 0.1-second adjustment period. After stabilization, the voltage ripple is below 5V, demonstrating good DC voltage fluctuation suppression capability.

[0123] 4) Active power mutual assistance

[0124] like Figure 9 As shown, the active power mutual assistance function is activated in 0.1 seconds. Ia1 and Ia2 are the AC currents of the first power grid 101 and the second power grid 105, respectively. Figure 9 It can be seen that before 0.1 seconds, the amplitudes of Ia1 and Ia2 are significantly different, indicating low operating efficiency. After 0.1 seconds, the amplitudes of Ia1 and Ia2 are exactly the same, indicating that the active power mutual assistance function is working normally and the operating efficiency has improved.

[0125] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0126] Based on the same inventive concept, embodiments of this application also provide a method for implementing the aforementioned power grid system, comprising:

[0127] The first power grid 101 is used to output three-phase alternating current;

[0128] The multifunctional power quality flexible compensation device is used to acquire electrical signals from the first power grid and the second power grid, and switch to any one of the active power mutual assistance mode, voltage stability mode, and harmonic suppression mode according to the electrical signals to perform power quality flexible compensation and power coordination control on the first power grid and the second power grid.

[0129] The second power grid 105 is used to output three-phase alternating current.

[0130] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0131] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0132] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A multi-functional power quality flexible compensation device, characterized in that, The device includes: DC bus capacitor; The first power quality flexible compensation module has its AC side connected to the first power grid and its DC side connected to the DC bus capacitor. The second power quality flexible compensation module has its AC side connected to the second power grid and its DC side connected to the DC bus capacitor. The control module is used to acquire a first electrical signal from the first power grid and a second electrical signal from the second power grid, determine a target mode from multiple preset modes based on the first electrical signal and the second electrical signal, and control the first power quality flexible compensation module and the second power quality flexible compensation module to work in the target mode.

2. The apparatus of claim 1, wherein, The target modes include active power mutual assistance mode, voltage stability mode, or harmonic suppression mode; wherein... In the active power mutual assistance mode, the first power quality flexible compensation module and the second power quality flexible compensation module are used to transmit active power from the third power grid to the fourth power grid. The third power grid is the one with higher voltage between the first power grid and the second power grid, and the fourth power grid is the one with lower voltage between the first power grid and the second power grid. The voltage stabilization mode is used to stabilize AC voltage or DC bus voltage. When stabilizing AC voltage, the first power quality flexible compensation module and the second power quality flexible compensation module are used to suppress voltage fluctuations in the first power grid and the second power grid, respectively, to maintain AC voltage stability. When stabilizing DC bus voltage, the first power quality flexible compensation module and the second power quality flexible compensation module work together to stabilize the voltage of the DC bus capacitor and suppress DC bus voltage fluctuations. The harmonic suppression mode is used to suppress AC current harmonics. In the harmonic suppression mode, the first power quality flexible compensation module and the second power quality flexible compensation module are respectively used to cancel and suppress the current harmonics of the first power grid and the second power grid.

3. The apparatus of claim 1, wherein, The target mode includes an active power mutual assistance mode; the first electrical signal includes the first voltage of the first power grid, and the second electrical signal includes the second voltage of the second power grid; The control module is further configured to determine the target mode as the active power mutual assistance mode when the deviation between the first voltage and the second voltage exceeds a preset deviation threshold, and control the first power quality flexible compensation module and the second power quality flexible compensation module to operate in the active power mutual assistance mode.

4. The apparatus of claim 1, wherein, The target mode includes a voltage stability mode; the first electrical signal includes a first voltage and a first current of the first power grid, and the second electrical signal includes a second voltage and a second current of the second power grid; The control module is also used to determine the target mode as the voltage stability mode when the AC voltages of the first power grid and the second power grid are both normal and the harmonics of the first current and the second current are both lower than the preset limit value, and to control the first power quality flexible compensation module and the second power quality flexible compensation module to work in the voltage stability mode.

5. The apparatus of claim 1, wherein, The target mode includes a harmonic suppression mode; the first electrical signal includes a first voltage and a first current of the first power grid, and the second electrical signal includes a second voltage and a second current of the second power grid; The control module is also used to determine the target mode as the harmonic suppression mode when the AC voltages of the first power grid and the second power grid are both normal and the harmonics of the first current or the second current exceed the preset limit value, and to control the first power quality flexible compensation module and the second power quality flexible compensation module to work in the harmonic suppression mode.

6. The apparatus of claim 1, wherein, The target mode includes an active power mutual assistance mode; the control module has built-in identical control logic adapted to the two compensation modules respectively. For the first power quality flexible compensation module, the first electrical signal includes the three-phase voltage and the three-phase current of the first power grid. The control module includes: The first transformation unit is used to perform Parker transformation processing on the first electrical signal to obtain the actual d-axis voltage, actual q-axis voltage, actual d-axis current, and actual q-axis current. The first control unit is used to obtain the actual DC bus voltage of the DC bus capacitor, calculate the difference between the given DC bus voltage and the actual DC bus voltage, and generate a d-axis current command through a proportional-integral controller; obtain the reactive power of the corresponding grid load, and obtain a q-axis current command by combining the actual d-axis voltage; calculate the difference between the actual d-axis current and the d-axis current command, subtract a decoupling compensation term from the difference through a proportional-integral controller, and add the actual d-axis voltage to obtain a d-axis voltage command; calculate the difference between the actual q-axis current and the q-axis current command, subtract a decoupling compensation term from the difference through a proportional-integral controller, and add the actual q-axis voltage to obtain a q-axis voltage command. The second conversion unit is used to perform inverse Parker transformation processing on the d-axis voltage command and the q-axis voltage command to generate a three-phase modulated voltage command to control the first power quality flexible compensation module.

7. The apparatus of claim 1, wherein, The target mode includes a voltage stability mode; the control module has built-in identical control logic adapted to both compensation modules. For the first power quality flexible compensation module, the first electrical signal includes the three-phase current of the first power grid. The control module includes: The third transformation unit is used to perform Parker transformation on the first electrical signal to obtain the actual d-axis current and the actual q-axis current. The second control unit is used to perform low-pass filtering on the actual d-axis current and the actual q-axis current respectively to obtain the fundamental d-axis current component and the fundamental q-axis current component; to superimpose the fundamental d-axis current component with the compensation current reference command to synthesize the d-axis control current; and to switch to the q-axis given reference current through the mode switching unit to replace the fundamental q-axis current component to synthesize the q-axis control current. The fourth transformation unit is used to perform inverse Parker transformation on the d-axis control current and the q-axis control current to obtain the fundamental current command; and to generate a compensation current reference command by subtracting the fundamental current command from the first electrical signal to control the first power quality flexible compensation module.

8. The apparatus of claim 1, wherein, The target mode includes a harmonic suppression mode; the control module has built-in identical control logic adapted to both compensation modules. For the first power quality flexible compensation module, the first electrical signal includes the three-phase current of the first power grid. The control module includes: The fifth transformation unit is used to perform Parker transformation on the first electrical signal to obtain the actual d-axis current and the actual q-axis current. The third control unit is used to perform low-pass filtering on the actual d-axis current and the actual q-axis current respectively to obtain the fundamental d-axis current component and the fundamental q-axis current component; to superimpose the fundamental d-axis current component with the compensation current reference command to synthesize the d-axis control current; and to directly use the fundamental q-axis current component as the q-axis control current. The sixth transformation unit is used to perform inverse Parker transformation on the d-axis control current and the q-axis control current to obtain the fundamental current command; and to generate a compensation current reference command by subtracting the fundamental current command from the first electrical signal to control the first power quality flexible compensation module.

9. A power grid system, characterized by It includes a first power grid, a second power grid, and the apparatus as described in any one of claims 1-8.

10. A multi-functional power quality flexible compensation method, characterized in that, Applied to the power grid system as described in claim 9, the method includes: Acquire the first electrical signal from the first power grid and the second electrical signal from the second power grid; The target mode is determined from multiple preset modes based on the first electrical signal and the second electrical signal; Control the first power quality flexible compensation module and the second power quality flexible compensation module to operate in the target mode.