---
title: Model-Based Development Process
url: https://www.emergentmind.com/topics/model-based-development-mbd-process
type: topic
---

# Model-Based Development Process

Model-Based Development (MBD) Process

Model-Based Development (MBD) is a systematic approach wherein formalized models of system functions and behaviors are constructed as the foundation for specification, design, analysis, simulation, code generation, and verification in modern embedded and cyber-physical systems. In the automotive domain—including advanced driver assistance systems (ADAS) and autonomous vehicles—MBD provides the backbone for multi-core, real-time, and safety-critical software stacks, facilitating code generation, parallelization, and integration with contemporary ROS 2 frameworks, while supporting scalability and maintainability in large-scale, multi-functional environments [2512.23575], [2512.23605].

## 1. Foundations and Architectural Flow

The canonical MBD workflow starts with high-level model construction, usually in tools such as MATLAB/Simulink, targeting specific application domains (e.g., perception, planning, control) [2512.23575]. System functions are decomposed into interconnected blocks, which map to functional nodes in runtime environments such as ROS 2.

The process encompasses:

- **Functional Modeling:** Node-by-node abstraction of software functions. Each node may represent sensing, perception, control, or actuation logic.
- **Model-Based Parallelizer (MBP):** Transforms models into parallel task graphs via block-level XML (BLXML) representations and leverages platform-specific hardware profiles (SHIM).
- **Automatic Code Generation:** Embedded Coder emits sequential C/C++ from validated Simulink models. MBP further produces parallelized C code suitable for multithreaded execution.
- **ROS 2 Integration:** A code converter classifies models as event-driven or timer-driven, generating corresponding ROS 2 C++ nodes equipped with internal thread pools and callback mechanisms [2512.23605].

## 2. Parallelization Techniques and Scheduling

MBD enables fine-grained task parallelism by unwrapping hidden block structures—even in "Toolbox" or MATLAB-Function subsystems—via preprocessing (e.g., modelExtractor), and re-encoding the model for maximal concurrency [2512.23575]. Key stages in parallelization include:

- **Block Hierarchy Traversal:** Assigning unique global identities to every atomic and masked block.
- **Signal Decomposition:** Rewriting complex bus selectors to uncover elemental signals.
- **Task Graph Scheduling:** Building DAGs (Directed Acyclic Graphs) where V = {tasks}, E = {data dependencies}. Scheduling algorithms (typically list scheduling or ILP-based) allocate tasks to processor cores to minimize makespan \(T_p\), subject to resource and real-time constraints.

A representative formulation:

\[
T_{serial} = \sum_k t_k,\quad
T_{parallel} = \max_{p=1\ldots P} \left( \sum_{k:\alpha(k)=p} t_k \right) + O_{comm} + O_{sync}
\]

where \(O_{comm}\) and \(O_{sync}\) denote communication and barrier overheads. Core resource allocations \(U_p = \frac{\sum_{k:\alpha(k)=p} t_k}{D} \leq 1\) must satisfy deadlines \(D\) and utilization bounds [2512.23575].

## 3. Classification and Pattern-Driven Parallel Code Generation

The convergence of MBD with ROS 2 necessitates targeted parallelization schemes for multi-input embedded nodes. The framework divides models into:

- **Timer-Driven Nodes:** Autonomous periodic execution mapped from models featuring "ROS 2 Timer" blocks.
- **Event-Driven Nodes:** Execution conditioned on message arrival—sub-divided into:
  - Barrier-style (awaiting all inputs)
  - Single-topic-triggered
  - Timestamp-matched synchronized arrivals

Timer-driven and event-driven patterns instantiate separate thread pools for task execution, managed via condition variables and lock-free queues to avoid concurrency pathologies [2512.23605]. Inter-task communication inherits the block-level channel assignments from MBP and is mapped to ROS 2 publish/subscribe semantics.

Table: Execution Time Scaling

| Platform      | Cores | Threads | Avg. Time (ms) |
|---------------|-------|---------|---------------|
| POSIX         | 4     | 32      | 2.1           |
| eMCOS         | 4     | 32      | 7.0           |

Efficiency is quantified as \(E(p,t) = S(p,t)/p\), where speedup \(S(p,t) = T(1,1)/T(p,t)\).

## 4. Real-Time Performance and Core Allocation

Real-time implications are central to MBD in automotive applications. By exposing parallel tasks (both across and within complex block subsystems), sub-microsecond node latency and high-throughput (>1000 nodes/sec on multicore setups) are attainable [2512.23575]. Communication overhead generally remains below 10–15% (in tested cases), allowing for predictable jitter margins.

Resource allocation is tied to SHIM hardware descriptors (core counts, inter-core latency), which inform MBP’s solver for automatic recomputation of core mapping on deployment to new platforms. Processor-in-the-Loop (PIL) tests validate parallel execution under true deadlines.

## 5. Toolchain Integration and Software Engineering Practices

Effective deployment requires:

- **Preprocessing:** Automated expansion of subsystems and block splitting (via modelExtractor).
- **Design Guidelines:** Single-function-per-block for anticipated multi-core partitioning; maintenance of SHIM profiles per platform.
- **Early Real-Time Testing:** Embedded PIL setups to proactively catch violations of \(T_{parallel} \leq D\).
- **Model-to-Code Pipeline:** Seamless transitions from Simulink, through Embedded Coder, MBP, to MBP’s parallel C code, and finally into ROS 2 C++ nodes via the framework’s C-to-ROS 2 converter [2512.23605].

Pragmatically, this results in consistent, repeatable build and deployment flows from high-level models to real-time-executable, multithreaded ROS 2 nodes on multicore and many-core platforms.

## 6. Empirical Evaluation and Scalability

Experimental benchmarks:

- **trajectory_follower (control node):** Serial = 0.8 μs; Parallel (2 cores) = 0.4 μs (\(S\approx2\))
- **random_downsample_filter (sensing, post-decomposition):** Parallel (4 cores) = 2 μs (\(S\approx3\))
- **voxel_grid filter:** Parallel execution time reduced from ~8 μs to ~3 μs

Speedup and efficiency show near-linearity with increased thread count until communication/serialization bottlenecks dominate, especially in communication-heavy models or those with high block interdependency [2512.23605].

## 7. Limitations, Open Problems, and Future Directions

Current frameworks support intra-model parallelization, not global multi-node concurrency; future work aims at distributed scheduling and allocation across interacting Simulink models and heterogeneous ROS 2 node graphs. High communication intensity may diminish speedup, motivating the development of co-scheduling and fusion strategies.

Scalability to RTOS-enabled many-core platforms like eMCOS requires adaptation of channel primitives for deadlock avoidance and re-linking; preliminary conversion scripts exist, but generalization to complex event models is ongoing.

Summary: The modern MBD process furnishes a rigorous, tool-supported methodology for specification, automatic parallel code generation, and integration of real-time, multicore software for autonomous driving stacks, validated by empirical speedup and latency metrics [2512.23575], [2512.23605]. By extending block-level visibility and exploiting model structure, next-generation automotive platforms achieve both safety and efficiency under tight real-time constraints.

Source: https://www.emergentmind.com/topics/model-based-development-mbd-process