Engineers across the automotive industry are increasingly relying on simulation to evaluate handling, acceleration, range, and other key performance indicators. Evaluating vehicle performance through simulation is faster and less expensive than physical testing. Full vehicle simulation also helps design work happen earlier in the development process, before prototype hardware is available. However, as the cost and efficiency benefits of vehicle simulation become more apparent within an organization, the increased demand for simulation presents a number of challenges for vehicle simulation.
Given the complexity that comes with interfacing with commercial simulation software and running full vehicle simulations, a dedicated team of simulation engineers with the necessary expertise is required. However, this team can quickly become overwhelmed by the demands of various stakeholders, including property engineers, performance engineers, dynamics engineers, range and efficiency engineers, and senior management. Simply executing the multiple simulations requested by these teams can also become a bottleneck, especially when these simulations are run continuously on commercial software. Finally, the lack of standardized vehicle data, coupled with ad hoc post-processing of simulation results, exacerbates these difficulties, leaving engineers scrambling to obtain golden source data and adopt approved methods for reporting results.
At Rivian, our team has developed a scalable, easy-to-use platform for configuring, running, and post-processing a large number of full-vehicle simulations. Developed using MATLAB® and Simulink®, this vehicle simulation interface (VSI) platform helps reduce redundancy, increase reuse, and improve simulation throughput through parallel processing. With an intuitive user interface built with App Designer, the platform also makes simulations easily accessible to engineering teams across the company, eliminating simulation request bottlenecks (Figure 1).
Figure 1. VSI user interface.
This article describes how we designed VSI using object-oriented principles, how we leveraged it to make simulation more accessible, and how we used parallel processing to scale simulation workloads.
Object-Oriented Design of VSI
When we began designing the VSI platform, an object-oriented approach was the most straightforward way to achieve our goals of flexibility, extensibility, and reusability. We started by defining a few basic objects: Vehicle, Load Case, and Simulation. In this case, a Vehicle object represents a Rivian vehicle, such as the Rivian R1T, Rivian R1S, or Rivian EDV (our electric van). This object also represents the configuration of the vehicle, defining the specific battery pack, powertrain, tires, front and rear drives, and other components. Load Case objects are used to define simulation scenarios, including speed profiles, environmental conditions, and driving conditions. And a VSI Simulation object is simply a combination of a Vehicle instance and a specific Load Case (Figure 2).
Figure 2. VSI simulation includes specific vehicle configurations and predefined test scenarios.
From a programming perspective, the concept of Simulation can be thought of as a superclass that forms the underlying framework of the VSI platform. The properties of this superclass include vehicle configuration and test scenario properties that can be selected through the user interface, as well as a set of methods for creating models, running simulations, performing post-processing, extracting metrics, and sharing results (Figure 3). With the object-oriented programming capabilities of MATLAB, we can easily create an implementation of this class structure for the VSI platform. MATLAB handle objects are particularly useful for encapsulating all the information contained in a simulation (not only the vehicle and test scenario, but also user settings, results, and metrics) and efficiently transferring this information within the VSI without copying the data. These objects can then be converted to metadata text files and archived, allowing us to recreate any historical simulation by reconstructing the objects from the metadata.
Figure 3. The VSISim superclass, including simulation entry and execution methods.
Making simulation more accessible and maximizing reuse
We have deployed VSI as a MATLAB toolbox and standalone executable (compiled with MATLAB Compiler™) that can be used by colleagues who do not have MATLAB installed. With easy access to VSI, the team no longer has to wait for Simulink engineers to run simulations and get results.
The left side of the VSI interface (shown in Figure 1) is used to select vehicle configurations and test scenarios, while the right side of the interface displays a list of simulations represented by different colors. Red indicates simulations that have not yet been run, green indicates completed simulations, and amber indicates completed simulations as well as out-of-date results (which may occur, for example, when new component data becomes available or a model is revised). It is worth noting that simulation results from VSI are shared; engineers may find that the simulation they want to run has already been completed by someone on their team or an entirely different team. Engineers can leverage existing simulation results and avoid running duplicate and unnecessary simulations, saving time and computing resources.
After defining and selecting the simulation to run, the engineer clicks the button labeled Run&Post-Process (see Figure 1). The simulation is launched behind the scenes through the MATLAB API using a combination of Simulink and commercial simulation software (Figure 4).
Figure 4. Workflow diagram for cluster simulation and the VSI interface showing five scheduled simulations (highlighted in blue). Purple status indicates that a simulation is in progress; red status indicates that a simulation is complete.
After individual simulations are complete, the logged data is sent back to the MATLAB workspace for processing, converted to the Apache® Parquet data file format, and ultimately archived in a shared directory. We also developed a set of MATLAB scripts to aggregate the results to generate key metrics, report on simulation status against targets set in our requirements management system, and generate automated reports summarizing key performance indicators for Rivian senior management.
Scaling through parallel processing
In the VSI user interface, engineers can choose to run simulations in parallel using multiple cores on their local computer or using a remote Amazon® Web Services (AWS®) cluster (Figure 5). The local approach leverages Parallel Computing Toolbox™ and is the most popular approach for engineers testing model updates and changes. The remote approach is based on an AWS EC2 instance running MATLAB Parallel Server™ and is suitable for production environments with tested and validated models.
Figure 5. VSI options for parallel processing.
MATLAB Parallel Server and MATLAB Job Scheduler play an important role in the remote parallel workflow. VSI first calls the parcluster function from MATLAB Parallel Server to create a cluster object based on the AWS EC2 profile we defined. After creating a simulation object for each simulation to be run in parallel, VSI creates a job on the cluster and a separate task for each simulation. The job and its tasks are submitted to the AWS EC2 instance through the MATLAB Job Scheduler. The scheduler coordinates the execution of the job and assigns tasks to the various cluster workers. When the simulation is complete, MATLAB post-processing functions are run on the cluster, and the results are archived and shared. For large jobs, such as the one involving 14 lengthy simulations, the remote parallel approach is much faster, completing the job in 68 minutes, while the sequential approach takes more than 9 hours (Figure 6).
Figure 6. Benchmark simulation times for sequential (yellow), locally parallel (blue), and remotely parallel (red) approaches.
Over the past six months, our colleagues at Rivian have used VSI to perform more than 9,000 full-vehicle simulations, totaling approximately 2 million simulated miles.
Planned improvements
Designing and building the VSI platform using MATLAB and Simulink helped us achieve key goals. We created a unified platform for engineers and non-engineers to run full-vehicle simulations, post-process results, and create reports. We eliminated simulation request bottlenecks, reduced redundancy in simulation tasks, and increased simulation reusability. We also maximized throughput by enabling simulations to run in parallel on multiple cores in an AWS cluster or on a local workstation.
We plan to make numerous improvements to VSI, including deploying the platform as a web app, adding dashboards for key performance indicators, and simplifying the use of Design of Experiments (DOE) from the user interface. In parallel, we are also continuing to develop and expand Rivian’s MATLAB Minimart, a collection of internally built MATLAB toolboxes for data transformation and viewing, launch and braking analysis, and a variety of other frequently requested capabilities.
Previous article:Maximizing ESD Protection for Automotive Ethernet Applications
Next article:Correctly understand the VGS detection mechanism of DRV8705-Q1
Recommended ReadingLatest update time:2024-11-16 09:37
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- I need help from a master who can use ADS software to make filters
- [Technical Tips] GigaDevice GD32VF103C-START Getting Started
- How to assign initial values to a continuous RAM range in C2000 chip
- What is 4G DTU and what are its specific functions?
- CadenceLIVE China 2022 China Online User Conference invites you to attend
- Super detailed summary of receiver sensitivity and equivalent noise bandwidth
- Difference between junction temperature and case top temperature of power device
- The problem of grounding the output signal of the half-bridge inverter circuit
- Xianyu not only hired someone to do their graduation project, but also tried to "extort" money from the seller. It's a pity for these two students from Xidian University...
- 3-wire spi (cs clk sda), LCD driver for HX8369