Challenges in Embedded Software Development for Electric Vehicles

Challenges in Embedded Software Development for Electric Vehicles

Author | Bi Xue Jian

Produced by | Automotive Semiconductor Hardware

1. Current Trends in Electric Vehicles

Electric vehicles (EVs) have a longer history in the automotive field than many might imagine. In fact, as early as 1832, the Netherlands developed a primitive electric vehicle (EV). This marked the early emergence of electric vehicle technology, although the technology and performance at that time may have been relatively primitive.

Subsequently, around 1890, the first electric vehicle debuted in the United States. The technology of electric vehicles during this period had likely matured enough to attract public attention and interest. With the continuous development of electric vehicle technology, by the turn of the 19th and 20th centuries, electric vehicles had occupied a certain proportion of vehicles on the road, specifically about one-third of the vehicles. This indicates that electric vehicles already had a certain market influence and consumer base at that time.

Despite achieving some success in the early years, electric vehicles nearly disappeared in the mid-1930s. This could be attributed to various reasons, such as the rapid development of internal combustion engine technology, the limitations of electric vehicle range, the lack of charging infrastructure, and changes in consumer preferences.

Today, electric vehicles have re-entered the public eye and are appearing in droves on the streets. This is mainly due to the increased environmental awareness among consumers and the increasingly severe issues of climate change. As global interest in sustainability and reducing the use of fossil fuels grows, automakers are also actively exploring alternative propulsion technologies to replace traditional internal combustion engines.

The electric vehicle market is experiencing explosive growth. This is reflected not only in the number of electric vehicles but also in the level of technology, performance, and consumer acceptance of electric vehicles. With continuous technological advancements and an expanding market, electric vehicles are expected to become one of the mainstream choices in the automotive field in the future.

2. Components of the Electric Vehicle Powertrain System

Before discussing the challenges of developing embedded systems for electric vehicles, let’s first understand the six components of the electric vehicle powertrain:

-> 1. DC Voltage Converter: The DC voltage converter is a high-frequency power conversion circuit. It uses high-frequency switches, inductors, transformers, and capacitors to smoothly convert switching noise into stable DC voltage. In electric vehicles, the DC voltage converter monitors and controls the high-voltage current entering the auxiliary dual-volt battery or standard battery.

-> 2. Inverter: The inverter converts the energy from the electric vehicle’s high-voltage DC battery into AC voltage to drive the vehicle’s propulsion system. This conversion is crucial for driving the propulsion system of the vehicle, as most electric vehicle motors require AC power to operate.

-> 3. Electric Motor: This component monitors and controls the phase current and torque applications of the motor drive. The electric motor converts electrical energy into mechanical energy using magnetic flow. By monitoring and controlling the phase current and torque applications of the motor drive, the electric motor ensures that the vehicle can run smoothly and efficiently.

-> 4. Charging Control: The charging control component varies by country or technology and uses specialized protocols to regulate and standardize the charging process. This component also communicates with charging stations or Electric Vehicle Supply Equipment (EVSE) to ensure the safety and efficiency of the charging process.

-> 5. Onboard Charger (OBC): The OBC converts the AC power from the charging station into DC power to charge the vehicle’s battery. The OBC also monitors and protects the charging rate, executing other functions such as charging rate monitoring and protection.

-> 6. Battery Management System (BMS): The BMS is a critical component in electric vehicles responsible for monitoring the status and condition of the high-voltage battery. It monitors parameters such as total voltage, state of charge, and environmental temperature to ensure the safety and performance of the battery. The BMS significantly impacts the range and lifespan of the electric vehicle.

Challenges in Embedded Software Development for Electric Vehicles

The six key components of the EV (Electric Vehicle) powertrain system must operate in close coordination to achieve optimal performance. However, developers face numerous challenges in the design process of embedded software for EV powertrains.

The design of embedded software for EV powertrains is a complex and challenging task. To address these challenges, developers need to continuously learn and master the latest technologies and methods while closely monitoring market dynamics and technological development trends to ensure that the software meets the ever-changing market demands and technical standards.

3. Challenges in the Software Development Process for Electric Vehicles

1. Architectural Challenges

With the rapid development and increasing complexity of electric vehicle (EV) technology, developers of electronic control units (ECUs) indeed face more and more architectural challenges. To improve integration and efficiency, developers are exploring various new methods, one of which is the highly regarded “combinatorial architecture” solution.

The “combinatorial architecture” integrates two or more EV functions into a single ECU, achieving a high level of integration. This integration not only simplifies wiring and enclosure design, reducing costs, but also allows two functions to share the same cooling and control system, thereby improving overall efficiency and reliability.

For example, integrating the onboard charger (OBC) with the DC voltage converter can simplify the architecture of the charging system and improve charging efficiency. Similarly, integrating the OBC with the inverter or the inverter with the DC voltage converter can also yield similar benefits. These combinations make communication and data exchange between ECUs more efficient while also reducing the overall complexity and maintenance costs of the system.

However, implementing the “combinatorial architecture” also faces some technical challenges. First, developers need to ensure that the integrated ECUs can meet various functional and performance requirements while maintaining system stability and reliability. This requires in-depth optimization and testing of the system’s architecture, hardware, and software design. Secondly, due to the interactions and dependencies between different functions, developers need to carefully consider how to balance performance and resource allocation among various functions. Finally, consideration must also be given to how to ensure the safety and reliability of the system, especially in the face of security threats such as network attacks and data breaches.

To address these challenges, developers can adopt advanced technologies and methods. For example, using modular design and object-oriented programming techniques can simplify the design and development process of software, improving code reusability and maintainability. Additionally, employing advanced testing and validation methods, such as model-based testing and simulation, can ensure the performance and stability of the system. Furthermore, advanced encryption technologies and security measures can be implemented to protect the data and communication security of the system.

If any function contained in the combinatorial architecture must have automatic fault prevention capabilities, it must be certified by ASIL. ASIL refers to Automotive Safety Integrity Levels, a risk classification system established by the ISO 26262 standard for the functional safety of road vehicles. Therefore, a microcontroller and a multicore-supported AUTOSAR stack, along with AUTOSAR Basic Software (BSW), will be very beneficial.

2. Safety Challenges

As the trend of modern vehicles connecting to networks increases, their electrical architecture has also become increasingly complex, containing numerous access points, such as diagnostic ports, USB, WiFi connections, and charging ports. While these access points provide convenience for vehicle owners, they also present opportunities for network threats. Indeed, EVs are particularly vulnerable to network threats such as ransomware, malware, or distributed denial-of-service (DDoS) attacks, posing risks to personal data and payment information.

To ensure the security of automotive networks, ECUs must have advanced security features. Here are some key security measures:

-> Firewall: The firewall is the first line of defense for protecting automotive networks, blocking unauthorized access and data transmission, effectively preventing malware and network attacks.

-> Transport Layer Security (TLS) Protocol: The TLS protocol is an encryption protocol that ensures the security of data transmitted between the vehicle, charging station, and network. By using the TLS protocol, sensitive data can be protected from theft or tampering during transmission.

-> Secure Onboard Communication (AUTOSAR BSW SecOC) Module: The AUTOSAR BSW SecOC module is a security module specifically designed for onboard communication, allowing two or more peers to securely transmit application data over embedded networks. This module ensures the confidentiality, integrity, and availability of data through mechanisms such as encryption and authentication.

-> Hardware Security Module (HSM): The HSM is a hardware device specifically designed to handle encryption operations, providing an additional layer of security for automotive networks. HSM supports encryption, decryption, and identity authentication, effectively preventing malware and network attacks from compromising automotive networks.

In addition to the above security measures, automakers and vehicle owners can take the following steps to enhance the security of automotive networks:

-> Regularly update and upgrade software: Automakers should regularly release software updates and patches to fix known security vulnerabilities and weaknesses. Vehicle owners should also regularly update their vehicle’s software to ensure timely security updates.

-> Strengthen cybersecurity awareness training: Automakers and vehicle owners should enhance their understanding of cybersecurity, learning to identify and prevent network threats. Through training and education, vehicle owners can improve their cybersecurity awareness and reduce the risk of network attacks.

-> Use secure charging equipment and networks: Vehicle owners should choose certified and secure charging stations and EVSE when using charging equipment. Additionally, when connecting to networks, they should select secure and reliable WiFi networks, avoiding the use of insecure public networks.

Moreover, in the field of electric vehicles (EVs), especially after the introduction of high-voltage components, safety requirements for EVs have become stricter.

The Safety of Battery Management Systems (BMS)

The battery is the core component of EVs, and its safety directly impacts the vehicle’s driving safety. As the management center of the battery, the BMS must be able to comprehensively and accurately monitor various parameters of the battery, including state of charge, overall condition, and environmental temperature.

Parameter Monitoring: The BMS monitors key parameters such as cell voltage and temperature in real-time through sensors, ensuring that the battery operates within specific voltage and temperature ranges. These parameters are crucial for the battery’s performance and lifespan.

Fault Handling: When the cell temperature exceeds the target range or other anomalies are detected, the BMS will immediately take corrective measures, such as adjusting the charging current or reducing battery power output. In extreme cases, the BMS can even isolate the faulty cell to prevent fault propagation.

Automatic Fault Prevention Function: To ensure the reliability of the battery system, the BMS must have automatic fault prevention capabilities. This includes real-time monitoring of the battery system’s health, predicting potential faults, and taking preventive measures before a fault occurs.

Function Safety of Inverters

The inverter is another key component in EVs, responsible for converting DC power into AC power to provide power for driving the electric motor. As the inverter directly relates to the vehicle’s speed and power output, its safety is particularly important.

Functional Safety Standards: Inverters must comply with relevant functional safety standards to ensure safe operation of the vehicle in the event of a fault. These standards typically include requirements for fault detection, fault isolation, and fault recovery.

Error Handling: During the operation of the inverter, any errors may lead to dangerous behaviors, such as unintended acceleration or brake failure. Therefore, the inverter must have robust error handling capabilities to immediately take corrective measures when an error is detected, such as reducing power output or switching to a backup system.

Redundant Design: To enhance the reliability of the inverter, redundant design can be employed, using multiple inverter modules to work simultaneously and automatically switch to other modules in case one module fails. This design can significantly reduce the impact of inverter failures on vehicle safety.

In addition, protective measures for high-voltage components must be taken, such as using insulating materials and setting safety distances to prevent electric shock accidents.

Safety of the Charging Process: During the charging process, compatibility between the battery and charging equipment must be ensured, along with the stability and safety of the charging process. This includes using appropriate charging protocols, monitoring charging current and voltage parameters in real-time, and immediately stopping the charging process in case of anomalies.

Due to the impact of the above components on the overall system safety of EVs, all these components’ designs must comply with specified ASIL requirements. To meet ASIL requirements, all interacting modules must be certified at the same or higher ASIL level. Other components must be carefully designed to meet the no-interference (FFI) requirements.

Challenges in Embedded Software Development for Electric Vehicles

Charging Protocols

Although the electric vehicle (EV) and plug-in hybrid electric vehicle (PHEV) markets are quite mature, chargers and charging technologies are still evolving. Here is an overview of various chargers currently available:

Charger Types

Onboard Charger (OBC)

Definition: Installed inside the vehicle, connected to the power grid via a socket and cable, providing convenient charging solutions for electric vehicles.

Features: Smaller power, limited charging speed, but high flexibility, allowing electric vehicles to be charged anytime and anywhere as long as there is a suitable socket.

Non-Onboard Chargers

Slow Charger (Level 1): The most common home charging device, providing power to the vehicle through a standard wall outlet. The power is usually between 11-20 amps, and the charging speed is relatively slow, potentially taking several hours to fully charge an electric vehicle.

Fast Charger (Level 2): The power ranges from 220 volts/40 amps to 240 volts/80 amps, with charging speeds much faster than slow chargers. Under ideal charging conditions, it can fully charge an electric vehicle in 3-6 hours. Many homes and commercial parking lots are equipped with this type of charger.

Super Fast Charger (Level 3): Also known as DC Fast Charger, the power is usually 480 volts/90 amps or higher. They can provide enough charge to drive 100-150 kilometers within 15-30 minutes. These chargers are mainly installed at public charging stations, highway rest areas, or other places where quick charging is needed.

Charging Technology Development

Constant Voltage and Current Limiting Charging Mode: With the rapid development of power electronics technology and the maturation and popularization of current control technology, the phased constant current charging mode has been largely replaced by the constant voltage and current limiting charging mode. The constant voltage and current limiting charging mode can ensure that the battery maintains a constant voltage during the charging process while limiting the charging current, thereby protecting the battery and extending its lifespan.

Inductive Charging Technology: Inductive chargers use the principle of transformer high-frequency AC magnetic fields to transfer electrical energy from the primary side to the secondary side onboard the vehicle to achieve battery charging. The greatest advantage of inductive charging is safety, as there is no direct point contact between the charger and the electric vehicle, making it safe to charge even in adverse weather conditions (e.g., rain or snow) without the risk of electric shock.

Charger Market Trends

-> Integration: To improve efficiency and reduce costs, more and more chargers are adopting integrated designs, combining multiple functions into one device.

-> Intelligence: With the development of the Internet of Things and artificial intelligence technologies, chargers are also beginning to incorporate intelligent features such as remote monitoring, fault diagnosis, and automatic adjustment of charging strategies.

-> Standardization: To promote the popularization and development of electric vehicles, countries and regions are actively promoting the standardization of chargers to ensure that different brands and models of electric vehicles can use the same charger for charging.

4. Urgent Need for Comprehensive Embedded System Development Methods

Systematic tool solutions are needed to address the major challenges in EV embedded software design.

1. Addressing Architectural Challenges

As the complexity of E/E systems shows explosive growth, the development of embedded software is carried out in a model-based systems engineering environment. First, a multi-domain system model must be developed to determine the mechanical, electrical, electronic, and software needs of the system.

Challenges in Embedded Software Development for Electric Vehicles

-> System Model and E/E Architecture. This step logically and physically designs the distribution system, verifies it through construction methods, and prepares it for production delivery. System-level tools provide optimized solutions for the extremely complex electrical wiring harness manufacturing process and simplify the maintenance, diagnosis, and repair processes of electrical systems.

-> Software and Network Development. After defining the E/E system, the next step is to develop software components and architectural design using system-level tools. Before software implementation, designs can be imported into system-level tools for analysis and verification of in-vehicle communication networks. During the software implementation process, system-level tools and other AUTOSAR-compliant tools can be used to configure embedded software for target ECUs.

2. Multicore Solutions for Software Distribution

Multicore solutions can enable software distribution, which is particularly useful for addressing performance and safety challenges in EV embedded software design:

-> Performance: System-level tools support the EV combinatorial architecture by distributing functions across multiple cores. For example, when designing an EV combinatorial architecture with OBC and DC voltage converter, the OBC can be placed on core 0, while the DC voltage converter can be placed on core 1. When one of the functions requires automatic fault prevention, it can be easily implemented (see figure).

Challenges in Embedded Software Development for Electric Vehicles

-> Safety: Software partitioning can also be used to achieve the required safety levels. For instance, if the OBC in core 0 must achieve ASIL B certification, it becomes very easy to integrate ASIL application packages into a partitioned BWS that meets ASIL requirements.

Challenges in Embedded Software Development for Electric Vehicles

Related Reading

1.The Cornerstone of Intelligent Driving—Chips

2. Electronic and Electrical Architecture—HPC Empowering Software Defined Vehicles

3.Electronic and Electrical Architecture—Mainstream OEM Electronic and Electrical Architecture Discussion

4. Central Computing Carrier Under New EE Architecture—Introduction to HPC Software Architecture

5.Electronic and Electrical Architecture—Trends in the Evolution of Electronic and Electrical Architecture

Leave a Comment

×