How to use 3D surface from cftool in Simulink lookup table?

Hello! I am designig a battery model with an internal resistance which is dependant on two variables: SoC and temperature. I have interpolated the data I have with MATLAB's curve fitting toolbox and was able to generate the desired 3D map of that dependence (see attached picture). My question is how can I use that map now for my Simulink model? As input parameters I will have SoC and temperature and the resistance in ohm should be the output. However, I have not been able to find a convenient way to export the data in a suitable lookup table (or similarly useful, my first guess was that I should use a 2-D lookup table in this case) in Simulink. What approach do you suggest for this? Thanks in advance

 Akzeptierte Antwort

Ville Kumlander
Ville Kumlander am 29 Aug. 2018

1 Stimme

Hi! I had the same kind of problem in a different topic. I had measurement data of two variables giving the third one as wished output. I interpolated that measurement data with 'scatteredInterpolant' at predefined points. Then I was able to insert those values at given points into 2-D lookup table. This solution is not using the 3D map/surface as an input to lookup table, but it was accurate enough to overcome my problem.

1 Kommentar

Alex Cascatau
Alex Cascatau am 29 Aug. 2018
Bearbeitet: Alex Cascatau am 29 Aug. 2018
Yep, that's the solution I used in the end as well. I used two for-loops to populate my table data matrix from the 'fittedmodel' output and it worked.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Produkte

Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by