Control method for switching off-grid to grid-connected, energy storage device and energy storage system

By adjusting the difference and angle between the output voltage of the PCS and the grid voltage using the PID algorithm, the problem of inaccurate synchronous adjustment of the inverter during off-grid to grid switching is solved, ensuring voltage matching, avoiding current surges, and improving the safety and stability of the energy storage system.

CN120914915AActive Publication Date: 2025-11-07ZHEJIANG JINKO ENERGY STORAGE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511418252.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2025-11-07
Estimated Expiration
2045-09-29

AI Technical Summary

Technical Problem

In existing solutions for off-grid to grid-connected control, the synchronization regulation between the inverter output voltage and the grid voltage is inaccurate, leading to current surges that damage the PCS and grid equipment.

Method used

The PID algorithm is used to synchronously adjust the output voltage and input voltage of the PCS. By adjusting the voltage difference and angle difference, the grid connection is controlled to be turned on until they are perfectly matched.

Benefits of technology

It achieves precise synchronization between the inverter output voltage and the grid voltage, avoids current surges, protects the PCS and grid equipment, and improves the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120914915A_ABST
    Figure CN120914915A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the field of energy storage, and provides an off-grid and grid-connected switching control method, an energy storage device and an energy storage system.The method comprises the steps that under the condition that a grid-connected control instruction is received, the output end voltage of a PCS and the input end voltage of the PCS are synchronously adjusted through a PID algorithm, in the synchronous adjustment process, the difference value between the voltage of the output end of the PCS and the voltage of the input end of the PCS and the angle of the voltage are adjusted; and after the voltage of the output end of the PCS is synchronized with the voltage of the input end of the PCS, a grid-connected access of the PCS is controlled to be switched on, so that the PCS is switched from off-grid operation to grid-connected operation. The problem of how to accurately control the synchronization of the output voltage of the inverter and the voltage of the power grid in the off-grid to grid-connected switching process so as to eliminate the current impact and protect the PCS and the power grid equipment from being damaged is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of energy storage, and in particular to a control method for off-grid-to-grid switching, an energy storage device, and an energy storage system. BACKGROUND

[0002] A power conversion system (PCS), also known as a power inverter, is one of the core devices in an energy storage system. The PCS includes power conversion components (e.g., IGBTs), control components, protection components, a communication module, and a heat dissipation system (e.g., including a heat sink, a fan, or a liquid cooling plate).

[0003] In the control of off-grid-to-grid switching, the prior art usually uses a preset step size to adjust the voltage, which results in an unexpected adjustment result. How to accurately control the synchronization of the output voltage of the inverter and the grid voltage during the off-grid-to-grid switching process to eliminate current surges and protect the PCS and grid equipment from damage is a problem that needs to be solved urgently. SUMMARY

[0004] The embodiments of the present application provide a control method for off-grid-to-grid switching, an energy storage device, and an energy storage system, which at least solve the problem of how to accurately control the synchronization of the output voltage of the inverter and the grid voltage during the off-grid-to-grid switching process to eliminate current surges and protect the PCS and grid equipment from damage.

[0005] According to some embodiments of the present application, the embodiments of the present application provide a control method for off-grid-to-grid switching, comprising: in the case of receiving a grid connection control instruction, using a PID algorithm to synchronously adjust the output voltage of a PCS and the input voltage of the PCS, wherein the difference between the output voltage of the PCS and the input voltage of the PCS and the angles of the voltages are adjusted during the synchronous adjustment; after the output voltage of the PCS and the input voltage of the PCS are synchronized, controlling the grid connection path of the PCS to be turned on to switch the PCS from off-grid operation to grid-connected operation.

[0006] In some embodiments, using the PID algorithm to synchronously adjust the output voltage of the PCS and the input voltage of the PCS comprises: determining a voltage difference value according to the output voltage of the PCS and the input voltage of the PCS; using the PID algorithm to reduce the voltage difference value until the voltage difference value is 0; and using the PID algorithm to synchronize the angle of the output voltage of the PCS and the angle of the input voltage of the PCS.

[0007] In some embodiments, determining the voltage difference value according to the output voltage of the PCS and the input voltage of the PCS comprises: determining a real part difference value as a difference between a real part of the output voltage of the PCS and a real part of the input voltage of the PCS, and determining an imaginary part difference value as a difference between an imaginary part of the output voltage of the PCS and an imaginary part of the input voltage of the PCS; determining an imaginary part product as a product of the imaginary part difference value and an imaginary part unit; and determining the voltage difference value as a sum of the real part difference value and the imaginary part product.

[0008] In some embodiments, synchronizing the angle of the output voltage of the PCS and the angle of the input voltage of the PCS using the PID algorithm comprises: determining a virtual current as a ratio of the voltage difference value and a preset resistance value; determining an instantaneous power command value as a product of the input voltage of the PCS and the virtual current; and determining an angle output by the PID algorithm at a current time as a synchronization angle in a case where an imaginary part of the instantaneous power command value is 0 and a real part of the instantaneous power command value is less than a power real part threshold.

[0009] In some embodiments, in the process of determining the instantaneous power command value as a product of the input voltage of the PCS and the virtual current, the method further comprises: determining a first product as a product of a real part of the input voltage of the PCS and an imaginary part of the output voltage of the PCS, and determining a second product as a product of an imaginary part of the input voltage of the PCS and a real part of the output voltage of the PCS; and determining the real part of the instantaneous power command value as a difference between the first product and the second product.

[0010] In some embodiments, in the process of determining the instantaneous power command value as a product of the input voltage of the PCS and the virtual current, the method further comprises: determining a first difference value as a difference between a real part of the output voltage of the PCS and a real part of the input voltage of the PCS, and determining a third product as a product of the real part of the input voltage of the PCS and the first difference value; determining a second difference value as a difference between an imaginary part of the output voltage of the PCS and an imaginary part of the input voltage of the PCS, and determining a fourth product as a product of the imaginary part of the input voltage of the PCS and the second difference value; and determining an imaginary part of the instantaneous power command value as a sum of the third product and the fourth product.

[0011] In some embodiments, before synchronously adjusting the output voltage of the PCS and the input voltage of the PCS using the PID algorithm, the method further comprises: determining whether a power grid restoration event has occurred; and maintaining the PCS in off-grid operation in a case where it is determined that the power grid restoration event has not occurred.

[0012] In some embodiments, after the output voltage of the PCS is synchronized with the input voltage of the PCS, the method further comprises: generating a blocking instruction, and sending the blocking instruction to the PCS to control the PCS to stop outputting the PWM signal.

[0013] In some embodiments, before the output voltage of the PCS is adjusted synchronously with the input voltage of the PCS by using the PID algorithm, the method comprises: acquiring the output voltage of the PCS and the input voltage of the PCS collected by a voltage acquisition circuit.

[0014] In some embodiments, controlling the grid-connected path of the PCS to be turned on comprises: controlling a grid-connected relay to be attracted to turn on the grid-connected path of the PCS.

[0015] In some embodiments, the method comprises: detecting the grid state in real time, the grid state comprising voltage fluctuation and frequency deviation of the grid; processing the detected grid state by using a neural network model to obtain an abnormal confidence; and in a case where the abnormal confidence is greater than or equal to a confidence threshold, controlling the PCS to switch to off-grid operation.

[0016] In another aspect, the embodiments of the present application provide a power storage device, comprising: a first processing unit configured to, in a case where a grid-connected control instruction is received, adjust the output voltage of the PCS synchronously with the input voltage of the PCS by using a PID algorithm, wherein, in the process of synchronous adjustment, the difference between the output voltage of the PCS and the input voltage of the PCS and the angles of the voltages are adjusted; and a second processing unit configured to, after the output voltage of the PCS is synchronized with the input voltage of the PCS, control the grid-connected path of the PCS to be turned on to switch the PCS from off-grid operation to grid-connected operation.

[0017] In some embodiments, the first processing unit comprises: a first processing module configured to determine a voltage difference according to the output voltage of the PCS and the input voltage of the PCS; a second processing module configured to reduce the voltage difference by 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 by using a PID algorithm.

[0018] In some embodiments, the first processing module comprises: a first determining submodule configured to determine a real part difference value as a difference between a real part of an output voltage of the PCS and a real part of an input voltage of the PCS, and determine a virtual part difference value as a virtual value of a virtual part of the output voltage of the PCS and a real part of the input voltage of the PCS; a second determining submodule configured to determine a virtual part product as a product of the virtual part difference value and a virtual part unit; and a third determining submodule configured to determine the voltage difference value as a sum of the real part difference value and the virtual part product.

[0019] In still another aspect, the embodiments of the present application provide an energy storage system, comprising: a PCS and a controller, the PCS and the controller being in communication, and the controller being configured to execute any one of the methods.

[0020] The technical scheme provided by the embodiments of the present application has at least the following advantages: the PID algorithm is a closed-loop feedback control mechanism, which controls based on error (difference between target value and actual value), accumulation of error and error change rate, so as to achieve the goal of reducing error. In the switching process, the difference between the output voltage of the inverter and the grid voltage and the angle difference are taken as the input of the PID algorithm. Through continuous fine adjustment, the two voltages can be made to be more and more close until they are completely synchronized in amplitude and phase. Through PID control, more precise adjustment can be achieved, the situation of over-adjustment or under-adjustment is reduced, the switching process is ensured to be smooth, and current impact is avoided. When the output voltage of the inverter and the grid voltage are synchronized, that is, the difference and the angle difference are within the preset allowable range, the control system will send a signal to close the grid-connected path, and complete the switching from off-grid to grid-connected. It is ensured that the output of the inverter and the grid voltage are in the best matching state before the grid-connected path is closed, so that the large current impact in the switching moment is avoided, the potential damage risk to the inverter and grid equipment is reduced, and the problem of how to accurately control the synchronization of the output voltage of the inverter and the grid voltage in the off-grid to grid-connected switching process to eliminate current impact and protect the PCS and grid equipment from damage is solved. BRIEF DESCRIPTION OF DRAWINGS

[0021] One or more embodiments are illustrated by way of example in the figures that constitute a part of this patent document, these illustrative examples do not limit the embodiments unless otherwise specified, the figures in the drawings do not constitute a proportional limit; in order to more clearly illustrate the technical scheme in the embodiments or the prior art, the drawings needed to be used in the embodiments will be briefly introduced below, obviously, the drawings in the following description can obtain other drawings without paying creative labor according to these drawings for those skilled in the art.

[0022] Figure 1A flow chart of a control method for off-grid switching to grid according to an embodiment of the present application;

[0023] Figure 2 A flow chart of another control method for off-grid switching to grid according to an embodiment of the present application;

[0024] Figure 3 A schematic diagram of an energy storage device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] As can be known from the background, in the control of off-grid switching to grid, the existing scheme usually uses a preset step size to adjust the voltage, resulting in an adjustment result that does not meet the expectation. To solve the problem of how to accurately control the synchronization of the inverter output voltage and the grid voltage during the off-grid switching to grid, so as to eliminate the current impact and protect the PCS and grid equipment from damage, embodiments of the present application provide a control method for off-grid switching to grid, an energy storage device and an energy storage system.

[0026] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited.

[0027] In this document, reference to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor does it necessarily refer to a particular embodiment that is independent of or alternative to other embodiments. It is explicitly and implicitly understood that the embodiments described herein can be combined.

[0028] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of existence of A, existence of A and B, and existence of B. In addition, the character " / " in this document generally represents an "or" relationship between the front and rear associated objects.

[0029] In the description of the embodiments of the present application, the term "a plurality of" means two or more (including two), and similarly, "a plurality of groups" means two or more groups (including two groups), and "a plurality of pieces" means two or more pieces (including two pieces).

[0030] In the description of the embodiments of the present application, the technical terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate the orientation or positional relationship shown in the drawings, which are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.

[0031] In the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the technical terms "mounting", "connecting", "connecting", "fixing" and the like should be understood broadly, for example, can be fixedly connected, or can be detachably connected, or can be integrated; can be mechanically connected, or can be electrically connected; can be directly connected, or can be indirectly connected through an intermediate medium; can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0032] In the corresponding drawings of the embodiments of the present application, in order to better understand and facilitate the description, the thickness and area of the layer are enlarged. When describing a component (such as a layer, a film, a region or a substrate) on or on the surface of another component, the component can be "directly" on the surface of the other component, or there can be a third component between the two components. On the contrary, when describing a component on the surface of another component or a component surface forming or providing another component, it means that there is no third component between the two components. In addition, when a component is described as "formed substantially" on another component, it means that the component is not formed on the entire surface (or front surface) of the other component, nor on the edge of the entire surface.

[0033] In the description of the embodiments of the present application, when a certain component "includes" another component, unless otherwise specified, other components are not excluded and other components can also be further included. In addition, when a layer, film, region or plate and the like are referred to as "on / over" another component, it can be "directly on" another component (i.e. between the surface of another component and another component without other components), or another component can exist therebetween. In addition, when a layer, film, region, plate and the like are "directly on" another component, or when a layer, film, region, plate and the like are on the surface of another component, it means that there is no other component therebetween.

[0034] The terminology used in the description of the various described embodiments 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 of the disclosure and the appended claims, the term "part" is intended to also include a plurality of parts unless the context clearly indicates otherwise. Therein, parts include components such as layers, films, regions, or plates, among others.

[0035] The embodiments of the present application will be described in detail with reference to the drawings. However, those skilled in the art will understand that many technical details are presented in the embodiments of the present application in order to better enable the reader to understand the present application. However, the claimed technical solutions of the present application can be implemented even without these technical details and based on various changes and modifications of the following embodiments.

[0036] Figure 1 A control method for off-grid switching to grid is provided according to an embodiment of the present application, as shown in Figure 1 The method comprises the following steps:

[0037] In step S101, in the case of receiving a grid connection control instruction, the output voltage of a PCS (Power Conversion System) and the input voltage of the PCS are synchronously adjusted by using a PID algorithm (a closed-loop feedback control algorithm), wherein the difference between the output voltage of the PCS and the input voltage of the PCS and the angle of the voltage are adjusted during the synchronous adjustment.

[0038] Specifically, after receiving the instruction, the output voltage of the PCS is adjusted by using the PID algorithm to match the grid voltage. In this stage, the output voltage of the PCS is continuously monitored, and the difference (including the amplitude difference and the phase difference) between the output voltage of the PCS and the grid voltage is used as the input of the PID controller. The PID algorithm dynamically adjusts the output voltage through the calculation of three parameters of proportion, integration and differentiation, until the difference is reduced to within the set safety threshold.

[0039] In step S102, after the output voltage of the PCS and the input voltage of the PCS are synchronized, 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 and the grid voltage reach the synchronous state, i.e., the voltage difference and the phase difference are within the allowable range, the grid connection switch is automatically controlled to be closed, so that the PCS is smoothly transitioned from the off-grid mode to the grid-connected mode.

[0041] Through the above embodiment, the PID algorithm is a closed-loop feedback control mechanism that controls based on error (the difference between the target value and the actual value), the accumulation of error, and the rate of change of error, so as to achieve the goal of reducing error. In the switching process, the difference between the output voltage of the inverter and the grid voltage and the angular difference are taken as the input of the PID algorithm. Through continuous fine-tuning, the two voltages can be made to approach each other more and more until they are completely synchronized in amplitude and phase. Through PID control, more precise adjustment can be achieved, reducing the situation of over-adjustment or under-adjustment, ensuring smooth switching process, and avoiding current shock. When the output voltage of the inverter and the grid voltage are synchronized, that is, the difference and the angular difference are within the preset allowed range, the control system will send a signal to close the grid-connected path, completing the switching from off-grid to grid-connected. Ensuring that the inverter output and the grid voltage are in the best matching state before the grid-connected path is closed, thereby avoiding large current shock at the moment of switching, reducing the potential damage risk to the inverter and grid equipment, and solving the problem of how to accurately control the synchronization of the inverter output voltage and the grid voltage during the off-grid to grid-connected switching process to eliminate current shock and protect the PCS and grid equipment from damage.

[0042] In an alternative, the output voltage of the PCS and the input voltage of the PCS are synchronously adjusted using a PID algorithm, including: determining the 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 and the angle of the input voltage of the PCS.

[0043] In the above embodiment, the PID algorithm can accurately adjust the output voltage of the PCS based on the difference between the real-time monitored PCS output voltage and the grid voltage through dynamically calculated proportional, integral, and differential components, until the two are consistent in amplitude. During this process, the PID controller continuously adjusts the output to compensate for the deviation, ensuring that a zero voltage difference is ultimately achieved, thereby avoiding current shock caused by voltage differences during the switching process. In addition, in addition to accurate adjustment of the amplitude, the PID algorithm is also used for synchronization of the angle or phase. By calculating the angle difference between the output voltage and the input voltage, the PID controller can adjust the output phase of the PCS in real time until it is consistent with the phase of the grid voltage. The PID algorithm can quickly adjust the control parameters in the face of rapid voltage changes or external disturbances, maintain the set synchronization state, and the integral term can eliminate the steady-state error in the system, ensuring high-precision synchronization over a long period of time. By avoiding current shock and ensuring smooth switching, the stress on the internal components of the PCS is significantly reduced, the device wear caused by frequent switching is reduced, thereby prolonging 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 collected in real time by the voltage sensor, and then the difference between the two is calculated. This difference is the input of the PID controller, i.e. the deviation signal, which is used to evaluate the accuracy of the current voltage synchronization.

[0045] In another alternative, the voltage difference is determined according to the output voltage of the PCS and the input voltage of the PCS, including: determining the real part 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 the imaginary part difference as the difference between the imaginary part of the output voltage of the PCS and the real part of the input voltage of the PCS; determining the imaginary part product as the product of the imaginary part difference and the imaginary unit; and determining the voltage difference as the sum of the real part difference and the imaginary part product.

[0046] In the above embodiment, by separating the real part and the imaginary part (i.e. the rectangular coordinate representation of the voltage), the real part difference and the imaginary part difference are calculated respectively, and then multiplied by the imaginary unit to obtain a complex voltage difference that contains both amplitude and phase information. This method can more accurately reflect the deviation of voltage synchronization, and is especially suitable for the synchronization of alternating voltage, because alternating voltage varies in time and space, involving not only amplitude but also phase information. After determining the complex difference between the output voltage and the input voltage of the PCS, the deviation can be quickly and accurately compensated through the dynamic adjustment of the PID algorithm, and the control parameters can be adjusted in real time according to the size and trend of the difference. Before the output voltage of the PCS is completely synchronized with the grid voltage, the grid connection path is kept open. Once the voltage is accurately synchronized through the PID algorithm, i.e. the voltage difference is adjusted to zero, the grid connection switch is turned on to switch the PCS from off-grid mode to grid-connected mode, effectively avoiding the current surge caused by voltage mismatch during switching, reducing the potential damage to the internal components of the PCS and other grid equipment, and improving the safety and stability of the equipment.

[0047] Specifically, according to the real part difference is determined, according to the imaginary part difference is determined, according to ( the imaginary part product is determined, according to =( + ( the voltage difference is determined, wherein wherein V inv is the input voltage on the DC side, v inv_α is the component of the voltage on the α axis, i.e. the real part, v inv_β is the component of the voltage on the α axis, i.e. the imaginary part, and j is the imaginary unit, wherein V gird is the grid voltage outputted from the AC side, v grid_α is the component of the grid voltage on the α axis, i.e. the real part, v grid_β is the component of the grid voltage on the β axis, i.e. the imaginary part.

[0048] In some example embodiments, the PID algorithm is used to synchronize the angle of the output voltage of the above-mentioned PCS and the angle of the input voltage of the above-mentioned PCS, including: determining a virtual current as the ratio of the above-mentioned voltage difference and a preset resistance value; determining an instantaneous power command value as the product of the input voltage of the above-mentioned PCS and the above-mentioned virtual current; in the case that the imaginary part of the above-mentioned instantaneous power command value is 0 and the real part of the above-mentioned instantaneous power command value is less than a power real part threshold, determining the angle outputted by the above-mentioned PID algorithm at the current time as a synchronization angle.

[0049] In the above-mentioned embodiments, by calculating the virtual current (i.e. the voltage difference divided by the preset resistance value) and obtaining the instantaneous power command value, i.e. the product of the input voltage of the PCS and the virtual current, the phase difference between the output voltage of the PCS and the grid voltage can be dynamically detected. When the imaginary part of the instantaneous power command value is zero and the real part thereof is lower than the set power real part threshold, it indicates that the angle of the output voltage of the PCS has reached synchronization with the angle of the grid voltage, at which 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, through the PID algorithm, the phase of the output voltage of the PCS can be ensured to perfectly match the phase of the grid voltage, thereby reducing the possibility of current impact and ensuring that the system will not have obvious interruption or fluctuation when connected to the grid, achieving smooth mode switching, improving the overall reliability and stability, and reducing the cost of equipment maintenance. Smooth mode switching also helps to prolong the service life of the PCS and related components, reducing the frequency of equipment replacement, saving operating costs in the long run.

[0050] Specifically, according to determining the above-mentioned virtual current, wherein is the above-mentioned virtual current, is the above-mentioned voltage difference; according to determining the above-mentioned instantaneous power command value, wherein is the above-mentioned instantaneous power command value, wherein V gird is the grid voltage outputted from the AC side.

[0051] In some example 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 comprises: determining a first product as 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 a second product as 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 the real part of the instantaneous power command value as the difference between the first product and the second product.

[0052] In some example embodiments, by calculating a first product as 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 a second product as 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 then taking the difference between the two products, the real part of the instantaneous power is obtained. By decomposing the voltage signal into real and imaginary parts, the phase difference between the voltages can be more accurately evaluated, 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 output voltage of the PCS and the grid voltage. When the two phases are completely synchronized, the real part of the instantaneous power will theoretically approach zero. Therefore, by continuously monitoring the size of the real part of the instantaneous power, information about the phase synchronization state can be obtained in real time, providing real-time feedback signals for the PID controller to ensure accurate adjustment. In addition, the PID algorithm dynamically adjusts the control parameters according to the feedback of the real part of the instantaneous power to minimize this difference until the phase of the output voltage of the PCS is completely synchronized with the grid voltage. Compared with the method of adjusting by directly measuring the angle difference, the strategy of using virtual power calculation can more quickly and stably achieve angle synchronization, especially in the case of frequent grid voltage fluctuations or large changes in PCS output load, not only improving the efficiency of grid switching and power quality, but also simplifying the control logic.

[0053] Specifically, according to determining the first product, according to determining the second product, according to P= determining the real part of the instantaneous power command value, wherein P is the real part of the instantaneous power command value, representing the active power.

[0054] In some example embodiments of the present 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 comprises: determining a first difference value 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 value; determining a second difference value 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 value; 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, by determining the first difference value and the second difference value, the phase difference between the PCS output voltage and the grid voltage can be accurately captured. Not only can the out-of-sync situation of the phase be detected, but also the deviation can be quantified to provide accurate input information for subsequent PID control. By multiplying the real part of the PCS input voltage by the first difference value and multiplying the imaginary part of the PCS input voltage by the second difference value, not only the amplitude difference of the voltage is considered, but also the influence of the phase angle is fully considered, so that a more comprehensive and detailed virtual power command value is obtained for subsequent phase synchronization adjustment. Using the calculated imaginary part of the instantaneous power command value, the output voltage of the PCS is dynamically adjusted through the PID algorithm until the phase angle of the PCS output and the grid voltage is completely matched. Compared with directly adjusting through the measurement of the phase angle, the linear characteristics of the voltage signal are utilized, which can more quickly and accurately achieve phase synchronization, ensure that the phase of the PCS remains consistent with the grid voltage during grid connection, avoid the current shock that may be caused by the mismatch of the phase, improve the stability and reliability of the PCS grid connection process, reduce unnecessary power conversion loss, and ensure smooth energy exchange between the PCS and the grid.

[0056] Specifically, according to The first difference value is determined according to ( The third product is determined according to The second difference value is determined according to ( The fourth product is determined according to Q= ( + ( The sum value is determined, where Q is the sum value, representing the reactive power.

[0057] In some example embodiments of the present application, before synchronizing the output voltage of the PCS with the input voltage of the PCS using the PID algorithm, the method further comprises: determining whether a grid restoration event has occurred; and maintaining the off-grid operation of the PCS if it is determined that the grid restoration event has not occurred.

[0058] In the above embodiments, the synchronization process of the output voltage of the PCS with the grid voltage is only initiated when a grid restoration event is determined to have occurred, ensuring that the PCS does not attempt to grid-tie when the grid has not yet stabilized, avoiding potential power surges or equipment damage. Particularly after a grid failure, such as a sudden power outage or voltage fluctuation, time is needed to return to normal conditions. If grid-tied without judgment, it may cause the PCS to overload internally, or even cause a secondary impact on the grid. This judgment mechanism effectively enhances the safety of the entire system. After the grid is restored and confirmed to be stable, the voltage is synchronized through the PID algorithm, and the PCS can achieve a smooth transition from off-grid mode to grid-tied mode. Avoiding sudden grid-tie problems that may cause power quality to decline, such as voltage surges, current spikes, etc., ensures smooth power conversion and distribution, improves the user's power experience, and also ensures the stable operation of the equipment. If it is determined that the grid restoration event has not occurred, the PCS is maintained in off-grid operation, thereby being able to independently power the load when the grid is unavailable. This allows the PCS to more intelligently manage energy storage resources, such as battery energy, ensuring that the system can continue to supply power before the grid is restored, particularly in remote areas or unstable grid conditions, effectively improving energy utilization efficiency and system self-sufficiency, and reducing overall system energy consumption.

[0059] In an optional solution, after the output voltage of the PCS is synchronized with the input voltage of the PCS, the method further comprises: generating a clamping instruction and sending the clamping instruction to the PCS to control the PCS to stop outputting a PWM signal (pulse width modulation signal).

[0060] In the above embodiments, after the output voltage of the PCS is synchronized with the grid voltage, the execution of the blocking instruction can ensure the accurate maintenance of this synchronization state. By stopping the PWM signal output, the output voltage of the PCS will be directly controlled by the grid voltage, avoiding the slight deviation of phase or amplitude that may be caused by the PCS continuing to independently control the output voltage after grid connection. In the off-grid mode, the PCS controls the inverter output voltage through the PWM signal, while in the grid-connected mode, this control mechanism is no longer necessary. The blocking instruction stops the PWM signal output, avoiding unnecessary power conversion process, reducing the energy loss in the conversion process, and improving the overall efficiency of the power conversion system. During the process of the PCS switching from the off-grid mode to the grid-connected mode, if the output of the PWM signal is not stopped in time, the inverter may bear additional load due to double-ended voltage control, and even cause the risk of overload. The generation and sending of the blocking instruction ensure that the PCS can immediately stop independent control of the output voltage after grid connection, avoiding inverter overload and protecting the safety of the equipment. Sending the blocking instruction to the PCS controls it to stop outputting the PWM signal, so that the PCS will switch from the voltage source mode to the current source mode, with the grid voltage as the dominant, and the PCS only needs to control the output current, simplifying the control logic and improving the system response speed and control accuracy. The execution of the blocking instruction helps the PCS to adapt to the grid-connected environment more quickly, reduces the system oscillation or instability that may be caused by the control mode conversion. At the same time, it also avoids the energy conflict when the PCS is not synchronized with the grid voltage, enhancing the overall system stability.

[0061] In another alternative, before the output voltage of the PCS is synchronized with the input voltage of the PCS using the PID algorithm, the method comprises: acquiring the output voltage of the PCS and the input voltage of the PCS collected by the voltage acquisition circuit.

[0062] In the above embodiments, the real-time data acquisition function of the voltage acquisition circuit is used to obtain voltage data, which is used to calculate the amplitude and phase difference between the PCS output voltage and the grid voltage. The PID algorithm uses this difference information to gradually reduce the amplitude and phase difference by adjusting the control parameters of the inverter until they are completely synchronized, providing accurate information about the current PCS output voltage and grid voltage to the control system. By obtaining voltage data in advance, the grid connection command can be issued after ensuring voltage amplitude and phase synchronization, effectively preventing misoperation and current surges caused by voltage asynchronization. Accurate voltage acquisition and synchronization adjustment can significantly improve the stability and safety of PCS during off-grid to grid switching, providing a guarantee for the safe operation of smart grids and energy storage systems. Through the voltage information obtained by the voltage acquisition circuit, the PCS can more accurately adjust its output to match the grid conditions. Not only does this reduce the loss of PCS in the energy conversion process, but it also ensures that the PCS can operate at the highest efficiency, improving the overall efficiency of energy utilization. The acquisition of real-time voltage data speeds up the response of the control system. The PID algorithm can instantly receive and process voltage information, making control adjustments faster and shortening the transition time from off-grid to grid for the PCS, improving the system's adaptability to grid changes.

[0063] In some example embodiments, controlling the grid connection path of the PCS to be turned on includes controlling the grid relay to be attracted to turn on the grid connection path of the PCS.

[0064] In the above embodiments, when the grid relay is attracted, its contacts are closed, forming an electrical connection path between the PCS and the grid, which is a prerequisite for the PCS to transition from off-grid mode to grid operation, providing a physical channel for the inverter output power to be delivered to the grid. After the relay contacts are closed, the output current of the PCS can be directly connected to the grid, realizing the transmission of electrical energy from the energy storage system to the grid. In grid mode, the PCS can act as a power source to inject electrical energy from the energy storage device into the grid, or as a load to absorb electrical energy from the grid for charging. By controlling the attraction of the grid relay, the PCS can quickly respond to the grid connection command, significantly reducing the time required to switch from off-grid mode to grid mode. In the moment of off-grid to grid switching, if the control is not proper, unnecessary energy waste may occur, such as voltage surges causing current surges and additional losses. By precisely controlling the grid relay, the PCS can minimize energy loss during this process, and also reduce the complexity of control.

[0065] In other example embodiments, real-time detection of grid state is performed, including voltage fluctuations and frequency deviations of the grid. A neural network model is used to process the detected grid state to obtain an abnormal confidence. If the abnormal confidence is greater than or equal to a confidence threshold, the PCS is controlled to switch to off-grid operation.

[0066] In the above embodiments, by detecting the voltage fluctuation and frequency deviation of the power grid in real time, any changes in the power grid can be quickly captured, whether it is a slight disturbance or a serious fault, and information can be obtained in the first time. The monitoring range is not limited to voltage and frequency, but can be extended to other power grid parameters such as phase angle, power quality, etc., providing a basis for comprehensive evaluation of the health of the power grid. The pre-trained neural network model is used to process the detected power grid state data, which can identify complex power grid behavior patterns, including precursors of faults, abnormal trends, etc., and make accurate judgments even in slight or initial abnormal situations. The neural network model can output an abnormal detection probability score, i.e., an abnormal confidence, which provides a quantitative index for subsequent decision-making, enabling the PCS to respond based on data-driven principles. When the abnormal confidence reaches or exceeds a preset confidence threshold, the control PCS switches to an off-grid operation mode, ensuring that the PCS can avoid the impact of power grid faults and protect the PCS and related equipment from damage. By quickly responding to power grid abnormalities, the PCS can avoid the cascading reaction of power grid faults, reduce the impact of power grid fluctuations on the PCS, and maintain stable system operation.

[0067] In order to enable those skilled in the art to more clearly understand the technical solutions of the present application, the off-grid-to-grid control method of the present application will be described in detail below in conjunction with specific embodiments.

[0068] The off-grid-to-grid control method of the present embodiment, as shown in Figure 2 includes the following steps:

[0069] Step S1: Determine whether a power grid recovery event has occurred. If no power grid recovery event has occurred, continue off-grid operation. If a power grid recovery event has occurred, perform step S2;

[0070] Step S2: Determine whether a grid connection control instruction has been received. If no grid connection control instruction has been received, continue off-grid operation. If a grid connection control instruction has been received, perform step S3;

[0071] Step S3: Collect the PCS output voltage and the PCS input voltage through the voltage sampling circuit and determine the voltage difference;

[0072] Step S4: Reduce the voltage difference using a PID algorithm until the voltage difference is 0;

[0073] Step S5: After determining that the PCS output voltage and the PCS input voltage are synchronized, control the grid connection path of the PCS to be turned on;

[0074] Step S6: Generate a clamping instruction to control the PCS to stop outputting a PWM signal;

[0075] Step S7: Switch the loop parameters to grid-connected closed-loop control;

[0076] Specifically, in the off-grid mode, the PCS acts as a voltage source and adopts voltage-current double closed-loop control to maintain local voltage and frequency stability; in the grid-connected mode, it needs to be switched to current inner loop + power outer loop double closed-loop control, and the specific process is as follows: disable the voltage outer loop in the off-grid mode, stop the integral action of the voltage regulator to avoid oscillation caused by parameter mutation; enable the power outer loop in the grid-connected mode, and reconfigure the outer loop parameters.

[0077] Step S8: Send an open wave command to the PCS, the PCS resumes PWM signal output, enters grid-connected operation, and realizes off-grid to grid-connected switching.

[0078] The embodiment of the present application also provides a specific implementation scene of adopting a neural network model to process the above detection of power grid state. In the case that the energy storage converter is in grid-connected operation, the three-phase voltage on the grid side collected by the voltage collection circuit is obtained, and the real part and the imaginary part of the above grid voltage are obtained through transformation. The angle and frequency of the above grid voltage are determined by the phase-locked loop. Based on the real part and the imaginary part of the above grid voltage, as well as the multi-dimensional features such as voltage drop depth, frequency offset, frequency change rate and power fluctuation, the standardized feature sequence in the preset time window is input into the neural network model to obtain an abnormal confidence. The numerical range of the above abnormal confidence is from zero to one. In the case that the abnormal confidence is greater than or equal to a trigger threshold and lasts for a preset duration, it is determined that a power grid anomaly occurs, and a switching process is performed. First, the active power and reactive power reference values are lowered to zero, an open wave command is sent to the energy storage converter to stop outputting the pulse width modulation signal, the grid-connected relay is controlled to be disconnected within the current zero-crossing point or the relay safety action period, and the control loop is switched from the control structure of current inner loop plus power outer loop to the double closed-loop control of voltage loop and frequency loop. The pulse width modulation signal is re-outputted and the local voltage and frequency reference are established. The continuous power supply to the local load is maintained through soft start and current limiting. The abnormal features and abnormal confidence curves are recorded during the abnormal processing process for tracing and parameter optimization. In the case that the above abnormal confidence is less than or equal to a release threshold, and the grid voltage and grid frequency remain within the allowable range for a preset recovery time, the voltage difference value is determined, the virtual current is determined according to the voltage difference value and the preset impedance value, the instantaneous power instruction value is obtained from the product of the above grid voltage and the above virtual current, and the criterion that the imaginary part of the instantaneous power instruction value is zero and the real part is less than the power real part threshold is used to determine the synchronization angle and control the grid-connected relay to be attracted, thereby realizing re-grid connection. Therefore, when the voltage fluctuation, frequency impact or harmonic distortion occurs in the power grid, the discrimination and switching can be completed in milliseconds, accurate, fast and minimum impact adaptive off-grid switching is realized, the risk of false switching and missed switching is reduced, and the safe operation of the energy storage converter and the power grid equipment and the continuous power supply to the load are ensured.

[0079] The embodiments of the present application further provide a storage device. It should be noted that the storage device of the embodiments of the present application can be used to execute the control method for off-grid switching to grid provided by the embodiments of the present application. The device is used to realize the above embodiments and preferred embodiments, and the description has been made and will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the device described in the following embodiments is preferably realized in software, the realization of hardware, or a combination of software and hardware, is also possible and conceived.

[0080] The following describes the storage device provided by the embodiments of the present application.

[0081] Figure 3 is a schematic diagram of the storage device according to the embodiments of the present application. As shown in Figure 3 , the device includes:

[0082] The first processing unit 10 is configured to, in the case of receiving the grid connection control instruction, adjust the output voltage of the PCS and the input voltage of the PCS synchronously by using a PID algorithm, wherein in the process of synchronous adjustment, the difference between the output voltage of the PCS and the input voltage of the PCS and the angle of the voltage are adjusted.

[0083] Specifically, after receiving the instruction, the output voltage of the PCS is adjusted by using the PID algorithm to match the grid voltage. In this stage, the output voltage of the PCS is continuously monitored, and the difference (including the amplitude difference and the phase difference) between the output voltage of the PCS and the grid voltage is used as the input of the PID controller. The PID algorithm dynamically adjusts the output voltage through the calculation of the three parameters of proportion, integration and differentiation, until the difference is reduced to within the set safety threshold.

[0084] The second processing unit 20 is 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 operation.

[0085] Specifically, when the output voltage of the PCS and the grid voltage reach the synchronous state, that is, the voltage difference and the phase difference are within the allowable range, the grid connection switch is automatically controlled to be closed, so that the PCS is smoothly transitioned from the off-grid mode to the grid mode.

[0086] By the above embodiment, the PID algorithm is a closed-loop feedback control mechanism, which is based on error (the difference between the target value and the actual value), the accumulation of error and the error rate to control, so as to achieve the goal of reducing error. Through the first processing unit, the difference between the output voltage of the inverter and the grid voltage and the angle difference are taken as the input of the PID algorithm during the switching process. Through the second processing unit, the two voltages can be continuously fine-tuned to be closer and closer until they are completely synchronized in amplitude and phase. Through PID control, more precise adjustment can be achieved, reducing the situation of over-adjustment or under-adjustment, ensuring smooth switching process and avoiding current shock. When the output voltage of the inverter and the grid voltage are synchronized, that is, the difference and the angle difference are within the preset allowed range, the control system will send a signal to close the grid-connected path, complete the switching from off-grid to grid-connected. Ensure that the inverter output and the grid voltage are in the best matching state before the grid-connected path is closed, thereby avoiding large current shock at the switching moment, reducing the potential damage risk to the inverter and grid equipment, and solving the problem of how to accurately control the synchronization of the inverter output voltage and the grid voltage during the off-grid to grid-connected switching process to eliminate current shock and protect the PCS and grid equipment from damage.

[0087] In an alternative, the first processing unit comprises: a first processing module for determining the voltage difference according to the output voltage of the PCS and the input voltage of the PCS; a second processing module for reducing the voltage difference by using the PID algorithm until the voltage difference is 0; and a third processing module for synchronizing the angle of the output voltage of the PCS and the angle of the input voltage of the PCS by using the PID algorithm.

[0088] In the above embodiments, the PID algorithm can accurately adjust the output voltage of the PCS based on the difference between the real-time monitored PCS output voltage and grid voltage through dynamically calculated proportional, integral, and derivative components, until the two are consistent in amplitude. During this process, the PID controller continuously adjusts the output to compensate for the deviation, ensuring that zero voltage difference is ultimately achieved, thereby avoiding current surges caused by voltage differences during switching. In addition, in addition to the accurate adjustment of the amplitude, 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 output phase of the PCS in real time until it is consistent with the phase of the grid voltage. The PID algorithm can quickly adjust the control parameters in the face of rapid voltage changes or external disturbances, maintain the set synchronization state, and the integral term can eliminate the steady-state error in the system, ensuring high-precision synchronization over a long period of time. By avoiding current surges and ensuring smooth switching, the stress on the internal components of the PCS is significantly reduced, reducing equipment wear and tear due to frequent switching, thereby prolonging 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 end voltage of the PCS and the grid voltage are collected in real time by the voltage sensor, and then the difference between the two is calculated. This difference is the input of the PID controller, i.e., the deviation signal, which is used to evaluate the accuracy of the current voltage synchronization.

[0090] In another alternative, the first processing module includes: a first determination submodule for determining the real part difference as the difference between the real part of the output end voltage of the PCS and the real part of the input end voltage of the PCS, and determining the imaginary part difference as the imaginary value of the imaginary part of the output end voltage of the PCS and the real part of the input end voltage of the PCS; a second determination submodule for determining the imaginary part product as the product of the imaginary part difference and the imaginary unit; and a third determination submodule for determining the voltage difference as the sum of the real part difference and the imaginary part product.

[0091] In the above embodiment, by separating the real part and the imaginary part (i.e. the rectangular coordinate representation of the voltage), the real part difference and the imaginary part difference are calculated respectively, and then the imaginary part unit is multiplied to obtain the voltage difference, which is a complex number containing the amplitude and phase information. This method can more accurately reflect the deviation of voltage synchronization, especially suitable for the synchronization of alternating voltage, because the alternating voltage changes in time and space, involving not only the amplitude but also the phase information. After determining the complex number difference between the output end and the input end of the PCS, the deviation can be quickly and accurately compensated through the dynamic adjustment of the PID algorithm, and the control parameters can be adjusted in real time according to the size and trend of the difference. Before the output of the PCS is completely synchronized with the grid voltage, the control of the grid connection path remains disconnected. Once the voltage is accurately synchronized through the PID algorithm, i.e. the voltage difference is adjusted to zero, the grid connection switch is turned on to switch the PCS from off-grid mode to grid-connected mode, effectively avoiding the current impact caused by voltage mismatch during switching, reducing the potential damage to the internal components of the PCS and other grid equipment, and improving the safety and stability of the equipment.

[0092] Specifically, according to determining the real part difference, according to determining the imaginary part difference, according to ( determining the imaginary part product, according to =( + ( determining the voltage difference, wherein , wherein V inv is the input voltage on the DC side, v inv_α is the component of the voltage on the α axis, i.e. the real part, v inv_β is the component of the voltage on the β axis, i.e. the imaginary part, and j is the imaginary unit, , wherein V gird is the grid voltage output on the AC side, v grid_α is the component of the grid voltage on the α axis, i.e. the real part, v grid_β is the component of the grid voltage on the β axis, i.e. the imaginary part.

[0093] In some exemplary embodiments, the third processing module includes: a fourth determination sub-module for determining the virtual current as the ratio of the voltage difference to a preset resistance value; a fifth determination sub-module for determining the instantaneous power instruction value as the product of the input voltage of the PCS and the virtual current; and a sixth determination sub-module for determining the angle output by the PID algorithm at the current time as the synchronization angle when the imaginary part of the instantaneous power instruction value is 0 and the real part of the instantaneous power instruction value is less than the power real part threshold.

[0094] In the above embodiment, by calculating the virtual current (i.e. the voltage difference divided by the preset resistance value) and obtaining the instantaneous power instruction value, i.e. the product of the voltage at the input end of the PCS and the virtual current, the phase difference between the output voltage of the PCS and the grid voltage can be dynamically detected. When the imaginary part of the instantaneous power instruction value is zero and the real part is lower than the set power real part threshold, it indicates that the angle of the output voltage of the PCS has reached synchronization with the angle of the grid voltage, and at this time the output angle of the PID algorithm is the synchronization angle, which ensures that before the PCS is connected to the grid, the output voltage and the grid voltage are consistent in phase. In addition, through the PID algorithm, the phase of the output voltage of the PCS can be ensured to perfectly match the phase of the grid voltage, thereby reducing the possibility of current impact and ensuring that the system will not have obvious interruption or fluctuation when connected to the grid, achieving smooth mode switching, improving the overall reliability and stability, and reducing the cost of equipment maintenance. Smooth mode switching also helps to prolong the service life of the PCS and related components, reducing the frequency of equipment replacement and saving operating costs in the long run.

[0095] Specifically, according to determining the virtual current, wherein is the virtual current, is the voltage difference; according to determining the instantaneous power instruction value, wherein is the instantaneous power instruction value, wherein V gird is the grid voltage output on the AC side.

[0096] In some other exemplary embodiments, the fifth determining sub-module includes: a sixth determining sub-module, configured to determine a first product as 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 determine a second product as 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 sub-module, configured to determine the real part of the instantaneous power instruction value as the difference between the first product and the second product.

[0097] In the above embodiments, by calculating a first product, i.e. 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 a second product, i.e. 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 then obtaining the difference between the two, the real part of the instantaneous power is actually obtained. By decomposing the voltage signals into real and imaginary parts, the phase difference between the voltages can be more accurately evaluated, 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 output voltage of the PCS and the grid voltage. When the two phases are completely synchronized, the real part of the instantaneous power will theoretically approach zero. Therefore, by continuously monitoring the size of the real part of the instantaneous power, information about the phase synchronization state can be obtained in real time, providing real-time feedback signals for the PID controller to ensure accurate adjustment. In addition, the PID algorithm dynamically adjusts the control parameters according to the feedback of the real part of the instantaneous power to minimize this difference until the phase of the PCS output voltage is completely synchronized with the grid voltage. Compared with the method of adjusting by directly measuring the angle difference, the strategy of using virtual power calculation can more quickly and stably achieve angle synchronization, especially in the case of frequent grid voltage fluctuations or large PCS output load changes, not only improving the efficiency of grid switching and power quality, but also simplifying the control logic.

[0098] Specifically, according to determining the first product, according to determining the second product, according to P= determining the real part of the instantaneous power command value, wherein P is the real part of the instantaneous power command value, representing active power.

[0099] In some exemplary embodiments of the present application, the fifth determining sub-module further includes: an eighth determining sub-module for determining a first difference value 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 value; a ninth determining sub-module for determining a second difference value 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 value; and a tenth determining sub-module for determining the imaginary part of the instantaneous power command value as the sum of the third product and the fourth product.

[0100] In the above embodiments, when calculating the imaginary part of the instantaneous power instruction value, the phase difference between the PCS output voltage and the grid voltage can be accurately captured by determining the first difference value and the second difference value. Not only can the out-of-sync situation of the phase be detected, but the deviation can also be quantified to provide accurate input information for subsequent PID control. By multiplying the real part of the PCS input voltage by the first difference value and multiplying the imaginary part of the PCS input voltage by the second difference value, not only the amplitude difference of the voltage is considered, but also the influence of the phase angle is fully considered, so that a more comprehensive and detailed virtual power instruction value is obtained for subsequent phase synchronization adjustment. Using the imaginary part of the calculated instantaneous power instruction value, the output voltage of the PCS is dynamically adjusted through the PID algorithm until the phase angle of the PCS output and the grid voltage is completely matched. Compared with directly adjusting through the measurement of the phase angle, the linear characteristics of the voltage signal are utilized to more quickly and accurately achieve phase synchronization, ensure that the phase of the PCS remains consistent with the grid voltage during grid connection, avoid the current shock that may be generated due to the mismatch of the phase, improve the stability and reliability of the PCS grid connection process, reduce unnecessary power conversion loss, and ensure smooth energy exchange between the PCS and the grid.

[0101] Specifically, according to determining the first difference value, according to ( determining the third product, according to determining the second difference value, according to ( determining the fourth product, according to Q= ( + ( determining the sum value, wherein Q is the sum value, representing the reactive power.

[0102] In some example embodiments of the present application, the device further comprises: a first determination unit configured to determine whether a grid restoration event has occurred; and a second determination unit configured to maintain the off-grid operation of the PCS in a case where it is determined that the grid restoration event has occurred and in a case where it is determined that the grid restoration event has not occurred.

[0103] In the above embodiments, the synchronization adjustment process of the output voltage of the PCS and the grid voltage is started only when it is determined that a grid restoration event has occurred, ensuring that the PCS does not attempt to grid-tie when the grid has not yet stabilized, avoiding potential power surges or equipment damage. Especially after a grid failure, such as a sudden power outage or voltage fluctuation, time is needed to return to normal. If not judged directly grid-tied, it may cause the PCS internal overload, and even cause secondary impact on the grid. This judgment mechanism effectively enhances the safety of the entire system. After the grid is restored and confirmed to be stable, the voltage synchronization adjustment is carried out through the PID algorithm, and the PCS can realize the smooth transition from off-grid mode to grid-connected mode. Avoid sudden grid-tied problems that may cause power quality to decline, such as voltage mutation, current peak, etc., ensuring smooth power conversion and distribution, improving the user's power experience, and also ensuring the stable operation of the equipment. In the case where it is determined that no grid restoration event has occurred, the PCS is maintained in off-grid operation, so that it can independently power the load when the grid is unavailable. The PCS can more intelligently manage energy storage resources, such as battery energy, in off-grid mode, ensuring that the system can continue to supply power before the grid is restored, especially in remote areas or unstable grid conditions, effectively improving energy utilization efficiency and system self-sufficiency, and also reducing the overall energy consumption of the system.

[0104] In an optional solution, the device further comprises a generation unit that generates a clamping instruction and sends the clamping instruction to the PCS to control the PCS to stop outputting the PWM signal.

[0105] In the above embodiments, after the output voltage of the PCS is synchronized with the grid voltage, the execution of the blocking instruction can ensure the accurate maintenance of this synchronization state. By stopping the output of the PWM signal, the output voltage of the PCS will be directly controlled by the grid voltage, avoiding the slight deviation of the phase or amplitude that may be caused by the PCS continuing to independently control the output voltage after grid connection. In the off-grid mode, the PCS controls the output voltage of the inverter through the PWM signal, while in the grid-connected mode, this control mechanism is no longer necessary. The blocking instruction stops the output of the PWM signal, avoiding unnecessary power conversion process, reducing the energy loss in the conversion process, and improving the overall efficiency of the power conversion system. During the process of the PCS switching from the off-grid mode to the grid-connected mode, if the output of the PWM signal is not stopped in time, the inverter may bear additional load due to the double-ended voltage control, and even cause the risk of overload. The generation and sending of the blocking instruction ensure that the PCS can immediately stop independently controlling the output voltage after grid connection, avoiding the overload of the inverter and protecting the safety of the equipment. Sending the blocking instruction to the PCS controls it to stop outputting the PWM signal, so that the PCS will switch from the voltage source mode to the current source mode, with the grid voltage as the dominant, and the PCS only needs to control the output current, simplifying the control logic, improving the system response speed and control accuracy. The execution of the blocking instruction helps the PCS to adapt to the grid-connected environment more quickly, reduces the system oscillation or instability that may be caused by the control mode conversion. At the same time, it also avoids the energy conflict when the PCS is not synchronized with the grid voltage, enhancing the overall system stability.

[0106] In another alternative, the device further comprises an acquisition unit configured to acquire the output voltage of the PCS and the input voltage of the PCS collected by the voltage acquisition circuit.

[0107] In the above embodiments, the real-time data acquisition function of the voltage acquisition circuit is used to calculate the amplitude and phase difference between the PCS output voltage and the grid voltage. The PID algorithm uses this difference information to gradually reduce the amplitude and phase difference by adjusting the control parameters of the inverter until they are completely synchronized, providing accurate information about the current PCS output voltage and grid voltage to the control system. By obtaining voltage data in advance, the grid-connected command can be issued after ensuring voltage amplitude and phase synchronization, effectively preventing false operations and current surges caused by voltage asynchronization. Accurate voltage acquisition and synchronization adjustment can significantly improve the stability and safety of PCS during off-grid to grid switching, providing a guarantee for the safe operation of smart grids and energy storage systems. With the voltage information obtained by the voltage acquisition circuit, the PCS can more accurately adjust its output to match the grid conditions. Not only does this reduce the loss of PCS in the energy conversion process, but it also ensures that the PCS can operate at the highest efficiency, improving the overall energy utilization efficiency. The acquisition of real-time voltage data speeds up the response speed of the control system. The PID algorithm can instantly receive and process voltage information, making control adjustments faster and shortening the transition time from off-grid to grid for the PCS, improving the system's adaptability to grid changes.

[0108] In some example embodiments, the second processing unit includes a control module for controlling the grid relay to be attracted to turn on the grid access path of the PCS.

[0109] In the above embodiments, when the grid relay is attracted, its contacts are closed, forming an electrical connection path between the PCS and the grid, which is a prerequisite for the PCS to transition from off-grid mode to grid operation, providing a physical channel for the inverter output power to be transmitted to the grid. After the relay contacts are closed, the output current of the PCS can be directly connected to the grid, realizing the transmission of electrical energy from the energy storage system to the grid. In grid mode, the PCS can act as a power source to inject electrical energy from the energy storage device into the grid, or as a load to absorb electrical energy from the grid for charging. By controlling the attraction of the grid relay, the PCS can quickly respond to the grid-connected command, significantly shortening the time required to switch from off-grid mode to grid mode. In the moment of off-grid to grid switching, if the control is not proper, unnecessary energy waste may occur, such as voltage surges that can cause current surges and additional losses. By precisely controlling the grid relay, the PCS can minimize energy loss during this process, and also reduce the control complexity.

[0110] In some example embodiments, the device further comprises a detection unit configured to detect, in real time, a grid state, wherein the grid state comprises voltage fluctuation and frequency deviation of the grid; and a third processing unit configured to process the detected grid state using a neural network model to obtain an anomaly confidence; and a control unit configured to control the PCS to switch to off-grid operation when the anomaly confidence is greater than or equal to a confidence threshold.

[0111] In some example embodiments, by detecting, in real time, the voltage fluctuation and frequency deviation of the grid, any changes in the grid, whether slight disturbances or severe faults, can be quickly captured, and information can be obtained in the first time. The monitoring range is not limited to voltage and frequency, but can be extended to other grid parameters, such as phase angle, power quality, etc., to provide a basis for comprehensive evaluation of the health of the grid. The pre-trained neural network model is used to process the detected grid state data, which can identify complex grid behavior patterns, including precursors of faults, abnormal trends, etc., and make accurate judgments even in slight or initial abnormal situations. The neural network model can output a probability score of anomaly detection, i.e., an anomaly confidence, which provides a quantitative index for subsequent decision-making, so that the PCS can respond based on the principle of data-driven. When the anomaly confidence reaches or exceeds the preset confidence threshold, the control unit controls the PCS to switch to off-grid operation mode, ensuring that the PCS can avoid the impact of grid faults and protecting the PCS and related equipment from damage. By quickly responding to grid anomalies, the PCS can avoid the chain reaction of grid faults and reduce the impact of grid fluctuations on the PCS, maintaining stable system operation.

[0112] The energy storage device includes a processor and a memory, and the first processing unit and the second processing unit are stored in the memory as program units. The processor executes the program units stored in the memory to realize the corresponding functions. The modules are located in the same processor; or, the modules are located in different processors in any combination.

[0113] The processor includes a core, which retrieves the corresponding program unit from the memory. The core can be set to one or more, and by adjusting the core parameters, at least the problem of how to accurately control the synchronization of the inverter output voltage and the grid voltage during off-grid to on-grid switching to eliminate current impact and protect the PCS and grid equipment from damage can be solved.

[0114] The memory can include non-persistent memory in a computer readable medium, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.

[0115] The application also provides a power storage system, comprising: a PCS and a controller, which communicate with each other, and the power storage system implements at least the following steps:

[0116] In step S101, the output voltage of the PCS is adjusted by using a PID algorithm to synchronize with the input voltage of the PCS in the case of receiving a grid-connected control instruction, wherein the difference between the output voltage of the PCS and the input voltage of the PCS and the angle of the voltage are adjusted during the synchronization adjustment.

[0117] Specifically, after receiving the instruction, the output voltage of the PCS is adjusted by using a PID algorithm to match the grid voltage. In this stage, the output voltage of the PCS is continuously monitored, and the difference (including the amplitude difference and the phase difference) between the output voltage of the PCS and the grid voltage is taken as the input of the PID controller. The PID algorithm dynamically adjusts the output voltage through the calculation of the three parameters of proportion, integration and differentiation, until the difference is reduced to within the set safety threshold.

[0118] In step S102, after the output voltage of the PCS is synchronized with the input voltage of the PCS, the grid-connected 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, the voltage difference and the phase difference are within the allowable range, the grid-connected switch is automatically controlled to be closed, so that the PCS is smoothly transitioned from the off-grid mode to the grid-connected mode.

[0120] In an embodiment of the application, the output voltage of the PCS is adjusted by using a PID algorithm to synchronize with the input voltage of the PCS, comprising: determining the voltage difference according to the output voltage of the PCS and the input voltage of the PCS; reducing the voltage difference by using a PID algorithm until the voltage difference is 0; and synchronizing the angle of the output voltage of the PCS and the angle of the input voltage of the PCS by using a PID algorithm.

[0121] In an embodiment of the application, the voltage difference is determined according to the output voltage of the PCS and the input voltage of the PCS, comprising: determining the real part 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 the imaginary part difference as the imaginary part of the output voltage of the PCS and the real 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 an embodiment of the present 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 a virtual current as a ratio of the voltage difference and a preset resistance value; determining an instantaneous power command value as a product of the input voltage of the PCS and the virtual current; in a case where the imaginary part of the instantaneous power command value is 0 and the real part of the instantaneous power command value is less than a power real part threshold, determining an angle output by the PID algorithm at the current time as a synchronization angle.

[0123] In an embodiment of the present 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 product as a 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 a second product as a product of the imaginary part of the input voltage of the PCS and the real part of the output voltage of the PCS; determining the real part of the instantaneous power command value as a difference between the first product and the second product.

[0124] In an embodiment of the present 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 a 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 a product of the real part of the input voltage of the PCS and the first difference; determining a second difference as a 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 a product of the imaginary part of the input voltage of the PCS and the second difference; determining the imaginary part of the instantaneous power command value as a sum of the third product and the fourth product.

[0125] In an embodiment of the present application, before the output voltage of the PCS and the input voltage of the PCS are synchronously adjusted by the PID algorithm, the method further includes: determining whether a grid restoration event has occurred; in a case where it is determined that the grid restoration event has occurred, keeping the PCS off-grid; in a case where it is determined that the grid restoration event has not occurred.

[0126] In an embodiment of the present application, after the output voltage of the PCS and the input voltage of the PCS are synchronized, the method further includes: generating a clamping command, and sending the clamping command to the PCS to control the PCS to stop outputting a PWM signal.

[0127] In an embodiment of the present application, before synchronously adjusting the output voltage of the PCS and the input voltage of the PCS by using the PID algorithm, the method comprises: acquiring the output voltage of the PCS and the input voltage of the PCS collected by the voltage acquisition circuit.

[0128] In an embodiment of the present application, the method of controlling the on-off of the grid-connected path of the PCS comprises: controlling the on-off of the grid-connected relay to control the on-off of the grid-connected path of the PCS.

[0129] In an embodiment of the present application, the method comprises: detecting the grid state in real time, wherein the grid state comprises voltage fluctuation and frequency deviation of the grid; processing the detected grid state by using a neural network model to obtain an abnormal confidence; and controlling the PCS to switch to off-grid operation when the abnormal confidence is greater than or equal to a confidence threshold.

[0130] Those skilled in the art can understand that the above embodiments are specific embodiments for implementing the present application, and in actual application, various changes can be made in form and details without departing from the spirit and scope of the present application. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application, and therefore the protection scope of the present application should be subject to the scope defined by the claims.

Claims

1. A control method for off-grid and grid-connected, characterized in that, The method comprises the following steps: In the case of receiving grid-connected control instructions, the output voltage of the PCS and the input voltage of the PCS are synchronously adjusted by using a PID algorithm, wherein, in the process of synchronous adjustment, the difference between the output voltage of the PCS and the input voltage of the PCS and the angles of the voltages are adjusted; After the output voltage of the PCS and the input voltage of the PCS are synchronized, the grid-connected path of the PCS is turned on to switch the PCS from off-grid operation to grid-connected operation.

2. The control method of off-grid and grid-connected according to claim 1, characterized in that, The method for synchronously adjusting the output voltage of the PCS and the input voltage of the PCS by using a PID algorithm comprises the following steps: According to the output voltage of the PCS and the input voltage of the PCS, a voltage difference value is determined; The voltage difference value is reduced by using a PID algorithm until the voltage difference value is 0; The angles of the output voltage of the PCS and the input voltage of the PCS are synchronized by using a PID algorithm.

3. The control method of off-grid and grid-connected according to claim 2, characterized in that, The method for determining the voltage difference value according to the output voltage of the PCS and the input voltage of the PCS comprises the following steps: A real part difference value is determined 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 an imaginary part difference value is determined as the imaginary value of the imaginary part of the output voltage of the PCS and the real part of the input voltage of the PCS; An imaginary part product is determined as the product of the imaginary part difference value and an imaginary part unit; The voltage difference value is determined as the sum of the real part difference value and the imaginary part product.

4. The control method of off-grid and grid-connected according to claim 2, characterized in that, The method for synchronously adjusting the angles of the output voltage of the PCS and the input voltage of the PCS by using a PID algorithm comprises the following steps: A virtual current is determined as the ratio of the voltage difference value to a preset resistance value; An instantaneous power instruction value is determined as the product of the input voltage of the PCS and the virtual current; In the case that the imaginary part of the instantaneous power instruction value is 0 and the real part of the instantaneous power instruction value is less than a power real part threshold value, the angle output by the PID algorithm at the current time is determined as a synchronization angle.

5. The control method of off-grid and grid-connected according to claim 4, characterized in that, In the process of determining the instantaneous power instruction value as the product of the input voltage of the PCS and the virtual current, the method further comprises the following steps: A first product is determined as 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 a second product is determined as 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 instruction value is determined as the difference between the first product and the second product.

6. The control method of off-grid and grid-connected according to claim 4, characterized in that, In the process of determining the instantaneous power instruction value as the product of the input voltage of the PCS and the virtual current, the method further comprises the following steps: A first difference value is determined 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 a third product is determined as the product of the real part of the input voltage of the PCS and the first difference value; A second difference value is determined 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 a fourth product is determined as the product of the imaginary part of the input voltage of the PCS and the second difference value; determining a real part of the instantaneous power instruction value as a sum of the third product and the fourth product.

7. The control method of off-grid and grid-connected according to claim 1, characterized in that, Before synchronously adjusting the output voltage of the PCS and the input voltage of the PCS by using a PID algorithm, the method further comprises: determining whether a power grid recovery event has occurred; in a case where it is determined that the power grid recovery event has occurred, in a case where it is determined that the power grid recovery event has not occurred, keeping the PCS off-grid running.

8. The control method of off-grid and grid-connected according to claim 1, characterized in that, After the output voltage of the PCS and the input voltage of the PCS are synchronized, the method further comprises: generating a clamping instruction and sending the clamping instruction to the PCS to control the PCS to stop outputting a PWM signal.

9. The control method of off-grid and grid-connected according to claim 1, characterized in that, Before synchronously adjusting the output voltage of the PCS and the input voltage of the PCS by using a PID algorithm, the method comprises: acquiring the output voltage of the PCS and the input voltage of the PCS collected by a voltage acquisition circuit.

10. The control method of off-grid and grid-connected according to claim 1, characterized in that, controlling the grid-connected path of the PCS to be turned on, comprising: controlling a grid-connected relay to be attracted to turn on the grid-connected path of the PCS.

11. The control method of off-grid and grid-connected according to any one of claims 1 to 10, characterized in that, comprising: real-time detecting a power grid state, the power grid state comprising voltage fluctuation and frequency deviation of the power grid; processing the detected power grid state by using a neural network model to obtain an abnormal confidence; in a case where the abnormal confidence is greater than or equal to a confidence threshold, controlling the PCS to switch to off-grid running.

12. An energy storage device, characterized by comprising: a first processing unit configured to, in a case where a grid-connected control instruction is received, synchronously adjust the output voltage of the PCS and the input voltage of the PCS by using a PID algorithm, wherein, in the process of synchronous adjustment, a difference between the output voltage of the PCS and the input voltage of the PCS and an angle of the voltage are adjusted; 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-connected path of the PCS to be turned on, so as to switch the PCS from off-grid running to grid-connected running.

13. The energy storage device of claim 12, wherein, The first processing unit comprises: a first processing module configured to determine a voltage difference value according to the output voltage of the PCS and the input voltage of the PCS; a second processing module configured to reduce the voltage difference value by using a PID algorithm until the voltage difference value is 0; 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 by using a PID algorithm.

14. The energy storage device of claim 13, wherein, The first processing module comprises: a first determining submodule configured to determine a real part difference value as a difference between a real part of the output voltage of the PCS and a real part of the input voltage of the PCS, and determine a virtual part difference value as a virtual value of the real part of the output voltage of the PCS and the real part of the input voltage of the PCS; a second determining submodule configured to determine a virtual part product as a product of the virtual part difference value and a virtual part unit; a third determining submodule configured to determine the voltage difference value as a sum of the real part difference value and the virtual part product.

15. An energy storage system characterized by, comprising: a PCS and a controller, the PCS and the controller being in communication, and the controller being configured to perform the method of any one of claims 1 to 11.

Citation Information

Patent Citations

  • Energy storage inverter grid-connected and off-grid switching method and system, electronic equipment and storage medium

    CN116865346A

  • Power conversion system, converter and off-grid and grid-connected switching control method thereof

    CN116937689A

  • Pre-synchronization control method and device for off-grid and grid-connected switching of network-forming type energy storage converter and medium

    CN118100293A

  • VSG control method and device of DSP numerical control high-frequency bidirectional PCS converter

    CN120280950A

  • Self-adaptive virtual impedance control method in fault state of grid-connected inverter

    CN120357569A