A virtual-real residual closed-loop battery energy management method and system

By calibrating the digital twin model using real vehicle data, generating virtual complex operating condition data, and training a deep reinforcement learning strategy, the problem of insufficient coverage and bias in energy management strategies in existing technologies is solved, and stable operation and reliability under complex operating conditions are achieved.

CN123129792APending Publication Date: 2026-11-20CHANGAN UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611306826.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing energy management strategies are unable to cover real-world complex operating conditions. There are discrepancies between digital twin models and actual vehicle operating conditions, and the lack of a continuous closed-loop correction mechanism leads to unstable strategy execution.

Method used

The digital twin model is calibrated using real vehicle data to generate virtual complex operating condition data. A generative adversarial network is generated using traffic flow conditions to construct a virtual-real integrated battery operation extended dataset. A deep reinforcement learning energy management strategy model is trained, and the residuals of the digital twin model and the strategy execution are corrected online after deployment in real vehicles.

Benefits of technology

It improves the policy adaptability and operational reliability under complex traffic flow and edge conditions, reduces the model deviation between virtual data and real vehicles, and ensures the safety and stability of energy management strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123129792A_ABST
    Figure CN123129792A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of new energy automobile battery energy management, and discloses a virtual-real residual error closed loop battery energy management method and system. The method constructs real vehicle associated data set and calibrates a digital twin model to generate virtual complex working condition data; an adversarial network is combined with traffic flow conditions to generate battery dynamic response synthetic data; sample screening, sampling probability and training weight determination are performed according to the credibility of multiple source samples to form a virtual-real fusion battery operation expansion data set and train a deep reinforcement learning energy management strategy model; after real vehicle deployment, online correction is performed based on the residual error of the digital twin model and the strategy execution residual error to form a virtual-real residual error closed loop, and when the residual error exceeds the limit, the preset safe energy management strategy is switched to.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of new energy vehicle battery energy management technology, specifically to a virtual-real residual closed-loop battery energy management method and system. Background Technology

[0002] With the development of pure electric vehicles and intelligent connected vehicles, the vehicle operating environment is gradually shifting from standard cyclic operating conditions to real-world road traffic environments with randomness and time-varying characteristics. Factors such as urban congestion, traffic light waiting, frequent starts and stops, aggressive acceleration and deceleration, changes in road gradient, and changes in ambient temperature can all cause significant fluctuations in vehicle power demand and the voltage, current, temperature, and state of charge of the power battery. Existing energy management strategies, if primarily trained using standard operating conditions or limited real-world vehicle operating data, struggle to fully cover low-frequency edge operating conditions such as high-dynamic traffic flow, extreme temperatures, long-slope energy recovery, and battery aging, thus limiting the operating condition coverage of the training data. Furthermore, collecting data on complex real-world vehicle operating conditions is costly, and some edge scenarios cannot be fully covered through conventional real-world vehicle testing.

[0003] To expand training data, existing technologies can construct virtual samples using digital twins or data-generated models, but using these methods alone still has certain limitations. On the one hand, digital twin models that have not been sufficiently calibrated with real vehicle data are prone to deviations between the model's predicted state and the actual state of the vehicle in complex operating conditions. On the other hand, when simply expanding battery operating data through data-generated models, the generated results may be inconsistent with the corresponding traffic flow conditions, vehicle power requirements, and battery electrothermal patterns. If data from different sources are further directly mixed in a fixed proportion for policy training, low-confidence virtual samples or non-physically synthesized samples may adversely affect the training process.

[0004] Furthermore, even after the energy management strategy is trained offline and deployed to a real vehicle, distribution deviations may still occur between the offline model and the actual vehicle due to continuous changes in the real vehicle operating environment, vehicle status, and battery status. Existing methods lack a continuous feedback mechanism for the prediction bias of the digital twin model and the actual execution bias of the energy management strategy, making it difficult to promptly correct virtual operating condition generation, sample reliability, and strategy execution processes. When model bias or strategy execution bias increases, it is also difficult to promptly stop unreliable online learning processes. Therefore, a closed-loop battery energy management mechanism is needed, encompassing real vehicle data, virtual data, synthetic data, strategy training, and real vehicle feedback. Summary of the Invention

[0005] This application addresses the technical problems in existing technologies, such as insufficient coverage of real complex operating conditions, difficulty in effectively controlling the credibility of virtual and synthetic battery operating data, discrepancies between digital twin models and actual vehicle operating states, and the lack of continuous closed-loop correction and safety rollback mechanisms after the deployment of energy management strategies. It provides a virtual-real residual closed-loop battery energy management method and system.

[0006] To achieve the above objectives, this application adopts the following technical solution: In a first aspect, this application provides a closed-loop battery energy management method based on virtual and real residuals, characterized by comprising the following steps: S1. Obtain real-world vehicle operation data and construct a real-world vehicle-related dataset; S2. Construct a digital twin model, calibrate the digital twin model using the real vehicle association dataset, obtain the calibrated digital twin model, and calculate the residual of the digital twin model; S3. Use the calibrated digital twin model to generate virtual complex working condition data; S4. Train a traffic flow conditional generative adversarial network based on the real vehicle association dataset and the virtual complex working condition data, and generate battery dynamic response synthetic data; S5. Determine the sample credibility of each sample in the real vehicle associated dataset, the virtual complex working condition data and the battery dynamic response synthetic data respectively. Based on the sample credibility and the digital twin model residual, perform sample screening, sample sampling probability and sample training weight determination to form a virtual-real fusion battery operation extended dataset. S6. Train a deep reinforcement learning energy management strategy model based on the virtual-real fusion battery operation expansion dataset and the sample training weights; S7. Deploy the deep reinforcement learning energy management strategy model to the vehicle controller, calculate the digital twin model residual and the strategy execution residual based on the real vehicle feedback data, and make online corrections accordingly to form a virtual-real residual closed loop; when the digital twin model residual or the strategy execution residual exceeds the corresponding preset safety threshold, freeze the online learning parameters and switch to the preset safety energy management strategy.

[0007] Furthermore, the actual vehicle operation data includes traffic flow operation data, vehicle dynamics data, battery operation response data, and vehicle control action data. The actual vehicle operation data is synchronized and resampled according to a unified timestamp. The resampled data is cleaned for anomalies, arranged according to a fixed feature order, and then processed by sliding window slicing, normalization, and tensor quantization to form traffic flow condition tensors, vehicle state tensors, battery response tensors, and control action tensors, in order to construct the actual vehicle associated dataset.

[0008] Furthermore, in step S2, the digital twin model includes a traffic flow scene layer, a vehicle dynamics layer, a battery electrothermal layer, and an interface layer; The traffic flow scenario layer is used to generate or reproduce traffic flow scenarios. The vehicle dynamics layer is used to determine the vehicle's required power, wheel driving force, and motor torque based on traffic flow status and driving needs. The battery heating layer is used to determine the battery terminal voltage, temperature rise, and energy state changes based on battery current, battery temperature, battery state of charge, and battery health status. The interface layer is used to transmit traffic flow conditions, vehicle status, battery response, control actions, and residual information.

[0009] Further, in step S2, the calibration of the digital twin model includes: Under the same traffic flow conditions and the same control actions, obtain the predicted state of the digital twin model and the corresponding real state of the actual vehicle; The digital twin model is calibrated with the goal of ensuring that the deviation between the predicted state and the actual state of the vehicle meets a preset requirement. The residual of the digital twin model is calculated based on the normalized weighted deviation between the predicted state of the calibrated digital twin model and the actual state of the real vehicle.

[0010] Further, in step S3, a target traffic flow condition set is constructed in the calibrated digital twin model, the virtual complex working condition data is generated based on the target traffic flow condition set, and the virtual complex working condition data is processed in the same way as the real vehicle associated dataset using sliding window slicing, normalization and tensor quantization. The virtual complex operating condition data includes one or more of the following: extreme congestion, frequent start-stop, aggressive acceleration and deceleration, long uphill, long downhill energy recovery, high temperature, low temperature, and composite operating condition data under different battery aging levels.

[0011] Furthermore, in step S4, the traffic flow condition generative adversarial network includes a generator and a discriminator; The traffic flow condition tensor, the vehicle state tensor, the control action tensor, the virtual predicted state tensor output by the calibrated digital twin model, and random noise are input into the generator to obtain the battery dynamic response synthetic data. The traffic flow condition generative adversarial network is trained based on adversarial loss, physical consistency loss, virtual-real consistency loss and traffic flow condition label consistency loss. The virtual-real consistency loss is used to constrain the deviation between the synthesized battery dynamic response data and the virtual battery response data output by the calibrated digital twin model under the same traffic flow conditions, vehicle state and control actions.

[0012] Further, in step S5, the sample credibility of each sample in the real vehicle associated dataset is determined based on the sensor data integrity rate, physical boundary anomaly ratio, missing value ratio, noise level, time synchronization error, and physical continuity anomaly ratio between adjacent sampling times. The sample credibility of each sample in the virtual complex working condition data is determined based on the residual of the digital twin model and the proportion of abnormal physical continuity of the virtual samples. The sample credibility of each sample in the battery dynamic response synthetic data is determined based on the output of the discriminator, physical consistency error, virtual-real consistency error, traffic flow condition label consistency error, and the proportion of abnormal physical continuity of the synthetic sample. Based on the sample credibility of each sample in the real vehicle associated dataset, the virtual complex working condition data, and the battery dynamic response synthetic data, the sample is screened, and the sample sampling probability and sample training weight are determined according to the sample credibility of each sample after screening, so as to form the virtual-real fusion battery operation extended dataset.

[0013] Further, in step S6, training samples are obtained from the virtual-real fusion battery operation augmentation dataset according to the sample sampling probability; The current state, current control action, and next state are extracted based on the training samples, and the current reward is determined based on battery energy consumption, battery state of charge, battery temperature, digital twin model residuals, and action changes. The deep reinforcement learning energy management strategy model is trained based on the current state, current control action, current reward, next state, and corresponding sample training weights.

[0014] Further, in step S7, the strategy execution residual is calculated based on the deviation between expected energy consumption and actual energy consumption, the deviation between expected battery state of charge change and actual battery state of charge change, the deviation between expected temperature rise and actual temperature rise, and the deviation between expected action and actual action. When neither the residual of the digital twin model nor the residual of the policy execution exceeds the corresponding preset safety threshold, based on the real vehicle feedback data, the residual of the digital twin model, and the residual of the policy execution, at least one of the following operations is performed: calibrating the digital twin model, adjusting the generation range of the virtual complex working condition data, updating the constraints of the traffic flow condition generative adversarial network, updating the sample credibility, updating the sample training weights, and updating the outer compensation parameters of the deep reinforcement learning energy management policy model, so as to form the virtual-real residual closed loop.

[0015] Secondly, this application provides a virtual-real residual closed-loop battery energy management system, comprising: The real vehicle data acquisition module is used to acquire real vehicle operating data and build a real vehicle-related dataset; The digital twin construction and calibration module is used to construct a digital twin model, calibrate the digital twin model using the real vehicle associated dataset, obtain the calibrated digital twin model, and calculate the residuals of the digital twin model. The virtual complex working condition generation module is used to generate virtual complex working condition data using the calibrated digital twin model. The data augmentation module is used to train a traffic flow conditional generative adversarial network based on the real vehicle associated dataset and the virtual complex working condition data, and to generate synthetic data of battery dynamic response. The credibility evaluation and weight construction module is used to determine the credibility of each sample in the real vehicle associated dataset, the virtual complex working condition data and the battery dynamic response synthetic data respectively. Based on the sample credibility and the digital twin model residual, the module performs sample screening, sample sampling probability and sample training weight determination to form a virtual-real fusion battery operation extended dataset. The strategy training module is used to train a deep reinforcement learning energy management strategy model based on the virtual-real fusion battery running expanded dataset and the sample training weights; An onboard controller is used to deploy the deep reinforcement learning energy management strategy model. The online closed-loop correction module is used to calculate the residuals of the digital twin model and the strategy execution residuals based on real vehicle feedback data, and to make online corrections accordingly to form a virtual-real residual closed loop. When the residuals of the digital twin model or the strategy execution residuals exceed the corresponding preset safety thresholds, the online learning parameters are frozen and the preset safety energy management strategy is switched.

[0016] Compared with the prior art, this application has the following beneficial effects: This application provides a closed-loop battery energy management method based on virtual-real residuals. It calibrates a digital twin model using a real-vehicle associated dataset and supplements virtual complex operating conditions that are difficult to cover with real data using the calibrated digital twin model. Furthermore, it generates synthetic data on battery dynamic responses through a traffic flow conditional generative adversarial network. Then, it evaluates the credibility of samples from different sources, filters them, determines sampling probabilities and training weights, ensuring that the training data for the deep reinforcement learning energy management strategy model is no longer limited to a finite number of real-vehicle samples, and avoids simply mixing data of different credibility levels in a fixed proportion. After deployment, it uses the residuals of the digital twin model and policy execution to perform online correction and safety rollback, thus forming a closed-loop mechanism that runs through the data expansion, policy training, and real-vehicle operation process. This is beneficial for improving the adaptability and operational reliability of the strategy under complex traffic flows and edge conditions.

[0017] Furthermore, by performing unified time synchronization, resampling, anomaly cleaning, fixed feature sorting, sliding window slicing, and tensor quantization on real vehicle operation data from different sources, a temporal correlation between traffic flow conditions, vehicle state, battery response, and control actions can be established. Physical connections between vehicle demand and battery response are established through traffic flow scenario layers, vehicle dynamics layers, and battery electrothermal layers. Normalized weighted bias is used to evaluate the residuals of the digital twin model, reducing the impact of differences in the dimensions and numerical ranges of different states on the model evaluation results. Simultaneously, constraints on physical consistency, virtual-real consistency, and operating condition label consistency can reduce the possibility of non-physical responses or traffic condition mismatches appearing in the synthesized battery dynamic response data.

[0018] Furthermore, by evaluating the sample credibility of real vehicle-related data, virtual complex operating condition data, and battery dynamic response synthetic data respectively, and using the credibility to implement sample screening, sample sampling probability, and sample training weight determination, the impact of low-credibility virtual samples and low-quality synthetic samples on policy learning results can be reduced. After real vehicle deployment, the real vehicle operation information is fed back to the digital twin model calibration, virtual complex operating condition generation range, generation model constraints, sample credibility, sample training weight, and policy outer layer compensation process through the residuals of the digital twin model and policy execution. When the residual exceeds the safety threshold, online learning is frozen and the preset safety energy management strategy is switched, which can balance online adaptability and operational safety. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is the overall flowchart of the virtual-real residual closed-loop battery energy management method of this application; Figure 2 This is a schematic diagram of the digital twin model structure of this application; Figure 3 The flowchart shows the process of credibility evaluation, sample selection, sample training weight construction, and online correction of double residuals for the three types of data samples in this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] Real-world road traffic environments exhibit significant time-varying and random characteristics. A single source of real-vehicle data is insufficient to cover complex operating conditions, including high-dynamic traffic flow, extreme temperatures, long-slope energy recovery, and varying battery aging levels. If energy management strategies are directly trained using limited real-vehicle data, the strategies tend to focus on learning characteristics of routine operating conditions, limiting their adaptability to low-frequency edge conditions. Simply adding data from digital twins or generative models requires further addressing the model discrepancies between virtual data and real-vehicle data, as well as the physical reliability of synthetic samples. Therefore, see [link to relevant documentation]. Figure 1 This application provides a closed-loop battery energy management method based on virtual and real residuals, comprising the following steps: S1. Obtain real-world vehicle operation data and construct a real-world vehicle-related dataset; Specifically, operational data of real vehicles are collected under conditions including congested urban roads, urban expressways, ordinary suburban roads, sloping roads, and mixed road sections. In one embodiment, the real vehicle association dataset includes real vehicle data under normal operating conditions and real edge operating conditions. The real vehicle data under normal operating conditions includes regular driving data under urban roads, urban expressways, ordinary suburban roads, and gentle sloping roads, used to calibrate the basic dynamic response of the digital twin model within the normal driving area; the real edge operating conditions data includes real vehicle data under combined conditions such as high dynamic traffic flow, extreme temperature, long slope energy recovery, frequent start-stop, and battery aging, used to constrain the extrapolation boundaries of the digital twin model and the traffic flow condition generative adversarial network under edge operating conditions. In one embodiment, an edge state constraint range is constructed based on the actual value ranges of traffic flow conditions, vehicle status, battery operating status, and control actions in the real edge operating conditions data; for the virtual complex operating condition data generated by the digital twin model and the battery dynamic response synthetic data generated by the traffic flow condition generative adversarial network, it is determined whether their corresponding states exceed the edge state constraint range. When the generated samples exceed the range of the edge state constraints or deviate from the real edge condition data beyond a preset threshold, constraints are imposed on the edge condition extrapolation of the digital twin model and the traffic flow condition generative adversarial network by one or more of the following methods: limiting the generation range of virtual condition variables, increasing the corresponding physical consistency or virtual-real consistency constraint weights, or reducing the sample credibility of the generated samples. Data sources include one or more of the following: vehicle CAN bus, BMS, motor controller, VCU, GPS, inertial measurement unit, and onboard camera or millimeter-wave radar.

[0023] The actual vehicle operation data includes traffic flow operation data, vehicle dynamics data, battery operation response data, and vehicle control action data.

[0024] The traffic flow operation data includes average vehicle speed, longitudinal acceleration standard deviation, road congestion index, idling time percentage, road gradient, traffic signal waiting time, and distance to the vehicle in front; the vehicle dynamics data includes vehicle speed, vehicle acceleration, power demand, drive motor speed, drive motor torque, and regenerative braking power; the battery operation response data includes battery terminal voltage, battery current, battery temperature, battery state of charge (SOC), battery state of health (SOH), and estimated internal resistance; and the vehicle control action data includes motor torque distribution coefficient, drive power distribution coefficient, and regenerative braking distribution coefficient.

[0025] Data from different sources are aligned using a unified timestamp and resampled to a unified sampling frequency. Data with missing values, outliers, and extra-physical boundary conditions are cleaned and arranged according to a fixed feature order to form a unified time-series matrix. The unified time-series matrix is ​​then sliced ​​using a sliding window method, with a sliding window length of [value missing]. Then the first A window sample can be represented as:

[0026] in, For traffic flow condition tensor, For the vehicle state tensor. For the battery response tensor, To control the action tensor, Traffic flow condition labels, This is a data source label.

[0027] The dimensions of the traffic flow condition tensor, vehicle state tensor, battery response tensor, and control action tensor are as follows:

[0028] in, The length of the sliding window. As a dimension of traffic flow condition characteristics, For vehicle state feature dimension, For battery response feature dimensions, To control the dimension of action features.

[0029] When constructing deep reinforcement learning training samples, the first... In the nth window sample The data for each discrete control moment are organized as follows:

[0030] in, Indicates the first The window sample at the th The state vector at each control moment Indicates the current control action. This represents the current reward value. This represents the state vector at the next control moment. Indicates the credibility training weights. Traffic flow condition labels This indicates the data source label. Here... Represents the state. The two terms, "discrete control time" and "time," have different meanings.

[0031] S2. Construct a digital twin model, calibrate the digital twin model using the real vehicle association dataset, obtain the calibrated digital twin model, and calculate the residual of the digital twin model; Specifically, see Figure 2The digital twin model adopts a traffic flow-vehicle-battery digital twin model, including a traffic flow scenario layer, a vehicle dynamics layer, a battery electrothermal layer, and an interface layer. The traffic flow scenario layer is used to reproduce or generate external conditions such as congestion, start-stop, gradient, temperature, and car-following disturbances; the vehicle dynamics layer is used to calculate vehicle speed, acceleration, power demand, and motor torque; the battery electrothermal layer is used to calculate battery terminal voltage, current, SOC, temperature, and SOH; and the interface layer is used to transfer data between real vehicle data acquisition, data augmentation, strategy training, and online correction.

[0032] The vehicle's traction requirement can be expressed as:

[0033] in, Let t be the vehicle traction requirement at time t. For the overall vehicle quality, For the longitudinal acceleration of the vehicle, It is the acceleration due to gravity. The rolling resistance coefficient, The road slope angle, air density, Where A is the drag coefficient and A is the vehicle's frontal area. For vehicle speed The required power can be expressed as:

[0034] The battery heating layer can be represented by a first-order RC equivalent circuit and a concentrated heat model. The evolution of battery terminal voltage, SOC, and temperature can be expressed as follows:

[0035]

[0036] in, This refers to the battery terminal voltage. This is the open-circuit voltage of the battery corresponding to the current state of charge. Battery current, The internal resistance of the battery is in ohms. This refers to the battery polarization voltage. The efficiency is Coulomb efficiency, and Δt is the sampling time interval. This refers to the battery's rated capacity. For battery temperature, For ambient temperature, (·) represents the temperature change function in the battery thermal model.

[0037] Furthermore, the digital twin model is calibrated using the real-vehicle associated dataset. The parameters to be calibrated include one or more of the following: vehicle rolling resistance coefficient, drag coefficient, vehicle mass, motor efficiency graph, battery open-circuit voltage-SOC mapping relationship, battery ohmic internal resistance, battery polarization parameters, and battery thermal parameters.

[0038] Under identical traffic flow conditions and control actions, the predicted state of the digital twin model and the corresponding actual state of the real vehicle are obtained. The deviation between the predicted state and the actual vehicle state is used as a preset requirement as the calibration target to calibrate the parameters of the digital twin model, thereby obtaining the calibrated digital twin model. This allows subsequent generation of virtual complex operating conditions to be based on a model constrained by real vehicle operating data.

[0039] Let the first The actual vehicle state vector at each sampling time is The predicted state vector output by the digital twin model under the same traffic flow conditions and the same control action input is: , No. The physical upper and lower limits of each state component are respectively and Then the first The residual of the digital twin model at each sampling time point is defined as:

[0040] in, The set of state components participating in the residual calculation of the digital twin model. For the first The residual weights of each state component satisfy:

[0041] Let be the residual of the digital twin model at the t-th sampling time. Let j be the j-th state component in the actual state vector of the vehicle. δ is a very small positive number to prevent the denominator from being zero, used to predict the j-th state component in the state vector of the digital twin model.

[0042] S3. Use the calibrated digital twin model to generate virtual complex working condition data; Specifically, a target traffic flow condition set is constructed in the calibrated digital twin model, and virtual complex operating condition data is generated based on this set. The virtual complex operating conditions include extreme congestion, frequent starts and stops, aggressive acceleration and deceleration, long uphill slopes, long downhill slopes with energy recovery, high temperatures, low temperatures, and composite operating conditions under different battery aging levels. The virtual complex operating condition data is processed using the same sliding window slicing, normalization, and tensor quantization methods as in step S1. This processing ensures that the virtual complex operating condition data maintains a compatible data organization with the real vehicle-related dataset and supplements complex operating areas where real samples are relatively scarce.

[0043] S4. Train a traffic flow conditional generative adversarial network based on the real vehicle association dataset and the virtual complex working condition data, and generate battery dynamic response synthetic data; Specifically, the traffic flow conditional generative adversarial network includes a generator G and a discriminator D, and can also be abbreviated as TcGAN. The generator G takes the traffic flow condition tensor, vehicle state tensor, control action tensor, the virtual predicted state tensor output by the calibrated digital twin model, and random noise as input, and outputs synthesized battery dynamic response data:

[0044] Discriminator D uses the traffic flow condition tensor Vehicle state tensor Control Action Tensor and battery dynamic response tensor For input, output the authenticity judgment result or the source judgment result:

[0045] The generator loss function is defined as:

[0046] in, To combat the losses, For physical consistency loss, For the loss of consistency between virtual and real, For the loss of consistency of traffic flow condition labels, , , These are the weighting coefficients corresponding to physical consistency loss, virtual-physical consistency loss, and traffic flow condition label consistency loss, respectively.

[0047] The physical consistency loss includes the battery terminal voltage consistency term, the SOC evolution consistency term, and the battery temperature evolution consistency term, which can be expressed as:

[0048] in, , , These are the weighting coefficients for the battery terminal voltage consistency term, the SOC evolution consistency term, and the battery temperature evolution consistency term, respectively.

[0049] The battery terminal voltage consistency term is represented as follows:

[0050] in, The battery terminal voltage output by the generator. This represents the mapping relationship between open-circuit voltage and state of charge (SOC). To generate battery current, For ohmic internal resistance, This is the polarization voltage.

[0051] The SOC evolution consistency term is represented as:

[0052] in, and These represent the generated SOC at adjacent sampling times. For Coulomb efficiency, The sampling time interval, This refers to the battery's rated capacity.

[0053] The battery temperature evolution consistency term is represented as:

[0054] in, and These represent the generated battery temperatures at adjacent sampling times. For ambient temperature, This is the temperature change function in the battery thermal model.

[0055] The virtual-real consistency loss is used to constrain the battery dynamic response synthesis data output by the generator. Virtual battery response data output by the digital twin model under the same traffic flow conditions, vehicle states, and control actions. Maintaining consistency can be represented as:

[0056] in, For the loss of consistency between virtual and real, The number of sampling times used in loss calculation. For the generator in the first Synthetic data of battery dynamic response output at each sampling time point This refers to the virtual battery response data output by the digital twin model under the same traffic flow conditions, vehicle states, and control actions. This is a weighting matrix used to adjust the weights of different battery response components in the virtual-real consistency loss. and All of these can include one or more of the following: battery terminal voltage, battery current, battery temperature, SOC, SOH, and internal resistance estimates.

[0057] The traffic flow condition label consistency loss is used to constrain the traffic flow condition label corresponding to the generated sample to be consistent with the input condition label, and can be expressed as:

[0058] in, Let cross-entropy be the loss function. The predicted working condition label output by the discriminator or auxiliary classifier. To input traffic flow condition labels.

[0059] S5. Determine the sample credibility of each sample in the real vehicle associated dataset, the virtual complex working condition data and the battery dynamic response synthetic data respectively. Based on the sample credibility and the digital twin model residual, perform sample screening, sample sampling probability and sample training weight determination to form a virtual-real fusion battery operation extended dataset. Specifically, see Figure 3 The sample confidence level of each sample in the real vehicle associated dataset, the virtual complex operating condition data, and the battery dynamic response synthetic data is determined respectively. The sample confidence level of each sample in the real vehicle associated dataset can be expressed as:

[0060] in, Indicates the variable The value of is restricted to Within the interval, when When 0 is taken, When, take 1, when Keep constant. For sensor data integrity rate, This represents the proportion of outliers. The proportion of missing values. This is the normalized value for the noise level. This is the normalized value of the time synchronization error. This represents the proportion of physical continuity anomalies between adjacent sampling times in real data samples. It is used to characterize whether the rate of change of vehicle speed, SOC, battery temperature, battery terminal voltage, battery current, or motor torque between adjacent sampling times exceeds the corresponding preset physical rate of change boundary. These are the weighting coefficients corresponding to sensor data integrity rate, outlier rate, missing value rate, noise level, time synchronization error, and physical continuity anomaly rate, respectively. Each weighting coefficient is a non-negative number and can be set according to the actual vehicle data quality evaluation requirements.

[0061] The sample confidence level of each sample in the virtual complex working condition data can be expressed as:

[0062] in, For the first The reliability of a sample of virtual complex working condition data, with a value range of [value range missing]. The larger the value, the more reliable the virtual sample is; Number the virtual complex working condition data samples; Represents virtual complex operating condition data; It is an exponential function; This represents the attenuation coefficient corresponding to the residuals of the digital twin model, used to adjust the degree of influence of the digital twin model residuals on the credibility of the virtual data. ; For the first The larger the value of the residual of the digital twin model corresponding to each virtual complex working condition data sample, the greater the deviation between the predicted state of the digital twin model and the actual state of the real vehicle. This is the attenuation coefficient corresponding to the proportion of physical continuity anomalies, used to adjust the degree of impact of physical continuity anomalies on the credibility of virtual data. ; For the first The proportion of physical continuity anomalies in a virtual complex working condition data sample is used to characterize whether the rate of change of vehicle speed, SOC, battery temperature, battery terminal voltage, battery current or motor torque in the virtual sample between adjacent sampling times exceeds the corresponding preset physical rate of change boundary.

[0063] For virtual complex operating condition data samples with real vehicle samples that have the same or similar traffic flow conditions, vehicle states, and control actions, the residual of the digital twin model is determined based on the normalized weighted deviation between the actual state of the corresponding real vehicle and the predicted state of the digital twin model. For virtual complex operating condition data samples that lack completely corresponding real vehicle samples, the residual of the digital twin model corresponding to the adjacent verified real vehicle samples is weighted and mapped according to the similarity between the virtual complex operating condition data sample and the verified real vehicle samples in terms of traffic flow conditions, vehicle states, and control actions, so as to obtain the estimated digital twin model residual corresponding to the virtual complex operating condition data sample.

[0064] The reliability of the battery dynamic response synthesized data is calculated based on the discriminator output and the consistency error, and is defined as follows: in, , , and These are the attenuation coefficients corresponding to physical consistency error, virtual-real consistency error, traffic flow condition label consistency error, and the proportion of abnormal physical continuity of the synthetic sample, respectively, and all are greater than 0; The score given by the discriminator for the authenticity or usability of the synthetic sample is in the range of [0,1] and is used to characterize the authenticity or usability of the synthetic sample. For physical consistency error, To compensate for the consistency error between virtual and real data, To account for the consistency error of the operating condition labels, The proportion of physical continuity anomalies in the synthesized samples is defined. Further, for the battery dynamic response synthesized data sample, its corresponding digital twin model residual is determined based on the traffic flow conditions, vehicle state, and control actions associated with generating the synthesized sample. When the battery dynamic response synthesized data sample and the virtual complex operating condition data sample have corresponding traffic flow conditions, vehicle state, and control actions, the digital twin model residual of the corresponding virtual complex operating condition data sample is used as the digital twin model residual corresponding to the battery dynamic response synthesized data sample; when there is no directly corresponding virtual complex operating condition data sample, the estimated digital twin model residual corresponding to the battery dynamic response synthesized data sample is obtained by weighted mapping based on verified samples corresponding to similar traffic flow conditions, vehicle state, and control actions, according to the aforementioned method for estimating the digital twin model residual of the virtual complex operating condition data sample. In one embodiment, a sample credibility screening threshold is set. When the sample confidence level is lower than the sample confidence level screening threshold, the corresponding sample will be removed from the subsequent strategy training sample set; the sample confidence level screening threshold can be determined based on the sample confidence level distribution, validation set performance, or preset data quality requirements.

[0065] After the samples are screened for credibility, the credibility of the retained samples is uniformly recorded as follows: Then the sample sampling probability and sample training weight of the retained samples can be expressed as:

[0066]

[0067] in, Let be the sampling probability of the i-th sample. The training weights for the i-th sample are... Let be the sample confidence level of the i-th sample. This represents the total number of samples retained after filtering. This represents the average confidence level of the samples. To prevent extremely small positive numbers with a denominator of zero.

[0068] Further, sample selection is performed based on the sample credibility of each sample in the real vehicle associated dataset, the virtual complex operating condition data, and the battery dynamic response synthetic data. The sample sampling probability and sample training weight are then determined based on the sample credibility of each selected sample to form a virtual-real fusion battery operation augmented dataset. The samples in this dataset include states, actions, rewards, next states, training weights, operating condition labels, and source labels. This avoids directly mixing data from different sources in a fixed proportion, thus suppressing the sampling probability or training contribution of low-credibility samples in subsequent strategy training. During the offline data augmentation stage, for the virtual complex operating condition data, quantifiable error evaluation is performed based on the digital twin model residuals and the proportion of abnormal physical continuity of virtual samples; for the battery dynamic response synthetic data, quantifiable error evaluation is performed based on physical consistency error, virtual-real consistency error, traffic flow operating condition label consistency error, and the proportion of abnormal physical continuity of synthetic samples. The quantifiable error evaluation results are used to determine sample credibility, screen low-credibility samples, determine sample sampling probabilities, and determine sample training weights.

[0069] S6. Train a deep reinforcement learning energy management strategy model based on the virtual-real fusion battery operation expansion dataset and the sample training weights; Specifically, training samples are obtained from the virtual-real fusion battery operation augmentation dataset according to the sample sampling probability. The current state, current control action, and next state are extracted based on the training samples. The current reward is determined based on battery energy consumption, battery state of charge, battery temperature, digital twin model residual, and action change. The deep reinforcement learning energy management strategy model is trained based on the current state, current control action, current reward, next state, and corresponding sample training weights.

[0070] The deep reinforcement learning energy management strategy model can employ reinforcement learning algorithms such as DDPG, TD3, and SAC, which are suitable for continuous action spaces and capable of policy updates based on experience samples. The state input consists of the vehicle's operating state, battery state, and traffic flow conditions. In this embodiment, the state vector of the deep reinforcement learning energy management strategy model... The true state vector in the residual calculation of the digital twin model Predicted state vector A unified state symbol system is adopted. Among them, Used to represent the current state input during policy training. Used to represent the true state vector obtained from real vehicle feedback. This is used to represent the predicted state vector output by the digital twin model. The three components (state vector, prediction vector, and prediction vector) can be selected to have the same or partially the same state components, depending on the computational purpose. In one implementation, the original state vector is defined as:

[0071] in, The vehicle's current speed. For the power required by the vehicle, The battery is in its state of charge. For battery temperature, For battery health status, The average vehicle speed in the current window. The standard deviation of the vertical acceleration of the current window. This is the road congestion index. This represents the percentage of idling time. For road slope, Traffic signal waiting time This represents the distance to the vehicle in front.

[0072] The physical meaning and example normalized boundaries of each state dimension are shown in Table 1 below. These can be adjusted according to design parameters for different vehicle models and battery systems.

[0073] Table 1

[0074] Furthermore, the action output of the deep reinforcement learning energy management strategy model satisfies the constraints of the front and rear drive motor torque boundary, battery charge and discharge power boundary, battery state of charge safety boundary, battery temperature safety boundary, and action change rate boundary.

[0075] An action vector can be defined as:

[0076] in, This is the motor torque distribution coefficient. For drive power allocation coefficient, The values ​​of the three factors can be set to 0 to 1, which represent the braking energy recovery distribution coefficients.

[0077] In one embodiment of a dual-motor driven vehicle, the mapping relationship between the motion vector and the actual control quantity is as follows:

[0078] in, The target torque for the front drive motor. The target torque for the rear drive motor, This is the total torque required by the vehicle. The target drive power for the front drive motor, The target drive power for the rear drive motor, Driven by the vehicle's required power. To achieve the target power for brake energy recovery, This is regenerative braking power.

[0079] In one implementation, the motor torque allocation coefficient and the drive power allocation coefficient are selected as the main allocation control quantity for the driving phase according to the vehicle drive control mode, and the other allocation control quantity is determined according to the speed of the front and rear drive motors and the power-torque relationship. When the motor torque allocation coefficient and the drive power allocation coefficient are used as the action output of the deep reinforcement learning energy management strategy model at the same time, a power-torque consistency constraint is applied to both to ensure that the target torque, target speed and target drive power of the front and rear drive motors satisfy the corresponding power-torque relationship.

[0080] The action output satisfies the following constraints: front and rear drive motor torque boundaries, battery charge / discharge power boundaries, SOC safety boundaries, temperature safety boundaries, and action rate of change boundaries. The action rate of change boundary limits the rate of change of the action output between two adjacent sampling times, and can be expressed as:

[0081] in, To control the cycle, , , These are the maximum permissible rates of change for the motor torque distribution coefficient, drive power distribution coefficient, and braking energy recovery distribution coefficient, respectively.

[0082] The reward function is used to constrain the deep reinforcement learning energy management strategy to reduce battery energy consumption while meeting requirements for SOC, temperature, digital twin model residuals, and action smoothness. In one implementation, the first... The reward function for each time step is defined as:

[0083] in, This is the reward value for the current time step. This represents the battery energy consumption at the current time step. This is a SOC (System-on-Chip) boundary violation penalty item. This is a penalty item for exceeding battery temperature limits. For the residual penalty term of the digital twin model, This is a penalty for sudden changes in action. , , , and These are the weighting coefficients for the aforementioned reward items.

[0084] The SOC out-of-bounds penalty term is expressed as follows:

[0085] in, The current battery state of charge at the current time step. and These are the lower limit and upper limit of SOC security, respectively.

[0086] The battery temperature exceeding the limit penalty term is expressed as follows:

[0087] in, The current battery temperature at the current time step. This is the upper limit of battery temperature safety.

[0088] The action mutation penalty term is represented as follows:

[0089] in, Output the action for the current time step. This is the output of the action from the previous time step. The action mutation penalty term limits abrupt changes in control actions between adjacent time steps, improving the smoothness of motor torque distribution, drive power distribution, and regenerative braking distribution.

[0090] The residual penalty term of the digital twin model adopts the residual of the digital twin model defined in step S2. Through the above reward term and action constraints, the battery state of charge, battery temperature, residual and action smoothness can be constrained while reducing battery energy consumption.

[0091] S7. Deploy the deep reinforcement learning energy management strategy model to the vehicle controller, calculate the digital twin model residual and the strategy execution residual based on the real vehicle feedback data, and make online corrections accordingly to form a virtual-real residual closed loop; when the digital twin model residual or the strategy execution residual exceeds the corresponding preset safety threshold, freeze the online learning parameters and switch to the preset safety energy management strategy.

[0092] Specifically, the trained deep reinforcement learning energy management strategy model is deployed to the vehicle controller. During actual vehicle operation, the vehicle status, battery status, actual actions performed, and actual energy consumption after the strategy is executed are collected as real-vehicle feedback data.

[0093] The strategy execution residual is used to characterize the deviation between the expected control effect of the energy management strategy and the actual control effect of the vehicle, and can be defined as:

[0094] in, and These are the expected energy consumption and the actual energy consumption, respectively. and These are the expected change in SOC and the actual change in SOC, respectively. and These are the expected temperature rise and the actual temperature rise, respectively. and These are the expected action and the actual action performed, respectively. , , and These are the weighting coefficients corresponding to the expected energy consumption deviation, the change in state of charge deviation, the temperature rise deviation, and the execution action deviation, respectively. , and These are the normalized reference scales corresponding to energy consumption deviation, SOC change deviation, and temperature rise deviation, respectively. They are all positive numbers and can be set according to the typical operating range or allowable deviation range of the target vehicle and power battery system.

[0095] Furthermore, the expected energy consumption, expected SOC change, and expected temperature rise can be determined based on the prediction results of the calibrated digital twin model under the current traffic flow conditions, vehicle status, and the output action of the deep reinforcement learning energy management strategy model; the expected execution action is the target control action output by the deep reinforcement learning energy management strategy model; and the actual energy consumption, actual SOC change, actual temperature rise, and actual execution action are determined based on real vehicle feedback data after the strategy is executed.

[0096] Furthermore, the corresponding preset safety thresholds include preset digital twin residual safety thresholds and preset strategy execution residual safety thresholds. The preset digital twin residual safety threshold is determined based on the residual statistics of the calibrated digital twin model on the verification dataset, combined with the safe operating boundaries of the vehicle and battery. The preset strategy execution residual safety threshold is determined based on the strategy execution residual statistics of the energy management strategy in real-vehicle tests, hardware-in-the-loop tests, or historical safe operating data, combined with the allowable ranges of energy consumption deviation, SOC change deviation, temperature rise deviation, and execution action deviation. The preset digital twin residual safety threshold and preset strategy execution residual safety threshold can be calibrated according to the vehicle model, battery system, and operating environment.

[0097] During the real-vehicle deployment phase, the residuals of the digital twin model and the policy execution residuals are used as online quantifiable error evaluation indicators. When the residuals of the digital twin model and the policy execution residuals do not exceed a preset safety threshold, online correction is performed based on real-vehicle feedback data, the residuals of the digital twin model, and the policy execution residuals. The online correction includes one or more of the following: recursive correction of digital twin model parameters, update of residual compensation terms, adjustment of the virtual complex working condition generation range, update of traffic flow condition generative adversarial network constraints, update of sample credibility, update of sample training weights, and update of outer-layer compensation parameters of the policy network. Preferably, the main network parameters of the deep reinforcement learning energy management policy model are not directly updated.

[0098] Among them, the recursive correction of digital twin model parameters, the update of residual compensation terms, and the update of outer layer compensation parameters of policy network can be performed according to the vehicle control cycle or a preset short cycle based on current or recent real vehicle feedback data; the adjustment of virtual complex working condition generation range, the update of traffic flow condition generative adversarial network constraints, the update of sample credibility, and the update of sample training weights can be performed according to a preset update cycle after accumulating a preset number of real vehicle feedback data, without requiring retraining of the traffic flow condition generative adversarial network or the main network of the deep reinforcement learning energy management policy model in each vehicle control cycle.

[0099] When the vehicle battery SOC, temperature, battery charging / discharging power, or motor torque are outside the corresponding safety boundaries, or when the residual of the digital twin model exceeds the preset digital twin residual safety threshold, or when the strategy execution residual exceeds the preset strategy execution residual safety threshold, the online learning parameters are frozen, and the control strategy is switched to the preset safe energy management strategy.

[0100] The preset safe energy management strategy includes one or more of the following: rule-based torque derating strategy, charge / discharge power limiting strategy, regenerative braking limiting strategy, and temperature protection strategy. The preset safe energy management strategy prioritizes the SOC safety boundary, temperature safety boundary, battery charge / discharge power boundary, and motor torque boundary as constraints.

[0101] In one embodiment, a dual-motor pure electric vehicle model and a first-order RC equivalent circuit model of the power battery can be used to simulate and verify the method of this application. In other embodiments, the deep reinforcement learning energy management strategy model can also be deployed to a hardware-in-the-loop platform or an on-board controller test platform for joint verification. The verification can be used to evaluate the operating performance of the method of this application under different vehicle parameters, control cycles, and test conditions. The specific parameters are set according to the actual conditions of the target vehicle, the power battery system, and the verification platform. Parameters such as vehicle mass, rated power of the front and rear drive motors, rated capacity of the power battery, rated voltage, initial SOC, initial SOH, and ambient temperature are set according to the actual parameters of the target vehicle and the power battery system. The SOC safety boundary, battery temperature safety boundary, and motor and battery power boundary are determined according to the design safety range of the vehicle and the power battery system; the residual safety threshold of the digital twin model and the residual safety threshold of the strategy execution are calibrated according to the aforementioned residual statistics and safe operating boundaries. The verification data may include real vehicle operating data, virtual complex operating condition data generated by the calibrated digital twin model, and battery dynamic response synthetic data generated by the traffic flow condition generative adversarial network. The amount of real vehicle data, the number of virtual complex operating condition samples, the number of synthetic data samples, the sampling frequency, the control cycle, and the sliding window length are set according to the specific vehicle platform, data acquisition conditions, and the controller's computing power. The training set, validation set, and test set are divided according to complete driving segments to avoid the same continuous driving segment or its adjacent sliding windows appearing simultaneously in different data subsets. When validating the method, the test conditions may include one or more of the following: urban congestion, frequent start-stop, expressway cruising, long uphill, long downhill energy recovery, high temperature, low temperature, and battery aging combined conditions. Energy management strategies trained solely using real vehicle data, energy management strategies trained using conventional data augmentation methods, and energy management strategies trained using the virtual-real residual closed-loop method of this application can be set as comparison schemes and compared under the same vehicle parameters, the same control cycle, the same state space, the same action space, and the same test conditions. The verification metrics may include one or more of the following: battery energy consumption per 100 kilometers, maximum battery temperature, SOC change, number of control overruns, digital twin model residuals, and policy execution residuals, to evaluate the performance of the method in terms of energy consumption, battery thermal state, safety constraint satisfaction, and model and policy execution deviations. This application also provides a virtual-real residual closed-loop battery energy management system, including a real vehicle data acquisition module, a digital twin construction and calibration module, a virtual complex operating condition generation module, a data augmentation module, a credibility evaluation and weight construction module, a policy training module, an onboard controller, and an online closed-loop correction module.

[0102] The real vehicle data acquisition module is used to acquire real vehicle operation data and construct a real vehicle associated dataset. Specifically, it can perform time synchronization, resampling, anomaly cleaning, fixed feature order arrangement, sliding window slicing, normalization and tensor quantization processing on traffic flow operation data, vehicle dynamics data, battery operation response data and vehicle control action data in the manner described in step S1 of embodiment one.

[0103] The digital twin construction and calibration module is used to construct a digital twin model, calibrate the digital twin model using the real vehicle associated dataset, obtain the calibrated digital twin model, and calculate the residuals of the digital twin model; its specific model structure, parameter calibration and residual calculation method can adopt the method described in step S2 of Embodiment 1.

[0104] The virtual complex operating condition generation module is used to generate virtual complex operating condition data using the calibrated digital twin model; the data augmentation module is used to train a traffic flow condition generative adversarial network based on the real vehicle association dataset and the virtual complex operating condition data, and generate battery dynamic response synthetic data.

[0105] The credibility evaluation and weight construction module is used to determine the credibility of each sample in the real vehicle associated dataset, the virtual complex working condition data and the battery dynamic response synthetic data, respectively. Based on the sample credibility and the digital twin model residual, the module performs sample screening, sample sampling probability and sample training weight determination to form a virtual-real fusion battery operation extended dataset.

[0106] The policy training module is used to train a deep reinforcement learning energy management policy model based on the virtual-real fusion battery operation extended dataset and the sample training weights; the vehicle controller is used to deploy the deep reinforcement learning energy management policy model.

[0107] The online closed-loop correction module is used to calculate the digital twin model residual and the strategy execution residual based on real vehicle feedback data, and to make online corrections accordingly to form a virtual-real residual closed loop; when the digital twin model residual or the strategy execution residual exceeds the corresponding preset safety threshold, the online learning parameters are frozen and the preset safety energy management strategy is switched.

[0108] The embodiments described above are merely preferred embodiments of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various improvements and substitutions without departing from the technical principles of this application, and these improvements and substitutions should also be considered within the scope of protection of this application.

Claims

1. A closed-loop battery energy management method based on virtual and real residuals, characterized in that, Includes the following steps: S1. Obtain real-world vehicle operation data and construct a real-world vehicle-related dataset; S2. Construct a digital twin model, calibrate the digital twin model using the real vehicle association dataset, obtain the calibrated digital twin model, and calculate the residual of the digital twin model; S3. Use the calibrated digital twin model to generate virtual complex working condition data; S4. Train a traffic flow conditional generative adversarial network based on the real vehicle association dataset and the virtual complex working condition data, and generate battery dynamic response synthetic data; S5. Determine the sample credibility of each sample in the real vehicle associated dataset, the virtual complex working condition data and the battery dynamic response synthetic data respectively. Based on the sample credibility and the digital twin model residual, perform sample screening, sample sampling probability and sample training weight determination to form a virtual-real fusion battery operation extended dataset. S6. Train a deep reinforcement learning energy management strategy model based on the virtual-real fusion battery operation expansion dataset and the sample training weights; S7. Deploy the deep reinforcement learning energy management strategy model to the vehicle controller, calculate the digital twin model residual and the strategy execution residual based on the real vehicle feedback data, and make online corrections accordingly to form a virtual-real residual closed loop; when the digital twin model residual or the strategy execution residual exceeds the corresponding preset safety threshold, freeze the online learning parameters and switch to the preset safety energy management strategy.

2. The virtual-real residual closed-loop battery energy management method according to claim 1, characterized in that, The actual vehicle operation data includes traffic flow operation data, vehicle dynamics data, battery operation response data, and vehicle control action data. The actual vehicle operation data is synchronized and resampled according to a unified timestamp. The resampled data is cleaned for anomalies, arranged according to a fixed feature order, and then processed by sliding window slicing, normalization, and tensor quantization to form traffic flow condition tensors, vehicle state tensors, battery response tensors, and control action tensors, in order to construct the actual vehicle associated dataset.

3. The virtual-real residual closed-loop battery energy management method according to claim 1, characterized in that, In step S2, the digital twin model includes a traffic flow scene layer, a vehicle dynamics layer, a battery electrothermal layer, and an interface layer; The traffic flow scenario layer is used to generate or reproduce traffic flow scenarios. The vehicle dynamics layer is used to determine the vehicle's required power, wheel driving force, and motor torque based on traffic flow status and driving needs. The battery heating layer is used to determine the battery terminal voltage, temperature rise, and energy state changes based on battery current, battery temperature, battery state of charge, and battery health status. The interface layer is used to transmit traffic flow conditions, vehicle status, battery response, control actions, and residual information.

4. The virtual-real residual closed-loop battery energy management method according to claim 1, characterized in that, In step S2, the calibration of the digital twin model includes: Under the same traffic flow conditions and the same control actions, obtain the predicted state of the digital twin model and the corresponding real state of the actual vehicle; The digital twin model is calibrated with the goal of ensuring that the deviation between the predicted state and the actual state of the vehicle meets a preset requirement. The residual of the digital twin model is calculated based on the normalized weighted deviation between the predicted state of the calibrated digital twin model and the actual state of the real vehicle.

5. The virtual-real residual closed-loop battery energy management method according to claim 2, characterized in that, In step S3, a target traffic flow condition set is constructed in the calibrated digital twin model, the virtual complex working condition data is generated based on the target traffic flow condition set, and the virtual complex working condition data is processed in the same way as the real vehicle associated dataset using sliding window slicing, normalization and tensor quantization. The virtual complex operating condition data includes one or more of the following: extreme congestion, frequent start-stop, aggressive acceleration and deceleration, long uphill, long downhill energy recovery, high temperature, low temperature, and composite operating condition data under different battery aging levels.

6. The virtual-real residual closed-loop battery energy management method according to claim 2, characterized in that, In step S4, the traffic flow condition generative adversarial network includes a generator and a discriminator; The traffic flow condition tensor, the vehicle state tensor, the control action tensor, the virtual predicted state tensor output by the calibrated digital twin model, and random noise are input into the generator to obtain the battery dynamic response synthetic data. The traffic flow condition generative adversarial network is trained based on adversarial loss, physical consistency loss, virtual-real consistency loss and traffic flow condition label consistency loss. The virtual-real consistency loss is used to constrain the deviation between the synthesized battery dynamic response data and the virtual battery response data output by the calibrated digital twin model under the same traffic flow conditions, vehicle state and control actions.

7. The virtual-real residual closed-loop battery energy management method according to claim 6, characterized in that, In step S5, the sample credibility of each sample in the real vehicle association dataset is determined based on the sensor data integrity rate, physical boundary anomaly ratio, missing value ratio, noise level, time synchronization error, and physical continuity anomaly ratio between adjacent sampling times. The sample credibility of each sample in the virtual complex working condition data is determined based on the residual of the digital twin model and the proportion of abnormal physical continuity of the virtual samples. The sample credibility of each sample in the battery dynamic response synthetic data is determined based on the output of the discriminator, physical consistency error, virtual-real consistency error, traffic flow condition label consistency error, and the proportion of abnormal physical continuity of the synthetic sample. Based on the sample credibility of each sample in the real vehicle associated dataset, the virtual complex working condition data, and the battery dynamic response synthetic data, the sample is screened, and the sample sampling probability and sample training weight are determined according to the sample credibility of each sample after screening, so as to form the virtual-real fusion battery operation extended dataset.

8. The virtual-real residual closed-loop battery energy management method according to claim 1, characterized in that, In step S6, training samples are obtained from the virtual-real fusion battery operation augmentation dataset according to the sample sampling probability. The current state, current control action, and next state are extracted based on the training samples, and the current reward is determined based on battery energy consumption, battery state of charge, battery temperature, digital twin model residuals, and action changes. The deep reinforcement learning energy management strategy model is trained based on the current state, current control action, current reward, next state, and corresponding sample training weights.

9. The virtual-real residual closed-loop battery energy management method according to claim 1, characterized in that, In step S7, the strategy execution residual is calculated based on the deviation between expected energy consumption and actual energy consumption, the deviation between expected battery state of charge change and actual battery state of charge change, the deviation between expected temperature rise and actual temperature rise, and the deviation between expected action and actual action. When neither the residual of the digital twin model nor the residual of the policy execution exceeds the corresponding preset safety threshold, based on the real vehicle feedback data, the residual of the digital twin model, and the residual of the policy execution, at least one of the following operations is performed: calibrating the digital twin model, adjusting the generation range of the virtual complex working condition data, updating the constraints of the traffic flow condition generative adversarial network, updating the sample credibility, updating the sample training weights, and updating the outer compensation parameters of the deep reinforcement learning energy management policy model, so as to form the virtual-real residual closed loop.

10. A virtual-real residual closed-loop battery energy management system, characterized in that, include: The real vehicle data acquisition module is used to acquire real vehicle operating data and build a real vehicle-related dataset; The digital twin construction and calibration module is used to construct a digital twin model, calibrate the digital twin model using the real vehicle associated dataset, obtain the calibrated digital twin model, and calculate the residuals of the digital twin model. The virtual complex working condition generation module is used to generate virtual complex working condition data using the calibrated digital twin model. The data augmentation module is used to train a traffic flow conditional generative adversarial network based on the real vehicle associated dataset and the virtual complex working condition data, and to generate synthetic data of battery dynamic response. The credibility evaluation and weight construction module is used to determine the credibility of each sample in the real vehicle associated dataset, the virtual complex working condition data and the battery dynamic response synthetic data respectively. Based on the sample credibility and the digital twin model residual, the module performs sample screening, sample sampling probability and sample training weight determination to form a virtual-real fusion battery operation extended dataset. The strategy training module is used to train a deep reinforcement learning energy management strategy model based on the virtual-real fusion battery running expanded dataset and the sample training weights; An onboard controller is used to deploy the deep reinforcement learning energy management strategy model. The online closed-loop correction module is used to calculate the residuals of the digital twin model and the strategy execution residuals based on real vehicle feedback data, and to make online corrections accordingly, forming a virtual-real residual closed loop. When the residual of the digital twin model or the residual of the strategy execution exceeds the corresponding preset safety threshold, the online learning parameters are frozen and the preset safety energy management strategy is switched.