RC circuit simulation data and look up table mismatch. Help!
24 views (last 30 days)
Show older comments
Dear all,
I have an issue with a mismatch in simulation data. I generated simulattion using below RC circuits, but the generated data does not match Look up table!
openExample('simscape/LithiumBatteryCellOneRCBranchEquivalentCircuitExample')

I am working on this RC circuit simulation for HPPC test to extract parameters and I have 2 questions regarding on this model. I am new to this field so much appreciate for your help!
- I used the default setup of this model, without changing anything. In this model, LUT tables already have data. For example, at T = 20 + 277.15, SOC =1, R0 = 0.0085. I run the model with step size 1, 100 and fix step size 1. At the first discharge pulse, I used Voltage before and After the ohmic drop to calculation internal resistance R0. The result is R0= 0.00861 for all 3 cases. This results seem close ( 0.00861 vs 0.0085) but I really need an accurate results because R0 at different SOC levels are very similar. How can I adjust the model to get the same number as LUT?
This is Ro with variable step size 1

This is R0 with fix step size 1

2. The results is close for R0, but for R1. It was totally different. Correctly me if I was wrong because I am new to this. There are different sources shows how to calculate R1. From my understand, I can get R1 from the voltage different in Polarization process or Voltage relaxation process, then use curve fitting to find constant time tau, then C1 = tau/R1. However, in both cases, I got bad results that not even close to R1_LUT. How can I can make it right?

And again, I used the the default model above, without changing any thing, I only used variable step with max step size = 1, 100 anf fix step size 1 in model settings solver
Thank you so much in advance!
0 Comments
Answers (2)
Sameer
on 8 Aug 2025 at 6:17
Hi @Thanh
The small difference in R0 (0.0085 Ω in LUT vs. ~0.00861 Ω measured) is normal. It’s caused by solver step timing, numerical tolerances, and possible interpolation in the SOC/temperature lookup. The battery block updates R0 each step based on current SOC and T, so even tiny changes will shift it slightly.
To match LUT more closely:
- Use a smaller fixed step or tighter solver tolerances (RelTol ≤ 1e-5).
- Keep temperature constant (disable thermal dynamics).
- Capture voltage exactly at the current step change (use hit-crossing or fine time step).
For R1 extraction:
- After the pulse, fit the voltage relaxation to an exponential:
- Compute
, then
.
- Use a long enough rest period and smooth data before fitting.
Even with best practices, expect ≤0.1 % deviation from LUT due to solver integration and interpolation that’s within the model’s numerical accuracy.
Hope this helps!
0 Comments
See Also
Categories
Find more on Electrical Systems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!