How the Car Software Factory Is Built
Model-Based Design extends agile principles to system development efforts that include physical components and software. From requirements definition, system architecture, and component design, to implementation, validation, testing, and deployment, Model-Based Design spans the entire development cycle and enables rapid adaptation to changing requirements.
With intelligent driving and intelligent cockpit technologies, vehicle functional complexity is fast increasing. At the same time, consumers are demanding more from their smart cars. In this environment, software-defined vehicles (SDVs) have become a key trend and software has become the core of automotive technology. Delivering SDVs requires a shift in the development process, where software and hardware development are decoupled to allow fast software iterations. A company’s software development capability is reflected in the speed of iterating and delivering upgrades to consumers. It is critical to equip the developers with good tools, processes, and methods so they can efficiently design, test, and update software. In the meantime, developers need to explore how to integrate agile development with continuous integration/continuous delivery (CI/CD) and the traditional V-model in order to achieve an effective balance between development efficiency and quality.
Zeekr, a premium EV manufacturer based in China, recently shared its experience applying Model-Based Design to its new vehicle OS environment, including the use of new capabilities in Simulink® for modeling service-oriented architecture (SOA)-based software and generating C++ code using Embedded Coder® (Figure 1).
The team has also developed SOMOC, a software architecture tool for Zeekr’s custom vehicle OS with System Composer™, MATLAB®, and App Designer (Figure 2).
In the next sections, experts from Zeekr’s Software and Electronics Center share their experience of building a software factory, including integrating new software features, accelerating software delivery, reducing development time and cost, and ensuring safety and reliability.
Applying Service-Oriented Architecture and Achieving Decoupling
To meet the requirements of rapid feature iteration, it is necessary to gradually shift from traditional signal-based software to a service-oriented design. At the same time, it is necessary to decouple software from hardware as well as decouple the layers within the software architecture, such as the operating system kernel, middleware, and application layer. Full decoupling is vital to ensure fast iteration of hardware and software, on their own pace, thereby shortening the development cycle and addressing user requirements.
One key strategy for enabling rapid iteration is the adoption of SOA. SOA facilitates loose coupling between application software and hardware, as well as different software applications. This not only eases software development and maintenance, but also leads to seamless coordination between in-vehicle software, communication, information security, and the cloud environment—effectively creating a complete vehicle cloud ecosystem.
There is no silver bullet that addresses the challenges of developing a complex, interdisciplinary, and large-scale software system. For certain applications, using high-level languages like C/C++—especially for modules involving multithreading or publish-subscribe mechanisms—can be straightforward.
At the same time, the Zeekr team has extensive experience in powertrain, chassis, and body development using Model-Based Design. As a result, for mature functions, which have been validated through production tests or have complex state machines, the team continues to use a Model-Based Design approach. The goal is to integrate these models into the SOA platform. To address this need, Zeekr and MathWorks have collaboratively developed an integrated model-based development toolchain (Figure 3).
Shortening Development Cycles and Reducing Costs with Virtual Vehicle Simulation
Approximately 90% of automated driving algorithm tests are conducted on simulation platforms, 9% on test tracks, and 1% through real-world road testing. Tests on simulation platforms are particularly important given the difficulty in replicating the seemingly infinite variety of driving scenarios encountered on actual road conditions.
As the automotive industry embraces new technological advancements, OEMs are increasingly adopting agile development processes, automated testing, CI, cloud computing, and virtualization. These approaches accelerate software development cycles, with vehicle virtualization and simulation technologies having the greatest impact on integration and validation.
Automotive companies have been using simulation to develop and test vehicle control systems for energy and motion. Simulink is used to build dynamic models and control algorithms, as well as simulate scenarios to evaluate and optimize control systems, perform calibration, or fine-tune algorithms. Going forward, simulation technologies are enabling the creation of digital twins, so engineers can use these fully virtual vehicles for predicting real vehicle behavior and exhaustive simulation.
Backed by an integrated simulation platform, virtual vehicle simulation allows engineering teams to prototype, calibrate, and validate new software features. Through front-loading, they can greatly shorten the development cycle and reduce costs. Zeekr is harnessing the ready-to-use functionalities of MATLAB and Simulink to quickly create virtual vehicles (Figure 4).
Reducing Delivery Lead Time with DevOps
In recent years, many automotive companies have repositioned themselves as software-centric. This has resulted in a shift toward CI and DevOps practices, where data is collected during operation, fed back into the development process, and used to continuously iterate vehicle software.
Automotive software is characterized by high development costs, requiring a large amount of code development, integration, and delivery. Using CI and DevOps practices can shorten the time from code submission to product updates, reducing development time and errors, while ensuring a high-quality, secure delivery of software through continuous integration, automated testing, and static code analysis.
DevOps prioritizes agile methodologies to deliver products faster. The growing complexity of software, reduced time-to-market needs, constrained budgets, and divergence of software and hardware life cycles have all necessitated the integration of Model-Based Design and agile development principles. The use of modeling and simulation, automated test and validation, and automated code generation significantly enhance development efficiency and implementation speed.
To achieve these goals, Zeekr uses Polyspace® tools, such as Polyspace Bug Finder™ and Polyspace Code Prover™, to check for software defects, such as coding specifications and security vulnerabilities.
Zeekr has developed a set of automated unit testing and service verification tools, and the generated code is verified by these tools to ensure that the executable program can run reliably. At the same time, Zeekr also integrates the development and verification of models into its DevOps system. Just like they do with code, functional development engineers can upload models to a code repository (Figure 5).
Using Agile Development and the V-Model to Ensure Functional Safety
The advent of SDVs has introduced many innovations, such as automated driving and enhanced vehicle control. However, this evolution also brought considerable challenges to functional safety. In particular, as software architecture changes from classic AUTOSAR to heterogeneous, distributed vehicle operating systems and service architecture, there are new uncertainties in the construction of traditional functional safety analysis methods, software and hardware safety design concepts, safety verification systems, and toolchain safety. Thus, the fundamental challenge facing engineering teams working on SDVs is test and validation.
Currently, the most common software development process in the automotive industry follows the V-model, which involves corresponding tests at each development stage, from requirements to source code, with each phase building on the output of the previous one. The advantages of the V-model lie in clear process, traceability, and quality control. However, this approach also has drawbacks, such as long development cycles, difficulty adapting to changing requirements, testing challenges, and a lack of flexibility.
As traditional software development processes fail to keep pace with the growing complexity of automotive systems, agile development has emerged as a solution. It supports the development of software through repeated iteration, delivering software in small increments to allow for continuous updates, rather than waiting to deliver all software at the end of the development process.
Zeekr’s current software development approach combines the V-model with agile methodologies. This hybrid strategy maintains the structured development process of the V-model for overall vehicle development while introducing flexibility for specific requirements, ensuring the safety and reliability of software products and facilitating rapid delivery (Figure 6).
The cost of feature development and validation was significantly increased due to the centralization of functions on several controllers in the traditional V-model. In this context, Simulink offers substantial benefits for model development. Thanks to its comprehensive suite of model verification tools, Simulink supports a complete and mature ISO® 26262 software development process, methodology, and toolkit. This ensures the accuracy and reliability of the model effectively.
In addition, Model-Based Design extends agile principles to system development efforts that include physical components and software. From requirements definition, system architecture, and component design, to implementation, validation, testing, and deployment, Model-Based Design spans the entire development cycle and enables rapid adaptation to changing requirements. As such, Model-Based Design can meet the needs of a hybrid approach that combines V-model and agile development principles.
Published 2024