2D Interpolation for SOC-OCV Lookup Table

16 visualizaciones (últimos 30 días)
Gokul Gopakumar
Gokul Gopakumar el 30 de En. de 2024
Respondida: Drishti el 14 de Ag. de 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.

Respuestas (1)

Drishti
Drishti el 14 de Ag. de 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.

Categorías

Más información sobre Nonlinearity en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by