The Artificial Intelligence Revolution in Automotive Control Units: A Technical Deep Dive into Bosch’s MILEA Solution

Bosch's MILEA AI-powered automotive control

Introduction: AI’s Expanding Role in Automotive Systems

While autonomous driving and voice control typically dominate discussions of automotive AI applications, three additional use cases have emerged as particularly valuable in production vehicles:

  1. Diagnostic functions for early anomaly detection
  2. Virtual sensors that reduce hardware requirements and capture data at physically inaccessible points
  3. Detection and compensation of aging effects in vehicle components

AI becomes essential when physical modeling reaches its limits, which happens when:

  • Physical models cannot account for all relevant influences
  • Development of comprehensive physical models becomes prohibitively time-consuming
  • Complex systems require solutions that adapt based on observed data

By leveraging AI, automotive engineers can develop solutions that meet increasingly stringent legal requirements while reducing development cycles and costs.

Technical Challenges of Embedded AI Implementation

The automotive industry primarily focuses on Machine Learning (ML) methods, especially supervised learning techniques. While automated ML tools make model development more accessible, two critical requirements remain:

  1. ML expertise: Developers need foundational knowledge of machine learning principles
  2. Data quality and availability: ML models rely on comprehensive, high-quality training data

However, the embedded environment of automotive ECUs presents several significant technical hurdles:

  • Memory constraints: Typical ECUs have limited RAM and flash storage
  • Processing limitations: Many ECUs use microcontrollers with modest computational capabilities
  • Deterministic execution requirements: Safety-critical applications must guarantee response times
  • Fixed-point arithmetic considerations: Some ECUs lack floating-point units, requiring specialized implementations
  • Functional safety compliance: ML models must meet ISO 26262 and ASIL requirements
  • MISRA code compliance: Generated code must adhere to automotive software standards

Bosch’s MILEA: Technical Architecture and Implementation

MILEA (Machine Intelligence Library for Embedded Applications) is Bosch’s solution for embedded ML algorithms. Its technical architecture addresses the constraints of automotive ECUs while providing the flexibility needed for diverse ML applications.

Core Technical Components

The MILEA toolchain consists of four main technical components:

  1. Training interface layer: Connects to established ML frameworks (Etas Ascmo, Keras, TensorFlow, Scikit-Learn)
  2. Model conversion tool: Transforms trained models into an optimized binary format
  3. Runtime library: Executes models on the ECU with minimal overhead
  4. Validation framework: Ensures consistent model behavior between training and deployment

MILEA’s Binary Exchange Format

The MILEA binary format is a crucial innovation that:

  • Encrypts network topology and weights for intellectual property protection
  • Uses a platform-independent representation for cross-ECU compatibility
  • Employs efficient compression techniques to minimize memory footprint
  • Separates model parameters from code, enabling updates without software reflashing
  • Supports multiple model types without changing the underlying ECU software

This approach allows ML models to be treated similar to calibration parameters rather than embedded code, dramatically simplifying the update and validation process.

Audi’s Virtual Soot Sensor: Technical Implementation Details

Audi’s implementation of a virtual soot sensor using MILEA provides a concrete technical case study. The sensor determines soot concentration in exhaust gas before the diesel particulate filter (DPF) to optimize regeneration timing and ensure emissions compliance.

Traditional Approach Limitations

The conventional non-AI approach required:

  • Complex physical models with multiple correction functions
  • Sequential parameterization with numerous recursive loops
  • Extensive calibration time for each engine variant
  • Difficulty accounting for all dynamic effects

ML Model Architecture and Implementation

Audi’s MILEA-based solution employed:

  1. Data collection: 80 driving cycle measurements with various speed profiles from a dynamic engine test bench
    • Each measurement captured full WLTC (Worldwide harmonized Light vehicles Test Cycle) data
    • An AVL Micro Soot Sensor provided ground truth measurements
    • Data sampling rate: high-frequency acquisition matching ECU timing
  2. Neural network architecture:
    • Multiple Gated Recurrent Units (GRUs) to capture temporal dynamics
    • GRUs were selected over LSTMs for their lower computational requirements
    • The network maintained time-series history while requiring fewer parameters than alternative RNN approaches
  3. Input variables:
    • Engine speed (rpm)
    • Injection quantities (mg/stroke) with separate inputs for main and post injections
    • Intake and exhaust temperatures (°C)
    • Lambda air/fuel ratio (dimensionless)
    • Additional engine operating parameters available in the ECU
  4. Technical specifications:
    • Model size: 20 kilobytes in binary format
    • Runtime: 180 μs for complete execution
    • Memory requirements: Compatible with production ECUs
    • Execution frequency: Synchronized with engine control cycle

The MILEA Development Process: Technical Workflow

The ML development process with MILEA follows four technical stages that form an iterative workflow:

1. Model Training Technical Implementation

While MILEA doesn’t include model training capabilities directly, it provides standardized interfaces to established training tools. For Audi’s application:

  • Training platform: Etas Ascmo (Automotive Simulation and Calibration Model Generator)
  • Training method: Supervised learning with time-series data
  • Optimization objective: Minimize mean squared error between predicted and measured soot concentration
  • Training/validation split: Data partitioned for cross-validation to prevent overfitting
  • Model selection: Automated comparison of different architectures (RNNs, GRUs, LSTMs) with hyperparameter optimization

2. Model Conversion Technical Details

The MILEA conversion tool transforms the trained model into an optimized exchange format:

  • Format specification: Standardized binary representation with secure encryption
  • Memory optimization: Quantization of network weights to reduce storage requirements
  • Code integration: Generation of the interface between application software and MILEA
  • Verification process: Automated comparison between original and converted model outputs
  • Implementation for Audi: Direct conversion from Etas Ascmo format to MILEA binary (20 KB)

The MILEA conversion algorithm is integrated into the Etas Ascmo training tool, enabling seamless export. The conversion process includes:

  • Weight quantization for memory efficiency
  • Topology optimization for runtime performance
  • Fixed-point conversion for ECUs without floating-point units
  • Structure compression to minimize memory footprint

3. ECU Implementation Technical Framework

The execution of MILEA models on the ECU follows a well-defined technical approach:

  • Library integration: MILEA library included in ECU build process
  • Application interface: One-line function calls for each algorithm
  • Memory allocation: Static allocation to ensure deterministic behavior
  • Technical standards compliance:
    • MISRA 2004 and MISRA 2011 coding guidelines
    • ISO 26262 functional safety requirements
    • Automotive SPICE process standards
  • Runtime architecture:
    • Event-triggered execution synchronized with ECU timing
    • Deterministic runtime regardless of input values
    • Resource monitoring to prevent timing overruns

The integration involves three main components that interact at runtime, as shown in Figure 3 from the document:

  1. Application software: The engine control software that calls the MILEA functions
  2. MILEA library code: The runtime that executes the ML algorithms
  3. Converted model: The binary representation of the trained model

This separation of concerns allows the application software to remain relatively unchanged, with only the function calls to MILEA added.

4. Validation Technical Methodology

MILEA ensures model behavior consistency between development and deployment environments through a rigorous validation methodology:

  • Bitwise comparison: Output values from training environment and ECU implementation are compared for identical inputs
  • Numerical stability analysis: Effects of fixed-point arithmetic are quantified
  • Runtime performance verification: Execution time is measured across operating conditions
  • System-level validation: Full vehicle testing with comparative measurements

For Audi’s application, the validation included dynamic engine test bench measurements that simulated real-world driving conditions. Figure 4 in the document shows the technical validation results:

  • Top graph: Direct comparison of measured soot concentration (green line) versus ML model prediction (black line) over time
  • Middle graph: Accumulated soot mass comparison showing excellent correlation over the entire cycle
  • Bottom graph: Vehicle speed profile during the test cycle

The results demonstrated exceptional prediction accuracy with a runtime of just 180 μs, equivalent to conventional functions without ML capabilities.

Technical Capabilities and Algorithm Support

MILEA supports a diverse range of machine learning algorithms beyond neural networks, as illustrated in Figure 5:

Neural Network Architectures

  • Dense (fully connected) networks
  • Convolutional Neural Networks (Conv1D, Conv2D)
  • Recurrent architectures (GRU, LSTM)
  • Nearest neighbor implementations

Tree-based Algorithms

  • Binary decision trees
  • Random forests
  • XGBoost implementations

Statistical Methods

  • Support Vector Machines (SVM)
  • Gaussian process models
  • K-S test implementations

Specialized Algorithms

  • LoMoNet (Local Model Networks)
  • In-house proprietary algorithms
  • Explainable AI implementations

This diversity enables MILEA to support a wide range of use cases with the most appropriate algorithm for each application, rather than forcing all problems into a neural network framework.

Memory and Runtime Optimization Techniques

To meet the constraints of automotive ECUs, MILEA employs several technical optimization strategies:

Memory Optimizations

  • Weight quantization: Reducing precision of neural network weights (e.g., from 32-bit float to 16 or 8-bit representations)
  • Network pruning: Removing insignificant connections without affecting accuracy
  • Knowledge distillation: Training smaller networks to mimic larger ones
  • Shared parameter storage: Reusing weight memory for certain network architectures

Runtime Optimizations

  • Layer fusion: Combining consecutive operations to reduce memory transfers
  • SIMD utilization: Leveraging processor-specific vector instructions where available
  • Cache optimization: Structuring computations to maximize cache efficiency
  • Fixed-point arithmetic: Using integer operations on platforms without floating-point units
  • Optimized matrix operations: Custom implementations for embedded constraints

These techniques allow complex models to run efficiently on resource-constrained automotive ECUs without sacrificing accuracy.

Beyond Soot Sensing: Additional Technical Applications

MILEA has been successfully applied to other technical challenges in automotive systems:

Misfire Detection

  • Uses crankshaft rotation data to detect combustion irregularities
  • Identifies misfires across wider operating ranges than traditional methods
  • Distinguishes between different root causes of misfires

Hydrogen Fuel Cell Monitoring

  • Virtual sensor for the anode path in hydrogen applications
  • Monitors fuel cell stack conditions without additional hardware
  • Detects potential degradation patterns before they cause failures

Fuel Consumption Monitoring

  • Provides high-accuracy consumption estimates without additional sensors
  • Compensates for aging effects in the fuel system
  • Enables enhanced driver feedback and range estimation

Future Technical Directions

Bosch continues to expand MILEA’s technical capabilities, with development focused on:

Extended Algorithm Support

  • Integration of additional ML algorithms optimized for embedded deployment
  • Support for more complex neural network architectures
  • Implementation of emerging explainable AI approaches

Enhanced Development Tools

  • Automated model optimization for specific ECU targets
  • Expanded validation frameworks with formal verification components
  • Direct integration with additional ML development environments

Federated Learning Implementation

  • Distributed learning across vehicle fleets without centralizing sensitive data
  • On-device model adaptation based on individual vehicle usage patterns
  • Secure update mechanisms for model improvements

Expanded Use Cases

  • Diagnostics for complex system interactions
  • Predictive maintenance based on component usage patterns
  • Real-time adaptation to changing environmental conditions

Technical Conclusion

The integration of AI into embedded control units represents a paradigm shift in automotive system development. MILEA addresses the technical challenges of this integration with an ASPICE-certified toolchain that enables efficient development, deployment, and validation of ML models on production ECUs.

By providing a standardized approach that fits within existing automotive development processes, MILEA allows engineers to leverage the power of AI while meeting the stringent requirements of the automotive industry. This technical foundation will support the next generation of intelligent vehicle systems across all domains, from powertrain to chassis control and beyond.

Leave a Reply

Your email address will not be published. Required fields are marked *