The "remaining service life" (RUL) prediction of lithium batteries is an important part of battery health management,
and NASA's disclosed battery aging data provides key support for R&D.
Traditional methods rely on manual analysis, and their efficiency and accuracy are very low;
the existing embedded platforms have limited computing power and are difficult to achieve real-time prediction,
which makes it difficult for users to meet the needs of accurate and lightweight solutions.
Feilin embedded combines AI algorithms (CNN+LSTM fusion) with RK3588 core board,
successfully breaking through these limitations and bringing efficient and accurate lithium battery life prediction.
This article will give a brief introduction to this plan.
1:Hardware platform: FET3588-C core board
The Feilin embedded FET3588-C core board is a high-performance embedded platform designed and developed based on the flagship processor of RK3588 of Rockchip.
It is equipped with a powerful 6TOPS computing power NPU (neural processing unit).
It is specially optimized for AI inference, with low power consumption and strong computing power,
and can be used in industrial and consumer electronic devices.
AI algorithm module: combines CNN extraction features, LSTM capture trends, and predicts capacity after fusion.
Deployment module: Optimize the model to .rknn format through the RKNN tool to ensure efficient operation on the RK3588 core board.
Data processing module: supports extracting samples from NASA data sets and generating prediction results.
2,How an algorithm predicts battery life
Algorithm implementation
CNN extraction features: Convolutional neural network (CNN) processes the battery's voltage,
current, temperature, etc. in 5 time steps, and extracts local modes during the charging process (such as the inflection point of the voltage curve).
Through multiple convolution kernels and ReLU activations, eigenvectors are generated to capture subtle changes in battery operating conditions.
LSTM capture trends: Long and short-term memory networks (LSTMs) analyze capacity sequences, and use input gates,
forget gates and output gate mechanisms to effectively memorize and model the long-term attenuation trend of battery capacity (such as the aging process from 2.0Ah to 1.4Ah).
Use the following formula to dynamically update the hidden state to ensure long-term dependency modeling.
ht= ot·ta h(Ct)
Fusion and regression: The local features extracted by CNN are spliced and fused with the long-term trend captured by LSTM, i
nput them to the full connection layer for regression prediction, and output the normalized battery capacity value.
The training process uses the MSE loss function, the Adam optimizer, and adds a Dropout layer to prevent overfitting.
The final prediction results are reverse normalized to the actual Ah capacity value through MinMaxScaler.
RUL calculation: Based on the predicted capacity value, the remaining service life (RUL) can be calculated
when the capacity decays to a preset threshold (usually 80% of the initial capacity, such as 1.6Ah).
The scheme also introduces an exponential attenuation model for fitting optimization,
and further refines the RUL prediction results through parameter λ. The exponential decay model is as follows:
Capacity(n)=C ·e-*n
Deployed on the RK3588 core board
Model conversion: Export Keras model to ONNX, and then convert it to .rknn format using the RKNN toolkit,
supporting the NPU of RK3588. FP16 quantization reduces the amount of calculation,
and single-sample inference is only 0.55 milliseconds.
Inference optimization: RKNNLite API sample-by-sample reasoning, input transposed to NCHW format (e.g. [1,1,5]).
It can be optimized for batch reasoning to reduce cycle overhead.
INT8 quantization further improves efficiency, but requires verification of accuracy.
3,Effect display
The above figure clearly shows the actual prediction effect of the solution:
Blue line: The real battery capacity decay curve.
Orange line: The battery capacity curve predicted by the AI model.
X-axis: Sample index (represents time/loop times).
Y-axis: Battery capacity (Ah).
It can be seen from the figure that the prediction curve (orange) and the real curve (blue) are basically consistent,
fully demonstrating the accuracy of the AI prediction model.
4,Summarize
Feilin embedded deeply combines CNN+LSTM fusion AI algorithm with the high-performance RK3588 core board,
accurately solving the accuracy and efficiency problems of lithium battery residual service life (RUL) prediction.
On the FET3588-C core board, the algorithm takes only 0.55ms to achieve single-sample inference with FP16 quantization,
taking into account high accuracy (MAPE 3.3%) and low power consumption, INT8 quantization can further optimize efficiency.
This solution provides lithium battery management system (BMS) with powerful,
reliable and floor-based lightweight AI prediction capabilities, significantly improving the safety and economy of battery use,
and has broad application prospects in electric vehicles, energy storage systems, portable equipment and other fields.