A method and device for predicting a battery state of charge change
By establishing an equivalent circuit model of the battery and using neural networks to predict future operating conditions, the battery capacity is dynamically updated, solving the problem of decreased SOC estimation accuracy after battery aging and achieving high-precision prediction of SOC changes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2026-04-03
- Publication Date
- 2026-07-14
AI Technical Summary
Existing methods for estimating battery state of charge (SOC) lose accuracy as batteries age, especially those based on the ampere-hour integration method, which cannot accurately reflect changes in battery capacity, leading to inaccurate estimates of SOC changes.
By establishing an equivalent circuit model of the battery, fitting the OCV-SOC curve and ohmic internal resistance using historical data, and combining it with neural networks to predict future driving conditions and power requirements, the battery capacity is dynamically updated by using the ampere-hour integration method to calculate the SOC change.
It achieves high accuracy in SOC prediction even under battery aging conditions, has real-time performance and generalization capabilities, requires no additional testing, and is adaptable to environments lacking travel route information.
Smart Images

Figure CN122386121A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of battery technology, and particularly relates to a method and apparatus for predicting changes in the state of charge of a battery. Background Technology
[0002] Estimating the state of charge (SOC) of electric vehicles is a key technology in battery management systems, directly impacting vehicle range, energy efficiency, and safety. The battery's state of charge (SOC), also known as remaining charge, is estimated using methods primarily including the open-circuit voltage method, the ampere-hour integral method, and model prediction. The ampere-hour integral method is widely used due to its simplicity and real-time performance. However, batteries experience capacity decay over long-term use, causing the change in charge per unit current to become non-constant, thus reducing the accuracy of SOC estimation.
[0003] With the advancement of deep learning and big data technologies, SOC estimation methods based on historical driving data have gradually become a research hotspot. These methods improve the accuracy of SOC estimation by analyzing historical data and predicting future driving conditions, but they still face challenges such as data scarcity and model generalization. Summary of the Invention
[0004] In view of this, the present invention aims to provide a method and apparatus for predicting changes in the state of charge of a battery.
[0005] To achieve the above objectives, the technical solution created by this invention is implemented as follows: A method for predicting changes in the state of charge of a battery includes: Historical vehicle data is read, a battery equivalent circuit model is established, and the model parameters are estimated. The model parameters include the open-circuit voltage-state-of-charge (OCV-SOC) curve, ohmic internal resistance, and actual battery capacity. Kinematic segmentation and working condition clustering are performed on historical vehicle driving data. Based on historical driving characteristics and working condition transition patterns, the future driving working condition sequence of the vehicle is predicted. Based on the future driving condition sequence, a neural network model is used to predict the power demand during vehicle driving. Based on the model parameters of the battery equivalent circuit model and the predicted power demand, the change in state of charge during future driving is calculated using the ampere-hour integral method.
[0006] Furthermore, the process of reading historical vehicle data, establishing a battery equivalent circuit model, and estimating model parameters includes the open-circuit voltage-state-of-charge (OCV-SOC) curve, ohmic internal resistance, and actual battery capacity, specifically including: Using low-current discharge data under the condition of engine shutdown, a polynomial regression method was used to fit and establish the OCV-SOC curve; By utilizing the current abrupt change segments in the parking charging condition data, the terminal voltage change value and current change value are extracted to estimate the ohmic internal resistance; Using vehicle driving condition data and driving data from the most recent period, the actual capacity reflecting battery aging characteristics is estimated based on the ampere-hour integral method.
[0007] Furthermore, the method of estimating the actual capacity reflecting battery aging characteristics based on the ampere-hour integral method, using vehicle driving condition data and recent driving data, specifically includes: The system selects driving data from the vehicle within the most recent preset time period or preset mileage, calculates the ratio of charge / discharge capacity to change in state of charge, and performs statistical analysis on the estimation results of multiple data segments. The statistical mean or dense interval value is taken as the actual capacity of the battery to achieve dynamic capacity updates.
[0008] 4. The method according to claim 1, characterized in that, the step of kinematic segmentation and condition clustering of historical vehicle driving data, and predicting the future driving condition sequence of the vehicle based on historical driving characteristics and condition transition patterns, specifically includes: Based on acceleration and speed, driving data is divided into acceleration, deceleration, constant speed and idling stages. The segments are recombined according to a preset principle, which regards adjacent idling and non-idling segments as a driving stage and independent idling segments as separate segments. Principal component analysis (PCA) was used to reduce the dimensionality of the segment features, and K-Medoids or CLARA clustering algorithms were used to classify the working conditions into four categories: urban congestion, intercity highway, urban dynamics and suburban mixed.
[0009] Furthermore, the process of kinematic segmentation and operating condition clustering of historical vehicle driving data, and the prediction of future vehicle driving condition sequences based on historical driving characteristics and operating condition transition patterns, specifically includes: Based on historical data, the transition probabilities between various kinematic segments are statistically analyzed to construct a Markov chain transition matrix. By combining one-dimensional convolutional neural networks to extract temporal features, and under the constraint of a preset total mileage, a sequence of future driving segments is generated by splicing kinematic units.
[0010] Furthermore, the training of the one-dimensional convolutional neural network includes: Construct a dual-channel time-series data input layer that includes vehicle speed and acceleration; Construct a hidden layer consisting of multiple convolutional blocks, each convolutional block containing a one-dimensional convolutional layer, a batch normalization layer, an activation function layer, and a random deactivation layer; Training is performed using a multi-component composite loss function, which includes velocity loss, acceleration loss, average velocity loss, distance loss, and cumulative distance loss.
[0011] Furthermore, the step of predicting the power demand of the vehicle during driving using a neural network model based on the future driving condition sequence specifically includes: A Long Short-Term Memory (LSTM) neural network is constructed. The input layer receives vehicle speed and acceleration sequences, the hidden layer contains LSTM neuron units, and the output layer is mapped to power prediction values. The training is performed using an asymmetric Huber loss function with masking. The masking mechanism ignores zero-filling positions and sets a penalty coefficient for negative predictions.
[0012] A device for predicting changes in the state of charge of a battery, comprising: The battery modeling module is used to read historical vehicle data, establish a battery equivalent circuit model and estimate model parameters, including the open circuit voltage-state of charge (OCV-SOC) curve, ohmic internal resistance and actual battery capacity. The operating condition analysis module is used to perform kinematic segmentation and operating condition clustering on historical vehicle driving data, and predict the future driving operating condition sequence of the vehicle based on historical driving characteristics and operating condition transition patterns. The power prediction module is used to predict the power demand of the vehicle during driving based on the future driving condition sequence using a neural network model. The SOC calculation module is used to calculate the change in state of charge during future driving using the ampere-hour integration method, based on the model parameters of the battery equivalent circuit model and the predicted power demand.
[0013] Furthermore, the battery modeling module includes: The OCV-SOC estimation unit is used to fit and establish the OCV-SOC curve using the small current discharge data under the shutdown condition and the multinomial regression method. The internal resistance estimation unit is used to extract the terminal voltage change value and current change value from the current sudden segment in the parking charging condition data to estimate the ohmic internal resistance. The capacity estimation unit is used to estimate the actual capacity reflecting the battery aging characteristics based on the ampere-hour integral method, using vehicle driving condition data and driving data from the most recent time period.
[0014] Furthermore, the operating condition analysis module includes: The segmentation unit is used to divide driving data into acceleration, deceleration, constant speed and idling speed stages based on acceleration and speed, and to reorganize the segments according to a preset principle. The preset principle is to regard adjacent idling speed and non-idling speed segments as a driving stage, and independent idling speed segments as separate segments. Clustering units are used to reduce the dimensionality of fragment features using principal component analysis (PCA) and to classify the working conditions into four categories: urban congestion, intercity highway, urban dynamics, and mixed urban and suburban areas using K-Medoids or CLARA clustering algorithms.
[0015] Compared with the prior art, the present invention can achieve the following beneficial effects: This invention provides a method and apparatus for predicting changes in the state of charge (SOC) of a battery. It uses historical data to model different operating conditions: fitting an OCV-SOC curve based on parking and engine-off data, calculating the ohmic internal resistance based on sudden changes in charging current, and dynamically updating the actual battery capacity based on driving data. Simultaneously, it uses PCA dimensionality reduction and clustering to classify driving conditions, and combines Markov chains and neural networks to predict future operating conditions and power requirements. Finally, using the established battery model and predicted power, it calculates the SOC change using the ampere-hour integration method. This invention requires no additional testing, can characterize battery aging characteristics in real time, and maintains high prediction accuracy and generalization ability even when travel route information is lacking. Attached Figure Description
[0016] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 A flowchart illustrating the method for predicting changes in the state of charge of a battery provided in an embodiment of the present invention; Figure 2 A schematic diagram comparing the estimated and actual SOC values of the battery state of charge change prediction method provided in the embodiments of the present invention when calculated based on actual vehicle data. Figure 3 A structural block diagram of a battery state of charge change prediction device provided in an embodiment of the present invention; Figure 4 A structural block diagram of the vehicle equipment provided in the embodiments of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not constitute a limitation thereof.
[0018] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0019] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0020] like Figure 1 As shown, this embodiment of the invention provides a method for predicting changes in the state of charge of a battery, including: S101. Read historical vehicle data, establish a battery equivalent circuit model and estimate the model parameters; the model parameters include the open circuit voltage-state of charge (OCV-SOC) curve, ohmic internal resistance and actual battery capacity.
[0021] S102. Perform kinematic segmentation and operating condition clustering on historical vehicle driving data, and predict the future driving condition sequence of vehicles based on historical driving characteristics and operating condition transition patterns.
[0022] S103. Based on the future driving condition sequence, use a neural network model to predict the power demand during vehicle driving.
[0023] S104. Based on the parameters of the battery equivalent circuit model and the predicted power demand, calculate the change in state of charge during future driving using the ampere-hour integration method.
[0024] In some embodiments, S101 reads historical vehicle data, establishes a battery equivalent circuit model, and estimates model parameters. The model parameters include the open-circuit voltage-state-of-charge (OCV-SOC) curve, ohmic internal resistance, and actual battery capacity. Specifically, these include: Using low-current discharge data under the condition of engine shutdown, a polynomial regression method was used to fit and establish the OCV-SOC curve; By utilizing the current abrupt change segments in the parking charging condition data, the terminal voltage change value and current change value are extracted to estimate the ohmic internal resistance; Using vehicle driving condition data and driving data from the most recent period, the actual capacity reflecting battery aging characteristics is estimated based on the ampere-hour integral method.
[0025] In some embodiments, the actual capacity reflecting battery aging characteristics is estimated based on the ampere-hour integral method using vehicle driving condition data and driving data from the most recent time period. This specifically includes: The system selects driving data from the vehicle within the most recent preset time period or preset mileage, calculates the ratio of charge / discharge capacity to change in state of charge, and performs statistical analysis on the estimation results of multiple data segments. The statistical mean or dense interval value is taken as the actual capacity of the battery to achieve dynamic capacity updates.
[0026] In the embodiments of this application, the battery terminal voltage value under low current conditions when the vehicle is parked and the engine is off is read and regarded as the open circuit voltage (OCV), and the corresponding SOC value is obtained. Then, multiple sets of terminal voltage and SOC data pairs are used as input, and a polynomial regression method is used for fitting and modeling. The fitting accuracy of polynomials of different orders is compared, and the model result with the best fitting effect is selected as the OCV-SOC characteristic model of the target battery, as shown in the following formula:
[0027] in, These are the fitting coefficients. Let be the order of the polynomial.
[0028] In the embodiments of this application, for modeling the ohmic internal resistance, the current abrupt change segments in the parking charging condition data are first identified, the current change values of the collector are collected, and the terminal voltage values of the corresponding segments are extracted for modeling the ohmic internal resistance. R ohm The formula is as follows:
[0029] in, This represents the change in terminal voltage during the current surge segment. This represents the current change during the current surge. Considering that the change in state of charge (SOC) during the current surge will cause fluctuations in the open-circuit voltage (OCV), leading to deviations in the ohmic resistance identification results, an OCV-SOC curve is introduced for auxiliary modeling to improve the accuracy of resistance identification. The formula is as follows:
[0030] in, These are the fitting coefficients in the corresponding OCV-SOC polynomial regression. and These represent the state of charge (SOC) of the battery at the initial and final moments of the current surge segment, respectively.
[0031] In some embodiments, S102 performs kinematic segmentation and operating condition clustering on historical vehicle driving data, and predicts the future driving condition sequence of the vehicle based on historical driving characteristics and operating condition transition patterns, specifically including: Based on acceleration and speed, driving data is divided into acceleration, deceleration, constant speed and idling stages. The segments are recombined according to a preset principle, which regards adjacent idling and non-idling segments as a driving stage and independent idling segments as separate segments. Principal component analysis (PCA) was used to reduce the dimensionality of the segment features, and K-Medoids or CLARA clustering algorithms were used to classify the working conditions into four categories: urban congestion, intercity highway, urban dynamics and suburban mixed.
[0032] In some embodiments, S102 performs kinematic segmentation and operating condition clustering on historical vehicle driving data, and predicts the future driving condition sequence of the vehicle based on historical driving characteristics and operating condition transition patterns, specifically including: Based on historical data, the transition probabilities between various kinematic segments are statistically analyzed to construct a Markov chain transition matrix. By combining one-dimensional convolutional neural networks to extract temporal features, and under the constraint of a preset total mileage, a sequence of future driving segments is generated by splicing kinematic units.
[0033] Specifically, in the process of estimating battery capacity using driving condition data, driving data from the most recent time period is selected for analysis to fully reflect the capacity decay characteristics caused by battery aging.
[0034] In the embodiments of this application, vehicle driving data is used to determine battery capacity. Modeling is performed specifically by reading the battery current and corresponding SOC data at multiple sampling times of the vehicle, and applying the ampere-hour integration method to calculate the change in battery capacity during charging and discharging, thereby estimating the actual battery capacity, as shown in the following formula:
[0035] Regarding data usage, the initial estimation uses the latest multiple sets of driving segment data from the vehicle's time series for modeling; after subsequent driving is completed, the latest acquired driving data is incorporated into the identification dataset to achieve dynamic updates of battery capacity. This is used to reflect the capacity decay characteristics of the battery due to aging during long-term use.
[0036] Multiple estimated battery modeling values were obtained by repeatedly calculating the corresponding operating conditions for multiple segments.
[0037] Statistical analysis was performed on the above estimation results to determine the interquartile range (IQR), dense range, and statistical mean of each battery model parameter. These parameters were then used as reference parameters for Rint battery modeling, thereby effectively reducing the impact of noise and outliers on estimation accuracy.
[0038] In one possible embodiment, dense interval statistics are used as reference values for the battery model. This results in battery models for two different battery types. After inputting actual data into the battery models, the estimated SOC values at different driving mileages are compared with the actual values. Figure 3 As shown.
[0039] Historical vehicle driving data is extracted and divided into acceleration, deceleration, constant speed, and idling stages according to set principles. Kinematic segments are further divided according to the principle that "adjacent idling and non-idling segments are considered as one driving stage; independent idling segments are considered as separate segments."
[0040] In this embodiment, vehicle driving data is also used to construct a kinematic fragment library, but this library will not be automatically updated as new driving data is imported during subsequent vehicle driving. In specific application scenarios, vehicle speed sequences are obtained from historical vehicle driving data and divided and reorganized according to predetermined rules to form kinematic fragments.
[0041] In one possible embodiment, the rules for dividing the kinematic phases are as follows: Acceleration > 0.15 m / s² 2 This segment is defined as the acceleration phase; Acceleration < -0.15 m / s² 2 This segment is defined as the deceleration phase; Speed > 0 m / s 2 And it satisfies: 0.15m / s 2 Acceleration > -0.15m / s² 2 This segment is defined as the uniform velocity phase; Otherwise, it is the idling stage, and for idling segments exceeding 60 seconds, only 60 seconds are retained.
[0042] After completing the kinematic phase division, the kinematic segment division rules are as follows: An adjacent idle and non-idle segment is considered as a single kinematic segment; Independent non-idle segments are considered as separate segments.
[0043] Based on the above segmentation method, after processing the historical driving data of a vehicle, a complete kinematic segmentation result can be obtained. Using this method, different driving behavior characteristics (such as acceleration, deceleration, constant speed, and idling phases) can be effectively identified and combined into representative kinematic segments, thus providing data support for subsequent operating condition classification and driving prediction.
[0044] Principal component analysis (PCA) was used to reduce the dimensionality of travel characteristic parameters of kinematic segments, and the principal components with a cumulative contribution rate greater than 85% were selected to obtain four new weighted parameters. Then, the K-Medoids (CLARA) algorithm was used to perform cluster analysis on these weighted parameters, classifying vehicle driving conditions into four categories: urban congestion, intercity highway, urban dynamics, and mixed urban and suburban driving.
[0045] S103. Based on the future driving condition sequence, predict the power demand during vehicle operation using a neural network model, specifically including: Based on historical data and a Markov chain model, the system predicts future vehicle operating conditions and generates a sequence of driving segments. Simultaneously, it combines this with a neural network to extract temporal features, achieving dynamic simulation of future driving states. In this embodiment, after obtaining the kinematic segment library, the transition probabilities between various kinematic segments are statistically analyzed based on the Markov chain principle. Then, according to the probability distribution of the operating condition type transition probability matrix, the operating condition type of the vehicle in the next stage is generated, and kinematic segments matching the average speed of the current road traffic flow are selected from the corresponding type of kinematic segment library. This process is continuously iterated, selecting kinematic segments from the database for splicing until the termination condition is met (i.e., the total distance of the kinematic segments equals the estimated given driving distance). Simultaneously, continuous kinematic segments are input into a one-dimensional convolutional neural network for training to capture the temporal features between kinematic segments (input is the kinematic segment from the previous moment, output is the kinematic segment from the next moment). These kinematic segments are not directly used for splicing; instead, after extracting their average speed, they are used as references for determining kinematic segments after the Markov chain selects the operating condition, i.e., the kinematic segment closest to the reference average speed is selected as the reference segment for the next stage.
[0046] In some embodiments, the construction process of the one-dimensional convolutional neural network includes: First, an input layer is constructed to receive dual-channel time-series data containing vehicle speed and acceleration; After the input layer, a hidden layer consisting of multiple convolutional blocks is constructed. Each convolutional block contains a one-dimensional convolutional layer, a batch normalization layer, an activation function layer, and a random deactivation layer. The kernel size is set to 7 and the number of channels is set to 64. Local temporal features are effectively extracted through the multi-layer convolutional structure. After the hidden layer, an output layer is constructed, which maps the features into a single-channel velocity prediction sequence through 1×1 convolution.
[0047] The initial driving condition prediction model is evaluated to obtain the target driving condition prediction model. This includes: calculating multi-dimensional evaluation indicators based on the actual driving sequence, predicted speed sequence, acceleration sequence, and driving distance; comparing the actual and predicted speed curves under the same driving mileage using distance-axis resampling technology to evaluate the model's predictive performance; and further optimizing the parameters and structure of the prediction model to ensure its accuracy and generalization ability. If the evaluation indicators are better than a preset threshold, the initial driving condition prediction model is adopted as the target driving condition prediction model; otherwise, the initial driving condition prediction model is retrained by adjusting model parameters, optimizing the network structure, or increasing training data to improve the model's predictive performance until the preset accuracy requirement is met.
[0048] In some embodiments, the current vehicle speed sequence and corresponding acceleration sequence can be input into a pre-defined R-MCNN (Resampling-Multi-input CNN) model for training to obtain a work condition prediction model. For example, during model training, a configured training set and validation set are used, and the training parameters are set as follows: training epochs are 60, batch size is 512, the Adam algorithm is selected for gradient optimization, and the learning rate (lr) is set to 0.0005. The loss function employs a multi-component composite loss, which includes velocity loss, acceleration loss, average velocity loss, distance loss, cumulative distance loss, and multi-scale velocity loss, adaptively balancing the various loss components through an uncertainty weighting mechanism.
[0049] In the data preprocessing stage, the original vehicle speed sequence is resampled to obtain a fixed-length sequence, and the acceleration sequence is calculated using first-order differencing to construct time-series data with an input feature dimension of 2. The feature sequences are standardized using StandardScaler to ensure training stability. In terms of model architecture, a four-layer one-dimensional convolutional network is used, with an input dimension of 2 (vehicle speed and acceleration), and the output is mapped to predicted speed values through a fully connected layer. During model training, a fixed random seed is used to ensure the reproducibility of the training process, and automatic mixed-precision training technology is used to improve training efficiency.
[0050] During training, the model learns the spatiotemporal relationship between the current vehicle speed, acceleration, and the speed sequence at the next moment through forward propagation. During backpropagation, the model parameters are iteratively optimized based on a multi-component composite loss function, and gradient pruning is used to ensure training stability. Training stops when the set number of epochs is reached or the early stopping condition is met, and the optimal model parameters and data normalizer are saved. In the prediction application phase, the trained model is loaded to predict the speed sequence of new driving segments. By combining Markov transition probabilities and distance prior knowledge, the optimal matching sequence is retrieved from the historical database, completing the accurate generation from the current driving state to future driving conditions.
[0051] S104. Based on the parameters of the battery equivalent circuit model and the predicted driving power, calculate the change in state of charge during future driving using the ampere-hour integration method.
[0052] Vehicle speed and corresponding power data for each driving segment are extracted, and a Long Short-Term Memory (LSTM) neural network is used to learn the vehicle's output characteristics under different operating conditions. This data is then used to predict the power of the kinematic segments.
[0053] In this embodiment of the application, vehicle driving data will also be used to train a power consumption estimation neural network model to predict battery energy consumption for future driving segments. The construction process of the long and short time neural network includes: Build the input layer; After the input layer, a hidden layer is constructed, each containing 64 neurons. The neuron unit used includes an input gate, a forget gate, and an output gate. After the hidden layer, an output layer is constructed; The initial battery power consumption prediction model is evaluated to obtain the target battery power consumption prediction model, including: Based on actual driving data, predicted power consumption, and historical battery operating status, the power consumption prediction accuracy is calculated. By comparing the prediction with actual power consumption data, the model's predictive performance is evaluated, and the parameters and structure of the prediction model are further optimized to ensure the model's accuracy and generalization ability.
[0054] If the prediction accuracy is greater than a preset threshold, the initial battery power consumption prediction model is used as the target battery power consumption prediction model; otherwise, the initial battery power consumption prediction model is retrained by adjusting model parameters, optimizing network structure, or increasing training data to improve the model's prediction performance until the preset accuracy requirement is met.
[0055] The vehicle speed sequence and its corresponding acceleration sequence can be input into a pre-defined M-MLSTM (Mask-Multi-inputLSTM) model for training to obtain a power prediction model. For example, during model training, a pre-configured training and validation set are used, with the following training parameters set: 30 epochs, 32 batch sizes, the Adam gradient optimization algorithm, and a learning rate (lr) of 0.001. The loss function is a masked asymmetric Huber loss, with a delta parameter of 1.0 and a penalty coefficient of 3.0 for negative predictions. The mask mechanism is used to identify the valid data positions in each sequence when processing time-series data of different lengths. When constructing batch data, to ensure consistent input matrix dimensions, shorter sequences are zero-padding at the end. By generating corresponding binary masks (marking valid data as 1 and padded portions as 0), these zero-padding positions are ignored during loss calculation and gradient backpropagation, ensuring that the model is trained only on actual valid data, thus avoiding interference from invalid padding values in model parameter updates. The masking mechanism marks the effective data positions using binary sequences, ignoring zero-padding positions in loss calculations to ensure the model optimizes only based on effective sequences. In the data preprocessing stage, the original vehicle speed sequence is subjected to first-order differencing to obtain the acceleration sequence, constructing time-series data with an input feature dimension of 2. Simultaneously, the actual power value is calculated by multiplying the current sequence and voltage sequence, serving as the model's prediction target. The feature sequences are normalized to the range [-1, 1] using MinMaxScaler, and small perturbations are added to zero values in the power sequence to avoid numerical issues. In terms of model architecture, a two-layer LSTM network is used, with an input dimension of 2 (vehicle speed and acceleration), a hidden layer dimension of 64, and the output mapped to the predicted power value through a fully connected layer. During model training, a fixed random seed is used to ensure the reproducibility of the training process, and automatic mixed-precision training technology is used to improve training efficiency.
[0056] During training, the model learns the nonlinear mapping relationship between vehicle speed, acceleration, and output power through forward propagation; during backpropagation, iteratively optimizes the model parameters based on the asymmetric Huber loss function. Training stops after a set number of epochs, and the optimal model parameters and data normalizer are saved. In the prediction application phase, the trained model is loaded to predict power for new vehicle speed sequences. The actual power value is obtained through inverse normalization, and the prediction results are output in sequence form, completing the accurate mapping from vehicle motion state to power demand.
[0057] Based on predicted future driving power Given the established battery model, the change in SOC for the corresponding driving segment can be calculated using the ampere-hour integration method, as shown in the following formula: .
[0058] Among them, battery capacity Ohmic internal resistance R ohm With the corresponding open-circuit voltage at SOC All parameters are obtained through the battery modeling process in steps S1 to S4. These parameters form the basis of the battery model, providing an accurate physical characteristic description for subsequent energy management. In steps S5 to S7, the future driving segments of the vehicle are first predicted, and based on the predicted vehicle speed sequence, the data is input into the neural network proposed in step S8. Through the calculation of this network, the battery power is finally obtained. This method effectively combines battery modeling with vehicle dynamics, improving the accuracy and robustness of SOC estimation and battery life prediction to achieve high-precision battery performance evaluation and energy prediction.
[0059] In some embodiments, specifically, training a one-dimensional convolutional neural network includes: First, we construct the input layer, which contains dual-channel time-series data input including vehicle speed and acceleration. After the input layer, a hidden layer consisting of multiple convolutional blocks is constructed. Each convolutional block contains a one-dimensional convolutional layer, a batch normalization layer, an activation function layer, and a random deactivation layer. The kernel size is set to 7 and the number of channels is set to 64. Local temporal features are effectively extracted through the multi-layer convolutional structure. After the hidden layer, an output layer is constructed, and the features are mapped into a single-channel velocity prediction sequence through a 1×1 convolution. Training is performed using a multi-component composite loss function, which includes velocity loss, acceleration loss, average velocity loss, distance loss, and cumulative distance loss.
[0060] In some embodiments, specifically, based on predicted future driving conditions, a neural network model is used to predict the power demand during vehicle operation. The neural network model construction process specifically includes: A Long Short-Term Memory (LSTM) neural network is constructed. The input layer receives vehicle speed and acceleration sequences, the hidden layer contains LSTM neuron units, and the output layer is mapped to power prediction values. The training is performed using an asymmetric Huber loss function with masking, which ignores zero-padding positions through the masking mechanism and sets a higher penalty coefficient for negative predictions.
[0061] Combination Figure 2As shown, the battery state of charge change prediction device of the present invention can also be provided in an embodiment, including the following steps: S1. Read historical vehicle data, apply data of different operating conditions, complete the power battery modeling, use driving condition data to estimate battery capacity; use parking and charging condition data to estimate ohmic internal resistance; use parking and engine off condition data to apply multinomial regression method to estimate OCV-SOC curve.
[0062] In the embodiments of this application, the battery terminal voltage value under low current conditions when the vehicle is parked and the engine is off is read and regarded as the open circuit voltage (OCV), and the corresponding SOC value is obtained. Then, multiple sets of terminal voltage and SOC data pairs are used as input, and a polynomial regression method is used for fitting and modeling. The fitting accuracy of polynomials of different orders is compared, and the model result with the best fitting effect is selected as the OCV-SOC characteristic model of the target battery, as shown in the following formula:
[0063] in, These are the fitting coefficients. Let be the order of the polynomial.
[0064] In this embodiment, for modeling the ohmic internal resistance, the current abrupt change segments in the parking charging condition data are first identified, the current change value of the data acquisition device is collected, and the terminal voltage value of the corresponding segment is extracted for modeling the ohmic internal resistance. R ohm The formula is as follows:
[0065] in, This represents the change in terminal voltage during the current surge segment. This represents the current change during the current surge. Considering that the change in state of charge (SOC) during the current surge will cause fluctuations in the open-circuit voltage (OCV), leading to deviations in the ohmic resistance identification results, an OCV-SOC curve is introduced for auxiliary modeling to improve the accuracy of resistance identification. The formula is as follows:
[0066] in, These are the fitting coefficients in the corresponding OCV-SOC polynomial regression. and These represent the state of charge (SOC) of the battery at the initial and final moments of the current surge segment, respectively.
[0067] S2. In the process of estimating battery capacity using driving condition data, driving data from the most recent time period is selected for analysis to fully reflect the capacity decay characteristics caused by battery aging.
[0068] In the embodiments of this application, vehicle driving data is used to determine battery capacity. Modeling is performed specifically by reading the battery current and corresponding SOC data at multiple sampling times of the vehicle, and applying the ampere-hour integration method to calculate the change in battery capacity during charging and discharging, thereby estimating the actual battery capacity, as shown in the following formula:
[0069] Regarding data usage, the initial estimation uses the latest multiple sets of driving segment data from the vehicle's time series for modeling; after subsequent driving is completed, the latest acquired driving data is incorporated into the identification dataset to achieve dynamic updates of battery capacity. This is used to reflect the capacity decay characteristics of the battery due to aging during long-term use.
[0070] S3. Repeat S1-S2 for multiple corresponding working condition data to obtain multiple estimated battery modeling values.
[0071] S4. Perform statistical analysis on the above estimation results, determine the interquartile range (IQR), dense range and statistical mean of each battery model parameter, and use them as reference parameters for Rint battery modeling, thereby effectively reducing the impact of noise and outliers on estimation accuracy.
[0072] Combination Figure 2 As shown, in some embodiments, dense interval statistics are used as reference values for the battery model for battery modeling, resulting in battery models for two battery types. The figure shows a comparison between the estimated SOC values and the actual values calculated after inputting actual data into the battery model for different driving mileages.
[0073] S5. Extract historical vehicle driving data and divide it into acceleration phase, deceleration phase, constant speed phase and idling phase according to the set principles. Then, divide the kinematic segments according to the principle that "adjacent idling and non-idling segments are regarded as a driving phase; independent idling segments are regarded as separate segments".
[0074] In embodiments of this application, vehicle driving data is also used to construct a kinematic fragment library, but this library will not be automatically updated as new driving data is imported during subsequent vehicle driving. In specific application scenarios, vehicle speed sequences are obtained from historical vehicle driving data and divided and reorganized according to predetermined rules to form kinematic fragments.
[0075] Based on the above segmentation method, after processing the historical driving data of a vehicle, a complete kinematic segmentation result can be obtained. Using this method, different driving behavior characteristics (such as acceleration, deceleration, constant speed, and idling phases) can be effectively identified and combined into representative kinematic segments, thus providing data support for subsequent operating condition classification and driving prediction.
[0076] S6. Principal Component Analysis (PCA) is used to reduce the dimensionality of the travel characteristic parameters of the kinematic segments. Principal components with a cumulative contribution rate greater than 85% are selected to obtain four new weighted parameters. Then, the K-Medoids (CLARA) algorithm is used to perform cluster analysis on these weighted parameters to classify vehicle driving conditions into four categories: urban congestion, intercity highway, urban dynamics, and mixed urban and suburban driving.
[0077] S7. Based on historical data and Markov chain models, predict future vehicle operating conditions and generate driving segment sequences. At the same time, combine neural networks to extract temporal features to achieve dynamic simulation of future driving states.
[0078] In the embodiments of this application, after obtaining the kinematic segment library through step S6, the transition probabilities between various kinematic segments are statistically analyzed based on the Markov chain principle. Next, according to the probability distribution of the transition probability matrix for each working condition, the working condition type of the vehicle in the next stage is generated, and kinematic segments matching the average speed of the current road traffic flow are selected from the kinematic segment library of the corresponding type. This process is continuously iterated, selecting kinematic segments from the database for splicing until the termination condition is met (i.e., the total distance of the kinematic segments equals the estimated given travel distance). Simultaneously, continuous kinematic segments are input into a one-dimensional convolutional neural network for training to capture the temporal features between kinematic segments (input is the kinematic segment from the previous moment, output is the kinematic segment from the next moment). These kinematic segments are not directly used for splicing, but after extracting their average speed, they are used as references for determining kinematic segments after the Markov chain selects the working condition (i.e., selecting the kinematic segment closest to the reference average speed as the reference segment for the next stage).
[0079] S8. Extract the vehicle speed and corresponding power data for each driving segment, and use a long short-term memory neural network to learn the vehicle output characteristics under different operating conditions. This is used to predict the power of the predicted kinematic segments.
[0080] In this embodiment, vehicle driving data will also be used to train a power consumption estimation neural network model to predict battery energy consumption during future driving segments. S9, based on predicted future driving power Given the established battery model, the change in SOC for the corresponding driving segment can be calculated using the ampere-hour integration method, as shown in the following formula: .
[0081] Among them, battery capacity Ohmic internal resistance R ohm With the corresponding open-circuit voltage at SOC All parameters are obtained through the battery modeling process in steps S1 to S4. These parameters form the basis of the battery model, providing an accurate physical characteristic description for subsequent energy management. In steps S5 to S7, the future driving segments of the vehicle are first predicted, and based on the predicted vehicle speed sequence, the data is input into the neural network proposed in step S8. Through the calculation of this network, the battery power is finally obtained. This method effectively combines battery modeling with vehicle dynamics, improving the accuracy and robustness of SOC estimation and battery life prediction to achieve high-precision battery performance evaluation and energy prediction.
[0082] Combination Figure 3 As shown, correspondingly, this embodiment of the invention provides a device for predicting changes in the state of charge of a battery, comprising: The battery modeling module 301 is used to read historical vehicle data, establish a battery equivalent circuit model and estimate model parameters, including the open circuit voltage-state of charge (OCV-SOC) curve, ohmic internal resistance and actual battery capacity. The working condition analysis module 302 is used to perform kinematic segmentation and working condition clustering on the historical vehicle driving data, and predict the future driving working condition sequence of the vehicle based on historical driving characteristics and working condition transition patterns. The power prediction module 303 is used to predict the power demand of the vehicle during driving based on the future driving condition sequence using a neural network model. SOC calculation module 304 is used to calculate the change in state of charge during future driving using the ampere-hour integration method based on the model parameters of the battery equivalent circuit model and the predicted power demand.
[0083] In some embodiments, the battery modeling module 301 includes: The OCV-SOC estimation unit is used to fit and establish the OCV-SOC curve using the small current discharge data under the shutdown condition and the multinomial regression method. The internal resistance estimation unit is used to extract the terminal voltage change value and current change value from the current sudden segment in the parking charging condition data to estimate the ohmic internal resistance. The capacity estimation unit is used to estimate the actual capacity reflecting the battery aging characteristics based on the ampere-hour integral method, using vehicle driving condition data and driving data from the most recent time period.
[0084] In some embodiments, the operating condition analysis module 302 includes: The segmentation unit is used to divide driving data into acceleration, deceleration, constant speed and idling speed stages based on acceleration and speed, and to reorganize the segments according to a preset principle. The preset principle is to regard adjacent idling speed and non-idling speed segments as a driving stage, and independent idling speed segments as separate segments. Clustering units are used to reduce the dimensionality of fragment features using principal component analysis (PCA) and to classify the working conditions into four categories: urban congestion, intercity highway, urban dynamics, and mixed urban and suburban areas using K-Medoids or CLARA clustering algorithms.
[0085] In some embodiments, the power prediction module 303 is specifically used for: The predicted vehicle speed and acceleration sequences are input into a long short-term memory neural network (LSTM). The LSTM is trained using an asymmetric Huber loss function with masking. The masking mechanism is used to identify the location of valid data, and the asymmetric penalty is used to severely penalize predictions that underestimate power.
[0086] Combination Figure 4 As shown, taking an automotive device as an example, this embodiment of the invention provides an application scenario. The automotive device 200 includes multiple key units, each responsible for performing a specific function. The core of the device 200 is a computing unit 201, which is responsible for performing various tasks and processes according to program instructions stored in a read-only memory (ROM) 202 or computer programs loaded from a random access memory (RAM) 203. The computing unit 201 performs calculations and control by reading programs stored in the ROM or dynamically loading data as needed.
[0087] The vehicle equipment 200 is also equipped with a vehicle data acquisition unit 204, which is used to collect data from various vehicle sensors in real time, such as vehicle speed, temperature, battery terminal voltage, and terminal current. The data acquisition unit 204 processes this data through the input / output (I / O) interface 206, and then transmits it to the computing unit 201 via the bus 205 for further analysis and processing. The I / O interface 206 not only carries the function of data transmission but also handles interaction with external systems, ensuring effective data processing and sharing.
[0088] The vehicle equipment 200 is also equipped with a vehicle data acquisition unit 204, which is used to collect data from various vehicle sensors in real time, such as vehicle speed, temperature, battery voltage, and engine speed. The data acquisition unit 204 processes this data through the input / output (I / O) interface 206, and then transmits it to the computing unit 201 via the bus 205 for further analysis and processing. The I / O interface 206 not only carries the function of data transmission but also handles interaction with external systems, ensuring effective data processing and sharing.
[0089] The input unit 208 receives data input from external devices or users and transmits it to the computing unit 201 for processing via the I / O interface 206. The output unit 209 is responsible for transmitting the processed results to external devices or display systems, such as vehicle displays or remote monitoring platforms, via the I / O interface 206.
[0090] All units of device 200 are connected to bus 205 via I / O interface 206 and work collaboratively through bus 205. Control unit 207 is directly connected to bus 205 and is responsible for the overall coordination and control of the device, ensuring that each unit executes tasks according to predetermined logic and sequence. Control unit 207 monitors the device status in real time, handles fault diagnosis, and exchanges data and communicates with each unit through the bus.
[0091] The computing unit 201 is the core processing module of the device 200, used to execute the firmware instructions stored in the read-only memory ROM 202 or the executable code loaded from the RAM 203. The computing unit 201 can be a high-performance multi-core central processing unit (CPU), an embedded microcontroller (MCU), a graphics processing unit (GPU), or an artificial intelligence chip (AI Processor) with neural network computing capabilities. Its main responsibilities include: processing raw signals such as vehicle speed, current, voltage, and temperature uploaded by the data acquisition unit 204, performing filtering, component and state estimation; coordinating multi-module communication on the bus 205, allocating task priorities, and ensuring real-time response; and executing onboard algorithm models to achieve battery SOH estimation and SOC change prediction.
[0092] The Read-Only Memory (ROM) 202 stores system firmware and basic control logic, such as device startup programs, sensor calibration parameters, and communication protocol stacks. This memory can be in the form of NOR Flash or EEPROM, and its contents are fixed during the device manufacturing stage, ensuring that the system can immediately run the preset logic after power-on. The RAM 203 is mainly used to temporarily store data generated during operation, including data acquisition buffers, intermediate calculation results, algorithm model weights, and intermediate layer activation values. In some embodiments, the RAM can adopt a DDR or LPDDR structure to improve data read / write speed and system responsiveness.
[0093] The data acquisition unit 204 is used to collect operating parameters in real time from multiple sensing nodes (vehicle sensor unit 210) inside the vehicle, such as vehicle speed sensor signals, battery terminal voltage and terminal current, etc. In some embodiments, it may include a multiplex analog-to-digital converter (ADC), signal conditioning circuit, and communication interface (such as CAN, LIN, Ethernet). In this embodiment, the data acquisition unit 204 transmits the sampled data to the bus 205 through the I / O interface 206 for the computing unit 201 to fuse and analyze.
[0094] Bus 205 is the data and control signal transmission channel inside device 200. In some embodiments, it may adopt a high-speed serial bus (such as CAN-FD, FlexRay or PCIe) structure.
[0095] I / O interface 206 serves as a bridge between device 200 and external systems, sensors, and actuators. Its functions include: It receives external signals (sensor output, motor feedback, user input); outputs control commands and diagnostic data to external displays, actuators, or remote servers; supports multiple protocol standards such as CAN, LIN, Ethernet, RS485, and UART to achieve data interaction with the vehicle controller (VCU), battery management system (BMS), or cloud platform.
[0096] The control unit 207 is used to coordinate the working status of various functional modules within the device 200, maintaining the real-time performance and stability of the system. In practical applications, the control unit 207 has the following functions: real-time monitoring of system temperature, power status, and communication load; performing system reset, task scheduling, and fault tolerance processing; and controlling actuator actions (such as cooling system adjustment and power switching) based on the output of the computing unit 201.
[0097] The input unit 208 may include a touchscreen, buttons, a voice recognition module, or a remote communication receiving module. This unit is used to receive user commands, external vehicle signals, or control commands issued by a host computer. The received information is forwarded to the computing unit 201 via the I / O interface 206 for recognition and response.
[0098] The output unit 209 is used to output system operation results to the driver or a remote monitoring center. It may include: an in-vehicle display screen for displaying information such as vehicle operating status, energy consumption, and predicted lifespan; an audible and visual alarm module for issuing warning signals in abnormal conditions; and a communication module (such as 4G / 5G / WiFi) for uploading real-time operating data and diagnostic results to the cloud or a back-end management system.
[0099] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects: Both the OCV-SOC curve and ohmic resistance modeling are based on historical vehicle operating data, requiring no additional experiments. The battery capacity model can be adjusted synchronously with updates to vehicle driving data, effectively characterizing battery aging characteristics. Simultaneously, neural networks are used to predict and stitch together future driving segments, estimating the corresponding power consumption. Combining the battery model obtained from the above modeling methods with the power consumption data predicted by the neural network, the change in SOC can be accurately predicted. This method can still predict the change in SOC based solely on historical vehicle operating data, even when travel route information is unavailable or vehicle parameters are lacking, while maintaining good generalization ability and prediction accuracy.
[0100] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for predicting changes in the state of charge of a battery, characterized in that, include: Historical vehicle data is read, a battery equivalent circuit model is established, and the model parameters are estimated. The model parameters include the open-circuit voltage-state-of-charge (OCV-SOC) curve, ohmic internal resistance, and actual battery capacity. Kinematic segmentation and working condition clustering are performed on historical vehicle driving data. Based on historical driving characteristics and working condition transition patterns, the future driving working condition sequence of the vehicle is predicted. Based on the future driving condition sequence, a neural network model is used to predict the power demand during vehicle driving. Based on the model parameters of the battery equivalent circuit model and the predicted power demand, the change in state of charge during future driving is calculated using the ampere-hour integral method.
2. The method according to claim 1, characterized in that, The process involves reading historical vehicle data, establishing a battery equivalent circuit model, and estimating model parameters. These model parameters include the open-circuit voltage-state-of-charge (OCV-SOC) curve, ohmic internal resistance, and the actual battery capacity. Specifically, they include: Using low-current discharge data under the condition of engine shutdown, a polynomial regression method was used to fit and establish the OCV-SOC curve; By utilizing the current abrupt change segments in the parking charging condition data, the terminal voltage change value and current change value are extracted to estimate the ohmic internal resistance; Using vehicle driving condition data and driving data from the most recent period, the actual capacity reflecting battery aging characteristics is estimated based on the ampere-hour integral method.
3. The method according to claim 2, characterized in that, The method of estimating the actual capacity reflecting battery aging characteristics based on the ampere-hour integral method, using vehicle driving condition data and recent driving data, specifically includes: The system selects driving data from the vehicle within the most recent preset time period or preset mileage, calculates the ratio of charge / discharge capacity to change in state of charge, and performs statistical analysis on the estimation results of multiple data segments. The statistical mean or dense interval value is taken as the actual capacity of the battery to achieve dynamic capacity updates.
4. The method according to claim 1, characterized in that, The process of kinematic segmenting and operating condition clustering of historical vehicle driving data, and predicting future driving condition sequences based on historical driving characteristics and operating condition transition patterns, specifically includes: Based on acceleration and speed, driving data is divided into acceleration, deceleration, constant speed and idling stages. The segments are recombined according to a preset principle, which regards adjacent idling and non-idling segments as a driving stage and independent idling segments as separate segments. Principal component analysis (PCA) was used to reduce the dimensionality of the segment features, and K-Medoids or CLARA clustering algorithms were used to classify the working conditions into four categories: urban congestion, intercity highway, urban dynamics and suburban mixed.
5. The method according to claim 1, characterized in that, The process of kinematic segmentation and operating condition clustering of historical vehicle driving data, based on historical driving characteristics and operating condition transition patterns, and predicting future vehicle driving condition sequences specifically includes: Based on historical data, the transition probabilities between various kinematic segments are statistically analyzed to construct a Markov chain transition matrix. By combining one-dimensional convolutional neural networks to extract temporal features, and under the constraint of a preset total mileage, a sequence of future driving segments is generated by splicing kinematic units.
6. The method according to claim 5, characterized in that, The training of the one-dimensional convolutional neural network includes: Construct a dual-channel time-series data input layer that includes vehicle speed and acceleration; Construct a hidden layer consisting of multiple convolutional blocks, each convolutional block containing a one-dimensional convolutional layer, a batch normalization layer, an activation function layer, and a random deactivation layer; Training is performed using a multi-component composite loss function, which includes velocity loss, acceleration loss, average velocity loss, distance loss, and cumulative distance loss.
7. The method according to claim 1, characterized in that, The step of predicting the power demand of the vehicle during driving using a neural network model based on the future driving condition sequence specifically includes: A Long Short-Term Memory (LSTM) neural network is constructed. The input layer receives vehicle speed and acceleration sequences, the hidden layer contains LSTM neuron units, and the output layer is mapped to power prediction values. The training is performed using an asymmetric Huber loss function with masking. The masking mechanism ignores zero-filling positions and sets a penalty coefficient for negative predictions.
8. A device for predicting changes in the state of charge of a battery, characterized in that, include: The battery modeling module is used to read historical vehicle data, establish a battery equivalent circuit model and estimate model parameters, including the open circuit voltage-state of charge (OCV-SOC) curve, ohmic internal resistance and actual battery capacity. The operating condition analysis module is used to perform kinematic segmentation and operating condition clustering on historical vehicle driving data, and predict the future driving operating condition sequence of the vehicle based on historical driving characteristics and operating condition transition patterns. The power prediction module is used to predict the power demand of the vehicle during driving based on the future driving condition sequence using a neural network model. The SOC calculation module is used to calculate the change in state of charge during future driving using the ampere-hour integration method, based on the model parameters of the battery equivalent circuit model and the predicted power demand.
9. The apparatus according to claim 8, characterized in that, The battery modeling module includes: The OCV-SOC estimation unit is used to fit and establish the OCV-SOC curve using the small current discharge data under the shutdown condition and the multinomial regression method. The internal resistance estimation unit is used to extract the terminal voltage change value and current change value from the current sudden segment in the parking charging condition data to estimate the ohmic internal resistance. The capacity estimation unit is used to estimate the actual capacity reflecting the battery aging characteristics based on the ampere-hour integral method, using vehicle driving condition data and driving data from the most recent time period.
10. The apparatus according to claim 9, characterized in that, The operating condition analysis module includes: The segmentation unit is used to divide driving data into acceleration, deceleration, constant speed and idling speed stages based on acceleration and speed, and to reorganize the segments according to a preset principle. The preset principle is to regard adjacent idling speed and non-idling speed segments as a driving stage, and independent idling speed segments as separate segments. Clustering units are used to reduce the dimensionality of fragment features using principal component analysis (PCA) and to classify the working conditions into four categories: urban congestion, intercity highway, urban dynamics, and mixed urban and suburban areas using K-Medoids or CLARA clustering algorithms.