Bidirectional vehicle-mounted charger multi-state discharge control method and device, vehicle and medium
Patent Information
- Application Number
- CN202611109604.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-16
AI Technical Summary
状态机若未能在必要时刻及时切断高压回路,可能带来触电风险;若在电池能量不足时因跳转失误而持续放电,则会对电池造成不可逆的损伤
本技术方案在准备状态引入安全检测环节,只有检测合格才允许进入放电状态,不合格则直接转入故障状态,这构成了放电前的主动防护闭环。在放电过程中,持续监测电池荷电状态值,一旦低于预设阈值即自动切换至暂停状态,而非继续放电,形成对电池过放风险的动态闭环抑制。暂停状态作为缓冲,确保低电量时系统停止能量输出,待收到停止指令后才进入终止状态并彻底关断,防止了高压回路在非安全条件下的残留或误触发。在规范化异常处理方面,设定了固定的状态迁移路径:待机至准备、准备至放电或故障、放电至暂停、暂停至终止,每条跳转均依赖明确的判定条件,消除了多事件竞争导致的跳转歧义,从机制上避免了状态卡死和误跳转。
Smart Images

Figure CN122932091A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive engineering technology, specifically to a method, device, vehicle, and medium for multi-state discharge control of a bidirectional on-board charger. Background Technology
[0002] The bidirectional on-board charger is a core component of an electric vehicle's charging and discharging system. Its AC discharge function allows the vehicle to feed electrical energy to external loads or the power grid, making it valuable in emergency power supply and vehicle-to-grid (V2G) interaction scenarios. The AC discharge process involves the coordinated operation of multiple subsystems, including battery management, inverter control, relay driving, external connection detection, and user interaction. The entire discharge sequence is typically managed by an embedded state machine. This state machine needs to execute transitions based on input conditions, such as start-up detection, pre-charging, steady-state output, fault response, and normal shutdown. Its design quality directly determines the safety and reliability of the discharge function.
[0003] Most existing AC discharge control schemes adopt the state machine architecture of the charging mode, only making adaptive modifications to the control parameters, without refactoring the system to address the unique operating characteristics of the discharge scenario. The actual vehicle operating environment is complex and variable, and the discharge process faces various unexpected conditions. Existing state machines typically use decentralized conditional branches to handle various external events, lacking a unified jump priority decision mechanism. When multiple situations occur simultaneously, the jump logic is prone to confusion, potentially causing the state machine to enter an undefined intermediate state, where the system can neither continue discharging nor safely shut down. Furthermore, the exception handling logic in existing schemes is distributed across conditional judgments at different state levels, resulting in inconsistent fault response actions from different sources, unclear isolation strategies for minor and major faults, and frequent false jumps.
[0004] More seriously, abnormal state transitions directly threaten high-voltage safety and battery life. If the state machine fails to disconnect the high-voltage circuit in time when necessary, it may pose a risk of electric shock; if the battery continues to discharge due to a transition error when its energy is insufficient, it will cause irreversible damage to the battery. Summary of the Invention
[0005] This invention provides a method, device, vehicle, and medium for multi-state discharge control of a bidirectional on-board charger, which can achieve discharge protection and help eliminate safety hazards.
[0006] This invention provides a multi-state discharge control method for a bidirectional on-board charger, the method comprising: When a discharge gun connection signal of the on-board charger is detected, the on-board charger, which is in standby mode, is controlled to switch from standby mode to ready mode. A safety test is performed on the on-board charger in the prepared state. If the safety test result is qualified, the on-board charger is controlled to switch from the prepared state to the discharging state. If the safety test result is unqualified, the on-board charger is controlled to switch from the prepared state to the fault state. In response to the start discharge command, the on-board charger in the discharge state is controlled to convert the DC power of the power battery into AC power and then supply it to the outside, and the state of charge value of the power battery is monitored. If the battery state of charge value is lower than a preset threshold, the on-board charger is controlled to switch from the discharging state to the paused state. When the on-board charger in the paused state receives a stop discharge command, it controls the on-board charger to switch from the paused state to the terminated state, so that the on-board charger in the terminated state stops supplying power to the outside world.
[0007] Optionally, the bidirectional on-board charger multi-state discharge control method further includes: If an unrecoverable Type I fault is detected in the on-board charger that is in the preparation state, the discharge state, or the paused state, the on-board charger is controlled to switch from the current state to the fault state. If a recoverable Type II fault is detected in the on-board charger in the discharge state, the on-board charger is controlled to switch from the discharge state to the paused state.
[0008] Optionally, the step of controlling the on-board charger to switch from the discharging state to the paused state if the battery state of charge value is lower than a preset threshold includes: If the battery state of charge value is lower than the first preset threshold, the on-board charger is controlled to switch from the discharge state to the warning state and issue a prompt message to stop discharging. If the on-board charger is in the warning state and the battery state of charge value is lower than the second preset threshold, then the on-board charger is controlled to be in the pause state, wherein the second preset threshold is less than the first preset threshold.
[0009] Optionally, the step of performing a safety test on the on-board charger in the preparation state, and controlling the on-board charger to switch from the preparation state to the discharging state if the safety test result is qualified, and controlling the on-board charger to switch from the preparation state to the fault state if the safety test result is unqualified, includes: A safety test is performed on the on-board charger in the prepared state, wherein the test items include the battery state of charge value and the fault type of the on-board charger. If the fault type is detected to be the first type of fault, then control the on-board charger to switch from the ready state to the fault state; If the fault type is detected as the second type of fault or the battery state of charge value is lower than the first preset threshold, the on-board charger is controlled to switch from the ready state to the paused state. If the battery state of charge value is detected to be lower than the second preset threshold, the on-board charger is controlled to switch from the ready state to the terminated state. If no fault is detected in the on-board charger and the battery state of charge value is higher than the first preset threshold, the on-board charger is controlled to switch from the ready state to the discharging state.
[0010] Optionally, the on-board charger includes multiple discharge modes, and the on-board charger supplies power to the outside according to the discharge power corresponding to each discharge mode, wherein each discharge mode is sorted in descending order of the corresponding discharge power; When the on-board charger in the paused state receives a stop discharging command, the system controls the on-board charger to switch from the paused state to the terminated state, so that the on-board charger in the terminated state stops supplying power to the outside world, including: When the on-board charger, which is in the paused state, receives a stop discharge command, it determines the current discharge mode; In response to a stop discharge command, the current discharge mode is switched to the next discharge mode in the sorting order until the discharge power corresponding to the current discharge mode is reduced to zero. When the discharge power is zero, the on-board charger is controlled to switch from the paused state to the terminated state, so that the on-board charger in the terminated state stops supplying power to the outside.
[0011] Optionally, the discharge mode of the on-board charger is either a high-voltage discharge mode or a normal discharge mode; When the on-board charger is in the discharge state or the pause state and receives a stop discharge command, if the current discharge mode is normal discharge mode, the on-board charger is controlled to switch from the current state to the terminated state; if the current discharge mode is high voltage discharge mode, a prompt message to switch to normal discharge mode is issued. When the on-board charger is in the discharge state or the pause state and the battery state of charge is lower than the preset threshold, if the current discharge mode is normal discharge mode, the on-board charger is controlled to switch from the current state to the terminated state; if the current discharge mode is high voltage discharge mode, the current discharge mode is switched to normal discharge mode.
[0012] Optionally, the bidirectional on-board charger multi-state discharge control method further includes: When no discharge gun connection signal is detected, the on-board charger is controlled to stop supplying power to the outside world and to enter the standby state.
[0013] The present invention also provides a multi-state discharge control device for a bidirectional on-board charger, the device comprising: The first switching module is used to control the on-board charger, which is in standby mode, to switch from standby mode to ready mode when a discharge gun connection signal of the on-board charger is detected. The second switching module is used to perform a safety test on the on-board charger in the preparation state. If the safety test result is qualified, the on-board charger is controlled to switch from the preparation state to the discharge state. If the safety test result is unqualified, the on-board charger is controlled to switch from the preparation state to the fault state. The power supply module is used to respond to the start discharge command, control the on-board charger in the discharge state to convert the DC power of the power battery into AC power and then supply it to the outside, and monitor the state of charge value of the power battery. The third switching module is used to control the on-board charger to switch from the discharging state to the paused state if the battery state of charge value is lower than a preset threshold. The fourth switching module is used to control the on-board charger in the paused state to switch from the paused state to the terminated state when the on-board charger in the paused state receives a stop discharge command, so that the on-board charger in the terminated state stops supplying power to the outside.
[0014] The present invention also provides a vehicle, the vehicle including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the bidirectional on-board charger multi-state discharge control method as described in any of the preceding claims.
[0015] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the multi-state discharge control method for a bidirectional on-board charger as described in any of the preceding claims.
[0016] The present invention has at least the following beneficial effects: This technical solution introduces a safety detection step in the preparation state. Only those who pass the detection are allowed to enter the discharge state; those who fail directly enter the fault state, forming an active protection closed loop before discharge. During discharge, the battery's state of charge is continuously monitored. Once it falls below a preset threshold, it automatically switches to a pause state instead of continuing discharge, forming a dynamic closed-loop suppression of the risk of over-discharge. The pause state acts as a buffer, ensuring that the system stops energy output when the battery is low. It only enters the termination state and completely shuts down after receiving a stop command, preventing residual or false triggering of the high-voltage circuit under unsafe conditions. In terms of standardized anomaly handling, fixed state transition paths are set: standby to preparation, preparation to discharge or fault, discharge to pause, pause to termination. Each transition relies on clear judgment conditions, eliminating ambiguity caused by multiple event competition and preventing state jamming and false transitions from a mechanism perspective. Attached Figure Description
[0017] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.
[0018] Figure 1 This is a flowchart of a multi-state discharge control method for a bidirectional on-board charger. Figure 2 This is a flowchart illustrating the steps involved in applying a multi-state discharge control method for a bidirectional on-board charger in a specific scenario. Figure 3 This is a schematic diagram of a multi-state discharge control device for a bidirectional on-board charger. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0020] It should be noted that with the widespread adoption of vehicle-to-load AC discharge functionality in new energy vehicles, the AC discharge control logic of the bidirectional on-board charger (OBC) has become a crucial aspect of vehicle control. Current AC discharge control solutions in the industry generally suffer from the following pain points: 1) Simple state transition logic with incomplete scenario coverage; 2) Use of only linear processes, failing to adequately consider complex scenarios such as discharge gun insertion / removal, SOC changes, faults, and user interruptions, easily leading to state freezes or erroneous transitions. 3) Incomplete safety protection, delayed risk response, fragmented judgment of key safety conditions, and the lack of a complete state machine protection system, resulting in potential hazards such as high-voltage safety and battery over-discharge. 4) Non-standard anomaly handling, insufficient robustness, lack of unified anomaly scenario handling logic, inconsistent fault handling methods, and significant after-sales maintenance difficulties.
[0021] Please refer to Figure 1 , Figure 1 This is a flowchart of the steps of a multi-state discharge control method for a bidirectional on-board charger.
[0022] This embodiment provides a multi-state discharge control method for a bidirectional on-board charger, including: S101. When a discharge gun connection signal of the on-board charger is detected, the on-board charger, which is in standby mode, is controlled to switch from standby mode to ready mode.
[0023] S102. Perform a safety test on the on-board charger in the ready state. If the safety test result is qualified, control the on-board charger to switch from the ready state to the discharging state. If the safety test result is unqualified, control the on-board charger to switch from the ready state to the fault state.
[0024] S103. In response to the start discharge command, control the on-board charger in the discharge state to convert the DC power of the power battery into AC power and then supply it to the outside, and monitor the state of charge value of the power battery.
[0025] S104. If the battery state of charge value is lower than the preset threshold, control the on-board charger to switch from the discharging state to the paused state.
[0026] S105. When the on-board charger in the paused state receives a stop discharge command, control the on-board charger to switch from the paused state to the terminated state so that the on-board charger in the terminated state stops supplying power to the outside.
[0027] Understandably, this embodiment introduces a safety detection step in the preparation state. Only if the detection is qualified is the system allowed to enter the discharge state; otherwise, it directly transitions to the fault state, forming an active protection closed loop before discharge. During discharge, the battery's state of charge is continuously monitored. Once it falls below a preset threshold, it automatically switches to a pause state instead of continuing to discharge, forming a dynamic closed-loop suppression of the risk of battery over-discharge. The pause state acts as a buffer, ensuring that the system stops energy output when the battery is low. Only after receiving a stop command does it enter the termination state and completely shut down, preventing residual or false triggering of the high-voltage circuit under unsafe conditions. In terms of standardized anomaly handling, fixed state transition paths are set: standby to preparation, preparation to discharge or fault, discharge to pause, and pause to termination. Each transition relies on clear judgment conditions, eliminating ambiguity caused by multiple event competition and preventing state jamming and false transitions from a mechanism perspective.
[0028] In some embodiments, the above-described bidirectional on-board charger multi-state discharge control method further includes: If an unrecoverable Type I fault is detected in the on-board charger that is in the ready state, discharging state, or paused state, the on-board charger is controlled to switch from the current state to the fault state; if a recoverable Type II fault is detected in the on-board charger that is in the discharging state, the on-board charger is controlled to switch from the discharging state to the paused state.
[0029] Understandably, for unrecoverable Type I faults, regardless of whether the charger is in a ready, discharging, or paused state, it can be forcibly switched to the fault state to ensure that serious anomalies are immediately isolated and to avoid high-voltage safety risks caused by operation with defects. For recoverable Type II faults that occur during the discharge process, the system prioritizes switching to the paused state rather than directly terminating the circuit. This interrupts energy output to protect the equipment while preserving a path for recovery operations after the fault is cleared, reducing unnecessary shutdowns and restarts. This measure improves the full-state coverage anomaly response system, ensuring that state transitions have a clear and unique exit point in various fault scenarios, eliminating state freezes and misjudgments, and further enhancing the robustness and safety of discharge control.
[0030] In some embodiments, the above-described bidirectional on-board charger multi-state discharge control method further includes: When no discharge gun connection signal is detected, the on-board charger is controlled to stop supplying power to the outside world and to enter standby mode.
[0031] Understandably, when the connection signal disappears, the system, regardless of its operating state, will forcibly stop supplying power and return to standby. This ensures that the high-voltage circuit is promptly disconnected when the plug is unplugged, avoiding the risk of residual charge on the busbar due to misjudgment or state lingering, and physically eliminating the risk of electric shock when unplugging the plug. Simultaneously, this logic is independent of the main control commands and internal status flags, adding a hardware-level safety redundancy to the state machine, enabling the system to have more reliable peripheral disconnection response capabilities in all scenarios, further protecting the personal safety of operators.
[0032] In some embodiments, step S102 includes: A safety test is conducted on the on-board charger in the ready state. The test items include the battery state of charge value and the type of fault of the on-board charger.
[0033] If a fault type 1 is detected, the on-board charger is switched from the ready state to the fault state.
[0034] If a fault type of Class II is detected or the battery state of charge value is lower than the first preset threshold, the on-board charger is controlled to switch from the ready state to the paused state.
[0035] If the detected battery state of charge value is lower than the second preset threshold, the on-board charger is controlled to switch from the ready state to the terminated state.
[0036] If no fault is detected in the on-board charger and the battery state of charge is higher than the first preset threshold, the on-board charger is controlled to switch from the ready state to the discharging state.
[0037] Understandably, this embodiment refines and categorizes the safety detection of the preparation state, setting clear transition targets based on different fault types and battery state of charge values. First-type faults directly lead to a fault state to isolate severe anomalies; second-type faults or battery charge levels below a first threshold trigger a pause state, preserving the opportunity for recovery; battery charge levels below a lower second threshold directly terminate the process to prevent over-discharge; only when there are no faults and the battery is sufficiently charged are discharge states permitted. This approach completes multi-dimensional condition adjudication before discharge begins, avoiding decision-making blind spots caused by a single pass / fail criterion, ensuring precise matching of state transitions with risk levels, eliminating the risk of accidentally entering a discharge state from the source, and significantly improving the precision and reliability of safety protection.
[0038] In some embodiments, step S104 includes: If the battery state of charge value is lower than the first preset threshold, the on-board charger is controlled to switch from the discharging state to the warning state and a prompt message to stop discharging is issued; if the on-board charger is in the warning state and the battery state of charge value is lower than the second preset threshold, the on-board charger is controlled to be in the pause state, wherein the second preset threshold is less than the first preset threshold.
[0039] Understandably, this embodiment refines the SOC monitoring during discharge into a two-level warning and response mechanism. When the battery level drops to a first preset threshold, the system first switches to a warning state and issues a notification, providing users with a buffer window for proactive intervention and avoiding inconvenience caused by sudden interruptions. If the battery level continues to deteriorate to a lower second threshold, it then enters a pause state to forcibly stop the discharge. This approach achieves a good balance between battery over-discharge protection and user experience, preventing irreversible damage caused by continuous battery consumption while providing operational response time through phased notifications, making discharge control more user-friendly and intelligent, while ensuring that the safety baseline is not breached.
[0040] In some embodiments, the on-board charger includes multiple discharge modes, and the on-board charger supplies power to the outside according to the discharge power corresponding to each discharge mode, wherein each discharge mode is sorted in descending order of its corresponding discharge power.
[0041] In some embodiments, step S105 includes: When the on-board charger in the paused state receives a stop discharge command, it determines the current discharge mode; in response to the stop discharge command, it switches the current discharge mode to the next discharge mode in the sorting order until the discharge power corresponding to the current discharge mode is reduced to zero; when the discharge power is zero, it controls the on-board charger to switch from the paused state to the terminated state so that the on-board charger in the terminated state stops supplying power to the outside world.
[0042] Understandably, this embodiment introduces a multi-stage discharge mode and a step-by-step power switching mechanism. Upon receiving a stop command in the paused state, the system does not shut down directly, but rather gradually reduces the power to zero in descending order before entering the termination state. This achieves a smooth power reduction before the end of discharge, effectively avoiding voltage spikes and current surges caused by sudden disconnection of high-voltage, high-current circuits, protecting power devices and high-voltage relays, and extending equipment lifespan. Simultaneously, the step-by-step power reduction provides a buffer time for the system, allowing internal energy to dissipate in an orderly manner, further reducing the risk of secondary faults caused by abnormal shutdown, and significantly improving the safety and reliability of the discharge termination process.
[0043] In some embodiments, the on-board charger's discharge mode is either a high-voltage discharge mode or a normal discharge mode.
[0044] When the on-board charger is in a discharging or paused state and receives a stop discharging command, if the current discharging mode is normal discharging mode, the on-board charger will be switched from the current state to the terminated state; if the current discharging mode is high-voltage discharging mode, a prompt message to switch to normal discharging mode will be issued.
[0045] When the on-board charger is in a discharging or paused state and the battery's state of charge is below a preset threshold, if the current discharging mode is normal discharging mode, the on-board charger will be switched from the current state to the terminated state; if the current discharging mode is high-voltage discharging mode, the current discharging mode will be switched to normal discharging mode.
[0046] Understandably, this embodiment implements differentiated termination and switching strategies for high-voltage and normal discharge modes. Upon receiving a stop command or when the battery level is too low, the normal discharge mode is directly shut down to ensure a safety baseline; the high-voltage discharge mode, on the other hand, first prompts the user to switch to normal mode, providing a buffer option to reduce power consumption and avoid system shock caused by abruptly cutting off power under high-voltage conditions. Simultaneously, when the battery level is insufficient, the high-voltage mode automatically switches to normal mode, which both extends some power supply capacity and reduces instantaneous power demand, alleviating the stress burden on the battery under low power conditions. This flexible handling logic based on mode type optimizes user experience and equipment protection while ensuring safety, making discharge control more flexible, reliable, and closer to actual usage scenarios.
[0047] This technical solution also provides an embodiment implemented in a specific scenario. This embodiment describes the entire standard AC discharge process of a bidirectional on-board charger under normal conditions, demonstrating the complete timing sequence of orderly transitions between states based on preset conditions.
[0048] The user inserts the discharge gun into the vehicle's AC charging socket. After the on-board charger's microcontroller detects a valid connection signal from the discharge gun, it confirms that the physical connection has been established. At this time, the charger is in standby mode, and the system then controls it to switch from standby mode to ready mode to begin pre-discharge safety checks.
[0049] In the ready state, safety checks include battery state-of-charge (SOC) assessment and charger self-fault type investigation. In this embodiment, the SOC reported by the battery management system is 65%, far exceeding the preset safety threshold. Simultaneously, the charger's internal self-test found no faults, including neither unrecoverable Type I faults nor recoverable Type II faults. Based on all the above satisfactory results, the system controls the charger to switch from the ready state to the discharging state.
[0050] Subsequently, the user issues a discharge start command via the vehicle's central control screen or a mobile application. The charger responds to this command, enters the discharge state, and begins operation, inverting the DC power from the battery into AC power conforming to grid standards, which is then continuously supplied to external loads or the grid via the discharge gun. Throughout the discharge process, the charger maintains real-time monitoring of the battery's state of charge (SOC).
[0051] As discharge continues, the battery's charge gradually decreases. When the state of charge (SCC) drops to near a preset first threshold (e.g., 25%), the system enters a warning state and issues a stop-discharge message via the dashboard or application, reminding the user that the current charge level is approaching a safe threshold. If the user does not intervene in time, discharge continues, and the SCC further decreases to a second preset threshold (e.g., 20%), the system determines that the safety shutdown condition has been met, controls the charger to switch from the discharge state to a pause state, interrupts power output, and prevents the battery from over-discharging.
[0052] In the paused state, the system internally executes a shutdown sequence. Based on the current operating mode, the charger gradually reduces its output power from high to low according to preset power levels. Once the power smoothly decreases to zero, the charger switches from the paused state to the terminated state. At this point, the charger completely stops supplying power, and the high-voltage circuit is reliably disconnected. Finally, the user unplugs the discharge gun, the connection signal disappears, and the charger returns from the terminated state to the standby state, awaiting the next charging / discharging task. Throughout the entire process, the state transitions are clear and the conditions are explicit, with no jamming or false jumps, fully verifying the effectiveness of this control method.
[0053] This technical solution also provides another embodiment implemented in a specific scenario. This embodiment describes a typical scenario in which a bidirectional on-board charger encounters a recoverable communication failure during discharge and successfully recovers within a short time, thereby continuing to complete the discharge process, to verify the system's flexible handling capability for the second type of fault.
[0054] The vehicle is currently discharging, and the charger is normally converting the DC power from the battery into AC power to supply electricity to the external system. At this time, the battery's state of charge is 50%, which is within the safe range. During operation, the communication link between the charger and the battery management system experiences a momentary interruption due to electromagnetic interference. This fault type is identified by the internal diagnostic module as a recoverable Type II fault, not an unrecoverable serious fault such as damage to power devices or hardware overcurrent.
[0055] According to the preset control logic, the system immediately switches the charger from the current discharging state to the paused state the instant the second type of fault is detected. Upon entering the paused state, the charger stops AC power output, but the high-voltage DC bus circuit remains connected, the power devices are not hard-shutdowned, and the main relay remains energized. This design aims to avoid unnecessary wear on the relay contacts caused by frequent disconnections of the high-voltage circuit, while preserving the physical conditions for rapid recovery after the fault is cleared.
[0056] The system simultaneously starts a timer to record the duration of the pause state. In this embodiment, the communication interference disappears on its own within 5 seconds, and the charger re-receives the complete data frame from the battery management system. After the internal fault flag is cleared, the system performs a safety check again to confirm that there are currently no faults and that the battery state of charge is still higher than the preset threshold. Once all recovery conditions are met, the system controls the charger to switch from the pause state back to the discharge state, the inverter output is re-established, and the discharge process continues, with the user experiencing almost no power interruption.
[0057] If a fault cannot be recovered in time, such as when the communication interruption lasts for more than the set 30-second time limit, the system determines that the fault is no longer instantaneously recoverable and will not wait any longer. At this point, the charger switches from the paused state to the fault state, completely terminating the discharge process, disconnecting the high-voltage circuit, and issuing a fault alarm through the instrument panel, prompting the user to check the communication line or contact after-sales service. This timeout mechanism effectively prevents the system from suspending indefinitely under abnormal conditions, balancing recovery opportunities with safety limits. The state transition path is clear throughout the process, without ambiguity or freezing.
[0058] Please see Figure 2 , Figure 2 This is a flowchart illustrating the steps involved in applying a multi-state discharge control method for a bidirectional on-board charger in a specific scenario.
[0059] This technical solution also provides another embodiment implemented in a specific scenario. This embodiment fully demonstrates the transition logic between various states of the bidirectional on-board charger under different operating conditions, covering the entire process of startup preparation, discharge operation, pause recovery, normal termination, and emergency exit, in order to verify the unified adjudication mechanism of the state machine under different scenarios.
[0060] The user inserts the discharge gun into the vehicle's AC outlet, and the microcontroller detects a valid connection signal. At this point, the system first determines if there are any serious faults affecting discharge, including unrecoverable Category I faults such as hardware overcurrent, insulation damage, or high-voltage interlock disconnection. After confirming the absence of such faults, the charger switches from standby to ready state. In ready state, the system performs pre-discharge preparations, including closing the main discharge relay, switching the charger's operating mode from charging to discharging, and performing self-checks on the battery's state of charge and high-voltage bus insulation resistance. The goal of this stage is to establish a safe and reliable hardware and software foundation for subsequent energy output.
[0061] The safety detection results in the ready state directly determine the jump direction. The system simultaneously evaluates three conditions: whether the charger has successfully entered the discharge working mode, whether the battery's state of charge (SOC) value is higher than the first preset threshold, and whether there are any fault indicators. Only when all three conditions are met—discharge mode confirmed to be effective, SOC value greater than 20%, and no faults—will the system control the charger to switch from the ready state to the discharge state and officially start supplying power. If any condition is not met, such as SOC value below the threshold, entering the discharge state is prohibited, effectively avoiding safety risks caused by starting with faulty or abnormal components.
[0062] During discharge, the system continuously monitors its operating status. When a recoverable Type II fault occurs, such as a momentary communication interruption or short-term temperature fluctuation, the system switches the charger from discharge to a pause state. In the pause state, the high-voltage circuit remains connected, the inverter output stops, and the system waits for the fault to resolve itself or for user intervention. If the fault resolves within a set time limit and the state of charge (SOC) value remains above the safety threshold, the system returns to discharge mode from the pause state and resumes normal power supply, avoiding unnecessary complete shutdown.
[0063] When the state of charge (SBC) value drops to the preset termination threshold or the user actively issues a stop command via the central control screen, the system determines that the normal termination conditions are met. At this time, the charger performs a smooth decline in discharge power, and after the power drops to zero, it switches to the termination state, shuts down the discharge mode, and disconnects the high-voltage circuit to ensure stable power supply to the load side before exiting to prevent equipment damage. If an irreversible serious fault is detected in any state, the system directly jumps to the fault state, and the flag can only be cleared by unplugging the charger or restarting; re-entry into discharge is no longer allowed.
[0064] Furthermore, unplugging the charger constitutes the highest priority forced exit condition. Regardless of whether the charger is currently in a ready, discharging, or paused state, once the connection signal disappears, the system immediately cuts off the high-voltage output and returns to standby, achieving hardware-level protection for safe exit upon unplugging the charger, thus physically eliminating the risk of electric shock and short circuit.
[0065] As can be seen from the above embodiments, this technical solution constructs a multi-state hierarchical control architecture encompassing standby, preparation, discharge, pause, fault, and termination. Combined with multiple interlocking judgments based on battery state-of-charge thresholds, hardware connection status, and fault levels, it performs safety checks before discharge initiation to prevent operation with defects. During discharge, it executes differentiated pause or termination actions based on changes in battery charge and fault type. Furthermore, it responds to the gun-pulling signal in any state to instantly cut off the high-voltage circuit, thus covering all scenarios including normal discharge, low-battery protection, recoverable and unrecoverable fault termination, user-initiated stop, and emergency exit. This completely eliminates the risks of state freezing and erroneous transitions. Simultaneously, the state machine adopts a standardized design, with clear and independent entry and exit conditions for each state. This facilitates software iteration and fault tracing, and seamlessly integrates with existing charging control logic, reducing the difficulty of vehicle integration. Mechanisms such as automatic return to discharge state after fault recovery and smooth termination at low battery levels avoid the impact of abrupt power cuts on the load and equipment, significantly improving user convenience while ensuring safety.
[0066] Please refer to Figure 3 , Figure 3 This is a schematic diagram of a multi-state discharge control device for a bidirectional on-board charger.
[0067] This embodiment also provides a bidirectional on-board charger multi-state discharge control device, including: The first switching module 201 is used to control the on-board charger, which is in standby mode, to switch from standby mode to ready mode when a discharge gun connection signal of the on-board charger is detected.
[0068] The second switching module 202 is used to perform a safety test on the on-board charger in the ready state. If the safety test result is qualified, the on-board charger is controlled to switch from the ready state to the discharging state. If the safety test result is unqualified, the on-board charger is controlled to switch from the ready state to the fault state.
[0069] The power supply module 203 is used to respond to the start discharge command, control the on-board charger in the discharge state to convert the DC power of the power battery into AC power and then supply it to the outside, and monitor the state of charge value of the power battery.
[0070] The third switching module 204 is used to control the on-board charger to switch from the discharging state to the paused state if the battery state of charge value is lower than a preset threshold.
[0071] The fourth switching module 205 is used to control the on-board charger to switch from the paused state to the terminated state when the on-board charger in the paused state receives a stop discharge command, so that the on-board charger in the terminated state stops supplying power to the outside.
[0072] It is understood that the specific implementation methods and technical effects of this embodiment can be referred to the specific implementation methods and technical effects of the bidirectional on-board charger multi-state discharge control method of any of the above embodiments.
[0073] This invention also provides a vehicle control device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the bidirectional on-board charger multi-state discharge control method of the above embodiments.
[0074] Taking the example of a processor and memory in a vehicle controller being connected via a bus, the memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the control processor, and these remote memories can be connected to the control device via a network. The non-transitory software programs and instructions required to implement the control methods of the above embodiments are stored in the memory, and when executed by the processor, the control methods of the above embodiments are performed.
[0075] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0076] This invention also provides a vehicle, including the vehicle control device described in the above embodiments.
[0077] The vehicle can be a private car, such as a sedan, SUV, MPV, or pickup truck. It can also be a commercial vehicle, such as a van, bus, small truck, or large semi-trailer. The vehicle must have an electric motor capable of outputting power or acting as a generator to store mechanical energy. When the vehicle is a new energy vehicle, it can be a hybrid or a pure electric vehicle.
[0078] Since the vehicle applies all the technical solutions of the above-mentioned control device or vehicle controller, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0079] Furthermore, one embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions for performing the above-described bidirectional on-board charger multi-state discharge control method.
[0080] It is worth noting that, since the computer-readable storage medium of the present invention can execute the bidirectional on-board charger multi-state discharge control method of any of the above embodiments, the specific implementation and technical effects of the computer-readable storage medium of the present invention can be referred to the specific implementation and technical effects of the bidirectional on-board charger multi-state discharge control method of any of the above embodiments.
[0081] Furthermore, one embodiment of the present invention also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the computer device to perform the above-described bidirectional on-board charger multi-state discharge control method.
[0082] It is worth noting that, since the computer program product of this embodiment can execute the bidirectional on-board charger multi-state discharge control method of any of the above embodiments, the specific implementation method and technical effects of the computer program product of this embodiment can be referred to the specific implementation method and technical effects of the bidirectional on-board charger multi-state discharge control method of any of the above embodiments.
[0083] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0084] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
Claims
1. A multi-state discharge control method for a bidirectional on-board charger, characterized in that, The method includes: When a discharge gun connection signal of the on-board charger is detected, the on-board charger, which is in standby mode, is controlled to switch from standby mode to ready mode. A safety test is performed on the on-board charger in the prepared state. If the safety test result is qualified, the on-board charger is controlled to switch from the prepared state to the discharging state. If the safety test result is unqualified, the on-board charger is controlled to switch from the prepared state to the fault state. In response to the start discharge command, the on-board charger in the discharge state is controlled to convert the DC power of the power battery into AC power and then supply it to the outside, and the state of charge value of the power battery is monitored. If the battery state of charge value is lower than a preset threshold, the on-board charger is controlled to switch from the discharging state to the paused state. When the on-board charger in the paused state receives a stop discharge command, it controls the on-board charger to switch from the paused state to the terminated state, so that the on-board charger in the terminated state stops supplying power to the outside world.
2. The method according to claim 1, characterized in that, The method further includes: If an unrecoverable Type I fault is detected in the on-board charger that is in the preparation state, the discharge state, or the paused state, the on-board charger is controlled to switch from the current state to the fault state. If a recoverable Type II fault is detected in the on-board charger in the discharge state, the on-board charger is controlled to switch from the discharge state to the paused state.
3. The method according to claim 2, characterized in that, The step of controlling the on-board charger to switch from the discharging state to the paused state if the battery state value is lower than a preset threshold includes: If the battery state of charge value is lower than the first preset threshold, the on-board charger is controlled to switch from the discharge state to the warning state and a prompt message to stop discharging is issued. If the on-board charger is in the warning state and the battery state of charge value is lower than the second preset threshold, then the on-board charger is controlled to be in the pause state, wherein the second preset threshold is less than the first preset threshold.
4. The method according to claim 3, characterized in that, The step of performing a safety test on the on-board charger in the preparation state, and controlling the on-board charger to switch from the preparation state to the discharging state if the safety test result is qualified, and controlling the on-board charger to switch from the preparation state to the fault state if the safety test result is unqualified, includes: A safety test is performed on the on-board charger in the prepared state, wherein the test items include the battery state of charge value and the fault type of the on-board charger. If the fault type is detected to be the first type of fault, then control the on-board charger to switch from the ready state to the fault state; If the fault type is detected as the second type of fault or the battery state of charge value is lower than the first preset threshold, the on-board charger is controlled to switch from the ready state to the paused state. If the battery state of charge value is detected to be lower than the second preset threshold, the on-board charger is controlled to switch from the ready state to the terminated state. If no fault is detected in the on-board charger and the battery state of charge value is higher than the first preset threshold, the on-board charger is controlled to switch from the ready state to the discharging state.
5. The method according to claim 1, characterized in that, The on-board charger includes multiple discharge modes. The on-board charger supplies power to the outside according to the discharge power corresponding to each discharge mode. The discharge modes are sorted in descending order of their corresponding discharge power. When the on-board charger in the paused state receives a stop discharging command, the system controls the on-board charger to switch from the paused state to the terminated state, so that the on-board charger in the terminated state stops supplying power to the outside world, including: When the on-board charger, which is in the paused state, receives a stop discharge command, it determines the current discharge mode; In response to a stop discharge command, the current discharge mode is switched to the next discharge mode in the sorting order until the discharge power corresponding to the current discharge mode is reduced to zero. When the discharge power is zero, the on-board charger is controlled to switch from the paused state to the terminated state, so that the on-board charger in the terminated state stops supplying power to the outside.
6. The method according to claim 5, characterized in that, The on-board charger can discharge in either high-voltage discharge mode or normal discharge mode. When the on-board charger is in the discharge state or the pause state and receives a stop discharge command, if the current discharge mode is normal discharge mode, the on-board charger is controlled to switch from the current state to the terminated state; if the current discharge mode is high voltage discharge mode, a prompt message to switch to normal discharge mode is issued. When the on-board charger is in the discharge state or the pause state and the battery state of charge is lower than the preset threshold, if the current discharge mode is normal discharge mode, the on-board charger is controlled to switch from the current state to the terminated state; if the current discharge mode is high voltage discharge mode, the current discharge mode is switched to normal discharge mode.
7. The method according to claim 1, characterized in that, The method further includes: When no discharge gun connection signal is detected, the on-board charger is controlled to stop supplying power to the outside world and to enter the standby state.
8. A multi-state discharge control device for a bidirectional on-board charger, characterized in that, The device includes: The first switching module is used to control the on-board charger, which is in standby mode, to switch from standby mode to ready mode when a discharge gun connection signal of the on-board charger is detected. The second switching module is used to perform a safety test on the on-board charger in the preparation state. If the safety test result is qualified, the on-board charger is controlled to switch from the preparation state to the discharge state. If the safety test result is unqualified, the on-board charger is controlled to switch from the preparation state to the fault state. The power supply module is used to respond to the start discharge command, control the on-board charger in the discharge state to convert the DC power of the power battery into AC power and then supply it to the outside, and monitor the state of charge value of the power battery. The third switching module is used to control the on-board charger to switch from the discharging state to the paused state if the battery state of charge value is lower than a preset threshold. The fourth switching module is used to control the on-board charger in the paused state to switch from the paused state to the terminated state when the on-board charger in the paused state receives a stop discharge command, so that the on-board charger in the terminated state stops supplying power to the outside.
9. A vehicle, characterized in that, The vehicle includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the bidirectional on-board charger multi-state discharge control method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the multi-state discharge control method for the bidirectional on-board charger as described in any one of claims 1 to 7.