Incompatible array sizes error in hppcTest

35 Ansichten (letzte 30 Tage)
Raghunandan Pratoori
Raghunandan Pratoori am 14 Okt. 2025
Kommentiert: Xiangchun am 25 Nov. 2025 um 18:11
Hello team,
I am using the Simscape battery toolbox to estimate ECM Parameters from HPPC test data following the similar example provided.
When I load my hppc data, and run hppcTest, I get the error
Arrays have incompatible sizes for this operation.
The data has many pulses. However, when I choose only data for 1 pulse, it works fine.
Here is my code snippet -
```
% Load the CSV file
data = readtable('240419_1C_Disharge_HPPC_25.csv');
% Create simple table with renamed columns
hppcData = table(data.Ch7_Time_Second_, data.Ch7_Voltage_V_, data.Ch7_Current_A_, ...
'VariableNames', {'Time', 'Voltage', 'Current'});
% Display to verify
disp('Table created:');
disp(head(hppcData));
disp('Size of table:');
disp(size(hppcData));
% Create hppcTest object
hppcExp25degC = hppcTest(hppcData, ...
'TimeVariable', 'Time', ...
'VoltageVariable', 'Voltage', ...
'CurrentVariable', 'Current', ...
'Capacity', 50, ...
'InitialSOC', 1.0);
```
  2 Kommentare
Hai
Hai am 24 Nov. 2025 um 21:21
Verschoben: Walter Roberson am 25 Nov. 2025 um 0:13
I expereienced the same issue when store HPPC data to 'hppcTest' object. Any follow-up on this error? How to contact Mathwork for this kind of error for support?
Xiangchun
Xiangchun am 25 Nov. 2025 um 18:11
Hi @Hai,
As mentioned in the answer, I would personally recommend using the Model-Based Calibration Toolbox for estimating battery Equivalent Circuit Model (ECM) parameters.
As to your question on how to contact MathWorks for support, you can start with the options on this webpage: Contact Support - MATLAB & Simulink.
Best wishes,
Xiangchun

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Xiangchun
Xiangchun am 16 Okt. 2025
From what has been shared, I can not tell what might have caused the issue. However, you can use debug capabilities in MATLAB to troubleshoot the issue: Debug MATLAB Code Files - MATLAB & Simulink and pinpoint what is causing the array size mismatch.
Alternatively, I highly recommend that we use Model-Based Calibration Toolbox (MBC) for battery Equivalent Circuit Model (ECM) parameter estimation. Please see an example here: Characterize Battery Block Parameters in CAGE - MATLAB & Simulink. In MBC, you only need to write code to organize the experiment data based on HPPC tests, and the optimization is done via an intuitive app. Most importantly, it is capable of estimating multiple typical RC tables (depending on both temperature and SOC) in a few minutes. It can also work with a variety of current profiles beyond HPPC, including drive cycle profiles.
Best wishes,
Xiangchun

Kategorien

Mehr zu Simscape Battery finden Sie in Help Center und File Exchange

Produkte


Version

R2025b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by