2D Interpolation for SOC-OCV Lookup Table

13 visualizzazioni (ultimi 30 giorni)
Gokul Gopakumar
Gokul Gopakumar il 30 Gen 2024
Risposto: Drishti il 14 Ago 2024
Hallo,
Currently i am working on writing a programme for a 2D Interpolation from a lookup table. I have attached the lookup Table. I am encountering some issues related to this. I am attaching the programme. Can someone please let me know how to rectify these issues. The Programme 'SOCOCVLUT' is working fine. There i am building a struct. The Programme 'TwoDInterpolation1' is the one which is not working. Any help will be appreciated.

Risposte (1)

Drishti
Drishti il 14 Ago 2024
Hello Gokul,
I understand that you are encountering issue in finding the 2D Interpolation on the provided tabular data.
While reproducing the issue in MATLAB R2024a, I found that the parameter ‘Temperature’ was not declared in the file ‘TwoDInterpolation1’. Furthermore, the tabular data should be converted to numeric form before utilizing it.
Please refer to the code below for better understanding.
% Extract the relevant columns and convert them to arrays
% Convert tables to numeric arrays
SOCRowCharge = SOCOCV.SOCRowCharge{:, 1};
TempColumnCharge = SOCOCV.TempColumnCharge{1, :};
VoltDataCharge = SOCOCV.VoltDataCharge{:,:};
% Define the Temperature variable
Temperature = 25; % Example temperature in °C, adjust as needed
% Perform the 2D interpolation
SOC = interp2(TempColumnCharge, SOCRowCharge, VoltDataCharge, Temperature, 3.3538);
% Display the result
disp(['Interpolated SOC at 3.353V and ', num2str(Temperature), '°C: ', num2str(SOC)]);
For more information, refer to the MATLAB Documentation
Hope it resolves your query.

Categorie

Scopri di più su Nonlinearity in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by