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

2 次查看(过去 30 天)
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 个评论

请先登录,再进行评论。

回答(1 个)

Edric Ellis
Edric Ellis 2025-1-16
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 个评论
Marc-Antoine
Marc-Antoine 2025-1-16
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Particle Swarm 的更多信息

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by