From model to code

Software development at Thomas

Questions about software development?

The electromechanical actuator (EMA) may be a relatively small component, but the capabilities of the intelligent pilot control unit are truly compelling – and alongside the hardware, the software has a major role to play. This becomes abundantly clear when you take a closer look at the program code contained in the EMA’s minute microcontroller. It comprises around 160,000 lines of program code and can be adapted to specific customer requirements with the help of more than 160 parameters. This offers a particularly high degree of flexibility and paves the way for swifter integration of the product into the end system.

From requirements document to program code

The code is the brainchild of a 13-strong software development team led by Christoph Pessara, Director Software and Integration Testing. But before the software specialists can do their magic, it’s up to others to provide some essential input. „It all starts with the requirements document, in which the customers set out their specifications and ideas. System Development uses this as a basis for determining the functionalities of the system. It is also responsible for transferring these key elements into a system architecture that defines the functional scope and the interaction of software, hardware, and mechanical components. Once these tasks have been completed, we come on board and develop the software,“ says Pessara.

The team uses a model-based approach to achieve this: so-called „semi-formal models“ describe processes and structures as well as the relationships between the software components. Based on these descriptions, the program code is created with the help of a code generator.

Architecture, development, and testing – a wide range of activities

The areas of responsibility relating to software development are rich and varied:
The software architects in the team define the static structure (e.g., interfaces between the components) as well as the dynamic behavior, which includes runtime, performance, and state diagrams, among other things. In addition, the individual system functions are broken down according to the respective software components; the next step involves defining their specific functionality. Modules such as current regulators, CAN drivers, or memory management components are prime examples.

The task of the software developers in the team is then to come up with the specific software design based on these descriptions and to convert it into program code with the help of code generators. Finally, the software testers check whether the program, which is made up of many individual modules, meets all the required specifications and functions.

Efficient and transparent development

Model-based development offers tremendous advantages. First, visualization in a model simplifies the task of engaging with customers and other departments because it makes complex relationships easier to understand. Secondly, it provides a sound conceptual foundation. What is more, the software design itself can be modeled and the code can then be generated from it, which speeds up processes considerably.

„We and our customers benefit from the model-based approach in many ways,“ says Pessara. „We use a standardized, uniform and, intelligible modeling language. This provides us with clean architectures that can be easily reused at a later stage. And last but not least, the susceptibility to errors is low, as the code generator can use the same code patterns again and again for recurring design patterns.“

In addition, the continuous integration of software modifications, together with a high degree of test automation, ensures rapid feedback for the developers.

In practice, this means that every alteration to the software is checked at night by a fully automated test system. Thus, errors can be detected and eliminated at an early stage.
This automation allows the testers to focus on test preparation rather than test execution.

Architecture and code – the perfect match

Developing model-based software is therefore much more efficient and transparent than writing the entire program code in one go. This is due to the fact that abstraction reduces complexity; the model can be used to keep both design and architecture congruent.

For example, in many cases changes have to be made to the architecture, design, code, and tests. The model-based approach is of particular advantage when it comes to implementing such measures with precision at all levels.

From model (left) to code (right)

As Christoph Pessara explains, „In classic programming, one of the potential pitfalls was ‚divergence‘ between what the software architect conceived and what the software developer ultimately created. Essentially, the only thing that mattered was that the product worked in the end. The actual execution of programming was only of secondary importance. This approach, however, resulted in complex codes and systems that were difficult to maintain and susceptible to faults. Issues such as these are now a thing of the past thanks to the model-based approach. We are able to adapt our software faster, test any code changes directly and ultimately ensure a higher degree of maturity.

For example, if the software is used in environments in which functional safety is a key factor, it is essential that we ensure consistency throughout the entire development process.

The model makes it easier to perform safety analyses and demonstrate consistency during development.“

Customers reap the benefits

In general, model-based software development tends to be used by manufacturers of large components and complex systems. The fact that Thomas applies this method to comparatively small components such as the EMA is rather unique. And from the customer’s point of view, it delivers genuine benefits. After all, the mobility and off-highway markets are subject to ever stricter regulatory requirements. It is essential that systems comply with applicable standards and become increasingly efficient. Aspects such as functional safety, as mentioned above, also have to be taken into account. As a result, technology is constantly evolving and systems are becoming increasingly smart. Pressure relating to development activities, timing and costs is considerable. Embracing the approach of model-based software development, Thomas is playing its part in meeting these challenges – now and in the future.

en_USEnglish