2D Interpolation for SOC-OCV Lookup Table

조회 수: 13 (최근 30일)
Gokul Gopakumar
Gokul Gopakumar 2024년 1월 30일
답변: Drishti 2024년 8월 14일
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