A Battery Overcharge Protection Method Based on Electrochemical Impedance Spectroscopy
By combining electrochemical impedance spectroscopy and relaxation time distribution analysis, key feature parameters are extracted, and the random forest model is optimized, solving the problem of complexity and time consumption in traditional methods, and realizing rapid and accurate identification and protection of battery overcharge status.
Patent Information
- Application Number
- CN202610278305.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-09
- Publication Date
- 2026-05-26
AI Technical Summary
Traditional electrochemical impedance spectroscopy analysis methods for battery overcharge protection suffer from complex fitting processes, long time consumption, and difficulty in feature extraction, making it difficult to achieve fast and accurate overcharge protection.
By combining electrochemical impedance spectroscopy with relaxation time distribution analysis, impedance characteristic parameters of the solid electrolyte interface film and charge transfer process are extracted. An optimization algorithm is then used to optimize the random forest model to construct an overcharge prediction model and monitor the battery charging status in real time.
It enables rapid and accurate judgment of battery charging status, reduces the risk of misjudgment, and improves the reliability and safety of overcharge protection.
Smart Images

Figure CN122092449A_ABST
Abstract
Description
Technical Field
[0001] This invention generally relates to the field of lithium battery technology, and specifically to a battery overcharge protection method based on electrochemical impedance spectroscopy. Background Technology
[0002] Overcharging is a common and extremely dangerous form of electrical abuse during the daily use and maintenance of batteries. Overcharging can lead to irreversible side reactions inside the battery, such as violent decomposition of the electrolyte, gas production, collapse of the positive electrode material structure, and accelerated growth of lithium dendrites. These changes can not only cause a sharp drop in battery capacity and a drastic reduction in lifespan, but may also eventually trigger thermal runaway, causing serious safety accidents such as fires and explosions.
[0003] Electrochemical impedance spectroscopy (EIS) provides a powerful tool for directly probing the internal state of a battery. By applying a small AC excitation to the battery and measuring its frequency domain response, it can non-destructively obtain rich information reflecting ohmic impedance, charge transfer processes, solid-liquid interface properties, and diffusion kinetics. Theoretically, the microscopic aging mechanisms associated with overcharging, such as SEI film thickening and reconstruction, loss of electrode active materials, and lithium deposition, significantly affect specific frequency characteristics in the EIS spectrum. Therefore, identifying overcharge states by analyzing changes in the EIS spectrum is a highly promising technical approach.
[0004] Traditional EIS data analysis methods involve a complex and time-consuming fitting process, and the physical meaning of model parameters and their correspondence with specific aging mechanisms within the battery are sometimes ambiguous, which is not conducive to rapid and accurate feature extraction; therefore, they are not yet applicable to battery overcharge protection. Summary of the Invention
[0005] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a battery overcharge protection method based on electrochemical impedance spectroscopy.
[0006] This invention provides a battery overcharge protection method based on electrochemical impedance spectroscopy, comprising: S1: Obtain the electrochemical impedance spectrum of the battery; the electrochemical impedance spectrum is used to characterize the impedance of the battery under different charging states; the charging states include: non-overcharged state and overcharged state; S2: Generate multiple training samples based on the electrochemical impedance spectroscopy; the training samples include: relaxation time distribution data and the charging state of the battery; S3: Based on multiple training samples, an optimization algorithm is used to optimize the number of decision trees and the maximum depth of the random forest model to obtain the optimal number of decision trees and the optimal maximum depth; S4: Train the random forest model with the optimal number of decision trees and the optimal maximum depth using multiple training samples to obtain an overcharged prediction model; S5: Monitor the current electrochemical impedance spectrum of the battery in real time and calculate the current relaxation time distribution data based on the current electrochemical impedance spectrum; S6: Input the current relaxation time distribution data into the overcharge prediction model to obtain the current charging state of the battery; S7: Determine whether to provide overcharge protection for the battery based on its current charging status.
[0007] According to the technical solution provided by the present invention, the relaxation time distribution data includes a first characteristic impedance parameter and a second characteristic impedance parameter; the first characteristic impedance is the impedance of the solid electrolyte interface film; the second characteristic impedance is the impedance of the charge transfer process. Multiple training samples are generated based on the electrochemical impedance spectroscopy, including: S2-1: The relaxation time distribution of the electrochemical impedance spectroscopy is analyzed. The relaxation time distribution data is obtained by integral transformation, regularization inversion and discretization solution. S2-2: Extract the first characteristic impedance parameter and the second characteristic impedance parameter based on the relaxation time distribution data; S2-3: Obtain the charging state corresponding to the first characteristic impedance parameter and the second characteristic impedance parameter based on the electrochemical impedance spectrum; S2-4: Combine the first characteristic impedance, the second characteristic impedance, and the corresponding charging state to form a training sample.
[0008] According to the technical solution provided by the present invention, based on multiple training samples, an optimization algorithm is used to optimize the number of decision trees and the maximum depth of the random forest model to obtain the optimal number of decision trees and the optimal maximum depth, including: S3-1: Initially set the optimization algorithm, the termination condition of the optimization algorithm, and the objective optimization function; the objective optimization function is used to characterize the prediction accuracy of the random forest model with the number of iterative decision trees and the maximum iteration depth after training; S3-2: Iterate according to the iterative method of the optimization algorithm to obtain the number of iterative decision trees and the maximum iteration depth; S3-3: Set up a random forest model based on the number of iterative decision trees and the maximum depth of the iteration; S3-4: Use a set number of training samples to perform multiple cross-training on a random forest model with the number of iterative decision trees and the maximum depth of iteration to obtain an iterative random forest model; S3-5: Use the remaining training samples to verify the prediction accuracy of the iterative random forest model, and calculate the target optimization value based on the target optimization function; S3-6: If the target optimization value satisfies the termination condition, then the current number of iterative decision trees is taken as the optimal number of decision trees, and the current maximum iteration depth is taken as the optimal maximum depth; otherwise, repeat steps S3-2 to S3-6.
[0009] According to the technical solution provided by the present invention, the objective optimization function is expressed as:
[0010] Where X is a random forest model with the number of iterative decision trees and the maximum depth of iterations. Let K be the target optimization value of the iterative random forest model, and K be the number of folds in the cross-training process. Let be the error rate of the iterative random forest model during the k-th fold cross-training.
[0011] According to the technical solution provided by the present invention, determining whether to provide overcharge protection for the battery based on the current state of charge of the battery includes: If the battery is currently in a non-overcharged state, then overcharge protection will not be performed. If the current charging state is overcharged, then based on multiple adjacent charging states before and adjacent to the current time, it is determined whether to provide overcharge protection for the battery.
[0012] According to the technical solution provided by the present invention, determining whether to provide overcharge protection for the battery based on multiple adjacent charging states prior to and adjacent to the current time includes: Obtain multiple adjacent charging states that are prior to the current time and adjacent to the current time; If at least half of the multiple adjacent charging states are in an overcharge state, overcharge protection will be implemented.
[0013] According to the technical solution provided by the present invention, if all charging states are in an overcharge-free state, then overcharge protection is not performed; and steps S5 to S7 are repeated.
[0014] The beneficial effects of this invention are as follows: To address the technical challenges of traditional electrochemical impedance spectroscopy (EIS) analysis methods, such as complex fitting processes, long processing times, difficult feature extraction, and limited direct applicability to battery overcharge protection, this invention employs a combined approach of EIS and relaxation time distribution analysis. Relaxation time distribution data is obtained through integral transform, regularized inversion, and discretization. The impedance of the solid electrolyte interface membrane and the charge transfer process are extracted as key feature parameters. Furthermore, optimization algorithms are used to optimize the number and maximum depth of decision trees in the random forest model, constructing an overcharge prediction model. This ultimately enables real-time monitoring and accurate judgment of the battery's charging state. By analyzing the relaxation time distribution of EIS, the limitations of complex and time-consuming traditional fitting methods are overcome, significantly improving the efficiency and accuracy of feature extraction. Simultaneously, the optimized random forest model effectively identifies the battery's overcharge state, exhibiting strong generalization ability and robustness. Moreover, a continuous prediction probability analysis method based on the model error rate is introduced when judging the overcharge state, significantly reducing the risk of misjudgment and improving the reliability and safety of overcharge protection. The overall solution enables rapid response and accurate early warning of battery overcharging behavior, providing effective protection for the safe use of lithium batteries. Attached Figure Description
[0015] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of a battery overcharge protection method based on electrochemical impedance spectroscopy. Detailed Implementation
[0016] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0017] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0018] refer to Figure 1 This invention provides a battery overcharge protection method based on electrochemical impedance spectroscopy, comprising: S1: Obtain the electrochemical impedance spectroscopy (EIS) of the battery; the EIS is used to characterize the impedance of the battery under different charging states; the charging states include: non-overcharged state and overcharged state; Specifically, the electrochemical impedance spectroscopy of the battery was measured under different initial states of health (SOH) conditions, both under uncharged and overcharged states. The test frequency range was from 0.01 Hz to 10 kHz, and the excitation current amplitude was 50 mA.
[0019] The process of testing electrochemical impedance spectroscopy includes: Preparation stage: Prepare electrolyte solution, clean and treat electrode surfaces (e.g., polish, wash), and connect wires correctly.
[0020] Environmental control: Use shielded enclosures to reduce electromagnetic interference, and control temperature if necessary.
[0021] Test execution: Immerse the electrode in the electrolyte, and after the system stabilizes, start frequency scanning. The software will automatically record the impedance data.
[0022] Data analysis: Impedance spectra are plotted using software (such as Zview, Nova, etc.), equivalent circuit models are established for fitting, and electrochemical parameters (such as solution resistance, charge transfer resistance, double layer capacitance, Warburg diffusion coefficient, etc.) are extracted.
[0023] S2: Generate multiple training samples based on the electrochemical impedance spectroscopy; the training samples include: relaxation time distribution data (DRT data) and the battery's state of charge, including: S2-1: The relaxation time distribution of the electrochemical impedance spectroscopy is analyzed by integral transformation, regularization inversion, and discretization solution to obtain the relaxation time distribution data; the relaxation time distribution data includes the first characteristic impedance parameter and the second characteristic impedance parameter. Specifically, it includes: S2-1-1: Organize the raw EIS data measured by the electrochemical workstation into a standard format, including the test frequency f, the real part of the impedance Z', and the imaginary part of the impedance Z". To ensure the accuracy of the inversion calculation, outliers caused by measurement noise or system disturbances are removed, and the data is subjected to steady-state verification to ensure that it meets the requirements of causality, linearity, and stability.
[0024] S2-1-2: Based on the relaxation time distribution theory, the electrochemical impedance response of a battery can be considered as a superposition of countless parallel resistive-capacitive units with different relaxation times τ. The relationship between its impedance response and the relaxation time distribution function is described by the following integral equation:
[0025] In the formula, Z(ω) is the complex impedance value at angular frequency ω, and R ∞ R is an ohmic resistor. pol Let g(τ) be the total polarization resistance, g(τ) be the relaxation time distribution function to be determined, τ be the relaxation time, and j be the imaginary unit. This equation connects the frequency domain impedance data with the time domain distribution function to be determined.
[0026] The above integral equation is discretized in the time domain by discretizing the continuous τ domain into a finite number of nodes and constructing a coefficient matrix A using methods such as Gaussian radial basis functions. This transforms the integral equation into a linear system of equations in the form Ax≈b, where x is the discretized distribution function value to be determined and b is the measured impedance data.
[0027] S2-1-3: Since the inversion of DRT from EIS is a typical ill-conditioned problem, direct solution easily leads to violent oscillations in the solution, making it impossible to obtain results with clear physical meaning. Therefore, the Tikhonov regularization technique is introduced. By adding a penalty term to constrain the smoothness of the solution, the solution is transformed into the following optimization problem:
[0028] in, This is the data fitting error term, ensuring that the inversion results match the measured data. λ is the regularization penalty term, where L is a first- or second-order differential operator matrix used to constrain the smoothness of the solution; λ is the regularization parameter used to balance the fitting accuracy and the smoothness of the solution.
[0029] S2-1-4: The choice of regularization parameter λ directly affects the accuracy of the inversion results: if λ is too small, it will lead to overfitting and produce false peaks; if λ is too large, it will be overly smoothed and may mask the real relaxation process. In this embodiment, the L-curve method is used to determine the optimal λ value, that is, the relationship curve between the fitting error term and the penalty term is plotted on a logarithmic scale, and λ at the inflection point of the curve is selected as the optimal regularization parameter.
[0030] Substituting the optimized λ into the objective function, the discretized relaxation time distribution function value is obtained. The relaxation time distribution data is plotted with the logarithm of the relaxation time τ (logτ) as the x-axis and the distribution function γ(τ) as the y-axis. The peak position in the spectrum corresponds to the characteristic relaxation time of a specific electrochemical process, and the integral area of the peak represents the contribution of that process to the total polarization resistance.
[0031] Step S2-1 converts frequency-domain EIS data into time-domain DRT data through relaxation time distribution analysis combined with regularized inversion techniques, significantly improving the resolution of the electrochemical process and effectively decoupling overlapping impedance responses. This method endows the extracted feature parameters with clear physical meaning, while suppressing noise interference and improving the robustness of feature extraction, providing a high-precision, low-dimensional, and reliable input for subsequent overcharge warning models.
[0032] S2-2: Extract the first characteristic impedance parameter Rsei and the second characteristic impedance parameter Rct based on the relaxation time distribution data; the first characteristic impedance is the impedance of the solid electrolyte interface membrane; the second characteristic impedance is the impedance of the charge transfer process. Specifically, the relaxation time distribution data includes: Normal battery DRT data (2.75~4.2V):
[0033] Overcharged battery DRT data:
[0034] Where SOH represents the initial state of health of the battery, and Ro represents the contact resistance of the battery.
[0035] S2-3: Obtain the charging state corresponding to the first characteristic impedance parameter and the second characteristic impedance parameter based on the electrochemical impedance spectrum; S2-4: Combine the first characteristic impedance, the second characteristic impedance, and the corresponding charging state to form a training sample.
[0036] By using relaxation time distribution (DRT) analysis, a mathematical tool, to interpret data from electrochemical impedance spectroscopy, overlapping relaxation processes are decoupled, allowing for the direct and quantitative extraction of the first characteristic impedance (Rsei), which is closely related to the evolution of the solid electrolyte interfacial film, and the second characteristic impedance (Rct), which is related to the charge transfer process. These two parameters have been shown to be extremely sensitive to overcharge behavior, and therefore can be used to reflect the battery's state of charge.
[0037] The training samples generated in this way enable the trained random forest model to more accurately predict the state of charge of the battery.
[0038] S3: Based on multiple training samples, an optimization algorithm is used to optimize the number of decision trees and the maximum depth of the random forest model to obtain the optimal number of decision trees and the optimal maximum depth, including: S3-1: Initially set the optimization algorithm, the termination condition of the optimization algorithm, and the objective optimization function; the objective optimization function is used to characterize the prediction accuracy of the random forest model with the number of iterative decision trees and the maximum iteration depth after training; In this embodiment, the optimization algorithm is a genetic algorithm.
[0039] The initial setup optimization algorithm includes: Set the search range, population size (20 to 100), initial position of the population, crossover probability (0.7 to 0.9) and mutation probability (0.01 to 0.1), and maximum number of iterations (100 to 200 generations).
[0040] The search range is determined based on the actual range of the number of decision trees and the maximum depth, for example, the number of decision trees can be between 10 and 300, and the maximum depth can be between 3 and 50. The initial position of the population is randomly set within the search range.
[0041] The termination conditions are: the maximum number of iterations for the target optimization value no longer decreases after 5% for consecutive iterations, or the decrease in the maximum number of iterations for the target optimization value after 10% for consecutive iterations is less than 1%, or the maximum number of iterations is reached.
[0042] Furthermore, the objective optimization function is expressed as:
[0043] Where X is a random forest model with the number of iterative decision trees and the maximum depth of iterations. Let K be the target optimization value of the iterative random forest model, and K be the number of folds in the cross-training process. Let be the error rate of the iterative random forest model during the k-th fold cross-training.
[0044] The error rate is the ratio of the number of predictions from the iterative random forest model that differ from the charging state of the labeled data during the validation process to the number of training samples used for validation.
[0045] S3-2: Iterate according to the iterative method of the optimization algorithm to obtain the number of iterative decision trees and the maximum iteration depth; Since this embodiment uses a genetic algorithm, the specific iteration method in this step also follows the iteration method of the genetic algorithm. For aspects of the genetic algorithm not described in this embodiment, they are all set up in a conventional manner.
[0046] S3-3: Set up a random forest model based on the number of iterative decision trees and the maximum depth of the iteration; In this embodiment, the number of decision trees in the random forest model is set to the number of iterative decision trees, and the maximum depth is set to the maximum depth of the iteration. Therefore, a genetic algorithm can be used to search for the optimal number of decision trees and maximum depth for applying the random forest model to the state-of-charge prediction scenario, thereby improving prediction accuracy.
[0047] S3-4: Use a set number of training samples to perform multiple cross-training on a random forest model with the number of iterative decision trees and the maximum depth of iteration to obtain an iterative random forest model; S3-5: Use the remaining training samples to verify the prediction accuracy of the iterative random forest model, and calculate the target optimization value based on the target optimization function; Cross-training / cross-validation is a statistical method for evaluating a model's generalization ability. It divides the dataset into K parts, alternately using K-1 parts as the training set and the remaining part as the validation set, performing K training and validation iterations. The average of the K validation results is then used as the model's performance metric. This method effectively avoids overfitting and more accurately evaluates the model's performance on unknown data.
[0048] In this embodiment, the number of training samples is set to 80% of the total number of training samples, and the remaining number of training samples is 20% of the total number of training samples.
[0049] During training, the relaxation time distribution data is used as input to the random forest model with the optimal number of decision trees and the optimal maximum depth, and the known charging state is used as the label data, so that the random forest model outputs the predicted charging state.
[0050] S3-6: If the target optimization value satisfies the termination condition, then the current number of iterative decision trees is taken as the optimal number of decision trees, and the current maximum iteration depth is taken as the optimal maximum depth; otherwise, repeat steps S3-2 to S3-6.
[0051] Step S3 introduces an optimization algorithm to adaptively optimize the number of decision trees and the maximum depth of the random forest model, overcoming the blindness and inefficiency of traditional parameter tuning. This process can automatically match the features of the training data and obtain the optimal combination of hyperparameters, significantly improving the training efficiency and generalization ability of the overcharged prediction model, and laying the model foundation for subsequent high-precision state recognition.
[0052] S4: Train the random forest model with the optimal number of decision trees and the optimal maximum depth using multiple training samples to obtain an overcharged prediction model; The training process in step S4 is the same as the training method in steps S3-4, which is to use multiple cross-training.
[0053] S5: Monitor the current electrochemical impedance spectrum of the battery in real time, and calculate the current relaxation time distribution data based on the current electrochemical impedance spectrum; the specific calculation method is the same as step S2-1.
[0054] S6: Input the current relaxation time distribution data into the overcharge prediction model to obtain the current charging state of the battery; S7: Based on the current state of battery charging, determine whether to implement overcharge protection, including: Case 1: If the battery is currently in a non-overcharged state, then overcharge protection will not be performed; Case 2: If the current charging state is overcharged, determine whether to provide overcharge protection for the battery based on multiple adjacent charging states before and adjacent to the current time.
[0055] It should be noted that in existing technologies, regardless of the training method, the resulting overcharge prediction model cannot achieve 100% accuracy in every situation. In reality, random errors can occur, and the error rate or error can only be reduced through extensive training. In this embodiment, there are only two states: overcharged and undercharged. Therefore, it is impossible to reduce the impact of random misjudgments by reducing the error itself.
[0056] To solve the above problems, this embodiment also includes the following steps in case 2: Obtain multiple adjacent charging states that are prior to the current time and adjacent to the current time; If at least half of the multiple adjacent charging states are in an overcharge state, overcharge protection will be implemented.
[0057] If all charging states are in the non-overcharge state, then overcharge protection is not performed; and steps S5 to S7 are repeated.
[0058] When charging, the battery is initially in a non-overcharged state. In reality, before it is overcharged, multiple adjacent charging states should also be in a non-overcharged state (ignoring erroneous predictions from the overcharge prediction model). As the charging process progresses, the battery gradually becomes fully charged, and only then is an overcharged state possible.
[0059] However, overcharge prediction models have a small chance of making incorrect predictions. If overcharge protection is initiated as soon as an overcharge state is detected, it can lead to a misjudgment, even when the battery is not actually overcharged. Therefore, this embodiment takes this situation into account and determines that the battery is overcharged only if at least half of several consecutive adjacent charging states are in an overcharge state. This improves the accuracy of overcharge protection and reduces the probability of misjudgment.
[0060] In this embodiment, the number of near-charging states is at least 5. According to the above, if a misjudgment occurs, the following conditions must be met: The actual situation of all 5 near-charging states is that they are not overcharged, but at least 3 of them are incorrectly judged as overcharged; or the actual situation of the 5 near-charging states is that at least 3 are not overcharged, but the prediction result is that all 5 are not overcharged.
[0061] Assuming the overcharge prediction model has an error rate of 1%, then based on the method described in this embodiment, the overall probability of a misjudgment is 1.9802 × 10⁻⁶. -4 The percentage is negligible. Therefore, the solution in this embodiment can greatly improve prediction accuracy and reduce the probability of misjudgment caused by the error rate that the overcharged prediction model cannot eliminate.
[0062] In addition, to ensure timely monitoring of the battery's charging status, the monitoring frequency in step S5 is at least 1 Hz, and is typically set to 10 Hz. A higher monitoring frequency allows for more timely detection of overcharge, while also mitigating the degree of overcharging, thus contributing to maintaining the battery's health.
[0063] To eliminate the possibility of misjudgment of overcharge protection caused by accidental erroneous predictions from the overcharge prediction model, this step uses a comprehensive judgment method based on multiple prediction results, reducing the probability of misjudgment to less than one percent; thus, it has high accuracy.
[0064] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention is not limited to the specific combination of the above-described technical features, but also includes other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in this invention.
Claims
1. A battery overcharge protection method based on electrochemical impedance spectroscopy, characterized in that, include: S1: Obtain the electrochemical impedance spectroscopy of the battery; The electrochemical impedance spectroscopy is used to characterize the impedance of the battery under different charging states. The charging states include: not overcharged and overcharged; S2: Generate multiple training samples based on the electrochemical impedance spectroscopy; the training samples include: relaxation time distribution data and the charging state of the battery; S3: Based on multiple training samples, an optimization algorithm is used to optimize the number of decision trees and the maximum depth of the random forest model to obtain the optimal number of decision trees and the optimal maximum depth; S4: Train the random forest model with the optimal number of decision trees and the optimal maximum depth using multiple training samples to obtain an overcharged prediction model; S5: Monitor the current electrochemical impedance spectrum of the battery in real time and calculate the current relaxation time distribution data based on the current electrochemical impedance spectrum; S6: Input the current relaxation time distribution data into the overcharge prediction model to obtain the current charging state of the battery; S7: Determine whether to provide overcharge protection for the battery based on its current charging status.
2. The battery overcharge protection method based on electrochemical impedance spectroscopy according to claim 1, characterized in that, The relaxation time distribution data includes a first characteristic impedance parameter and a second characteristic impedance parameter; the first characteristic impedance is the impedance of the solid electrolyte interface film; the second characteristic impedance is the impedance of the charge transfer process. Multiple training samples are generated based on the electrochemical impedance spectroscopy, including: S2-1: The relaxation time distribution of the electrochemical impedance spectroscopy is analyzed. The relaxation time distribution data is obtained by integral transformation, regularization inversion and discretization solution. S2-2: Extract the first characteristic impedance parameter and the second characteristic impedance parameter based on the relaxation time distribution data; S2-3: Obtain the charging state corresponding to the first characteristic impedance parameter and the second characteristic impedance parameter based on the electrochemical impedance spectrum; S2-4: Combine the first characteristic impedance, the second characteristic impedance, and the corresponding charging state to form a training sample.
3. The battery overcharge protection method based on electrochemical impedance spectroscopy according to claim 1, characterized in that, Based on multiple training samples, an optimization algorithm is used to optimize the number of decision trees and the maximum depth of the random forest model, obtaining the optimal number of decision trees and the optimal maximum depth, including: S3-1: Initially set the optimization algorithm, the termination condition of the optimization algorithm, and the objective optimization function; the objective optimization function is used to characterize the prediction accuracy of the random forest model with the number of iterative decision trees and the maximum iteration depth after training; S3-2: Iterate according to the iterative method of the optimization algorithm to obtain the number of iterative decision trees and the maximum iteration depth; S3-3: Set up a random forest model based on the number of iterative decision trees and the maximum depth of the iteration; S3-4: Use a set number of training samples to perform multiple cross-training on a random forest model with the number of iterative decision trees and the maximum depth of iteration to obtain an iterative random forest model; S3-5: Use the remaining training samples to verify the prediction accuracy of the iterative random forest model, and calculate the target optimization value based on the target optimization function; S3-6: If the target optimization value satisfies the termination condition, then the current number of iterative decision trees is taken as the optimal number of decision trees, and the current maximum iteration depth is taken as the optimal maximum depth; otherwise, repeat steps S3-2 to S3-6.
4. The battery overcharge protection method based on electrochemical impedance spectroscopy according to claim 3, characterized in that, The objective optimization function is expressed as: Where X is a random forest model with the number of iterative decision trees and the maximum depth of iterations. Let K be the target optimization value of the iterative random forest model, and K be the number of folds in the cross-training process. Let be the error rate of the iterative random forest model during the k-th fold cross-training.
5. The battery overcharge protection method based on electrochemical impedance spectroscopy according to claim 1, characterized in that, Based on the battery's current state of charge, determine whether to implement overcharge protection, including: If the battery is currently in a non-overcharged state, then overcharge protection will not be performed. If the current charging state is overcharged, then based on multiple adjacent charging states before and adjacent to the current time, it is determined whether to provide overcharge protection for the battery.
6. The battery overcharge protection method based on electrochemical impedance spectroscopy according to claim 5, characterized in that, Based on multiple adjacent charging states prior to and adjacent to the current time, determine whether to implement overcharge protection for the battery, including: Obtain multiple adjacent charging states that are prior to the current time and adjacent to the current time; If at least half of the multiple adjacent charging states are in an overcharge state, overcharge protection will be implemented.
7. A battery overcharge protection method based on electrochemical impedance spectroscopy according to claim 6, characterized in that, If all charging states are in the non-overcharge state, then overcharge protection is not performed; and steps S5 to S7 are repeated.