Power battery residual life prediction method and system and aesop optimization algorithm
By improving the Crayfish Optimization Algorithm (CHCOA) and combining dynamic environment updates and ghost opposition learning strategies, the initial parameters of the BP neural network are optimized, solving the problem of insufficient global search capability in the prediction of the remaining life of lithium-ion batteries, and achieving higher prediction accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANTONG UNIV
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-26
AI Technical Summary
Among existing methods for predicting the remaining lifespan of lithium-ion batteries, metaheuristic optimization algorithms have limited global search capabilities, are prone to premature convergence, and are sensitive to initial parameters, resulting in insufficient prediction accuracy.
An improved crayfish optimization algorithm (CHCOA) is adopted, which combines a dynamic environment update mechanism and a ghost opposition learning strategy to optimize the initial weights and thresholds of the BP neural network. By simulating the crayfish's perception and response to the aquatic environment, the algorithm's adaptive adjustment capability in complex search space is enhanced, and the search range is expanded through the ghost opposition learning strategy.
It significantly improves the accuracy and robustness of power battery remaining life prediction, with root mean square error (RMSE) and mean absolute error (MAE) controlled within a low range, which is better than traditional methods and is suitable for real complex working condition datasets.
Smart Images

Figure CN122283448A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lithium-ion battery technology, specifically to a method, system, and optimization algorithm for predicting the remaining lifespan of power batteries. Background Technology
[0002] After prolonged use in electric buses, lithium-ion batteries experience capacity decay and increased internal resistance due to factors such as aging of active materials, electrolyte decomposition, and thickening of the SEI film. Accurately predicting the remaining battery life is crucial for safe vehicle operation and battery maintenance management.
[0003] Currently, battery RUL prediction primarily employs data-driven methods, particularly prediction models based on backpropagation (BP) neural networks. Existing research indicates that combining metaheuristic optimization algorithms (such as particle swarm optimization (PSO) and genetic algorithm (GA)) with BP neural networks can optimize network parameters and improve prediction accuracy. For example:
[0004] (1) COA-BP model: The standard crayfish optimization algorithm (COA) is used to optimize the weights and thresholds of the BP neural network, thereby improving the network training efficiency.
[0005] (2) HHO-BP model: The Harris Eagle Optimization Algorithm (HHO) is used to optimize network parameters.
[0006] (3) DBO-BP model: Network optimization is performed using the Dung Beetle Optimization (DBO) algorithm.
[0007] However, these methods still have problems such as limited global search capability, premature convergence, and sensitivity to initial parameters. Summary of the Invention
[0008] This invention provides a method, system, and improved crayfish optimization algorithm for predicting the remaining lifespan of a power battery to solve the above-mentioned problems.
[0009] In a first aspect, the present invention provides a method for predicting the remaining lifespan of a power battery, comprising the following steps:
[0010] Acquire historical status data of the vehicle's power battery during actual operation;
[0011] The historical state data is preprocessed and health factors are extracted to obtain feature vectors related to battery capacity decay;
[0012] Construct a BP neural network model for predicting remaining useful life;
[0013] An improved crayfish optimization algorithm is used to optimize the initial weights and thresholds of the BP neural network model. The improved crayfish optimization algorithm includes a dynamic environment update mechanism and a ghost opposition learning strategy.
[0014] The feature vector is input into the optimized BP neural network model, which outputs a predicted value of the remaining battery life.
[0015] In one optional implementation, the dynamic environment update mechanism in the improved crayfish optimization algorithm is as follows:
[0016] Determine the current search environment;
[0017] When the water quality factor V is greater than the set threshold, the individual's position is adjusted.
[0018] In one alternative implementation, the determination of the current search environment is made by a formula. The water quality factor V is defined for judgment;
[0019] Where t represents the current iteration number, and T represents the preset maximum iteration number.
[0020] In one alternative implementation, the adjustment of the individual position is performed according to the following formula:
[0021]
[0022] The formula includes an adaptive flow factor B.
[0023] In one alternative implementation, the ghost opposition learning strategy is:
[0024] Based on the principle of convex lens imaging, the ghost counterpart of the current candidate solution is generated according to the following formula to expand the search range;
[0025]
[0026] In the formula, the parameter k changes adaptively with the number of algorithm iterations according to the following formula;
[0027]
[0028] Where t represents the current iteration number, and T represents the preset maximum iteration number.
[0029] In one optional implementation, the step of optimizing the initial weights and thresholds of the BP neural network model using the improved crayfish optimization algorithm includes:
[0030] All the weights and thresholds to be optimized in the BP neural network model are encoded into the position vector of an individual in the improved crayfish optimization algorithm;
[0031] The mean square error of the prediction of the training data by the BP neural network model is used as the fitness function of the improved crayfish optimization algorithm.
[0032] The optimal position vector that minimizes the fitness function value is obtained through iterative optimization of the improved crayfish optimization algorithm.
[0033] The weights and thresholds obtained after decoding the optimal position vector are assigned to the BP neural network model as its initial network parameters.
[0034] In one optional implementation, the health factor extraction includes:
[0035] The battery capacity sequence is calculated from the historical state data based on the ampere-hour integration method;
[0036] The battery capacity sequence is then filtered and noise-reduced.
[0037] The health factors are defined as at least eight statistical features whose absolute values of the Pearson correlation coefficient with the battery capacity sequence are greater than a set threshold. These statistical features are selected from statistics related to battery temperature, total voltage, total current, and cell voltage.
[0038] In one optional implementation, the preprocessing of the historical state data includes:
[0039] Identify data segments from the charging process;
[0040] Impute missing values in the data;
[0041] Remove or correct outliers based on a predefined normal value range table.
[0042] In a second aspect, the present invention provides a system for predicting the remaining service life of a vehicle power battery, comprising:
[0043] The data acquisition and processing module is used to perform data acquisition, preprocessing, and health factor extraction steps;
[0044] The model optimization module is used to store and execute the improved crayfish optimization algorithm to optimize the parameters of the BP neural network;
[0045] The lifespan prediction module is used to load the optimized BP neural network model, perform the prediction steps, and output the remaining lifespan prediction results.
[0046] Thirdly, this paper provides an improved crayfish optimization algorithm for optimizing neural network parameters, which integrates the following based on the standard crayfish optimization algorithm:
[0047] The dynamic environment update unit is used to dynamically adjust the position update strategy of individuals in the algorithm according to the environmental state defined by the water quality factor V and the adaptive water flow factor B.
[0048] The ghost opposition learning unit is used to generate ghost opposition solutions for individuals in the current population in each iteration, based on the principle of convex lens imaging, to enhance the algorithm's global exploration capability.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] (1) By introducing a dynamic environment update mechanism, the algorithm’s ability to adapt and adjust in complex search space is significantly improved by simulating the perception and response of crayfish to the aquatic environment.
[0051] (2) By using the ghost opposition learning strategy, the opposition solution is generated based on the principle of convex lens imaging, which effectively expands the search range and avoids the problem that traditional optimization algorithms are prone to getting trapped in local optima;
[0052] (3) The improved algorithm is deeply integrated with the BP neural network, which significantly improves the accuracy and robustness of the prediction of the remaining life of the power battery. The mean absolute error (MAE) on the real complex working condition dataset is controlled within 1.3072 and the root mean square error (RMSE) is controlled within 1.7732, which is better than the existing methods such as COA-BP, HHO-BP, and DBO-BP. Attached Figure Description
[0053] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0054] Figure 1 A schematic diagram illustrating the filling of missing values during the charging phase;
[0055] Figure 2 A schematic diagram showing the results of noise reduction processing for battery capacity;
[0056] Figure 3 Pearson correlation coefficient plot;
[0057] Figure 4 This is a schematic diagram of a BP neural network.
[0058] Figure 5 This is a schematic diagram of the BP neural network training process;
[0059] Figure 6 A schematic diagram of a learning strategy based on ghost opposition;
[0060] Figure 7 CHCOA prediction flowchart;
[0061] Figure 8 This is a schematic diagram of the CHCOA-BP algorithm network structure;
[0062] Figure 9 Schematic diagram of battery capacity prediction results under different models;
[0063] Figure 10 This is a schematic diagram showing the battery capacity prediction results for different prediction starting points. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] After prolonged use in electric buses, lithium-ion batteries experience capacity decay and increased internal resistance due to factors such as aging of active materials, electrolyte decomposition, and thickening of the SEI film. Accurately predicting the remaining battery life is crucial for safe vehicle operation and battery maintenance management.
[0066] Currently, battery RUL prediction primarily employs data-driven methods, particularly prediction models based on backpropagation (BP) neural networks. Existing research indicates that combining metaheuristic optimization algorithms (such as particle swarm optimization (PSO) and genetic algorithm (GA)) with BP neural networks can optimize network parameters and improve prediction accuracy. For example:
[0067] (1) COA-BP model: The standard crayfish optimization algorithm (COA) is used to optimize the weights and thresholds of the BP neural network, thereby improving the network training efficiency.
[0068] (2) HHO-BP model: The Harris Eagle Optimization Algorithm (HHO) is used to optimize network parameters.
[0069] (3) DBO-BP model: Network optimization is performed using the Dung Beetle Optimization (DBO) algorithm.
[0070] However, these methods still have problems such as limited global search capability, premature convergence, and sensitivity to initial parameters.
[0071] The following is combined Figures 1 to 10 The following describes embodiments of the present invention.
[0072] According to an embodiment of the present invention, a method for predicting the remaining service life of a power battery is provided, comprising the following steps:
[0073] Acquire historical status data of the vehicle's power battery during actual operation;
[0074] Historical state data is preprocessed and health factors are extracted to obtain feature vectors related to battery capacity decay;
[0075] Construct a BP neural network model for predicting remaining useful life;
[0076] An improved crayfish optimization algorithm is used to optimize the initial weights and thresholds of the BP neural network model. The improved crayfish optimization algorithm includes a dynamic environment update mechanism and a ghost opposition learning strategy.
[0077] The feature vector is input into the optimized BP neural network model, which outputs a predicted value of the remaining battery life.
[0078] This embodiment uses historical status data collected from actual operating electric buses as input. The data includes time-series data such as total battery voltage, total current, state of charge (SOC), individual cell voltage, and battery temperature, with a sampling frequency of 1Hz. The data was collected from real operating records of 10 electric buses operating continuously for more than 186 weeks (approximately 3.5 years) under typical urban conditions, ensuring the authenticity of the data and the complexity of the operating conditions.
[0079] This embodiment uses a brand-new real-vehicle electric bus operation dataset, which is directly derived from complex urban working conditions and can truly reflect the degradation dynamics of batteries in actual use.
[0080] Data preprocessing and health factor extraction:
[0081] The following preprocessing steps are performed sequentially on the acquired raw data:
[0082] Charging segment identification: Identify complete constant current-constant voltage charging stages from continuous operating data.
[0083] Specifically, to accurately identify the charging process and extract effective capacity decay information, parking charging data segments are first filtered out based on the charging state identifier ("cdzt"=1). On this basis, complete charging cycles are divided according to the battery state of charge (SOC) change trend: the SOC decrease threshold is used as the benchmark for determining the start of a new cycle, eliminating minor fluctuations and interference; simultaneously, data quality control is performed, removing invalid segments with a sample size of less than 20 or ΔSOC<10, and segments with time intervals exceeding 24 hours are further segmented to ensure the continuity and representativeness of charging segments.
[0084] Missing value handling: Linear interpolation was used to impute missing values in the charging segment time series, with the following effect: Figure 1 As shown.
[0085] Specifically, regarding the issue of sampling time distortion, such as Figure 1 As shown, the system identifies missing points by the time difference of the sampling interval and uses the 4-window moving average method to interpolate segments with no more than 4 consecutive missing data points.
[0086] Outlier handling: Based on the normal value range shown in Table 1, data points that exceed the range are removed or corrected.
[0087] Specifically, for abnormal values (such as voltage, current, SOC, temperature, etc.) that exceed the reasonable range, the box plot method is used for identification, and the normal range set in Table 1 is screened and eliminated. Then, the abnormal values are filled in by linear interpolation.
[0088] Table 1. Reference range of normal values for collected data
[0089]
[0090] Capacity Calculation and Noise Reduction: The battery capacity for each charging segment was calculated using the ampere-hour integration method (Formula 1). Subsequently, a Savitzky-Golay filter was used to smooth the capacity sequence to eliminate noise interference. The processing result is shown below. Figure 2 As shown.
[0091] Health Factor Extraction: Multiple statistical features related to battery aging are calculated, including but not limited to average charging temperature, temperature standard deviation, average charging current, and voltage rise slope. Subsequently, the Pearson correlation coefficient between each feature and the battery capacity sequence is calculated, and eight strongly correlated features are selected as the final health factors (feature vector). The correlations between features are as follows: Figure 3 As shown.
[0092] Specifically, based on the capacity sequence, we further extracted statistics (such as mean, standard deviation, extreme values, etc.) of multiple features, including temperature, current, voltage, state of charge (SOC), and driving mileage, from the raw data to comprehensively characterize the battery's operating status. To screen health factors that are highly correlated with and highly independent of capacity decay, Pearson correlation coefficient (PCC) was used for quantitative analysis. The screening criteria were set as follows: absolute PCC value between a feature and capacity ≥ 0.5 (strong correlation), and absolute PCC value between features < 0.9 (avoiding multicollinearity). Based on this criterion, the following key health factors were finally selected: Tmin_std, I_mean, Vmax_std, Vmin_mean, Vmin_max, SOC_std, total mileage, and mean total mileage.
[0093] Specifically, the actual capacity of the battery is calculated using the ampere-hour integration method, and its discretization formula is as follows:
[0094] (1)
[0095] Backpropagation (BP) neural networks employ an error backpropagation mechanism for network training, and their learning process comprises two key stages: forward propagation and error backpropagation. For example... Figure 4 As shown, during the forward propagation phase, the input signal is passed layer by layer through the hidden layers to the output layer. When the output deviates from the expected value, the system initiates the backpropagation process. This process, based on the error signal, adjusts the neuron connection weights layer by layer from the output layer to the hidden layers until the network output reaches the preset accuracy or completes a specified number of training iterations.
[0096] The training process of a BP neural network is achieved through alternating iterative forward propagation and backward propagation of error. For example... Figure 5 As shown, the network structure parameters (including the number of neurons, activation function, learning rate, etc.) and connection weights are first initialized. Then, forward propagation is performed on the input training samples, and convergence is determined by comparing the mean squared error of the network output with the expected value. If the preset accuracy is not reached, a backpropagation process is initiated to update the network weights. This iterative process continues until the error threshold is met or the maximum number of iterations is reached, ultimately forming the optimized network model. This training mechanism ensures that the network gradually approximates the objective function, achieving accurate input-output mapping.
[0097] Based on the efficiency and adaptability of metaheuristic algorithms in solving complex optimization problems, and drawing on successful cases of COA in engineering optimization control and other fields, an improved optimization algorithm (CHCOA) is proposed. This algorithm significantly improves optimization efficiency and solution accuracy by optimizing the search mechanism and convergence performance of COA.
[0098] In CHCOA (Children of Oceans and Clams), the quality of the aquatic environment has a significant impact on the survival of clam. Based on their habits, clam primarily feed on plants and prefer freshwater. Oxygen is an essential energy source for all living organisms; the higher the dissolved oxygen content in the water, the more vigorous the clam's feeding, the faster it grows, and the fewer diseases it suffers from. Faster water flows also provide better oxygenation and more aquatic plants, making them more suitable for survival. Therefore, clam have a strong affinity for water. When clam senses that the current environment is too dry, hot, or lacking food, they will use their second, third, and pedipal senses (r) to crawl in other directions to determine the direction of the water flow and find an aquatic environment with sufficient oxygen and food to sustain life. A good aquatic environment with sufficient oxygen and abundant aquatic plants, to a certain extent, ensures the survival and reproduction of clam.
[0099] Furthermore, a ghost opposition-based learning approach is introduced to help CHCOA escape the local optimum trap. This approach combines candidate individuals, the current individual, and the optimal individual, randomly generating new candidate positions to replace previously poor ones. Then, using the optimal point or candidate solution as the center point, it explores other positions more specifically and extensively. Traditional opposition-based learning, based on the center point, operates in a fixed manner. Most points cluster near the center point, their positions not exceeding the distance between the current point and the center point, and most solutions are close to the optimal individual. However, if the optimal individual is not near the current exploration point, the algorithm gets trapped in local optima and struggles to find the optimal solution. Compared to traditional opposition-based learning, ghost opposition-based learning is an opposition-based learning scheme that can be dynamically changed by adjusting the parameter k, thereby expanding the algorithm's spatial exploration range. This effectively solves the problem that the optimal solution is not within the center point-based search range, making it easier for the algorithm to escape local optima.
[0100] For the improved Crayfish Optimization Algorithm (CHCOA), the core of this embodiment lies in using the improved Crayfish Optimization Algorithm to globally optimize the initial weights and thresholds of the above-mentioned BP network. The specific steps are as follows:
[0101] Parameter encoding: All values and thresholds of the BP network are concatenated in sequence to form a one-dimensional vector, which serves as the position of an "individual" in the CHCOA algorithm.
[0102] Fitness evaluation: Using the network parameters set to predict the training set, the mean squared error (MSE) between the predicted and true values is calculated as the fitness value of that individual. The smaller the fitness, the better the set of parameters.
[0103] Iterative optimization: The CHCOA algorithm follows... Figure 7 The process shown is iteratively optimized, and its core improvement lies in:
[0104] Dynamic environment update mechanism: The algorithm simulates the crayfish's perception of the aquatic environment. Water quality factor V and adaptive water flow factor B are defined (Formula 2). When V>3, the environment is judged to be unfavorable, and the individual moves to a known better area according to Formula (3), which enhances the algorithm's adaptability in complex spaces.
[0105] (2)
[0106] (3)
[0107] Ghostly Opposites Learning Strategy: To help the population escape local optima, a "ghost" opposite solution is generated for the current individual in each iteration based on the principle of convex lens imaging (Equation 4). The key parameter k adapts adaptively with the current iteration number t and the maximum iteration number T according to Equation (5), achieving a balance between search breadth and depth. The principle of this strategy is as follows: Figure 6 As shown.
[0108] (4)
[0109] (5)
[0110] The improved crayfish optimization algorithm is as follows:
[0111] Environment update mechanism:
[0112] In the environmental update mechanism, a water quality factor V is introduced to characterize the water environment quality at the current location. To simplify system design and computational complexity, the CHCOA water quality factor V is represented using a hierarchical discretization, with a value range of 0 to 5. Through the sensors on their second and third legs, shrimp perceive the current water environment quality, determine whether their current living environment is suitable for continued survival, and autonomously decide whether to update their current location. The location update calculation is as follows.
[0113]
[0114] Among them, each crayfish has a certain difference in its perception of the water environment r. X2 is a random position between the candidate optimal position and the current position, which is calculated by formula (6). X1 is a random position in the whole. B is an adaptive water flow factor, which is calculated by formula (2).
[0115] (6)
[0116] In this context, the sensing force *r* of the crayfish's second and third legs is a random number [0, 1]. *c* is a constant representing a water flow velocity factor of 2. When *V* ≤ 3, it indicates that the crayfish considers the current living environment to be of good quality and suitable for continued survival. When *V* > 3, it indicates that the crayfish perceives the current living environment to be of poor quality and needs to crawl in the opposite direction of the perceived water flow to find an aquatic environment with sufficient oxygen and abundant food.
[0117] In the environmental update mechanism, to describe the upstream swimming behavior of crayfish in more detail, CHCOA abstracts the crayfish's sensory region as a circle, with the crayfish located at the center of the circle. In each evaluation calculation, a random angle θ is first calculated using a roulette wheel selection algorithm to determine the crayfish's movement direction within the circular region, and then the crayfish's movement path is determined based on the current movement direction. Within the entire circle, random angles between 0° and 360° can be selected, from which the value of θ can be determined to be [-1, 1]. The difference in random angle θ indicates that the position of each crayfish is randomly moved, which broadens the crayfish's search range, enhances the randomness of its position and its ability to escape local optima, and avoids local convergence.
[0118] Learning strategies based on ghost opposition:
[0119] The learning strategy based on ghost oppositions takes a two-dimensional space as an example. Assume there exists a two-dimensional space where [lb, ub] on the X-axis represents the search range for solutions. Assume the position of a new candidate solution is... The height of the solution is Then the position of the optimal solution on the X-axis is the ghost position of the candidate solution, with position and height respectively. , In addition, there is a ghost image position on the X-axis. Height is The candidate solutions were found. Therefore, the ghost's position was obtained. The ghost's position on the X-axis is... Its height is calculated using vectors. The ghost's location is calculated using the following formula.
[0120] (7)
[0121] In the diagram, the Y-axis represents a convex lens. Assume there is a ghost position. ,in It is its projection on the X-axis. It is its height. It is a real image obtained through imaging with a convex lens. Projected on the X-axis as The height is Therefore, the opposite of individual x is... It is available. It corresponds to the projection of the corresponding point. It is obtained from O as the base point. According to the principle of virtual image imaging, we can obtain equation (8).
[0122]
[0123] The learning strategy based on ghost oppositions is derived from formula (8). The calculation method of this strategy formula is as follows.
[0124] (4)
[0125] (5)
[0126] Compared to the standard COA, CHCOA has achieved significant improvements in the following three aspects:
[0127] Environmental perception and response mechanism: Water quality factor V and adaptive water flow factor B are introduced to simulate the dynamic perception and response of crayfish to their living environment, thereby enhancing the algorithm's adaptive adjustment capability in complex search space.
[0128] Enhancing search direction diversity: By introducing random angle θ and sensing power r, individuals have stronger randomness and direction diversity when updating their positions, thus effectively avoiding premature population convergence.
[0129] An innovative strategy for escaping local optima: The ghost opposition learning strategy expands the search range by constructing virtual opposition solutions, which can effectively prevent the algorithm from getting stuck in local optima, especially in the later stages of iteration.
[0130] These improvements not only theoretically enhance CHCOA's global exploration capabilities but also demonstrate higher convergence accuracy and stability in subsequent experiments. The main process of CHCOA is as follows: Figure 7 As shown.
[0131] The main steps are as follows:
[0132] Step 1: Initialize the population size N and population dimension d, and calculate the number of FEs.
[0133] Step 2: The turtle-shrimp assesses the current water quality using the water quality factor V and determines whether it is suitable for survival. When V>3, the turtle-shrimp considers the current water quality to be poor and unsuitable for survival. At this time, it will use the information perceived by its antennae and the adaptive water flow direction of its second and third legs to swim upstream to find a more suitable living environment to update its position. The position update formula is shown in formula (3). When V<3, it indicates that the giant shrimp perceives the current living environment well and it is suitable for survival, so there is no need to update its position.
[0134] Step 3: When the temperature exceeds 30°C, shrimp will sense that the current water environment is of good quality, but the environment is too hot and lacks moisture. To avoid the harm caused by the high temperature environment, shrimp will seek cool and moist burrows to escape the effects of the high temperature. The formula for calculating the burrow location is shown in formula (9). When Rand>0.5, shrimp will conflict with other competitors when searching for burrows. At this time, both sides will adjust their positions, and the calculation method for their position adjustment is shown in formula (10). When Rand<0.5, shrimp will not find any competitors in the burrow and will directly enter the burrow to obtain their individual position.
[0135] (9)
[0136] (10)
[0137] Step 4: When the temperature is below 30°C, the giant shrimp will sense that the current water quality is good and suitable for feeding, and will then emerge from its burrow to forage. Its feeding amount is closely related to temperature: when the temperature is between 20°C and 30°C, the giant shrimp exhibits strong foraging behavior; when the temperature reaches 25°C, its foraging and feeding amount are at their maximum. When Q>2, the food is too large to be swallowed directly; it must first be torn apart with its front claws, and then fed using its second and third legs alternately. When Q<2, the food is of moderate size and can be eaten directly.
[0138] Step 5: By combining candidate individuals, the current individual, and the best individual, randomly generate candidate solutions and compare them with the current solution. Retain the better individual solutions, obtain their reverse individuals, and determine the location of the ghost.
[0139] Step 6: Determine the update position by comparing fitness values. If the current individual has a better health condition, the current individual will replace the original individual; if the original individual is more fit, the original individual will be retained as the optimal solution.
[0140] Parameter injection: When the algorithm reaches the maximum number of iterations T (set to 100 in this embodiment), the global optimal individual position is decoded to obtain a set of optimal weights and thresholds, which are then assigned to the BP neural network as initial parameters.
[0141] Specifically, the CHCOA-BP algorithm is a BP neural network model optimized based on an improved crayfish optimization algorithm. This algorithm dynamically adjusts the weights and thresholds of the BP neural network through CHCOA to achieve global optimization of the network parameters. The specific implementation method is as follows:
[0142] Fitness function definition: The mean squared error (MSE) of the BP neural network on the training set is used as the fitness evaluation criterion for CHCOA;
[0143] Population initialization and iteration: The weights and thresholds of the network to be optimized are encoded as position vectors of individual crayfish. After initializing the population, CHCOA iteratively updates the individual positions based on mechanisms such as environmental updates, heat avoidance, competition, foraging, and ghost opposition learning.
[0144] Parameter update and optimization: After each iteration, calculate the MSE value of the network parameters at the new position. If it is better than the historical best solution, update the optimal parameter combination;
[0145] Optimal solution output: After the iteration is completed, the network parameters that minimize MSE are output as the final initialization values of the BP neural network, and then the network training and prediction are completed.
[0146] This fusion mechanism effectively overcomes the shortcomings of traditional BP neural networks, such as sensitivity to initial parameters and the tendency to get trapped in local optima. The network structure of the CHCOA-BP algorithm is as follows: Figure 8 As shown.
[0147] To verify the effectiveness of the method in this embodiment, tests were conducted on multiple different vehicle battery data and different prediction starting points (SOH=80%, 70%, 60%).
[0148] Comparative Experiment: The proposed method (CHCOA-BP) is compared with the standard COA-BP, HHO-BP, and DBO-BP models. Capacity prediction results are compared, for example... Figure 9 As shown in Table 2, the various error indices (MAE, RMSE) are presented. The results indicate that CHCOA-BP achieved the lowest prediction error in all cases.
[0149] Robustness verification: Predictions were performed at different starting points of state of health (SOH), and the results are as follows: Figure 10 As shown in Table 3, the prediction error of this method fluctuates minimally across different starting points, demonstrating its good robustness and early prediction capability.
[0150] Table 2 Statistical errors of battery capacity prediction under different models
[0151]
[0152] Table 3 Statistical errors in battery capacity prediction at different prediction starting points
[0153]
[0154] Among numerous algorithms, CHCOA-BP exhibits the best prediction performance, with significantly higher prediction accuracy than the traditional COA algorithm, Harris Eagle Optimization (HHO), and Dung Beetle Optimization (DBO). By introducing an environment update mechanism and a ghost-based learning strategy, the improved algorithm not only optimizes local search capabilities during the search process but also effectively enhances the diversity of the global search, avoiding the limitation of the traditional COA algorithm being prone to getting trapped in local optima. Experimental results show that the CHCOA-BP algorithm outperforms other comparative algorithms in prediction accuracy on multiple test sets, demonstrating stronger global search capabilities and higher prediction stability. Therefore, CHCOA-BP provides a more accurate and efficient solution for remaining useful life prediction tasks.
[0155] In summary, the prediction method provided in this embodiment significantly improves the accuracy and stability of BP neural networks in the RUL prediction task of power batteries by introducing an improved optimization algorithm with dynamic environment updates and ghost opposition learning strategies. It is especially suitable for engineering application scenarios based on real complex working condition data.
[0156] Secondly, this embodiment also provides a system for predicting the remaining lifespan of a vehicle's power battery, comprising:
[0157] The data acquisition and processing module is used to perform data acquisition, preprocessing, and health factor extraction steps;
[0158] The model optimization module is used to store and execute the improved crayfish optimization algorithm to optimize the parameters of the BP neural network;
[0159] The lifespan prediction module is used to load the optimized BP neural network model, perform the prediction steps, and output the remaining lifespan prediction results.
[0160] Thirdly, this embodiment also provides an improved crayfish optimization algorithm for optimizing neural network parameters, which integrates the following based on the standard crayfish optimization algorithm:
[0161] The dynamic environment update unit is used to dynamically adjust the position update strategy of individuals in the algorithm according to the environmental state defined by the water quality factor V and the adaptive water flow factor B.
[0162] The ghost opposition learning unit is used to generate ghost opposition solutions for individuals in the current population in each iteration, based on the principle of convex lens imaging, to enhance the algorithm's global exploration capability.
[0163] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for predicting the remaining life of a power battery, characterized in that, Includes the following steps: Acquire historical status data of the vehicle's power battery during actual operation; The historical state data is preprocessed and health factors are extracted to obtain feature vectors related to battery capacity decay; Construct a BP neural network model for predicting remaining useful life; An improved crayfish optimization algorithm is used to optimize the initial weights and thresholds of the BP neural network model. The improved crayfish optimization algorithm includes a dynamic environment update mechanism and a ghost opposition learning strategy. The feature vector is input into the optimized BP neural network model, which outputs a predicted value of the remaining battery life.
2. The method of claim 1, wherein, The dynamic environment update mechanism in the improved crayfish optimization algorithm is as follows: The current search environment is determined based on water quality factor V; When the water quality factor V is greater than the set threshold, the individual's position is adjusted.
3. The method of claim 2, wherein, The current search environment is determined by the water quality factor V, which is a discrete value from 0 to 5. When V is greater than a set threshold of 3, the current search environment is determined to be poor.
4. The method of claim 3, wherein, The individual position is adjusted according to the following formula: ; Where B is the adaptive flow factor.
5. The method of claim 1 or 2, wherein, The ghost opposition learning strategy is as follows: Based on the principle of convex lens imaging, the ghost counterpart of the current candidate solution is generated according to the following formula to expand the search range; ; In the formula, the parameter k changes adaptively with the number of algorithm iterations according to the following formula; ; Where t represents the current iteration number, and T represents the preset maximum iteration number.
6. The method of claim 1, wherein, The steps for optimizing the initial weights and thresholds of the BP neural network model using the improved crayfish optimization algorithm include: All the weights and thresholds to be optimized in the BP neural network model are encoded into the position vector of an individual in the improved crayfish optimization algorithm; The mean square error of the prediction of the training data by the BP neural network model is used as the fitness function of the improved crayfish optimization algorithm. The optimal position vector that minimizes the fitness function value is obtained through iterative optimization of the improved crayfish optimization algorithm. The weights and thresholds obtained after decoding the optimal position vector are assigned to the BP neural network model as its initial network parameters.
7. The method of claim 1, wherein, The extraction of health factors includes: The battery capacity sequence is calculated from the historical state data based on the ampere-hour integration method; The battery capacity sequence is then filtered and noise-reduced. The health factors are defined as at least eight statistical features whose absolute values of the Pearson correlation coefficient with the battery capacity sequence are greater than a set threshold. These statistical features are selected from statistics related to battery temperature, total voltage, total current, and cell voltage. 8.The method of claim 1, wherein, Preprocessing of historical state data includes: Identify data segments during the charging process; Impute missing values in the data; Remove or correct outliers based on a predefined normal value range table.
9. A system for predicting the remaining service life of a vehicle power battery, characterized in that, include: The data acquisition and processing module is used to perform data acquisition, preprocessing, and health factor extraction steps; The model optimization module is used to store and execute the improved crayfish optimization algorithm to optimize the parameters of the BP neural network; The lifespan prediction module is used to load the optimized BP neural network model, perform the prediction steps, and output the remaining lifespan prediction results.
10. An improved crayfish optimization algorithm for optimizing neural network parameters, characterized in that, Based on the standard crayfish optimization algorithm, the following is integrated: The dynamic environment update unit is used to dynamically adjust the position update strategy of individuals in the algorithm according to the environmental state defined by the water quality factor V and the adaptive water flow factor B. The ghost opposition learning unit is used to generate ghost opposition solutions for individuals in the current population in each iteration, based on the principle of convex lens imaging, to enhance the algorithm's global exploration capability.