Control method for off-grid and grid-connected, energy storage device and energy storage system
By using a PID algorithm to synchronize the output voltage of the energy storage converter with the grid voltage, the problem of inaccurate synchronization between the inverter output voltage and the grid voltage is solved, achieving a smooth off-grid to on-grid process and protecting the equipment.
Patent Information
- Application Number
- CN202511418252.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-09-29
AI Technical Summary
In existing off-grid to grid-connected control technologies, the synchronization regulation between the inverter output voltage and the grid voltage is inaccurate, leading to current surges that damage energy storage converters and grid equipment.
The PID algorithm is used to synchronize the output voltage and input voltage of the energy storage converter. Through a closed-loop feedback control mechanism, the voltage difference and angle difference are dynamically adjusted until they are fully synchronized. After the synchronization state is achieved, the grid connection path is turned on.
It achieves precise synchronization between the inverter output voltage and the grid voltage, avoids current surges, protects the energy storage converter and grid equipment, and ensures the smoothness of the switching process and the safety of the equipment.
Smart Images

Figure CN120914915B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of energy storage, and in particular to a control method for switching from off-grid to on-grid, an energy storage device, and an energy storage system. Background Technology
[0002] A power conversion system (PCS), also known as an energy storage inverter, is one of the core components of an energy storage system. A PCS includes power conversion components (such as IGBTs), control components, protection components, communication modules, and a cooling system (such as a radiator, fan, or liquid cooling plate).
[0003] Existing solutions typically use preset step sizes to adjust voltage during off-grid to grid-connected switching, which often results in unsatisfactory adjustment results. How to accurately control the synchronization of inverter output voltage with grid voltage during off-grid to grid-connected switching to eliminate current surges and protect PCS and grid equipment from damage is a problem that urgently needs to be solved. Summary of the Invention
[0004] This application provides an off-grid to grid-connected control method, energy storage device, and energy storage system, which at least solves the problem of how to accurately control the synchronization of inverter output voltage and grid voltage during the off-grid to grid-connected switching process, so as to eliminate current surges and protect PCS and grid equipment from damage.
[0005] According to some embodiments of this application, one aspect of this application provides a control method for switching from off-grid to grid-connected operation, comprising: upon receiving a grid-connected control command, using a PID algorithm to synchronously adjust the output voltage of a PCS and the input voltage of the PCS, wherein, during the synchronization adjustment process, the difference between the output voltage of the PCS and the input voltage of the PCS, as well as the voltage angle, are adjusted; after the output voltage of the PCS is synchronized with the input voltage of the PCS, the grid-connected path of the PCS is controlled to be turned on, so as to switch the PCS from off-grid operation to grid-connected operation.
[0006] In some embodiments, the PID algorithm is used to synchronize the output voltage of the PCS with the input voltage of the PCS, including: determining a voltage difference based on the output voltage of the PCS and the input voltage of the PCS; using the PID algorithm to reduce the voltage difference until the voltage difference is 0; and using the PID algorithm to synchronize the angle of the output voltage of the PCS with the angle of the input voltage of the PCS.
[0007] In some embodiments, determining a voltage difference based on the output voltage and the input voltage of the PCS includes: determining that the real part difference is the difference between the real part of the output voltage and the real part of the input voltage of the PCS, and determining that the imaginary part difference is the imaginary value between the imaginary part of the output voltage and the real part of the input voltage of the PCS; determining that the imaginary part product is the product of the imaginary part difference and the imaginary part unit; and determining that the voltage difference is the sum of the real part difference and the imaginary part product.
[0008] In some embodiments, the PID algorithm is used to synchronize the angle of the output voltage of the PCS and the angle of the input voltage of the PCS, including: determining the virtual current as the ratio of the voltage difference to the preset resistance value; determining the instantaneous power command value as the product of the input voltage of the PCS and the virtual current; and determining the angle output by the PID algorithm at the current moment as the synchronization angle when the imaginary part of the instantaneous power command value is 0 and the real part of the instantaneous power command value is less than the power real part threshold.
[0009] In some embodiments, during the process of determining the instantaneous power command value as the product of the input voltage of the PCS and the virtual current, the method further includes: determining that the first product is the product of the real part of the input voltage of the PCS and the imaginary part of the output voltage of the PCS, and determining that the second product is the product of the imaginary part of the input voltage of the PCS and the real part of the output voltage of the PCS; and determining that the real part of the instantaneous power command value is the difference between the first product and the second product.
[0010] In some embodiments, during the process of determining the instantaneous power command value as the product of the input voltage of the PCS and the virtual current, the method further includes: determining a first difference as the difference between the real part of the output voltage of the PCS and the real part of the input voltage of the PCS, and determining a third product as the product of the real part of the input voltage of the PCS and the first difference; determining a second difference as the difference between the imaginary part of the output voltage of the PCS and the imaginary part of the input voltage of the PCS, and determining a fourth product as the product of the imaginary part of the input voltage of the PCS and the second difference; and determining that the imaginary part of the instantaneous power command value is the sum of the third product and the fourth product.
[0011] In some embodiments, before using a PID algorithm to synchronize the output voltage of the PCS with the input voltage of the PCS, the method further includes: determining whether a grid recovery event has occurred; if the grid recovery event has occurred, and if the grid recovery event has not occurred, maintaining the PCS in off-grid operation.
[0012] In some embodiments, after the output voltage of the PCS is synchronized with the input voltage of the PCS, the method further includes: generating a blocking command and sending the blocking command to the PCS to control the PCS to stop outputting the PWM signal.
[0013] In some embodiments, before using a PID algorithm to synchronously adjust the output voltage of the PCS and the input voltage of the PCS, the method includes: acquiring the output voltage of the PCS and the input voltage of the PCS acquired by a voltage acquisition circuit.
[0014] In some embodiments, controlling the grid connection of the PCS includes: controlling the grid connection relay to engage to connect the grid connection of the PCS.
[0015] In some embodiments, the method includes: real-time detection of the power grid status, the power grid status including voltage fluctuations and frequency offsets of the power grid; processing the detected power grid status using a neural network model to obtain an anomaly confidence level; and controlling the PCS to switch to off-grid operation when the anomaly confidence level is greater than or equal to a confidence level threshold.
[0016] Another embodiment of this application provides an energy storage device, including: a first processing unit, configured to, upon receiving a grid connection control command, use a PID algorithm to synchronously adjust the output voltage of a PCS and the input voltage of the PCS, wherein, during the synchronous adjustment process, the difference between the output voltage of the PCS and the input voltage of the PCS, as well as the voltage angle, are adjusted; and a second processing unit, configured to, after the output voltage of the PCS and the input voltage of the PCS are synchronized, control the grid connection path of the PCS to be turned on, so as to switch the PCS from off-grid operation to grid-connected operation.
[0017] In some embodiments, the first processing unit includes: a first processing module, configured to determine a voltage difference based on the output voltage of the PCS and the input voltage of the PCS; a second processing module, configured to reduce the voltage difference using a PID algorithm until the voltage difference is 0; and a third processing module, configured to synchronize the angle of the output voltage of the PCS and the angle of the input voltage of the PCS using a PID algorithm.
[0018] In some embodiments, the first processing module includes: a first determining submodule, configured to determine that the real part difference is the difference between the real part of the output voltage of the PCS and the real part of the input voltage of the PCS, and to determine that the imaginary part difference is the imaginary part of the output voltage of the PCS and the imaginary part of the input voltage of the PCS; a second determining submodule, configured to determine that the imaginary part product is the product of the imaginary part difference and the imaginary part unit; and a third determining submodule, configured to determine that the voltage difference is the sum of the real part difference and the imaginary part product.
[0019] In another aspect, this application provides an energy storage system, including: a PCS and a controller, wherein the PCS and the controller communicate with each other, and the controller is used to execute any of the methods described.
[0020] The technical solution provided in this application has at least the following advantages: The PID algorithm is a closed-loop feedback control mechanism that controls based on the error (the difference between the target value and the actual value), the accumulation of error, and the rate of change of error, thereby achieving the goal of reducing error. During the switching process, the difference between the inverter's output voltage and the grid voltage, as well as their angle difference, serve as the input to the PID algorithm. Through continuous fine-tuning, these two voltages can be brought closer and closer until they are completely synchronized in amplitude and phase. PID control enables finer regulation, reducing over-regulation or under-regulation, ensuring a smooth switching process, and avoiding current surges. When the inverter's output voltage is synchronized with the grid voltage, i.e., when the difference and angle difference are within the preset allowable range, the control system will issue a signal to close the grid connection path, completing the switch from off-grid to grid-connected. This ensures that the inverter output and grid voltage are optimally matched before the grid connection path is closed, thereby avoiding the large current surge during switching and reducing the potential damage risk to the inverter and grid equipment. It solves the problem of how to accurately control the synchronization of the inverter output voltage and grid voltage during off-grid to on-grid switching to eliminate current surges and protect the PCS and grid equipment from damage. Attached Figure Description
[0021] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Unless otherwise stated, the drawings in the accompanying drawings do not constitute a limitation on scale. In order to more clearly illustrate the technical solutions in the embodiments of this application or in the conventional art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1A flowchart illustrating a control method for switching from off-grid to on-grid connection according to an embodiment of this application;
[0023] Figure 2 A flowchart illustrating another off-grid to on-grid switching control method provided according to an embodiment of this application;
[0024] Figure 3 This is a schematic diagram of an energy storage device provided according to an embodiment of this application. Detailed Implementation
[0025] As is known from the background art, existing solutions typically use preset step sizes to adjust voltage during off-grid to grid-connected switching, which leads to unexpected adjustment results. To address the issue of how to accurately control the synchronization of inverter output voltage with grid voltage during off-grid to grid-connected switching to eliminate current surges and protect PCS and grid equipment from damage, embodiments of this application provide an off-grid to grid-connected switching control method, energy storage device, and energy storage system.
[0026] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0027] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0028] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A exists, A and B exist simultaneously, and B exists. In addition, the character " / " in this document generally indicates that the related objects before and after it have an "or" relationship.
[0029] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0030] In the description of the embodiments of this application, the technical terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of this application and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.
[0031] In the description of the embodiments of this application, unless otherwise expressly specified and limited, the technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0032] In the accompanying drawings corresponding to the embodiments of this application, the thickness and area of the layers are enlarged for better understanding and ease of description. When describing a component (such as a layer, film, region, or substrate) on or on the surface of another component, the component may be "directly" located on the surface of the other component, or there may be a third component between the two components. Conversely, when describing a component on the surface of another component, or when another component is formed or disposed on the surface of a component, it indicates that there is no third component between the two components. Furthermore, when describing a component as being "generally" formed on another component, it means that the component is not formed on the entire surface (or front surface) of the other component, nor is it formed on a portion of the edge of the entire surface.
[0033] In the description of the embodiments of this application, when a component "includes" another component, other components are not excluded unless otherwise stated, and other components may be further included. Furthermore, when a component such as a layer, film, region, or plate is referred to as being "on / located" on another component, it can be "directly on" the other component (i.e., located on the surface of the other component with no other components between them), or another component may be present therein. Moreover, when a component such as a layer, film, region, or plate is "directly located" on another component, or when a component such as a layer, film, region, or plate is located on the surface of another component, it indicates that no other components are located therein.
[0034] The terminology used in the description of the various embodiments described herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used in the description of the various embodiments and the appended claims, the term "foreword" is also intended to include the plural form unless the context clearly indicates otherwise. Components include layers, films, regions, or plates, etc.
[0035] The embodiments of this application will now be described in detail with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the embodiments of this application to facilitate a better understanding of the application. However, the technical solutions claimed in this application can be implemented even without these technical details and various variations and modifications based on the following embodiments.
[0036] Figure 1 This application provides a control method for switching from off-grid to on-grid connection, such as... Figure 1 As shown, the method includes:
[0037] Step S101: Upon receiving the grid connection control command, a PID algorithm (a closed-loop feedback control algorithm) is used to synchronously adjust the output voltage of the PCS (Power Conversion System) and the input voltage of the PCS. During the synchronous adjustment process, the difference between the output voltage of the PCS and the input voltage of the PCS, as well as the voltage angle, are adjusted.
[0038] Specifically, upon receiving the instruction, the PID algorithm is used to adjust the output voltage of the PCS to match the grid voltage. During this stage, the PCS output voltage is continuously monitored, and the difference between it and the grid voltage (including amplitude and phase differences) serves as the input to the PID controller. The PID algorithm dynamically adjusts the output voltage through calculations of proportional, integral, and derivative parameters until the difference is reduced to within a set safety threshold.
[0039] Step S102: After the output voltage of the PCS is synchronized with the input voltage of the PCS, the grid connection path of the PCS is turned on to switch the PCS from off-grid operation to grid-connected operation.
[0040] Specifically, when the output voltage of the PCS is synchronized with the grid voltage, that is, when the voltage difference and phase difference are within the allowable range, the grid-connected switch is automatically closed, so that the PCS can smoothly transition from off-grid mode to grid-connected mode.
[0041] Through the above embodiments, the PID algorithm is a closed-loop feedback control mechanism that controls based on the error (the difference between the target value and the actual value), the accumulation of error, and the rate of change of error, thereby achieving the goal of reducing error. During the switching process, the difference between the inverter's output voltage and the grid voltage, as well as their angle difference, serve as the inputs to the PID algorithm. Through continuous fine-tuning, these two voltages can be brought closer and closer until they are completely synchronized in amplitude and phase. PID control enables finer regulation, reducing over-regulation or under-regulation, ensuring a smooth switching process, and avoiding current surges. When the inverter's output voltage and the grid voltage are synchronized, i.e., the difference and angle difference are within the preset allowable range, the control system will send a signal to close the grid connection path, completing the switch from off-grid to grid-connected. Ensuring that the inverter output and grid voltage reach optimal matching before the grid connection path is closed avoids large current surges during switching, reduces the potential damage risk to the inverter and grid equipment, and solves the problem of how to accurately control the synchronization of the inverter output voltage and the grid voltage during off-grid to grid-connected switching to eliminate current surges and protect the PCS and grid equipment from damage.
[0042] In one alternative approach, a PID algorithm is used to synchronize the output voltage of the PCS with the input voltage of the PCS, including: determining the voltage difference based on the output voltage of the PCS and the input voltage of the PCS; using a PID algorithm to reduce the voltage difference until the voltage difference is 0; and using a PID algorithm to synchronize the angle of the output voltage of the PCS with the angle of the input voltage of the PCS.
[0043] In the above embodiments, the PID algorithm can precisely adjust the PCS output voltage based on the real-time monitored difference between the PCS output voltage and the grid voltage, through dynamically calculated proportional, integral, and derivative components, until the two reach the same amplitude. During this process, the PID controller continuously adjusts the output to compensate for deviations, ensuring that zero voltage difference is ultimately achieved, thereby avoiding current surges caused by voltage differences during switching. In addition to precise amplitude adjustment, the PID algorithm is also used for angle or phase synchronization. By calculating the angle difference between the output voltage and the input voltage, the PID controller can adjust the PCS output phase in real time until it matches the phase of the grid voltage. The PID algorithm can quickly adjust control parameters to maintain the set synchronization state in the face of rapid voltage changes or external interference. The integral term can eliminate steady-state errors in the system, ensuring high-precision synchronization over long periods. By avoiding current surges and ensuring smooth switching, the stress on the internal components of the PCS is significantly reduced, and equipment wear caused by frequent switching is reduced, thereby extending the overall service life of the PCS, enhancing the reliability and safety of the system, and further protecting the PCS and grid equipment from damage.
[0044] Specifically, the output voltage of the PCS and the grid voltage are acquired in real time by a voltage sensor, and the difference between the two is calculated. This difference is the input to the PID controller, i.e., the deviation signal, used to evaluate the accuracy of the current voltage synchronization.
[0045] In another alternative, determining the voltage difference based on the output voltage and input voltage of the PCS includes: determining the real part difference as the difference between the real part of the output voltage and the real part of the input voltage of the PCS, and determining the imaginary part difference as the imaginary part of the output voltage and the imaginary part of the input voltage of the PCS; determining the imaginary part product as the product of the imaginary part difference and the imaginary part unit; and determining the voltage difference as the sum of the real part difference and the imaginary part product.
[0046] In the above embodiments, by separating the real and imaginary parts (i.e., the rectangular coordinate representation of the voltage), the difference between the real and imaginary parts is calculated separately, and then multiplied using the imaginary part units. The resulting voltage difference is a complex number that includes both amplitude and phase information. This method can more accurately reflect voltage synchronization deviations, especially suitable for AC voltage synchronization, as AC voltage varies in time and space, involving not only amplitude but also phase information. After determining the complex difference between the PCS output and input voltages, the deviation can be quickly and accurately compensated through dynamic adjustment using a PID algorithm. The control parameters can be adjusted in real time based on the magnitude and trend of the difference. Before the PCS output is fully synchronized with the grid voltage, the grid connection path is kept disconnected. Once precise voltage synchronization is achieved through the PID algorithm, i.e., the voltage difference is adjusted to zero, the grid connection switch is turned on, switching the PCS from off-grid mode to grid-connected mode. This effectively avoids current surges caused by voltage mismatch during switching, reduces potential damage to internal PCS components and other grid equipment, and improves the safety and stability of the equipment.
[0047] Specifically, according to Determine the above real part difference, based on Determine the above imaginary part difference based on ( Determine the product of the imaginary parts, based on =( + ( Determine the voltage difference mentioned above, where, V inv The DC input voltage, v inv_α Let v be the real part of the voltage along the α-axis. inv_β Let be the component of the voltage along the α-axis, i.e., the imaginary part, and j be the imaginary unit. V gird The AC output grid voltage, v grid_α Let v be the component of the grid voltage on the α-axis, i.e., the real part. grid_β This represents the imaginary part of the grid voltage on the β axis.
[0048] In some exemplary embodiments, the PID algorithm is used to synchronize the angle of the output voltage of the PCS and the angle of the input voltage of the PCS, including: determining the virtual current as the ratio of the voltage difference to the preset resistance value; determining the instantaneous power command value as the product of the input voltage of the PCS and the virtual current; and determining the angle output by the PID algorithm at the current moment as the synchronization angle when the imaginary part of the instantaneous power command value is 0 and the real part of the instantaneous power command value is less than the power real part threshold.
[0049] In the above embodiments, by calculating the virtual current (i.e., the voltage difference divided by the preset resistance value) and obtaining the instantaneous power command value, which is the product of the PCS input voltage and the virtual current, the phase difference between the PCS output voltage and the grid voltage can be dynamically detected. When the imaginary part of the instantaneous power command value is zero and the real part is lower than the set real power threshold, it indicates that the angle of the PCS output voltage has reached synchronization with the angle of the grid voltage. At this time, the output angle of the PID algorithm is the synchronization angle, ensuring that the output voltage and the grid voltage are consistent in phase before the PCS is connected to the grid. In addition, the PID algorithm can ensure that the phase of the PCS output voltage is perfectly matched with the phase of the grid voltage, thereby reducing the possibility of current surges and ensuring that the system will not experience significant interruptions or fluctuations when connected to the grid. This achieves smooth mode switching, improves overall reliability and stability, and reduces equipment maintenance costs. Smooth mode switching also helps to extend the service life of the PCS and its related components, reduces the frequency of equipment replacement, and saves operating costs in the long run.
[0050] Specifically, according to Determine the above virtual current, where For the aforementioned virtual current, The voltage difference mentioned above; according to Determine the above instantaneous power command value, where The above-mentioned power command value is given by V. gird This refers to the grid voltage output from the AC side.
[0051] In other exemplary embodiments, in determining the instantaneous power command value as the product of the input voltage of the PCS and the virtual current, the method further includes: determining that the first product is the product of the real part of the input voltage of the PCS and the imaginary part of the output voltage of the PCS, and determining that the second product is the product of the imaginary part of the input voltage of the PCS and the real part of the output voltage of the PCS; and determining that the real part of the instantaneous power command value is the difference between the first product and the second product.
[0052] In the above embodiments, by calculating the first product (the product of the real part of the PCS input voltage and the imaginary part of the output voltage) and the second product (the product of the imaginary part of the PCS input voltage and the real part of the output voltage), and then taking the difference between the two, the real part of the instantaneous power is obtained. By decomposing the voltage signal into real and imaginary parts, the phase difference between voltages can be assessed more accurately, providing an accurate data basis for subsequent phase adjustment. The real part of the instantaneous power command value directly reflects the phase difference between the PCS output voltage and the grid voltage. When the two are perfectly synchronized, the real part of the instantaneous power will theoretically be close to zero. Therefore, by continuously monitoring the magnitude of the real part of the instantaneous power, information on the phase synchronization status can be obtained in real time, providing a real-time feedback signal to the PID controller to ensure accurate adjustment. In addition, the PID algorithm dynamically adjusts the control parameters based on the feedback of the real part of the instantaneous power to minimize this difference until the phase of the PCS output voltage is perfectly synchronized with the grid voltage. Compared to adjusting by directly measuring the angle difference, the strategy of using virtual power calculation can achieve angle synchronization more quickly and stably, especially when the grid voltage fluctuates frequently or the PCS output load changes significantly. This not only improves the efficiency of grid connection switching and power quality, but also simplifies the control logic.
[0053] Specifically, according to Determine the first product mentioned above, based on To determine the second product mentioned above, according to P= Determine the real part of the instantaneous power command value, where P is the real part of the instantaneous power command value, representing the active power.
[0054] In some exemplary embodiments of this application, in the process of determining the instantaneous power command value as the product of the input voltage of the PCS and the virtual current, the method further includes: determining a first difference as the difference between the real part of the output voltage of the PCS and the real part of the input voltage of the PCS, and determining a third product as the product of the real part of the input voltage of the PCS and the first difference; determining a second difference as the difference between the imaginary part of the output voltage of the PCS and the imaginary part of the input voltage of the PCS, and determining a fourth product as the product of the imaginary part of the input voltage of the PCS and the second difference; and determining the imaginary part of the instantaneous power command value as the sum of the third product and the fourth product.
[0055] In the above embodiments, when calculating the imaginary part of the instantaneous power command value, the phase difference between the PCS output voltage and the grid voltage can be accurately captured by determining the first difference and the second difference. This not only detects phase asynchrony but also quantifies the deviation, providing accurate input information for subsequent PID control. By multiplying the real part of the PCS input voltage by the first difference and the imaginary part by the second difference, not only the voltage amplitude difference but also the influence of the phase angle are considered, resulting in a more comprehensive and refined virtual power command value for subsequent phase synchronization adjustment. Using the calculated imaginary part of the instantaneous power command value, the PCS output voltage is dynamically adjusted using a PID algorithm until the phase angle between the PCS output and the grid voltage is perfectly matched. Compared to adjusting directly by measuring the phase angle, this method utilizes the linear characteristics of the voltage signal to achieve phase synchronization more quickly and accurately. This ensures that the PCS maintains phase consistency with the grid voltage during grid connection, avoiding current surges that may occur due to phase mismatch. It improves the stability and reliability of the PCS grid connection process, reduces unnecessary power conversion losses, and ensures smooth energy exchange between the PCS and the grid.
[0056] Specifically, according to Determine the first difference mentioned above, based on ( To determine the third product mentioned above, based on Determine the second difference mentioned above, based on ( To determine the fourth product mentioned above, according to Q= ( + ( Determine the above sum value, where Q is the above sum value, representing reactive power.
[0057] In some further exemplary embodiments of this application, before using a PID algorithm to synchronously adjust the output voltage of the PCS and the input voltage of the PCS, the method further includes: determining whether a grid restoration event has occurred; if it is determined that the grid restoration event has occurred, and if it is determined that the grid restoration event has not occurred, maintaining the PCS in off-grid operation.
[0058] In the above embodiments, the synchronization adjustment process between the PCS output voltage and the grid voltage is initiated only when a grid restoration event is confirmed. This ensures that the PCS will not attempt to connect to the grid before the grid has stabilized, avoiding potential power surges or equipment damage. Especially after a grid fault, such as a sudden power outage or voltage fluctuation, time is needed to return to normal. Direct grid connection without proper assessment could lead to overload within the PCS or even secondary impacts on the grid. This assessment mechanism effectively enhances the safety of the entire system. After the grid recovers and is confirmed to be stable, voltage synchronization adjustment is performed using a PID algorithm, enabling a smooth transition from off-grid to on-grid mode. This avoids the power quality degradation that can occur with sudden grid connection, such as voltage spikes and current surges, ensuring smooth power conversion and distribution, improving the user's electricity experience, and guaranteeing stable equipment operation. If no grid restoration event is confirmed, the PCS maintains off-grid operation, allowing it to independently supply power to the load when the grid is unavailable. This enables PCS to manage energy storage resources, such as battery energy, more intelligently in off-grid mode, ensuring that the system can continue to supply power before the grid is restored. This is especially effective in remote areas or when the grid is unstable, improving energy utilization efficiency and system self-sufficiency, and reducing the overall energy consumption of the system.
[0059] In one alternative, after the output voltage of the PCS is synchronized with the input voltage of the PCS, the method further includes: generating a blocking command and sending the blocking command to the PCS to control the PCS to stop outputting the PWM signal (pulse width modulation signal).
[0060] In the above embodiments, after the PCS output voltage synchronizes with the grid voltage, the execution of the PWM blocking command ensures the precise maintenance of this synchronization state. By stopping the PWM signal output, the PCS output voltage is directly controlled by the grid voltage, avoiding minor phase or amplitude deviations that might occur if the PCS continues to independently control the output voltage after grid connection. In off-grid mode, the PCS controls the inverter output voltage via a PWM signal, but in grid-connected mode, this control mechanism is no longer necessary. The PWM blocking command stops the PWM signal output, avoiding unnecessary power conversion processes, reducing energy loss during conversion, and improving the overall efficiency of the power conversion system. During the transition of the PCS from off-grid mode to grid-connected mode, if the PWM signal output is not stopped in time, the inverter may bear additional load due to dual-terminal voltage control, even leading to overload risk. The generation and transmission of the PWM blocking command ensures that the PCS can immediately stop independently controlling the output voltage after grid connection, avoiding inverter overload and protecting equipment safety. Sending a PWM blocking command to the PCS stops its PWM signal output, thus switching the PCS from voltage source mode to current source mode. With the grid voltage as the primary driver, the PCS only needs to control the output current, simplifying the control logic and improving system response speed and control accuracy. Executing the PWM blocking command helps the PCS adapt to the grid-connected environment more quickly, reducing potential system oscillations or instability caused by control mode transitions. Simultaneously, it avoids energy conflicts when the PCS and grid voltage are out of sync, enhancing overall system stability.
[0061] In another alternative, before using a PID algorithm to synchronously adjust the output voltage of the PCS and the input voltage of the PCS, the method includes: acquiring the output voltage of the PCS and the input voltage of the PCS acquired by the voltage acquisition circuit.
[0062] In the above embodiments, the real-time data acquisition function of the voltage acquisition circuit obtains voltage data used to calculate the amplitude and phase difference between the PCS output voltage and the grid voltage. The PID algorithm utilizes this difference information to gradually reduce the amplitude and phase differences by adjusting the inverter's control parameters until they are completely synchronized, providing the control system with accurate information on the current PCS output voltage and grid voltage. By acquiring voltage data in advance, grid connection commands can be issued only after ensuring voltage amplitude and phase synchronization, effectively preventing maloperation and current surges caused by voltage asynchrony. Precise voltage acquisition and synchronization adjustment significantly improve the stability and safety of the PCS during off-grid to grid-connected processes, providing a guarantee for the safe operation of smart grids and energy storage systems. Through the voltage information acquired by the voltage acquisition circuit, the PCS can more accurately adjust its output to match grid conditions. This not only reduces losses in the PCS during energy conversion but also ensures that the PCS operates at maximum efficiency, improving overall energy utilization efficiency. The acquisition of real-time voltage data accelerates the response speed of the control system. The PID algorithm can receive and process voltage information in real time, make control adjustments more quickly, shorten the transition time of PCS from off-grid to grid-connected, and improve the system's adaptability to grid changes.
[0063] In some exemplary embodiments, controlling the grid connection path of the PCS includes: controlling the grid connection relay to engage to connect the grid connection path of the PCS.
[0064] In the above embodiments, when the grid-connected relay is activated, its contacts close, forming an electrical connection path between the PCS and the power grid. This is a prerequisite for the PCS to switch from off-grid mode to grid-connected operation, providing a physical channel for the inverter's output power to be transmitted to the grid. After the relay contacts close, the PCS's output current can be directly connected to the grid, realizing the transmission of power from the energy storage system to the grid. In grid-connected mode, the PCS can act as a power source, injecting power from the energy storage device into the grid, or as a load, absorbing power from the grid for charging. By controlling the activation of the grid-connected relay, the PCS can quickly respond to grid-connection commands, significantly reducing the time required to switch from off-grid mode to grid-connected mode. At the moment of switching from off-grid to grid-connected, improper control may lead to unnecessary energy waste, such as voltage surges causing sudden current changes and additional losses. By precisely controlling the grid-connected relay, the PCS can minimize energy losses during this process and also reduce control complexity.
[0065] Other exemplary embodiments include: real-time detection of the power grid status, including voltage fluctuations and frequency offsets of the power grid; processing the detected power grid status using a neural network model to obtain an anomaly confidence level; and controlling the PCS to switch to off-grid operation when the anomaly confidence level is greater than or equal to a confidence level threshold.
[0066] In the above embodiments, by detecting voltage fluctuations and frequency shifts in the power grid in real time, any changes in the power grid can be quickly captured, whether it be a minor disturbance or a serious fault, and information can be obtained immediately. The monitoring scope is not limited to voltage and frequency, but can be extended to other power grid parameters, such as phase angle and power quality, providing a basis for a comprehensive assessment of the power grid health status. Using a pre-trained neural network model to process the detected power grid state data, complex power grid behavior patterns can be identified, including fault precursors and abnormal trends, making accurate judgments even in cases of minor or initial anomalies. The neural network model can output a probability score for anomaly detection, i.e., anomaly confidence level, providing a quantitative indicator for subsequent decision-making, enabling the PCS to react based on data-driven principles. When the anomaly confidence level reaches or exceeds a preset confidence threshold, the PCS is controlled to switch to off-grid operation mode, ensuring that the PCS can avoid the impact of power grid faults and protecting the PCS and its related equipment from damage. By rapidly responding to power grid anomalies, the PCS can avoid the chain reaction of power grid faults, reduce the impact of power grid fluctuations on the PCS, and maintain stable system operation.
[0067] To enable those skilled in the art to better understand the technical solution of this application, the control method for switching from grid connection to off-grid connection of this application will be described in detail below with reference to specific embodiments.
[0068] The off-grid to on-grid switching control method of this embodiment, such as Figure 2 As shown, it includes the following steps:
[0069] Step S1: Determine whether a grid restoration event has occurred. If no grid restoration event has occurred, continue off-grid operation. If a grid restoration event has occurred, proceed to step S2.
[0070] Step S2: Determine whether a grid connection control command has been received. If no grid connection control command has been received, continue off-grid operation. If a grid connection control command has been received, proceed to step S3.
[0071] Step S3: Acquire the voltage at the output terminal of the PCS and the voltage at the input terminal of the PCS through the voltage sampling circuit, and determine the voltage difference;
[0072] Step S4: Use a PID algorithm to reduce the voltage difference until the voltage difference is 0;
[0073] Step S5: After confirming that the output voltage of the PCS is synchronized with the input voltage of the PCS, control the grid connection path of the PCS to be turned on.
[0074] Step S6: Generate a blocking command to control the PCS to stop outputting PWM signals;
[0075] Step S7: Switch the loop parameters to grid-connected closed-loop control;
[0076] Specifically, in off-grid mode, the PCS acts as a voltage source and employs dual closed-loop control of voltage and current to maintain local voltage and frequency stability. In grid-connected mode, it needs to be switched to dual closed-loop control of current inner loop + power outer loop. The specific process is as follows: disable the voltage outer loop in off-grid mode, stop the integral action of the voltage regulator, and avoid oscillations caused by parameter mutations; enable the power outer loop in grid-connected mode and reconfigure the outer loop parameters.
[0077] Step S8: Send an open-wave command to the PCS, and the PCS resumes PWM signal output and enters grid-connected operation, realizing the off-grid to grid-connected switching.
[0078] This application embodiment also provides a specific implementation scenario for processing the above-mentioned detected power grid state using a neural network model. When the energy storage converter is in grid-connected operation, the three-phase voltage on the grid side is acquired by the voltage acquisition circuit, and the real and imaginary parts of the above-mentioned power grid voltage are obtained after transformation. The angle and frequency of the above-mentioned power grid voltage are determined by the phase-locked loop. Based on the real and imaginary parts of the above-mentioned power grid voltage, as well as multi-dimensional features such as voltage drop depth, frequency offset, frequency change rate and power fluctuation, the standardized feature sequence within a preset time window is input into the neural network model to obtain the anomaly confidence level. The numerical range of the above-mentioned anomaly confidence level is from zero to one. If the anomaly confidence level is greater than or equal to the trigger threshold and continues for a preset duration, a grid anomaly is determined, and a switching procedure is executed: First, the active and reactive power reference values are lowered to zero, a blocking command is sent to the energy storage converter to stop the output of the pulse width modulation signal, the grid-connected relay is controlled to disconnect during the current zero-crossing point or the relay safety operation period, and the control loop is switched from the control structure of the current inner loop plus the power outer loop to the dual closed-loop control of the voltage loop and the frequency loop, the pulse width modulation signal is re-output and the local voltage and frequency reference is established, and the continuous power supply to the local load is maintained through soft start and current limiting; during the anomaly handling process, the anomaly characteristics and anomaly confidence curve are recorded for traceability and parameter optimization. When the aforementioned anomaly confidence level is less than or equal to the release threshold, and the grid voltage and frequency remain within the allowable range and maintain a preset recovery time, the voltage difference is determined. A virtual current is determined based on the voltage difference and a preset impedance value. The instantaneous power command value is then obtained by multiplying the grid voltage and the virtual current. The criterion is that the imaginary part of the instantaneous power command value is zero and the real part is less than the real power threshold. This determines the synchronization angle and controls the grid-connected relay to engage, thereby achieving reconnection. Therefore, when voltage fluctuations, frequency surges, or harmonic distortions occur in the grid, the system can complete the identification and switching within milliseconds, achieving accurate, fast, and minimally impactful adaptive off-grid switching. This reduces the risk of erroneous and missed switching, ensuring the safe operation of the energy storage converter and grid equipment, as well as the continuous power supply to the load.
[0079] This application also provides an energy storage device. It should be noted that the energy storage device of this application can be used to execute the control method for off-grid / grid switching provided in this application. This device is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0080] The energy storage device provided in the embodiments of this application will be described below.
[0081] Figure 3 This is a schematic diagram of an energy storage device according to an embodiment of this application. Figure 3 As shown, the device includes:
[0082] The first processing unit 10 is used to synchronously adjust the output voltage of the PCS and the input voltage of the PCS using a PID algorithm when a grid connection control command is received. In the process of synchronous adjustment, the difference between the output voltage of the PCS and the input voltage of the PCS and the voltage angle are adjusted.
[0083] Specifically, upon receiving the instruction, the PID algorithm is used to adjust the output voltage of the PCS to match the grid voltage. During this stage, the PCS output voltage is continuously monitored, and the difference between it and the grid voltage (including amplitude and phase differences) serves as the input to the PID controller. The PID algorithm dynamically adjusts the output voltage through calculations of proportional, integral, and derivative parameters until the difference is reduced to within a set safety threshold.
[0084] The second processing unit 20 is used to control the grid connection of the PCS to be turned on after the output voltage of the PCS is synchronized with the input voltage of the PCS, so as to switch the PCS from off-grid operation to grid-connected operation.
[0085] Specifically, when the output voltage of the PCS is synchronized with the grid voltage, that is, when the voltage difference and phase difference are within the allowable range, the grid-connected switch is automatically closed, so that the PCS can smoothly transition from off-grid mode to grid-connected mode.
[0086] Through the above embodiments, the PID algorithm is a closed-loop feedback control mechanism that controls based on the error (the difference between the target value and the actual value), the accumulation of error, and the rate of change of error, thereby achieving the goal of reducing error. During the switching process, the first processing unit uses the difference between the inverter's output voltage and the grid voltage, as well as their angle difference, as inputs to the PID algorithm. The second processing unit continuously fine-tunes these differences, bringing the two voltages closer and closer until they are completely synchronized in amplitude and phase. PID control enables finer regulation, reducing over- or under-regulation, ensuring a smooth switching process, and avoiding current surges. Only when the inverter's output voltage is synchronized with the grid voltage—that is, when the difference and angle difference are within the preset allowable range—will the control system issue a signal to close the grid connection, completing the switch from off-grid to grid-connected. This ensures that the inverter output and grid voltage are optimally matched before the grid connection path is closed, thereby avoiding the large current surge during switching and reducing the potential damage risk to the inverter and grid equipment. It solves the problem of how to accurately control the synchronization of the inverter output voltage and grid voltage during off-grid to on-grid switching to eliminate current surges and protect the PCS and grid equipment from damage.
[0087] In one alternative embodiment, the first processing unit includes: a first processing module, configured to determine a voltage difference based on the output voltage of the PCS and the input voltage of the PCS; a second processing module, configured to reduce the voltage difference using a PID algorithm until the voltage difference is 0; and a third processing module, configured to synchronize the angle of the output voltage of the PCS and the angle of the input voltage of the PCS using a PID algorithm.
[0088] In the above embodiments, the PID algorithm can precisely adjust the PCS output voltage based on the real-time monitored difference between the PCS output voltage and the grid voltage, through dynamically calculated proportional, integral, and derivative components, until the two reach the same amplitude. During this process, the PID controller continuously adjusts the output to compensate for deviations, ensuring that zero voltage difference is ultimately achieved, thereby avoiding current surges caused by voltage differences during switching. In addition to precise amplitude adjustment, the PID algorithm is also used for angle or phase synchronization. By calculating the angle difference between the output voltage and the input voltage, the PID controller can adjust the PCS output phase in real time until it matches the phase of the grid voltage. The PID algorithm can quickly adjust control parameters to maintain the set synchronization state in the face of rapid voltage changes or external interference. The integral term can eliminate steady-state errors in the system, ensuring high-precision synchronization over long periods. By avoiding current surges and ensuring smooth switching, the stress on the internal components of the PCS is significantly reduced, and equipment wear caused by frequent switching is reduced, thereby extending the overall service life of the PCS, enhancing the reliability and safety of the system, and further protecting the PCS and grid equipment from damage.
[0089] Specifically, the output voltage of the PCS and the grid voltage are acquired in real time by a voltage sensor, and the difference between the two is calculated. This difference is the input to the PID controller, i.e., the deviation signal, used to evaluate the accuracy of the current voltage synchronization.
[0090] In another alternative embodiment, the first processing module includes: a first determining submodule, configured to determine that the real part difference is the difference between the real part of the output voltage of the PCS and the real part of the input voltage of the PCS, and to determine that the imaginary part difference is the imaginary part of the output voltage of the PCS and the imaginary part of the input voltage of the PCS; a second determining submodule, configured to determine that the imaginary part product is the product of the imaginary part difference and the imaginary part unit; and a third determining submodule, configured to determine that the voltage difference is the sum of the real part difference and the imaginary part product.
[0091] In the above embodiments, by separating the real and imaginary parts (i.e., the rectangular coordinate representation of the voltage), the difference between the real and imaginary parts is calculated separately, and then multiplied using the imaginary part units. The resulting voltage difference is a complex number that includes both amplitude and phase information. This method can more accurately reflect voltage synchronization deviations, especially suitable for AC voltage synchronization, as AC voltage varies in time and space, involving not only amplitude but also phase information. After determining the complex difference between the PCS output and input voltages, the deviation can be quickly and accurately compensated through dynamic adjustment using a PID algorithm. The control parameters can be adjusted in real time based on the magnitude and trend of the difference. Before the PCS output is fully synchronized with the grid voltage, the grid connection path is kept disconnected. Once precise voltage synchronization is achieved through the PID algorithm, i.e., the voltage difference is adjusted to zero, the grid connection switch is turned on, switching the PCS from off-grid mode to grid-connected mode. This effectively avoids current surges caused by voltage mismatch during switching, reduces potential damage to internal PCS components and other grid equipment, and improves the safety and stability of the equipment.
[0092] Specifically, according to Determine the above real part difference, based on Determine the above imaginary part difference based on ( Determine the product of the imaginary parts, based on =( + ( Determine the voltage difference mentioned above, where, V inv The DC input voltage, v inv_α Let v be the real part of the voltage along the α-axis. inv_β Let be the component of the voltage along the α-axis, i.e., the imaginary part, and j be the imaginary unit. V gird The AC output grid voltage, v grid_α Let v be the component of the grid voltage on the α-axis, i.e., the real part. grid_β This represents the imaginary part of the grid voltage on the β axis.
[0093] In some exemplary embodiments, the third processing module includes: a fourth determining submodule, configured to determine the virtual current as the ratio of the voltage difference to the preset resistance value; a fifth determining submodule, configured to determine the instantaneous power command value as the product of the input voltage of the PCS and the virtual current; and a sixth determining submodule, configured to determine that the angle output by the PID algorithm at the current moment is the synchronization angle when the imaginary part of the instantaneous power command value is 0 and the real part of the instantaneous power command value is less than the power real part threshold.
[0094] In the above embodiments, by calculating the virtual current (i.e., the voltage difference divided by the preset resistance value) and obtaining the instantaneous power command value, which is the product of the PCS input voltage and the virtual current, the phase difference between the PCS output voltage and the grid voltage can be dynamically detected. When the imaginary part of the instantaneous power command value is zero and the real part is lower than the set real power threshold, it indicates that the angle of the PCS output voltage has reached synchronization with the angle of the grid voltage. At this time, the output angle of the PID algorithm is the synchronization angle, ensuring that the output voltage and the grid voltage are consistent in phase before the PCS is connected to the grid. In addition, the PID algorithm can ensure that the phase of the PCS output voltage is perfectly matched with the phase of the grid voltage, thereby reducing the possibility of current surges and ensuring that the system will not experience significant interruptions or fluctuations when connected to the grid. This achieves smooth mode switching, improves overall reliability and stability, and reduces equipment maintenance costs. Smooth mode switching also helps to extend the service life of the PCS and its related components, reduces the frequency of equipment replacement, and saves operating costs in the long run.
[0095] Specifically, according to Determine the above virtual current, where For the aforementioned virtual current, The voltage difference mentioned above; according to Determine the above instantaneous power command value, where The above-mentioned power command value is given by V. gird This refers to the grid voltage output from the AC side.
[0096] In some other exemplary embodiments, the fifth determining submodule includes: a sixth determining submodule, configured to determine that the first product is the product of the real part of the input voltage of the PCS and the imaginary part of the output voltage of the PCS, and to determine that the second product is the product of the imaginary part of the input voltage of the PCS and the real part of the output voltage of the PCS; and a seventh determining submodule, configured to determine that the real part of the instantaneous power command value is the difference between the first product and the second product.
[0097] In the above embodiments, by calculating the first product (the product of the real part of the PCS input voltage and the imaginary part of the output voltage) and the second product (the product of the imaginary part of the PCS input voltage and the real part of the output voltage), and then taking the difference between the two, the real part of the instantaneous power is obtained. By decomposing the voltage signal into real and imaginary parts, the phase difference between voltages can be assessed more accurately, providing an accurate data basis for subsequent phase adjustment. The real part of the instantaneous power command value directly reflects the phase difference between the PCS output voltage and the grid voltage. When the two are perfectly synchronized, the real part of the instantaneous power will theoretically be close to zero. Therefore, by continuously monitoring the magnitude of the real part of the instantaneous power, information on the phase synchronization status can be obtained in real time, providing a real-time feedback signal to the PID controller to ensure accurate adjustment. In addition, the PID algorithm dynamically adjusts the control parameters based on the feedback of the real part of the instantaneous power to minimize this difference until the phase of the PCS output voltage is perfectly synchronized with the grid voltage. Compared to adjusting by directly measuring the angle difference, the strategy of using virtual power calculation can achieve angle synchronization more quickly and stably, especially when the grid voltage fluctuates frequently or the PCS output load changes significantly. This not only improves the efficiency of grid connection switching and power quality, but also simplifies the control logic.
[0098] Specifically, according to Determine the first product mentioned above, based on To determine the second product mentioned above, according to P= Determine the real part of the instantaneous power command value, where P is the real part of the instantaneous power command value, representing the active power.
[0099] In some exemplary embodiments of this application, the fifth determining submodule further includes: an eighth determining submodule, configured to determine that the first difference is the difference between the real part of the output voltage of the PCS and the real part of the input voltage of the PCS, and to determine that the third product is the product of the real part of the input voltage of the PCS and the first difference; a ninth determining submodule, configured to determine that the second difference is the difference between the imaginary part of the output voltage of the PCS and the imaginary part of the input voltage of the PCS, and to determine that the fourth product is the product of the imaginary part of the input voltage of the PCS and the second difference; and a tenth determining submodule, configured to determine that the imaginary part of the instantaneous power command value is the sum of the third product and the fourth product.
[0100] In the above embodiments, when calculating the imaginary part of the instantaneous power command value, the phase difference between the PCS output voltage and the grid voltage can be accurately captured by determining the first difference and the second difference. This not only detects phase asynchrony but also quantifies the deviation, providing accurate input information for subsequent PID control. By multiplying the real part of the PCS input voltage by the first difference and the imaginary part by the second difference, not only the voltage amplitude difference but also the influence of the phase angle are considered, resulting in a more comprehensive and refined virtual power command value for subsequent phase synchronization adjustment. Using the calculated imaginary part of the instantaneous power command value, the PCS output voltage is dynamically adjusted using a PID algorithm until the phase angle between the PCS output and the grid voltage is perfectly matched. Compared to adjusting directly by measuring the phase angle, this method utilizes the linear characteristics of the voltage signal to achieve phase synchronization more quickly and accurately. This ensures that the PCS maintains phase consistency with the grid voltage during grid connection, avoiding current surges that may occur due to phase mismatch. It improves the stability and reliability of the PCS grid connection process, reduces unnecessary power conversion losses, and ensures smooth energy exchange between the PCS and the grid.
[0101] Specifically, according to Determine the first difference mentioned above, based on ( To determine the third product mentioned above, based on Determine the second difference mentioned above, based on ( To determine the fourth product mentioned above, according to Q= ( + ( Determine the above sum value, where Q is the above sum value, representing reactive power.
[0102] In some further exemplary embodiments of this application, the above-described apparatus further includes: a first determining unit, configured to determine whether a power grid restoration event has occurred; and a second determining unit, configured to maintain the PCS in off-grid operation if it is determined that the power grid restoration event has occurred, and if it is determined that the power grid restoration event has not occurred.
[0103] In the above embodiments, the synchronization adjustment process between the PCS output voltage and the grid voltage is initiated only when a grid restoration event is confirmed. This ensures that the PCS will not attempt to connect to the grid before the grid has stabilized, avoiding potential power surges or equipment damage. Especially after a grid fault, such as a sudden power outage or voltage fluctuation, time is needed to return to normal. Direct grid connection without proper assessment could lead to overload within the PCS or even secondary impacts on the grid. This assessment mechanism effectively enhances the safety of the entire system. After the grid recovers and is confirmed to be stable, voltage synchronization adjustment is performed using a PID algorithm, enabling a smooth transition from off-grid to on-grid mode. This avoids the power quality degradation that can occur with sudden grid connection, such as voltage spikes and current surges, ensuring smooth power conversion and distribution, improving the user's electricity experience, and guaranteeing stable equipment operation. If no grid restoration event is confirmed, the PCS maintains off-grid operation, allowing it to independently supply power to the load when the grid is unavailable. This enables PCS to manage energy storage resources, such as battery energy, more intelligently in off-grid mode, ensuring that the system can continue to supply power before the grid is restored. This is especially effective in remote areas or when the grid is unstable, improving energy utilization efficiency and system self-sufficiency, and reducing the overall energy consumption of the system.
[0104] In one alternative embodiment, the apparatus further includes a generation unit that generates a blocking command and sends the blocking command to the PCS to control the PCS to stop outputting PWM signals.
[0105] In the above embodiments, after the PCS output voltage synchronizes with the grid voltage, the execution of the PWM blocking command ensures the precise maintenance of this synchronization state. By stopping the PWM signal output, the PCS output voltage is directly controlled by the grid voltage, avoiding minor phase or amplitude deviations that might occur if the PCS continues to independently control the output voltage after grid connection. In off-grid mode, the PCS controls the inverter output voltage via a PWM signal, but in grid-connected mode, this control mechanism is no longer necessary. The PWM blocking command stops the PWM signal output, avoiding unnecessary power conversion processes, reducing energy loss during conversion, and improving the overall efficiency of the power conversion system. During the transition of the PCS from off-grid mode to grid-connected mode, if the PWM signal output is not stopped in time, the inverter may bear additional load due to dual-terminal voltage control, even leading to overload risk. The generation and transmission of the PWM blocking command ensures that the PCS can immediately stop independently controlling the output voltage after grid connection, avoiding inverter overload and protecting equipment safety. Sending a PWM blocking command to the PCS stops its PWM signal output, thus switching the PCS from voltage source mode to current source mode. With the grid voltage as the primary driver, the PCS only needs to control the output current, simplifying the control logic and improving system response speed and control accuracy. Executing the PWM blocking command helps the PCS adapt to the grid-connected environment more quickly, reducing potential system oscillations or instability caused by control mode transitions. Simultaneously, it avoids energy conflicts when the PCS and grid voltage are out of sync, enhancing overall system stability.
[0106] In another alternative embodiment, the above-mentioned device further includes: an acquisition unit, used to acquire the output voltage of the PCS and the input voltage of the PCS acquired by the voltage acquisition circuit.
[0107] In the above embodiments, the real-time data acquisition function of the voltage acquisition circuit obtains voltage data used to calculate the amplitude and phase difference between the PCS output voltage and the grid voltage. The PID algorithm utilizes this difference information to gradually reduce the amplitude and phase differences by adjusting the inverter's control parameters until they are completely synchronized, providing the control system with accurate information on the current PCS output voltage and grid voltage. By acquiring voltage data in advance, grid connection commands can be issued only after ensuring voltage amplitude and phase synchronization, effectively preventing maloperation and current surges caused by voltage asynchrony. Precise voltage acquisition and synchronization adjustment significantly improve the stability and safety of the PCS during off-grid to grid-connected processes, providing a guarantee for the safe operation of smart grids and energy storage systems. Through the voltage information acquired by the voltage acquisition circuit, the PCS can more accurately adjust its output to match grid conditions. This not only reduces losses in the PCS during energy conversion but also ensures that the PCS operates at maximum efficiency, improving overall energy utilization efficiency. The acquisition of real-time voltage data accelerates the response speed of the control system. The PID algorithm can receive and process voltage information in real time, make control adjustments more quickly, shorten the transition time of PCS from off-grid to grid-connected, and improve the system's adaptability to grid changes.
[0108] In some exemplary embodiments, the second processing unit includes a control module for controlling the grid-connected relay to engage, thereby enabling the grid-connected path of the PCS.
[0109] In the above embodiments, when the grid-connected relay is activated, its contacts close, forming an electrical connection path between the PCS and the power grid. This is a prerequisite for the PCS to switch from off-grid mode to grid-connected operation, providing a physical channel for the inverter's output power to be transmitted to the grid. After the relay contacts close, the PCS's output current can be directly connected to the grid, realizing the transmission of power from the energy storage system to the grid. In grid-connected mode, the PCS can act as a power source, injecting power from the energy storage device into the grid, or as a load, absorbing power from the grid for charging. By controlling the activation of the grid-connected relay, the PCS can quickly respond to grid-connection commands, significantly reducing the time required to switch from off-grid mode to grid-connected mode. At the moment of switching from off-grid to grid-connected, improper control may lead to unnecessary energy waste, such as voltage surges causing sudden current changes and additional losses. By precisely controlling the grid-connected relay, the PCS can minimize energy losses during this process and also reduce control complexity.
[0110] In other exemplary embodiments, the above-mentioned apparatus further includes: a detection unit for real-time detection of the power grid status, the power grid status including voltage fluctuations and frequency offsets of the power grid; a third processing unit for processing the detected power grid status using a neural network model to obtain an anomaly confidence level; and a control unit for controlling the PCS to switch to off-grid operation when the anomaly confidence level is greater than or equal to a confidence level threshold.
[0111] In the above embodiments, by detecting voltage fluctuations and frequency shifts in the power grid in real time, any changes in the power grid can be quickly captured, whether it be a minor disturbance or a serious fault, and information can be obtained immediately. The monitoring scope is not limited to voltage and frequency, but can be extended to other power grid parameters, such as phase angle and power quality, providing a basis for a comprehensive assessment of the power grid health status. Using a pre-trained neural network model to process the detected power grid state data, complex power grid behavior patterns can be identified, including fault precursors and abnormal trends, making accurate judgments even in cases of minor or initial anomalies. The neural network model can output a probability score for anomaly detection, i.e., anomaly confidence level, providing a quantitative indicator for subsequent decision-making, enabling the PCS to react based on data-driven principles. When the anomaly confidence level reaches or exceeds a preset confidence threshold, the PCS is controlled to switch to off-grid operation mode, ensuring that the PCS can avoid the impact of power grid faults and protecting the PCS and its related equipment from damage. By rapidly responding to power grid anomalies, the PCS can avoid the chain reaction of power grid faults, reduce the impact of power grid fluctuations on the PCS, and maintain stable system operation.
[0112] The aforementioned energy storage device includes a processor and a memory. The first processing unit and the second processing unit, etc., are all stored as program units in the memory. The processor executes these program units stored in the memory to achieve the corresponding functions. All of the above modules are located in the same processor; alternatively, the modules may be located in different processors in any combination.
[0113] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and by adjusting kernel parameters, at least the problem of precisely controlling the synchronization of the inverter output voltage with the grid voltage during off-grid to grid-connected switching can be solved to eliminate current surges and protect the PCS and grid equipment from damage.
[0114] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0115] This application also provides an energy storage system, including: a PCS and a controller, wherein the PCS and the controller communicate with each other, and the energy storage system performs at least the following steps:
[0116] Step S101: Upon receiving the grid connection control command, a PID algorithm is used to synchronously adjust the output voltage of the PCS and the input voltage of the PCS. During the synchronous adjustment, the difference between the output voltage of the PCS and the input voltage of the PCS, as well as the voltage angle, are adjusted.
[0117] Specifically, upon receiving the instruction, the PID algorithm is used to adjust the output voltage of the PCS to match the grid voltage. During this stage, the PCS output voltage is continuously monitored, and the difference between it and the grid voltage (including amplitude and phase differences) serves as the input to the PID controller. The PID algorithm dynamically adjusts the output voltage through calculations of proportional, integral, and derivative parameters until the difference is reduced to within a set safety threshold.
[0118] Step S102: After the output voltage of the PCS is synchronized with the input voltage of the PCS, the grid connection path of the PCS is turned on to switch the PCS from off-grid operation to grid-connected operation.
[0119] Specifically, when the output voltage of the PCS is synchronized with the grid voltage, that is, when the voltage difference and phase difference are within the allowable range, the grid-connected switch is automatically closed, so that the PCS can smoothly transition from off-grid mode to grid-connected mode.
[0120] In one embodiment of this application, a PID algorithm is used to synchronize the output voltage of the PCS with the input voltage of the PCS, including: determining a voltage difference based on the output voltage of the PCS and the input voltage of the PCS; using a PID algorithm to reduce the voltage difference until the voltage difference is 0; and using a PID algorithm to synchronize the angle of the output voltage of the PCS with the angle of the input voltage of the PCS.
[0121] In one embodiment of this application, determining the voltage difference based on the output voltage and input voltage of the PCS includes: determining the real part difference as the difference between the real part of the output voltage and the real part of the input voltage of the PCS, and determining the imaginary part difference as the imaginary part of the output voltage and the imaginary part of the input voltage of the PCS; determining the imaginary part product as the product of the imaginary part difference and the imaginary part unit; and determining the voltage difference as the sum of the real part difference and the imaginary part product.
[0122] In one embodiment of this application, the PID algorithm is used to synchronize the angle of the output voltage of the PCS and the angle of the input voltage of the PCS, including: determining the virtual current as the ratio of the voltage difference to the preset resistance value; determining the instantaneous power command value as the product of the input voltage of the PCS and the virtual current; and determining the angle output by the PID algorithm at the current moment as the synchronization angle when the imaginary part of the instantaneous power command value is 0 and the real part of the instantaneous power command value is less than the power real part threshold.
[0123] In one embodiment of this application, in the process of determining the instantaneous power command value as the product of the input voltage of the PCS and the virtual current, the method further includes: determining that the first product is the product of the real part of the input voltage of the PCS and the imaginary part of the output voltage of the PCS, and determining that the second product is the product of the imaginary part of the input voltage of the PCS and the real part of the output voltage of the PCS; and determining that the real part of the instantaneous power command value is the difference between the first product and the second product.
[0124] In one embodiment of this application, in determining the instantaneous power command value as the product of the input voltage of the PCS and the virtual current, the method further includes: determining a first difference as the difference between the real part of the output voltage of the PCS and the real part of the input voltage of the PCS, and determining a third product as the product of the real part of the input voltage of the PCS and the first difference; determining a second difference as the difference between the imaginary part of the output voltage of the PCS and the imaginary part of the input voltage of the PCS, and determining a fourth product as the product of the imaginary part of the input voltage of the PCS and the second difference; and determining the imaginary part of the instantaneous power command value as the sum of the third product and the fourth product.
[0125] In one embodiment of this application, before using a PID algorithm to synchronize the output voltage of the PCS with the input voltage of the PCS, the method further includes: determining whether a grid recovery event has occurred; if the grid recovery event has occurred, and if the grid recovery event has not occurred, maintaining the PCS in off-grid operation.
[0126] In one embodiment of this application, after the output voltage of the PCS is synchronized with the input voltage of the PCS, the method further includes: generating a blocking command and sending the blocking command to the PCS to control the PCS to stop outputting the PWM signal.
[0127] In one embodiment of this application, before using a PID algorithm to synchronously adjust the output voltage of the PCS and the input voltage of the PCS, the method includes: acquiring the output voltage of the PCS and the input voltage of the PCS acquired by a voltage acquisition circuit.
[0128] In one embodiment of this application, controlling the grid connection path of the PCS includes: controlling the grid connection relay to engage to connect the grid connection path of the PCS.
[0129] In one embodiment of this application, the method includes: real-time detection of the power grid status, the power grid status including voltage fluctuations and frequency offsets of the power grid; processing the detected power grid status using a neural network model to obtain an anomaly confidence level; and controlling the PCS to switch to off-grid operation when the anomaly confidence level is greater than or equal to a confidence level threshold.
[0130] Those skilled in the art will understand that the above embodiments are specific examples of implementing this application, and in practical applications, various changes in form and detail can be made without departing from the spirit and scope of this application. Any person skilled in the art can make various alterations and modifications without departing from the spirit and scope of this application; therefore, the scope of protection of this application should be determined by the scope defined in the claims.
Claims
1. A control method for off-grid and grid-connected, characterized in that, include: Upon receiving a grid-connected control command, a PID algorithm is used to synchronously adjust the output voltage of the PCS and the input voltage of the PCS. During the synchronous adjustment process, the difference between the output voltage of the PCS and the input voltage of the PCS, as well as the voltage angle, are adjusted. After the output voltage of the PCS is synchronized with the input voltage of the PCS, the grid connection path of the PCS is turned on to switch the PCS from off-grid operation to grid-connected operation. The output voltage of the PCS is synchronized with the input voltage of the PCS using a PID algorithm, including: The voltage difference is determined based on the output voltage and the input voltage of the PCS. The voltage difference is reduced using a PID algorithm until it reaches zero. The PID algorithm is used to synchronize the angle of the output voltage of the PCS and the angle of the input voltage of the PCS. The PID algorithm is used to synchronize the angle of the output voltage and the angle of the input voltage of the PCS, including: The virtual current is determined to be the ratio of the voltage difference to the preset resistance value; The instantaneous power command value is determined to be the product of the input voltage of the PCS and the virtual current; If the imaginary part of the instantaneous power command value is 0 and the real part of the instantaneous power command value is less than the power real part threshold, the angle output by the PID algorithm at the current moment is determined to be the synchronization angle.
2. The control method of off-grid and grid-connected according to claim 1, characterized in that, Determine the voltage difference based on the output voltage and the input voltage of the PCS, including: The real part difference is determined to be the difference between the real part of the output voltage of the PCS and the real part of the input voltage of the PCS, and the imaginary part difference is determined to be the imaginary part of the output voltage of the PCS and the imaginary part of the input voltage of the PCS. The product of the imaginary parts is determined to be the product of the difference in the imaginary parts and the unit of the imaginary part; The voltage difference is determined to be the sum of the product of the real part difference and the imaginary part.
3. The control method of off-grid and grid-connected according to claim 1, characterized in that, In determining the instantaneous power command value as the product of the input voltage of the PCS and the virtual current, the method further includes: The first product is determined to be the product of the real part of the input voltage of the PCS and the imaginary part of the output voltage of the PCS, and the second product is determined to be the product of the imaginary part of the input voltage of the PCS and the real part of the output voltage of the PCS. The real part of the instantaneous power command value is determined to be the difference between the first product and the second product.
4. The control method of off-grid and grid-connected according to claim 1, characterized in that, In determining the instantaneous power command value as the product of the input voltage of the PCS and the virtual current, the method further includes: The first difference is determined to be the difference between the real part of the output voltage of the PCS and the real part of the input voltage of the PCS, and the third product is determined to be the product of the real part of the input voltage of the PCS and the first difference. The second difference is determined to be the difference between the imaginary part of the output voltage of the PCS and the imaginary part of the input voltage of the PCS, and the fourth product is determined to be the product of the imaginary part of the input voltage of the PCS and the second difference. The imaginary part of the instantaneous power command value is determined to be the sum of the third product and the fourth product.
5. The control method of off-grid and grid-connected according to claim 1, characterized in that, Before using a PID algorithm to synchronize the output voltage of the PCS with the input voltage of the PCS, the method further includes: Determine whether a power grid restoration event has occurred; In the event that the power grid restoration event has occurred, voltage synchronization adjustment is performed using a PID algorithm. If it is determined that the power grid restoration event has not occurred, the PCS shall remain in off-grid operation.
6. The control method of off-grid and grid-connected according to claim 1, characterized in that, After the output voltage of the PCS is synchronized with the input voltage of the PCS, the method further includes: A blocking command is generated and sent to the PCS to control the PCS to stop outputting PWM signals.
7. The control method of off-grid and grid-connected according to claim 1, characterized in that, Before using a PID algorithm to synchronize the output voltage of the PCS with the input voltage of the PCS, the process includes: The voltage at the output terminal of the PCS and the voltage at the input terminal of the PCS are acquired by the voltage acquisition circuit.
8. The control method of off-grid and grid-connected according to claim 1, characterized in that, Controlling the grid connection of the PCS includes: The grid-connection relay is activated to enable the grid connection path of the PCS.
9. The control method for switching from off-grid to on-grid according to any one of claims 1 to 8, characterized in that, include: Real-time monitoring of power grid status, including voltage fluctuations and frequency offsets; A neural network model is used to process the detected power grid state to obtain the anomaly confidence level; If the abnormal confidence level is greater than or equal to the confidence level threshold, the PCS is controlled to switch to offline operation.
10. An energy storage device, characterized in that, include: The first processing unit is used to synchronously adjust the output voltage of the PCS and the input voltage of the PCS using a PID algorithm when a grid-connected control command is received. During the synchronous adjustment process, the difference between the output voltage of the PCS and the input voltage of the PCS, as well as the voltage angle, are adjusted. The second processing unit is used to control the grid connection of the PCS to be turned on after the output voltage of the PCS is synchronized with the input voltage of the PCS, so as to switch the PCS from off-grid operation to grid-connected operation. The first processing unit includes: The first processing module is used to determine the voltage difference based on the output voltage of the PCS and the input voltage of the PCS. The second processing module is used to reduce the voltage difference using a PID algorithm until the voltage difference is 0. The third processing module is used to synchronize the angle of the output voltage of the PCS and the angle of the input voltage of the PCS using a PID algorithm. The third processing module includes: a fourth determining submodule, used to determine the virtual current as the ratio of the voltage difference to the preset resistance value; a fifth determining submodule, used to determine the instantaneous power command value as the product of the input voltage of the PCS and the virtual current; and a sixth determining submodule, used to determine that the angle output by the PID algorithm at the current moment is the synchronization angle when the imaginary part of the instantaneous power command value is 0 and the real part of the instantaneous power command value is less than the power real part threshold.
11. The energy storage device according to claim 10, characterized in that, The first processing module includes: The first determining submodule is used to determine that the real part difference is the difference between the real part of the output voltage of the PCS and the real part of the input voltage of the PCS, and to determine that the imaginary part difference is the imaginary part of the output voltage of the PCS and the imaginary part of the input voltage of the PCS. The second determining submodule is used to determine that the imaginary part product is the product of the imaginary part difference and the imaginary part unit; The third determining submodule is used to determine that the voltage difference is the sum of the product of the real part difference and the imaginary part.
12. An energy storage system, characterized in that, include: PCS and controller, the PCS and controller communicating with each other, the controller being used to perform the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Power conversion system, converter and off-grid and grid-connected switching control method thereof
CN116937689A
VSG control method and device of DSP numerical control high-frequency bidirectional PCS converter
CN120280950A