Storage battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization
The battery online monitoring system, which is co-optimized by BSCA-SPCA, utilizes binary SCA feature selection and symbolic PCA dimensionality reduction to solve the problems of early fault detection delay and high-dimensional data processing bottlenecks in traditional systems, thus achieving efficient battery status monitoring and fault prediction.
Patent Information
- Application Number
- CN202511399684.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-28
- Publication Date
- 2026-01-02
AI Technical Summary
Traditional battery monitoring systems cannot detect early faults in a timely manner, and high-dimensional data processing leads to limited computing resources and increased noise. Existing feature selection and dimensionality reduction methods cannot meet the needs of high-performance battery monitoring.
A battery online monitoring system based on BSCA-SPCA collaborative optimization is adopted. Through binary SCA feature selection and symbolic PCA dimensionality reduction, combined with SAX time series encoding and weighted covariance matrix calculation, the real-time acquisition of battery state parameters and fault prediction are realized.
It significantly reduces data dimensionality, improves prediction accuracy and computational efficiency, meets the low latency and low power consumption requirements of real-time monitoring, supports simultaneous monitoring of multiple battery cells, increases system capacity and reduces hardware costs.
Smart Images

Figure CN121256196A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power electronics and Internet of Things, in particular to a storage battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization. BACKGROUND
[0002] In the traditional storage battery monitoring system, some technical bottlenecks have not been well solved, such as:
[0003] 1) Limitations of fixed threshold alarm mechanism Traditional systems rely on pre-set fixed thresholds for fault alarm, such as triggering an alarm when the battery voltage is below 2.0V or the temperature exceeds 50℃; however, the aging of the storage battery is a gradual process, and the early degradation stage (such as internal resistance change rate <5%) usually does not cause the parameters to exceed the fixed threshold, so it is difficult to detect potential faults in time; studies have shown that when the battery internal resistance increases by 10%-15%, its actual capacity has decreased by 20%-30%, at which point the traditional system may still consider the battery to be working normally; this "threshold lag" phenomenon leads to delayed fault warning, making it difficult to meet the needs of modern high-reliability energy storage systems;
[0004] 2) Challenges of high-dimensional data processing With the development of sensor technology, modern storage battery monitoring systems can collect more and more parameters, including voltage, current, temperature, internal resistance, charge-discharge times, cycle life, self-discharge rate, etc.; however, edge computing devices (such as ARM Cortex-M series microcontrollers) have limited computing resources, and processing high-dimensional data faces serious performance bottlenecks; studies have shown that when processing more than 20 features, the single-node data processing delay exceeds 200ms, which cannot meet the real-time monitoring requirements; high-dimensional data not only increases the computational complexity, but also may introduce noise, reducing the model prediction accuracy;
[0005] 3) Deficiencies of traditional feature selection and dimensionality reduction methods Existing feature selection and dimensionality reduction methods have obvious defects, such as PCA, random forest; although PCA can effectively reduce the data dimension, it cannot distinguish the importance of features, and may retain a lot of redundant information; the random forest feature selection has high computational complexity (O (n²)), and is prone to local optimal solution, resulting in unstable feature selection results; in addition, traditional methods do not consider the dynamic characteristics of time series data, making it difficult to capture the nonlinear change law in the battery degradation process;
[0006] In the development process of sensor fusion technology, the battery monitoring technology has experienced several key stages, and the core technology and typical problems of each stage are compared: 1) 1.0 stage, threshold judgment is adopted, the processing feature way is: manual screening of 5-8 key features, the problem is: feature omission leads to early fault missed detection; 2) 2.0 stage, statistical dimension reduction is adopted, the processing feature way is: PCA / LDA processing 10-15 dimensional data, the problem is: ignoring the nonlinear correlation of features; 3) 3.0 stage, intelligent optimization is adopted, the processing feature way is: PSO / RF processing 15-20 dimensional data, the problem is: fall into local optimum and time-consuming calculation; Therefore, the existing technology cannot meet the needs of high-performance battery monitoring system in feature dimension, processing delay and prediction accuracy; Therefore, the applicant proposes a battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization, which combines binary SCA feature selection and symbolic PCA dimension reduction organically, reduces the data dimension while retaining the key features, and significantly improves the system performance. SUMMARY
[0007] To solve the above technical problems, the application provides a battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization, which sets a perception layer, an edge layer, a cloud layer and a data transmission network. The feature selection module based on binary SCA realizes continuous-discrete feature mapping through a function, and fuses SAX time series encoding and weighted covariance matrix calculation through a symbolic PCA dimension reduction module. The cloud edge collaborative architecture performs data preprocessing on the edge, and the cloud performs LSTM model training and updating, effectively improving the battery online monitoring and fault prediction.
[0008] To achieve the above purpose, the technical scheme adopted by the application is:
[0009] A battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is characterized by: the system comprising a sensing layer, an edge layer, a cloud layer, and a data transmission network; the sensing layer deploys voltage sensor arrays, current sensor arrays, temperature sensor arrays, and an internal resistance measurement module to achieve real-time acquisition of battery state parameters, employing synchronous sampling technology to ensure data consistency; the edge layer comprises a feature selection module, a data dimensionality reduction module, a state prediction module, and an edge decision module to perform feature selection, data dimensionality reduction, and preliminary state prediction, and achieves local early warning through the edge decision module, reducing the data transmission pressure on the cloud layer; the cloud layer comprises a deep learning model, a fault diagnosis engine, a big data analysis platform, and a visualization platform, constructing a deep learning model for global state analysis, utilizing the big data platform to mine battery degradation patterns, and supporting remote monitoring and model updates; the sensing layer, edge layer, and cloud layer communicate through a data transmission network; the system employs dynamic weight adjustment optimized by the feature selection module based on binary SCA, and adopts... The function implements continuous-discrete feature mapping. It integrates SAX time series encoding and weighted covariance matrix calculation through a symbolic PCA dimensionality reduction module. It adopts a cloud-edge collaborative architecture to perform data preprocessing at the edge and LSTM model training and updating in the cloud.
[0010] Furthermore, the dynamic weight adjustment based on the feature selection module of binary SCA in the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is specifically formulated as follows:
[0011]
[0012] Where: current_iter is the current iteration number;
[0013] `max_iter` represents the maximum number of iterations, achieving a linear decay of the search range.
[0014] Furthermore, the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization employs... The function is as follows:
[0015]
[0016] Where k and θ are adjustable parameters.
[0017] Furthermore, the symbolic PCA dimensionality reduction module of the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization dynamically adjusts the size of the SAX time series encoding alphabet according to the data distribution. The specific method is as follows:
[0018] calculating the standard deviation σ of the data; determining the alphabet size m according to σ;
[0019]
[0020] wherein: represents the upward rounding, realizing adaptive symbolization precision control.
[0021] Further, the weighted covariance matrix formula of the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is:
[0022]
[0023] wherein: Σ is the original covariance matrix;
[0024] is the feature weight matrix of SCA optimization.
[0025] Further, the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is provided with an edge decision module, which contains a dynamic threshold adaptive algorithm, and the specific formula is:
[0026]
[0027] wherein: θ0 is the initial threshold;
[0028] γ is the temperature compensation coefficient, which is 0.005 / ℃;
[0029] SOH t is the real-time health status, realizing environment adaptive fault early warning.
[0030] Further, the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization has the needs of reducing feature redundancy and dimension disaster of multi-source heterogeneous sensor data, early identification of battery degradation trend under complex working conditions, and low delay processing demand in edge computing scene.
[0031] The benefits brought by the present application are:
[0032] 1. The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization screens key features through BSCA-FS algorithm, combines S-PCA dimension reduction, and reduces the feature dimension from 23 of the traditional method to 9, reducing more than 60% of the data amount, effectively alleviating the dimension disaster, and significantly reducing the feature dimension;
[0033] 2, the SOH prediction error of the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is reduced from 8.2% of the traditional method to 3.5%, the early warning time is extended from 1-2 weeks to 2-3 months, the early degradation trend is judged by capturing the early internal resistance micro change and other characteristics, and the prediction accuracy is greatly improved;
[0034] 3, the single frame data processing time of the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is reduced from 156ms to 28ms, the optimization is realized based on ARM Cortex-M7, the memory occupation is reduced by 40%, the low delay and low power consumption requirements of real-time monitoring are met, and the efficiency of edge computing is improved;
[0035] 4, the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization supports monitoring 200+ battery units at the same time, the star networking architecture based on LoRaWAN is adopted, the system capacity is improved by more than 3 times, the hardware cost is reduced by 50%, and the system expansion is enhanced. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 It is a system architecture schematic diagram of the application;
[0037] Figure 2 It is a system software architecture schematic diagram of the application;
[0038] Figure 3 It is a BSCA-FS algorithm flow schematic diagram of the application;
[0039] Figure 4 It is a S-PCA algorithm flow schematic diagram of the application;
[0040] Figure 5 It is a hardware principle schematic diagram of the edge computing unit of the application;
[0041] Figure 6 It is a monitoring SOH change curve comparison schematic diagram of the application;
[0042] Figure 7 It is an electromagnetic compatibility design principle schematic diagram of the application;
[0043] Figure 8 It is a dynamic threshold self-adaptive algorithm flow schematic diagram of the application. DETAILED DESCRIPTION
[0044] The application will be further described in detail in combination with the drawings and specific embodiments:
[0045] As Figures 1-8As shown, it is a battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization, which is provided with a perception layer, an edge layer, a cloud layer and a data transmission network; as shown Figure 1 As shown, the perception layer is provided with a voltage sensor array, a current sensor array, a temperature sensor array and an internal resistance measurement module; the sensor of the voltage sensor array adopts a high-precision ADC, the measurement range is 0-16V, the resolution is 16 bits, the measurement error is <±0.1%, and 8 channels of synchronous sampling are supported; the sensor of the current sensor array adopts a Hall effect sensor, the measurement range is ±100A, the resolution is 0.5mA, the response time is <5μs, and the built-in electromagnetic shielding design is adopted; the sensor of the temperature sensor array adopts a digital temperature sensor, the measurement range is -55℃~+125℃, the accuracy is ±0.5℃, single bus networking is supported, and up to 64 nodes can be mounted; the internal resistance measurement module adopts an alternating current injection method, the measurement frequency is 1kHz, the measurement range is 0-100mΩ, the accuracy is ±1%, and an automatic calibration circuit is integrated to compensate for temperature drift; real-time collection of battery state parameters is realized, and synchronous sampling technology is adopted to ensure data consistency; the edge layer is provided with a feature selection module, a data dimensionality reduction module, a state prediction module and an edge decision module, which performs feature selection, data dimensionality reduction and preliminary state prediction, and realizes local early warning through the edge decision module to reduce the data transmission pressure of the cloud; the cloud layer is provided with a deep learning model, a fault diagnosis engine, a big data analysis platform and a visualization display platform, a deep learning model is constructed for global state analysis, a big data platform is used to mine battery degradation rules, and remote monitoring and model updating are supported; the perception layer, the edge layer and the cloud layer communicate through the data transmission network; the system adopts a dynamic weight adjustment based on the feature selection module optimization of the binary SCA, realizes continuous-discrete feature mapping through the function , fuses SAX time series encoding and weighted covariance matrix calculation through the symbolic PCA dimensionality reduction module, and adopts a cloud-edge collaborative architecture to perform data preprocessing on the edge, and trains and updates the LSTM model in the cloud.
[0046] As shown Figure 2 , it is a software architecture diagram of a battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization, which is provided with an application layer, a middleware layer and a driver layer; the application layer is provided with fault diagnosis, health assessment and user interface; the middleware layer is provided with a communication protocol stack, data processing and CoAP / DTLS; the driver layer is provided with RS485 drive, ADC drive and power management; the specific construction of the software of the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is as follows:
[0047] 1) Binary SCA Feature Selection Algorithm (BSCA-FS), the BSCA-FS algorithm extends the traditional SCA algorithm to the binary space, and realizes the continuous-discrete feature mapping through the Sigmoid function, the principle of which is shown in Figure 3
[0048] * Sigmoid conversion function - maps continuous values to probability space
[0049] * Mathematical principle: σ(x) = 1 / (1 + e^(-k(x-θ)))
[0050] * Function characteristics:
[0051] * - When x tends to positive infinity, σ(x) tends to 1
[0052] * - When x tends to negative infinity, σ(x) tends to 0
[0053] * - At x = θ, σ(x) = 0.5, the curve is centrally symmetric about the point (θ, 0.5)
[0054] * Parameter influence:
[0055] * - The larger the value of k, the more dramatic the change of the function near the center point (the steeper the curve)
[0056] * - The value of θ determines the position of the symmetric center of the function
[0057] * Application scenarios:
[0058] * - Probability conversion in logistic regression
[0059] * - Activation function in neural networks
[0060] * - Conversion of continuous values to binary decisions for feature importance in this system
[0061] float Sigmoid(float x, float k, float theta) {
[0062] / / Calculate the core formula of the Sigmoid function
[0063] / / The exp function calculates the power of the natural constant e
[0064] / / The k parameter controls the slope of the curve, and the θ parameter controls the symmetric center
[0065] return 1.0f / (1.0f + exp(-k * (x - theta)));}
[0066] * Feature Selection Decision Function - Binary Decision Based on Sigmoid Output
[0067] * Decision Logic:
[0068] * - Consider the feature important when Sigmoid(x_cont) > 0.5, return true
[0069] * - Consider the feature unimportant when Sigmoid(x_cont) ≤ 0.5, return false
[0070] * Parameter Adjustment:
[0071] * - Adjusting the value of k controls the sensitivity of the decision:
[0072] * Larger k, steeper decision boundary (more sensitive to small changes)
[0073] * Smaller k, smoother decision boundary (more tolerant)
[0074] * Adjusting the value of theta controls the bias of the decision:
[0075] * Larger theta, requires higher x_cont to be selected
[0076] * Smaller theta, lower x_cont values can also be selected
[0077] * Practical Application:
[0078] * - In a battery monitoring system, used to select key features from 23 raw features
[0079] * - Reduces data dimensionality while preserving the most valuable information for battery health assessment
[0080] bool SelectFeature(float x_cont, float k, float theta) {
[0081] / / Convert continuous feature value to probability in [0,1] range using Sigmoid function
[0082] / / Then compare with threshold 0.5 to generate binary decision result
[0083] / / Threshold 0.5 here is symmetric, adjust comparison threshold for asymmetric decision if needed
[0084] return Sigmoid(x_cont, k, theta) > 0.5f;}
[0085] where k and θ are adjustable parameters to control the shape and threshold of the Sigmoid function. The algorithm iteratively optimizes to find the optimal feature subset that maximizes the fitness function; the programming is as follows:
[0086] * Feature Selection Fitness Function - Evaluates the goodness of a feature subset
[0087] * Design Goal: To minimize the number of features while ensuring the prediction accuracy of the model
[0088] * Optimization Principle: Occam's Razor (If nothing needs to be added, do not add entities)
[0089] * Mathematical Model:
[0090] * Fitness = α × Accuracy - β × (Selected Feature Number / Total Feature Number)
[0091] * Parameter Explanation:
[0092] * - selected_features: Boolean vector indicating whether each feature is selected
[0093] * - accuracy: Prediction accuracy obtained by training the model using the current feature subset
[0094] * - total_features: Total number of original features
[0095] * Hyperparameter Influence:
[0096] * - α: Accuracy weight, the larger α indicates greater emphasis on model performance
[0097] * - β: Feature number penalty coefficient, the larger β indicates stricter punishment for the number of features
[0098] * Balance Strategy:
[0099] * - When α >> β, the model tends to select more features to improve accuracy
[0100] * - When α << β, the model will strictly control the number of features but may sacrifice part of the accuracy
[0101] * Practical Application:
[0102] * - In the battery monitoring system, α is usually set to 0.8-0.9 and β is set to 0.1-0.2
[0103] * - This setup reflects the high requirements of the system on the prediction accuracy, while hoping to reduce the computational complexity
[0104] float FitnessFunction(const vector <bool>& selected_features, floataccuracy, int total_features) {
[0105] / / 1. Count the number of selected features
[0106] int num_selected = count(selected_features.begin(), selected_features.end(), true);
[0107] / / 2. Calculate the feature selection ratio (number of selected features / total number of features)
[0108] float selection_ratio = num_selected / (float)total_features;
[0109] / / 3. Calculate the overall fitness score: accuracy bonus - feature count penalty
[0110] / / Floating-point division is used here to ensure calculation accuracy.
[0111] return alpha * accuracy - beta * selection_ratio;}
[0112] Here, α and β are weighting coefficients that control the importance of model accuracy and feature quantity, respectively. Feature-accuracy balance is achieved by dynamically adjusting the α / β ratio.
[0113] The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization shown below employs... The function is as follows:
[0114]
[0115] Where k and θ are adjustable parameters.
[0116] 2) The symbolic PCA dimensionality reduction algorithm shown combines time series symbolization and weighted covariance matrix calculation. The principle is as follows: Figure 4 As shown, specifically:
[0117] First, the continuous time series is converted into a symbolic sequence to reduce data complexity, as programmed as follows:
[0118] * SAX encoding (Symbolic Aggregate approximation)
[0119] * Function: Converts continuous time series data into discrete symbol sequences, achieving dimensionality reduction and feature extraction
[0120] * Algorithm principle:
[0121] * 1. Divide the value range of the original data into N equal intervals (called symbol table)
[0122] * 2. Map each data point to the corresponding interval and convert it to an interval index
[0123] * 3. Represent the original time series with a discrete symbol sequence, preserving the trend characteristics
[0124] * Parameter explanation:
[0125] * - data: The original floating-point time series to be encoded
[0126] * - alphabet_size: Symbol table size (i.e. the number of intervals divided by the value range)
[0127] * Return value:
[0128] * - Encoded integer symbol sequence, each integer corresponds to an interval in the symbol table
[0129] * Typical application scenarios:
[0130] * - Time series data compression (reduce storage and transmission costs)
[0131] * - Anomaly detection (quickly identify anomalies in symbol patterns)
[0132] * - Similarity query (compare symbol sequences instead of original data)
[0133] * Role in this system:
[0134] * - In battery monitoring, convert continuous voltage / current / temperature data into symbol sequences
[0135] * - Facilitate subsequent pattern recognition and fault prediction with lightweight algorithms
[0136] vector <int>SaxEncode(const vector <float>&data, int alphabet_size) {
[0137] / / 1. Calculate the minimum and maximum values of the data to determine the range of values.
[0138] float min_val = *min_element(data.begin(), data.end());
[0139] float max_val = *max_element(data.begin(), data.end());
[0140] / / 2. Calculate the width of each symbol interval, and divide the value range evenly into alphabet_size intervals.
[0141] float interval = (max_val - min_val) / alphabet_size;
[0142] / / 3. Initialize the vector storing the encoding results
[0143] vector <int>symbols;
[0144] / / 4. Iterate over each value in the raw data, mapping it to the corresponding symbol interval
[0145] for (float val : data) {
[0146] / / Calculate which interval the current value falls into (interval indices start at 0)
[0147] int symbol = static_cast <int>((val - min_val) / interval);
[0148] / / Handle boundary cases: prevent index out of bounds due to floating point precision issues
[0149] / / For example, when val is exactly equal to max_val, it should theoretically belong to the last interval
[0150] symbols.push_back(min(symbol, alphabet_size - 1));}
[0151] / / 5. Return the encoded symbol sequence
[0152] return symbols;}
[0153] Then calculate the weighted covariance matrix to enhance the influence of important features, programming as:
[0154] * Weighted Covariance Matrix Calculation
[0155] * Function: Calculate the covariance matrix with sample weights, enhance the influence of important samples on the result
[0156] * Mathematical principles:
[0157] * Traditional covariance: Cov(X,Y) = Σ(x_i-μ_x)(y_i-μ_y) / (n-1)
[0158] * Weighted covariance: Cov_w(X,Y) = Σw_i(x_i-μ_w_x)(y_i-μ_w_y) / (Σw_i-1)
[0159] * Parameter explanation:
[0160] * - data: input data matrix, each row represents a sample, each column represents a feature
[0161] * - weights: sample weight vector, each element corresponds to the weight of a row in data
[0162] * Return value:
[0163] * - Weighted covariance matrix, dimension [feature number × feature number]
[0164] * Application scenarios:
[0165] * - In time series analysis, recent data is more important than historical data
[0166] * In anomaly detection, the weight of normal samples is reduced, and the weight of abnormal samples is increased.
[0167] * - This system is used for dimensionality reduction of battery data, assigning higher weights to degradation characteristic stages.
[0168] MatrixXf WeightedCovariance(const MatrixXf& data, const VectorXf&weights) {
[0169] / / 1. Weight each sample
[0170] The array() method converts a matrix into an array view that can be operated on element by element.
[0171] / / colwise() means operating by column, ensuring that each feature is multiplied by the weight of the corresponding sample.
[0172] MatrixXf weighted_data = data.array().colwise() * weights.array();
[0173] / / 2. Calculate the weighted eigenvalue vector
[0174] / / colwise().mean() calculates the mean of each column, obtaining the weighted mean of each feature.
[0175] MatrixXf mean = weighted_data.colwise().mean();
[0176] / / 3. Data centralization: Subtract the weighted mean of the corresponding features from each sample.
[0177] / / rowwise() means operating by row, ensuring that all features in each row (for each sample) are subtracted from their corresponding mean.
[0178] MatrixXf centered = weighted_data.rowwise() - mean;
[0179] / / 4. Calculate the weighted covariance matrix
[0180] / / Multiply the centered data matrix by its transpose to obtain the cross product matrix.
[0181] / / Divide by (sample size - 1) for unbiased estimation to obtain the final weighted covariance matrix.
[0182] return (centered.transpose() * centered) / (data.rows() - 1);
[0183] 3) SCA optimization engine, SCA algorithm simulates the characteristics of sine and cosine functions, finds the optimal solution by iteratively updating population positions, position update formula; programming:
[0184] * Sine Cosine Algorithm (SCA) position update logic
[0185] * Algorithm characteristics:
[0186] * - Based on the search mechanism of sine and cosine functions, with global exploration and local development capabilities
[0187] * - r1 parameter controls the dynamic conversion of the algorithm from global search to local search
[0188] * - Random parameters r2, r3, r4 increase the randomness and diversity of the search process
[0189] * Parameter explanation:
[0190] * - pop_size: population size, i.e. the number of solutions
[0191] * - dim: problem dimension, i.e. the number of parameters for each solution
[0192] * - t: current iteration number
[0193] * - max_iter: maximum number of iterations
[0194] * - population: population matrix, each row represents a solution vector
[0195] * - best_position: current global optimal solution found
[0196] * Search strategy:
[0197] * - Alternately guide the search direction through sine and cosine functions, balance global exploration and local development
[0198] * - r1 linearly decays from 2 to 0, controls the search range from large-scale exploration to gradually shift to local fine search
[0199] for (int i = 0; i < pop_size; ++i) {
[0200] for (int j = 0; j < dim; ++j) {
[0201] / / 1. Calculate control parameter r1: linearly decay from 2 to 0 for global to local search transition
[0202] float r1 = 2.0f - 2.0f * t / max_iter;
[0203] / / 2. Generate three random parameters (0-1) to increase randomness in the search process
[0204] float r2 = rand() / (RAND_MAX + 1.0f); / / parameter for sine / cosine function
[0205] float r3 = rand() / (RAND_MAX + 1.0f); / / for adjusting the degree of target influence
[0206] float r4 = rand() / (RAND_MAX + 1.0f); / / decide to use sine or cosine function
[0207] / / 3. Choose to update position using sine or cosine function based on the value of r4
[0208] if (r4 < 0.5f) {
[0209] / / Update using sine function: sine function has periodic oscillation characteristics suitable for global exploration
[0210] population[i](j) += r1 * sin(r2) * abs(r3 * best_position(j) - population[i](j));
[0211] } else {
[0212] / / Update using cosine function: cosine function is 90 degrees out of phase with sine function, providing complementary search direction
[0213] population[i](j) += r1 * cos(r2) * abs(r3 * best_position(j) - population[i](j));
[0214] / / 4. Boundary constraints: ensure each dimension of the solution vector is within [-1, 1]
[0215] This step prevents the algorithm from searching the invalid solution space and improves optimization efficiency.
[0216] population[i](j) = max(min(population[i](j), 1.0f), -1.0f);}}
[0217] The dynamic weight adjustment of the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization, optimized by the feature selection module of binary SCA, is shown in the figure. The specific formula is as follows:
[0218]
[0219] Where: current_iter is the current iteration number;
[0220] `max_iter` represents the maximum number of iterations, achieving a linear decay of the search range.
[0221] 4) Proof of convergence of the SCA algorithm:
[0222] Let the population position vector be... Optimal position The formula is updated based on the sine and cosine algorithms:
[0223]
[0224] As r_1 decreases linearly with the number of iterations, the search radius gradually shrinks; construct the Lyapunov function:
[0225]
[0226] in The global optimal solution is obtained by differentiating with respect to V:
[0227]
[0228] Substitute the position into the update formula and simplify:
[0229]
[0230] because It decays linearly to 0 with the number of iterations, when hour, According to the Krasovskii-LaSalle invariant set principle, the system trajectory converges to the set. That is, the global optimal solution Furthermore, the SCA algorithm is viewed as a Markov chain in a finite state space, whose transition probability matrix satisfies the ergodicity condition. Therefore, the algorithm converges to the global optimum with probability 1.
[0231] The formula of the weighted covariance matrix of the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is:
[0232]
[0233] Wherein: Σ is the original covariance matrix;
[0234] is the feature weight matrix of SCA optimization.
[0235] The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is provided with an edge decision module, and the edge decision module comprises a dynamic threshold adaptive algorithm, and the specific formula is:
[0236]
[0237] Wherein: θ0 is the initial threshold value;
[0238] γ is the temperature compensation coefficient, which is 0.005 / ℃;
[0239] SOH t is the real-time health state, and the environment adaptive fault warning is realized.
[0240] The edge computing unit, communication network, RS485 acquisition circuit and power management circuit of the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization are specifically:
[0241] The edge computing unit is configured as:
[0242] Processor: NVIDIA Jetson Nano (4-core ARM Cortex-A57, 1.43GHz), supporting GPU acceleration, and the computing power reaches 472 GFLOPS;
[0243] Memory: 4GB LPDDR4, configured with memory leakage detection mechanism, and invalid cache is released regularly;
[0244] Storage: 16GB eMMC Flash + microSD expansion slot (supporting 128GB), adopting FAT32 / EXT4 dual file system;
[0245] Communication interface:
[0246] 1 Giga Ethernet interface (supporting PoE power supply);
[0247] 4 USB 3.0 interfaces (compatible with USB-C adapter);
[0248] 2 RS485 interfaces (isolated, baud rate 1200-115200bps adaptive);
[0249] 1 LoRaWAN module interface (supports 868 / 915MHz frequency band;
[0250] Communication network: set to:
[0251] Fieldbus: RS485, Modbus RTU protocol, transmission distance ≤1200 meters, shielded twisted pair ground design anti-interference;
[0252] Wide area network: LoRaWAN Class C, uplink rate 50kbps, transmission distance ≥5km, support ADR, adaptive data rate;
[0253] Backup communication: 4G / 5G module (supports NSA / SA dual mode), built-in SIM card hot plug protection circuit;
[0254] RS485 acquisition circuit: programmed to:
[0255] * MAX3485 RS485 transceiver driver code
[0256] * Hardware connection description:
[0257] * - RS485_DE: MAX3485 driver enable pin (high level effective)
[0258] * - USART: serial communication interface connected with MCU
[0259] * Communication mode:
[0260] * - Half-duplex communication, can only send or receive data at the same time
[0261] * - Control the sending / receiving mode switching through the DE pin
[0262] * Initialize RS485 communication
[0263] * Parameters:
[0264] * - baudrate: baud rate, such as 9600, 115200, etc.
[0265] * Initialization process:
[0266] * 1. Configure USART communication parameters (baud rate, data bits, stop bits, etc.)
[0267] * 2. Set DE pin to output mode
[0268] * 3. Default to receive mode (DE=LOW)
[0269] void RS485_Init(uint32_t baudrate) {
[0270] / / Configure USART communication parameters (baud rate, data bits, stop bits, etc.)
[0271] USART_Config(baudrate);
[0272] / / Set RS485_DE pin to output mode for controlling transmit / receive mode switching
[0273] GPIO_SetDir(RS485_DE, OUTPUT);
[0274] / / Default to receive mode (DE=LOW)
[0275] / / When DE=LOW, MAX3485 receiver is enabled and driver is disabled
[0276] GPIO_Write(RS485_DE, LOW);}
[0277] * Transmit data over RS485
[0278] * Parameters:
[0279] * - data: pointer to data buffer to be transmitted
[0280] * - len: length of data to be transmitted (in bytes)
[0281] * Transmission process:
[0282] * 1. Set DE pin high to enable driver
[0283] * 2. Transmit data over USART
[0284] * 3. Wait for data transmission to complete
[0285] * 4. Set DE pin low to disable driver and switch back to receive mode
[0286] void RS485_Transmit(const uint8_t* data, uint16_t len) {
[0287] / / Set DE pin high to enable the driver (MAX3485 enters transmit mode)
[0288] / / Receiver is disabled when DE=HIGH, driver is enabled
[0289] GPIO_Write(RS485_DE, HIGH);
[0290] / / Send data through USART
[0291] USART_Send(data, len);
[0292] / / Delay to wait for data transmission to complete
[0293] / / This delay ensures that all data bits are transmitted through the RS485 bus
[0294] / / Delay time needs to be adjusted according to baud rate and data length
[0295] delay_ms(1);
[0296] / / After sending, set DE pin low to disable the driver and switch back to receive mode
[0297] / / This step is crucial to ensure that the receiving ability is restored as soon as possible after transmission is completed
[0298] GPIO_Write(RS485_DE, LOW);}
[0299] The circuit uses MAX3485 chip to realize RS485 communication, with the following characteristics:
[0300] 1)Supports half-duplex communication, with a maximum transmission rate of 10Mbps;
[0301] 2)R1 is a 10kΩ pull-up resistor, ensuring that the bus remains high when idle;
[0302] 3)R2 and R3 are 120Ω terminal matching resistors, which eliminate signal reflection;
[0303] 4)Opto-isolator circuit (not shown), isolation voltage ≥2.5kV, improves anti-interference ability;
[0304] Power management circuit: programmed as:
[0305] * Power management state machine
[0306] * Function: Automatically switch power supply mode according to main power and backup battery status
[0307] * State description:
[0308] * - STATE_MAIN_POWER: Main power supply state (normal voltage)
[0309] * - STATE_BACKUP_POWER: Backup power supply state (main power voltage below threshold)
[0310] * - STATE_SHUTDOWN: System shutdown state (backup battery low)
[0311] enum PowerState {
[0312] STATE_MAIN_POWER, / / Main power supply
[0313] STATE_BACKUP_POWER, / / Backup power supply
[0314] STATE_SHUTDOWN / / System shutdown};
[0315] * Check current power state and decide if a switch is needed
[0316] * Detection logic:
[0317] * 1. First, check main power voltage
[0318] * 2. If main power voltage is below threshold (9.0V), switch to backup power
[0319] * 3. If backup battery is low, enter shutdown state
[0320] * Return value:
[0321] * - Current power state that should be in
[0322] PowerState CheckPower() {
[0323] / / Read main power voltage value (sampled through ADC)
[0324] float main_voltage = ADC_Read(MAIN_VOLTAGE_CHANNEL);
[0325] / / State 1: Main power voltage is below threshold (9.0V), switch to backup power
[0326] if (main_voltage < 9.0f) {
[0327] return STATE_BACKUP_POWER;}
[0328] / / State 2: Backup battery low, enter shutdown state
[0329] else if (backup_battery_low) {
[0330] return STATE_SHUTDOWN;}
[0331] / / State 3: Main power voltage normal, use main power supply
[0332] return STATE_MAIN_POWER;}
[0333] Power management circuit functions:
[0334] 1) Support wide voltage input (9-36V), suitable for lead-acid / lithium battery pack direct power supply;
[0335] 2) Integrated high efficiency DC-DC converter (MP1584, conversion efficiency ≥94%), with over-temperature protection;
[0336] 3) Real-time monitoring of main power and backup battery power, supporting seamless switching (switching time < 10ms);
[0337] 4) Overvoltage (> 36V), overcurrent (> 5A), short circuit protection function, automatically cut off input when fault occurs;
[0338] The BSCA-FS feature selector based on BSCA-SPCA collaborative optimization of the battery online monitoring and fault prediction system is implemented in detail as follows:
[0339] * bsca_fs.h - Binary Sine Cosine Algorithm feature selection library
[0340] * Algorithm characteristics:
[0341] * - Binary version based on Sine Cosine Optimization Algorithm (SCA)
[0342] * - Optimize feature subsets through continuous space search and binary conversion
[0343] * - Balance the number of features and the accuracy of the model in multi-objective optimization
[0344] #ifndef BSCA_FS_H
[0345] #define BSCA_FS_H
[0346] #include <vector> / / for storing feature selection results
[0347] #include <cmath> / / Math library, provides exp function needed for sigmoid calculation
[0348] #include <random> / / Random number generator
[0349] #include <eigen dense> / / Matrix library for handling data and labels
[0350] using namespace std; / / Simplify Standard Library namespace usage
[0351] using namespace Eigen; / / Simplify Eigen library namespace usage
[0352] * BSCAOptimizer - Binary Sine Cosine Algorithm feature selection optimizer
[0353] * Core functionalities:
[0354] * - Selects optimal feature subset from high-dimensional feature space
[0355] * - Balances model accuracy and feature number through adaptive weights
[0356] * - Maps continuous search space to binary decision space using Sigmoid function
[0357] class BSCAOptimizer {
[0358] public:
[0359] * Constructor - Initializes optimizer parameters
[0360] * Parameters:
[0361] * - pop_size: Population size (number of solutions)
[0362] * - max_iter: Maximum number of iterations
[0363] * - dim: Feature dimension (problem dimension)
[0364] * - alpha: Accuracy weight (between 0 and 1)
[0365] * - beta: Feature number penalty coefficient (between 0 and 1)
[0366] * - k: Sigmoid function slope parameter
[0367] * - theta: Sigmoid function center point parameter
[0368] BSCAOptimizer(int pop_size, int max_iter, int dim,
[0369] float alpha = 0.9, float beta = 0.1,
[0370] float k = 1.0, float theta = 0.0);
[0371] * Perform feature selection optimization
[0372] * Parameters:
[0373] * - data: Training dataset, each row represents a sample, each column represents a feature
[0374] * - labels: Corresponding label vector
[0375] * Return value:
[0376] * - Binary mask of the optimal feature subset, true means select the feature, false means not select
[0377] vector <bool>optimize(const MatrixXf& data, const VectorXf&labels);
[0378] private:
[0379] * Sigmoid transformation function - maps continuous values to the interval [0,1]
[0380] * Parameters:
[0381] * - x: input continuous value
[0382] * Return value:
[0383] * - Sigmoid function output value
[0384] float sigmoid(float x) const;
[0385] * Calculate model accuracy - evaluate model performance using selected feature subset
[0386] * Parameters:
[0387] * - data: original dataset
[0388] * - labels: labels vector
[0389] * - selected_features: feature selection mask
[0390] * Return value:
[0391] * - Model accuracy on selected feature subset
[0392] * /
[0393] float calculate_accuracy(const MatrixXf& data, const VectorXf&labels,
[0394] const vector <bool>& selected_features);
[0395] / / Optimizer internal parameters
[0396] int pop_size; / / Population size
[0397] int max_iter; / / Maximum number of iterations
[0398] int dim; / / Feature dimension
[0399] / / Fitness function parameters
[0400] float alpha; / / Precision weight
[0401] float beta; / / Feature quantity penalty coefficient
[0402] / / Sigmoid function parameters
[0403] float k; / / Slope control parameter
[0404] float theta; / / Center control parameter
[0405] #endif / / BSCA_FS_H
[0406] * bsca_fs.cpp - Binary Sine Cosine Algorithm Feature Selection Optimizer Implementation
[0407] * Core flow:
[0408] * 1. Initialize population: randomly generate candidate feature subsets
[0409] * 2. Iterative optimization: update solution vectors using the Sine Cosine Algorithm
[0410] * 3. Binary conversion: map continuous solutions to binary feature selection using the Sigmoid function
[0411] * 4. Fitness evaluation: calculate comprehensive scores based on precision and feature quantity
[0412] #include "bsca_fs.h"
[0413] * Constructor - initialize optimizer parameters
[0414] * Parameters:
[0415] * - pop_size: population size (number of solutions)
[0416] * - max_iter: maximum number of iterations
[0417] * - dim: feature dimension (problem dimension)
[0418] * - alpha: accuracy weight (between 0 and 1)
[0419] * - beta: feature number penalty coefficient (between 0 and 1)
[0420] * - k: Sigmoid function slope parameter
[0421] * - theta: Sigmoid function center point parameter
[0422] BSCAOptimizer::BSCAOptimizer(int pop_size, int max_iter, int dim,
[0423] float alpha, float beta, float k, float theta)
[0424] : pop_size(pop_size), max_iter(max_iter), dim(dim),
[0425] alpha(alpha), beta(beta), k(k), theta(theta) {}
[0426] * Execute feature selection optimization
[0427] * Parameters:
[0428] * - data: training dataset, each row represents a sample, each column represents a feature
[0429] * - labels: corresponding label vector
[0430] * Return value:
[0431] * - binary mask of the optimal feature subset, true means select the feature, false means not select
[0432] vector <bool>BSCAOptimizer::optimize(const MatrixXf& data, const VectorXf& labels) {
[0433] / / Initialize random number generator
[0434] random_device rd;
[0435] mt19937 gen(rd());
[0436] uniform_real_distribution<> dis(0.0, 1.0);
[0437] / / Initialize population: each solution vector represents a candidate feature subset
[0438] vector <vectorxf>population(pop_size, VectorXf::Random(dim));
[0439] vector <float>fitness(pop_size, 0.0f);
[0440] / / Initialize global best solution
[0441] VectorXf best_position = VectorXf::Random(dim);
[0442] float best_fitness = -numeric_limits <float>::max();
[0443] / / 1. Population initialization and evaluation
[0444] for (int i = 0; i < pop_size; ++i) {
[0445] / / Convert continuous solution vector to binary feature selection
[0446] vector <bool>selected(dim);
[0447] for (int j = 0; j < dim; ++j) {
[0448] / / Map continuous values to [0,1] interval and binarize by Sigmoid function
[0449] selected[j] = sigmoid(population[i](j)) > 0.5f;}
[0450] / / Calculate fitness value: accuracy x alpha - feature ratio x beta
[0451] fitness[i] = alpha * calculate_accuracy(data, labels,selected)
[0452] - beta * count(selected.begin(), selected.end(),true) / dim;
[0453] / / Update global best solution
[0454] if (fitness[i] > best_fitness) {
[0455] best_fitness = fitness[i];
[0456] best_position = population[i];}}
[0457] / / 2. Iterative optimization process
[0458] for (int t = 0; t < max_iter; ++t) {
[0459] / / Calculate control parameter r1: linearly decay from 2 to 0, achieve global to local search transition
[0460] float r1 = 2.0f - 2.0f * t / max_iter;
[0461] for (int i = 0; i < pop_size; ++i) {
[0462] / / Update solution vector position
[0463] for (int j = 0; j < dim; ++j) {
[0464] / / Generate random parameter control search direction and step size
[0465] float r2 = dis(gen), r3 = dis(gen), r4 = dis(gen);
[0466] / / Update position based on sine or cosine function
[0467] if (r4 < 0.5f) {
[0468] / / Sine function update: provides periodic search pattern
[0469] population[i](j) += r1 * sin(r2) * abs(r3 * best_position(j) - population[i](j));
[0470] } else {
[0471] / / Cosine function update: complementary to sine function, expands search space
[0472] population[i](j) += r1 * cos(r2) * abs(r3 * best_position(j) - population[i](j));}
[0473] / / Boundary constraint: ensures solution vector is within [-1,1] range
[0474] population[i](j) = max(min(population[i](j), 1.0f), -1.0f);}
[0475] / / Evaluate fitness of new solution
[0476] vector <bool>selected(dim);
[0477] for (int j = 0; j < dim; ++j) {
[0478] selected[j] = sigmoid(population[i](j)) > 0.5f;}
[0479] float new_fitness = alpha * calculate_accuracy(data,labels, selected)
[0480] - beta * count(selected.begin(),selected.end(), true) / dim;
[0481] / / Update the global optimal solution
[0482] if (new_fitness > best_fitness) {
[0483] best_fitness = new_fitness;
[0484] best_position = population[i];}}}
[0485] / / Return the final selected feature subset
[0486] vector <bool>final_selection(dim);
[0487] for (int j = 0; j < dim; ++j) {
[0488] final_selection[j] = sigmoid(best_position(j)) > 0.5f;}
[0489] return final_selection;}
[0490] * Calculate model accuracy - evaluate model performance using selected feature subset
[0491] * Parameters:
[0492] * - data: original dataset
[0493] * - labels: labels vector
[0494] * - selected_features: feature selection mask
[0495] * Return value:
[0496] * - accuracy of the model on the selected feature subset
[0497] float BSCAOptimizer::calculate_accuracy(const MatrixXf& data, constVectorXf& labels,
[0498] const vector <bool>& selected_features) { / / Count the number of selected features
[0499] int num_selected = count(selected_features.begin(), selected_features.end(), true);
[0500] / / Return 0 if no features are selected
[0501] if (num_selected == 0) return 0.0f;
[0502] / / Extract the selected feature columns
[0503] MatrixXf reduced_data(data.rows(), num_selected);
[0504] int col_idx = 0;
[0505] for (int i = 0; i < selected_features.size(); ++i) {
[0506] if (selected_features[i]) {
[0507] reduced_data.col(col_idx++) = data.col(i);}}
[0508] / / Evaluate the performance of the feature subset using ridge regression
[0509] / / Add a bias term
[0510] MatrixXf X = MatrixXf::Ones(reduced_data.rows(), reduced_data.cols() + 1);
[0511] X.rightCols(reduced_data.cols()) = reduced_data;
[0512] / / Solve for the weight vector using ridge regression (add L2 regularization to prevent overfitting)
[0513] VectorXf w = (X.transpose() * X + 1e-4 * MatrixXf::Identity(X.cols(), X.cols())).ldlt().solve(X.transpose() * labels);
[0514] / / Predict and compute mean squared error
[0515] VectorXf predictions = X * w;
[0516] float mse = (predictions - labels).squaredNorm() / labels.size();
[0517] / / Convert error to accuracy metric (1 - MSE)
[0518] return 1.0f - mse;}
[0519] The CoAP over DTLS secure communication programming of the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is as follows:
[0520] / / coap_dtls.h
[0521] / / Define the CoAP (Constrained Application Protocol) protocol header structure, used for parsing and constructing CoAP messages
[0522] / / CoAP is an application layer protocol designed for resource-constrained IoT devices
[0523] typedef struct {
[0524] / / version field: 2 bits, indicating the CoAP protocol version, currently commonly used version is 1
[0525] uint8_t version : 2;
[0526] / / type field: 2 bits, indicating the CoAP message type, such as acknowledgement message, non-acknowledgement message, etc.
[0527] uint8_t type : 2;
[0528] / / token_length field: 4 bits, specifying the length of Token in the message, Token is used to associate request and response
[0529] uint8_t token_length : 4;
[0530] / / code field: 8 bits, used to represent CoAP request methods (such as GET, POST, etc.) or response status codes
[0531] uint8_t code;
[0532] / / message_id field: 16 bits, uniquely identifies a CoAP message, used for message matching and retransmission mechanisms
[0533] uint16_t message_id;
[0534] } coap_header_t;
[0535] / / Security communication initialization function, used to initialize the DTLS (Datagram Transport Layer Security) based CoAP secure communication environment
[0536] / / Parameter ctx: pointer to the CoAP context structure, used to store CoAP communication related configuration and state information
[0537] / / Parameter psk_id: identification of the Pre-Shared Key (PSK), used for DTLS authentication
[0538] / / Parameter psk_key: Pre-Shared Key, used for encryption and decryption of communication data
[0539] int CoapDtls_Init(CoapContext* ctx, const char* psk_id, const char*psk_key) {
[0540] / / Initialize OpenSSL library, load SSL related library functions and configurations
[0541] SSL_library_init();
[0542] / / Load all encryption algorithms and message digest algorithms supported by OpenSSL
[0543] OpenSSL_add_all_algorithms();
[0544] / / Create a DTLS client method SSL context object, used to configure DTLS communication parameters
[0545] SSL_CTX* ssl_ctx = SSL_CTX_new(DTLS_client_method());
[0546] / / Set the pre-shared key callback function for the DTLS client to obtain the pre-shared key during the authentication process
[0547] SSL_CTX_set_psk_client_callback(ssl_ctx, PskCallback);
[0548] / / Store the created SSL context object into the CoAP context structure for subsequent communication
[0549] ctx->ssl_ctx = ssl_ctx;
[0550] / / Other initializations... Omitted other unshown initialization operations
[0551] return 0;}
[0552] / / Data encryption transmission function, used to send CoAP data through a DTLS-based secure channel
[0553] / / Parameter ctx: Pointer to the CoAP context structure, containing the initialized SSL context and other information
[0554] / / Parameter payload: Data content to be sent, i.e., the payload part of the CoAP message
[0555] / / Parameter len: Length of the data to be sent (number of bytes)
[0556] int CoapDtls_Send(CoapContext* ctx, const uint8_t* payload, uint16_t len) {
[0557] / / Use the SSL library's write function to send data through the established SSL connection, implementing encrypted data transmission
[0558] SSL_write(ctx->ssl, payload, len);
[0559] return 0;}
[0560] The shown battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization has the characteristics of reducing feature redundancy and dimension disaster of multi-source heterogeneous sensor data, early identification of battery degradation trend under complex working conditions, and low delay processing demand in edge computing scene.
[0561] The symbolic PCA dimension reduction module of the shown battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization fuses the SAX time series encoding alphabet size which is dynamically adjusted according to data distribution, and the specific method is:
[0562] Calculate the standard deviation σ of the data; determine the alphabet size m according to σ;
[0563]
[0564] Wherein: ⌈⌉ represents upward rounding, realizing adaptive symbolic precision control.
[0565] The shown battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization has the following characteristics after testing: 1) feature stability: BSCA-FS algorithm ensures the consistency of key features (voltage, internal resistance, cycle number) under different working conditions through elite reservation strategy, and the coincidence degree is improved by 7% compared with RF-FS;
[0566] 2) Cross-type generalization: the symbolic processing of S-PCA algorithm effectively eliminates the influence of battery type difference, and the prediction error of lithium electronic set is reduced by 40% compared with traditional methods;
[0567] 3) Anti-noise ability: the weighted covariance matrix enhances the robustness of the core features, and the retention rate reaches 89% under 5% noise, which is suitable for complex industrial environments;
[0568] 4) Communication success rate: LoRaWAN reaches 99.8% in suburban environment, and 5G backup channel reaches 99.5% in dense urban area;
[0569] 5) Fault warning case: a base station battery group detected abnormal internal resistance growth rate (>8% / month) 60 days in advance at the 200th cycle, and the actual capacity decreased by 25% after 3 months;
[0570] 6) Energy consumption optimization: dynamic voltage adjustment reduces the power consumption of the device to 3.5W under low load, prolonging the endurance by 40%.
[0571] The above is only a preferred embodiment of the present application, and is not intended to limit the present application in any other form, and any modification or equivalent change made according to the technical essence of the present application still belongs to the scope of the present application.< / bool> < / bool> < / bool> < / bool> < / float> < / float> < / vectorxf> < / bool> < / bool> < / bool> < / eigen> < / random> < / cmath> < / vector> < / int> < / int> < / float> < / int> < / bool>
Claims
1. A battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization, characterized in that: The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is configured with a sensing layer, an edge layer, a cloud layer, and a data transmission network. The sensing layer deploys voltage sensor arrays, current sensor arrays, temperature sensor arrays, and an internal resistance measurement module to achieve real-time acquisition of battery state parameters, employing synchronous sampling technology to ensure data consistency. The edge layer includes a feature selection module, a data dimensionality reduction module, a state prediction module, and an edge decision module. It performs feature selection, data dimensionality reduction, and preliminary state prediction, and the edge decision module provides local early warning, reducing the data transmission pressure on the cloud. The cloud layer includes a deep learning model, a fault diagnosis engine, a big data analysis platform, and a visualization platform. It constructs a deep learning model for global state analysis, utilizes the big data platform to uncover battery degradation patterns, and supports remote monitoring and model updates. The sensing layer, edge layer, and cloud layer communicate via the data transmission network. The system uses dynamic weight adjustment optimized by the feature selection module based on binary SCA. The function implements continuous-discrete feature mapping. It integrates SAX time series encoding and weighted covariance matrix calculation through a symbolic PCA dimensionality reduction module. It adopts a cloud-edge collaborative architecture to perform data preprocessing at the edge and LSTM model training and updating in the cloud.
2. The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization according to claim 1, characterized in that: The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization uses a feature selection module optimized by binary SCA for dynamic weight adjustment, the specific formula of which is: ; Where: current_iter is the current iteration number; `max_iter` represents the maximum number of iterations, achieving a linear decay of the search range.
3. The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization according to claim 1, characterized in that: The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization adopts... The function is as follows: ; Where k and θ are adjustable parameters.
4. The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization according to claim 1, characterized in that: The symbolic PCA dimensionality reduction module of the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization integrates SAX time series encoding alphabet size, which is dynamically adjusted according to data distribution. The specific method is as follows: Calculate the standard deviation σ of the data; determine the alphabet size m based on σ; ; Wherein: ⌈⌉ represents rounding up, achieving adaptive symbolic precision control.
5. The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization according to claim 1, characterized in that: The weighted covariance matrix formula of the battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is: ; Where: Σ is the original covariance matrix; The feature weight matrix optimized for SCA.
6. The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization according to claim 1, characterized in that: The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization is equipped with an edge decision module, which includes a dynamic threshold adaptive algorithm, the specific formula of which is: ; Where: θ0 is the initial threshold; γ is the temperature compensation coefficient, which is 0.005 / ℃; SOH t To provide real-time health status and enable environmentally adaptive fault early warning.
7. The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization according to claim 1, characterized in that: The battery online monitoring and fault prediction system based on BSCA-SPCA collaborative optimization has the functions of reducing feature redundancy and dimensionality curse of multi-source heterogeneous sensor data, early identification of battery degradation trends under complex working conditions, and low latency processing requirements in edge computing scenarios.