Model Framework Architecture
In the development and testing of embedded ECU software, model-based frameworks are essential tools that allow algorithm and software engineers to validate their solutions within a fully virtualized vehicle environment. These frameworks are typically structured around three key simulation subsystems:
- Vehicle Dynamics
- Electrical/Electronic (E/E) Network Architecture
- Vehicle External Interfaces
Together, these components provide a comprehensive platform for simulating real-world vehicle behavior and interactions, enabling efficient and robust software validation. Below is an example of an embedded ECU software development and test model framework in MATLAB Simulink.
When it comes to the development and testing of an ADAS/AD software application, these modeling frameworks are often coupled with simulation environments for the rendering of traffic scenarios and sensor simulation. Various co-simulation setups are then developed based on testing requirements.
Vehicle Dynamics
A lumped-parameter vehicle model consists of multiple interconnected subsystems, each representing the behavior of a specific aspect of the vehicle - such as aerodynamics, braking, powertrain, and steering. Together, these models enable the simulation of overall vehicle dynamics. Additionally, a set of motion equations is continuously integrated over time to compute the vehicle’s acceleration, velocity, and position along the axes of its reference frame.
Below is an example of vehicle model subsystems in Simulink.
Electrical/Electronic (E/E) Network Architecture
The E/E Network Architecture subsystem encompasses all simulated Electronic Control Units (ECUs) present within the vehicle’s network. In the context of our example project, only a subset of the full vehicle E/E architecture is represented. This partial representation is based on the assumption that the development effort is focused on the ADAS Cruise Control software application, which serves as the software under test (SUT). To support the development and validation of the ADAS Cruise Control algorithm, the SENSOR ECUs and the ADAS ECU subsystems are included, providing the necessary network data extracts for simulation and testing purposes.
Below is an example of content from an ADAS ECU subsystem.
Vehicle External Interfaces
The Vehicle External Interface block serves as a gateway for injecting input signals into the model framework, enabling interaction with external stimuli. In the example project, test cases - such as driver maneuvers - are executed manually, with input signals stored in CSV format and read at runtime during model execution. Additionally, the framework supports automated testing, allowing test cases to be executed by third-party test automation tools, enhancing repeatability and scalability in the validation process.
Below is an example of a project folder structure showing test case locations.
Below is an example of input signals injected at run-time to the model framework using FromWorkspace blocks.