Contenuto principale

addHPPCTest

Add new HPPCTest object to HPPCTestSuite object

Since R2025a

Description

addHPPCTest(suite,newHPPCTest) adds the HPPCTest object, newHPPCTest, to the HPPCTestSuite object, suite.

example

addHPPCTest(suite,newHPPCTest,Temperature=temp) adds the HPPCTest object, newHPPCTest, to the HPPCTestSuite object, suite, and overwrites the temperature value for all pulses in newHPPCTest with temp.

Examples

collapse all

This example shows how to add the data of an HPPCTest object inside an HPPCTestSuite object.

Open the DownloadBatteryData example to load the required HPPC data obtained for a BAK 2.9 Ah battery cell at 0, 10, and 25 °C. Each data consists of a table with three columns. The columns of the table refer to time, voltage, and current values, respectively.

openExample("simscapebattery/DownloadBatteryDataExample")

Load the data and store each data inside an HPPCTest object by using the hppcTest function. You can use this object to view the data, add or edit breakpoints, add or remove pulses, and include additional information such as state of charge and capacity. The HPPC data is a table, so you must also specify each column name by using the TimeVariable, VoltageVariable, and CurrentVariable arguments. These names must match the names of the columns in the hppcData table.

load("testDataBAKcells/hppcDataBAKcell0degC.mat")
hppcExp0degC = hppcTest(hppcData,TimeVariable="time (s)",... 
VoltageVariable="voltage (V)",...
CurrentVariable="current (A)",...
Temperature=zeros(numel(hppcData(:,1)),1));

load("testDataBAKcells/hppcDataBAKcell10degC.mat")
hppcExp10degC = hppcTest(hppcData,TimeVariable="time (s)",...
VoltageVariable="voltage (V)",...
CurrentVariable="current (A)",...
Temperature=repmat(10,numel(hppcData(:,1)),1));

load("testDataBAKcells/hppcDataBAKcell25degC.mat")
hppcExp25degC = hppcTest(hppcData,TimeVariable="time (s)",...
VoltageVariable="voltage (V)",...
CurrentVariable="current (A)",...
Temperature=repmat(25,numel(hppcData(:,1)),1));

Create a data container for the three HPPCTest objects by using the hppcTestSuite function.

hppcSuite1 = hppcTestSuite([hppcExp0degC;hppcExp10degC;hppcExp25degC]);
disp(hppcSuite1.SuiteSummary)
    TestID                      Test                      Temperature    NumPulses
    ______    ________________________________________    ___________    _________

      1       1×1 simscape.battery.parameters.HPPCTest         0            18    
      2       1×1 simscape.battery.parameters.HPPCTest        10            18    
      3       1×1 simscape.battery.parameters.HPPCTest        25            18    

The addHPPCTest function is useful when you want to add the test data to an existing HPPCTestSuite object. For this example, you load the HPPC data obtained for a BAK 2.9 Ah battery cell at 35 °C and store it inside another HPPCTest object.

load("testDataBAKcells/hppcDataBAKcell35degC.mat")
hppcExp35degC = hppcTest(hppcData,TimeVariable="time (s)",...
VoltageVariable="voltage (V)",...
CurrentVariable="current (A)",...
Temperature=repmat(35,numel(hppcData(:,1)),1));

Add the data from this HPPCTest object to the test container, hppcSuite1, by using the addHPPCTest function.

addHPPCTest(hppcSuite1,hppcExp35degC);
disp(hppcSuite1.SuiteSummary)
    TestID                      Test                      Temperature    NumPulses
    ______    ________________________________________    ___________    _________

      1       1×1 simscape.battery.parameters.HPPCTest         0            18    
      2       1×1 simscape.battery.parameters.HPPCTest        10            18    
      3       1×1 simscape.battery.parameters.HPPCTest        25            18    
      4       1×1 simscape.battery.parameters.HPPCTest        35            18    

Input Arguments

collapse all

Hybrid pulse power characterization (HPPC) test suite to update with the new HPPCTest object, specified as an HPPCTestSuite object.

HHPPC test data to add to the HPPCTestSuite object, specified as an HPPCTest object.

Temperature value, specified as a scalar or vector.

Data Types: double

Version History

Introduced in R2025a