A multi-mode switched vehicle-mounted V2G charging and discharging system control method and system

By combining a hierarchical state machine architecture with PID/MPC algorithms, the power surge and reliability issues of V2G systems during mode switching are solved, enabling safe, smooth, and fast multi-mode switching and improving system stability and grid interactivity.

CN122211241APending Publication Date: 2026-06-16NORTHEAST DIANLI UNIVERSITY +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHEAST DIANLI UNIVERSITY
Filing Date
2026-04-17
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing V2G systems are prone to power surges during mode switching, lack dynamic adaptive capabilities, have insufficient reliability and grid interaction, and lack security and smoothness, making it difficult to meet the high standards required by smart grids.

Method used

A hierarchical progressive switching strategy and closed-loop feedback mechanism are adopted. Mode determination is performed through a hierarchical state machine architecture. Combined with PID non-disruptive switching algorithm and model predictive control (MPC) algorithm, smooth power transition and fast tracking are achieved. Control loop parameters are dynamically adjusted to ensure safe and reliable multi-mode switching.

Benefits of technology

It effectively suppresses current surges and voltage fluctuations, ensures system stability, maximizes energy utilization efficiency, and quickly adapts to changes in grid and battery status, achieving safe and reliable energy flow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122211241A_ABST
    Figure CN122211241A_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-mode switching's vehicle-mounted V2G charge-discharge system control method and system, belong to intelligent charge-discharge technical field, include: after vehicle interface physical connection, two-way authentication is carried out by power line carrier communication, real-time acquisition power grid state, battery state and user instruction;Based on layered state machine architecture, charge-discharge mode determination is carried out;When target mode is inconsistent with current mode, according to layered progressive switching strategy, first adjust power to transition safety power point with preset ramp rate, then execute mode switching, complete after tracking new set value according to optimized power curve;Real-time monitoring operating state simultaneously, return to re-determination when abnormal.This application uses PID undisturbed switching algorithm and integral separation strategy to realize power smooth transition, combined with model predictive control optimized power tracking, and synchronously updates control loop parameter, effectively suppresses mode switching impact, realizes seamless switching and stable operation between V2G system multiple modes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent charging and discharging technology, and more specifically to a control method and system for a multi-mode switching vehicle-mounted V2G charging and discharging system. Background Technology

[0002] With the rapid development of the electric vehicle industry and the deepening of smart grid construction, V2G (Vehicle-to-Grid) technology, as a key bridge connecting the transportation network and the power grid, has received widespread attention. In V2G technology, electric vehicles not only charge the grid as electrical loads (G2V, Grid-to-Vehicle mode), but can also feed power back to the grid as distributed energy storage units when idle (V2G mode), thus achieving bidirectional energy interaction. This is of great significance for peak shaving and valley filling of the power grid, smoothing out renewable energy fluctuations, and improving the stability and reliability of the power system. Furthermore, with the expansion of application scenarios, V2G systems also need to support various operating modes such as vehicle-to-load (V2L).

[0003] The core of achieving these multiple functions lies in the on-board charging and discharging system's ability to safely, smoothly, and rapidly switch between different operating modes based on grid demand, vehicle status, and user commands. However, existing technologies still face numerous technical challenges in practical applications. First, during the dynamic process of mode switching, sudden changes in power flow can easily generate current spikes and voltage fluctuations, forming power surges. This can not only damage power electronic devices but also adversely affect the lifespan of electric vehicle batteries. For example, when the system switches from G2V charging mode to V2G discharging mode, improper control can cause instantaneous large current surges that significantly impact grid power quality and equipment safety.

[0004] Secondly, most existing control methods lack dynamic adaptive capabilities and reliable interaction mechanisms. On the one hand, at the initial stage of vehicle-grid connection, there is often a lack of strict two-way authentication process, making it difficult to ensure the confidentiality and security of communication and data transmission. This poses a risk of unauthorized intrusion or command tampering, posing a threat to the safety of the power grid and the vehicle. On the other hand, traditional control strategies are mostly open-loop or simple closed-loop control. When faced with sudden disturbances in grid parameters (such as voltage spikes or frequency fluctuations) or real-time changes in vehicle battery status (such as excessively high / low SOC), the system struggles to adjust the control strategy in a timely manner to make an optimal response, resulting in a rigid mode switching process and even system instability.

[0005] Furthermore, existing multi-mode switching schemes still need improvement in terms of switching smoothness and response speed. While some studies have proposed the concept of seamless switching, their switching strategies are typically quite simple, such as directly issuing command jumps, lacking a layered, progressive transition mechanism. This makes it difficult for the system to effectively balance speed and stability during switching, failing to suppress transient oscillations while tracking new power setpoints, resulting in insufficient grid interactivity and failing to meet the high standards of flexibility and reliability required by smart grids.

[0006] Therefore, how to provide a safe, reliable, smooth, stable, and responsive multi-mode dynamic switching control method and system is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0007] In view of this, the present invention provides a control method and system for a multi-mode switching vehicle-mounted V2G charging and discharging system. Through a hierarchical and progressive switching strategy and a closed-loop feedback mechanism, it solves the technical problems of traditional V2G systems that are prone to power surges, lack of dynamic adaptive capability, and insufficient reliability and grid interaction during mode switching, thereby realizing efficient, safe, flexible and bidirectional energy flow between vehicles and the grid.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: On one hand, the present invention provides a control method for a multi-mode switching vehicle-mounted V2G charging and discharging system, comprising: When the vehicle interface is physically connected to the power grid interface, the vehicle control unit performs bidirectional authentication with the power grid-side energy management system through power line carrier communication, and obtains power grid status information, vehicle battery status information and user interaction commands in real time. Based on the acquired power grid status information, vehicle battery status information, and user interaction commands, a hierarchical state machine architecture is used to determine the charging and discharging mode and identify the target charging and discharging mode. According to the target working mode, a corresponding mode switching command is generated. When the target charging and discharging mode is inconsistent with the current charging and discharging mode, the current power is first adjusted to the transitional safe power point with a preset ramp rate according to the layered progressive switching strategy, and then the mode switching command is executed. After the switching is completed, the new power setting value is gradually tracked according to the optimized power curve. The system monitors the charging and discharging operation status and changes in the vehicle battery status in real time. If a sudden change in the power grid operating parameters is detected, the vehicle battery status is abnormal, or a new mode switching command is received, the system returns to re-determine the charging and discharging mode.

[0009] Preferably, based on the acquired power grid status information, vehicle battery status information, and user interaction commands, a hierarchical state machine architecture is used to determine the charging and discharging mode and identify the target charging and discharging mode, specifically including: A hierarchical state machine architecture is constructed, comprising a top-level decision layer, a middle-level mode layer, and a bottom-level execution layer. The top-level decision layer corresponds to a system-level state machine, used to determine the current system state based on the vehicle interface physical connection status, system self-test status, and fault flags, and to perform priority determination and global state control. The middle-level mode layer corresponds to a mode-level state machine, used to determine the target charging / discharging mode from a candidate mode set based on grid status information, vehicle battery status information, and user interaction commands when the system is in operation. The bottom-level execution layer corresponds to a switching-level state machine, used to generate a switching trigger signal based on the consistency between the current charging / discharging mode and the target charging / discharging mode, coordinate power smooth transition control, and perform parameter threshold verification and execution condition matching for mode determination. The top-level decision-making body prioritizes grid status information, vehicle battery status information, and user interaction commands. The middle-level mode layer is based on the priority determination result of the top-level decision layer. It adopts a combination of finite state machine and decision tree to calculate the priority score of each candidate mode according to the grid dispatch requirements, battery state of charge and battery health status, and selects the mode with the highest score as the initial candidate charging and discharging mode. The underlying execution layer performs parameter threshold verification and hardware execution condition matching on the initial screening candidate charge and discharge modes. It verifies whether the grid operation parameters and battery status parameters meet the operation threshold requirements of the initial screening candidate charge and discharge modes, and confirms whether the hardware status of the charge and discharge execution module supports the switching and operation of the initial screening candidate charge and discharge modes. After the candidate charging / discharging mode passes the verification at the bottom execution layer, it is determined as the target charging / discharging mode. If the verification fails, the top decision layer initiates the downgrade judgment logic, re-matches the target charging / discharging mode that meets the operating conditions, and updates the target charging / discharging mode.

[0010] Preferably, the layered progressive switching strategy first adjusts the current power to a transitional safe power point with a preset ramp rate, then executes the mode switching command. After the switching is completed, the new power setting value is gradually tracked according to the optimized power curve, specifically including: The first stage of power ramping: The PID non-disruptive switching algorithm is adopted. The target power setpoint is made equal to the current actual power by real-time tracking of the setpoint. During the switching process, the integral separation strategy is adopted to suspend the integral action and adjust the power to the transition safe power point with the adaptive ramp rate. Second-stage mode switching: When the power reaches the transitional safe power point and is maintained for a preset time T1, the mode switching command is executed, and the control loop parameters are updated synchronously. The third stage of power point tracking: After the switch is completed, the model predictive control (MPC) algorithm is used to predict the future multi-step state based on the battery equivalent circuit model. The optimal power adjustment sequence is solved by rolling optimization, and the new power setpoint is tracked according to the optimized power curve.

[0011] Preferably, a PID-based bumpless switching algorithm is used. The target power setpoint is tracked in real time to ensure it equals the current actual power. During switching, an integral separation strategy is employed to pause the integral action, and the power is adjusted to a safe transition power point using an adaptive ramp rate. Specific steps include: When the target charging / discharging mode is detected to be inconsistent with the current charging / discharging mode, the target power setpoint P is set. r Real-time tracking of current actual power P n Ensure that the power deviation e(k) = P at the moment of switching. r (k)-P n (k) approaches zero; During power adjustment, when the instantaneous power deviation exceeds the preset separation threshold, the integral action of the PID controller is paused and the integral coefficient is set to zero; when the instantaneous power deviation is less than or equal to the preset separation threshold, the integral action is resumed and the integral coefficient is restored to the original design value. The adaptive ramp rate is dynamically calculated based on the real-time short-circuit capacity of the power grid, the current state of charge (S) of the battery, and the battery health state (SOH). An S-shaped curve is used to smoothly plan the power adjustment process; Determine the transitional safe power point based on the current power flow direction and target mode; With the power setpoint planned using an S-shaped curve as the target, a PI regulator is used for closed-loop power control.

[0012] Preferably, a Model Predictive Control (MPC) algorithm is used. Based on the battery equivalent circuit model, the algorithm predicts the future multi-step states, solves the optimal power adjustment sequence through rolling optimization, and tracks the new power setpoint according to the optimized power curve. Specifically, this includes: Establish a first-order RC equivalent circuit model for the battery, with the following state-space equations:

[0013] Where Δt is the sampling period, Q n For rated capacity, U ocv R is the open-circuit voltage, R0 is the internal resistance in ohms, and R p U is the polarization resistance, τ is the polarization time constant, and U is the polarization resistance. p U is the polarization voltage. t Terminal voltage; Set the prediction time domain N p Control time domain N c Within each control cycle, based on the current state measurements, predict the battery state trajectory in the time domain and solve for the objective function:

[0014] The constraints include:

[0015] Where λ is the smoothing coefficient; After obtaining the optimal current sequence, the current command for the first control cycle is executed only. In the next cycle, the state is remeasured and the optimization is rolled over, and the new power setpoint is tracked according to the optimized power curve.

[0016] Preferably, the synchronous update of control loop parameters during the second-stage mode switching includes: When the charging / discharging direction changes, reset the synchronous rotation angle θ of the Parker transformation; The bandwidth parameters of the phase-locked loop (PLL) are dynamically adjusted according to the power level of the target mode. Update the current loop feedforward compensation based on the new power setting; When the charging and discharging direction changes, the polarity of the PWM modulation strategy is switched synchronously. The rectification mode adopts grid voltage orientation, and the inverter mode adopts current orientation.

[0017] On the other hand, the present invention provides a multi-mode switching vehicle-mounted V2G charging and discharging system control system, including: vehicle-mounted control unit, grid-side energy management system, power line carrier communication module, multi-source status acquisition module, charging and discharging execution module and closed-loop feedback monitoring module; The power line carrier communication module is bidirectionally connected to the vehicle control unit and the grid-side energy management system, respectively, and is used to realize bidirectional authentication and data encryption transmission between the vehicle control unit and the grid-side energy management system. The multi-source status acquisition module is connected to the vehicle control unit and is used to collect power grid status information, vehicle battery status information and user interaction commands, and transmit the collected information to the vehicle control unit in real time. The vehicle control unit is used to determine the charging and discharging mode based on the acquired power grid status information, vehicle battery status information and user interaction commands, using a hierarchical state machine architecture, to determine the target charging and discharging mode, and generate corresponding mode switching commands according to the target operating mode. When the target charging and discharging mode is inconsistent with the current charging and discharging mode, the current power is first adjusted to the transitional safe power point with a preset ramp rate according to the hierarchical progressive switching strategy, and then the mode switching command is executed. After the switching is completed, the new power setting value is gradually tracked according to the optimized power curve. The charging and discharging execution module is connected to the vehicle control unit and is used to receive mode switching commands and power adjustment commands from the vehicle control unit, and to perform physical switching of charging and discharging modes, power ramp adjustment and power tracking. The closed-loop feedback monitoring module is connected to the vehicle control unit, the charging and discharging execution module, and the vehicle battery management system. If a sudden change in the power grid operating parameters, an abnormal vehicle battery status, or a new mode switching command is detected, the module will return to re-determine the charging and discharging mode.

[0018] As can be seen from the above technical solutions, compared with the prior art, this invention discloses a multi-mode switching vehicle-mounted V2G charging and discharging system control method and system. It adopts a hierarchical progressive switching strategy, using a PID non-disruptive switching algorithm and an integral separation strategy. First, the power is adjusted to a transitional safe power point with an adaptive ramp rate before switching, effectively suppressing current surges and voltage fluctuations, avoiding stress damage to power devices and the risk of battery thermal runaway. After switching, the MPC algorithm is used to continuously optimize power tracking, balancing speed and battery safety constraints. Furthermore, based on a hierarchical state machine architecture, priority is determined by integrating grid status, battery SOC / SOH, and user requirements. A finite state machine and decision tree are used to intelligently select the optimal mode, and parameter threshold verification and degradation logic ensure executability, maximizing energy utilization efficiency while ensuring safety. Simultaneously, control loop parameters are updated synchronously during mode switching, dynamically adjusting the phase-locked loop bandwidth, PWM modulation strategy, and current loop compensation to quickly adapt to changes in charging and discharging direction and power level. Combined with real-time full-state monitoring and a closed-loop re-determination mechanism, it responds promptly to grid changes and battery anomalies, ensuring continuous and stable operation under complex conditions. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the process provided by the present invention.

[0021] Figure 2 This is a schematic diagram of the structure provided by the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] This invention discloses a control method for a multi-mode switching vehicle-mounted V2G charging and discharging system, such as... Figure 1 As shown, it includes: When the vehicle interface is physically connected to the power grid interface, the vehicle control unit performs bidirectional authentication with the power grid-side energy management system through power line carrier communication, and obtains power grid status information, vehicle battery status information and user interaction commands in real time. Based on the acquired power grid status information, vehicle battery status information, and user interaction commands, a hierarchical state machine architecture is used to determine the charging and discharging mode and identify the target charging and discharging mode. The corresponding mode switching command is generated according to the target working mode. When the target charging and discharging mode is inconsistent with the current charging and discharging mode, the current power is first adjusted to the transitional safe power point with a preset ramp rate according to the layered progressive switching strategy, and then the mode switching command is executed. After the switching is completed, the new power setting value is gradually tracked according to the optimized power curve. The system monitors the charging and discharging operation status and changes in the vehicle battery status in real time. If a sudden change in the power grid operating parameters is detected, the vehicle battery status is abnormal, or a new mode switching command is received, the system returns to re-determine the charging and discharging mode.

[0024] Furthermore, based on the acquired power grid status information, vehicle battery status information, and user interaction commands, a hierarchical state machine architecture is used to determine the charging and discharging mode and identify the target charging and discharging mode, specifically including: A hierarchical state machine architecture is constructed, comprising a top-level decision layer, a middle-level mode layer, and a bottom-level execution layer. The top-level decision layer corresponds to the system-level state machine, used to determine the current system state based on the vehicle interface physical connection status, system self-test status, and fault flags. The current state includes standby, connected, or running states, and performs priority determination and global state control. The middle-level mode layer corresponds to the mode-level state machine, used to determine the target charging / discharging mode from a candidate mode set when the system is in the running state, based on grid status information, vehicle battery status information, and user interaction commands. The bottom-level execution layer corresponds to the switching-level state machine, used to generate a switching trigger signal based on the consistency between the current and target charging / discharging modes, coordinate smooth power transition control, and perform parameter threshold verification and execution condition matching for mode determination. The top-level decision-making layer prioritizes grid status information, vehicle battery status information, and user interaction commands. Among them, grid safety parameters have a higher priority than vehicle battery protection parameters, and vehicle battery protection parameters have a higher priority than user interaction commands. When the change in any information exceeds a preset threshold or a new command is received, the system-level state machine and the mode-level state machine are triggered to update and re-determine the status in sequence. The middle-level mode layer, based on the priority determination results of the top-level decision layer, uses a combination of finite state machine and decision tree to calculate the priority score of each candidate mode according to the grid dispatch requirements, battery state of charge, and battery health status, and selects the mode with the highest score as the initial candidate charging and discharging mode. If there is a mandatory mode in the user interaction command, the target mode is directly locked according to the mandatory mode setting in the user interaction command. If there is no mandatory setting, the priority score of each candidate mode is calculated according to the grid dispatch requirements, battery state of charge, and battery health status to obtain the initial candidate charging and discharging modes. The underlying execution layer performs parameter threshold verification and hardware execution condition matching on the initial screening candidate charge and discharge modes. It verifies whether the grid operation parameters and battery status parameters meet the operation threshold requirements of the initial screening candidate charge and discharge modes, and confirms whether the hardware status of the charge and discharge execution module supports the switching and operation of the initial screening candidate charge and discharge modes. After the candidate charging / discharging mode passes the verification at the bottom execution layer, it is determined as the target charging / discharging mode. If the verification fails, the top decision layer initiates the downgrade judgment logic, re-matches the target charging / discharging mode that meets the operating conditions, and updates the target charging / discharging mode.

[0025] In another embodiment, the current power is first adjusted to a transitional safe power point using a preset ramp rate according to a layered progressive switching strategy, and then the mode switching command is executed. After the switching is completed, the new power setting value is gradually tracked according to the optimized power curve, specifically including: The first stage of power ramping: The PID non-disruptive switching algorithm is adopted. The target power setpoint is made equal to the current actual power by real-time tracking of the setpoint. During the switching process, the integral separation strategy is adopted to suspend the integral action and adjust the power to the transition safe power point with the adaptive ramp rate. Second-stage mode switching: When the power reaches the transitional safe power point and is maintained for a preset time T1, the mode switching command is executed, and the control loop parameters are updated synchronously. The third stage of power point tracking: After the switch is completed, the model predictive control (MPC) algorithm is used to predict the future multi-step state based on the battery equivalent circuit model. The optimal power adjustment sequence is solved by rolling optimization, and the new power setpoint is tracked according to the optimized power curve.

[0026] Furthermore, a PID-based bumpless switching algorithm is adopted to ensure that the target power setpoint equals the current actual power through real-time tracking of the setpoint. During the switching process, an integral separation strategy is used to pause the integral action, and the power is adjusted to the transitional safe power point using an adaptive ramp rate. The specific steps include: When the target charging / discharging mode is detected to be inconsistent with the current charging / discharging mode, the target power setpoint P is set. r Real-time tracking of current actual power P n That is, P r (k)=P n (k-1), ensuring that the power deviation e(k) = P at the moment of switching. r (k)-P n (k) approaches zero; During power adjustment, when the instantaneous power deviation |e(k)| exceeds the preset separation threshold e th At this time, pause the integral action of the PID controller and set the integral coefficient K. I Set to zero, retaining only proportional control to prevent power overshoot due to integral accumulation; when the instantaneous power deviation is less than or equal to the preset separation threshold, i.e., |e(k)|≤e th When the integral action is restored, the integral coefficient K I Restore to the original design values; Based on the real-time short-circuit capacity of the power grid, the current state of charge (S) of the battery, and the battery health state (SOH), the adaptive ramp rate is dynamically calculated using the following formula:

[0027] Among them, R max The maximum allowable ramp rate is determined based on the rated power and heat dissipation capacity of the power conversion module; S sc S represents the short-circuit capacity of the power grid. nom The rated short-circuit capacity is a reference value, usually taken as 10MVA; SOC nom The rated state of charge (SOC) of the battery is 50%. r The state of charge adjustment range is set to 100%; SOH f The health status correction factor is SOH = max(SOH, 0.5), which is forced to be 0.5 when SOH is below 50%. An S-curve is used to smooth the power adjustment process. The formula for the power setpoint changing over time is:

[0028] Among them, P s For the initial power, P t For the transitional safe power point, S(t) is an S-shaped curve function, expressed as:

[0029] Where k is the curve shape coefficient, ranging from 2 to 5, t0 is the time at the midpoint of the curve, and T... r T is the total transition time. r =|P t -Ps| / R; Determine the transitional safe power point P based on the current power flow direction and target mode. t Specifically, when switching from charging mode to discharging mode, P t Take a positive value P s When switching from discharge mode to charge mode, P t Take the negative value -P s When switching between power flows in the same direction, P t Take the median between the current power and the target power; P s The safe power threshold is typically set at 5% to 10% of the rated power. With the power setpoint planned using an S-shaped curve as the target, a PI regulator is used to perform closed-loop control of the power. The control cycle is no more than 100μs. The deviation between the actual power and the power setpoint is monitored in real time, and the PWM duty cycle is dynamically adjusted to ensure that the power smoothly tracks the setpoint curve until the power reaches the transitional safe power point and remains stable for a preset time T1.

[0030] Furthermore, a Model Predictive Control (MPC) algorithm is employed to predict future multi-step states based on a battery equivalent circuit model. The optimal power adjustment sequence is solved through rolling optimization, and the new power setpoint is tracked according to the optimized power curve. Specifically, this includes: Establish a first-order RC equivalent circuit model for the battery, with the following state-space equations:

[0031] Where Δt is the sampling period, Q n For rated capacity, U ocv R is the open-circuit voltage, R0 is the internal resistance in ohms, and R p U is the polarization resistance, τ is the polarization time constant, and U is the polarization resistance. p U is the polarization voltage. t Terminal voltage; Set the prediction time domain N p For 10~20 control cycles, the control time domain N c For 3 to 5 control cycles, within each control cycle, based on the current state measurement values, predict the battery state trajectory in the time domain and solve the optimization objective function:

[0032] The constraints include:

[0033] Wherein, λ is the smoothing coefficient, which balances power tracking accuracy with the rate of change of current; After obtaining the optimal current sequence, the current command for the first control cycle is executed only. In the next cycle, the state is remeasured and the optimization is rolled over to achieve closed-loop feedback correction, suppress model errors and external disturbances, and track the new power setpoint according to the optimized power curve.

[0034] In another embodiment, the Model Predictive Control (MPC) algorithm further includes a fused Virtual Synchronizer (VSG) control strategy: By adding a VSG synchronization term to the objective function of the Model Predictive Control (MPC) algorithm, the modified objective function is as follows:

[0035] Where γ is the synchronization weighting coefficient, ω is the VSG virtual angular frequency, and ω g The angular frequency of the power grid; The motion equation of the VSG rotor is:

[0036] Among them, J vsg For virtual inertia, D vsg P is the virtual damping coefficient. m For mechanical power command, P e For electromagnetic power feedback; The power setting value is automatically adjusted according to the grid frequency deviation to realize the primary frequency regulation function. The droop coefficient Rdroop is 2%~5%, and the frequency regulation dead zone is ±0.03Hz. MPC is responsible for fast power point tracking and constraint management, while VSG provides inertia support and frequency response. The two are coupled through power command, with the MPC outputting P... a As electromagnetic power feedback for the VSG, the P output of the VSG m This serves as a power setting correction for the MPC.

[0037] Specifically, the synchronous update of control loop parameters during the second-stage mode switch includes: When the charging and discharging direction changes, the synchronous rotation angle θ of the Parker transformation is reset so that the synchronous rotation angle is synchronized with the grid voltage vector, thus avoiding current surges caused by sudden changes in coordinate transformation. Based on the power level of the target mode, the bandwidth parameters of the phase-locked loop (PLL) are dynamically adjusted. Low bandwidth is used in high-power mode to enhance stability, while high bandwidth is used in low-power mode to improve response speed. Based on the new power setting, update the current loop feedforward compensation. The compensation calculation formula is as follows: Where Ug is the grid voltage amplitude, shortening the current loop establishment time; When the charging and discharging direction changes, the polarity of the PWM modulation strategy is switched synchronously. The rectification mode adopts grid voltage orientation, and the inverter mode adopts current orientation to ensure that the power factor is close to unity power factor.

[0038] On the other hand, the present invention provides a control system for a multi-mode switching vehicle-mounted V2G charging and discharging system, such as... Figure 2 As shown, it includes: an on-board control unit, a grid-side energy management system, a power line carrier communication module, a multi-source status acquisition module, a charging and discharging execution module, and a closed-loop feedback monitoring module; The power line carrier communication module is bidirectionally connected to the vehicle control unit and the grid-side energy management system, respectively, to enable bidirectional authentication and encrypted data transmission between the vehicle control unit and the grid-side energy management system. The multi-source status acquisition module is connected to the vehicle control unit to collect power grid status information, vehicle battery status information and user interaction commands, and transmits the collected information to the vehicle control unit in real time. The vehicle control unit is used to determine the charging and discharging mode based on the acquired power grid status information, vehicle battery status information and user interaction commands, using a hierarchical state machine architecture. It determines the target charging and discharging mode and generates corresponding mode switching commands according to the target operating mode. When the target charging and discharging mode is inconsistent with the current charging and discharging mode, it first adjusts the current power to the transitional safe power point with a preset ramp rate according to the hierarchical progressive switching strategy, and then executes the mode switching command. After the switching is completed, it gradually tracks the new power setting value according to the optimized power curve. The charging and discharging execution module is connected to the vehicle control unit and is used to receive mode switching commands and power adjustment commands from the vehicle control unit, and to perform physical switching of charging and discharging modes, power ramp adjustment and power tracking. The closed-loop feedback monitoring module is connected to the vehicle control unit, the charging and discharging execution module, and the vehicle battery management system. If a sudden change in the power grid operating parameters, an abnormal vehicle battery status, or a new mode switching command is detected, the module will return to re-determine the charging and discharging mode.

[0039] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0040] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A control method for a multi-mode switching vehicle-mounted V2G charging and discharging system, characterized in that, include: When the vehicle interface is physically connected to the power grid interface, the vehicle control unit performs bidirectional authentication with the power grid-side energy management system through power line carrier communication, and obtains power grid status information, vehicle battery status information and user interaction commands in real time. Based on the acquired power grid status information, vehicle battery status information, and user interaction commands, a hierarchical state machine architecture is used to determine the charging and discharging mode and identify the target charging and discharging mode. According to the target working mode, a corresponding mode switching command is generated. When the target charging and discharging mode is inconsistent with the current charging and discharging mode, the current power is first adjusted to the transitional safe power point with a preset ramp rate according to the layered progressive switching strategy, and then the mode switching command is executed. After the switching is completed, the new power setting value is gradually tracked according to the optimized power curve. The system monitors the charging and discharging operation status and changes in the vehicle battery status in real time. If a sudden change in the power grid operating parameters is detected, the vehicle battery status is abnormal, or a new mode switching command is received, the system returns to re-determine the charging and discharging mode.

2. The control method for a multi-mode switching vehicle-mounted V2G charging and discharging system according to claim 1, characterized in that, Based on the acquired power grid status information, vehicle battery status information, and user interaction commands, a hierarchical state machine architecture is used to determine the charging and discharging mode and identify the target charging and discharging mode, specifically including: A hierarchical state machine architecture is constructed, comprising a top-level decision layer, a middle-level mode layer, and a bottom-level execution layer. The top-level decision layer corresponds to a system-level state machine, used to determine the current system state based on the vehicle interface physical connection status, system self-test status, and fault flags, and to perform priority determination and global state control. The middle-level mode layer corresponds to a mode-level state machine, used to determine the target charging / discharging mode from a candidate mode set based on grid status information, vehicle battery status information, and user interaction commands when the system is in operation. The bottom-level execution layer corresponds to a switching-level state machine, used to generate a switching trigger signal based on the consistency between the current charging / discharging mode and the target charging / discharging mode, coordinate power smooth transition control, and perform parameter threshold verification and execution condition matching for mode determination. The top-level decision-making body prioritizes grid status information, vehicle battery status information, and user interaction commands. The middle-level mode layer is based on the priority determination result of the top-level decision layer. It adopts a combination of finite state machine and decision tree to calculate the priority score of each candidate mode according to the grid dispatch requirements, battery state of charge and battery health status, and selects the mode with the highest score as the initial candidate charging and discharging mode. The underlying execution layer performs parameter threshold verification and hardware execution condition matching on the initial screening candidate charge and discharge modes. It verifies whether the grid operation parameters and battery status parameters meet the operation threshold requirements of the initial screening candidate charge and discharge modes, and confirms whether the hardware status of the charge and discharge execution module supports the switching and operation of the initial screening candidate charge and discharge modes. After the candidate charging / discharging mode passes the verification at the bottom execution layer, it is determined as the target charging / discharging mode. If the verification fails, the top decision layer initiates the downgrade judgment logic, re-matches the target charging / discharging mode that meets the operating conditions, and updates the target charging / discharging mode.

3. The control method for a multi-mode switching vehicle-mounted V2G charging and discharging system according to claim 1, characterized in that, The layered, progressive switching strategy first adjusts the current power to a safe transition power point using a preset ramp rate, then executes the mode switching command. After the switching is complete, the new power setting is gradually tracked according to the optimized power curve, specifically including: The first stage of power ramping: The PID non-disruptive switching algorithm is adopted. The target power setpoint is made equal to the current actual power by real-time tracking of the setpoint. During the switching process, the integral separation strategy is adopted to suspend the integral action and adjust the power to the transition safe power point with the adaptive ramp rate. Second-stage mode switching: When the power reaches the transitional safe power point and is maintained for a preset time T1, the mode switching command is executed, and the control loop parameters are updated synchronously. The third stage of power point tracking: After the switch is completed, the model predictive control (MPC) algorithm is used to predict the future multi-step state based on the battery equivalent circuit model. The optimal power adjustment sequence is solved by rolling optimization, and the new power setpoint is tracked according to the optimized power curve.

4. The control method for a multi-mode switching vehicle-mounted V2G charging and discharging system according to claim 3, characterized in that, The PID-based bumpless switching algorithm is employed to track the setpoint in real time, ensuring that the target power setpoint equals the current actual power. During the switching process, an integral separation strategy is used to pause the integral action, and the power is adjusted to the transitional safe power point using an adaptive ramp rate. The specific steps include: When the target charging / discharging mode is detected to be inconsistent with the current charging / discharging mode, the target power setpoint P is set. r Real-time tracking of current actual power P n Ensure that the power deviation e(k) = P at the moment of switching. r (k)-P n (k) approaches zero; During power adjustment, when the instantaneous power deviation exceeds the preset separation threshold, the integral action of the PID controller is paused and the integral coefficient is set to zero; when the instantaneous power deviation is less than or equal to the preset separation threshold, the integral action is resumed and the integral coefficient is restored to the original design value. The adaptive ramp rate is dynamically calculated based on the real-time short-circuit capacity of the power grid, the current state of charge (S) of the battery, and the state of health (SOH) of the battery. An S-shaped curve is used to smoothly plan the power adjustment process; Determine the transitional safe power point based on the current power flow direction and target mode; With the power setpoint planned using an S-shaped curve as the target, a PI regulator is used for closed-loop power control.

5. The control method for a multi-mode switching vehicle-mounted V2G charging and discharging system according to claim 3, characterized in that, The Model Predictive Control (MPC) algorithm is employed, which predicts future multi-step states based on the battery equivalent circuit model. The optimal power adjustment sequence is solved through rolling optimization, and the new power setpoint is tracked according to the optimized power curve. Specifically, this includes: Establish a first-order RC equivalent circuit model for the battery, with the following state-space equations: Where Δt is the sampling period, Q n For rated capacity, U ocv R is the open-circuit voltage, R0 is the internal resistance in ohms, and R p U is the polarization resistance, τ is the polarization time constant, and U is the polarization resistance. p U is the polarization voltage. t Terminal voltage; Set the prediction time domain N p Control time domain N c Within each control cycle, based on the current state measurements, predict the battery state trajectory in the time domain and solve for the optimization objective function: The constraints include: Where λ is the smoothing coefficient; After obtaining the optimal current sequence, the current command for the first control cycle is executed only. In the next cycle, the state is remeasured and the optimization is rolled over to track the new power setpoint according to the optimized power curve.

6. The control method for a multi-mode switching vehicle-mounted V2G charging and discharging system according to claim 3, characterized in that, The synchronous update of control loop parameters during the second-stage mode switch includes: When the charging / discharging direction changes, reset the synchronous rotation angle θ of the Parker transformation; The bandwidth parameters of the phase-locked loop (PLL) are dynamically adjusted according to the power level of the target mode. Update the current loop feedforward compensation based on the new power setting; When the charging and discharging direction changes, the polarity of the PWM modulation strategy is switched synchronously. The rectification mode adopts grid voltage orientation, and the inverter mode adopts current orientation.

7. A control system for a multi-mode switching vehicle-mounted V2G charging and discharging system, characterized in that, include: Vehicle-mounted control unit, grid-side energy management system, power line carrier communication module, multi-source status acquisition module, charging and discharging execution module and closed-loop feedback monitoring module; The power line carrier communication module is bidirectionally connected to the vehicle control unit and the grid-side energy management system, respectively, and is used to realize bidirectional authentication and data encryption transmission between the vehicle control unit and the grid-side energy management system. The multi-source status acquisition module is connected to the vehicle control unit and is used to collect power grid status information, vehicle battery status information and user interaction commands, and transmit the collected information to the vehicle control unit in real time. The vehicle control unit is used to determine the charging and discharging mode based on the acquired power grid status information, vehicle battery status information and user interaction commands, using a hierarchical state machine architecture, to determine the target charging and discharging mode, and generate corresponding mode switching commands according to the target operating mode. When the target charging and discharging mode is inconsistent with the current charging and discharging mode, the current power is first adjusted to the transitional safe power point with a preset ramp rate according to the hierarchical progressive switching strategy, and then the mode switching command is executed. After the switching is completed, the new power setting value is gradually tracked according to the optimized power curve. The charging and discharging execution module is connected to the vehicle control unit and is used to receive mode switching commands and power adjustment commands from the vehicle control unit, and to perform physical switching of charging and discharging modes, power ramp adjustment and power tracking. The closed-loop feedback monitoring module is connected to the vehicle control unit, the charging and discharging execution module, and the vehicle battery management system. If a sudden change in the power grid operating parameters, an abnormal vehicle battery status, or a new mode switching command is detected, the module will return to re-determine the charging and discharging mode.