Over the past few decades, the automobile industry has evolved from a simple means of transportation to a complex machine that resembles a smartphone on wheels. This transformation is due to the integration of advanced technologies and the adoption of a more sophisticated approach to design and development.
The evolution of the car can be traced back to the early 20th century when the first automobiles were developed. These vehicles were simple and utilitarian, designed primarily for transportation from point A to point B. However, as technology advanced, so did the car. In the 1950s and 1960s, we saw the emergence of advanced safety features such as seat belts, airbags, and anti-lock brakes. By the 1980s, we began to see the introduction of onboard computers, which enabled more advanced engine management and diagnostics. In the 1990s, vehicles saw the integration of more sophisticated electronic systems, such as electronic stability control (ESC) and advanced driver assistance systems (ADAS).
In the 21st century, the car has undergone a massive transformation. Today’s vehicles are equipped with advanced features that were once reserved for high-end luxury cars.
The percentage of car production costs attributed to electronic control systems and automotive software has been consistently rising over the years. This upward trend is clearly depicted in the Statista data (https://www.statista.com/statistics/277931/automotive-electronics-cost-as-a-share-of-total-car-cost-worldwide/) shown in the following figure, which has been monitoring this development since 1970:
Figure 1.1 – Electronics system as percent of total car cost
This increasing complexity of automotive systems has presented a challenge for the industry in terms of software development.
The evolution of the car into a smart, connected, and autonomous machine is driven by several factors, which include the following:
- The growing demand for advanced safety features
- The need for more efficient and environmentally friendly transportation
- The desire for a more convenient and connected driving experience
The adoption of advanced technologies such as sensors, software systems, and connectivity has enabled car manufacturers to deliver on these demands, creating a new era of smart, autonomous, and connected vehicles.
With the integration of new technologies such as ADAS and connected car features, the amount of software that needs to be developed and integrated into vehicles has grown significantly.
The comparison to the Apollo mission highlights the significant increase in complexity of modern cars. While the Apollo spacecraft had only a limited number of systems that needed to be managed, modern cars can contain up to 100 or more ECUs, sensors, and actuators, all of which need to communicate seamlessly within very tight time constraints with one another to ensure proper functioning. Additionally, modern cars are highly connected devices that require sophisticated software and networking capabilities, further adding to their complexity. This increased complexity allows modern cars to offer advanced features and functionality but also requires more sophisticated maintenance and repair processes.
Having discussed the evolution and complexity of automotive software, let’s shift our focus to one of the essential components that enable modern cars to function effectively – the ECU.
What is an ECU?
Before we move any further, we need to understand what an automotive ECU is. This is a computer – comprising a printed circuit board (PCB) with a microcontroller and various electronic components – that controls various functions in a vehicle. These functions may include engine management, transmission control, climate control, power steering, and brakes. Here are some examples of automotive ECUs:
- Engine control module (ECM): The ECM is responsible for managing the engine’s performance, including fuel injection, ignition timing, and emissions control.
- Transmission control module (TCM): The TCM manages the operation of the transmission, including gear selection, shift timing, and torque converter lock-up.
- Body control module (BCM): The BCM controls various functions related to the vehicle’s body and interior, such as lighting, climate control, door locks, and audio systems.
- Anti-lock braking system (ABS) control module: The ABS control module manages the operation of the ABS, which helps to prevent skidding and maintain control of the vehicle during braking.
- Battery management system (BMS): The BMS’s primary function is to monitor, control, and optimize the performance of the vehicle’s battery pack. It also ensures all battery cells within the pack are charged and discharged uniformly, preventing the overcharging of certain cells and maximizing the overall battery capacity.
Some examples of these components are shown in the following figure:
Figure 1.2 – Examples of ECUs in a vehicle
Overall, automotive ECUs play a critical role in the operation of modern vehicles, providing precise control over various systems and ensuring optimal performance, efficiency, and safety. As automotive ECUs rely heavily on complex software to perform their functions, we first need to understand the software development aspect to comprehend the nuances of ECU operation and design.
Introducing automotive software development
Automotive software development is a critical component of the continued innovation and success of the automotive industry. It involves creating and maintaining software systems used in various types of automobiles, cars, trucks, buses, and other automobiles. These software systems are responsible for multiple tasks, such as engine management, navigation, entertainment, and safety features. Therefore, engineers in this field must have expertise in embedded systems, real-time programming, control systems, and communication protocols to create reliable and safe software systems.
It is a highly specialized field that requires close collaboration with other members of the automotive development team, such as electrical and mechanical engineers and quality assurance specialists, to ensure seamless integration of the software systems into the vehicle and meet the end users’ needs. Clean software architecture principles can help address the challenges of this complex field by creating a system that is easy to maintain, modify, and evolve while being resilient to change.
Note
Clean architecture in software design refers to a structured approach that prioritizes clarity, separation of concerns, and maintainability. It emphasizes the organization of code in a way that minimizes dependencies, allowing for easy modifications and testing. Clean architecture fosters systems that are adaptable, scalable, and easy to comprehend.
It’s a challenging field but plays a critical role in the continuous success and innovation of the automotive industry. Before we discuss advancements in this field, let’s first understand traditional automotive software development.
Understanding traditional software development
Traditional automotive software development involves a wide variety of ECUs with different hardware and software, which can make it difficult to ensure that all components work together efficiently. Each supplier has its own software architecture definitions, development methodology, and interfaces for ECUs, resulting in fragmented and non-standardized software components (SWCs) across the automotive industry. This approach had several limitations, including the following:
- Limited reusability: SWCs developed for one vehicle or system may not be reusable in another, leading to increased development costs and a longer time to market, if a similar functionality is required on another platform.
- Integration time: The integration of different SWCs can be a time-consuming and expensive process, particularly if the components were not designed to work together from the beginning.
- Time to market: The time to market for new vehicles and features can be long and costly, particularly when traditional automotive software development methods are used. This can lead to missed opportunities and lost revenue for manufacturers and suppliers.
- Complex supply chain: The rising complexity of software implementations is closely linked to the increasing complexity of supply chains. In this context, software developers design their components based on the requirement definitions provided by original equipment manufacturers (OEMs) or Tier 1 suppliers, who are responsible for their integration at a later stage.
- Rigidity: Automotive software is often monolithic and inflexible. Also, it is very hard to adapt to changing requirements and technologies.
Traditional automotive software development was fragmented, non-standardized, and costly, making it challenging to develop high-quality software and meet the growing demands of the automotive industry. An example of this type of non-standardized architecture is shown in the following figure:
Figure 1.3 – Example of non-standardized software architecture
Thus, AUTOSAR was introduced to address these limitations and promote more efficient, effective, and standardized automotive software development. In the following section, we discuss a case study to illustrate this point.
Note on the evolution of automotive software standardization
There were early efforts to standardize automotive software both within individual companies and through collaborations between various entities, such as OSEK/VDX and HIS. These initiatives aimed to address specific aspects of software architecture, such as operating systems and diagnostics. Despite these efforts, they were often narrow in focus and lacked the integration needed for modern vehicle systems. This led to the development of AUTOSAR, a comprehensive standard that addresses all layers of automotive software architecture, enabling better scalability, interoperability, and reusability across different manufacturers and vehicle platforms.
Case study – Replacing an MCU and exchanging microcontroller drivers
Let’s consider an example of a company wanting to upgrade an ECU, which was typically designed and implemented using proprietary software and hardware architectures, with little or no standardization across different car manufacturers. The microcontroller deployed in an ECU was typically bespoke and tailored to the car manufacturer and the specific model, and any alteration to it would necessitate extensive modifications to both the hardware and software aspects.
Suppose the company wants to replace the microcontroller of the ECU with a more advanced microcontroller. In that case, they would need to design a new hardware board that is compatible with the new microcontroller, which would likely involve changing the pin assignments and other circuitry.
With a similar architecture to that shown in Figure 1.3, most of the software would need to be rewritten or modified to adapt to the new microcontroller’s peripheral interfaces, and architecture. This would require a significant investment in time, money, and resources, depending on the complexity of the ECU.
In summary, prior to the advent of AUTOSAR, altering the microcontroller of an automotive ECU represented a formidable task, necessitating considerable technical knowledge and regulatory expertise. The lack of standardization across automotive manufacturers compounded the issue, making it difficult to devise a universal solution. Moreover, the intricate nature of the software and hardware involved rendered any attempts to upgrade or modify an ECU a substantial challenge, requiring significant effort and resources. With the advent of AUTOSAR, there was a paradigm shift as it allowed software to be abstracted from not just the microcontroller but the entirety of the ECU and vehicle architecture. This enables developers to write applications that communicate with other software, fully abstracted from aspects such as the ECU architecture, endianness, bus architecture, signal packing and protocol, and vehicle gateways.
It’s worth noting that our focus has primarily been on the benefits of AUTOSAR in relation to microcontroller replacement in this context. However, the benefits of AUTOSAR are far more comprehensive. Beyond facilitating microcontroller substitution, AUTOSAR’s broad reach positively affects numerous other aspects of automotive software and hardware, making it a more efficient and flexible solution in the realm of automotive technology.