2D Interpolation for SOC-OCV Lookup Table

15 次查看(过去 30 天)
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.

回答(1 个)

Drishti
Drishti 2024-8-14
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.

类别

Help CenterFile Exchange 中查找有关 Nonlinearity 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by