A method, device, equipment and medium for training a power balancing strategy model
By using the battery simulation model for offline reinforcement learning training in the battery equalization strategy model, the problem of difficulty in training the power equalization strategy model in the existing technology is solved, and efficient power equalization strategy model training and generalization improvement are achieved.
Patent Information
- Application Number
- CN202410128133.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-01-30
AI Technical Summary
The reinforcement learning training of existing power balance strategy models is difficult, the sample acquisition cost is high, and the number of samples is limited, which leads to the model being easily overfitted and poor generalization.
By obtaining the status data set of the vehicle during driving, generating a battery simulation model, performing offline reinforcement learning training based on the simulation model, collecting sample status information, parameter adjustment of the model, reducing training costs, avoiding overfitting, and improving generalization .
It realizes efficient training of the power balance strategy model, reduces costs, improves the generalization and practicality of the model, and solves the problem of difficulty in training the power balance strategy model.
Smart Images

Figure CN117951524B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric vehicle energy management, and in particular to a method, device, equipment and medium for training a power balancing strategy model. Background Art
[0002] In vehicles, the Battery Management System (BMS) is considered an indispensable and important component. BMS is an intelligent system dedicated to monitoring, managing and protecting batteries. Its main task is to protect each battery cell, increase battery service life and cycle life, and prevent battery overcharge and over-discharge and other faults.
[0003] At present, the model-based reinforcement learning algorithms in the existing technology have a great advantage in sample efficiency. They can learn quickly based on existing samples and combined with models.
[0004] However, the cost of sample acquisition is high, and the number of existing samples is limited, which cannot represent all possible situations in the real world. As a result, the model trained by reinforcement learning is prone to overfitting and poor generalization. Summary of the invention
[0005] The present invention provides a method, device, equipment and medium for training a power balancing strategy model to solve the problem of difficulty in training the power balancing strategy model through reinforcement learning.
[0006] According to one aspect of the present invention, a method for training a power balancing strategy model is provided, the method comprising:
[0007] Acquire a state data set of the vehicle during driving; wherein the state data set includes battery action information and battery state information; the battery state information includes remaining power information of multiple single batteries in the battery pack;
[0008] Generate a battery simulation model based on the state data set, where the battery simulation model is used to describe the battery operation process during vehicle driving;
[0009] Collecting sample status information of the battery based on the battery simulation model;
[0010] The power balancing strategy model to be trained is trained to obtain a trained power balancing strategy model: a predicted action request corresponding to the sample status information of the battery is generated based on the power balancing strategy model during the training process, predicted battery status information corresponding to the predicted action request is obtained based on the battery simulation model, and parameters of the power balancing strategy model are adjusted based on the predicted battery status information and the battery target control status information.
[0011] According to another aspect of the present invention, a power balancing method is provided, the method comprising:
[0012] Obtaining battery status information of the vehicle based on a preset time interval;
[0013] Input the battery status information into the power balancing strategy model to obtain the control action instructions;
[0014] Based on the control action instruction, the power of multiple single batteries in the battery pack is balanced and adjusted to achieve power balance of the multiple single batteries.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the power balancing strategy model training method of any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the power balancing strategy model training method of any embodiment of the present invention when executed.
[0020] The technical solution of the embodiment of the present invention is to obtain a state data set of a vehicle during driving; wherein the state data set includes battery action information and battery state information; the battery state information includes the remaining power information of multiple single batteries in a battery pack; generate a battery simulation model based on the state data set, and the battery simulation model is used to describe the battery operation process during vehicle driving; collect sample state information of the battery based on the battery simulation model; train the power balancing strategy model to be trained to obtain a trained power balancing strategy model: generate a predicted action request corresponding to the sample state information of the battery based on the power balancing strategy model in the training process, obtain predicted battery state information corresponding to the predicted action request based on the battery simulation model, and adjust the parameters of the power balancing strategy model based on the predicted battery state information and the battery target control state information, so that the power balancing strategy model can be trained for offline reinforcement learning based on the battery simulation model instead of online reinforcement learning training of a real vehicle, so as to reduce the cost of training the power balancing strategy model, and the sample state information generated by the battery simulation model is data enhancement of the battery state information in the state data set, so as to avoid overfitting in the training process of the power balancing strategy model, solve the problem of difficulty in reinforcement learning training of the power balancing strategy model, and improve the generalization of the power balancing strategy model.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of a power balancing strategy model training method provided in the first embodiment of the present invention;
[0024] Figure 2 is a flow chart of a power balancing strategy model training method provided by Embodiment 2 of the present invention;
[0025] Figure 3 is a flow chart of a power balancing method provided by Embodiment 3 of the present invention;
[0026] Figure 4 It is a structural schematic diagram of a power balancing strategy model training device provided by Embodiment 4 of the present invention;
[0027] Figure 5 is a structural schematic diagram of a power balancing device provided in Embodiment 5 of the present invention;
[0028] Figure 6 It is a structural schematic diagram of an electronic device for implementing the power balancing strategy model training method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Embodiment 1
[0032] Figure 1 It is a flow chart of a power balancing strategy model training method provided in the first embodiment of the present invention. This embodiment is applicable to the situation of training the power balancing strategy model. The method can be executed by a power balancing strategy model training device. The power balancing strategy model training device can be implemented in the form of hardware and / or software. The power balancing strategy model training device can be configured in electronic devices such as computers and servers.
[0033] In this embodiment, the power balancing strategy model is a model for generating a power balancing strategy, which can be deployed in the battery management system (BMS) of the vehicle to perform power balancing control on multiple single batteries in the battery pack of the vehicle, ensure that the power of multiple single batteries decreases evenly, and extend the service life of the battery pack. The vehicle is a battery energy and / or other form of energy vehicle, such as an electric car and a hybrid electric car. By training the power balancing strategy model, the power balancing strategy model has the ability to generate the optimal power balancing strategy.
[0034] It should be noted that the goals of the power balancing strategy include balancing high-voltage reduction and low-voltage compensation, low-loss energy transfer and large balancing current. Among them, balancing high-voltage reduction and low-voltage compensation includes discharging high-voltage cells and charging low-voltage cells when the vehicle's battery pack is charging, discharging or stationary, which can improve the efficiency of the battery pack; low-loss energy transfer includes in power balancing control, most of the power is transferred between cells, the power loss is small, and the utilization rate of electric energy can be improved; large balancing current is included in power balancing control, and the balancing current is between 1 ampere and 10 amperes, which can increase the speed of power balancing.
[0035] like Figure 1 As shown, the method includes:
[0036] S110, obtaining a state data set of the vehicle during driving; wherein the state data set includes battery action information and battery state information; the battery state information includes remaining power information of multiple single batteries in the battery pack.
[0037] In this embodiment, the status data set is a data set consisting of multiple pairs of battery action information and battery status information, wherein the battery action information is information characterizing the charging or discharging actions of multiple single batteries in the battery pack, for example, the battery action information includes but is not limited to the number of charging times, charging time, discharging time and discharging current of each single battery; the battery status information is information characterizing the remaining power of multiple single batteries in the battery pack, for example, the remaining power information of two single batteries in the battery pack is 20% and 60% respectively. It should be noted that the battery action information in each pair of battery action information and battery status information is the battery action information at the current moment, and the battery status information is the battery status information at the next moment, and the current moment and the next moment are two adjacent moments.
[0038] Specifically, test cases are constructed based on the daily driving range of the vehicle, wherein the daily driving range is a range composed of multiple daily operating conditions, and the daily operating conditions refer to the usage and performance of the electric vehicle under different road and driving conditions, and each daily operating condition includes but is not limited to road conditions, temperature, humidity and driving behavior, wherein the road condition refers to the type of road and traffic conditions on which the vehicle is located during driving. Exemplarily, the road conditions include but are not limited to traffic congestion on urban roads, high-speed driving on highways, and climbing on mountain roads; the temperature is the ambient temperature of the vehicle during driving, and it can be understood that the battery capacity decays at low temperatures and the battery overheats at high temperatures; the humidity is the ambient humidity of the vehicle during driving, and it can be understood that the battery has difficulty in dissipating heat under high humidity; the driving behavior is the driver's control behavior of the moving vehicle, and exemplary, the driving behavior includes but is not limited to acceleration, deceleration and emergency braking.
[0039] Multiple test cases are obtained by randomly combining multiple daily operating conditions. Based on BMS, the battery action information and battery status information of the vehicle controlled by drivers with different driving habits under each test case are collected in real time to obtain battery action information and battery status information. The battery action information and battery status information are preprocessed, including but not limited to removing outliers, noise, data format conversion, and pairing the battery action information at the current moment and the battery status information with the battery status information at the next moment to obtain a state data set for subsequent training, and the state data set is pre-stored locally or in a server. When the power balancing strategy model training is started, the state data set pre-stored locally or in a server is called.
[0040] In some embodiments, the power balancing strategy is related to the operating status of the vehicle. Optionally, the status data set also includes operating status information.
[0041] In this embodiment, the operating state information is information characterizing multiple daily operating states corresponding to each pair of battery action information and battery state information. For example, the operating state information is "road condition: 80 km / h on a highway; temperature: 25 degrees Celsius; humidity: 17%; driving behavior: emergency braking". By pairing each pair of battery action information and battery state information with the operating state information, a state data set including the operating state information is obtained.
[0042] The technical solution of this embodiment adds operating condition status information to the status data set, so that subsequent training can learn the power balancing strategy corresponding to each operating condition status information, which helps to improve the practicality of the power balancing strategy model.
[0043] S120: Generate a battery simulation model based on the state data set, where the battery simulation model is used to describe the battery operation process during vehicle driving.
[0044] In this embodiment, the battery simulation model is a model for providing a virtual environment for offline reinforcement learning. The battery simulation model predicts the battery status information at the next moment based on the battery status information and battery action information at the current moment, thereby describing the battery operation process during vehicle driving. Exemplarily, by inputting the battery status information at the initial moment and the battery action information at the initial moment and n subsequent moments into the battery simulation model, the battery status information at n subsequent moments can be obtained.
[0045] Specifically, a battery simulation model to be trained is constructed based on a neural network, and the battery simulation model to be trained is trained based on a preset training algorithm and multiple pairs of battery state information and battery action information in a state data set. Among them, the preset training algorithm is an algorithm for training a virtual environment for reinforcement learning, and the preset training algorithm includes but is not limited to training strategies (for example, generative adversarial strategies and reinforcement learning strategies), loss functions, learning rates, and training rounds. Exemplarily, the preset training algorithm is a revive algorithm. By adjusting the parameters of the battery simulation model, the battery simulation model learns the mapping relationship between the battery action information at the current moment and the battery state information at the next moment, and obtains the battery simulation model. Optionally, the following steps are performed to generate adversarial training for the generator and the discriminator based on the state data set, and when the end condition is met, the trained generator is determined as a battery simulation model: a battery action-state sequence is generated based on the generator; the battery action-state sequence includes battery action information and battery state information at multiple moments; the battery action information at the current moment corresponds to the battery state information at the next moment; the expected reward corresponding to the battery action-state sequence is determined based on the discriminator; the generator and the discriminator are updated based on the expected reward.
[0046] In this embodiment, the end condition of generative adversarial training is the condition for ending the training of the generator and the discriminator. Exemplarily, the end condition of generative adversarial training includes the convergence of the value of the loss function and the reaching of a fixed number of training rounds, etc., which is not limited in this embodiment. The battery action-state sequence is a sequence that characterizes the battery operation process at multiple moments. It can be understood that the battery status information at the next moment in the battery action-state sequence is the battery status information obtained after the battery status information at the current moment is adjusted based on the battery action information at the current moment.
[0047] Specifically, the generator is a module for generating a battery action-state sequence. By learning the data distribution of each pair of battery action information and battery state information in the state data set, the model parameters of the generator are adjusted. Based on the data distribution learned in the current round, the battery action-state sequence is generated. The discriminator is a module for determining the confidence of the battery action-state sequence generated by the generator. By learning the data distribution of each pair of battery action information and battery state information in the state data set, the model parameters of the discriminator are adjusted. By comparing the data distribution of the battery action-state sequence generated by the generator in the current round with the data distribution corresponding to the state data set, the similarity of the above two data distributions is determined. When the similarity of the above two data distributions is high, the confidence of the battery action-state sequence is determined to be close to 0.5; when the similarity of the above two data distributions is low, the confidence of the battery action-state sequence is determined to be close to 1 or 0. The expected reward corresponding to the battery action-state sequence is related to the confidence of the battery action-state sequence determined by the discriminator. It can be understood that the closer the confidence is to 0.5, the greater the expected reward, and the farther the confidence is from 0.5, the smaller the expected reward. In some embodiments, the confidence of the battery action-state sequence generated by the generator of the current round can be compared with the preset confidence range, and the preset expected reward corresponding to the preset confidence range satisfied by the confidence can be determined as the corresponding expected reward of the current round, wherein the preset confidence range is a preset numerical range between 0 and 1, which is used to determine the preset expected reward corresponding to the confidence; the preset expected reward is the expected reward corresponding to each preset confidence range. Exemplarily, it is assumed that the preset expected reward corresponding to the preset confidence range (0.4, 0.6) is 1, and the preset expected reward corresponding to the preset confidence range (0.0, 0.4) and (0.6, 1.0) is 0.5. In some embodiments, the corresponding expected reward of the current round can also be calculated by substituting the confidence of the battery action-state sequence generated by the generator of the current round into the conversion relationship between confidence and expected reward, and this embodiment does not limit this. Exemplarily, expected reward = 1-|0.5-confidence|. The model parameters of the generator and the discriminator are adjusted based on the expected reward to update the generator and the discriminator. When the end condition is met, the next round of generative adversarial training is performed based on the generator and the discriminator updated in the current round until the end condition is met. It can be considered that the discriminator cannot distinguish the data distribution of the battery action-state sequence generated by the generator from the data distribution of the state data set. The training of the generator and the discriminator is terminated, and the trained generator is used as the battery simulation model.
[0048] The technical solution of this embodiment, through adversarial training of the generator and the discriminator, enables the generator to generate a battery action-state sequence similar to the data distribution of the state data set, thereby ensuring the authenticity of the battery operation process described by the battery simulation model during vehicle driving, and helping to improve the reliability of offline reinforcement learning training of the battery balancing strategy model based on the battery simulation model.
[0049] In some embodiments, the state data set includes battery action information, battery state information and operating state information. Optionally, the battery simulation model is used to describe the battery operation process during vehicle driving under different operating conditions.
[0050] In this embodiment, the battery simulation model to be trained is trained based on a state data set including operating condition information, so that the battery simulation model learns each pair of battery action information and battery state information corresponding to different operating condition information, so that the battery simulation model can predict the battery state information and operating condition information at the next moment based on the operating condition information, battery state information and battery action information at the current moment, and realize the description of the battery operation process during vehicle driving under different operating conditions. Exemplarily, by inputting the operating condition information, battery state information and battery action information at the initial moment and at n subsequent moments into the battery simulation model, the battery state information and operating condition information at n subsequent moments under the operating condition corresponding to the operating condition information can be obtained.
[0051] In the technical solution of this embodiment, the battery simulation model is used to describe the battery operation process during vehicle driving under different operating conditions, so that subsequent training can be based on the battery simulation model to perform wireless reinforcement learning of the power balancing strategy corresponding to each operating state information, which helps to improve the practicality of the power balancing strategy model.
[0052] S130: Collect sample status information of the battery based on the battery simulation model.
[0053] In this embodiment, the sample status information is the battery status information generated by the battery simulation model based on the initial battery action information and the initial battery status information, and is used to train the power balancing strategy model. The initial battery action information is the battery action information at the start time corresponding to the test case, and the initial battery status information is the battery status information at the start time corresponding to the test case.
[0054] Specifically, by calling the battery simulation model and inputting the initial battery action information and the initial battery status information into the battery simulation model, the battery simulation model generates the battery status information of the subsequent preset duration based on the initial battery action information and the initial battery status information at the current moment. The generated battery status information of the subsequent preset duration is sampled based on the preset time interval to obtain the battery status information of at least one moment, and the collected battery status information of each moment is determined as the sample status information. Among them, the preset duration is the duration of the battery operation process described by the preset battery simulation model; the preset time interval is the preset time interval between the sample status information of any two adjacent moments.
[0055] Exemplarily, assuming that the preset duration is 1 second and the preset time interval is 20 milliseconds, the sample status information corresponding to each pair of initial battery action information and initial battery status information is the battery status information at 50 moments after the start moment generated by the battery simulation model.
[0056] In some embodiments, the battery simulation model is used to describe the battery operation process during vehicle driving under different operating conditions. Optionally, the sample state information also includes operating state information.
[0057] In this embodiment, the sample state information is the battery state information and the working state information generated by the battery simulation model based on the initial working state information, the initial battery action information and the initial battery state information, and is used to train the power balancing strategy model. The initial working state information is the electrical working state information at the start time corresponding to the test case.
[0058] Specifically, by calling the battery simulation model and inputting the initial working condition status information, initial battery action information and initial battery status information into the battery simulation model, the battery simulation model generates the working condition status information and battery status information of the subsequent preset duration based on the initial working condition status information, initial battery action information and initial battery status information at the current moment. The generated working condition status information and battery status information of the subsequent preset duration are sampled based on the preset time interval to obtain the working condition status information and battery status information of at least one moment, and the collected working condition status information and battery status information at each moment are determined as the sample status information.
[0059] Exemplarily, assuming that the preset duration is 1 second and the preset time interval is 20 milliseconds, the sample status information corresponding to each pair of initial operating status information, initial battery action information and initial battery status information is the operating status information and battery status information at 50 moments after the start moment generated by the battery simulation model.
[0060] The technical solution of this embodiment generates sample status information including operating status information and battery status information based on the battery simulation model, so that the power balancing strategy model can perform wireless reinforcement learning of the power balancing strategy corresponding to each operating status information, which helps to improve the practicality of the power balancing strategy model.
[0061] S140. Train the power balancing strategy model to be trained to obtain a trained power balancing strategy model: generate a predicted action request corresponding to the sample status information of the battery based on the power balancing strategy model during the training process, obtain predicted battery status information corresponding to the predicted action request based on the battery simulation model, and adjust parameters of the power balancing strategy model based on the predicted battery status information and the battery target control status information.
[0062] Specifically, the current moment is the moment where the sample state information is located. The predicted action request is a request for adjusting the battery power, and the predicted action request includes the battery action information at the current moment generated by the power balancing strategy model. By inputting the sample state information into the power balancing strategy model, a predicted action request including the battery action information at the current moment is obtained. By inputting the battery action information at the current moment in the predicted action request into the battery simulation model, the battery simulation model generates predicted battery state information based on the battery action information at the current moment and the sample state information, wherein the predicted battery state information is the battery state information at at least one subsequent moment corresponding to the current moment. The battery target control state information is the battery state information at the theoretical subsequent moment after the multiple single batteries in the battery pack are balanced and adjusted based on the target of the power balancing strategy. Based on the target of the power balancing strategy and the sample state information, a theoretical calculation of the battery operation process is performed to obtain the battery target control state information at each subsequent moment. By comparing the predicted battery state information at each subsequent moment with the battery target control state information, the difference between the predicted battery state information at each subsequent moment and the battery target control state information is determined, and the parameters of the power balancing strategy model are adjusted based on the difference degree of the at least one subsequent moment. Optionally, based on the sample status information and the preset power balancing strategy, determine the battery target control status information; substitute the predicted battery status information and the battery target control status information into the reward and punishment function to calculate the reward and punishment value; and adjust the parameters of the power balancing strategy model based on the reward and punishment value.
[0063] In this embodiment, the preset power balancing strategy is a theoretical power balancing strategy that is determined in advance based on a target of the power balancing strategy.
[0064] Specifically, the sample status information and the preset power balancing strategy corresponding to the sample status information are input into the battery simulation model to simulate the battery operation process, and the predicted battery status information at each subsequent moment is determined as the battery target control state information at each subsequent moment. The reward and punishment function is a function used to evaluate the quality of the power balancing strategy formulated by the power balancing strategy model under the sample status information. The predicted battery status information and the battery target control state information at the same subsequent moment are input into the reward and punishment function, and the reward and punishment values are calculated and processed. The reward and punishment values are numerical values used to guide the training of the power balancing strategy model. Optionally, the reward and punishment function is a function that calculates the inverse of the absolute value of the difference between the predicted battery status information and the battery target control state information.
[0065] Specifically, the reward and punishment function is expressed as Wherein, T represents the total number of subsequent moments, wherein T is greater than or equal to 1, and u(t) represents the predicted battery status information corresponding to the t-th subsequent moment, Characterizes the battery target control state information corresponding to the t-th subsequent moment. Exemplarily, assuming that the difference between the predicted battery state information and the battery target control state information is very small, the reward and penalty value determined based on the above reward and penalty function is a negative number approaching zero.
[0066] The technical solution of this embodiment determines the reward and punishment value as a negative number based on the reward and punishment function, ensuring that the smaller the difference between the predicted battery status information and the battery target control status information, the larger the reward and punishment value, so that the reward and punishment value can well represent the difference between the predicted battery status information and the battery target control status information.
[0067] By incentivizing the power balancing strategy model based on the big bonus and penalty value, and penalizing the power balancing strategy model based on the small bonus and penalty value, the parameters of the power balancing strategy model are adjusted. For example, assuming that the reward value is -0.01, it can be considered that the difference between the predicted battery state information and the battery target control state information is small, then the power balancing strategy model is incentivized, so that the power balancing strategy model adjusts the parameters along the direction of the current parameter adjustment; assuming that the reward value is -10, it can be considered that the difference between the predicted battery state information and the battery target control state information is large, then the power balancing strategy model is penalized, so that the power balancing strategy model changes the direction of parameter adjustment to adjust the parameters.
[0068] The technical solution of this embodiment can quickly determine the battery target control state information based on sample status information and preset power balancing strategy, thereby improving the training efficiency of the power balancing strategy model; and can guide the direction of parameter adjustment of the power balancing strategy model based on reward and punishment values, thereby improving the training efficiency of the power balancing strategy model and the decision accuracy of the trained power balancing strategy model.
[0069] The end condition of the power balancing strategy model training is the condition for ending the power balancing strategy model training. Exemplarily, the end condition of the power balancing strategy model training includes the convergence of the loss function value and / or the reward and punishment value and reaching a fixed number of training rounds, etc. This embodiment does not limit this. In the case that the end condition of the power balancing strategy model training is not met, the power balancing strategy model is trained by offline reinforcement learning based on the battery simulation model, and the parameters of the power balancing strategy model are adjusted until the end condition of the power balancing strategy model training is met to obtain a trained power balancing strategy model.
[0070] In some embodiments, the sample state information includes battery state information and operating state information. The power balancing strategy model generates different prediction action requests under the same battery state and different operating state conditions.
[0071] The technical solution of this embodiment is to obtain a state data set of the vehicle during driving, wherein the state data set includes battery action information and battery state information; the battery state information includes the remaining power information of multiple single batteries in the battery pack; generate a battery simulation model based on the state data set, and the battery simulation model is used to describe the battery operation process during vehicle driving; collect sample state information of the battery based on the battery simulation model; train the power balancing strategy model to be trained to obtain a trained power balancing strategy model: generate a predicted action request corresponding to the sample state information of the battery based on the power balancing strategy model in the training process, obtain predicted battery state information corresponding to the predicted action request based on the battery simulation model, and adjust the parameters of the power balancing strategy model based on the predicted battery state information and the battery target control state information, so that the power balancing strategy model can be trained for offline reinforcement learning based on the battery simulation model instead of online reinforcement learning training of the actual vehicle, which can reduce the cost of training the power balancing strategy model, and the sample state information generated by the battery simulation model is data enhancement of the battery state information in the state data set, which can avoid overfitting in the training process of the power balancing strategy model, solve the problem of difficulty in reinforcement learning training of the power balancing strategy model, and improve the generalization of the power balancing strategy model.
[0072] Embodiment 2
[0073] Figure 2 1 is a flow chart of a method for training a power balancing strategy model provided by Embodiment 2 of the present invention. The technical solution of the embodiment of the present invention is further optimized on the basis of any of the above embodiments. Figure 2 As shown, the method includes:
[0074] S210, obtaining a state data set of the vehicle during driving; wherein the state data set includes battery action information and battery state information; the battery state information includes remaining power information of multiple single batteries in the battery pack.
[0075] S220: Generate a battery simulation model based on the state data set, where the battery simulation model is used to describe the battery operation process during vehicle driving.
[0076] S230. Verify the battery simulation model, wherein the verification process includes: performing a real vehicle test based on a preset action sequence to obtain a battery target state sequence; inputting the preset action sequence into the battery simulation model to predict a battery simulation state sequence; verifying the battery simulation state sequence based on the battery target state sequence, and if the verification fails, continuing to train the battery simulation model until the verification passes.
[0077] In this embodiment, the preset action sequence is a sequence of battery action information pre-set to include at least one moment. Exemplarily, Table 1 is a table of the correspondence between battery action information and serial numbers provided in Embodiment 2 of the present invention. As shown in Table 1, each battery action information has a corresponding serial number. The preset action sequence is obtained by combining the serial number corresponding to at least one preset battery action. For example, the preset action sequence is "12", which indicates that the battery action information at the first moment is the battery action information corresponding to the serial number "1", and the battery action information at the second moment is the battery action information corresponding to the serial number "2".
[0078] Table 1
[0079]
[0080] Specifically, the battery target state sequence is a sequence that characterizes the actual battery state information corresponding to the preset action sequence. The driver drives the actual vehicle based on the operation corresponding to the preset action sequence, and records the battery state information at the start time of the actual vehicle, so that the battery operation process during the vehicle driving is the battery operation process corresponding to the preset action sequence. Based on the BMS, the battery state information of at least one subsequent moment is collected, and the battery state information of at least one subsequent moment obtained by the actual vehicle test is combined based on the order of timestamps to obtain the battery target state sequence. The battery simulation state sequence is a sequence of battery state information generated by the battery simulation model that characterizes the preset action sequence. By inputting the preset action sequence into a battery simulation model whose initial battery state information is the battery state information of the actual vehicle at the start time, the battery simulation model predicts the battery state information of at least one subsequent moment based on the initial battery state information and the battery state information of at least one moment in the preset action sequence, and the battery state information of at least one subsequent moment predicted by the battery simulation model is combined based on the order of timestamps to obtain the battery simulation state sequence.
[0081] By comparing the battery target state sequence with the battery simulation state sequence, the degree of difference between the battery target state sequence and the battery simulation state sequence is determined. When the above degree of difference does not meet the verification pass condition, it can be considered that the battery simulation model cannot be used as a virtual environment for reinforcement learning, and the verification is determined to be unsuccessful, and the battery simulation model is continued to be trained; until the battery simulation state sequence predicted by the updated battery simulation model meets the verification pass condition, the degree of difference between the battery target state sequence and the battery simulation model can be considered to be a virtual environment for reinforcement learning, and the verification is determined to be passed. Among them, the verification of the battery simulation model can be that the above degree of difference meets the preset difference degree range, and the preset difference degree range is the preset range of the above degree of difference, which is used to determine the verification pass. For example, it is assumed that the above degree of difference is the Euclidean distance between the battery target state sequence and the battery simulation state sequence, and the preset difference degree range is (0.0, 0.2).
[0082] S240: Collect sample status information of the battery based on the battery simulation model.
[0083] S250. Train the power balancing strategy model to be trained to obtain a trained power balancing strategy model: generate a predicted action request corresponding to the sample status information of the battery based on the power balancing strategy model during the training process, obtain predicted battery status information corresponding to the predicted action request based on the battery simulation model, and adjust parameters of the power balancing strategy model based on the predicted battery status information and the battery target control status information.
[0084] Optionally, after obtaining the trained power balancing strategy model, it also includes: verifying the power balancing strategy model, wherein the verification process includes: deploying the power balancing strategy model to the vehicle's BMS; at preset intervals, inputting the battery status information collected by the BMS into the power balancing strategy model, generating control action instructions, so that the BMS adjusts the battery power of the vehicle based on the control action instructions; when the adjusted battery status information collected by the BMS does not meet the power balancing conditions, it is determined that the verification has failed, and the power balancing strategy model continues to be trained until the verification passes.
[0085] Specifically, by encapsulating the power balancing strategy model into a function, and pre-storing the above function in the vehicle's memory or server, during the vehicle's driving, at every preset interval, the BMS calls the function corresponding to the power balancing strategy model, and inputs the battery status information collected by the BMS in real time into the above function, to obtain the control action instruction generated by the power balancing strategy model. Among them, the preset interval time is the time interval between two adjacent calls to the function corresponding to the power balancing strategy model in the process of actual vehicle verification of the power balancing strategy model. Exemplarily, the preset interval time is 20 milliseconds; the control action instruction is an instruction for balancing the power of multiple single batteries in the battery pack, including at least one subsequent moment of battery action information. In response to the control action instruction, the BMS balances the power of multiple single batteries and collects at least one subsequent moment of real-time battery action information. The power balancing condition is a condition for determining that the control action instruction can balance the power of multiple single batteries. Exemplarily, the power balancing condition is that the change trend of the power of multiple single batteries in the battery pack is that the power of multiple single batteries tends to be the same. By comparing the real-time battery action information of at least one subsequent moment with the power balancing condition, if the power balancing condition is not met, it can be considered that the power balancing strategy model cannot balance the power of multiple single batteries, and the power balancing strategy model verification is determined to be unsuccessful, and the power balancing strategy model is continuously trained; until at least one subsequent moment of real-time battery action information generated by the updated power balancing strategy model meets the power balancing condition, it can be considered that the power balancing strategy model can balance the power of multiple single batteries, and the power balancing strategy model verification is determined to be successful. By conducting real-vehicle verification on the power balancing strategy model, the power balancing strategy model can be optimized in a timely manner to ensure the practicality of the power balancing strategy model.
[0086] In some embodiments, based on the battery status information and battery action information collected during actual vehicle verification, online reinforcement learning is performed on the power balancing strategy model and / or the battery simulation model, which can improve the performance and accuracy of the power balancing strategy model and / or the battery simulation model.
[0087] The technical solution of this embodiment verifies the battery simulation model after generating the battery simulation model based on the state data set, wherein the verification process includes: performing actual vehicle testing based on a preset action sequence to obtain a battery target state sequence; inputting the preset action sequence into the battery simulation model to predict the battery simulation state sequence; verifying the battery simulation state sequence based on the battery target state sequence, and if the verification fails, continuing to train the battery simulation model until the verification passes, which can ensure the performance and accuracy of the battery simulation model and help ensure the reliability of subsequent offline reinforcement learning training of the power balancing strategy model based on the battery simulation model.
[0088] Embodiment 3
[0089] Figure 3 This is a flow chart of a power balancing method provided by the third embodiment of the present invention. This embodiment is applicable to the case of performing power balancing adjustment on multiple single batteries of a vehicle. The method can be executed by a power balancing device. The power balancing device can be implemented in the form of hardware and / or software. The power balancing device can be configured in a vehicle. Figure 3 As shown, the method includes:
[0090] S310. Obtaining battery status information of the vehicle based on a preset time interval.
[0091] In this embodiment, the preset time interval is the time interval between two consecutive times of obtaining battery status information. The BMS collects the remaining power information of multiple single batteries of the battery pack of the vehicle in real time at every preset time interval to obtain the battery status information of the vehicle. Exemplarily, the preset time interval is 20 milliseconds.
[0092] S320: Input the battery status information into a power balancing strategy model to obtain a control action instruction.
[0093] Specifically, a power balancing strategy model stored in the vehicle or server is called, the battery status information is input into the power balancing strategy model in real time, and power balancing strategy prediction processing is performed to obtain control action instructions corresponding to the battery status information at each moment.
[0094] Exemplarily, assuming that the current battery status information is that the remaining power information of two cells is 20% and 60% respectively, the control action instructions include standard charging of the cells with a remaining power of 20% and standard discharging of the cell with a remaining power of 60%.
[0095] S330: Balance and adjust the power of multiple single batteries in the battery pack based on the control action instruction to achieve power balance of the multiple single batteries.
[0096] Specifically, the BMS responds to the control action instruction to balance the power of multiple single batteries, so that the single batteries with more remaining power are discharged and the single batteries with less remaining power are charged, and the single batteries are prevented from being overcharged and over-discharged, thereby achieving power balance of multiple single batteries.
[0097] Exemplarily, based on the control action instruction, the BMS performs standard charging on the battery whose remaining power information is 20%, and performs standard discharge on the battery whose remaining power information is 60%.
[0098] The technical solution of this embodiment obtains the battery status information of the vehicle based on a preset time interval; inputs the battery status information into a power balancing strategy model to obtain a control action instruction; and balances and adjusts the power of multiple single batteries in a battery pack based on the control action instruction to achieve power balancing of multiple single batteries. It can balance and adjust the power of multiple single batteries in an electric vehicle based on the power balancing strategy model, which helps to improve the battery life estimation accuracy of the BMS battery, improves the battery life of a single battery, and can provide the battery life of a battery pack without a power balancing strategy model with a small number of single batteries, thereby reducing the cost of the vehicle.
[0099] Embodiment 4
[0100] Figure 4 Schematic diagram of a power balancing strategy model training device provided by the fourth embodiment of the present invention. Figure 4 As shown, the device comprises:
[0101] The status data set acquisition module 410 is used to acquire the status data set of the vehicle during driving; wherein the status data set includes battery action information and battery status information; the battery status information includes the remaining power information of multiple single batteries in the battery pack;
[0102] A battery simulation model generation module 420 is used to generate a battery simulation model based on a state data set, and the battery simulation model is used to describe the battery operation process during vehicle driving;
[0103] A sample state information collection module 430 is used to collect sample state information of the battery based on the battery simulation model;
[0104] The power balancing strategy model training module 440 is used to train the power balancing strategy model to be trained to obtain a trained power balancing strategy model: generate a predicted action request corresponding to the sample status information of the battery based on the power balancing strategy model during the training process, obtain the predicted battery status information corresponding to the predicted action request based on the battery simulation model, and adjust the parameters of the power balancing strategy model based on the predicted battery status information and the battery target control status information.
[0105] The technical solution of this embodiment is to obtain a state data set of the vehicle during driving, wherein the state data set includes battery action information and battery state information; the battery state information includes the remaining power information of multiple single batteries in the battery pack; generate a battery simulation model based on the state data set, and the battery simulation model is used to describe the battery operation process during vehicle driving; collect sample state information of the battery based on the battery simulation model; train the power balancing strategy model to be trained to obtain a trained power balancing strategy model: generate a predicted action request corresponding to the sample state information of the battery based on the power balancing strategy model in the training process, obtain predicted battery state information corresponding to the predicted action request based on the battery simulation model, and adjust the parameters of the power balancing strategy model based on the predicted battery state information and the battery target control state information, so that the power balancing strategy model can be trained for offline reinforcement learning based on the battery simulation model instead of online reinforcement learning training of the actual vehicle, which can reduce the cost of training the power balancing strategy model, and the sample state information generated by the battery simulation model is data enhancement of the battery state information in the state data set, which can avoid overfitting in the training process of the power balancing strategy model, solve the problem of difficulty in reinforcement learning training of the power balancing strategy model, and improve the generalization of the power balancing strategy model.
[0106] On the basis of the above embodiment, optionally, the battery simulation model generation module 420 is specifically used to: execute the following steps, perform generative adversarial training on the generator and the discriminator based on the state data set, and determine the trained generator as the battery simulation model when the end condition is met: generate a battery action-state sequence based on the generator; the battery action-state sequence includes battery action information and battery state information at multiple moments; the battery action information at the current moment corresponds to the battery state information at the next moment; determine the expected reward corresponding to the battery action-state sequence based on the discriminator; and update the generator and the discriminator based on the expected reward.
[0107] On the basis of the above-mentioned embodiment, optionally, the power balancing strategy model training device also includes: a battery simulation model verification module, which is used to verify the battery simulation model after the battery simulation model generation module 420, wherein the verification process includes: performing actual vehicle testing based on a preset action sequence to obtain a battery target state sequence; inputting the preset action sequence into the battery simulation model to predict a battery simulation state sequence; verifying the battery simulation state sequence based on the battery target state sequence, and if the verification fails, continuing to train the battery simulation model until the verification passes.
[0108] Based on the above embodiments, optionally, a power balancing strategy model training module 440 is specifically used to: determine the battery target control state information based on sample state information and a preset power balancing strategy; substitute the predicted battery state information and the battery target control state information into a reward and punishment function to calculate the reward and punishment value; and adjust the parameters of the power balancing strategy model based on the reward and punishment value.
[0109] On the basis of the above embodiment, optionally, the reward and punishment function is a function that calculates the inverse of the absolute value of the difference between the predicted battery state information and the battery target control state information.
[0110] Based on the above embodiment, optionally, the state data set also includes operating condition status information; accordingly, the battery simulation model is used to describe the battery operation process during vehicle driving under different operating conditions; the sample state information also includes operating condition status information.
[0111] The power balancing strategy model training device provided in the embodiment of the present invention can execute the power balancing strategy model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0112] Embodiment 5
[0113] Figure 5 FIG. 1 is a schematic diagram of the structure of a power balancing device provided by Embodiment 5 of the present invention. Figure 5 As shown, the device comprises:
[0114] A battery status information acquisition module 510 is used to acquire the battery status information of the vehicle based on a preset time interval;
[0115] A control action instruction generating module 520 is used to input the battery status information into the power balancing strategy model to obtain a control action instruction;
[0116] The power balancing and adjusting module 530 is used to balance and adjust the power of multiple single batteries in the battery pack based on the control action instruction to achieve power balancing of the multiple single batteries.
[0117] The technical solution of this embodiment obtains the battery status information of the vehicle based on a preset time interval; inputs the battery status information into a power balancing strategy model to obtain a control action instruction; and balances and adjusts the power of multiple single batteries in a battery pack based on the control action instruction to achieve power balancing of multiple single batteries. It can balance and adjust the power of multiple single batteries in an electric vehicle based on the power balancing strategy model, which helps to improve the battery life estimation accuracy of the BMS battery, improves the battery life of a single battery, and can provide the battery life of a battery pack without a power balancing strategy model with a small number of single batteries, thereby reducing the cost of the vehicle.
[0118] The power balancing device provided in the embodiment of the present invention can execute the power balancing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0119] Embodiment 6
[0120] Figure 6 1 is a schematic diagram of the structure of an electronic device that implements the power balancing strategy model training method of an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0121] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0122] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0123] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a power balancing strategy model training method and a power balancing method.
[0124] In some embodiments, the power balancing strategy model training method and / or the power balancing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the power balancing strategy model training method and / or the power balancing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the power balancing strategy model training method and / or the power balancing method in any other appropriate manner (e.g., by means of firmware).
[0125] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] The computer program for implementing the power balancing strategy model training method and / or power balancing method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as an independent software package and partially on a remote machine, or completely on a remote machine or server.
[0127] Embodiment 7
[0128] Embodiment 7 of the present invention further provides a computer-readable storage medium, the computer-readable storage medium storing computer instructions, the computer instructions being used to enable a processor to execute a power balancing strategy model training method, the method comprising:
[0129] Acquire a state data set of the vehicle during driving; wherein the state data set includes battery action information and battery state information; the battery state information includes the remaining power information of multiple single batteries in the battery pack; generate a battery simulation model based on the state data set, and the battery simulation model is used to describe the battery operation process during vehicle driving; collect sample state information of the battery based on the battery simulation model; train the power balancing strategy model to be trained to obtain a trained power balancing strategy model: generate a predicted action request corresponding to the sample state information of the battery based on the power balancing strategy model in the training process, obtain predicted battery state information corresponding to the predicted action request based on the battery simulation model, and adjust parameters of the power balancing strategy model based on the predicted battery state information and the battery target control state information.
[0130] and / or a power balancing method, the method comprising:
[0131] The battery status information of the vehicle is obtained based on a preset time interval; the battery status information is input into a power balancing strategy model to obtain a control action instruction; and the power of multiple single batteries in the battery pack is balanced and adjusted based on the control action instruction to achieve power balancing of the multiple single batteries.
[0132] In the context of the present invention, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. More specific examples of machine readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0133] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0134] The systems and techniques described herein may be implemented in a computing system that includes a backend (e.g., as a data server), or a computing system that includes middleware (e.g., an application server), or a computing system that includes a frontend (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backends, middleware, or frontends. The systems may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0135] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0136] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0137] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for training a power balancing strategy model, characterized in that: The method comprises: Acquire a state data set of the vehicle during driving; wherein the state data set includes battery action information and battery state information; the battery state information includes remaining power information of multiple single batteries in the battery pack; Generate a battery simulation model based on the state data set, wherein the battery simulation model is used to describe the battery operation process during vehicle driving; Collecting sample status information of the battery based on the battery simulation model; The power balancing strategy model to be trained is trained to obtain a trained power balancing strategy model: a prediction action request corresponding to the sample state information of the battery is generated based on the power balancing strategy model in the training process, predicted battery state information corresponding to the prediction action request is obtained based on the battery simulation model, and parameters of the power balancing strategy model are adjusted based on the predicted battery state information and the battery target control state information; The generating a battery simulation model based on the state data set comprises: The following steps are performed to perform generative adversarial training on the generator and the discriminator based on the state data set, and when the end condition is met, the trained generator is determined as the battery simulation model: Generate a battery action-state sequence based on the generator; the battery action-state sequence includes battery action information and battery state information at multiple moments; the battery action information at the current moment corresponds to the battery state information at the next moment; Determining the expected reward corresponding to the battery action-state sequence based on the discriminator; Updating the generator and the discriminator based on the expected reward; The battery action information is information representing the charging or discharging actions of multiple single batteries in the battery pack.
2. The method according to claim 1, characterized in that After the battery simulation model is generated, the method further includes: verifying the battery simulation model, wherein the verification process includes: Perform real vehicle testing based on the preset action sequence to obtain the battery target state sequence; Inputting the preset action sequence into the battery simulation model to predict a battery simulation state sequence; The battery simulation state sequence is verified based on the battery target state sequence, and if the verification fails, the battery simulation model is continuously trained until the verification passes.
3. The method according to claim 1, characterized in that The step of adjusting parameters of the battery balancing strategy model based on the predicted battery state information and the battery target control state information includes: Determining the battery target control state information based on the sample state information and a preset power balancing strategy; Substituting the predicted battery state information and the battery target control state information into a reward and punishment function to calculate a reward and punishment value; Parameters of the power balancing strategy model are adjusted based on the reward and penalty values.
4. The method according to claim 3, characterized in that The reward and punishment function is a function that calculates the inverse of the absolute value of the difference between the predicted battery state information and the battery target control state information.
5. The method according to claim 1, characterized in that The state data set also includes operating state information; Accordingly, the battery simulation model is used to describe the battery operation process during vehicle driving under different operating conditions; The sample status information also includes the operating condition status information.
6. A power balancing method, characterized in that: The method comprises: Obtaining battery status information of the vehicle based on a preset time interval; Inputting the battery status information into a power balancing strategy model to obtain a control action instruction; Based on the control action instruction, the power of multiple single batteries in the battery pack is balanced to achieve power balance of the multiple single batteries; Wherein, the power balancing strategy model is trained by a power balancing strategy model training method described in claim 1.
7. A power balancing strategy model training device, characterized in that: include: A status data set acquisition module is used to acquire a status data set of the vehicle during driving; wherein the status data set includes battery action information and battery status information; the battery status information includes the remaining power information of multiple single batteries in the battery pack; A battery simulation model generation module, used to generate a battery simulation model based on the state data set, wherein the battery simulation model is used to describe the battery operation process during vehicle driving; A sample state information acquisition module, used for acquiring sample state information of the battery based on the battery simulation model; A power balancing strategy model training module is used to train the power balancing strategy model to be trained to obtain a trained power balancing strategy model: generate a prediction action request corresponding to the sample state information of the battery based on the power balancing strategy model in the training process, obtain the predicted battery state information corresponding to the predicted action request based on the battery simulation model, and adjust the parameters of the power balancing strategy model based on the predicted battery state information and the battery target control state information; The battery simulation model generation module is specifically used for: The following steps are performed to perform generative adversarial training on the generator and the discriminator based on the state data set, and when the end condition is met, the trained generator is determined as the battery simulation model: Generate a battery action-state sequence based on the generator; the battery action-state sequence includes battery action information and battery state information at multiple moments; the battery action information at the current moment corresponds to the battery state information at the next moment; Determining the expected reward corresponding to the battery action-state sequence based on the discriminator; Updating the generator and the discriminator based on the expected reward; The battery action information is information representing the charging or discharging actions of multiple single batteries in the battery pack.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power balancing strategy model training method described in any one of claims 1-5 or the power balancing method described in claim 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the power balancing strategy model training method described in any one of claims 1 to 5 or the power balancing method described in claim 6 when executed.
