Evaluating Model-Based Development in Automotive Software: A Practical Guide for Implementation

November 22, 2024 – Reading time: 14 minutes

This article examines the implementation of Model-Based Development (MBD) in automotive software engineering, emphasizing its advantages over traditional code-based development methods. With the increasing complexity of modern vehicles—driven by advancements in electrification, autonomous systems, and connected technologies—MBD has emerged as a robust solution for managing these challenges. MBD enables engineers to model systems graphically, allowing for early simulation, testing, and automatic code generation, which reduces development time and enhances system reliability. A comparison between MBD and code-based development highlights MBD’s faster prototyping, higher-level abstraction, and better communication across teams. To optimize the development process, we propose an enhanced workflow that introduces a Change Control Board (CCB) and a Software Lead/Function Owner to improve change request tracking and team coordination. A case study of a Proportional-Integral-Derivative (PID) controller implementation further demonstrates the practical benefits of MBD, particularly in simplifying system-level discussions and debugging. The findings suggest that MBD offers significant advantages for developing complex automotive systems, improving efficiency, and ensuring alignment with industry standards. 

Key Highlights

  • MBD enhances software development through early simulation, rapid prototyping, and automatic code generation, significantly reducing development time and improving system reliability.
  • Introducing a CCB and Software Lead/Function Owner improves the tracking of change requests, optimizes communication between teams, and addresses common bottlenecks in traditional workflows.
  • The comparison between code-based and model-based PID controller implementations demonstrates the ease of system-level discussion, faster debugging, and scalability offered by MBD, making it more suitable for complex automotive systems.

1. Introduction to Model-Based Development (MBD) in Automotive Software

The automotive industry is rapidly changing, with vehicles becoming more complex and featuring more advanced functions. Figure 1 shows how modern vehicles now have more embedded functions, driven by the integration of electronic control units (ECUs), advanced driver assistance systems (ADAS), and new technologies like electrification and connectivity. To address these challenges, Model-Based Development (MBD) has become an effective approach for simplifying software development and improving system reliability.

Figure 1: Evolution of complexity in the automotive domain [1].

MBD allows engineers to create visual models of software and system behavior, providing a clear abstraction of the system’s architecture and facilitating early validation of requirements. The implementation of MBD can improve communication among stakeholders, reduce development time, and minimize errors through simulation and testing before deployment. Additionally, the transition to AUTOSAR (AUTomotive Open System ARchitecture), as depicted in Fig. 2, highlights the shift towards a standardized framework that supports both Classic and Adaptive AUTOSAR. This approach enhances the interoperability of components and fosters collaboration across the automotive supply chain.

Architecture of AUTOSAR

Figure 2: Architecture of AUTOSAR illustrating the division between Classic and Adaptive AUTOSAR components, showcasing their roles in vehicle software management and over-the-air updates [2].

Based on our experience with customers at INVENSITY, we have observed that implementing MBD not only addresses the complexities of modern automotive systems but also aligns development processes with industry best practices. Our collaborations have underscored the value of MBD in enhancing efficiency, promoting iterative development, and ensuring compliance with stringent safety standards.

This paper aims to explore the implications of implementing Model-Based Development in automotive software development. We will examine the scope of system and software development, compare MBD to traditional code-based approaches, and present a detailed workflow from customer request to software delivery. Additionally, a case study will demonstrate the practical application of MBD in an automotive context. Finally, we will conclude with key insights on the benefits and challenges of adopting MBD in automotive projects.

Structure of the Article is as follows:

  1. Introduction to Model-Based Development (MBD) in Automotive Software
  2. Understanding the Scope: System vs. Software in Automotive Development
  3. Implementation of Model-Based Development
  4. Case Study: Implementing Model-Based Development in Automotive
  5. Conclusion – Summary of findings and recommendations for future work.

2. Understanding the Scope: System vs. Software in Automotive Development

The V-model is a well-established framework for managing the development of complex systems, particularly in the automotive sector. As can be seen in the V-model figure, Fig. 3, the development process is structured into distinct phases, with a focus on both requirements and validation. The left side of the V represents the various stages of system development, beginning with requirements gathering, progressing to system architecture, feature and variant modeling, software architecture, and ultimately culminating in software implementation and design. Each of these stages builds upon the previous one, ensuring that the system meets the intended requirements.

A diagram of software design

A diagram of software design

A diagram of software design

On the right side of the V, we see the validation stages, which include software integration and configuration, software integration tests, calibration documentation, and validation. This structured approach emphasizes the importance of verification and validation at each stage, ensuring that the software developed aligns with the defined requirements and performs reliably in the field.

However, the software implementation and design phase, often considered a “black box,” poses significant challenges. Once the software is implemented, tracing its functionality back to the original requirements can be difficult. This lack of traceability can lead to issues in verifying that the software meets all necessary specifications, particularly in complex automotive systems where safety and performance are critical. The intricate nature of automotive software, which often involves multiple ECUs and complex interactions, further complicates this traceability.

This is where Model-Based Development (MBD) becomes particularly attractive. MBD provides a visual representation of system components and behaviors, allowing for easier traceability between requirements, system architecture, and software implementation. By modeling the software and its interactions at an early stage, engineers can better understand the system’s behavior and performance, thus reducing the risks associated with the software development process. The use of models enables early detection of inconsistencies or errors, facilitating iterative refinement and ultimately leading to a more reliable final product.

Given the growing complexity of automotive software, driven by the integration of advanced functionalities and the need for compliance with stringent safety standards, MBD offers a systematic approach to managing this complexity. It enhances collaboration among stakeholders, improves documentation, and supports automated testing and validation processes. As the automotive industry continues to evolve, the adoption of MBD is likely to become increasingly vital in ensuring that software development remains efficient, effective, and aligned with industry best practices.

3. Implementation of Model-Based Development

In this chapter, we will examine the implementation of Model-Based Development (MBD) in automotive software. The discussion is divided into two subchapters. In Subchapter 3.1, we will compare Model-Based Development with Code-Based Development, focusing on their distinct approaches and workflows. Subchapter 3.2 will outline the typical workflow from customer request to software delivery, highlighting some common challenges and proposing improvements based on our experiences.

3.1 Model-based development vs. Code-based development

As the automotive industry evolves, understanding the differences between Model-Based Development (MBD) and Code-Based Development is crucial for optimizing software processes. The following table summarizes key distinctions between these two methodologies, highlighting their unique approaches, advantages, and challenges in the context of automotive software development. It can be seen in the table below that MBD emphasizes graphical design and early testing, while Code-Based Development provides manual coding flexibility and control.

Table-1

Table 1: Comparison of Model-Based Development and Code-Based Development in Automotive Software.

Model-Based Development (MBD) represents a significant shift in how automotive software is created. This approach uses graphical design tools, such as Simulink, enabling engineers to visually represent systems and auto-generate the corresponding code. MBD supports early simulation and testing through techniques like Model-in-the-Loop (MIL) and Hardware-in-the-Loop (HIL), allowing for timely verification of system behavior. By focusing on high-level abstractions, MBD simplifies complex logic and enhances communication among team members. Additionally, its capacity for rapid prototyping—facilitated by quick updates to models and automatic code generation—significantly reduces development time. However, this methodology is often dependent on specific modeling tools, which, while promoting consistency, may impose limitations on flexibility.

Based on our experience, customers who use MBD tend to rely heavily on these tools. As a result, having a solid tools team in place is essential to avoid development delays and prevent significant hurdles in the process. Without proper tool management and support, MBD projects can experience bottlenecks. When this challenge is addressed, MBD offers substantial advantages over traditional code-based development, enabling faster iteration, improved testing, and a more streamlined workflow.

On the other hand, Code-Based Development relies on developers manually writing code in languages such as C or C++. This method offers full control over the software, allowing for fine-tuning of memory usage, performance optimization, and hardware interactions. However, testing usually occurs after substantial portions of the code have been completed, often resulting in discovering issues late in the process. This low-level focus can provide granular control but comes at the cost of flexibility, as this approach is independent of specific toolchains. Consequently, prototyping cycles can be slower since any changes require manual coding, debugging, and extensive testing. These differences highlight how the choice of development methodology can significantly influence workflow efficiency and the overall quality of the final product.

3.2 Workflow from Customer Request to Software Delivery

The typical workflow in automotive software development is depicted in Fig. 4. This structure generally follows a linear progression, beginning with the customer, who articulates their requirements or change requests. The next phase involves the system level, where initial planning occurs, and technical specifications are defined. From this point, the workflow advances to the developer, who translates these specifications into functional software components. After development, the process moves to testing validation, where various tests are conducted to ensure that the software meets the required standards and performs as intended. Finally, the software undergoes integration before delivery to the customer.

Figure 4: Typical Workflow from Customer Request to Software Delivery in Automotive Software Development.

However, our experience indicates that this workflow often results in bottlenecks, particularly at the system level. This stage is not only responsible for gathering requirements but also for tracking change requests, which can lead to delays. When system architects are burdened with managing these requests, it hinders timely communication with developers about functional adjustments and critical design considerations. Consequently, this lack of alignment can impact project timelines and software quality.

To address these challenges, we propose an enhanced workflow, illustrated in Fig. 5. In this revised model, the process begins similarly with the customer and system level, but it introduces a Software Lead or Function Owner who acts as a bridge between the system level and the development team. This role is crucial for ensuring that functional requirements are well understood and communicated.

 

Figure 5: Proposed Enhanced Workflow with Change Control Board (CCB) for Improved Change Request Management.

Additionally, we recommend establishing a Change Control Board (CCB) responsible for reviewing and approving change requests. The CCB ensures alignment with project priorities and resource availability, relieving the system level of this burden. By delegating the responsibility of tracking change requests to the CCB, the workflow allows for more effective communication and collaboration between stakeholders, which in turn enhances the timeline for project delivery.

Moreover, the Software Lead or Function Owner can manage specific work packages and allocate tasks based on their team’s expertise. For instance, a team member responsible for torque control functions would oversee all software-related aspects of that feature, ensuring a deeper understanding and faster resolution of any issues that arise. Overall, this improved workflow fosters greater efficiency, accountability, and responsiveness in the software development process, ultimately leading to higher-quality automotive systems.

4. Case Study: Implementing Model-Based Development in Automotive

In this chapter, we explore the implementation of a Proportional-Integral-Derivative (PID) controller using both code-based and model-based development approaches. A PID controller is a widely used control system in automotive applications, such as regulating engine speed, controlling vehicle stability, or managing powertrain components. It calculates an output based on the error between a desired setpoint and the actual process variable (measured system state). The controller works through three mechanisms:

  • Proportional (P): Adjusts the output proportionally to the error magnitude.
  • Integral (I): Corrects accumulated error over time to eliminate steady-state error.
  • Derivative (D): Predicts future error trends based on its rate of change to smooth the system response.

As can be seen in Fig. 6, it illustrates two representations of a PID controller: the code-based approach in part (a) and a graphical representation in part (b).

Figure 6: a) Code-based implementation of PID controller in C; b) Model-based graphical representation of PID.

The code-based approach (Fig. 6a) manually defines the PID controller using a structured C code implementation. Here, developers directly code each part of the PID algorithm (proportional, integral, and derivative terms), handle variables, and manage memory. This method offers low-level control over system performance and allows optimization for hardware constraints. However, it also increases complexity in terms of testing, debugging, and ensuring consistency across different stages of the development cycle.

The model-based approach (Fig. 6b) uses a graphical design tool, such as Simulink, to represent the PID controller as a block diagram. The process variable and setpoint flow into the PID block, and the control output is generated visually. This abstraction simplifies the design by focusing on system behavior rather than implementation details. It also enables early simulation, testing, and automatic code generation, significantly speeding up the prototyping process.

For functional and system-level discussions, model-based development (Fig. 6b) is more advantageous. It allows stakeholders to visualize the system behavior and design easily, facilitating better communication between teams. For example, during debugging, the model-based approach enables faster identification and resolution of issues, as the system’s behavior can be simulated and tested earlier in the process. Simulation also allows for quicker iteration compared to the manual coding process in a code-based approach, where changes may require extensive reworking of code and testing.

Additionally, model-based development in this PID example offers better traceability and scalability. When systems grow in complexity, managing changes in code becomes difficult, but with model-based tools, it’s easier to update or modify the behavior of individual blocks without worrying about breaking the entire system. It also allows for Hardware-in-the-Loop (HIL) or Model-in-the-Loop (MIL) testing to catch errors before integration, saving time and effort later in the development process.

5. Conclusion

In this article, we have examined the critical role that Model-Based Development (MBD) plays in addressing the increasing complexity of automotive software systems. With the automotive industry continuously evolving due to technological advancements like electrification, advanced driver assistance systems (ADAS), and connected vehicles, the traditional code-based approach to software development is becoming less practical for managing such intricate systems. MBD offers a more scalable, efficient, and reliable alternative by enabling early testing, simulation, and graphical representation of system behavior.

Through our detailed comparison between MBD and code-based development, it became apparent that MBD fosters enhanced collaboration, faster prototyping, and better communication among stakeholders. The ability to test and simulate models early in the process allows teams to catch issues sooner, reduce development time, and ensure higher-quality software delivery. We also highlighted the importance of integrating robust toolchains and the role of a dedicated tools team, as MBD projects heavily rely on specialized tools like Simulink for their success.

Additionally, we proposed an optimized workflow that includes a Change Control Board (CCB) and Software Lead or Function Owner to streamline the development process, reduce bottlenecks, and improve tracking and communication between teams. This refined workflow aims to enhance the coordination between customers, system architects, and developers, ensuring more timely delivery and alignment with project goals.

The case study on implementing a PID controller demonstrated the practical benefits of MBD over traditional code-based methods, particularly in the context of system-level discussions, debugging, and scalability. MBD’s ability to facilitate rapid changes through visual representation and auto-generated code is especially valuable for managing complex automotive systems.

In conclusion, the adoption of Model-Based Development in automotive projects offers clear advantages in managing system complexity, improving development efficiency, and ensuring that software is both reliable and adaptable. As automotive systems continue to evolve, the use of MBD will likely become increasingly essential, helping the industry to meet future demands for safety, performance, and innovation. Future work should continue exploring how to optimize MBD practices, particularly in relation to tool integration, workflow management, and alignment with industry standards like AUTOSAR.

References

[1] Chakraborty, Samarjit, et al. “Embedded systems and software challenges in electric vehicles.” 2012 Design, Automation & Test in Europe Conference & Exhibition (DATE). IEEE, 2012.

[2] What is AUTOSAR? – MATLAB & Simulink – MathWorks Deutschland [WWW Document], n.d. URL https://de.mathworks.com/help/autosar/ug/what-is-autosar.html (accessed 11.10.24).

Author

  • Steffen Tjandra

    Technology Consultant

Contact person

  • Ulf Stocker

    Head of Software Engineering

How can we accelerate your development?

Resources