A battery management method based on physical fingerprint clustering and federal loRA
By training low-rank adapters on edge devices and generating cluster patches through cloud clustering, the problems of data privacy and computing resource constraints in battery management systems are solved, achieving efficient and reliable battery state estimation and updates while ensuring data privacy and compliance.
Patent Information
- Application Number
- CN202611552511.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-09
- Publication Date
- 2026-11-06
AI Technical Summary
Traditional battery management systems face challenges such as data transmission bandwidth pressure, data compliance challenges, insufficient generalization ability, and low model update efficiency due to limitations in data privacy protection and computing resources. Furthermore, existing model update mechanisms lack intelligence and privacy protection.
We employ a battery management method based on physical fingerprint clustering and federated LoRA. By training a low-rank adapter on an edge device, we only upload physical fingerprint vectors and lightweight patch parameters. Combined with cloud-based clustering to generate cluster patches, we achieve efficient local model updates and data privacy protection.
It effectively solves the problems of data silos, performance degradation and computing power bottlenecks, protects user data privacy and compliance, improves model update efficiency and the interpretability and reliability of state estimation, and reduces computing and storage requirements.
Smart Images

Figure CN123047992A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery management system technology, and specifically to a battery management method based on physical fingerprint clustering and federated LoRA. Background Technology
[0002] The battery management system (BMS) is the core "brain" of electric vehicles and energy storage systems. The accuracy of its core algorithms (such as SOC and SOH estimation) directly determines the system's performance, safety, and lifespan. While significant progress has been made in lithium-ion battery state estimation and management, the following major challenges remain, which are precisely the core issues that the "physical fingerprint GMM clustering" and "Federated LoRA" collaborative system aims to address:
[0003] Traditional centralized learning methods require uploading massive amounts of battery data to the cloud for training. This process not only faces enormous bandwidth pressure but also presents significant data compliance challenges. While Federated Learning (FL) can address data privacy issues by training models locally and uploading only model updates, it faces severe generalization challenges in battery management scenarios. Significant differences in usage habits, environmental conditions, and battery degradation paths across different vehicles result in battery data exhibiting typical non-independent identically distributed (Non-IID) characteristics. This structural data variation causes a systematic decrease in the accuracy of state estimation (SOC / SOH) of global models trained using the traditional FedAvg algorithm when facing specific vehicles or special operating conditions, severely limiting the effectiveness of this method in real-world vehicle environments.
[0004] Current deep learning-based battery state estimation models generally have large-scale parameter structures, while typical automotive battery management system (BMS) controllers are usually equipped with embedded processors with a clock speed of 100-400MHz, whose computing power does not exceed 500 MOPS and available storage space is only 512KB-2MB. Under these strict resource constraints, the complete backpropagation computation required by the traditional federated averaging algorithm will consume hundreds of MB of computing resources, while the model parameter transfer volume often exceeds 10MB. This not only exceeds the real-time processing capabilities of edge devices, but also squeezes the computing power budget for critical tasks such as battery safety monitoring, making it difficult for the model update efficiency to meet the needs of practical applications.
[0005] Battery state of health (SOH) and performance dynamically evolve with usage time, cycle count, and operating conditions, leading to data distribution drift. While existing research recognizes the effectiveness of physical fingerprints in SOH estimation, explicitly integrating them into federated learning or cloud-edge collaborative update strategies to achieve accurate model update triggering remains an area requiring further exploration. Simply relying on voltage / current thresholds to trigger model updates can result in high false alarm rates and difficulty in distinguishing between normal charge / discharge cycles and genuine aging drift.
[0006] To achieve full lifecycle management of batteries, battery management systems need to possess the ability to adapt and evolve online, meaning the model can continuously learn and optimize based on new data. However, the model update triggering mechanism in existing cloud-edge collaborative battery management system architectures may not be intelligent enough, and the lack of privacy protection technology during the update process increases compliance risks. Summary of the Invention
[0007] The purpose of this invention is to provide a battery management method based on physical fingerprint clustering and Federated LoRA, applicable to fields such as new energy vehicles and energy storage systems. This method achieves accurate identification of aging modes through battery physical fingerprints, and combines this with Federated LoRA technology to achieve lightweight model iteration while protecting data privacy. This effectively solves the problems of data silos, performance degradation, and computing power bottlenecks faced by battery management systems throughout their entire lifecycle, driving a shift in battery management from a fixed logic to a continuously evolving technological paradigm.
[0008] To achieve the above functions, this invention designs a battery management method based on physical fingerprint clustering and federated LoRA. In an environment containing the cloud and multiple edge devices, the following steps S1-S5 are executed for the batteries of each edge device to complete the battery management in the edge devices:
[0009] Step S1: Deploy sensors in the battery of the edge device, collect battery operation data based on the battery management system and sensors of the edge device, and preprocess the data. Use the preprocessed battery operation data as features to construct a physical fingerprint vector.
[0010] Step S2: Establish a health reference baseline corresponding to each feature in the physical fingerprint vector under each working condition category, and calculate the joint drift degree of the real-time physical fingerprint vector relative to the health reference baseline; based on the joint drift degree, determine whether to trigger a local model update according to preset rules.
[0011] Step S3: If a local model update is triggered, the battery management system of the edge device constructs a local training set, builds a local LoRA training total loss function for the local model in the edge device, performs local federated LoRA training, outputs the battery status of the local model, and generates a local battery management system patch.
[0012] Step S4: Each edge device uploads its physical fingerprint vector and local battery management system patch to the cloud. The cloud performs clustering based on the physical fingerprint vector for each edge device to form multiple clusters and calculates the quality score of the local battery management system patch. Based on the clustering results and the quality score of the local battery management system patch, a cluster battery management system patch is generated for each cluster and distributed to each edge device after evaluation.
[0013] Step S5: Each edge device receives the cluster battery management system patch, updates the health reference baseline, and completes battery management in the edge device.
[0014] The present invention also designs an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the aforementioned battery management method based on physical fingerprint clustering and federated LoRA.
[0015] The present invention also designs a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned battery management method based on physical fingerprint clustering and federated LoRA.
[0016] Beneficial effects: Compared with the prior art, the advantages of the present invention include:
[0017] 1. This invention adopts a federated LoRA architecture, where edge devices perform low-rank adapter training locally. Raw time-series data such as voltage, current, and temperature are not uploaded to the cloud; only physical fingerprint vectors and lightweight patch parameters are uploaded, fundamentally ensuring user data privacy and compliance. Simultaneously, the cloud generates cluster patches through clustering and aggregation, allowing each edge device to benefit from the collective experience without exposing local data, effectively solving the bandwidth pressure and privacy risks faced by traditional centralized learning.
[0018] 2. Through LoRA low-rank injection technology, local model updates only require training a very small number of low-rank matrix parameters, without the need for backpropagation of the complete deep model. This significantly reduces computational overhead and storage requirements, greatly improves model update efficiency, and ensures the computing power budget for critical tasks such as battery safety monitoring.
[0019] 3. A multi-dimensional physical fingerprint vector, incorporating differential capacity features, operational condition statistics, and lifetime cumulative features, is innovatively constructed, and a health reference baseline is established to achieve accurate quantification of the joint drift degree. The adaptive threshold update rule effectively distinguishes between normal charge / discharge fluctuations and true aging drift, avoiding the high false alarm rate triggered by simple voltage / current thresholds. This ensures that model updates are only initiated during significant aging or changes in operating conditions, significantly reducing ineffective training and communication overhead.
[0020] 4. Introduce physical fingerprint consistency loss into the local LoRA training loss function. Integrate physical health reference values into the training objective through non-negative / monotonic regression mapping. This makes the changes in model output consistent with the electrochemical aging state of the battery, avoids physical violations or abnormal predictions that may be caused by pure data-driven updates, and improves the interpretability and reliability of state estimation.
[0021] 5. The cloud utilizes a Gaussian mixture model to probabilistically cluster physical fingerprint vectors, grouping edge devices with similar aging patterns into the same cluster. Weighted aggregation is then performed based on patch quality scores, posterior probabilities, and effective sample size to generate a universal patch applicable to the cluster. Simultaneously, a probabilistic hybrid distribution strategy is employed for devices at the cluster boundary, achieving an organic unity of collective intelligence and individual characteristics, effectively addressing the issue of reduced generalization ability caused by the non-independent and identically distributed nature of battery data. Attached Figure Description
[0022] Figure 1 This is a flowchart of a battery management method based on physical fingerprint clustering and federated LoRA provided according to an embodiment of the present invention;
[0023] Figure 2 This is a flowchart of physical fingerprint vector extraction and drift detection provided according to an embodiment of the present invention;
[0024] Figure 3 This is a flowchart of the local federated LoRA training process provided according to an embodiment of the present invention;
[0025] Figure 4 This is a flowchart of the cloud clustering and cluster battery management system patch generation process provided by an embodiment of the present invention. Detailed Implementation
[0026] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0027] This invention provides a battery management method based on physical fingerprint clustering and federated LoRA. In an environment including the cloud and multiple edge devices, this method, for the battery of each edge device, refers to... Figure 1 Perform the following steps S1-S5 to complete battery management in the edge device:
[0028] Step S1: Deploy sensors in the battery of the edge device, collect battery operation data based on the battery management system and sensors of the edge device, and preprocess the data. Use the preprocessed battery operation data as features to construct a physical fingerprint vector.
[0029] In this embodiment, the application environment is a fleet of 1,000 electric vehicles equipped with the same type of ternary lithium battery packs;
[0030] Among them, the Battery Management System (BMS) refers to an electronic system used to monitor, manage and protect battery packs, and its core function includes battery state estimation.
[0031] The specific steps of step S1 are as follows:
[0032] Step S1.1: Collect battery operating data, including battery voltage, current, temperature, charge / discharge cycle count, and internal resistance;
[0033] Step S1.2: Perform time alignment, outlier removal, filtering, and operating condition normalization on the battery's operating data; for the battery's operating data obtained by the i-th edge device in the t-th effective sampling period, construct the physical fingerprint vector as follows:
[0034] ;
[0035] ;
[0036] ;
[0037] ;
[0038] In the formula, This represents the physical fingerprint vector obtained by the i-th edge device in the t-th valid sampling period; , and Let i represent the differential capacity feature vector, operating condition statistical feature vector, and lifetime cumulative feature vector of the i-th edge device in the t-th effective sampling period, respectively; i is the edge device index, t is the effective sampling period index, and the superscript T indicates transpose.
[0039] middle, , and These represent the peak voltage, peak height, and peak area of the m-th characteristic peak, respectively. Indicates the peak-to-valley ratio. This indicates the total number of characteristic peaks retained; middle, , and These represent the mean current, standard deviation of current, and maximum current within the effective charging range, respectively. , , and These represent the mean temperature, standard deviation of temperature, maximum temperature, and temperature rise, respectively. middle, Indicates the equivalent number of full-charge cycles. Indicates the capacity decay rate. Indicates internal resistance;
[0040] Among them, capacity decay rate The larger the value, the faster the capacity decays; where, and These represent the time intervals of the i-th edge device. and time The corresponding available capacity is expressed in ampere-hours (Ah). Indicates the time interval between two consecutive capacity assessments; It represents the increment of the equivalent full-charge cycle count for the i-th edge device within the time interval, and is a dimensionless quantity.
[0041] In one embodiment, the following can be adopted: Characterizing the rate of increase in internal resistance, This represents the increase in internal resistance between adjacent evaluation times, expressed in ohms (Ω) or milliohms (mΩ). Subsets of each feature can be selected for different chemical systems, but all edge devices within the same clustering round use the same feature definitions, dimensions, and arrangement order.
[0042] Step S1.3: To reduce the interference of vehicle operating condition differences on drift determination, the features of each dimension in the physical fingerprint vector are standardized as follows:
[0043] ;
[0044] ;
[0045] In the formula, This indicates the operating condition category of the i-th edge device in the t-th effective sampling period. The standardized value of the d-th dimension feature in the physical fingerprint vector; This represents the original d-th dimension feature of the i-th edge device in the physical fingerprint vector during the t-th effective sampling period; Indicates the type of working condition The median of the d-th dimension feature in the trusted healthy reference sample set; Indicates the type of working condition Robust scaling of the d-th dimension feature. To prevent numerically stable terms with a standardized denominator of zero; Operating condition category For the corresponding trusted health reference sample set, normalized parameters can be established separately for current and temperature characteristics according to ambient temperature range, charging rate range or vehicle operating condition label. This indicates that the median of the j-th health reference sample in the trusted health reference sample set is taken. This represents the absolute deviation of the d-th feature in the physical fingerprint vector of the j-th healthy reference sample relative to the median; , is the feature dimension of the physical fingerprint vector, and the coefficient 1.4826 is used to convert the median absolute deviation to a scale consistent with the standard deviation under a Gaussian distribution.
[0046] Step S2: Establish a health reference baseline corresponding to each feature in the physical fingerprint vector under each working condition category, and calculate the joint drift degree of the real-time physical fingerprint vector relative to the health reference baseline; based on the joint drift degree, determine whether to trigger a local model update according to preset rules.
[0047] The physical fingerprint vector refers to the set of feature parameters extracted from battery operating data and normalized by operating conditions. It includes at least two of the following: differential capacity curve features, operating condition statistical features, and lifetime cumulative features. Differential capacity curve features include peak position, peak height, peak area, or peak-to-valley ratio; operating condition statistical features include average charging current and fluctuation, average temperature and fluctuation, and maximum temperature or temperature rise; lifetime cumulative features include equivalent cycle count, capacity decay rate, or internal resistance.
[0048] Reference Figure 2 The specific steps of step S2 are as follows:
[0049] Step S2.1: Based on the trusted health reference sample set, and targeting the operating condition category... Establish a health reference baseline as follows:
[0050] ;
[0051] in, For a robust central vector, Let covariance matrix be the variance matrix. Let be the confidence interval of the d-th dimension feature of the physical fingerprint vector. , Let be the lower and upper bounds of the confidence interval for the d-th dimension feature of the physical fingerprint vector, respectively. This is the drift threshold;
[0052] Step S2.2: The robust center vector is calculated using the Huber loss function, as shown below:
[0053] ;
[0054] In the formula, This represents the residual after robust scaling. Indicates Huber loss function for the inflection threshold; inflection threshold In the embodiment, it is set ;when When using secondary loss, when Linear growth loss is used to reduce the impact of outliers on the robust center estimation results.
[0055] The robust center vector and covariance matrix are calculated according to the following formula:
[0056] ;
[0057] ;
[0058] in, Represents the robust center vector that minimizes the objective function; Let represent the set of robust center vectors to be found. Let each of the robust center vectors to be determined be represented. The feature dimension of the physical fingerprint vector. Let d be the robust center vector to be determined. ; This represents the physical fingerprint vector of the j-th healthy reference sample. This represents the features in each dimension of the physical fingerprint vector of the j-th healthy reference sample. This represents the d-th feature in the physical fingerprint vector of the j-th healthy reference sample. ; This represents the quality weight of the j-th healthy reference sample. And satisfy the condition that the sum of the quality weights involved in the calculation is greater than 0; the superscript T indicates transpose; in the embodiment, the confidence intervals of each dimension can be determined by the 2.5% and 97.5% quantiles of the healthy reference sample.
[0059] Where j is the sample index in the trusted health reference sample set, and it is not required to correspond one-to-one with the edge device index i; the i-th edge device uses the trusted health reference sample set corresponding to its current operating condition category to calculate the corresponding health reference baseline.
[0060] Step S2.3: Calculate the regularized Mahalanobis distance based on the robust center vector and covariance matrix:
[0061] ;
[0062] In the formula, This indicates the operating condition category of the i-th edge device in the t-th effective sampling period. The regularized Mahalanobis distance is used to characterize the joint drift of the real-time physical fingerprint vector relative to the healthy reference baseline. This represents the regularized covariance matrix, ensuring its invertibility and improving the numerical stability of the regularized Mahalanobis distance calculation. ,in, This represents the covariance regularization coefficient. In the embodiment, the following settings are provided: ; express An identity matrix of order 1; This represents the regularization term applied to the main diagonal of the covariance matrix;
[0063] Step S2.4: Based on the regularized Mahalanobis distance, maintain a stable sample sliding window corresponding to the working condition category. Only when the online samples simultaneously meet the following conditions: When the primary category of an edge device does not undergo a predetermined continuous change, online samples are treated as stable samples and allowed to enter the stable sample sliding window. Otherwise, online samples are not allowed to enter the stable sample sliding window. When the regularized Mahalanobis distance exceeds the drift threshold and meets the preset continuity condition, or when the primary affiliation category of the edge device undergoes a preset continuous change, a local model update is triggered; otherwise, a local model update is not triggered.
[0064] in, The drift threshold is the value for the (t-1)th valid sampling period, and the drift threshold is updated according to the following formula:
[0065] ;
[0066] ;
[0067] In the formula, This represents the candidate drift threshold for the t-th valid sampling period; Represents the clipping function; This represents the drift threshold for the t-th valid sampling period; Represents the joint drift statistic within the sliding window of stable samples. Quantiles For the target false trigger rate, The drift threshold is updated with coefficients. and These are the lower and upper limits of the drift threshold. This represents the maximum adjustment range in a single instance.
[0068] In this embodiment, after the vehicle is put into operation, the edge device extracts the current physical fingerprint vector after each complete charging process where the charging cutoff current is less than 0.05C, and calculates the regularized Mahalanobis distance (joint drift statistic) between it and the current applicable health reference baseline. The adaptive threshold is initially set to 9.5; the threshold is updated once every 200 valid charging segments or every 7 days (whichever comes first) from the most recent stable samples that meet the admission criteria, whichever is less than 200 and no more than 500.
[0069] ;
[0070] ;
[0071] In the formula, Represents a stable sample sliding window The 99th percentile of the inner joint drift statistic; 0.9 and 0.1 are the exponential smoothing weights of the previous period's threshold and the current quantile, respectively; [8.0, 12.0] is the allowable range for the threshold; 0.5 is the maximum change between two consecutive threshold updates. The two lines of formulas are executed sequentially: the first line obtains the candidate thresholds, and the second line restricts the candidate thresholds to an interval with a radius of 0.5 centered on the previous period's threshold, thus obtaining the final threshold for the current period.
[0072] In the embodiment, when When the number of consecutive occurrences reaches a preset limit, or when the primary category of the edge device changes continuously according to a preset limit, a local model update is triggered. Threshold learning and model training are paused under conditions of high temperature, high magnification, or abnormal sensor operation. The upper and lower limits of the threshold satisfy τ. min <τ max The number of consecutive exceedances is a positive integer. In a specific embodiment, the original threshold remains unchanged when the window sample size is less than 200. Two consecutive effective charging cycles exceeding If the primary classification changes for three consecutive periods, the system determines a significant drift, triggering model evolution and marking valid runtime segments within 24 hours before and after the trigger as high-value data. Training is not triggered and thresholds are not updated when the temperature exceeds 55°C, the charging rate is higher than 2C, or the sensor self-test fails.
[0073] Step S3: If a local model update is triggered, the battery management system of the edge device constructs a local training set, builds a local LoRA training total loss function for the local model in the edge device, performs local federated LoRA training, outputs the battery status of the local model, and generates a local battery management system patch.
[0074] LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique that fine-tunes the model by injecting and training only trainable low-rank matrix pairs into specified layers of the pre-trained model.
[0075] Federated Low-Rank Adaptation (LoRA) is a distributed model training framework in which multiple edge devices (clients) independently perform LoRA training based on local data, and only upload the low-rank adapter parameters they generate to the central server for aggregation.
[0076] The local model refers to the core algorithm model deployed in the battery management system controller of the edge device for performing battery state estimation (such as SOC, SOH). This model consists of a local model part with fixed parameters and a dynamic part that can be updated by a low-rank adapter.
[0077] A low-rank adapter refers to a pair of low-rank matrices injected into a specified weight layer of an in-service BMS model. The elements of the low-rank matrix are adaptive coefficients in the model's latent feature space, which do not correspond one-to-one with a single electrochemical physical parameter; their update direction is constrained by physical fingerprint consistency loss to ensure that changes in model output are consistent with changes in battery aging state.
[0078] A Local Battery Management System Patch (Local BMS Patch) refers to a data packet containing updates to the low-rank adapter parameters, generated after a single edge device trains its low-rank adapter via Federated LoRA.
[0079] Reference Figure 3 The specific steps of step S3 are as follows:
[0080] Step S3.1: If a local model update is triggered, the battery management system of the edge device constructs a local training set and performs local federated LoRA training. During local federated LoRA training, the weight matrix for the local model weight layer in the edge device is adjusted. In maintaining In the case of freezing, introduce a low-rank increment:
[0081] ;
[0082] ;
[0083] In the formula, This represents the effective LoRA weight increment injected into the weight layer. This represents the weight matrix of the weight layer after introducing low-rank increments; and These represent the input feature dimension and output feature dimension of the weight layer, respectively. and This represents the low-rank matrices of the input and output sides that participate in the local model update. and The elements in the matrix represent low-dimensional combination coefficients of latent feature channels in the local model, and do not directly correspond to single physical parameters such as capacity, internal resistance, or electrode activity; their update direction is constrained by the consistency loss of the physical fingerprint vector. (Low-rank matrix product) The dimension is ,and and The dimensions are consistent. Represents a set of real numbers OK Column matrix space; It is a low-rank number. This is the scaling factor. It is a positive integer, and >0;
[0084] During the vehicle manufacturing phase, the onboard edge BMS controller pre-configures a local model for SOH and SOC estimation. This embodiment employs a two-layer GRU network with hidden dimensions of 128 and 64, followed by a 32-dimensional fully connected layer and a state output layer; the local model has approximately 1.2 million parameters. A LoRA low-rank adapter injects the input and hidden-state weight matrix into the GRU network, with the rank... Scaling factor The LoRA dropout rate is 0.05; except for low-rank matrices. , In addition, the local model parameters remain frozen. The above network structure and parameters are only examples and can be adjusted according to the computing power of edge devices.
[0085] Step S3.2: Construct the total loss function for local federated LoRA training as follows:
[0086] ;
[0087] In the formula, This represents the total training loss of the local federated LoRA for the i-th edge device; , , These represent the state estimation loss, physical fingerprint consistency loss, and stability loss, respectively. Represents a low-rank parameter regularization term; , , , These represent the non-negative weight coefficients of the state estimation loss, physical fingerprint consistency loss, stability loss, and low-rank parameter regularization term, respectively. Represents the square of the L2 norm;
[0088] The loss items are as follows:
[0089] ;
[0090] ;
[0091] in:
[0092] ;
[0093] ;
[0094] In the formula, , and These represent sample sets with calibrated labels, sample sets with physical health reference values, and stable sample sets, respectively. , and These represent the number of samples in the calibrated sample set, the sample set with physical health reference values, and the stable sample set, respectively. Indicates the local model for the first Battery state estimation for each sample Indicates the first The labeling of each sample Indicates the first The labeling of each sample Represents the first obtained by mapping physical fingerprint vectors. Physical health reference values for each sample; Indicates Huber loss function for the inflection threshold; Indicates the first The standardized physical fingerprint vector of each sample. Indicates the first The standardized physical fingerprint vector of each sample; Indicates that the mapping parameter is Non-negative or monotonic regression mapping; This represents the optimal mapping parameters that minimize the calibration objective function; This represents the calibration dataset; Represents the mapping regularization coefficient; This represents the regularization term applied to the mapping parameters; Indicates that the mapping parameter is Non-negative or monotonic regression mapping, Indicates the mapping parameters; Represents the first input of the local model One sample; and These represent the updated local model and the original local model, respectively. This represents the L2 norm.
[0095] The sample set with calibration labels, the sample set with physical health reference values, and the stable sample set are all subsets of the samples in the local training set constructed by the i-th edge device; among them, the stable sample set consists of historical samples of stable operating conditions retained locally by the edge device, which are used to calculate the stability loss and constrain the output offset of the local model before and after the update.
[0096] Training uses the Adam optimizer with a learning rate of The weight decays to The batch size is 32, the maximum training epochs are 5, and the upper limit of the gradient norm is 1.0; if the loss does not improve after two consecutive epochs, the training stops early. The loss weights are set to... , , , After training, the new and old models are compared on the local validation set. A local battery management system patch is generated only if the SOH estimation error does not increase, the stable sample output deviation does not exceed 1%, and the single inference latency increases by no more than 10%.
[0097] The generated local battery management system patch is approximately 25KB and contains a low-rank matrix. , The local model version number, parent patch version number, physical fingerprint vector summary, effective sample size, quality score, and verification results are uploaded to the cloud after being signed with the device private key; the original voltage, current, and temperature timing data are not uploaded.
[0098] In the embodiments, Indicates the local model for the first Battery state estimation for each sample; for multi-task models that simultaneously include SOC, SOH, and / or RUL outputs, corresponding task losses are set for each, and It is preferred to act only on the SOH or RUL output components that are directly related to the aging state. The threshold used in the aforementioned robust center estimation Set separately. Only update the low-rank matrix during training. and The local model parameters remain frozen.
[0099] Step S4: Each edge device uploads its physical fingerprint vector and local battery management system patch to the cloud. The cloud performs clustering based on the physical fingerprint vector for each edge device to form multiple clusters and calculates the quality score of the local battery management system patch. Based on the clustering results and the quality score of the local battery management system patch, a cluster battery management system patch is generated for each cluster and distributed to each edge device after evaluation.
[0100] A Cluster BMS Patch is a generic low-rank adapter parameter update package generated by a cloud server after aggregating local battery management system patches for multiple edge devices within a specific cluster. This update is applicable to all members of the cluster.
[0101] Reference Figure 4 The specific steps of step S4 are as follows:
[0102] Step S4.1: The cloud performs consistency verification and standardization on the digest of the physical fingerprint vector uploaded by the edge device, and constructs the extended clustering input. The extended clustering input includes at least a standardized physical fingerprint vector; it also includes lifetime descriptors such as calendar usage duration, equivalent cycle count, fast charging percentage, or high-temperature exposure duration; to avoid the operating condition descriptors obscuring the physical fingerprint vector, the lifetime descriptors are normalized and multiplied by a scaling factor. ,in ;
[0103] The marginal probability density is calculated based on the GMM probability model as follows:
[0104] ;
[0105] In the formula, Represents the extended clustering input of the i-th edge device. The marginal probability density; Indicates the number of Gaussian mixture components; This represents the mixing coefficient of the k-th Gaussian mixture component. , Let represent the mean vector and covariance matrix of the k-th Gaussian mixture component, respectively; The mean vector is The covariance matrix is The multivariate Gaussian probability density in The value at; and This is used to ensure that each mixing coefficient constitutes a valid probability distribution.
[0106] Gaussian Mixture Model (GMM) is a probabilistic clustering algorithm that can effectively handle data heterogeneity. In this embodiment, it is used to perform unsupervised learning on physical fingerprint vectors collected from multiple battery cells to group battery cells with similar aging patterns into the same cluster.
[0107] The GMM probabilistic model's processing layers sequentially include a data quality screening layer, a feature normalization layer, a probabilistic clustering layer, an aging mechanism mapping layer, and a patch generation layer. The probabilistic clustering layer of the GMM probabilistic model outputs the posterior probability that the i-th edge device belongs to the k-th cluster. At the same time, the main cluster label is given. :
[0108] ;
[0109] In the formula, the denominator Indicates the extended clustering input of the i-th edge device in all The weighted total likelihood under Gaussian mixture components, where h is the virtual component index used for summation. This represents the mixing coefficient of the h-th Gaussian mixture component. , Let represent the mean vector and covariance matrix of the h-th Gaussian mixture component, respectively; This indicates that the cluster number with the highest posterior probability is selected as the primary cluster label. ;
[0110] This step preserves the posterior probability. Used for patch aggregation and mixed distribution, while retaining the main cluster label. Used for edge device management. Gaussian mixture component. The parameters of the GMM probabilistic model are determined using the Bayesian information criterion within a preset range. Mean vector Covariance Matrix Probabilistic clustering outputs include posterior probabilities. and main cluster tags .
[0111] Step S4.2: For the i-th edge device, the cloud determines the completeness of the charging / discharging segment. Temperature and current stability Normalized value of effective sample size and local validation improvement Calculate the local battery management system patch quality score:
[0112] ;
[0113] ;
[0114] In the formula, This represents the local battery management system patch quality score for the i-th edge device; , , and These represent the weights of charge / discharge segment integrity, temperature and current condition stability, normalized effective sample size, and local validation improvement, respectively. and These represent the validation errors obtained by the i-th edge device on the local validation set using the local model before and after the update, respectively. Represents the numerically stable term; Used to improve local validation Restricted to closed intervals Inside;
[0115] Step S4.3: For the k-th cluster, define the set of valid edge devices participating in the clustering. And based on the posterior probability The local battery management system patch quality score of the i-th edge device and the effective local sample size of the i-th edge device Calculate aggregate weights:
[0116] ;
[0117] In the formula, This represents the set of valid edge devices, filtered by patch signature, integrity, version consistency, and local verification. This represents the minimum probability threshold for participating in clustering; This represents the effective local sample size of the i-th edge device; This represents the effective local sample size of the j-th edge device; This represents the local battery management system patch quality score for the j-th edge device; The posterior probability that the j-th edge device belongs to the k-th cluster; This represents the set of valid edge devices participating in the clustering; This represents the normalized aggregate weight of the i-th edge device for the cluster battery management system patch of the k-th cluster; This represents the effective LoRA weight increment uploaded by the i-th edge device. , and This represents the low-rank matrix of the input and output sides of the i-th edge device, multiplied by a scaling factor. This yields effective weight increments consistent with the dimension of the weight layer in the local model. , It is a low-rank number. This is the scaling factor; This represents the effective LoRA weight increment obtained from the aggregation of the k-th cluster; when performing normalization, the set of edge devices participating in the aggregation is required to be non-empty and the denominator is greater than 0.
[0118] The cluster weight increment after eliminating the scaling factor is calculated as follows:
[0119] ;
[0120] ;
[0121] In the formula, This represents the cluster weight increment of the k-th cluster after the scaling factor is removed; , and They represent respectively to Perform rank Truncate the left singular vector matrix, the singular value diagonal matrix, and the right singular vector matrix obtained from singular value decomposition; Indicates to Take the square root of each non-negative diagonal element; superscript Indicates transpose; This indicates that the rank is not higher than 1. Approximate recovery of the low-rank matrix;
[0122] in, , and The dimensions are d out ×r, r×r and d in ×r; B thus recovered k and A k The dimensions are d out ×r and r×d in .
[0123] in, This represents the low-rank matrix of the output side of the k-th cluster. Let represent the low-rank matrix on the input side of the k-th cluster; and The product of the two obtained from the aforementioned rank r truncated singular value decomposition results, after being scaled by LoRA, is used to approximately recover the effective LoRA weight increment of the k-th cluster.
[0124] Using the above scaling relationship avoids the repeated application of LoRA scaling factors and avoids aggregation bias caused by directly averaging low-rank matrices A and B separately due to the non-uniqueness of low-rank decomposition. Even if all devices use the same initialization, averaging low-rank matrices A and B separately is not used as the default aggregation method; it can only be used as an alternative implementation method when explicit matrix coordinate alignment constraints are applied and the consistency with the aforementioned aggregation result is verified through effective weight increment reconstruction error.
[0125] Step S4.4: The cloud generates a cluster battery management system patch for each cluster, containing a cluster identifier, local model version, parent patch version, applicable feature range, low-rank matrix parameters, signature information, and rollback version number; the edge device selects the cluster corresponding to the cluster battery management system patch with the highest posterior probability as its assigned cluster; for edge devices located at the boundaries of two or more clusters, in this embodiment, if If the edge device is determined to belong to two or more cluster boundaries, the normalized posterior probability is calculated according to the following formula:
[0126] ;
[0127] ; ; ;
[0128] In the formula, Represents the posterior probability of the i-th edge device. The highest probability A set of indexes for each cluster; This represents the posterior probability that the i-th edge device belongs to the k-th cluster after renormalization within the index set; This represents the posterior probability that the i-th edge device belongs to the h-th cluster; This represents the effective weight increment of the hybrid cluster to be distributed to the i-th edge device; , and These represent the effects of eliminating the scaling factor. Perform rank Truncate the left singular vector matrix, the singular value diagonal matrix, and the right singular vector matrix obtained from singular value decomposition; and Let L represent the low-rank matrices of the output and input sides of the i-th edge device, respectively; L is the number of clusters participating in the hybridization.
[0129] In this embodiment, the cloud receives local battery management system patches, physical fingerprint vector summaries, and local battery management system patch quality scores for each vehicle. This embodiment uses a 17-dimensional normalized physical fingerprint vector as the main component, and incorporates normalized calendar usage time and fast charging percentage to form a 19-dimensional clustering input. The number of candidate clusters satisfies... The covariance type can be selected from full covariance, diagonal covariance, shared covariance, and spherical covariance; the maximum number of EM iterations is 200, and the convergence tolerance is... The covariance regularization coefficient is Choose the option with the lowest BIC. and covariance type.
[0130] The GMM probabilistic model outputs the posterior probability of each vehicle in each cluster. and main cluster tags This embodiment selects... After physical fingerprint vector template matching, the three clusters were interpreted as normal cycle aging, cathode material activity decay tendency and lithium plating risk tendency, respectively. When the template matching confidence was insufficient, only a neutral cluster number was used, and no specific aging mechanism name was forcibly assigned.
[0131] The group utility score of the cluster battery management system patch for the k-th cluster in cloud computing. as follows:
[0132] ;
[0133] In the formula, , and These represent the non-negative weights of the error improvement term, the stability reward term, and the communication overhead penalty term, respectively. and These represent the verification errors before and after the update. The updated stability score. For communication overhead, This is the upper limit for normalized communication overhead. The terms represent numerical stability. The first term indicates the relative improvement in validation error of the cluster battery management system patch compared to the local model; the second term indicates the stability contribution after loading the cluster battery management system patch; and the third term indicates the normalized communication overhead penalty. The larger the value of , the stronger the th . The higher the overall utility of a cluster battery management system patch, the better.
[0134] Before the cluster battery management system patch is released, the cloud compares the estimated performance and stability indicators before and after the update on a preset validation set that matches the target cluster operating conditions. These indicators include estimation error, output variance, physical consistency deviation, and inference latency. The cluster battery management system patch is allowed to be released when the estimated performance is not degraded, the stability indicators do not exceed the threshold, and the resource overhead meets the edge device limit.
[0135] If the group utility score of a cluster battery management system patch is below the threshold, the release of the cluster battery management system patch will be stopped and the rollback or retraining process will begin.
[0136] After the cluster battery management system patch is loaded, the edge devices compute the outputs of the old local model and the new local model in parallel during the shadow runtime, and upload a summary of error changes, convergence speed, rollback counts, and resource overhead with the next round of local battery management system patch.
[0137] In this embodiment, after the cloud completes patch pre-verification on the target cluster validation set, it distributes the cluster battery management system patch to the corresponding vehicle via OTA. The edge BMS first runs no less than 20 valid charging segments in shadow mode, comparing the SOH error, output variance, physical consistency deviation, and inference latency of the new and old models. If the relative increase in error of the new model exceeds 5%, the relative increase in output variance exceeds 10%, the physical consistency deviation exceeds a set threshold, or the inference latency increases by more than 10%, the switch is rejected and the system is rolled back to the stable version.
[0138] The health reference baseline and the GMM probabilistic model employ a separate update strategy: the health reference baseline is updated only when it has been 30 days since the last calibration and at least 500 new valid physical fingerprint vectors have been added; the GMM probabilistic model can be updated when at least 500 new valid online physical fingerprint vectors have been added. The GMM is updated earlier if the average maximum attribution probability is below 0.75, the covariance trace of any cluster increases by more than 20% compared to the previous version, the drift trigger rate exceeds twice the target value for two consecutive weeks, or the candidate model's BIC decreases significantly. The update step size for the health reference baseline is [not specified in the original text]. The step size for updating the statistics of the GMM probability model is taken as follows: .
[0139] Step S5: Each edge device receives the cluster battery management system patch, updates the health reference baseline, and completes battery management in the edge device.
[0140] In step S5, the health reference baseline Composed only of new battery samples, capacity calibration confirmation samples, or trusted maintenance samples Update: Unverified online aging samples must not be included in the health reference baseline; [Regarding the health reference baseline] The updates to the GMM probability model statistics are as follows:
[0141] ;
[0142] ;
[0143] ;
[0144] ;
[0145] ;
[0146] ;
[0147] In the formula, t represents the effective sampling period, and the superscript... Indicates the health reference baseline statistic, subscript Indicates the operating condition category, subscript Indicates a cluster; and They represent the first t - Operating condition category saved after one valid sampling period ends g The corresponding robust center vector and covariance matrix, and They respectively represent according to the first t Newly acquired data belonging to the operating condition category within each valid sampling period g The robust center vector and covariance matrix obtained from the estimation of the healthy reference sample; , represent the robust center vector and covariance matrix obtained by fusing and updating the statistics of the newly added samples in this round with the health reference baseline statistics of the previous round, respectively; , They represent the first t -1 valid sampling period ended and the first data was saved. k The mean vector and covariance matrix of each cluster. , They respectively represent according to the first t Newly acquired in each of the effective sampling periods, belonging to the [number]th [period] k The mean vector and covariance matrix obtained from the effective sample estimation of each cluster; , They represent the results obtained by merging and updating the statistics of the newly added samples in this round with the statistics of the GMM probability model in the previous round. k The mean vector and covariance matrix of each cluster; and These represent the operating condition categories. g、 No. k The cluster in the th tThe offset vector of the new estimated center relative to the center of the previous round for each effective sampling period; superscript Indicates transpose. and These represent the update step sizes for the health reference baseline and GMM probabilistic model statistics, respectively. If the covariance trace, mean posterior entropy, or multimodality metric of a cluster exceeds the splitting threshold, local GMM probabilistic model refitting is performed. If the Bhattacharyya distance between the centers of two clusters is less than the merging threshold and the corresponding patch utilities are similar, the clusters are merged. Each update retains the previous version's health reference baseline, GMM probabilistic model parameters, and cluster battery management system patches to support version comparison and anomaly rollback. The update step size is always greater than 0 and not greater than 1.
[0148] This invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, it implements the aforementioned battery management method based on physical fingerprint clustering and federated LoRA.
[0149] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned battery management method based on physical fingerprint clustering and federated LoRA.
[0150] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A battery management method based on physical fingerprint clustering and federated LoRA, characterized in that, In an environment that includes the cloud and multiple edge devices, for the batteries of each edge device, perform the following steps S1-S5 to complete the battery management in the edge devices: Step S1: Deploy sensors in the battery of the edge device, collect battery operation data based on the battery management system and sensors of the edge device, and preprocess the data. Use the preprocessed battery operation data as features to construct a physical fingerprint vector. Step S2: Establish a health reference baseline corresponding to each feature in the physical fingerprint vector under each working condition category, and calculate the joint drift degree of the real-time physical fingerprint vector relative to the health reference baseline; based on the joint drift degree, determine whether to trigger a local model update according to preset rules. Step S3: If a local model update is triggered, the battery management system of the edge device constructs a local training set, builds a local LoRA training total loss function for the local model in the edge device, performs local federated LoRA training, outputs the battery status of the local model, and generates a local battery management system patch. Step S4: Each edge device uploads its physical fingerprint vector and local battery management system patch to the cloud. The cloud performs clustering based on the physical fingerprint vector for each edge device, forming multiple clusters, and calculates the quality score of the local battery management system patch. Based on the clustering results and the quality score of the local battery management system patch, a cluster battery management system patch is generated for each cluster and then distributed to each edge device after evaluation. Step S5: Each edge device receives the cluster battery management system patch, updates the health reference baseline, and completes battery management in the edge device.
2. The battery management method based on physical fingerprint clustering and federated LoRA according to claim 1, characterized in that, The specific steps of step S1 are as follows: Step S1.1: Collect battery operating data, including battery voltage, current, temperature, charge / discharge cycle count, and internal resistance; Step S1.2: Perform time alignment, outlier removal, filtering, and operating condition normalization on the battery's operating data; for the battery's operating data obtained by the i-th edge device in the t-th effective sampling period, construct the physical fingerprint vector as follows: ; ; ; ; In the formula, This represents the physical fingerprint vector obtained by the i-th edge device in the t-th valid sampling period; , and Let i represent the differential capacity feature vector, operating condition statistical feature vector, and lifetime cumulative feature vector of the i-th edge device in the t-th effective sampling period, respectively; i is the edge device index, t is the effective sampling period index, and the superscript T indicates transpose. middle, , and These represent the peak voltage, peak height, and peak area of the m-th characteristic peak, respectively. Indicates the peak-to-valley ratio. This indicates the total number of characteristic peaks retained; middle, , and These represent the mean current, standard deviation of current, and maximum current within the effective charging range, respectively. , , and These represent the mean temperature, standard deviation of temperature, maximum temperature, and temperature rise, respectively. middle, Indicates the equivalent number of full-charge cycles. Indicates the capacity decay rate. Indicates internal resistance; Step S1.3: Standardize the features of each dimension in the physical fingerprint vector as follows: ; ; In the formula, This indicates the operating condition category of the i-th edge device in the t-th effective sampling period. The standardized value of the d-th dimension feature in the physical fingerprint vector; This represents the original d-th dimension feature of the i-th edge device in the physical fingerprint vector during the t-th effective sampling period; Indicates the type of working condition The median of the d-th dimension feature in the trusted healthy reference sample set; Indicates the type of working condition Robust scaling of the d-th dimension feature. To prevent numerically stable terms with a standardized denominator of zero; Operating condition category The corresponding trusted health reference sample set, This indicates that the median of the j-th health reference sample in the trusted health reference sample set is taken. This represents the absolute deviation of the d-th feature in the physical fingerprint vector of the j-th healthy reference sample relative to the median; , denoted as the feature dimension of the physical fingerprint vector.
3. The battery management method based on physical fingerprint clustering and federated LoRA according to claim 2, characterized in that, The specific steps of step S2 are as follows: Step S2.1: Based on the trusted health reference sample set, and targeting the operating condition category... Establish a health reference baseline as follows: ; in, For a robust central vector, Let covariance matrix be the variance matrix. Let be the confidence interval of the d-th dimension feature of the physical fingerprint vector. , Let be the lower and upper bounds of the confidence interval for the d-th dimension feature of the physical fingerprint vector, respectively. This is the drift threshold; Step S2.2: The robust center vector is calculated using the Huber loss function, as shown below: ; In the formula, This represents the residual after robust scaling. Indicates Huber loss function for the inflection threshold; inflection threshold ; The robust center vector and covariance matrix are calculated according to the following formula: ; ; in, Represents the robust center vector that minimizes the objective function; Let represent the set of robust center vectors to be found. Let each of the robust center vectors to be determined be represented. The feature dimension of the physical fingerprint vector. Let d be the robust center vector to be determined. ; This represents the physical fingerprint vector of the j-th healthy reference sample. This represents the features in each dimension of the physical fingerprint vector of the j-th healthy reference sample. This represents the d-th feature in the physical fingerprint vector of the j-th healthy reference sample. ; This represents the quality weight of the j-th healthy reference sample; the superscript T indicates transpose. Step S2.3: Calculate the regularized Mahalanobis distance based on the robust center vector and covariance matrix: ; In the formula, This indicates the operating condition category of the i-th edge device in the t-th effective sampling period. The regularized Mahalanobis distance is used to characterize the joint drift of the real-time physical fingerprint vector relative to the healthy reference baseline. Represents the regularized covariance matrix; Step S2.4: Based on the regularized Mahalanobis distance, maintain a stable sample sliding window corresponding to the working condition category. Only when the online samples simultaneously meet the following conditions: When the primary category of an edge device does not undergo a predetermined continuous change, online samples are treated as stable samples and allowed to enter the stable sample sliding window. Otherwise, online samples are not allowed to enter the stable sample sliding window. When the regularized Mahalanobis distance exceeds the drift threshold and meets the preset continuity condition, or when the primary classification of the edge device undergoes a preset continuous change, a local model update is triggered; otherwise, a local model update is not triggered. in, The drift threshold is the value for the (t-1)th valid sampling period, and the drift threshold is updated according to the following formula: ; ; In the formula, This represents the candidate drift threshold for the t-th valid sampling period; Represents the clipping function; This represents the drift threshold for the t-th valid sampling period; Represents the joint drift statistic within the sliding window of stable samples. Quantiles For the target false trigger rate, The drift threshold is updated with coefficients. and These are the lower and upper limits of the drift threshold. This represents the maximum adjustment range in a single instance.
4. The battery management method based on physical fingerprint clustering and federated LoRA according to claim 3, characterized in that, The specific steps of step S3 are as follows: Step S3.1: If a local model update is triggered, the battery management system of the edge device constructs a local training set and performs local federated LoRA training. During local federated LoRA training, the weight matrix for the local model weight layer in the edge device is adjusted. In maintaining In the case of freezing, introduce a low-rank increment: ; ; In the formula, This represents the effective LoRA weight increment injected into the weight layer. This represents the weight matrix of the weight layer after introducing low-rank increments; and These represent the input feature dimension and output feature dimension of the weight layer, respectively. and This represents the low-rank matrices of the input and output sides involved in the local model update, and the product of the low-rank matrices. The dimension is ,and and The dimensions are consistent. It is a low-rank number. This is the scaling factor; Step S3.2: Construct the total loss function for local federated LoRA training as follows: ; In the formula, This represents the total training loss of the local federated LoRA for the i-th edge device; , , These represent the state estimation loss, physical fingerprint consistency loss, and stability loss, respectively. Represents a low-rank parameter regularization term; , , , These represent the non-negative weight coefficients of the state estimation loss, physical fingerprint consistency loss, stability loss, and low-rank parameter regularization term, respectively. Represents the square of the L2 norm; The loss items are as follows: ; ; in: ; ; In the formula, , and These represent sample sets with calibrated labels, sample sets with physical health reference values, and stable sample sets, respectively. , and These represent the number of samples in the calibrated sample set, the sample set with physical health reference values, and the stable sample set, respectively. Indicates the local model for the first Battery state estimation for each sample Indicates the first The labeling of each sample Indicates the first The labeling of each sample Represents the first obtained by mapping physical fingerprint vectors. Physical health reference values for each sample; Indicates Huber loss function for the inflection threshold; Indicates the first The standardized physical fingerprint vector of each sample. Indicates the first The standardized physical fingerprint vector of each sample; Indicates that the mapping parameter is Non-negative or monotonic regression mapping; This represents the optimal mapping parameters that minimize the calibration objective function; This represents the calibration dataset; Represents the mapping regularization coefficient; This represents the regularization term applied to the mapping parameters; Indicates that the mapping parameter is Non-negative or monotonic regression mapping, Indicates the mapping parameters; Represents the first input of the local model One sample; and These represent the updated local model and the original local model, respectively. This represents the L2 norm.
5. The battery management method based on physical fingerprint clustering and federated LoRA according to claim 4, characterized in that, The specific steps of step S4 are as follows: Step S4.1: The cloud performs consistency verification and standardization on the digest of the physical fingerprint vector uploaded by the edge device, and constructs the extended clustering input. The marginal probability density is calculated based on the GMM probability model as follows: ; In the formula, Represents the extended clustering input of the i-th edge device. The marginal probability density; Indicates the number of Gaussian mixture components; This represents the mixing coefficient of the k-th Gaussian mixture component. , Let represent the mean vector and covariance matrix of the k-th Gaussian mixture component, respectively; The mean vector is The covariance matrix is The multivariate Gaussian probability density in The value at; The GMM probabilistic model outputs the posterior probability that the i-th edge device belongs to the k-th cluster. At the same time, the main cluster label is given. : ; In the formula, the denominator Indicates the extended clustering input of the i-th edge device in all The weighted total likelihood under Gaussian mixture components, where h is the virtual component index used for summation. This represents the mixing coefficient of the h-th Gaussian mixture component. , Let represent the mean vector and covariance matrix of the h-th Gaussian mixture component, respectively; This indicates that the cluster number with the highest posterior probability is selected as the primary cluster label. ; Step S4.2: For the i-th edge device, the cloud determines the completeness of the charging / discharging segment. Temperature and current stability Normalized value of effective sample size and local validation improvement Calculate the local battery management system patch quality score: ; ; In the formula, This represents the local battery management system patch quality score for the i-th edge device; , , and These represent the weights of charge / discharge segment integrity, temperature and current condition stability, normalized effective sample size, and local validation improvement, respectively. and These represent the validation errors obtained by the i-th edge device on the local validation set using the local model before and after the update, respectively. Represents the numerically stable term; Used to improve local validation Restricted to closed intervals Inside; Step S4.3: For the k-th cluster, define the set of valid edge devices participating in the clustering. And based on the posterior probability The local battery management system patch quality score of the i-th edge device and the effective local sample size of the i-th edge device Calculate aggregate weights: ; In the formula, Represents the set of valid edge devices; This represents the minimum probability threshold for participating in clustering; This represents the effective local sample size of the i-th edge device. This represents the effective local sample size of the j-th edge device; This represents the local battery management system patch quality score for the j-th edge device; The posterior probability that the j-th edge device belongs to the k-th cluster; This represents the set of valid edge devices participating in the clustering; This represents the normalized aggregate weight of the i-th edge device for the cluster battery management system patch of the k-th cluster; This represents the effective LoRA weight increment uploaded by the i-th edge device. , and This represents the low-rank matrix representing the input and output sides of the i-th edge device. It is a low-rank number. This is the scaling factor; This represents the effective LoRA weight increment obtained by aggregating the k-th cluster; The cluster weight increment after eliminating the scaling factor is calculated as follows: ; ; In the formula, This represents the cluster weight increment of the k-th cluster after the scaling factor is removed; , and They represent respectively to Perform rank Truncate the left singular vector matrix, the singular value diagonal matrix, and the right singular vector matrix obtained from singular value decomposition; Indicates to Take the square root of each non-negative diagonal element; superscript Indicates transpose; This indicates that the rank is not higher than 1. Approximate recovery of the low-rank matrix; in, This represents the low-rank matrix of the output side of the k-th cluster. Let represent the low-rank matrix on the input side of the k-th cluster; Step S4.4: The cloud generates a cluster battery management system patch for each cluster. Edge devices select the cluster corresponding to the cluster battery management system patch with the highest posterior probability as their assigned cluster. For edge devices located at the boundaries of two or more clusters, the normalized posterior probability is calculated using the following formula: ; ; ; ; In the formula, Represents the posterior probability of the i-th edge device. The highest probability A set of indexes for each cluster; This represents the posterior probability that the i-th edge device belongs to the k-th cluster after renormalization within the index set; This represents the posterior probability that the i-th edge device belongs to the h-th cluster; This represents the effective weight increment of the hybrid cluster to be distributed to the i-th edge device; , and These represent the effects of eliminating the scaling factor. Perform rank Truncate the left singular vector matrix, the singular value diagonal matrix, and the right singular vector matrix obtained from singular value decomposition; and Let L represent the low-rank matrices of the output and input sides of the i-th edge device, respectively; L is the number of clusters participating in the hybridization. The group utility score of the cluster battery management system patch for the k-th cluster in cloud computing. as follows: ; In the formula, , and These represent the non-negative weights of the error improvement term, the stability reward term, and the communication overhead penalty term, respectively. and These represent the verification errors before and after the update. The updated stability score. For communication overhead, This is the upper limit for normalized communication overhead. It is a numerically stable term.
6. The battery management method based on physical fingerprint clustering and federated LoRA according to claim 5, characterized in that, In step S4.4, before the cluster battery management system patch is released, the cloud compares the estimated performance and stability indicators before and after the update on a preset validation set that matches the target cluster operating conditions. These indicators include estimation error, output variance, physical consistency deviation, and inference latency. The cluster battery management system patch is allowed to be released when the estimated performance is not degraded, the stability indicators do not exceed the threshold, and the resource overhead meets the edge device limit. If the group utility score of a cluster battery management system patch is below the threshold, the release of the cluster battery management system patch will be stopped and the rollback or retraining process will begin.
7. The battery management method based on physical fingerprint clustering and federated LoRA according to claim 6, characterized in that, In step S5, the health reference baseline is... The updates to the GMM probability model statistics are as follows: ; ; ; ; ; ; In the formula, t represents the effective sampling period, and the superscript... Indicates the health reference baseline statistic, subscript Indicates the operating condition category, subscript Indicates a cluster; and They represent the first t - Operating condition category saved after one valid sampling period ends g The corresponding robust center vector and covariance matrix, and They respectively represent according to the first t Newly acquired data belonging to the operating condition category within each valid sampling period g The robust center vector and covariance matrix obtained from the estimation of the healthy reference sample; , represent the robust center vector and covariance matrix obtained by fusing and updating the statistics of the newly added samples in this round with the health reference baseline statistics of the previous round, respectively; , They represent the first t -1 valid sampling period ended and the first data was saved. k The mean vector and covariance matrix of each cluster. , They respectively represent according to the first t Newly acquired in each of the effective sampling periods, belonging to the [number]th [period] k The mean vector and covariance matrix obtained from the effective sample estimation of each cluster; , They represent the results obtained by merging and updating the statistics of the newly added samples in this round with the statistics of the GMM probability model in the previous round. k The mean vector and covariance matrix of each cluster; and These represent the operating condition categories. g、 No. k The cluster in the th t The offset vector of the new estimated center relative to the center of the previous round for each effective sampling period; superscript Indicates transpose. and These are the update steps for the healthy reference baseline and the GMM probability model statistics, respectively.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the computer program, it implements a battery management method based on physical fingerprint clustering and federated LoRA as described in any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a battery management method based on physical fingerprint clustering and federated LoRA as described in any one of claims 1-7.
