Skip to content

PulseTestEmulator

Synthetic pulse-test data generator for PBM in Simulink.

This class builds, configures, runs, and post-processes synthetic pulse tests across C-rates, ambient temperatures, and SoC breakpoints using a physics-based cell model and a cycler block. Simulations are configured from a JSON file or MATLAB struct, executed in parallel, and results are returned as tables suitable for downstream analysis.

Syntax

obj = PulseTestEmulator(inputfile, bmjn)

Constructor Input Arguments

Name Type Description
inputfile char|string|struct Path to JSON configuration file or MATLAB struct with fields: cellModel, ambientTemps_degC, C_rates, SoCs.charge, SoCs.discharge, t_rest_before_sec, t_duration_sec, t_rest_after_sec, heatTransCoeff_SI.
bmjn double Breathe Model JSON Number for parameter set BMJN_<bmjn>.json.

Methods

Name Description
Build_Simulink_Model() Build cycler + cell model and create the Simulink model.
Initialise_Simulink_Model() Prepare experiment table and simulation input objects.
Print_Number_Of_Experiments() Display number of simulations configured.
Run_Simulation() Run simulations in parallel (parsim) and store outputs.
Get_Results_Struct() Return nested struct of tables indexed by mode, temperature, C-rate, and SoC.
Plot_Battery_Condition('c_rate', x, 'T_amb', y, 'soc', z) Plot variables for a specified condition.
PulseTestEmulator.Show_Model_Operating_Ranges(bmjn) Static: print validated operating ranges from BMJN metadata.

Properties

Name Type Description
bmjn double Selected model identifier.
slx_mdl Design_of_Experiments.SimscapeSimModel Built Simulink model.
simins Simulink.SimulationInput Array of simulation input objects.
simouts Simulink.SimulationOutput Array of simulation outputs after run.
input_params struct Parsed configuration inputs.
nexp uint16 Number of experiments configured.
siminTable table Experiment matrix: {'expName','C_rate','current','SoC','T_amb','T0'}.
paramMetaData struct Metadata from BMJN file (e.g., capacity, area).

Examples

Basic Usage

cfg = jsondecode(fileread("path/to/pulse_config.json"));
p = PulseTestEmulator(cfg, 1000);
p.Build_Simulink_Model();
p.Initialise_Simulink_Model();
p.Run_Simulation();
result = p.Get_Results_Struct();

Plot a Condition

p.Plot_Battery_Condition('c_rate', -1, 'T_amb', 25, 'soc', 0.5);

See also