how to build a model in simulink

2 views (last 30 days)
sandeep
sandeep on 27 Sep 2022
I am trying to implement an ageing model equation of a battery in Simulink to see the capacity loss(Q_loss).
my equation is Q_loss=B*exp⁡(-E_a/RT)*(A_h )^Z. Qloss is the percentage of capacity loss.
B,E_a and Z are the parameter coefficients. R is the gas constant and T is the temperature.
I have the values of Q_loss and A_h,now my question is should i extract the parameters using these values and put them in my Simulink model? if I do like that I will get Q_loss as a single value.
but I want to see how capacity loss is varying, in that case, how can I do that?
find the attached files for better understanding.
any thoughts and help are much appreciated.
  1 Comment
Sam Chak
Sam Chak on 28 Sep 2022
The temperature T (after division by R and then multiplied by T) is not provided.
Data = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1138180/cycling_dataset.question.xlsx')
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
Data = 454×5 table
Cyclenumber QDischargePerCycle_mah AccumulatedAh_throughput_ma_h Qloss QlossInPercentage ___________ ______________________ _____________________________ ______ _________________ 1 3315.6 3315.6 184.36 5.2674 2 3310.6 6626.2 189.44 5.4127 3 3305.8 9932 194.22 5.5493 4 3301.1 13233 198.86 5.6817 5 3295.9 16529 204.06 5.8302 6 3291 19820 209.01 5.9716 7 3285.9 23106 214.1 6.1171 8 3281.5 26387 218.54 6.244 9 3277 29664 223 6.3714 10 3272.8 32937 227.18 6.4908 11 3268.4 36206 231.62 6.6176 12 3264.6 39470 235.39 6.7253 13 3260.6 42731 239.35 6.8386 14 3256.8 45988 243.23 6.9495 15 3253.2 49241 246.78 7.0509 16 3249.4 52490 250.57 7.1591
in = Data.QDischargePerCycle_mah;
out = Data.QlossInPercentage;
plot(in, out, '.'), grid on

Sign in to comment.

Answers (1)

Ananda Sankar Chakraborty
Ananda Sankar Chakraborty on 28 Sep 2022
Hi Sandeep,
At a high-level there are two approaches:
  1. The first one involves doing everything within Simulink. The Parameter Estimator tool should help with this. Here are shipped examples on Importing and Preprocessing Experiment Data (using GUI) and Estimating Model Parameter Values (using GUI) that should help you understand how to use this tool. For this you will need a Simulink Design Optimization license.
  2. The second involves leveraging MATLAB Math toolboxes. There are few functionalities here including using fit (Curve Fitting Toolbox) and/or fsolve (Optimization Toolbox). This MATLAB Answer lists a few available options along with custom code provided by the community for the estimation problem.
Do feel free to choose the option that best fits your needs from these! Hope this helps.

Community Treasure Hunt

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

Start Hunting!