Method for predicting available capacity of battery of unmanned vehicle
By combining the dual-model architecture with the cumulative power-on time, number of charge and discharge cycles, and ambient temperature, and using ping-pong operations to store data, the accuracy of unmanned vehicle battery available capacity prediction and adaptability to complex environments are solved, achieving more efficient battery capacity prediction.
Patent Information
- Application Number
- CN202510796718.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-06-13
AI Technical Summary
Existing methods for predicting the available capacity of unmanned vehicle batteries consider only a single factor, ignore operating status parameters, have high model complexity, and are unable to accurately predict battery capacity in complex environments.
A dual-model architecture is adopted. The first model combines the cumulative power-on time, number of charge and discharge cycles and ambient temperature. The second model is a physically informed neural network that reflects the battery aging characteristics through equivalent temperature and battery utilization. It uses ping-pong operations to store the cumulative power-on time and constructs multi-dimensional features to predict battery capacity.
The accuracy and adaptability of battery available capacity prediction are improved, the model structure is simplified, overfitting is avoided, and it is suitable for complex environments.
Smart Images

Figure CN120761893A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery health state prediction, and in particular to a method for predicting the available capacity of a battery of an unmanned vehicle. Background Art
[0002] Unmanned vehicles have been widely used in logistics distribution, agricultural production, intelligent transportation and other fields. The battery of unmanned vehicles is its core power source. Accurately obtaining the available capacity of the battery is of great significance to the normal operation and performance of unmanned vehicles.
[0003] The existing research solutions for battery available capacity have the following main shortcomings: (1) The influencing factors considered in the battery available capacity prediction method are relatively simple. Most of them only focus on conventional parameters such as the number of battery charge and discharge cycles and ambient temperature, but ignore the operating status parameters unique to unmanned vehicles. For example, in the actual operation process of unmanned vehicles, the cumulative power-on time and standby time are important operating characteristics for unmanned vehicles. Both will have a significant impact on the performance and available capacity of the battery, but the existing technology ignores the operating status parameters of unmanned vehicles. (2) Most models for battery available capacity prediction use a single prediction model. Although multiple factors are considered, the model is highly complex and difficult to predict quickly and effectively in the actual operating environment of unmanned vehicles. (3) When considering the impact of ambient temperature on battery capacity, the measured ambient temperature value is usually directly used without considering the nonlinear characteristics of the impact of temperature on battery performance and the equivalent effect of different temperature ranges. This results in a significant decrease in the accuracy of battery capacity prediction in scenarios with large temperature changes, and cannot meet the operating requirements of unmanned vehicles in complex environments.
[0004] Therefore, it is necessary to provide a method for predicting the available battery capacity of unmanned vehicles with high prediction accuracy, simple model, and applicability to complex environments. Summary of the Invention
[0005] In view of the above analysis, an embodiment of the present invention aims to provide a method for predicting the available battery capacity of an unmanned vehicle, so as to solve the problems of low accuracy, complex model and inapplicability to complex environments in existing unmanned vehicle battery available capacity prediction.
[0006] An embodiment of the present invention provides a method for predicting the available battery capacity of an unmanned vehicle, comprising:
[0007] Obtain the cumulative power-on time, standby time, number of charge and discharge cycles, and ambient temperature of the unmanned vehicle to be tested;
[0008] Inputting the accumulated power-on time, the number of charge-discharge cycles, and the ambient temperature into a first battery available capacity prediction model to obtain a first battery capacity;
[0009] calculating an equivalent temperature based on the ambient temperature, calculating a battery utilization rate based on the accumulated power-on time and the standby time, and inputting the equivalent temperature, the battery utilization rate, and the number of charge and discharge cycles into a second battery available capacity prediction model to obtain a second battery capacity;
[0010] The actual available capacity of the battery of the unmanned vehicle is calculated based on the first battery capacity and the second battery capacity.
[0011] Based on a further improvement of the above method, the calculating of the equivalent temperature based on the ambient temperature includes:
[0012]
[0013] T s is the equivalent temperature, T actual is the ambient temperature, E a is the battery aging activation performance, T ref is the reference temperature, R is the ideal gas constant;
[0014] The accumulated power-on time of the unmanned vehicle is stored in the hard disk based on the ping-pong operation. When reading, the accumulated power-on time with a larger value is used as the accumulated power-on time of the unmanned vehicle to be tested.
[0015] Based on a further improvement of the above method, the accumulated power-on time of the unmanned vehicle is stored in a hard disk based on a ping-pong operation, including:
[0016] A1: After the unmanned vehicle starts, the chassis controller will send a heartbeat frame to the onboard computer of the unmanned vehicle;
[0017] A2: After receiving the heartbeat frame from the chassis controller, the onboard computer performs the following operations:
[0018] N1: Obtain the system time corresponding to the current heartbeat frame as the first power-on time, obtain the system time corresponding to the previous heartbeat frame as the second power-on time, and obtain the temporary time variable value;
[0019] N2: Calculate the power-on time difference based on the first power-on time and the second power-on time, and determine whether the power-on time difference is within the first preset interval. If so, read the cumulative power-on duration corresponding to the second power-on time from the hard disk, and accumulate the power-on time difference, the temporary time variable value and the cumulative power-on duration to obtain the cumulative power-on duration corresponding to the first power-on time, and use a ping-pong operation to store the cumulative power-on duration in the hard disk, and clear the temporary time variable value; if the power-on time difference is less than the left endpoint value of the first preset interval, accumulate the power-on time difference and the temporary time variable value as a new temporary time variable value, and assign the first power-on time to the second power-on time, and continue to obtain new heartbeat frames; if the power-on time difference is greater than the right endpoint value of the first preset interval, increase the temporary time variable value by 100ms, and assign the first power-on time to the second power-on time, and continue to obtain new heartbeat frames;
[0020] N3: If the onboard computer does not receive a heartbeat frame within the preset waiting time, it stops receiving.
[0021] Based on a further improvement of the above method, the first preset interval is (100ms, 1000ms); the on-board computer updates the system time of the unmanned vehicle using GNSS satellite timing.
[0022] Based on the further improvement of the above method, the first battery available capacity prediction model is:
[0023]
[0024] α, β, is a constant, T ac is the cumulative power-on time, N is the number of charge and discharge cycles, T actual is the ambient temperature.
[0025] Based on the further improvement of the above method, the second battery available capacity prediction model is a physical informed neural network PINNs, and its loss function is:
[0026] L=L data +λ1L phys +λ2L boundary +λ3L momo ,
[0027]
[0028] Among them, L data is the data fitting loss, x i =(T s_i , U i , N i) is the i-th training sample, m is the total number of training samples, T s_i is the equivalent temperature of the i-th training sample, U i is the battery utilization rate of the i-th training sample, N i is the number of charge and discharge cycles of the i-th training sample, is the second battery capacity corresponding to the i-th training sample, Q true (x i ) is the actual battery capacity corresponding to the i-th training sample; L phys is the physical mechanism constraint loss, S={i|T s_i >25℃ and N i >50}, is the number of samples in the set S; L boundary is the boundary capacity constraint, L momo is the capacity monotonicity constraint, and λ1, λ2, and λ3 are weight coefficients.
[0029] Based on the further improvement of the above method, the training sample data of the second battery health status prediction model is constructed in the following way:
[0030] B1: Using the unmanned vehicle data of the same model as the unmanned vehicle to be tested in the historical database as a first training sample subset, each sample in the first training sample subset includes the number of charge and discharge cycles read from the vehicle's hard drive, the calculated equivalent temperature and battery utilization rate, and the battery capacity of the unmanned vehicle;
[0031] B2: Determine whether the distribution of battery capacities in the first training sample subset is uniform. If so, execute B3; if not, execute B4.
[0032] B3: Determine whether the number of samples in the first training sample subset is greater than or equal to a first preset threshold; if so, use the first training sample subset as training samples for the second battery available capacity prediction model; if not, perform sample expansion based on the first training sample subset so that the number of training samples is greater than or equal to the first preset threshold, and execute B5;
[0033] B4: Perform sample balancing on the first training sample subset to ensure uniform sample distribution, and return to B2;
[0034] B5: Use the expanded sample data and the first training sample subset as training samples for the second battery available capacity prediction model.
[0035] Based on a further improvement of the above method, the sample expansion based on the first training sample subset includes:
[0036] C1: training a variational autoencoder based on the first training sample subset to obtain a target sample generation model;
[0037] C2: generating a second preset threshold number of first to-be-processed sample subsets based on the target sample generation model;
[0038] C3: for each sample in the to-be-processed sample subset, judging the rationality of the charge-discharge cycle number, the equivalent temperature, the battery utilization rate and the battery capacity, if rational, retaining, if not rational, discarding;
[0039] C4: after step C3, obtaining a second to-be-processed sample subset, for each sample in the second to-be-processed sample subset, finding at least one target sample in the first training sample subset closest to the charge-discharge cycle number of the sample, if the difference between the battery capacity of the target sample and the sample is less than a third preset threshold, if less than, retaining the data, if greater than, discarding the data;
[0040] C5: after step C4, obtaining a second training sample subset, judging whether the sum of the sample numbers of the first training sample subset and the second training sample subset is greater than or equal to a first preset threshold, if yes, taking the first training sample subset and the second training sample subset as the training sample data of the second battery available capacity prediction model, if no, returning to C2.
[0041] Based on the further improvement of the above method, the sample balancing of the first training sample subset comprises: obtaining the range of battery capacity in the first training sample subset, dividing it into several intervals; counting the number of samples in each interval to distinguish sparse intervals and dense intervals, and generating samples for each sample in a sparse interval by using an interpolation method.
[0042] Based on the further improvement of the above method, the battery utilization rate U i is calculated by the following method:
[0043]
[0044] wherein, T st is the standby time, T ac is the cumulative power-on time; the battery actual available capacity of the unmanned vehicle is calculated based on the first battery capacity and the second battery capacity, comprising:
[0045] Hoc=w1*y1+w2*y2,
[0046] Among them, w1 and w2 are weight coefficients, y1 is the first battery capacity, and y2 is the second battery capacity; when y1, y2∈[0.7, 0.8), w1=0.4, w2=0.6; when y1, y2∈[0.8, 0.9), w1=0.5, w2=0.5; when y1, y2∈[0.9, 1], w1=0.6, w2=0.4.
[0047] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0048] The present invention provides a method for predicting the available capacity of the battery of an unmanned vehicle, which realizes the prediction of the available capacity of the battery based on multi-dimensional features and a dual-model architecture. The first battery available capacity prediction model focuses on parameters such as the cumulative power-on time, the number of charge and discharge cycles, and the ambient temperature. On the basis of the traditional prediction method, this model takes into account the operating status parameters of the unmanned vehicle, further improving the accuracy of the prediction results. The second battery available capacity prediction model focuses on the physical laws related to battery aging. By converting the ambient temperature into an equivalent temperature, the model is more sensitive to the relationship between temperature changes and battery performance. The battery utilization is calculated based on the cumulative power-on time and standby time, which more accurately reflects the working-standby operating status characteristics of the unmanned vehicle. The use of equivalent temperature and battery utilization can also more carefully describe the capacity attenuation changes and the cumulative effect of electrochemical aging of the battery. The use of a dual-model architecture not only simplifies the complexity of the two models, avoids the overfitting problem that may be caused by a single complex model, makes the model structure more reasonable and more adaptable, but also improves the accuracy of the prediction results and the ability to be applied to complex environments.
[0049] In the present invention, the above-mentioned technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of the present invention will be described in the following description, and some advantages will become apparent from the description or be learned through practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. Like reference symbols denote like components throughout the accompanying drawings.
[0051] Figure 1 This is an example diagram of a method for predicting the available battery capacity of an unmanned vehicle according to an embodiment of the present invention;
[0052] Figure 2 This is an example diagram of implementing ping-pong operation storage management in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, and are not used to limit the scope of the present invention.
[0054] A specific embodiment of the present invention discloses a method for predicting the available battery capacity of an unmanned vehicle, such as Figure 1 Shown, including:
[0055] S1: Obtain the cumulative power-on time, standby time, number of charge and discharge cycles, and ambient temperature of the unmanned vehicle to be tested.
[0056] The accumulated power-on time is read from the preset location of the storage unit (such as SSD solid state hard drive, HDD mechanical hard drive and other storage media) of the on-board computer of the unmanned vehicle. However, the on-board computer is not equipped with a UPS power supply or a large capacitor, and it is impossible to power the on-board computer for a period of time after the vehicle is powered off, so that the computer can exit the application and shut down the operating system. Therefore, when the accumulated power-on time is stored in the hard disk, power outages may cause incomplete writing storage errors, and the accumulated power-on time may be easily lost. Therefore, the accumulated power-on time of the unmanned vehicle in the present invention adopts ping-pong operation to realize storage management, and the accumulated power-on time is directly written to the hard disk, instead of the operating system writing the memory data to the hard disk, to prevent data loss or erroneous writing to the hard disk caused by sudden power outages, such as Figure 2 As shown, the hard disk is written using a ping-pong operation, that is, one address is written when N is an odd number, and another address is written when it is an even number. Since the cumulative power-on time needs to be continuously recorded, it is necessary to continue recording based on the last recorded result after the vehicle is started, so the last stored data needs to be read. Since the data storage uses a ping-pong operation, it is possible to read two results. The larger cumulative power-on time can be used. If one of the stored data in the two read addresses is invalid, the data in the other address is used as the initial cumulative power-on time, and the power-on time is continued to be accumulated based on this time.
[0057] Specifically, the accumulated power-on time of the unmanned vehicle is stored in the hard disk based on a ping-pong operation, including:
[0058] A1: After the unmanned vehicle is started, the chassis controller will send a heartbeat frame to the onboard computer of the unmanned vehicle.
[0059] The chassis controller is responsible for controlling all chassis devices, components (such as power packs, motors, brake units, etc. key components), when the chassis state is normal, the chassis controller will send heartbeat frame through CAN bus timing. The application adopts the vehicle computer to receive the chassis controller heartbeat frame (hereinafter referred to as heartbeat frame) as the whole vehicle power-on mark, when the vehicle computer receives the heartbeat frame sent by the chassis controller, it can be shown that all devices of the chassis are working properly, and the unmanned vehicle can start normally to perform the task, at this time, the unmanned vehicle takes the time when the heartbeat frame is received as the starting time, and starts to record the unmanned vehicle power-on time.
[0060] A2: After the vehicle computer receives the heartbeat frame sent by the chassis controller, the following operations are performed:
[0061] N1: Obtain the system time corresponding to the current heartbeat frame time as the first power-on time, obtain the system time corresponding to the last heartbeat frame as the second power-on time, and obtain the temporary time variable value.
[0062] Wherein, during the operation of the unmanned vehicle, CAN bus congestion may cause the heartbeat frame to be transmitted with delay or to arrive ahead of time, and the normal transmission frequency of the heartbeat frame is 10Hz, that is, under ideal conditions, the interval time between adjacent two heartbeat frames is about 100ms. However, in actual operation, affected by CAN bus congestion, this time interval may have slight fluctuations, for example, sometimes it is 99ms. In order to ensure the integrity and effectiveness of the data, the temporary time variable is introduced to retain these time difference values under non-ideal conditions, so as to prevent data loss or incorrect rejection caused by slight changes in time interval. In this way, the actual transmission of the heartbeat frame can be recorded more comprehensively and accurately, so as to ensure the stable operation of the system and the reliability of the data. The temporary time variable value refers to the variable value currently stored in the temporary time variable.
[0063] Exemplarily, if the currently received heartbeat frame is the first time that the vehicle computer receives the heartbeat frame, the temporary time variable is emptied, that is, the temporary time variable value is set to 0.
[0064] N2: Calculate the power-on time difference based on the first power-on time and the second power-on time, and determine whether the power-on time difference is within the first preset interval. If so, read the cumulative power-on duration corresponding to the second power-on time from the hard disk, and accumulate the power-on time difference, the temporary time variable value and the cumulative power-on duration to obtain the cumulative power-on duration corresponding to the first power-on time, and use a ping-pong operation to store the cumulative power-on duration in the hard disk, and clear the temporary time variable value; if the power-on time difference is less than the left endpoint value of the first preset interval, accumulate the power-on time difference and the temporary time variable value as a new temporary time variable value, and assign the first power-on time to the second power-on time, and continue to obtain new heartbeat frames; if the power-on time difference is greater than the right endpoint value of the first preset interval, increase the temporary time variable value by 100ms, and assign the first power-on time to the second power-on time, and continue to obtain new heartbeat frames.
[0065] The first preset interval is (100ms, 1000ms).
[0066] For unmanned vehicles, the frequency of heartbeat frames is about 10Hz. The unstable frequency is due to the possibility of congestion and delay in information transmission when the CAN bus load rate is high. Therefore, when calculating the time difference, the number of heartbeat frames multiplied by the heartbeat frame interval of 100ms is not directly used. Instead, the time difference is calculated based on the difference between the local time corresponding to the previous and next heartbeat frames received by the on-board computer. Theoretically, this difference is about 100ms. Therefore, the total power-on time is obtained by adding the time difference and the current accumulated total power-on time.
[0067] After the on-board computer is turned on, it will use GNSS satellite timing to update the system time of the unmanned vehicle. It will determine the validity of the GNSS satellite time by judging whether the GNSS satellite positioning status is valid. When the GNSS satellite is valid, the on-board computer will update the system time of the unmanned vehicle. This is because the local time of the on-board computer relies on the crystal oscillator circuit to maintain time, and the accuracy of the crystal oscillator is affected by factors such as temperature, humidity, and service life. If the computer is not powered on for a long time, the local time maintained by the crystal oscillator circuit may deviate. Therefore, the on-board computer of the ground unmanned vehicle generally uses GNSS satellite timing to ensure the accuracy of the local time when it cannot connect to the Internet. When it can connect to the Internet, it uses the Internet time to calibrate the computer local time. This method of calibrating the local time is generally only performed once each time it is powered on, but the local time of the computer may jump due to GNSS satellite timing, resulting in a large difference between the current time and the previous time. If the time difference exceeds 1000ms due to satellite timing, the current time (the time of the currently received heartbeat frame) will be used to update the time of the previous heartbeat frame, thereby discarding the time difference. The time difference is not added to the total power-on time, and the detection continues to detect whether the next chassis controller information frame is received. In addition, after power-on, the local time of the on-board computer may be incorrectly displayed as a future world, for example, 2099. At this time, when the satellite timing is calibrated, the time difference will be calculated as a negative value, and the difference will also be discarded. Therefore, when the timing is valid for the first time, the local time of the computer will be calibrated and updated once. At this time, the local time will jump due to the update, and the jump may cause the difference to become larger (the original local time is much behind) or become negative (the original local time is incorrectly displayed as a future time). This time difference will be discarded, which may cause an error of about 100ms. Because the heartbeat frame rate is 10Hz, the present invention prevents the problem of increased time anomalies caused by the jump of the local time of the on-board computer due to timing by verifying the power-on time difference.
[0068] N3: If the onboard computer does not receive a heartbeat frame within the preset waiting time, it stops receiving.
[0069] Exemplarily, the preset waiting time is 2000ms.
[0070] By collecting and accumulating running time in real time, a ping-pong strategy is used each time the data is updated to synchronously write the current accumulated duration to the target block in the two blocks, while simultaneously verifying the integrity of the historical data in the other block. When the vehicle loses power, even if there is no power-off protection circuit to ensure that the last updated data is written, the validity of the data written to the other block by the ping-pong operation will not be affected. This mechanism utilizes the dual-zone alternating storage characteristics of the ping-pong operation to effectively avoid data loss caused by write interruptions that may occur in single-zone storage. At the same time, the dual-zone data mutual verification mechanism improves the reliability and durability of the accumulated duration data, ensuring that the duration data read from the preset storage location is highly accurate and fault-resistant.
[0071] As for the standby time, technicians need to define the judgment conditions of the standby logic of this type of unmanned vehicle in advance (for example, no task instructions, the power system is in low power mode, only basic communication is maintained, etc.), record the timestamp when the vehicle enters the standby state, and record the timestamp again when exiting the standby state. The standby time is calculated by the difference between the two timestamps, and the total standby time can be obtained by accumulating multiple standby times. The present invention uses a running log to store and record the standby state, and uses a ping-pong operation to store it on the hard disk of the on-board computer. When obtaining the standby time, it is read from the running log stored in the on-board computer, and the total standby time is calculated by the time difference. Exemplarily, the storage format of the running log is {timestamp; state type (running / standby)}.
[0072] For the number of charge and discharge cycles, relevant data can be directly read from the internal register or Flash storage in the battery management system (BMS) of the unmanned vehicle, or battery-related information can be viewed from the status information display interface of the unmanned vehicle.
[0073] For ambient temperature, the temperature value recorded by the temperature sensor arranged on the unmanned vehicle can be directly read. If there are multiple temperature sensors, the average temperature of each measuring point (or the maximum value of the key measuring point) is taken as the ambient temperature to improve accuracy.
[0074] S2: Input the accumulated power-on time, the number of charge-discharge cycles, and the ambient temperature into a first battery available capacity prediction model to obtain a first battery capacity.
[0075] After obtaining the above three parameters of the unmanned vehicle to be tested, data standardization or normalization operation is performed, and then the processed three parameters are input into the first battery available capacity prediction model to obtain the predicted first battery capacity. The first battery available capacity prediction model is:
[0076]
[0077] α, β, is a constant, Tac is the cumulative power-on time, N is the number of charge and discharge cycles, T actual is the ambient temperature.
[0078] For example, before obtaining the first battery available capacity prediction model, it is necessary to pre-build a historical database. Each piece of data in the historical database includes the type of unmanned vehicle, the cumulative power-on time, the number of charge and discharge cycles and the ambient temperature, as well as the corresponding battery available capacity. Among them, the battery available capacity can be measured by regular capacity testing (for example, constant current discharge method, etc.) to measure the actual available capacity of the battery, and the test conditions must be consistent with the actual operating environment of the vehicle. Of course, the various parameters of each piece of data are collected in the same time window to ensure a strong correlation between the characteristics and capacity changes, and the cumulative power-on time, the number of charge and discharge cycles and the ambient temperature can be obtained by the relevant method given in step S1.
[0079] After filtering out data that is consistent with the type of unmanned vehicle to be tested, it is necessary to determine whether the number of data samples meets the preset requirements, that is, greater than 300. If it does not meet the requirements, new data is generated based on the current data samples using the difference method until the number of data samples is greater than 300.
[0080] After obtaining the data samples, data cleaning and preprocessing are performed, including missing value processing, outlier detection and correction, data standardization or normalization, and other operations. For example, for missing values, if the ambient temperature is missing, the mean of the five sampling points before and after can be used to fill it; if the number of charge and discharge cycles is missing, it can be completed by backtracking through the BMS log. Since the number of cycles is a monotonically increasing increment, it can be calculated by the sum of the most recent valid value and the number of new additions. For outliers, if the cumulative power-on time is abnormal. For example, if there is a sudden increase in transmission, the jump value caused by storage error can be eliminated by combining the vehicle operation log; if the ambient temperature is abnormal, for example, greater than 85°C or less than -40°C, which exceeds the range of the sensor, it is marked as invalid data and eliminated. For standardization, all features are Z-score standardized to eliminate dimensional differences.
[0081] After the above steps, the pre-processed data samples are used to fit the first battery available capacity prediction model to obtain α, β, Three parameters.
[0082] The first battery available capacity prediction model focuses on factors such as cumulative power-on time, number of charge and discharge cycles, and ambient temperature. Based on traditional prediction methods, this model takes into account the operating status parameters of unmanned vehicles, further improving the accuracy of the prediction results.
[0083] S3: Calculating an equivalent temperature based on the ambient temperature, calculating a battery utilization rate based on the accumulated power-on time and the standby time, and inputting the equivalent temperature, the battery utilization rate, and the number of charge and discharge cycles into a second battery available capacity prediction model to obtain a second battery capacity.
[0084] The calculating the equivalent temperature based on the ambient temperature includes:
[0085]
[0086] T s is the equivalent temperature, T actual is the ambient temperature, E a is the battery aging activation performance, T ref is the reference temperature, and R is the ideal gas constant. This equation is a temperature equivalent transformation form of the Arrhenius Equation, which is used to convert the aging effect at the actual temperature into the equivalent temperature at the reference temperature, thereby quantifying the impact of temperature on battery aging (or chemical reaction rate). This is because in unmanned vehicle battery management, temperature differences in different mission scenarios (such as high-temperature open-air operations, low-temperature warehouse inspections, etc.) will lead to different battery aging rates. Through this formula, the charge and discharge cycle aging effects at the actual temperature can be uniformly converted into equivalent aging at the reference temperature, thereby more accurately calculating the battery available capacity. Preferably, the reference temperature is 25°C.
[0087] Battery utilization U i Calculated as follows:
[0088]
[0089] Among them, T st is the standby time, T ac is the accumulated power-on time.
[0090] After obtaining the equivalent temperature, battery utilization rate, and charge and discharge cycle number, data standardization or normalization operation is performed, and then the three processed parameters are input into the second battery available capacity prediction model to obtain the predicted second battery capacity.
[0091] The second battery available capacity prediction model is the physical informed neural network PINNs, which is a machine learning model that combines deep learning with physics knowledge. It uses neural networks to approximate the solution of physical problems. Its core is to use physical principles (expressed mathematically as partial differential equations) as prior knowledge and to solve physical problems by penalizing the residuals of partial differential equations. The PINNs model is usually composed of a deep neural network, which is characterized by the addition of physical information terms in the loss function, that is, the physical laws followed. When training the model, it is necessary not only to minimize the data error, but also to minimize the physical information error to ensure that the prediction results conform to the laws of physics. The loss function of the PINNs model in the present invention is:
[0092] L=L data +λ1L phys +λ2L boundart +λ3L momo ,
[0093]
[0094]
[0095] Among them, L data is the data fitting loss, x i =(T s_i , U i , N i ) is the i-th training sample, m is the total number of training samples, T s_i is the equivalent temperature of the i-th training sample, U i is the battery utilization rate of the i-th training sample, N i is the number of charge and discharge cycles of the i-th training sample, is the second battery capacity corresponding to the i-th training sample, Q true (x i ) is the actual battery capacity corresponding to the i-th training sample; L phys is the physical mechanism constraint loss, S={i|T s_i >25℃ and N i >50}, is the number of samples in the set S; L boundary is the boundary capacity constraint, L momo is the capacity monotonicity constraint, and λ1, λ2, and λ3 are weight coefficients. λ1, λ2, and λ3 can be set based on experience or adjusted flexibly through experiments.
[0096] The training sample data of the second battery health status prediction model is constructed as follows:
[0097] B1: The unmanned vehicle data of the same model as the unmanned vehicle to be tested in the historical database is used as the first training sample subset. Each sample in the first training sample subset includes the number of charge and discharge cycles read from the vehicle hard disk, the calculated equivalent temperature and battery utilization rate, and the battery capacity of the unmanned vehicle.
[0098] The relevant contents of the historical database can be found in step S2. The unmanned vehicle sample data of the same model as the unmanned vehicle to be tested is selected from the historical data, and the equivalent temperature and battery utilization rate are calculated.
[0099] B2: Determine whether the distribution of battery capacities in the first training sample subset is uniform. If so, execute B3; if not, execute B4.
[0100] For example, in the present invention, the battery capacity range is 80% to 100%, which is divided into four intervals: [80%, 85%), [85%, 90%), [90% to 95%), and [95% to 100%). It is determined whether the number of samples in these four intervals is balanced. If there is an unbalanced interval, the distribution of battery capacity in the first training sample subset is uneven. Specifically, the balance determination is achieved by the following method:
[0101] B21: classifying each data sample in the first training sample subset into a corresponding interval of the above four intervals according to the battery capacity value thereof;
[0102] B22: Count the number of samples in each sample interval, recorded as N1, N2, N3, and N4 respectively;
[0103] B23: Calculate the proportion of each sample interval, that is, divide the number of samples in each interval by the total number of samples to obtain the proportion of the number of samples in that interval to the total number of samples;
[0104] B24: Calculate the absolute value of the difference between the proportion of each interval and 0.25;
[0105] It can be understood that the ideal equilibrium situation is that the ratio of each interval should be 1 / 4 = 0.25;
[0106] B25: If the absolute value of the difference is less than 0.05, the interval is considered to be a balanced interval. If it is greater than 0.05, the number of data samples in the interval is considered to be unbalanced.
[0107] B3: Determine whether the number of samples in the first training sample subset is greater than or equal to a first preset threshold. If so, use the first training sample subset as the training sample for the second battery available capacity prediction model; if not, perform sample expansion based on the first training sample subset so that the training sample is greater than or equal to the first preset threshold, and execute B5.
[0108] Among them, the first preset threshold is 2000.
[0109] The performing sample expansion based on the first training sample subset includes:
[0110] C1: Train a variational autoencoder based on the first training sample subset to obtain a target sample generation model.
[0111] Each training sample in the first training sample subset is standardized and used as a training sample. Specifically, the format of any training sample is {equivalent temperature, battery utilization, number of charge and discharge cycles, available capacity}, and the ratio of training set to validation set is set to 8:2. A variational autoencoder (VAE) network is constructed. For example, the encoder uses a 3-layer fully connected network, the latent space uses a 20-dimensional Gaussian distribution (mean and variance vector), the decoder also uses a 3-layer fully connected network, the loss function uses reconstruction loss (MSE) and KL divergence regularization term, the optimizer is set to Adam, the batch size is set to 64, the training rounds are set to 200, and an early stopping strategy is adopted.
[0112] Finally, the network training of the variational autoencoder VAE is implemented based on the training samples to obtain a target sample generation model that can be used to generate samples.
[0113] C2: generating a first subset of samples to be processed of a second preset threshold number based on the target sample generation model, including:
[0114] C21: Latent space sampling. Determine the dimension of the latent vector, which is determined by the dimension of the latent space of the VAE encoder. As mentioned above, the dimension of the latent space of the VAE is 20-dimensional, so the dimension of the latent vector is also 20-dimensional. Randomly sample N latent vectors from the standard normal distribution N(0, I), where I is the identity matrix, and N is the second preset threshold number. For example, for a latent vector, its format is: z = [z1, z2, ..., z i ],z i ~N(0, 1). And slightly perturb each latent vector (for example, add Gaussian noise perturbation) to enhance the diversity of generated samples and avoid excessive concentration of generated samples.
[0115] C22: Sample generation: The perturbed latent vector is fed into the VAE decoder, which outputs the feature vector of the generated sample and denormalizes the generated features to restore the original dimension. The perturbed latent vector is fed into the VAE decoder, which outputs the normalized feature vector.
[0116] In step C1, each training sample in the first training sample subset has been standardized. At this time, it is necessary to perform an inverse transformation (ie, inverse normalization) on the generated feature vector using the mean and standard deviation during standardization to restore the dimension.
[0117] C23: Format conversion, converting the generated data into the same structure as the original data set.
[0118] As described in step C1, the format of any training sample in the first training sample subset is {equivalent temperature, battery utilization, number of charge and discharge cycles, available capacity}. Therefore, the data processed in step C22 must also be consistent with this format. Format consistency here includes consistent feature order and data type. For example, the order of each parameter in each data sample processed in step C22 is checked to see if it is consistent with the format specified in the first training sample subset. If not, adjustments are made. If so, the data types of each parameter are checked to see if they are consistent with the data format specified in the first training sample subset. If so, no processing is performed. If not, adjustments are made.
[0119] Exemplarily, the second preset threshold number is 300.
[0120] C3: For each sample in the sample subset to be processed, determine the rationality of the number of charge and discharge cycles, equivalent temperature, battery utilization rate, and battery capacity. If they are reasonable, retain them; if they are unreasonable, discard them.
[0121] Reasonableness verification includes physical constraint checking, etc. For example, the physical constraint checking includes:
[0122] The number of charge and discharge cycles should be greater than or equal to 0 and less than or equal to the design life of the battery;
[0123] The equivalent temperature needs to determine the operating range according to the battery type. For example, the equivalent temperature can be set to be greater than or equal to -20°C and less than or equal to 60°C;
[0124] Battery utilization, set as a percentage, 0 to 100%;
[0125] The battery capacity should be set to be less than or equal to the initial capacity and greater than or equal to the scrap threshold. For example, it can be set to 80% to 100%.
[0126] C4: After step C3, a second subset of samples to be processed is obtained. For each sample in the second subset of samples to be processed, at least one target sample whose number of charge and discharge cycles is closest to that of the sample is found from the first training sample subset. If the difference in battery capacity between the target sample and the sample is less than a third preset threshold, the data is retained if the difference is less than the third preset threshold; otherwise, the data is discarded.
[0127] For each sample in the second subset of samples to be processed, perform the following operations:
[0128] Calculate the difference between the number of charge and discharge cycles of the sample in the second to-be-processed sample subset and the number of charge and discharge cycles of each sample in the first training sample subset. If the difference is less than or equal to a cycle number threshold, use it as the target sample closest to the sample. Exemplarily, the cycle number threshold is set to 3.
[0129] Calculate the difference between the battery capacity of the sample and the battery capacity of each target sample. If there are multiple target samples, use the average value as the difference. If the difference is less than or equal to 2%, retain the data; if it is greater, discard the data.
[0130] C5: After step C4, a second training sample subset is obtained, and it is determined whether the sum of the number of samples in the first training sample subset and the second training sample subset is greater than or equal to a first preset threshold. If so, the first training sample subset and the second training sample subset are used as training sample data for the second battery available capacity prediction model. If not, return to C2.
[0131] B4: Perform sample balancing on the first training sample subset to make the samples evenly distributed, and return to B2.
[0132] For unbalanced sample intervals, interpolation method is used to generate samples.
[0133] The distinction between sparse and dense intervals is based on a preset interval threshold. For example, intervals with a sample count below the threshold are considered sparse, while intervals with a sample count above or equal to the threshold are considered dense. Samples can be generated using methods such as linear interpolation, polynomial interpolation, or spline interpolation. For example, the interval threshold is 50.
[0134] After the samples are generated based on the interpolation method, rationality verification as described in step C3 and logic verification as described in step C4 are required.
[0135] B5: Use the expanded sample data and the first training sample subset as training samples for the second battery available capacity prediction model.
[0136] S4: Calculate the actual available battery capacity of the unmanned vehicle based on the first battery capacity and the second battery capacity.
[0137] The calculating the actual available battery capacity of the unmanned vehicle based on the first battery capacity and the second battery capacity includes:
[0138] Hoc=w1*y1+w2*y2,
[0139] Among them, w1 and w2 are weight coefficients, y1 is the first battery capacity, and y2 is the second battery capacity.
[0140] The present invention uses a dual-model architecture to predict battery available capacity. The two models have different predictive capabilities for different battery available capacity intervals. Therefore, the present invention further divides the capacity intervals and determines weights based on the values of the first and second battery capacities to improve the accuracy of the final actual available capacity. Specifically, when y1, y2∈[0.7, 0.8), w1=0.4, w2=0.6; when y1, y2∈[0.8, 0.9), w1=0.5, w2=0.5; and when y1, y2∈[0.9, 1], w1=0.6, w2=0.4. It can be understood that when the battery capacity is high, that is, the battery capacity is greater than or equal to 90%, and the battery is in the initial stage of health, the equivalent temperature and battery utilization have a weaker effect on the attenuation of the battery capacity. Because the first battery available capacity prediction model has higher prediction accuracy and stronger generalization ability in the high capacity range, it can more accurately capture the main degradation mechanism of the battery capacity. Therefore, the weight of the first battery available capacity prediction model is set higher than that of the second battery available capacity prediction model; as the battery available capacity continues to decrease, that is, greater than or equal to 80% and less than 90%, the battery enters the aging period, and the influence of the equivalent temperature and battery utilization on the battery capacity gradually increases. The weight of the first battery available capacity prediction model begins to decrease, and the weight of the second battery available capacity prediction model begins to increase, and the prediction accuracy of the two models approaches the same. Therefore, the weight of the first battery available capacity prediction model is set equal to that of the second battery available capacity prediction model, and the prediction result combines the advantages of the two, taking into account both the number of charge and discharge cycles and the influence of equivalent temperature and battery utilization, making the prediction more comprehensive; as the battery available capacity continues to decrease, that is, when it is greater than or equal to 70% and less than 80%, the battery aging speed accelerates, and the influence of equivalent temperature and battery utilization on battery capacity becomes greater and greater. The weight of the first battery available capacity prediction model continues to decrease, and the weight of the second battery available capacity prediction model continues to increase, and the second model performs better in the low capacity range, can accurately capture the complex degradation mechanism, and provide more reliable prediction results. Therefore, the weight of the first battery available capacity prediction model is set to be smaller than that of the second battery available capacity prediction model.
[0141] Compared with the prior art, the embodiment provides a battery available capacity prediction method of an unmanned vehicle, which realizes battery available capacity prediction based on multi-dimensional features and a double model architecture. A first battery available capacity prediction model focuses on cumulative power-on time, charge and discharge cycle times and environmental temperature and the like parameters. The model considers the running state parameters of the unmanned vehicle on the basis of a traditional prediction method, and further improves the accuracy of the prediction result. A second battery available capacity prediction model focuses on physical laws related to battery aging. By converting the environmental temperature into an equivalent temperature, the model is more sensitive to the relationship between temperature changes and battery performance. The battery utilization is calculated based on the cumulative power-on time and standby time, which more accurately reflects the running state characteristics of the unmanned vehicle in the working-standby state. The equivalent temperature and battery utilization rate can also more accurately describe the capacity attenuation change and the cumulative effect of electrochemical aging of the battery. The double model architecture simplifies the complexity of the two models, avoids overfitting problems that may be caused by a single complex model, makes the model structure more reasonable and more adaptable, and improves the accuracy of the prediction result and the ability to adapt to complex environments.
[0142] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. The computer readable storage medium includes a magnetic disk, an optical disk, a read-only memory or a random access memory.
[0143] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed by the present application can be easily thought of by those skilled in the art, and should be covered within the protection scope of the present application.
Claims
1. A method for predicting the available battery capacity of an unmanned vehicle, characterized in that: include: Obtain the cumulative power-on time, standby time, number of charge and discharge cycles, and ambient temperature of the unmanned vehicle to be tested; Inputting the accumulated power-on time, the number of charge-discharge cycles, and the ambient temperature into a first battery available capacity prediction model to obtain a first battery capacity; calculating an equivalent temperature based on the ambient temperature, calculating a battery utilization rate based on the accumulated power-on time and the standby time, and inputting the equivalent temperature, the battery utilization rate, and the number of charge and discharge cycles into a second battery available capacity prediction model to obtain a second battery capacity; The actual available capacity of the battery of the unmanned vehicle is calculated based on the first battery capacity and the second battery capacity.
2. The method for predicting the available battery capacity of an unmanned vehicle according to claim 1, characterized in that: The calculating the equivalent temperature based on the ambient temperature includes: T s is the equivalent temperature, T actual is the ambient temperature, E a is the battery aging activation performance, T ref is the reference temperature, R is the ideal gas constant; The accumulated power-on time of the unmanned vehicle is stored in the hard disk based on the ping-pong operation. When reading, the accumulated power-on time with a larger value is used as the accumulated power-on time of the unmanned vehicle to be tested.
3. The method for predicting the available battery capacity of an unmanned vehicle according to claim 2, wherein: The accumulated power-on time of the unmanned vehicle is stored in a hard disk based on a ping-pong operation, including: A1: After the unmanned vehicle starts, the chassis controller will send a heartbeat frame to the onboard computer of the unmanned vehicle; A2: After receiving the heartbeat frame from the chassis controller, the onboard computer performs the following operations: N1: Obtain the system time corresponding to the current heartbeat frame as the first power-on time, obtain the system time corresponding to the previous heartbeat frame as the second power-on time, and obtain the temporary time variable value; N2: Calculate the power-on time difference based on the first power-on time and the second power-on time, and determine whether the power-on time difference is within the first preset interval. If so, read the cumulative power-on duration corresponding to the second power-on time from the hard disk, and accumulate the power-on time difference, the temporary time variable value and the cumulative power-on duration to obtain the cumulative power-on duration corresponding to the first power-on time, and use a ping-pong operation to store the cumulative power-on duration in the hard disk, and clear the temporary time variable value; if the power-on time difference is less than the left endpoint value of the first preset interval, accumulate the power-on time difference and the temporary time variable value as a new temporary time variable value, and assign the first power-on time to the second power-on time, and continue to obtain new heartbeat frames; if the power-on time difference is greater than the right endpoint value of the first preset interval, increase the temporary time variable value by 100ms, and assign the first power-on time to the second power-on time, and continue to obtain new heartbeat frames; N3: If the onboard computer does not receive a heartbeat frame within the preset waiting time, it stops receiving.
4. The method for predicting the available battery capacity of an unmanned vehicle according to claim 3, wherein: The first preset interval is (100ms, 1000ms); The on-board computer uses GNSS satellite timing to update the system time of the unmanned vehicle.
5. The method for predicting the available battery capacity of an unmanned vehicle according to claim 1, wherein: The first battery available capacity prediction model is: α, β, is a constant, T ac is the cumulative power-on time, N is the number of charge and discharge cycles, T actual is the ambient temperature.
6. The method for predicting the available battery capacity of an unmanned vehicle according to claim 2, wherein: The second battery available capacity prediction model is a physical informed neural network PINNs, and its loss function is: L=L data +λ1L phys +λ2L boundary +λ3L momo , Among them, L data is the data fitting loss, x i =(T s_i , U i , N i ) is the i-th training sample, m is the total number of training samples, T s_i is the equivalent temperature of the i-th training sample, U i is the battery utilization rate of the i-th training sample, N i is the number of charge and discharge cycles of the i-th training sample, is the second battery capacity corresponding to the i-th training sample, Q true (x i ) is the actual battery capacity corresponding to the i-th training sample; L phys is the physical mechanism constraint loss, S={i|T s_i >25℃ and N i >50}, is the number of samples in the set S; L boundary is the boundary capacity constraint, L momo is the capacity monotonicity constraint, and λ1, λ2, and λ3 are weight coefficients.
7. The method for predicting the available battery capacity of an unmanned vehicle according to claim 6, characterized in that: The training sample data of the second battery health status prediction model is constructed in the following manner: B1: Use the unmanned vehicle data of the same model as the unmanned vehicle to be tested in the historical database as the first training sample subset. Each sample in the first training sample subset includes the number of charge and discharge cycles read from the vehicle's hard drive, the calculated equivalent temperature and battery utilization rate, and the battery capacity of the unmanned vehicle; B2: Determine whether the distribution of battery capacities in the first training sample subset is uniform. If so, execute B3; if not, execute B4. B3: Determine whether the number of samples in the first training sample subset is greater than or equal to a first preset threshold; if so, use the first training sample subset as training samples for the second battery available capacity prediction model; If not, perform sample expansion based on the first training sample subset so that the training sample is greater than or equal to a first preset threshold, and execute B5; B4: Perform sample balancing on the first training sample subset to ensure uniform sample distribution, and return to B2; B5: Use the expanded sample data and the first training sample subset as training samples for the second battery available capacity prediction model.
8. The method for predicting the available battery capacity of an unmanned vehicle according to claim 7, characterized in that: The performing sample expansion based on the first training sample subset includes: C1: training a variational autoencoder based on the first training sample subset to obtain a target sample generation model; C2: generating a first subset of samples to be processed of a second preset threshold number based on the target sample generation model; C3: For each sample in the sample subset to be processed, determine the rationality of the number of charge and discharge cycles, equivalent temperature, battery utilization rate, and battery capacity. If reasonable, retain it; if unreasonable, discard it; C4: After step C3, a second subset of samples to be processed is obtained. For each sample in the second subset of samples to be processed, at least one target sample whose charge-discharge cycle number is closest to that of the sample is found from the first training sample subset. If the difference in battery capacity between the target sample and the sample is less than a third preset threshold, the data is retained if the difference is less than the third preset threshold; otherwise, the data is discarded. C5: After step C4, a second training sample subset is obtained, and it is determined whether the sum of the number of samples in the first training sample subset and the second training sample subset is greater than or equal to a first preset threshold. If so, the first training sample subset and the second training sample subset are used as training sample data for the second battery available capacity prediction model. If not, return to C2.
9. The method for predicting the available battery capacity of an unmanned vehicle according to claim 7, characterized in that: The sample balancing of the first training sample subset includes: obtaining the range of battery capacity in the first training sample subset and dividing it into several intervals; counting the number of samples in each interval to distinguish sparse intervals from dense intervals, and using interpolation to generate samples for each sparse interval.
10. The method for predicting the available battery capacity of an unmanned vehicle according to claim 1, characterized in that: Battery utilization U i Calculated as follows: Among them, T st is the standby time, T ac is the accumulated power-on time; The calculating the actual available battery capacity of the unmanned vehicle based on the first battery capacity and the second battery capacity includes: Hoc=w1*y1+w2*y2, Among them, w1 and w2 are weight coefficients, y1 is the first battery capacity, and y2 is the second battery capacity; when y1, y2∈[0.7, 0.8), w1=0.4, w2=0.6; when y1, y2∈[0.8, 0.9), w1=0.5, w2=0.5; when y1, y2∈[0.9, 1], w1=0.6, w2=0.4.
Citation Information
Patent Citations
Battery capacity estimation method, battery management system, vehicle and storage medium
CN111308357A
Vehicle battery capacity prediction method and device, storage medium and electronic device
CN116908722A
Method and apparatus for determining battery anomaly detection model, and electronic device
WO2025061179A1