Li-ion battery calibration - Not able to disable parallel computing

4 Ansichten (letzte 30 Tage)
Marc-Antoine
Marc-Antoine am 15 Jan. 2025
Kommentiert: Marc-Antoine am 16 Jan. 2025
Hi, I am trying to run the calibration process described in the following example provided by matlab:
It is a script to estimate battery parameters based on "psObj — Instance of Battery.PulseSequence" class.
I have all the toolbox required to run the simulation. However, I do not have the parallel computing toolbox. So in the code I have changed the optimization parameters to take this in consideration:
SDOOptimizeOptions = sdo.OptimizeOptions(...
'OptimizedModel',psObj.ModelName,...
'Method','lsqnonlin',...
'UseParallel',false);
SDOOptimizeOptions.MethodOptions.Display = 'final';
psObj.estimateParameters(...
'CarryParamToNextPulse',true,... %Set this true to use the final parameter values from the prior pulse and SOC as initial values for the next pulse and SOC
'SDOOptimizeOptions',SDOOptimizeOptions,... %Specify the SDO options object
'ShowPlots',true,... %Set this true if you want to see plots while this runs
'EstimateEm',true,... %Set this true to allow the optimizer to change Em further in this step
'RetainEm',true,... %Set this true keep any changes made to Em in this step
'EstimateR0',true,... %Set this true to allow the optimizer to change R0 further in this step
'RetainR0',true); %Set this true keep any changes made to R0 in this step
I set "UseParallel" to false.
But I get an error message when running line:
psObj.estimateParameters(...
The error message is:
gcp requires Parallel Computing Toolbox.
Error in Battery.DistributedParameterManager/distributeParameters
Error in Battery.PulseSequence/estimateParameters
What I am I doing wrong here?
Matlab version 24.2.0.2806996 (R2024b) Update 3, just installed is.
Thank you
  3 Kommentare
Walter Roberson
Walter Roberson am 16 Jan. 2025
In theory those two calls are equivalent.
Marc-Antoine
Marc-Antoine am 16 Jan. 2025
I confirm it generates same the result:

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Edric Ellis
Edric Ellis am 16 Jan. 2025
The doc page you reference https://uk.mathworks.com/help/autoblks/ref/battery.pulsesequence.estimateparameters.html states that you need Parallel Computing Toolbox to use that:
To use the Battery.PulseSequence object and methods, you need these products:
  • Powertrain Blockset™
  • Curve Fitting Toolbox™
  • Optimization Toolbox™
  • Parallel Computing Toolbox™
  • Simulink® Design Optimization™
  1 Kommentar
Marc-Antoine
Marc-Antoine am 16 Jan. 2025
Well, it seems I missed that important point, thank you!
In the past (2021) we however were able to run the example without using the parallel computing toolbex, by setiting "UseParallel" to false. Maybe there was an update on the example since then?
I though the parallel computing function were there to accelerate the calculation process only, in my case I dont mind if it takes 5-10X the time.
Any thought on that?
Thank you very much to all for your input

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by