Designing and building the Rivian vehicle simulation interface 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.
Engineers across the automotive industry increasingly rely on simulation to evaluate handling, acceleration, range and other key performance metrics. Evaluating vehicle performance through simulation is faster and less expensive than physical testing. Full vehicle simulation also helps design work occur earlier in the development process, before prototype hardware is available. However, as the cost and efficiency advantages of vehicle simulation become increasingly apparent within organizations, the increased demand for simulation has caused vehicle simulation to face a series of challenges.
Given the complexity of interfacing with commercial simulation software and running full vehicle simulations, a dedicated team of simulation engineers with the necessary expertise is required. However, the team can quickly become overwhelmed with demands from various stakeholders, including attribute 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, these difficulties are compounded by a lack of standardized vehicle data, coupled with ad hoc post-processing of simulation results, which leaves engineers scrambling to obtain prime source data and adopt approved methods for reporting results.
At Rivian, our team develops scalable, easy-to-use platforms for configuring, running, and post-processing high-volume full vehicle simulations. This Vehicle Simulation Interface (VSI) platform was developed using MATLAB® and Simulink® to help reduce redundancy, increase reusability, and increase simulation throughput through parallel processing . With an intuitive user interface built using App Design tools, the platform also makes simulation easily accessible to engineering teams across the company, eliminating the simulation request bottleneck (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 equitable and accessible, and how we used parallel processing to scale simulation workloads.
Object-oriented design of VSI
When we began designing the VSI platform, it was obvious that an object-oriented approach was the most straightforward way to achieve our goals of flexibility, scalability, and reusability. We first clearly defined several basic objects: Vehicle, Load Case and Simulation. In this case, the Vehicle object is used to represent a Rivian vehicle, such as a Rivian R1T, Rivian R1S, or Rivian EDV (our electric van). This object also represents the vehicle's configuration, 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. The VSI Simulation object is just a combination of a Vehicle instance and a specific Load Case (Figure 2).
figure 2. VSI simulations include specific vehicle configurations and predefined test scenarios.
From a programming perspective, the concept of Simulation can be regarded as a super class that constitutes the basic framework of the VSI platform. 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 the 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 just vehicles and test scenarios, but also user settings, results, and metrics—and efficiently transferring this information within a 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.
image 3. VSISim superclass, including simulation input and execution methods.
Make simulation more equally popular and maximize reuse
We have deployed VSI as a MATLAB toolbox and standalone executable (compiled with MATLAB Compiler™) for use by colleagues who do not have MATLAB installed. With easy access to the VSI, teams no longer need 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 simulation list 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 when a model is revised). It's important to note that simulation results from VSI are shared; engineers may find that the simulation they want to run has been completed by someone on their own team or on a completely different team. Engineers can leverage existing simulation results and avoid running the same unnecessary simulations, saving time and computing resources.
After defining and selecting the simulation to run, the engineer clicks the button labeled Run&Post-Process (shown in Figure 1). Simulations are launched in the background through the MATLAB API using a combination of Simulink and commercial simulation software (Figure 4).
Figure 4. Workflow diagram of cluster simulation, and VSI interface showing five scheduled simulations (highlighted in blue). The purple status indicates that the simulation is in progress; the red status indicates that the simulation has been completed.
After an individual simulation is completed, the recorded data is sent back to the MATLAB workspace for processing, then converted to the Apache ® Parquet data file format, and finally archived in a shared directory. We also developed a set of MATLAB scripts that aggregate results to generate key metrics, report simulation status against goals set in our requirements management system, and generate automated reports summarizing key performance indicators for reference by 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 machine, or they can choose to do so using a remote Amazon ® Web Services (AWS ® ) cluster (Figure 5). The native approach leverages Parallel Computing Toolbox™ and is the most common approach used by engineers when testing model updates and changes. The remote method 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 option for parallel processing.
In remote parallel workflows, MATLAB Parallel Server and MATLAB Job Scheduler play an important role. 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 creates 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 jobs and assigns tasks to individual cluster worker processes. When the simulation is complete, MATLAB postprocessing functions are run on the cluster, and the results are archived and shared. For large jobs, such as one involving 14 lengthy simulations, the remote parallel approach was much faster, completing the job in 68 minutes, while the sequential approach took more than 9 hours (Figure 6).
Figure 6. Baseline simulation times for sequential (yellow), local parallel (blue), and remote parallel (red) methods.
Over the past six months, our colleagues at Rivian have used VSI to conduct more than 9,000 full vehicle simulations, logging a total of 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 eliminate simulation request bottlenecks, reduce redundancy in simulation tasks, and increase simulation reusability. Additionally, we maximize throughput by supporting running simulations in parallel on multiple cores in an AWS cluster or local workstation.
We plan to make a number of improvements to VSI, including deploying the platform as a web application, adding dashboards for key performance indicators, and simplifying the use of design of experiments (DOE) from the user interface. At the same time, we are continuing to develop and expand Rivian's MATLAB Minimart, a collection of in-house built MATLAB toolboxes for data transformation and viewing, startup and braking analysis, and a variety of other frequently requested functions.
Author : Adithya Vignesh Jayaraman , Rivian
Previous article:The most disruptive week for the automotive industry is coming
Next article:Analysis of the competition landscape of the global L2+ assisted driving market in 2023
Recommended ReadingLatest update time:2024-11-16 09:34
- 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
- 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
- msp430f5529lp driver problem
- [Evaluation of domestic FPGA Gaoyun GW1N-4 series development board]——3. Turn on a lamp hello_led
- When opening the project, it prompts that there is no RAA305190GBM_common.xml
- View the sea - View southern Zhejiang - View Cangnan
- Could you please help me with how to calculate the VGS of this current mirror? Thank you very much!
- GigaDevice's new GD32F470xx series with TFT and Ethernet port
- MicroPython adds support for operator @
- I would like to ask you about the ODB protocol dedicated chip
- 【GD32L233C-START Review】1. Unboxing
- Generators: Pulse, Pattern and Arbitrary Waveform (AWG)