Search NASASearch

DOE OSTI · 2473218

Implementing Ordinary Differential Equation Solvers in Rust Programming Language for Modeling Vehicle Powertrain Systems: Preprint

Abstract

Efficient and accurate ordinary differential equation (ODE) solvers are necessary for powertrain and vehicle dynamics modeling. However, current commercial ODE solvers can be financially prohibitive, leading to a need for accessible, effective, open-source ODE solvers designed for powertrain modeling. Rust is a compiled programming language that has the potential to be used for fast and easy-to-use powertrain models, given its exceptional computational performance, robust package ecosystem, and short time required for modelers to become proficient. However, of the three commonly used (>3,000 downloads) packages in Rust with ODE solver capabilities, only one has more than four numerical methods implemented, and none are designed specifically for modeling physical systems. Therefore, the goal of the Differential Equation System Solver (DESS) was to implement accurate ODE solvers in Rust designed for the component-based problems often seen in powertrain modeling. DESS is a text-based software package that provides a flexible framework for building and solving systems of ODEs. This allows DESS to be included as a dependency for automotive powertrain models that require a variety of solvers and solver configurations. Seven explicit ODE solver methods have been implemented in DESS: Euler’s, Heun’s, midpoint, Ralston’s, classic Runge-Kutta, Bogacki-Shampine, and Cash-Karp. These represent five fixed-step methods and two adaptive-step methods. This paper shows that the solver implementations increase accuracy and computational efficiency compared to Euler's method when modeling a system of three thermal masses in Rust. DESS also includes features designed for modeling component-based physical systems. Users can define relationships between nodes in their system, which the package then translates into a system of equations, leading to simpler and more intuitive code. In the case of a three-thermal-mass system, the user can specify node thermal properties (e.g., thermal capacitance), how nodes are interconnected, and thermal conductance between nodes rather than providing a system of equations. The core contribution from this work is an open-source, text-based Rust package with ODE solvers for automotive powertrain modeling to support cost-free, fast, and accurate simulation.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Steuteville, Robin, Baker, Chad (ORCID:000000032233221X). 2024-10-17. Implementing Ordinary Differential Equation Solvers in Rust Programming Language for Modeling Vehicle Powertrain Systems: Preprint. https://doi.org/10.4271/2024-01-2148

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related reports

Hybrid Energy Management with Real-Time Control of a High-Power EV Charging Site

Decarbonization of transportation systems is driving higher capacity energy storage and faster charging power requirements in electric vehicles (EVs). Given the potential advantages - such as increased efficiency, reduced inverter capacity, and less total cable mass - there is a demand in the industry for more DC distribution for high-power charging (HPC) hubs. However, the cost-effective, adaptive, and robust operation of the DC-coupled HPC hub necessitates a robust site energy management system (SEMS). Validating SEMS operation using a digital twin of an HPC hub in a real-time simulator (RTS) platform is crucial before field deployment. In this study, we propose a hybrid energy management site controller designed to achieve high-level, long-term operational objectives while managing low-level power sharing control between hub assets. We develop a centralized model predictive controller (MPC) to optimize hub operating points and use these points to update the droop parameters of the site energy storage system (ESS). This approach ensures the hub follows an optimal operating point while maintaining the flexibility to respond to load surges. We tested and verified our proposed approach both offline and on a Controller Hardware-in-the-loop (C-HIL) simulation platform integrated with a SEMS framework, demonstrating real-time site operation and validating a cost-effective and robust site controller.

ADVANCED PROPULSION SYSTEMS

Wireless Pulse-Width Modulation Control of Power Converters Using Ultra-Wideband Technology for Distributed High-Voltage Systems

In this study, we present a new approach for wireless pulse-width modulation (PWM) control of a power converter, applicable to numerous power converters within a complex electrical distribution system. This method eliminates the need for multiple physical connections of gating/PWM signals among distributed converter modules. By using ultra-wideband-based communication, the PWM control signals can be wirelessly transmitted from a central controller to multiple converters simultaneously and seamlessly. System stability is thoroughly analyzed, and experimental results validate the efficacy of the wireless control scheme for a buck converter operating at a 50-kHz switching frequency. The minimum latency obtained from this setup is 5.38 ..mu..s. This control concept offers easier implementation of distributed control in high-voltage power systems, especially in multilevel architectures, even under harsh conditions with ambient noise.

ADVANCED PROPULSION SYSTEMS

Advancing Affordable, Efficient, and Clean Transportation

Clean Cities and Communities is a U.S. Department of Energy (DOE) partnership to advance clean transportation nationwide. More than 75 DOE-designated Clean Cities and Communities coalitions work locally in urban, suburban, and rural communities to strengthen the nation's environment, energy security, and economic prosperity. As partners with DOE's Vehicle Technologies Office (VTO), coalitions work to deploy affordable, efficient, and clean transportation; energy efficient mobility systems; and fuel-saving technologies and practices.

ADVANCED PROPULSION SYSTEMS