Off-grid and grid-connected inverter, off-grid and grid-connected inverter system, charging and discharging control method, medium and equipment

By acquiring the state of charge of the high-voltage battery and the battery management system signal, and controlling the duty cycle of the switching transistor, mode switching is achieved, which solves the problem of difficult current control during high-voltage battery charging and ensures system stability and battery safety.

CN121965686APending Publication Date: 2026-05-01SRNE SOLAR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SRNE SOLAR CO LTD
Filing Date
2025-12-17
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing grid-connected and off-grid inverters, it is difficult to control the average inductor current during high-voltage battery charging, which can easily lead to system instability and overcharging of the high-voltage battery, damaging the battery.

Method used

By acquiring the state of charge (SOC) value of the high-voltage battery and the indication signal from the battery management system, the duty cycle of the drive signal of the switching transistor is controlled to switch between BuckBoost mode and Boost mode, directly shutting off the charging path and preventing overcharging of the high-voltage battery.

Benefits of technology

It effectively avoids the risk of overcharging high-voltage batteries, ensures stable system power supply, reduces the possibility of battery damage, and does not rely on the target value limit of the average inductor current.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121965686A_ABST
    Figure CN121965686A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of inverters, in particular to an off-grid and grid-connected inverter, a system thereof, a charging and discharging control method, a medium and equipment. The method comprises the following steps: determining a required working mode according to a setting state of a battery charging stop mark; if the required working mode is a Buck Boost mode, controlling to enter the Buck Boost mode, configuring the driving signal duty ratios of the first switch tube and the second switch tube to be complementary, configuring the driving signal duty ratios of the third switch tube and the fourth switch tube to be complementary, and controlling the first switch tube, the second switch tube, the third switch tube and the fourth switch tube to be normally conducted; and if the required working mode is a Boost mode, controlling to enter the Boost mode, configuring the driving signal duty ratios of the first switch tube and the second switch tube to be complementary, configuring the driving signal duty ratios of the third switch tube and the fourth switch tube to be complementary, controlling the second switch tube and the third switch tube to be normally conducted and work, and simultaneously turning off the first switch tube and the fourth switch tube. The high-voltage battery can be prevented from being overcharged, and stable power supply of the system is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of inverter technology, and in particular to an off-grid and on-grid inverter and its system, charging and discharging control method, medium, and equipment. Background Technology

[0002] In off-grid / parallel inverter systems using high-voltage batteries, there are typically five ports: photovoltaic, battery, grid, generator, and load. The battery port often employs a BuckBoost topology and utilizes a dual closed-loop control system—an outer loop of bus voltage / battery voltage and an inner loop of inductor current—to control the charging and discharging of the high-voltage battery. If the average inductor current is defined as negative during battery charging and positive during discharging, then when the off-grid / parallel inverter is charging the high-voltage battery, if charging stops, the average inductor current must be controlled to be greater than or equal to zero, i.e., discharging or no charging / discharging.

[0003] During control, the average inductor current is susceptible to interference from factors such as zero-bias reference offset, MCU sampling method, and sampling circuit filtering, leading to errors between the detected average inductor current and the actual battery current. When the average inductor current is zero, trickle charging occurs, which can cause battery overvoltage. To avoid this problem, the target value for the average inductor current is often set to a positive value. However, an excessively small positive value will cause trickle charging, damaging the battery; an excessively large positive value will disrupt the operation of other input ports, leading to system instability. On the other hand, the voltage input range of high-voltage batteries is wide, ranging from 150 to 850V, and there are differences between different on-grid and off-grid inverters, making it difficult to determine the control value for the average inductor current. Summary of the Invention

[0004] This invention provides an off-grid inverter and its system, a charging and discharging control method, a medium, and equipment to solve the problem that existing off-grid inverters have difficulty in obtaining the target value of the average inductor current, which easily leads to unstable power supply and damage to the high-voltage battery.

[0005] This invention discloses a charging and discharging control method for an off-grid / parallel inverter. The off-grid / parallel inverter includes a first switch, a second switch, a third switch, a fourth switch, a first capacitor, and a second capacitor. The first switch and the second switch are connected in series between the positive terminal of the bus and ground, and their series connection point is connected to the positive terminal of an external high-voltage battery through a first inductor. The third switch and the fourth switch are connected in series between the negative terminal of the bus and ground, and their series connection point is connected to the negative terminal of the external high-voltage battery through a second inductor. The charging and discharging control method includes the following steps: Acquire the state of charge (SOC) value of the high-voltage battery, as well as the indication signals from the battery management system; Based on the state of charge value or the indication signal, continuously execute the setting or clearing control of the battery stop charging flag; The required operating mode is determined based on the setting status of the battery stop charging flag. If the required working mode is BuckBoost mode, then control to enter BuckBoost mode, configure the duty cycle of the drive signals of the first switch and the second switch to be complementary, configure the duty cycle of the drive signals of the third switch and the fourth switch to be complementary, and control the first switch, the second switch, the third switch and the fourth switch to be normally turned on. If the required operating mode is Boost mode, then the system enters Boost mode, configures the duty cycles of the drive signals of the first and second switches to be complementary, configures the duty cycles of the drive signals of the third and fourth switches to be complementary, and controls the second and third switches to be normally turned on, while turning off the first and fourth switches.

[0006] Optionally, the charge / discharge control method further includes the following steps: When the control enters BuckBoost mode, it acquires the first output value of the bus control loop and the second output value of the battery voltage control loop. If the first output value is less than zero, then the minimum value between the absolute values ​​of the first output value and the second output value is used as the charging reference value; The duty cycle of the first target drive signal is calculated based on the charging reference value, and the second and third switches are configured using the duty cycle of the first target drive signal.

[0007] Optionally, the charge / discharge control method further includes the following steps: Before switching from Boost mode to BuckBoost mode, the duty cycle of the second target drive signal of the second switch and the third switch in BuckBoost mode is calculated and obtained in real time. Within one cycle after switching from Boost mode to BuckBoost mode, the duty cycle of the drive signals of the second switch and the third switch is configured to the duty cycle of the second target drive signal, and the duty cycles of the drive signals of the first switch and the second switch are configured to be complementary, and the duty cycles of the drive signals of the third switch and the fourth switch are configured to be complementary.

[0008] Optionally, the duty cycle of the first target drive signal can be calculated using the following formula:

[0009] in, The duty cycle of the second target drive signal; This is the feedback value of the bus control loop; Feedback value for the battery voltage control loop .

[0010] Optionally, determining the required operating mode based on the set state of the battery stop charging flag includes the following steps: If the battery stop charging flag is set, the required operating mode is Boost mode; If the battery stop charging flag is cleared, the required operating mode is BuckBoost mode.

[0011] Optionally, the step of continuously setting or clearing the battery stop charging flag based on the state of charge value or the indication signal includes the following steps: The current state of charge (SOC) value of the high-voltage battery is continuously compared with the preset SOC threshold. If the current SOC value is greater than the preset SOC threshold, the battery stop charging flag is set. Alternatively, continuously analyze the indication signals of the current battery management system, and if the indication signals include a stop charging command, execute the setting control of the battery stop charging flag.

[0012] This invention also discloses an off-grid inverter, comprising a main control chip, a first switching transistor, a second switching transistor, a third switching transistor, and a fourth switching transistor, a first capacitor, and a second capacitor; the first switching transistor and the second switching transistor are connected in series between the positive terminal of the bus and ground; the third switching transistor and the fourth switching transistor are connected in series between the negative terminal of the bus and ground; one end of the first inductor is connected to the series node of the first switching transistor and the second switching transistor, and the other end is connected to the positive terminal of an external high-voltage battery; one end of the second inductor is connected to the series node of the third switching transistor and the fourth switching transistor, and the other end is connected to the negative terminal of the external high-voltage battery; the main control chip is connected to the gates of the first switching transistor, the second switching transistor, the third switching transistor, and the fourth switching transistor, and the main control chip performs control and configures the first switching transistor, the second switching transistor, the third switching transistor, and the fourth switching transistor using the steps of the method described in any of the above embodiments.

[0013] The present invention also discloses an off-grid inverter system, including a high-voltage battery and an off-grid inverter as described above, wherein the positive terminal of the high-voltage battery is connected to the other end of the first inductor and its negative terminal is connected to the other end of the second inductor.

[0014] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described in any of the preceding claims.

[0015] The present invention also discloses a power supply device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method as described in any of the preceding claims.

[0016] The beneficial effects of the charging and discharging control method for off-grid and grid-connected inverters provided in this invention are as follows: This invention obtains the state of charge value of the high-voltage battery and the indication signal of the battery management system, performs setting or clearing control of the battery stop charging flag, and then determines the required operating mode based on the setting state of the battery stop charging flag. In the Boost mode where it is necessary to stop charging the high-voltage battery, the first and fourth switching transistors that charge the high-voltage battery are directly turned off, cutting off the energy path for charging. The energy of the bus cannot enter the high-voltage battery, avoiding overcharging of the high-voltage battery and reducing the risk of damage to the high-voltage battery. In this application, stopping charging does not need to be limited by the target value of the average inductor current, and a suitable target value can be set to ensure the stability of the system power supply. Attached Figure Description

[0017] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a schematic flowchart of the charging and discharging control method for off-grid and grid-connected inverters provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the mode switching process provided in an embodiment of the present invention; Figure 3 This is a simplified topology diagram of the off-grid and parallel inverter system provided in the embodiments of the present invention; Figure 4 This is a logic diagram for assigning the duty cycle of the drive signals of each switch transistor provided in an embodiment of the present invention; Figure 5 This is a structural block diagram of the power supply device provided in an embodiment of the present invention; Figure 6 This is a structural block diagram of a computer-readable storage medium provided in an embodiment of the present invention.

[0018] The labels for the attached figures are as follows: 100. Off-grid / parallel inverter system; Battery 1. High-voltage battery; Q1. First switching transistor; Q. Second switching transistor; Q3. Third switching transistor; Q4. Fourth switching transistor; C1. First capacitor; C2. Second capacitor; L1. First inductor; L2. Second inductor; 200. Power supply equipment; 201. Processor; 202. Memory; 300. Computer-readable storage medium; 301. Computer program. Detailed Implementation

[0019] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0020] This invention provides a charging and discharging control method for off-grid and grid-connected inverters, such as... Figure 3 As shown, the grid-connected inverter includes a first switch Q1, a second switch Q, a third switch Q3, a fourth switch Q4, a first capacitor C1, and a second capacitor C2. The first switch Q1 and the second switch Q are connected in series between the positive terminal of the bus and ground, and their series connection point is connected to the positive terminal of the external high-voltage battery Battery1 through a first inductor L1. The third switch Q3 and the fourth switch Q4 are connected in series between the negative terminal of the bus and ground, and their series connection point is connected to the negative terminal of the external high-voltage battery Battery1 through a second inductor L2. Figure 1 and Figure 3 As shown, the charging and discharging control method for off-grid and grid-connected inverters includes the following steps: S110. Obtain the state of charge value of the high-voltage battery Battery1 and the indication signal of the battery management system; S120: Based on the state of charge value or indication signal, continuously perform the setting or clearing control of the battery stop charging flag; S130. Determine the required operating mode based on the setting status of the battery stop charging flag. S140. If the required working mode is BuckBoost mode, then control to enter BuckBoost mode, configure the duty cycle of the drive signal of the first switch Q1 and the second switch Q to be complementary, configure the duty cycle of the drive signal of the third switch Q3 and the fourth switch Q4 to be complementary, and control the first switch Q1, the second switch Q, the third switch Q3 and the fourth switch Q4 to be normally turned on. S150. If the required operating mode is Boost mode, then control to enter Boost mode, configure the duty cycle of the drive signals of the first switch Q1 and the second switch Q to be complementary, configure the duty cycle of the drive signals of the third switch Q3 and the fourth switch Q4 to be complementary, and control the second switch Q and the third switch Q3 to be normally turned on, while turning off the first switch Q1 and the fourth switch Q4.

[0021] In step S110, the State of Charge (SOC) is the ratio of the remaining charge of the high-voltage battery Battery1 to its nominal capacity, directly reflecting the battery's energy state. The indication signals from the Battery Management System (BMS) are control commands for the high-voltage battery Battery1, such as "Charging Allowed," "Charging Prohibited," and "Forced Discharge." By obtaining the SOC of the high-voltage battery Battery1 and the indication signals from the BMS, the true state of the high-voltage battery Battery1 can be obtained, providing a more reliable basis for subsequent control of the first switch Q1, the second switch Q3, the third switch Q4, and the fourth switch Q4.

[0022] In steps S120 and S130, the battery stop charging flag serves as the basis for determining the required operating mode and is continuously updated to ensure that the battery stop charging flag can dynamically update with the battery status and command signals, and can quickly respond to sudden changes in battery status (such as the state of charge value rapidly rising to full charge) or changes in the instructions of the battery management system (such as sudden fault instructions), avoiding the risk of overcharging caused by lag.

[0023] In step S140, if the required operating mode is BuckBoost mode, it indicates that the high-voltage battery Battery1 is in a rechargeable and dischargeable state. The control enters BuckBoost mode, configuring the duty cycles of the drive signals of the first switch Q1 and the second switch Q to be complementary. Therefore, the conduction times of the first switch Q1 and the second switch Q are completely opposite; that is, when the first switch Q1 is on, the second switch Q is off; when the first switch Q1 is off, the second switch Q is on, and the sum of their conduction time ratios (duty cycles) is 100%. The third switch Q3 and the fourth switch Q4 are handled similarly. Under this control method, the off-grid inverter, through the operation of the first switch Q1, the second switch Q, the third switch Q3, and the fourth switch Q4 in conjunction with the first inductor L1, the second inductor L2, and the first capacitor C1 and the second capacitor C2, can achieve bidirectional energy flow: when the external grid or load needs energy, the battery discharges; when the battery is low on power, the external grid charges the battery. Among them, the complementary conduction control method can avoid the simultaneous conduction of two switches in the same series branch, prevent the bus short circuit from burning out the devices, and reduce the conduction loss and switching loss of each switch.

[0024] In step S150, if the required operating mode is Boost mode, it indicates that the high-voltage battery Battery1 is in a state where it can only discharge in one direction. The control enters Boost mode by maintaining complementary duty cycles for the drive signals of the two pairs of switches; however, the first switch Q1 and the fourth switch Q4 are forcibly turned off, while only the second switch Q and the third switch Q3 are turned on. This cuts off the energy path for charging the high-voltage battery Battery1, ensuring that energy can only flow from the high-voltage battery Battery1 to the bus, and cannot flow from the bus to the high-voltage battery Battery1, thus preventing overcharging of the high-voltage battery Battery1. There is no need to limit the average inductor current, nor is it necessary to set a target value for the average inductor current required to stop charging.

[0025] Therefore, this embodiment of the invention obtains the state of charge value of the high-voltage battery Battery1 and the indication signal of the battery management system to control the setting or clearing of the battery stop charging flag. Then, based on the setting state of the battery stop charging flag, the required operating mode is determined. In the Boost mode where it is necessary to stop charging the high-voltage battery Battery1, the first switch Q1 and the fourth switch Q4 that charge the high-voltage battery Battery1 are directly turned off, cutting off the energy path for charging. The energy of the bus cannot enter the high-voltage battery Battery1, avoiding overcharging of the high-voltage battery Battery1 and reducing the risk of damage to the high-voltage battery Battery1. In this application, stopping charging does not need to be limited by the target value of the average inductor current, and a suitable target value can be set to ensure the stability of the system power supply.

[0026] In an optional embodiment of this application, the charge / discharge control method further includes the following steps: When the control enters BuckBoost mode, it acquires the first output value of the bus control loop and the second output value of the battery voltage control loop. If the first output value is less than zero, then the minimum value between the absolute values ​​of the first output value and the second output value is used as the charging reference value; The duty cycle of the first target drive signal is calculated based on the charging reference value, and the second switch Q and the third switch Q3 are configured using the duty cycle of the first target drive signal.

[0027] Specifically, in BuckBoost mode, the bus voltage fluctuates with the grid / load, and the battery voltage changes with the charging and discharging state. The minimum value between the bus control loop and the battery voltage control loop is taken as the charging reference value, and then the duty cycle of the corresponding first target drive signal is calculated to configure the second switch Q and the third switch Q3. This allows the conduction time of the switches to be precisely matched with the actual voltage conditions, avoiding uncontrolled charging current caused by excessively high / low duty cycles, and ensuring that the current is always within the safe range allowed by the battery.

[0028] In a specific embodiment, reference is made to... Figure 4 In the bus control loop, the target value and feedback value of the bus control loop form an error (i.e., the difference between the two), which is input to the bus PID controller. The output of the bus PID controller is limited by maximum and minimum amplitudes to obtain the final first output value. Based on the sign of the first output value, the reference current value of the inductor current PID loop is obtained. If the first output value is greater than zero, it is equal to the first output value of the bus control loop. Similarly, the target value and feedback value of the battery voltage control loop form an error (i.e., the difference between the two), which is input to the battery voltage PID controller. The output of the battery voltage PID controller is limited by maximum and minimum amplitudes to obtain the final second output value. Based on the sign of the first output value, the reference current value of the inductor current PID loop is obtained. That is, if the first output value is greater than zero, it is equal to the first output value of the bus control loop. If the first output value is less than zero, it indicates that the high-voltage battery Battery1 is in a charging state. The reference current value is then equal to the maximum of the first output value of the bus control loop and the second output value of the battery voltage control loop, i.e., the minimum of their absolute values. After obtaining the target inductor current value, it is input into the inductor current PID controller. The output is multiplied by a scaling factor, and the output result is then subjected to maximum and minimum limiting to obtain the duty cycle of the first target drive signal. The K value in the current loop is the loop scaling factor, which is taken as 1 / 4096 in this application.

[0029] refer to Figures 1 to 3 In an optional embodiment of this application, the charge / discharge control method further includes the following steps: S210. Before switching from Boost mode to BuckBoost mode, calculate and obtain the duty cycle of the second target drive signal of the second switch Q and the third switch Q3 in BuckBoost mode in real time. S220. In one cycle after the Boost mode is switched to BuckBoost mode, the duty cycle of the drive signals of the second switch Q and the third switch Q3 is configured to the second target drive signal duty cycle, and the duty cycles of the drive signals of the first switch Q1 and the second switch Q are configured to be complementary, and the duty cycles of the drive signals of the third switch Q3 and the fourth switch Q4 are configured to be complementary.

[0030] Specifically, when the demand operating mode is BuckBoost mode and the high-voltage battery Battery1 is charging, the target value of the inductor current control loop is negative. Upon entering Boost mode, after the first switch Q1 and the fourth switch Q4 are turned off, energy from the bus cannot enter the high-voltage battery Battery1, and the actual inductor current cannot reach the target value. The difference between the actual and target inductor current values ​​is negative, causing the output of the inductor current control loop to reach its minimum value, which is 0 in application, i.e., a duty cycle of 0. When switching back from Boost mode to BuckBoost mode, the change in the demand operating mode leads to a change in the input-output relationship. When the off-grid inverter is charging the high-voltage battery Battery1 and the battery is fully charged, at the moment before switching back from Boost mode to BuckBoost mode, the high-voltage battery Battery1 is in a charging state, and the output of the bus control loop is unrestricted, representing the maximum charging current of the off-grid inverter. After switching to BuckBoost mode, the charging current increases following the control of the battery voltage loop, achieving a smooth current start during mode switching. Therefore, by calculating the duty cycle of the second target drive signal of the second switch Q and the third switch Q3 in BuckBoost mode before switching from Boost mode to BuckBoost mode, and immediately configuring the duty cycle of the drive signal of the second switch Q and the third switch Q3 to the duty cycle of the target drive signal one cycle after switching, large current can be avoided during switching.

[0031] This application can achieve smooth switching between Boost mode and BuckBoost mode at the software level by leveraging the characteristics of the buck-boost topology composed of devices such as the first switch Q1, the second switch Q, the third switch Q3, and the third switch Q3.

[0032] In an optional embodiment of this application, the duty cycle of the second target drive signal is calculated using the following formula: Wherein, is the duty cycle of the second target drive signal; is the feedback value of the bus control loop; and is the feedback value of the battery voltage control loop.

[0033] Specifically, the bus voltage and battery voltage fluctuate in real time with load changes and charging / discharging state switching. The duty cycle of the second target drive signal is calculated based on the real-time voltage difference ratio. This eliminates the need for a preset fixed threshold, dynamically tracking voltage changes to achieve precise, real-time matching of the drive parameters of each switch, preventing hysteresis and sudden current changes. Furthermore, calculating the duty cycle of the second target drive signal based on the ratio of the voltage difference between the feedback value of the bus control loop and the feedback value of the battery voltage control loop to the feedback value of the bus control loop is a single-dimensional scalar calculation, resulting in a simple formula and low computational complexity.

[0034] In a specific embodiment, refer to Figure 4 The feedback value of the bus control loop and the feedback value of the battery voltage control loop form an error (i.e., the difference between the two). The voltage difference between the feedback value of the bus control loop and the feedback value of the battery voltage control loop is proportional to the feedback value of the bus control loop. The output result is then subjected to maximum and minimum limiting to obtain the duty cycle of the second target drive signal.

[0035] In an optional embodiment of this application, determining the required operating mode based on the set state of the battery stop charging flag includes the following steps: If the battery stop charging flag is set, the required operating mode is Boost mode; If the battery stop charging flag is cleared, the required operating mode is BuckBoost mode.

[0036] Specifically, when the battery stop charging flag is set, it indicates that the conditions for prohibiting battery charging are met (such as the state of charge (SOC) value of high-voltage battery Battery1 reaching the preset SOC threshold, or the battery management system issuing a charge prohibition command). The required operating mode will then be set to Boost mode. In this mode, the off-grid inverter only supports unidirectional discharge from high-voltage battery Battery1 to the bus, and bus charging of the battery is not possible. By determining Boost mode, the first switch Q1 and the fourth switch Q4 are forcibly disconnected to prevent battery overcharging, ensuring the safety and lifespan of high-voltage battery Battery1.

[0037] When the battery charging stop flag is cleared, it indicates that the conditions for allowing battery charging and discharging are met (such as the state of charge of the high-voltage battery Battery1 being within the normal range, or the battery management system allowing bidirectional energy flow). The required operating mode will then be set to BuckBoost mode. In this mode, the off-grid inverter supports bidirectional energy flow between the high-voltage battery Battery1 and the bus, enabling both charging and discharging functions.

[0038] The battery stop charging flag being set or cleared corresponds one-to-one with Boost mode and BuckBoost mode. There is no need to additionally determine the specific reason for triggering the charging prohibition, nor to rely on the average inductor current limit to determine whether to stop charging. The mode command is directly output, improving control efficiency.

[0039] In an optional embodiment of this application, based on the state of charge value or indication signal, continuously performing the setting or clearing control of the battery stop charging flag includes the following steps: The current state of charge (SOC) value of the high-voltage battery Battery1 is continuously compared with the preset SOC threshold. If the current SOC value is greater than the preset SOC threshold, the battery stop charging flag is set. Alternatively, continuously analyze the indication signals of the current battery management system. If the indication signal includes a stop charging command, then execute the setting control of the battery stop charging flag.

[0040] Specifically, the current state of charge (SOC) value of the high-voltage battery Battery1 is collected in real time and continuously compared with a preset SOC threshold. Once the current SOC value is detected to exceed the preset SOC threshold, the battery stop charging flag is immediately set so as to obtain the required working mode in time and then control the first switch Q1 and the fourth switch Q4 to shut down in time to prevent the high-voltage battery Battery1 from being overcharged.

[0041] Alternatively, the battery management system, acting as the main control unit for the high-voltage battery Battery1, will issue commands such as "allow charging" or "stop charging" based on multi-dimensional information including battery temperature, individual cell voltage balance, and fault status. The grid-connected inverter analyzes the command signals sent by the battery management system in real time. Once it detects a "stop charging command," it immediately sets the battery stop charging flag to the set state to promptly obtain the required operating mode and then control the shutdown of the first switch Q1 and the fourth switch Q4 to prevent overcharging of the high-voltage battery Battery1.

[0042] In an optional embodiment of this application, before obtaining the state of charge value of the high-voltage battery Battery1, the charge-discharge control method further includes the following steps: A data interaction connection is established with the battery management system of the external high-voltage battery Battery1 via the CAN communication bus to obtain the state of charge value of the high-voltage battery Battery1 and the indication signals of the battery management system.

[0043] Specifically, the off-grid inverter establishes a stable data interaction link with the battery management system of high-voltage battery Battery1 via a CAN communication bus. Subsequently, it uses this data interaction link to obtain the state of charge (SOC) value of high-voltage battery Battery1 and the indication signals from the battery management system in real time, so as to directly and promptly force the shutdown of the first switch Q1 and the fourth switch Q4, cutting off the charging path of high-voltage battery Battery1 and protecting it. The CAN communication bus has strong anti-electromagnetic interference capabilities and low transmission delay, adapting to the complex electromagnetic environment of energy storage systems, avoiding data packet loss or mistransmission, and ensuring the accurate transmission of SOC values ​​and indication signals from the battery management system.

[0044] The CAN communication bus has an adjustable communication rate, with a default baud rate of 250kbps.

[0045] This application also provides an off-grid inverter. As shown in the figure, the off-grid inverter includes a main control chip, a first switch Q1, a second switch Q, a third switch Q3, and a fourth switch Q4, a first capacitor C1, and a second capacitor C2; the first switch Q1 and the second switch Q are connected in series between the positive terminal of the bus and the ground terminal; the third switch Q3 and the fourth switch Q4 are connected in series between the negative terminal of the bus and the ground terminal; one end of the first inductor L1 is connected to the series node of the first switch Q1 and the second switch Q, and the other end is connected to the positive terminal of the external high-voltage battery Battery 1; one end of the second inductor L2 is connected to the series node of the third switch Q3 and the fourth switch Q4, and the other end is connected to the negative terminal of the external high-voltage battery Battery 1; the main control chip is connected to the gates of the first switch Q1, the second switch Q, the third switch Q3, and the fourth switch Q4, and the main control chip performs control using the steps of the method described above, and configures the first switch Q1, the second switch Q, the third switch Q3, and the fourth switch Q4.

[0046] The off-grid inverter of this application adopts the above method. By obtaining the state of charge value of the high-voltage battery Battery1 and the indication signal of the battery management system, the setting or clearing control of the battery stop charging flag is performed. Then, the required operating mode is determined according to the setting state of the battery stop charging flag. Then, in the Boost mode where it is necessary to stop charging of the high-voltage battery Battery1, the first switch Q1 and the fourth switch Q4 that charge the high-voltage battery Battery1 are directly turned off, cutting off the energy path of charging. The energy of the bus cannot enter the high-voltage battery Battery1, avoiding overcharging of the high-voltage battery Battery1 and reducing the risk of damage to the high-voltage battery Battery1. In this application, the stopping of charging does not need to be limited by the target value of the average value of the inductor current.

[0047] This application also provides an off-grid / grid-connected inverter system 100. As shown in the figure, the off-grid / grid-connected inverter system 100 includes a high-voltage battery Battery 1 and an off-grid / grid-connected inverter as described above. The positive terminal of the high-voltage battery Battery 1 is connected to the other end of a first inductor L1, and its negative terminal is connected to the other end of a second inductor L2. This off-grid / grid-connected inverter system 100 has the same structure and beneficial effects as the off-grid / grid-connected inverter in the foregoing embodiments. The structure and beneficial effects of the off-grid / grid-connected inverter have been described in detail in the foregoing embodiments and will not be repeated here.

[0048] This application also provides a power supply device 200. For example... Figure 5As shown, the power supply device 200 includes a processor 201 and a memory 202. The processor 201 is coupled to the memory 202. The memory 202 stores a computer program 301, which the processor 201 executes during operation to implement the method described above. Detailed steps can be found above and will not be repeated here.

[0049] This application also provides a computer-readable storage medium 300. For example... Figure 6 As shown, the computer-readable storage medium 300 stores a computer program 301. When the computer program 301 is executed by the processor 201, the processor 201 performs the steps of the method described above. Detailed steps can be found above and will not be repeated here. In one embodiment, the computer-readable storage medium 300 can be a storage chip in a terminal, a hard disk, or other readable and writable storage tools such as a portable hard disk, USB flash drive, or optical disc, or it can be a server, etc.

[0050] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0051] It should be understood that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Those skilled in the art can modify the technical solutions described in the above embodiments, or make equivalent substitutions for some of the technical features; and all such modifications and substitutions should fall within the protection scope of the appended claims of the present invention.

Claims

1. A charging and discharging control method for an off-grid / parallel inverter, characterized in that, The off-grid inverter includes a first switch, a second switch, a third switch, a fourth switch, a first capacitor, and a second capacitor. The first switch and the second switch are connected in series between the positive terminal of the bus and ground, and their series connection point is connected to the positive terminal of an external high-voltage battery through a first inductor. The third switch and the fourth switch are connected in series between the negative terminal of the bus and ground, and their series connection point is connected to the negative terminal of an external high-voltage battery through a second inductor. The charging and discharging control method includes the following steps: Acquire the state of charge (SOC) value of the high-voltage battery, as well as the indication signals from the battery management system; Based on the state of charge value or the indication signal, continuously execute the setting or clearing control of the battery stop charging flag; The required operating mode is determined based on the setting status of the battery stop charging flag. If the required working mode is BuckBoost mode, then control to enter BuckBoost mode, configure the duty cycle of the drive signals of the first switch and the second switch to be complementary, configure the duty cycle of the drive signals of the third switch and the fourth switch to be complementary, and control the first switch, the second switch, the third switch and the fourth switch to be normally turned on. If the required operating mode is Boost mode, then the system enters Boost mode, configures the duty cycles of the drive signals of the first and second switches to be complementary, configures the duty cycles of the drive signals of the third and fourth switches to be complementary, and controls the second and third switches to be normally turned on, while turning off the first and fourth switches.

2. The charging and discharging control method according to claim 1, characterized in that, The charging and discharging control method further includes the following steps: When the control enters BuckBoost mode, it acquires the first output value of the bus control loop and the second output value of the battery voltage control loop. If the first output value is less than zero, then the minimum value between the absolute values ​​of the first output value and the second output value is used as the charging reference value; The duty cycle of the first target drive signal is calculated based on the charging reference value, and the second and third switches are configured using the duty cycle of the first target drive signal.

3. The charging and discharging control method according to claim 2, characterized in that, The charging and discharging control method further includes the following steps: Before switching from Boost mode to BuckBoost mode, the duty cycle of the second target drive signal of the second switch and the third switch in BuckBoost mode is calculated and obtained in real time. Within one cycle after switching from Boost mode to BuckBoost mode, the duty cycle of the drive signals of the second switch and the third switch is configured to the duty cycle of the second target drive signal, and the duty cycles of the drive signals of the first switch and the second switch are configured to be complementary, and the duty cycles of the drive signals of the third switch and the fourth switch are configured to be complementary.

4. The charging and discharging control method according to claim 3, characterized in that, The duty cycle of the first target driving signal is calculated using the following formula: in, The duty cycle of the second target drive signal; This is the feedback value of the bus control loop; Feedback value for the battery voltage control loop .

5. The charging and discharging control method according to any one of claims 1-4, characterized in that, Determining the required operating mode based on the set state of the battery stop charging flag includes the following steps: If the battery stop charging flag is set, the required operating mode is Boost mode; If the battery stop charging flag is cleared, the required operating mode is BuckBoost mode.

6. The charging and discharging control method according to any one of claims 1-4, characterized in that, The step of continuously setting or clearing the battery stop charging flag based on the state of charge value or the indication signal includes the following steps: The current state of charge (SOC) value of the high-voltage battery is continuously compared with the preset SOC threshold. If the current SOC value is greater than the preset SOC threshold, the battery stop charging flag is set. Alternatively, continuously analyze the indication signals of the current battery management system, and if the indication signals include a stop charging command, execute the setting control of the battery stop charging flag.

7. An off-grid / on-grid inverter, characterized in that, The system includes a main control chip, a first switching transistor, a second switching transistor, a third switching transistor, and a fourth switching transistor, a first capacitor, and a second capacitor. The first and second switching transistors are connected in series between the positive terminal of the bus and ground. The third and fourth switching transistors are connected in series between the negative terminal of the bus and ground. One end of the first inductor is connected to the series connection node of the first and second switching transistors, and the other end is connected to the positive terminal of an external high-voltage battery. One end of the second inductor is connected to the series connection node of the third and fourth switching transistors, and the other end is connected to the negative terminal of the external high-voltage battery. The main control chip is connected to the gates of the first, second, third, and fourth switching transistors. The main control chip performs control using the steps of the method described in any one of claims 1-6 and configures the first, second, third, and fourth switching transistors.

8. An off-grid / on-grid inverter system, characterized in that, It includes a high-voltage battery and an off-grid inverter as described in claim 7, wherein the positive terminal of the high-voltage battery is connected to the other end of the first inductor and its negative terminal is connected to the other end of the second inductor.

9. A computer-readable storage medium, characterized in that, The system stores a computer program that, when executed by a processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 6.

10. An energy supply device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 6.