Method, device and electronic device for estimating state of charge of vehicle battery
By using a target neural network model and data preprocessing methods, and training a base learner with multiple sets of historical discharge parameters, the problem of low accuracy in estimating the state of charge (SOC) of lithium-ion batteries was solved, and accurate estimation of the SOC value of the battery was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA FAW CO LTD
- Filing Date
- 2022-09-09
- Publication Date
- 2026-05-26
AI Technical Summary
The lack of nonlinearity in existing lithium-ion battery state-of-charge estimation models leads to low estimation accuracy, especially at low SOC values, making it impossible to accurately estimate the battery state.
A target neural network model is adopted, which uses multiple base learners to train historical discharge parameters, including discharge voltage, current and temperature, through machine learning to predict the state of charge of the battery. Combined with data preprocessing, expansion and optimization of training parameters, the estimation accuracy is improved.
It achieves accurate estimation of battery state of charge, improves estimation accuracy within different SOC ranges, and solves the problem of low accuracy caused by nonlinear models.
Smart Images

Figure CN116256639B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicles, and more specifically, to a method, apparatus, and electronic device for estimating the state of charge of a vehicle battery. Background Technology
[0002] With the development of vehicle electrification, lithium-ion batteries, as on-board power batteries, have become one of the hot research topics. During battery operation, it is impossible to obtain the internal working state of the battery, thus making it impossible to calculate the real-time State of Charge (SOC) value. Therefore, the SOC value of the on-board power battery can only be estimated based on the battery's output signal using model algorithms.
[0003] Because lithium-ion batteries are typical time-varying nonlinear systems, the correspondence between their internal states and external output signals is complex. Therefore, purely physical modeling is highly complex and difficult to implement. Related technologies often employ physical modeling methods based on RC equivalent circuits to estimate the battery's state of charge (SOC). This method offers high accuracy when the SOC is high, but low accuracy when the SOC is low, failing to adequately consider the battery's nonlinearity.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides a method, apparatus, and electronic device for estimating the state of charge (SOC) of a vehicle battery, thereby at least addressing the technical problem of low accuracy in battery SOC estimation caused by insufficient nonlinearity in the battery SOC estimation model in related technologies.
[0006] According to one embodiment of the present invention, a method for estimating the state of charge (SOC) of a vehicle battery is provided, comprising: acquiring target discharge parameters corresponding to a target battery, wherein the target discharge parameters are used to represent the discharge status of the target battery at a first moment; predicting the target discharge parameters using a target neural network to obtain a target prediction result corresponding to the target battery, wherein the target prediction result is used to represent the SOC of the target battery at a second moment, the target neural network comprising multiple base learners, the base learners being trained by machine learning using multiple sets of historical discharge parameters, each set of parameters in the multiple sets of historical discharge parameters including: discharge voltage, discharge current, a first measurement temperature, and a second measurement temperature.
[0007] Optionally, the method for estimating the state of charge of a vehicle battery further includes: obtaining an initial dataset, wherein the initial dataset includes multiple sets of historical discharge parameters of the target battery at different times; performing data preprocessing on the initial dataset to obtain an intermediate dataset; and performing data augmentation on the intermediate dataset to obtain a target dataset, wherein the target dataset is used to train a target neural network.
[0008] Optionally, data preprocessing of the initial dataset to obtain an intermediate dataset includes: filtering the initial dataset to obtain filtering results; filling the filtering results to obtain filled results; and performing outlier testing on the filled results to obtain an intermediate dataset.
[0009] Optionally, using a target neural network to predict the target discharge parameters and obtain the target prediction result corresponding to the target battery includes: sampling the target dataset according to a preset sampling ratio to obtain multiple data subsets, wherein different data subsets include different discharge parameters; training a corresponding base learner using each data subset in the multiple data subsets to obtain multiple initial prediction results; and determining the target prediction result based on the multiple initial prediction results.
[0010] Optionally, the base learner includes an input layer, a hidden layer, a continuation layer, and an output layer. The corresponding base learner is trained using each of the multiple data subsets to obtain multiple initial prediction results, including:
[0011] Repeat the following steps for each base learner:
[0012] The input layer is used to pass data subsets corresponding to the base learners to obtain the first processing result; the hidden layer is used to activate the first processing result to obtain the second processing result; the connecting layer is used to iteratively process the second processing result to obtain the third processing result; and the output layer is used to weight the third processing result to obtain the initial prediction result.
[0013] Optionally, the method for estimating the state of charge of the vehicle battery further includes: optimizing the training parameters of the target neural network using a grid search approach, wherein the training parameters include the number of multiple base learners.
[0014] Optionally, the method for estimating the state of charge of the vehicle battery further includes: acquiring a test dataset; calculating the target evaluation parameters corresponding to the test dataset; and evaluating the performance of the target neural network based on the target evaluation parameters, wherein the target evaluation parameters are used to represent the mean absolute percentage error corresponding to the test dataset.
[0015] According to one embodiment of the present invention, a device for estimating the state of charge of a vehicle battery is also provided, comprising:
[0016] The acquisition module is used to acquire the target discharge parameters corresponding to the target battery, wherein the target discharge parameters are used to represent the discharge status of the target battery at the first moment; the prediction module is used to predict the target discharge parameters using a target neural network to obtain the target prediction result corresponding to the target battery, wherein the target prediction result is used to represent the state of charge of the target battery at the second moment. The target neural network includes multiple base learners, which are trained by machine learning using multiple sets of historical discharge parameters. Each set of parameters in the multiple sets of historical discharge parameters includes: discharge voltage, discharge current, first measurement temperature and second measurement temperature.
[0017] Optionally, the device for estimating the state of charge of a vehicle battery further includes: a processing module for acquiring an initial dataset, wherein the initial dataset includes multiple sets of historical discharge parameters of the target battery at different times; performing data preprocessing on the initial dataset to obtain an intermediate dataset; and performing data augmentation on the intermediate dataset to obtain a target dataset, wherein the target dataset is used to train a target neural network.
[0018] Optionally, the processing module is also used to: preprocess the initial dataset to obtain an intermediate dataset, including: filtering the initial dataset to obtain filtering results; filling the filtering results to obtain filled results; and performing outlier detection on the filled results to obtain an intermediate dataset.
[0019] Optionally, the prediction module is further configured to: predict the target discharge parameters using the target neural network to obtain the target prediction result corresponding to the target battery, including: sampling the target dataset according to a preset sampling ratio to obtain multiple data subsets, wherein different data subsets include different discharge parameters; training a corresponding base learner using each data subset in the multiple data subsets to obtain multiple initial prediction results; and determining the target prediction result based on the multiple initial prediction results.
[0020] Optionally, the prediction module is further configured to: repeatedly perform the following steps for each base learner: pass the data subset corresponding to the base learner through the input layer to obtain a first processing result; activate the first processing result through the hidden layer to obtain a second processing result; iteratively process the second processing result through the continuation layer to obtain a third processing result; and weight the third processing result through the output layer to obtain an initial prediction result.
[0021] Optionally, the vehicle battery state of charge estimation device further includes: an optimization module for optimizing the training parameters of the target neural network using a grid search method, wherein the training parameters include the number of multiple base learners.
[0022] Optionally, the device for estimating the state of charge of the vehicle battery further includes: an evaluation module for acquiring a test dataset; calculating target evaluation parameters corresponding to the test dataset; and evaluating the performance of a target neural network based on the target evaluation parameters, wherein the target evaluation parameters are used to represent the mean absolute percentage error corresponding to the test dataset.
[0023] According to one embodiment of the present invention, a non-volatile storage medium is also provided, wherein a computer program is stored in the storage medium, and the computer program is configured to execute the vehicle battery state of charge estimation method described in any of the above embodiments when running.
[0024] According to one embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the vehicle battery state of charge estimation method of any of the above.
[0025] In this embodiment of the invention, by obtaining the target discharge parameters corresponding to the target battery, wherein the target discharge parameters are used to represent the discharge status of the target battery at the first moment, and then using the target neural network to predict the target discharge parameters, the target prediction result corresponding to the target battery is obtained, thereby achieving the purpose of estimating the state of charge of the battery using the neural network model, thus realizing the technical effect of accurately estimating the SOC value of the battery, and thus solving the technical problem of low accuracy of battery state of charge estimation caused by the lack of nonlinearity of the battery state of charge estimation model in related technologies. Attached Figure Description
[0026] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0027] Figure 1 This is a flowchart of a method for estimating the state of charge of a vehicle battery according to one embodiment of the present invention;
[0028] Figure 2 This is a schematic diagram of a box-type diagram according to one embodiment of the present invention;
[0029] Figure 3 This is a schematic diagram of a target neural network model structure according to one embodiment of the present invention;
[0030] Figure 4 This is a schematic diagram of a method for estimating the state of charge of a vehicle battery according to one embodiment of the present invention;
[0031] Figure 5This is a structural block diagram of a vehicle battery state of charge estimation device according to one embodiment of the present invention. Detailed Implementation
[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0034] In related technologies, methods for estimating the SOC value of lithium-ion batteries also include: ampere-hour integration method, open-circuit voltage method, and filtering methods based on physical models.
[0035] The ampere-hour integration method integrates the current over a preset time period based on the definition of energy consumption to obtain the energy consumption within that time period. However, since the ampere-hour integration method uses an open-loop system, it cannot effectively correct for initial system errors or adjust for deviations caused by factors such as noise, resulting in a large deviation in the estimated battery state of charge (SOC).
[0036] The open-circuit voltage method utilizes the correlation between open-circuit voltage (OCV) and battery state of charge (SOC) to experimentally obtain an OCV-SOC calibration curve, thereby estimating the battery's SOC value. However, obtaining the OCV value of a lithium-ion battery requires prolonged resting, making real-time SOC estimation impossible. Furthermore, for lithium iron phosphate batteries, the corresponding OCV-SOC curve exhibits a distinct plateau, meaning even a small OCV error can lead to a significant deviation in the estimated SOC value.
[0037] Among physical model-based filtering methods, the most common is the Kalman filter. It uses the actual output data of the system, based on the target system's state-space model, noise statistics, and known initial values, and corrects the target variable according to the minimum mean square error principle to obtain the optimal solution for the battery's state of charge (SOC). From a practical perspective, the battery's physical model is mainly based on the equivalent circuit model. While this method overcomes the problem of heavy reliance on initial values in the ampere-hour integration method and has lower requirements for the accuracy of initial value estimation, it heavily depends on the establishment of the equivalent circuit model. The complexity of establishing the equivalent circuit model needs to balance the system's real-time and accuracy requirements; therefore, the complexity of establishing the equivalent circuit model is relatively high, and the hardware requirements are also high.
[0038] According to an embodiment of the present invention, a method for estimating the state of charge of a vehicle battery is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0039] This method embodiment can be executed in an electronic device or similar computing device that includes memory and a processor in a vehicle. Taking an electronic device running in a vehicle as an example, the vehicle's electronic device may include one or more processors (processors may include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), digital signal processing (DSP) chips, microprocessors (MCUs), programmable logic devices (FPGAs), neural network processors (NPUs), tensor processors (TPUs), artificial intelligence (AI) type processors, etc.) and memory for storing data. Optionally, the above-described automotive electronic device may also include transmission devices, input / output devices, and display devices for communication functions. Those skilled in the art will understand that the above structural description is merely illustrative and does not limit the structure of the vehicle's electronic device. For example, the vehicle's electronic device may include more or fewer components than described above, or have a different configuration than described above.
[0040] The memory can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the vehicle battery state of charge estimation method in this embodiment of the invention. The processor executes various functional applications and data processing by running the computer program stored in the memory, thereby implementing the aforementioned vehicle battery state of charge estimation method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0041] The transmission device is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0042] The display device can be, for example, a touchscreen liquid crystal display (LCD) and a touch display (also referred to as a "touchscreen" or "touch display"). This LCD allows the user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which the user can interact with by touching a touch-sensitive surface with fingers and / or gestures. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, a call interface, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.
[0043] Figure 1 This is a flowchart of a method for estimating the state of charge of a vehicle battery according to one embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0044] Step S12: Obtain the target discharge parameters corresponding to the target battery, wherein the target discharge parameters are used to represent the discharge status of the target battery at the first moment.
[0045] Step S14: The target discharge parameters are predicted using the target neural network to obtain the target prediction result corresponding to the target battery. The target prediction result is used to represent the state of charge of the target battery at the second time. The target neural network includes multiple base learners. The base learners are trained by machine learning using multiple sets of historical discharge parameters. Each set of parameters in the multiple sets of historical discharge parameters includes: discharge voltage, discharge current, first measurement temperature and second measurement temperature.
[0046] Specifically, the target discharge parameters are used to represent the discharge status of the target battery at the first moment, where the first moment is time k-1, and the target discharge parameters may include the battery's discharge voltage U. k-1 Discharge current I k-1 First measured temperature Tmax k-1 and the second measured temperature Tmin k-1 The target neural network is an Elman neural network, which can include multiple base learners trained through machine learning. The target prediction result is used to represent the SOC value at the second time step, which can be denoted as SOC. k , where the second time point is time k.
[0047] Based on the above steps S12 to S14, by obtaining the target discharge parameters of the target battery at the first moment and using the target neural network to predict the target discharge parameters, the SOC value of the target battery at the second moment is obtained. This achieves the purpose of estimating the state of charge of the battery using a neural network model, thereby realizing the technical effect of accurately estimating the SOC value of the battery. This solves the technical problem of low accuracy in battery state of charge estimation caused by the lack of nonlinearity in the battery state of charge estimation model in related technologies.
[0048] Optionally, the method for estimating the state of charge of the vehicle battery further includes the following steps:
[0049] Step S111: Obtain the initial dataset, wherein the initial dataset includes multiple sets of historical discharge parameters of the target battery at different times;
[0050] Step S112: Perform data preprocessing on the initial dataset to obtain an intermediate dataset;
[0051] Step S113: Expand the intermediate dataset to obtain the target dataset, which is used to train the target neural network.
[0052] Specifically, the initial dataset includes multiple sets of historical discharge parameters of the target battery at different times. These historical discharge parameters may include the battery's discharge voltage U, discharge current I, first measurement temperature Tmax, and second measurement temperature Tmin. For example, the initial dataset includes multiple sets of historical discharge parameters of the target battery at times t1, t2, and t3, respectively, U... t1 I t1 Tmax t1 Tmin t1 U t2 I t2 Tmax t2 Tmin t2 U t3 I t3 Tmax t3 Tmin t3 Data preprocessing can include filtering, imputation, and outlier detection.
[0053] Before augmenting the intermediate dataset, it can be divided and processed, including dividing the intermediate dataset into training set, validation set and test set, and using a multidimensional vector S = [U, I, Tmax, Tmax, SOC] to represent the battery discharge parameters, where SOC represents the true SOC of the target battery.
[0054] Therefore, the training set can be denoted as Where N is the number of samples in the training set; the validation set can be denoted as... Where M is the number of samples in the validation set; the test set can be denoted as... Where T represents the number of samples in the test set, and the number of samples N, M, and T in the three datasets can have a proportional relationship, for example, N∶M∶T=6∶2∶2.
[0055] After partitioning the intermediate dataset, it needs to be augmented. The mixup method shown in formula (1) can be used to augment the intermediate dataset:
[0056] (x n y n )=λ(x i y i )+(1-λ)(x j y j (1)
[0057] Among them, (x n y n ) represents the incremental sample, (x) i y i ) and (x j yj ) represents the randomly selected original sample, and λ is the weight, which is between 0 and 1.
[0058] Formula (1) can be used to augment the intermediate dataset to obtain the target dataset, which can then be used to train the target neural network.
[0059] Based on the above steps S111 to S113, by obtaining an initial dataset, which includes multiple sets of historical discharge parameters of the target battery at different times, and then preprocessing the initial dataset to obtain an intermediate dataset, and finally expanding the intermediate dataset to obtain the target dataset, it is possible to preprocess and expand the initial dataset, so that there is sufficient data in the training process of the neural network model, thereby improving the training effect of the model.
[0060] Optionally, in step S112, preprocessing the initial dataset to obtain an intermediate dataset further includes:
[0061] Step S1121: Filter the initial dataset to obtain the filtering results;
[0062] Step S1122: Fill the filtering results to obtain the filled results;
[0063] Step S1123: Perform outlier testing on the filled results to obtain the intermediate dataset.
[0064] Specifically, filtering the initial dataset may include: arranging the sample data in chronological order according to the time tags, and deleting abnormal data. Specifically, if both the discharge voltage and discharge current in the sample data are 0, then the sample data is considered abnormal.
[0065] Implanting the filtered dataset can include checking and filling in missing feature values: selecting the average of the data adjacent to the missing feature value for filling. For example, missing data x j The calculation can be performed according to formula (2):
[0066]
[0067] Where, x j-1 and x j+1 For missing data x j Adjacent data.
[0068] If the missing data is the first or last sample, the average of the two nearest adjacent data to the missing data is used to fill it, and the calculation formula is the same as (2).
[0069] Outlier testing on the filled dataset allows us to view the data distribution based on box plots and remove outliers that significantly deviate from the upper and lower edges of the box plot.
[0070] Figure 2 This is a schematic diagram of a box-type diagram according to one embodiment of the present invention. Figure 2 As shown, the upper edge of the box plot is X. U The bottom edge of the box plot is X. L The upper quartile is Q. U The lower quartile is Q. L .
[0071] Box plot upper edge X U Upper edge X L The definitions are shown in formulas (3) and (4) respectively:
[0072] X U =Q U +1.5I (3)
[0073] X L =Q L -1.5I (4)
[0074] Where I represents the interquartile range, which can be calculated using formula (5):
[0075] I = Q U -Q L (5)
[0076] Based on the above steps S1121 to S1123, by filtering the initial dataset to obtain the filtering results, filling the filtering results to obtain the filled results, and finally performing outlier detection on the filled results to obtain the intermediate dataset, it is possible to preprocess the initial dataset so that the preprocessed dataset can be used for expansion and machine learning training of the base learner.
[0077] Optionally, in step S14, the process of predicting the target discharge parameters using a target neural network to obtain the target prediction result corresponding to the target battery further includes:
[0078] Step S141: The target dataset is sampled according to a preset sampling ratio to obtain multiple data subsets, wherein different data subsets include different discharge parameters;
[0079] Step S142: Train the corresponding base learner using each data subset in the multiple data subsets to obtain multiple initial prediction results;
[0080] Step S143: Determine the target prediction result based on multiple initial prediction results.
[0081] Specifically, when sampling the target dataset according to a preset sampling ratio, random sampling can be performed from the target dataset according to the preset ratio. After each sample is collected, it needs to be returned to the target dataset to ensure that previously collected samples can continue to be collected. In this way, multiple data subsets can be obtained, in which the discharge parameters are different in each data subset, but the number of discharge parameters in each data subset is the same.
[0082] For example, setting the sampling ratio to 0.8, in a target dataset with 100 sample data points, randomly collect one sample data point and store it in data subset 1, then put this collected sample data point back into the target dataset; again, randomly collect one sample data point from the target dataset with 100 sample data points and store it in data subset 1, then put this collected sample data point back into the target dataset; repeat the above operation of collecting and putting back sample data until data subset 1 contains 80 sample data points, thus obtaining data subset 1 containing 80 sample data points. Repeating the above sampling of the target dataset according to the sampling ratio can yield multiple different data subsets.
[0083] By training a corresponding base learner using each of the multiple data subsets, multiple initial predicted values for the battery's State of Charge (SOC) can be obtained. For example, by training base learners 1, 2, ..., n using data subsets 1, 2, ..., n from n data subsets, multiple initial predicted values for the battery's SOC can be obtained. p1 SOC p2 ..., SOC pn .
[0084] When determining the target prediction result based on multiple initial prediction results, the multiple initial prediction results can be integrated. The integration method can be the bagging integration algorithm, which involves weighting the multiple initial prediction results to obtain the target prediction result.
[0085] For example, based on multiple initial predicted values SOC p1 SOC p2 ..., SOC pn When determining the target predicted SOC value, multiple initial predicted values can be weighted to obtain the target SOC predicted value. The weighting can be performed using formula (6):
[0086]
[0087] Where n is the number of base learners, SOC p For the target SOC prediction value, SOC p1 SOC p2..., SOC pn The initial SOC prediction value for each base learner.
[0088] Based on the above steps S141 to S143, the target dataset is sampled according to a preset sampling ratio to obtain multiple data subsets. Then, a corresponding base learner is trained using each data subset to obtain multiple initial prediction results. Finally, the target prediction result is determined based on the multiple initial prediction results, which can achieve accurate estimation of battery SOC and improve the dynamics of the model.
[0089] Optionally, in step S142, a corresponding base learner is trained using each data subset from the multiple data subsets to obtain multiple initial prediction results, including:
[0090] Repeat the following steps for each base learner:
[0091] Step S1421: The data subset corresponding to the base learner is passed through the input layer to obtain the first processing result;
[0092] Step S1422: Activate the first processing result using the hidden layer to obtain the second processing result;
[0093] Step S1423: Iterate the second processing result using the receiving layer to obtain the third processing result;
[0094] Step S1424: The output layer is used to perform weighted processing on the third processing result to obtain the initial prediction result.
[0095] Specifically, the base learner can be trained by constructing a target neural network model, wherein the structure of the target neural network model is as follows: Figure 3 As shown. Figure 3 This is a schematic diagram of a target neural network model structure according to one embodiment of the present invention, such as... Figure 3 As shown, the target neural network model can be divided into four parts, including the input layer, hidden layer, connecting layer and output layer. The connection between the input layer, hidden layer and output layer is similar to that of the feedforward network.
[0096] The input layer can be used to pass the data subset corresponding to the base learner to the hidden layer, where the data subset is activated. The output of the hidden layer can be self-connected to the input of the hidden layer through the delay and storage of the receiving layer. Therefore, the model expression of the hidden layer can be shown in Equation (7):
[0097] x(k)=f(ω1x c (k))+ω2(u(k-1)) (7)
[0098] Where x(k) is the second processing result, i.e., the output of the hidden layer; f is the Signmoid nonlinear function; ω1 is the connection weight matrix between the connecting layer and the hidden layer; x c (k) represents the output of the receiving layer; ω2 is the connection weight matrix between the input layer and the hidden layer; u(k-1) = [U k-1 ] represents the hidden layer input vector; k and k-1 represent different sampling times of the system, respectively.
[0099] The receiving layer can be used to iterate over the second processing result, i.e., the output of the hidden layer. The model expression of the receiving layer can be shown in Equation (8):
[0100] x c (k)=αx c (k-1)+x(k-1) (8)
[0101] Where α represents the self-connected feedback gain factor.
[0102] The output layer can be used to weight the output of the third processing layer, i.e., the output of the receiving layer. The model expression of the output layer can be shown in formula (9):
[0103] y(k)=g(ω3x(k)) (9)
[0104] Where y(k) is the output vector of the output layer, i.e., the initial prediction result SOC. k .
[0105] During the training of the target neural network model, it is also necessary to predetermine the number of input layer neural nodes m; determine the number of hidden layers and the number of nodes in each hidden layer; determine the model's learning rate, self-connection negative feedback factor, initial network weights and initial threshold; and determine the number of output layer neural nodes.
[0106] Based on the above steps S1421 to S1424, the first processing result is obtained by passing the data subset corresponding to the base learner through the input layer, and the second processing result is obtained by activating the first processing result through the hidden layer. Then, the second processing result is iteratively processed through the successor layer to obtain the third processing result. Finally, the third processing result is weighted through the output layer to obtain the initial prediction result. The above execution steps are repeated for each base learner. This can better utilize the nonlinear features of the neural network model to match the nonlinear features of the battery system, thereby making the neural network model closer to the real battery system situation and achieving the effect of accurately estimating the battery SOC value.
[0107] Optionally, the method for estimating the state of charge of the vehicle battery further includes: optimizing the training parameters of the target neural network using a grid search approach, wherein the training parameters include the number of multiple base learners.
[0108] Specifically, when optimizing the number of base learners in a target neural network using grid search (CV), validation set data can be used. Set the input and output vectors according to the format of the training set.
[0109] Based on the above steps, by optimizing the training parameters of the target neural network using a grid search method, the target neural network can better reflect the real battery system situation, so as to accurately estimate the battery SOC value.
[0110] Optionally, the method for estimating the state of charge of the vehicle battery further includes: acquiring a test dataset; calculating the target evaluation parameters corresponding to the test dataset; and evaluating the performance of the target neural network based on the target evaluation parameters, wherein the target evaluation parameters are used to represent the mean absolute percentage error corresponding to the test dataset.
[0111] Specifically, the data in the test dataset is input into the trained target neural network, and the mean absolute percentage error (MAPE) is selected as the target evaluation parameter. The target evaluation parameter corresponding to the test dataset is calculated to evaluate the performance of the target neural network. The mean absolute percentage error can be expressed as shown in formula (10):
[0112]
[0113] Where N is the number of test samples, Y i This represents the true SOC value of sample i. Let be the predicted SOC value for sample i.
[0114] When MAPE is greater than a preset threshold, it indicates that the target neural network construction effect is not ideal, and the process returns to the training data augmentation step; when MAPE is less than the preset threshold, it indicates that the target neural network construction is good. For example, if MAPE is greater than 7%, the system construction effect is not ideal, and the process returns to the training data augmentation step; if MAPE is less than 7%, it indicates that the model construction is good.
[0115] Based on the above steps, by obtaining the test dataset, calculating the target evaluation parameters corresponding to the test dataset, and finally evaluating the performance of the target neural network based on the target evaluation parameters, the effectiveness of the target neural network construction can be evaluated, so as to obtain a good target neural network and thus accurately estimate the SOC value of the battery.
[0116] Figure 4 This is a schematic diagram of a method for estimating the state of charge of a vehicle battery according to one embodiment of the present invention, as shown below. Figure 4 As shown, the method for estimating the state of charge of a vehicle battery mainly includes the following steps:
[0117] Step S401: Obtain the initial dataset;
[0118] Step S402: Perform data preprocessing on the initial dataset to obtain an intermediate dataset. The data preprocessing includes filtering, imputation, and outlier detection.
[0119] Step S403: Augment the intermediate dataset to obtain the target dataset;
[0120] Step S404: Obtain the target discharge parameters corresponding to the target battery, wherein the target discharge parameters are used to represent the discharge status of the target battery at the first moment.
[0121] Step S405: The target dataset is sampled according to a preset sampling ratio to obtain multiple data subsets, wherein different data subsets include different discharge parameters;
[0122] Step S406: Train the corresponding base learner using each data subset in the multiple data subsets to obtain multiple initial prediction results;
[0123] Step S407: Optimize the training parameters of the target neural network using a grid search method, wherein the training parameters include the number of multiple base learners;
[0124] Step S408: Obtain the test dataset and calculate the target evaluation parameters corresponding to the test dataset;
[0125] Step S409: Evaluate the performance of the target neural network based on the target evaluation parameters, wherein the target evaluation parameters are used to represent the mean absolute percentage error corresponding to the test dataset.
[0126] Step S410: Determine the target prediction result based on multiple initial prediction results.
[0127] The aforementioned method for estimating the state of charge (SOC) of a vehicle battery involves several steps. First, an initial dataset is acquired. This initial dataset is then preprocessed to obtain an intermediate dataset, which is subsequently augmented to obtain a target dataset. Second, the target discharge parameters corresponding to the target battery are acquired, and the target dataset is sampled according to a preset sampling ratio to obtain multiple data subsets. Then, a base learner is trained using each of these subsets to obtain multiple initial prediction results. A grid search method is then used to optimize the training parameters of the target neural network. Next, a test dataset is acquired, and the target evaluation parameters corresponding to the test dataset are calculated. The performance of the target neural network is then evaluated based on these parameters. Finally, the target prediction result is determined based on the multiple initial prediction results. This method achieves the goal of estimating the battery's SOC using a neural network model, thus realizing accurate estimation of the battery's SOC value. This solves the technical problem of low SOC estimation accuracy caused by insufficient nonlinearity in the battery SOC estimation model in related technologies.
[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0129] This invention also provides a device for estimating the state of charge of a vehicle battery, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0130] Figure 5 This is a structural block diagram of a vehicle battery state of charge estimation device according to one embodiment of the present invention, such as... Figure 5 As shown, the device includes:
[0131] The acquisition module 501 is used to acquire the target discharge parameters corresponding to the target battery, wherein the target discharge parameters are used to represent the discharge status of the target battery at the first moment; the prediction module 502 is used to predict the target discharge parameters using a target neural network to obtain the target prediction result corresponding to the target battery, wherein the target prediction result is used to represent the state of charge of the target battery at the second moment. The target neural network includes multiple base learners, which are trained by machine learning using multiple sets of historical discharge parameters. Each set of parameters in the multiple sets of historical discharge parameters includes: discharge voltage, discharge current, first measurement temperature and second measurement temperature.
[0132] Optionally, the vehicle battery state of charge estimation device further includes: a processing module 503, used to acquire an initial dataset, wherein the initial dataset includes multiple sets of historical discharge parameters of the target battery at different times; to preprocess the initial dataset to obtain an intermediate dataset; and to augment the intermediate dataset to obtain a target dataset, wherein the target dataset is used to train a target neural network.
[0133] Optionally, the processing module 503 is further configured to: perform data preprocessing on the initial dataset to obtain an intermediate dataset, including: performing filtering on the initial dataset to obtain filtering results; performing filling on the filtering results to obtain filling results; and performing outlier detection on the filling results to obtain an intermediate dataset.
[0134] Optionally, the prediction module 502 is further configured to: predict the target discharge parameters using the target neural network to obtain the target prediction result corresponding to the target battery, including: sampling the target dataset according to a preset sampling ratio to obtain multiple data subsets, wherein different data subsets include different discharge parameters; training a corresponding base learner using each data subset in the multiple data subsets to obtain multiple initial prediction results; and determining the target prediction result based on the multiple initial prediction results.
[0135] Optionally, the prediction module 502 is further configured to: repeatedly perform the following steps for each base learner: pass the data subset corresponding to the base learner through the input layer to obtain a first processing result; activate the first processing result through the hidden layer to obtain a second processing result; iteratively process the second processing result through the continuation layer to obtain a third processing result; and weight the third processing result through the output layer to obtain an initial prediction result.
[0136] Optionally, the vehicle battery state of charge estimation device further includes: an optimization module 504, used to optimize the training parameters of the target neural network using a grid search method, wherein the training parameters include the number of multiple base learners.
[0137] Optionally, the vehicle battery state of charge estimation device further includes: an evaluation module 505, used to acquire a test dataset; calculate target evaluation parameters corresponding to the test dataset; and evaluate the performance of the target neural network based on the target evaluation parameters, wherein the target evaluation parameters are used to represent the mean absolute percentage error corresponding to the test dataset.
[0138] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0139] According to one embodiment of the present invention, a non-volatile storage medium is also provided, wherein a computer program is stored in the storage medium, and the computer program is configured to execute the steps in any of the above method embodiments when running.
[0140] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0141] Step S1: Obtain the target discharge parameters corresponding to the target battery, wherein the target discharge parameters are used to represent the discharge status of the target battery at the first moment.
[0142] Step S2: The target neural network is used to predict the target discharge parameters to obtain the target prediction result corresponding to the target battery. The target prediction result is used to represent the state of charge of the target battery at the second time. The target neural network includes multiple base learners. The base learners are trained by machine learning using multiple sets of historical discharge parameters. Each set of parameters in the multiple sets of historical discharge parameters includes: discharge voltage, discharge current, first measurement temperature and second measurement temperature.
[0143] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0144] According to one embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0145] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0146] Step S1: Obtain the target discharge parameters corresponding to the target battery, wherein the target discharge parameters are used to represent the discharge status of the target battery at the first moment.
[0147] Step S2: The target neural network is used to predict the target discharge parameters to obtain the target prediction result corresponding to the target battery. The target prediction result is used to represent the state of charge of the target battery at the second time. The target neural network includes multiple base learners. The base learners are trained by machine learning using multiple sets of historical discharge parameters. Each set of parameters in the multiple sets of historical discharge parameters includes: discharge voltage, discharge current, first measurement temperature and second measurement temperature.
[0148] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0149] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0150] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0151] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0152] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0153] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0154] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0155] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for estimating the state of charge of a vehicle battery, characterized in that, include: Obtain the target discharge parameters corresponding to the target battery, wherein the target discharge parameters are used to represent the discharge status of the target battery at the first moment; The target discharge parameters are predicted using a target neural network to obtain the target prediction result corresponding to the target battery. The target prediction result is used to represent the state of charge of the target battery at a second time. The target neural network includes multiple base learners, which are trained by machine learning using multiple sets of historical discharge parameters. Each set of parameters in the multiple sets of historical discharge parameters includes: discharge voltage, discharge current, first measurement temperature and second measurement temperature. The method of predicting the target discharge parameters using the target neural network to obtain the target prediction result corresponding to the target battery includes: sampling the target dataset according to a preset sampling ratio to obtain multiple data subsets, wherein different data subsets include different discharge parameters; training the corresponding base learner using each of the multiple data subsets to obtain multiple initial prediction results; and performing weighted fusion processing on the multiple initial prediction results based on a bagging ensemble algorithm to obtain the target prediction result. The method further includes: optimizing the training parameters of the target neural network using a grid search method, wherein the training parameters include the number of the plurality of base learners, the target neural network is an Elman neural network, and the base learners include an input layer, a hidden layer, a continuation layer and an output layer.
2. The method for estimating the state of charge of a vehicle battery according to claim 1, characterized in that, The method further includes: Obtain an initial dataset, wherein the initial dataset includes the multiple sets of historical discharge parameters of the target battery at different times; The initial dataset is preprocessed to obtain an intermediate dataset; The intermediate dataset is augmented to obtain the target dataset, which is used to train the target neural network.
3. The method for estimating the state of charge of a vehicle battery according to claim 2, characterized in that, The initial dataset is preprocessed to obtain the intermediate dataset, which includes: The initial dataset is filtered to obtain the filtering results; The filtered results are then populated to obtain the populated results. The imputation results are subjected to outlier testing to obtain the intermediate dataset.
4. The method for estimating the state of charge of a vehicle battery according to claim 1, characterized in that, The base learner is trained using each of the multiple data subsets to obtain the multiple initial prediction results, including: For each base learner, repeat the following steps: The input layer is used to process the data subset corresponding to the base learner to obtain a first processing result. The first processing result is activated using the hidden layer to obtain the second processing result; The second processing result is iteratively processed using the aforementioned receiving layer to obtain a third processing result; The output layer is used to weight the third processing result to obtain the initial prediction result.
5. The method for estimating the state of charge of a vehicle battery according to claim 1, characterized in that, The method further includes: Obtain the test dataset; Calculate the target evaluation parameters corresponding to the test dataset, and evaluate the performance of the target neural network based on the target evaluation parameters, wherein the target evaluation parameters are used to represent the mean absolute percentage error corresponding to the test dataset.
6. A device for estimating the state of charge of a vehicle battery, characterized in that, include: The acquisition module is used to acquire the target discharge parameters corresponding to the target battery, wherein the target discharge parameters are used to represent the discharge status of the target battery at the first moment; The prediction module is used to predict the target discharge parameters using a target neural network to obtain the target prediction result corresponding to the target battery. The target prediction result is used to represent the state of charge of the target battery at a second time. The target neural network includes multiple base learners, which are trained by machine learning using multiple sets of historical discharge parameters. Each set of parameters in the multiple sets of historical discharge parameters includes: discharge voltage, discharge current, first measurement temperature and second measurement temperature. The prediction module is further configured to sample the target dataset according to a preset sampling ratio to obtain multiple data subsets, wherein different data subsets include different discharge parameters; train the corresponding base learner using each of the multiple data subsets to obtain multiple initial prediction results; and perform weighted fusion processing on the multiple initial prediction results based on the bagging ensemble algorithm to obtain the target prediction result. The prediction module is also used to optimize the training parameters of the target neural network using a grid search method. The training parameters include the number of the plurality of base learners. The target neural network is an Elman neural network, and the base learners include an input layer, a hidden layer, a continuation layer, and an output layer.
7. A non-volatile storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute, when running, the method for estimating the state of charge of a vehicle battery as described in any one of claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method for estimating the state of charge of a vehicle battery as described in any one of claims 1 to 5.