I'm developing an open source battery model, and I work with datasheets of different cells to use them in the model. The temperature characteristics of a battery look like this :
When the data is sampled to numerical values, the resulting arrays do not have the same lengths :
I'm looking to perform a 2D interpolation in order to determine the voltage of the battery at a given capacity and temperature.
I struggle to find a good way to interpolate this kind of data. I do realize that interpolation between two arrays of unequal lengths might not be a well defined problem, but I'm trying to look for a solution which would provide reasonable results in this case.
I think that regularizing the data to a grid might work, but I suspect that it is not a very good solution in my case because of how uneven the length and shape of the curves is. I think it might cause the interpolation to be performed between two points that are far away and "do not correspond to each other" on the curves if you know what I mean.
Instead, I would be hoping for a kind of solution that would "extend" the triangular part of the dataset.
I would be very thankful if you can provide any idea that could help me find a solution.
EDIT : I will try to clarify the problem, sorry if I wasn't able to express it in a clear manner.
The input are the graphs from the datasheet, which are read into numeric values (let's say Excel/csv for storage and pandas datasheet for the Python code)
The output is a function that for any point inside the domain of definition (x=Temperature, y=Capacity), provides the interpolated value of (z=Voltage)
I do not fully understand the first question, but the confusion might come from the fact that I do not want graphs as outputs and I do not extrapolate any data.
I do not know which would be the best way to share the data, I think 170 lines might be a bit too much to copy-paste. I don't think it's exactly necessary either.
The point is that I sampled the curves on the graph for every 25 mAh of capacity. Since the battery is cut off below a certain voltage, the arrays have varying lengths : the 60°C curve ends around 4200mAh, while the -40°C ends sooner, around 3600mAh
EDIT2 N. Wouda : I hope it's allowed to share links, I uploaded the csv here : https://transferxl.com/08jXjy5T1814kr
Pranav Hosangadi : In such case, I would raise a Value Error