[Paper Review] Characterization of Neural Networks Automatically Mapped on Automotive-grade Microcontrollers
This paper presents a framework for deploying pre-trained neural networks on automotive-grade microcontrollers for real-time edge inference, demonstrating effectiveness in CAN bus intrusion detection and Li-ion battery residual capacity estimation. The models achieve sub-5ms inference times on SPC58NH MCU with under 36KB Flash and 3KB RAM, meeting automotive safety and performance constraints.
Nowadays, Neural Networks represent a major expectation for the realization of powerful Deep Learning algorithms, which can determine several physical systems' behaviors and operations. Computational resources required for model, training, and running are large, especially when related to the amount of data that Neural Networks typically need to generalize. The latest TinyML technologies allow integrating pre-trained models on embedded systems, allowing making computing at the edge faster, cheaper, and safer. Although these technologies originated in the consumer and industrial worlds, many sectors can greatly benefit from them, such as the automotive industry. In this paper, we present a framework for implementing Neural Network-based models on a family of automotive Microcontrollers, showing their efficiency in two case studies applied to vehicles: intrusion detection on the Controller Area Network bus and residual capacity estimation in Lithium-Ion batteries, widely used in Electric Vehicles.
Motivation & Objective
- To enable on-device inference of pre-trained neural networks on resource-constrained automotive microcontrollers.
- To address the challenge of deploying complex neural networks in safety-critical automotive systems with limited memory and processing power.
- To validate the feasibility and efficiency of TinyML for two key automotive applications: CAN bus intrusion detection and Li-ion battery state-of-health estimation.
- To profile model complexity in terms of Flash, RAM, and inference time across multiple automotive MCUs.
Proposed method
- A hybrid CNN-LSTM architecture was designed for time-series data processing, using 1D convolutional layers, max pooling, and LSTM layers with TanH activation.
- The LSTM Autoencoder was used for anomaly detection in CAN bus traffic, with input normalized using MinMaxScaler and trained using Adam optimizer and MSE loss.
- The CNN-LSTM model for battery capacity estimation used 20 time steps and 4 features, with a single dense output layer and MAE as the evaluation metric.
- Pre-trained models were mapped automatically onto three automotive MCUs (SPC584B, SPC58EC, SPC58NH) using the SPC5-STUDIO AI plug-in.
- Model complexity was profiled by measuring Flash memory, RAM usage, and average inference time across all MCUs.
- Each model was trained 10 times with different random seeds to ensure robustness, and validation achieved 100% cross-accuracy using the original model's outputs as ground truth.
Experimental results
Research questions
- RQ1Can pre-trained neural networks be effectively deployed on automotive-grade microcontrollers for real-time edge inference in safety-critical applications?
- RQ2What is the computational footprint (Flash, RAM, inference time) of neural network models when mapped onto automotive MCUs?
- RQ3How do different MCU clock frequencies affect inference performance in embedded neural network deployments?
- RQ4Can neural networks achieve acceptable accuracy for CAN bus intrusion detection and Li-ion battery capacity estimation within strict memory and latency constraints?
- RQ5How does model architecture (e.g., LSTM Autoencoder vs. CNN-LSTM) impact resource utilization and inference efficiency on automotive MCUs?
Key findings
- The LSTM Autoencoder achieved an average inference time of 6ms on the SPC58NH MCU, with 24.92KB Flash and 4.05KB RAM usage.
- The CNN-LSTM model required 35.13KB Flash and 2.25KB RAM, achieving an average inference time of 3.86ms on the SPC58NH MCU.
- The CNN-LSTM model achieved a mean absolute error (MAE) of 0.0434 in residual capacity estimation, below the acceptable EV threshold of ±0.05.
- The LSTM layer was the most resource-intensive component in both models, consuming the highest percentage of Flash, RAM, and execution time.
- Inference time decreased linearly with increasing MCU clock frequency, with the SPC58NH achieving the fastest performance across both models.
- Both models achieved 100% cross-accuracy during validation, confirming the fidelity of the C-model mapping process.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.