Search NASA⌕ Search

SEARCH · Search NASA

Results for “MatLab”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 145 records · Page 8

ALGORITHMS AND PROGRAMS FOR STRONG GRAVITATIONAL LENSING IN KERR SPACE-TIME INCLUDING POLARIZATION

Active galactic nuclei (AGNs) and quasars are important astrophysical objects to understand. Recently, microlensing observations have constrained the size of the quasar X-ray emission region to be of the order of 10 gravitational radii of the central supermassive black hole. For distances within a few gravitational radii, light paths are strongly bent by the strong gravity field of the central black hole. If the central black hole has nonzero angular momentum (spin), then a photon’s polarization plane will be rotated by the gravitational Faraday effect. The observed X-ray flux and polarization will then be influenced significantly by the strong gravity field near the source. Consequently, linear gravitational lensing theory is inadequate for such extreme circumstances. We present simple algorithms computing the strong lensing effects of Kerr black holes, including the effects on polarization. Our algorithms are realized in a program “KERTAP” in two versions: MATLAB and Python. The key ingredients of KERTAP are a graphic user interface, a backward ray-tracing algorithm, a polarization propagator dealing with gravitational Faraday rotation, and algorithms computing observables such as flux magnification and polarization angles. Our algorithms can be easily realized in other programming languages such as FORTRAN, C, and C++. The MATLAB version of KERTAP is parallelized using the MATLAB Parallel Computing Toolbox and the Distributed Computing Server. The Python code was sped up using Cython and supports full implementation of MPI using the “mpi4py” package. As an example, we investigate the inclination angle dependence of the observed polarization and the strong lensing magnification of AGN X-ray emission. We conclude that it is possible to perform complex numerical-relativity related computations using interpreted languages such as MATLAB and Python.

79 ASTRONOMY AND ASTROPHYSICS↗

Optimal Voltage Reference for Droop-Based DERs in Distribution Systems

Due to the newly issued standards on distributed energy resources (DERs), the droop-based operation modes (Q-V and P-V droops) become a requirement for all the interconnected DER units at the distribution level. Voltage references of the DER units can be assigned to improve the operational behavior of the distribution system in the smart grid context. This paper presents a novel formulation for optimally setting voltage reference of the droop-based DER units in distribution systems with the objective of minimizing the system ohmic loss. This problem is formulated as a mixed-integer quadratic convex optimization problem in MATLAB and solved by the MATLAB and CPLEX solvers. The IEEE 123-bus system and the EPRI test system Ckt5 are used to validate the proposed formulation. The result obtained from the proposed formulation is compared with the result of the original problem solved by the heuristic method. Based on the numerical study results, system loss can be reduced after the proposed voltage reference assignment. The computational expense of the new formulation is also much lower than that of the heuristic approach.

distributed energy resource integration↗

Snorri Version 1.0

The software decomposes n-component time-series data into persistence vectors and provide visualizations of various summaries of this information. Persistence vectors are a type of vector, based on multidimensional persistent homology theory, which have magnitudes and directions that reflect dominant trends in the multi-component data. The software is a collection of MATLAB scripts, and thus MATLAB runs the scripts. The master script that calls other scripts is called Snorri. The purpose is thus analysis of time-series data to extract dominant trends or events and to classify the type of event. The software produces characteristic vectors (an average of the persistence vectors), which can have directions that reflect the overall dominant trend in a time-series data set. The MATLAB scripts have been partially converted to the PYTHON language and no do not have the full functionality of the MATLAB and are not fully tested; the python scripts are to be covered under this copyright assertion. Two versions of the PYTHON scripts are included, called: mph25.py and mph38.py, each with their own main.py file.

Callor, Nickolas↗

Data and scripts associated with a manuscript modeling microbial regulation of priming effects

This data package is associated with the publication “Modeling Microbial Regulatory Feedback in Organic Matter Decomposition Identifies Copiotrophic Traits as Key Drivers of Positive Priming” published as a preprint on BioRXiv by Ahamed et al. (2026); https://doi.org/10.1101/2024.08.11.607483. The package contains MATLAB scripts and saved simulation outputs used to implement a cybernetic model of microbial regulation during complex organic matter (OM) decomposition governing priming effects. It includes models of (i) single microbial functional groups (copiotrophic or oligotrophic degraders) and (ii) binary consortia composed of degraders and non-degraders with contrasting or common growth traits. Simulation results were generated using Monte Carlo analyses, with randomized key model parameters across a range of environmental mixing fractions of complex and labile OM. The dataset was created to provide a transparent and reusable computational framework for systematically exploring how microbial growth traits, metabolic regulation, and community composition influence OM decomposition dynamics and priming effects. For details on how to navigate data packages generated by this project, see https://data.ess-dive.lbl.gov/portals/PNNLRiverCorridorSFA/About. In addition to a readme, this data package also includes a file-level metadata (FLMD) file that describes each file and a data dictionary (DD) that describes the variable definitions. This package includes: (1) annotated MATLAB code implementing the system of ordinary differential equations and cybernetic control laws; (2) saved output files containing data (e.g., biomass, substrates, enzyme levels, priming metrics); and (3) scripts for processing saved outputs and regenerating figures. Specifically, the data package contains three main MATLAB scripts: runPrimingModel.m, runPlotData.m, and runPlotSuppFigS1.m, along with this readme and supporting documentation. Users should begin with runPrimingModel.m, which contains the annotated code implementing the system of ordinary differential equations and cybernetic control laws. This script runs the Monte Carlo simulations of microbial OM decomposition and allows users to modify microbial trait definitions, adjust parameter distributions, or define new community configurations. Simulation outputs are automatically saved as .mat files in the folder named SavedData, which stores all pre-generated results included in this package. The second script, runPlotData.m, reads files from the SavedData folder and processes them to regenerate the figures presented in the manuscript. The third script, runPlotSuppFigS1.m, specifically generates Figure S1 in the Supplementary Material of the manuscript. The package also includes the aforementioned files in non-proprietary .txt format. If users intend to use them, they should first save the files in their respective .m or .mat formats prior to execution in MATLAB.

Biomass concentration↗

Assessment of Long Term Creep Using Strain Rate Matching From the Stepped Isostress Method

Creep testing is an ongoing need, particularly with the development of new candidate alloy systems for advanced energy systems. The conventional creep test (CT) is regarded as a proven method to gather creep data however, the test is impractical due to being real-time: lasting up to 105 hours to characterize the service of long-lived turbomachinery components. Accelerated methods to gather the long-term creep properties of materials are needed to reduce the time to qualification of new materials. The time-temperature-stress-superposition principle (TTSSP) and the derivative time-temperature superposition principle (TTSP), time-stress superposition principle (TSSP), stepped isothermal method (SIM), and stepped isostress method (SSM) are accelerated creep tests (ACT) commonly used to predict the long-term creep behaviors of polymers and composites. The TTSP and TSSP tests require multiple specimen tested at various temperatures/stresses whereas the SIM and SSM tests employ a single specimen where temperature/stress are periodically step increased until rupture. The stepped creep deformation curve can then be time and strain shifted to produce a master creep curve. While these ACTs are useful tools to predict long-term creep, the drawback is the lack of mathematical laws to determine the virtual start time and time shift factors, especially for different materials. In this paper, a new self-calibration approach is developed and compared to existing SSM data for Kevlar 49. This new approach focuses on matching the creep strain rates between stress steps and fitting the data to a master curve using a modified theta projection model. This is performed using a MATLAB code consisting of five subroutines. The first subroutine takes the stress, time, and creep strain from SSM/SIM tests, and segregates the data intro arrays corresponding to each stress level. The second subroutine finds the constants for the modified theta projection model for each stress level. The third subroutine performs a time shift adjustment using creep strain rate matching. The fourth subroutine calculates the accelerated time of rupture. The last subroutine generates accelerated creep versus time plots. Kevlar 49 SSM data is gathered from literature and run through the MATLAB code. The master curves generated from the MATLAB are compared to the conventional creep curve of Kevlar 49 as well as the master curve gathered from literature in order to validate the feasibility of this new approach. The goal of this project is to vet if the self-calibration approach can produce results similar to the reference calibration approach.

36 MATERIALS SCIENCE↗

Motion Tracking Above and Below Water Dataset

This data set includes one trial of above and under water motion tracking measurements from a Qualysis motion tracking system. The Qualisys native .qtm file can be opened by the Qualisys Track Manager software. Data from this file has been exported to a tab separated value (.tsv) file which is a generic ASCII file format that can be read by a text editor, MATLAB, Excel, etc... Also exported is a native MATLAB formatted file (.mat) which can be loaded directly into MATLAB. The trial is from a three body wave energy converter device, using the underwater system for the central nacelle data, and above water system for the fore and aft floats.

16 TIDAL AND WAVE POWER↗

HERO WEC 2024 - Electrical Configuration Deployment Data

The following submission includes raw and processed electrical configuration deployment data from the in water deployment of NREL's Hydraulic and Electric Reverse Osmosis Wave Energy Converter (HERO WEC), in the form of parquet files, TDMS files, CSV files, bag files, and MATLAB workspaces. This dataset was collected in April 2024 at the Jennette's pier test site in North Carolina. Raw data as TDMS, CSV, and bag files are provided here alongside processed data in the form of MATLAB workspaces and Parquet files. This dataset includes the Python code used to process the data and MATLAB scripts to visualize the processed data. All data types, calculations, and processing is described in the included "Data Descriptions" document. All files in this dataset are described in detail in the included README. This data set has been developed by the National Renewable Energy Laboratory, operated by Alliance for Sustainable Energy, LLC, for the U.S. Department of Energy (DOE) under Contract No. DE-AC36-08GO28308. Funding provided by the U.S. Department of Energy Office of Energy Efficiency and Renewable Energy Water Power Technologies Office.

16 TIDAL AND WAVE POWER↗

HERO WEC Belt Test Data

The following submission includes raw and processed data from the 2024 Hydraulic and Electric Reverse Osmosis Wave Energy Converter (HERO WEC) belt tests conducted using NREL's Large Amplitude Motion Platform (LAMP). A description of the motion profiles run during testing can be found in the run log document. Data was collected using NREL's Modular Ocean Data AcQuisition (MODAQ) system in the form of TDMS files. Data was then processed using Python and MATLAB and converted to MATLAB workspace, parquet, and csv file formats. During Data processing, a low pass filter was applied to each array and the arrays were then resampled to common 10Hz timestamps. A MATLAB data viewer script is provided to quickly visualize these data sets. The following arrays are contained in each test data file: - Time: Unix seconds timestamp - Test_Time: Time in seconds since beginning of test - POS_OS_1001: Encoder position in degrees (the encoder is located on the secondary shaft of the spring return and is driven by the winch after a 4.5:1 gear reduction) - LC_ST_1001: Anchor load cell data in lbf - PRESS_OS_2002: Air spring pressure in psi This data set has been developed by the National Renewable Energy Laboratory, operated by Alliance for Sustainable Energy, LLC, for the U.S. Department of Energy (DOE) under Contract No. DE-AC36-08GO28308. Funding provided by the U.S. Department of Energy Office of Energy Efficiency and Renewable Energy Water Power Technologies Office.

16 TIDAL AND WAVE POWER↗

PMU Data Event Detection: A User Guide for Power Engineers

This user guide is intended to accompany a software package containing a Matrix Laboratory (MATLAB) script and related functions for processing phasor measurement unit (PMU) data. This package and guide have been developed by the National Renewable Energy Laboratory and the University of Texas at Austin. The objective of this data processing exercise is to discover events in the vast quantities of data collected by PMUs. This document attempts to cover some of the theory behind processing the data to isolate events as well as the functioning of the MATLAB scripts. The report describes (1) the algorithms and mathematical background that the accompanying MATLAB codes use to detect events in PMU data and (2) the inputs required from the user and the outputs generated by the scripts.

17 WIND ENERGY↗

W-4 W88 Systems Engineering Summer 2023 Project [Slides]

The purpose is to create a simple, streamlined process to produce reports on out of tolerance conditions with CMM data. The methods are to develop the code or process within MATLAB to import the data (import tool can be used) and to develop the code to be able to plot the data of interest. The end states are to use MATLAB to analyze CMM data from the PA and document the process for a user with some knowledge of MATLAB and an engineering background.

42 ENGINEERING↗

Deadband Voltage Control and Power Buffering for Extreme Fast Charging Station

Voltage fluctuation is one of the most common challenges that electric vehicle charging station (EVCS) may introduce to the power grid. Local reactive power compensation (Q-compensation) capability of bi-directional electric vehicle (EV) chargers can mitigate the steady-state voltage violations caused by the EV charging itself or changes in the neighboring loads. Power buffering, using energy storage system (ESS), can be utilized to address the voltage transients (sags and swells) as a result of EV charging at the EVCS. To address PI controller’s ‘hunting’ issue, this paper proposes a Q-sign triggered deadband voltage control (V-control) method at the point of common coupling (PCC). In addition, to ensure the ramp rate of EV charging is within the allowable limits set forth by the grid code, a ramp rate control is proposed that uses the ESS as a ‘power buffer’. Lastly, different from most reported work in the literature where no explicit limit of the power electronic converters (PECs) is considered, this work considers a reasonable apparent power capacity limit of the PECs when achieving the V-control. This limit also affects the amount of active power that can be obtained from the grid, and subsequently may require ESS to function as ‘load sharing’ device to provide supplemental active power to satisfy EV load. A case study simulated in MATLAB (interfaced with PLECS) is presented to demonstrate the effectiveness of the proposed approaches for EVCS operation.

24 POWER TRANSMISSION AND DISTRIBUTION↗

SU-E-T-37: A GPU-Based Pencil Beam Algorithm for Dose Calculations in Proton Radiation Therapy

Purpose: Recent developments in radiation therapy have been focused on applications of charged particles, especially protons. Over the years several dose calculation methods have been proposed in proton therapy. A common characteristic of all these methods is their extensive computational burden. In the current study we present for the first time, to our best knowledge, a GPU-based PBA for proton dose calculations in Matlab. Methods: In the current study we employed an analytical expression for the protons depth dose distribution. The central-axis term is taken from the broad-beam central-axis depth dose in water modified by an inverse square correction while the distribution of the off-axis term was considered Gaussian. The serial code was implemented in MATLAB and was launched on a desktop with a quad core Intel Xeon X5550 at 2.67GHz with 8 GB of RAM. For the parallelization on the GPU, the parallel computing toolbox was employed and the code was launched on a GTX 770 with Kepler architecture. The performance comparison was established on the speedup factors. Results: The performance of the GPU code was evaluated for three different energies: low (50 MeV), medium (100 MeV) and high (150 MeV). Four square fields were selected for each energy, and the dose calculations were performed with both the serial and parallel codes for a homogeneous water phantom with size 300×300×300 mm3. The resolution of the PBs was set to 1.0 mm. The maximum speedup of ∼127 was achieved for the highest energy and the largest field size. Conclusion: A GPU-based PB algorithm for proton dose calculations in Matlab was presented. A maximum speedup of ∼127 was achieved. Future directions of the current work include extension of our method for dose calculation in heterogeneous phantoms.

60 APPLIED LIFE SCIENCES↗

SU-E-T-231: Cross-Validation of 3D Gamma Comparison Tools

Purpose: Moving the computational analysis for 3D gel dosimetry into the 3D Slicer (www.slicer.org) environment has made gel dosimetry more clinically accessible. To ensure accuracy, we cross-validate the 3D gamma comparison module in 3D Slicer with an independently developed algorithm using simulated and measured dose distributions. Methods: Two reference dose distributions were generated using the Varian Eclipse treatment planning system. The first distribution consisted of a four-field box irradiation delivered to a plastic water phantom and the second, a VMAT plan delivered to a gel dosimeter phantom. The first reference distribution was modified within Eclipse to create an evaluated dose distribution by spatially shifting one field by 3mm, increasing the monitor units of the second field, applying a dynamic wedge for the third field, and leaving the fourth field unchanged. The VMAT plan was delivered to a gel dosimeter and the evaluated dose in the gel was calculated from optical CT measurements. Results from the gamma comparison tool built into the SlicerRT toolbox were compared to results from our in-house gamma algorithm implemented in Matlab (via MatlabBridge in 3D Slicer). The effects of noise, resolution and the exchange of reference and evaluated designations on the gamma comparison were also examined. Results: Perfect agreement was found between the gamma results obtained using the SlicerRT tool and our Matlab implementation for both the four-field box and gel datasets. The behaviour of the SlicerRT comparison with respect to changes in noise, resolution and the role of the reference and evaluated dose distributions was consistent with previous findings. Conclusion: Two independently developed gamma comparison tools have been cross-validated and found to be identical. As we transition our gel dosimetry analysis from Matlab to 3D Slicer, this validation serves as an important test towards ensuring the consistency of dose comparisons using the 3D Slicer environment.

60 APPLIED LIFE SCIENCES↗

Investigating ion recombination effects in a liquid-filled ionization chamber array used for IMRT QA measurements

Purpose: PTW’s Octavius 1000 SRS array performs IMRT quality assurance (QA) measurements with liquid-filled ionization chambers (LICs) to allow closer detector spacing and higher resolution, compared to air-filled QA devices. However, reduced ion mobility in LICs relative to air leads to increased ion recombination effects and reduced collection efficiencies that are dependent on Linac pulse frequency and pulse dose. These pulse parameters are variable during an IMRT delivery, which affects QA results. In this study, (1) 1000 SRS collection efficiencies were measured as a function of pulse frequency and pulse dose, (2) two methods were developed to correct changes in collection efficiencies during IMRT QA measurements, and the effects of these corrections on QA pass rates were compared. Methods: To obtain collection efficiencies, the OCTAVIUS 1000 SRS was used to measure open fields of varying pulse frequency, pulse dose, and beam energy with results normalized to air-filled chamber measurements. Changes in ratios of 1000 SRS to chamber measured dose were attributed to changing collection efficiencies, which were then correlated to pulse parameters using regression analysis. The usefulness of the derived corrections was then evaluated using 6 MV and 10FFF SBRT RapidArc plans delivered to the OCTAVIUS 4D system using a TrueBeam (Varian Medical Systems) linear accelerator equipped with a high definition multileaf collimator. For the first correction, MATLAB software was developed that calculates pulse frequency and pulse dose for each detector, using measurement and DICOM RT Plan files. Pulse information is converted to collection efficiency, and measurements are corrected by multiplying detector dose by ratios of calibration to measured collection efficiencies. For the second correction the MU/min in the daily 1000 SRS calibration was chosen to match the average MU/min of the volumetric modulated arc therapy plan. Effects of the two corrections on QA results were examined by performing 3D gamma analysis comparing predicted to measured dose, with and without corrections. Results: Collection efficiencies correlated linearly to pulse dose, while correlations with pulse frequency were less defined, generally increasing as pulse frequency decreased. After complex MATLAB corrections, average 3D gamma pass rates improved by [0.07%,0.40%,1.17%] for 6 MV and [0.29%,1.40%,4.57%] for 10FFF using [3%/3 mm,2%/2 mm,1%/1 mm] criteria. Maximum changes in gamma pass rates were [0.43%,1.63%,3.05%] for 6 MV and [1.00%,4.80%,11.2%] for 10FFF using [3%/3 mm,2%/2 mm,1%/1 mm] criteria. On average, pass rates of simple daily calibration corrections were within 1% of complex MATLAB corrections. Conclusions: OCTAVIUS 1000 SRS ion recombination effects have little effect on 6 MV measurements. However, the effect could potentially be clinically significant for higher pulse dose unflattened beams when using tighter gamma tolerances, especially when small aperture sizes are used, as is common for SRS/SBRT. In addition, ion recombination effects are strongly correlated to changing MU/min, therefore MU/min used in daily 1000 SRS calibrations should be matched to the expected average MU/min of the IMRT plan.

60 APPLIED LIFE SCIENCES↗

SU-F-T-584: Investigating Correction Methods for Ion Recombination Effects in OCTAVIUS 1000 SRS Measurements

Purpose: PTW’s Octavius 1000 SRS array performs IMRT QA measurements with liquid filled ionization chambers (LICs). Collection efficiencies of LICs have been shown to change during IMRT delivery as a function of LINAC pulse frequency and pulse dose, which affects QA results. In this study, two methods were developed to correct changes in collection efficiencies during IMRT QA measurements, and the effects of these corrections on QA pass rates were compared. Methods: For the first correction, Matlab software was developed that calculates pulse frequency and pulse dose for each detector, using measurement and DICOM RT Plan files. Pulse information is converted to collection efficiency and measurements are corrected by multiplying detector dose by ratios of calibration to measured collection efficiencies. For the second correction, MU/min in daily 1000 SRS calibration was chosen to match average MU/min of the VMAT plan. Usefulness of derived corrections were evaluated using 6MV and 10FFF SBRT RapidArc plans delivered to the OCTAVIUS 4D system using a TrueBeam equipped with an HD- MLC. Effects of the two corrections on QA results were examined by performing 3D gamma analysis comparing predicted to measured dose, with and without corrections. Results: After complex Matlab corrections, average 3D gamma pass rates improved by [0.07%,0.40%,1.17%] for 6MV and [0.29%,1.40%,4.57%] for 10FFF using [3%/3mm,2%/2mm,1%/1mm] criteria. Maximum changes in gamma pass rates were [0.43%,1.63%,3.05%] for 6MV and [1.00%,4.80%,11.2%] for 10FFF using [3%/3mm,2%/2mm,1%/1mm] criteria. On average, pass rates of simple daily calibration corrections were within 1% of complex Matlab corrections. Conclusion: Ion recombination effects can potentially be clinically significant for OCTAVIUS 1000 SRS measurements, especially for higher pulse dose unflattened beams when using tighter gamma tolerances. Matching daily 1000 SRS calibration MU/min to average planned MU/min is a simple correction that greatly reduces ion recombination effects, improving measurements accuracy and gamma pass rates. This work was supported by PTW.

60 APPLIED LIFE SCIENCES↗

Simit: A Language for Physical Simulation

With existing programming tools, writing high-performance simulation code is labor intensive and requires sacrificing readability and portability. Here, the alternative is to prototype simulations in a high-level language like Matlab, thereby sacrificing performance. The Matlab programming model naturally describes the behavior of an entire physical system using the language of linear algebra. However, simulations also manipulate individual geometric elements, which are best represented using linked data structures like meshes. Translating between the linked data structures and linear algebra comes at significant cost, both to the programmer and to the machine. High-performance implementations avoid the cost by rephrasing the computation in terms of linked or index data structures, leaving the code complicated and monolithic, often increasing its size by an order of magnitude. In this article, we present Simit, a new language for physical simulations that lets the programmer view the system both as a linked data structure in the form of a hypergraph and as a set of global vectors, matrices, and tensors depending on what is convenient at any given time. Simit provides a novel assembly construct that makes it conceptually easy and computationally efficient to move between the two abstractions. Using the information provided by the assembly construct, the compiler generates efficient in-place computation on the graph. We demonstrate that Simit is easy to use: a Simit program is typically shorter than a Matlab program; that it is high performance: a Simit program running sequentially on a CPU performs comparably to hand-optimized simulations; and that it is portable: Simit programs can be compiled for GPUs with no change to the program, delivering 4 to 20× speedups over our optimized CPU code.

97 MATHEMATICS AND COMPUTING↗

GridPV Toolbox

Matlab Toolbox for simulating the impact of solar energy on the distribution grid. The majority of the functions are useful for interfacing OpenDSS and MATLAB, and they are of generic use for commanding OpenDSS from MATLAB and retrieving GridPV Toolbox information from simulations. A set of functions is also included for modeling PV plant output and setting up the PV plant in the OpenDSS simulation. The toolbox contains functions for modeling the OpenDSS distribution feeder on satellite images with GPS coordinates. Finally, example simulations functions are included to show potential uses of the toolbox functions.

Broderick, Robert↗

QCLAB v0.1

QCLAB is an object-oriented MATLAB package for creating and representing quantum circuits. QCLAB can be used for rapid prototyping and testing of quantum algorithms, and allows for fast algorithm development and discovery. QCLAB provides I/O through openQASM making it compatible with quantum hardware. It is uniquely targeted at MATLAB users who so far didn't have any native MATLAB options for developing quantum computing applications.

Van Beeumen, RoelMaria Franciscus↗