Effacer les filtres
Effacer les filtres

Error in Battery.Pu​lsesequenc​e/Createpu​lses

82 vues (au cours des 30 derniers jours)
Simha Sreekar
Simha Sreekar le 1 Août 2024 à 11:20
Commenté : Umar il y a environ 23 heures
Hello everyone,
I am trying to implement the Battery Pulse sequence object for the dataset I have currently.
The example dataset consists of 26 pulses and my dataset has 11.
When I am trying to implement the Pulse sequence object to my dataset, I am ending up with the following error message:
"Index in position 1 exceeds array bounds. Index must not exceed 11.
Error in Battery.PulseSequence/createPulses
Error in Trial_script_test_data (line 30)
psObj.createPulses('CurrentOnThreshold',3) %minimum current magnitude to identify pulse events"
How and where do I define the pulses as 11 in 'createpulses'
psObj.createPulses(...
'CurrentOnThreshold',3,... %minimum current magnitude to identify pulse events
'NumRCBranches',2,... %how many RC pairs in the model
'RCBranchesUse2TimeConstants',false,... %do RC pairs have different time constant for discharge and rest?
'PreBufferSamples',2,... %how many samples to include before the current pulse starts
'PostBufferSamples',4); %how many samples to include after the next pulse starts
This is my version of the script.
  3 commentaires
Umar
Umar le 5 Août 2024 à 15:06

Hi @Simha Sreekar,

Will this help you out, Simulink.SubSystem.convertToModelReference

Hoping to see @Manikanta Aditya expertise resolving this problem.

Umar
Umar le 5 Août 2024 à 17:00
Modifié(e) : Umar le 5 Août 2024 à 17:02
Hi @ Manikanta Aditya,
Please see attached.

Connectez-vous pour commenter.

Réponse acceptée

Umar
Umar le 5 Août 2024 à 11:44
Modifié(e) : Umar le 5 Août 2024 à 12:10

Hi @ Simha Sreekar,

No problem. Hope, this is what you are looking for, Battery.PulseSequence

Forgot to add this link, Generate Parameter Data for Equivalent Circuit Battery Block

Plus de réponses (1)

Divyam
Divyam le 6 Août 2024 à 4:22
It appears that you have loaded the data from the example file and are trying to add pulses to the same 'Pulse Sequence' object.
Try creating another 'Pulse Sequence' object and then load the data from your personal files. Here is the code for your reference:
psObj = Battery.PulseSequence;
FileName = '<Insert personal MAT file name here to add your pulse data>';
[time,voltage,current] = Battery.loadDataFromMatFile(FileName);
addData(psObj,time,voltage,current);
psObj.createPulses(...
'CurrentOnThreshold',3,...
'NumRCBranches',2,...
'RCBranchesUse2TimeConstants',false,...
'PreBufferSamples',2,...
'PostBufferSamples',4);
To change the number of RC branches you can use the 'createPulses' function and edit the 'NumRCBranches' parameter.
For more information here is the documentation for generating appropriate parameter data for your circuit: https://www.mathworks.com/help/autoblks/ug/generate-parameter-data-for-estimations-circuit-battery-block.html
  4 commentaires
Umar
Umar le 23 Août 2024 à 15:13

Hi @ Simha Sreekar,

Please see my response to your comments below.

Where can I find more documentation of the model? (including the mathematical formulae used to determine the parameters)

Refer to comments #1&2.

How do I estimate the accuracy of the ECM parameters calculated?

Comment#1: Estimating the accuracy of ECM parameters involves a multi-faceted approach combining experimental validation, sensitivity analysis, optimization techniques, and careful consideration of documentation. If you apply these methods systematically, you can enhance the reliability of your battery simulations significantly. I came across this documentation on mathworks website, and it provides valuable information that aligns with information you are seeking.

https://www.mathworks.com/help/autoblks/ug/generate-parameter-data-for-datasheet-battery-block.html

In the script, we defined the min and max values of the time constants: In this case, I want to determine 1 RC data, How do define the min and max values for the time constants.

Comment#2: The script that you provided in your posted comments is derived from the link below. I will suggest you should review the information in link below which will help answer your question.

https://www.mathworks.com/help/autoblks/ug/generate-parameter-data-for-estimations-circuit-battery-block.html

Please let me know if you have any further questions.

Umar
Umar il y a environ 23 heures
Hi @Simha Sreekar,
Did you make any progress, please update me.

Connectez-vous pour commenter.

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by