12-15-2013 07:36 AM
Dear Forum,
I have a set of Calculated Curves (Cylinder pressure based on Crank Angle = 1D Array of Data) from another source in form of text files.
Each of this Array is only valid for a specific Speed and Torque.
Assume that I have following files:
File1: = 1D Array of Data Valid for 2000RPM and 10NM
File2: = 1D Array of Data Valid for 2000RPM and 20NM
File3: = 1D Array of Data Valid for 2000RPM and 30NM
File4: = 1D Array of Data Valid for 2200RPM and 10NM
File5: = 1D Array of Data Valid for 2200RPM and 20NM
File6: = 1D Array of Data Valid for 2200RPM and 30NM
File7: = 1D Array of Data Valid for 2300RPM and 10NM
.
.
.
FileN: = 1D Array of Data Valid for 4000RPM and 30NM
If I need to get the 1D Array of Data for an Operating Point where no File is available (i.e. 2100RPM and 12NM), I need to interpolate.
But How ? What kind of function do I need ?
I can provide sample Data if needed.
THX and Br,
Hannes
12-15-2013 11:44 AM - edited 12-15-2013 11:45 AM
Hi Hannes,
all you need is the function "Interpolate 2D" - and you need to reorganize your data into a 2D array for your cylinder pressure and a 1D array for RPM and torque...
LabVIEW comes with an example demonstrating the usage of that function, just read it's context help!
12-15-2013 12:42 PM
Hi GerdW,
thanks for the quick response.
I already thought about the 2D Interpolation function. Not 100% sure how to organize the data and function usage in my case. I will try to read the help and use the example in more detail, for better understanding. If I still fail, I will come back to this thread.
Regards,
Hannes
12-16-2013 05:56 AM
Hi GerdW,
to be honest: I have no clue how this 2D interpolation works in General and how it can solve my issue...
Playing around with the examples / help does not help me.
Can you please give me an example on how to organize the data and how to use the 2D Interpolation in my case ?
Br,
Hannes
12-16-2013 08:07 AM - edited 12-16-2013 08:07 AM
12-17-2013 12:45 AM - edited 12-17-2013 12:47 AM
Either I still do not understand or there is a misunderstanding of my request:
In your Case you are looking in a table. In my Case each Point in Z must be 2D. Remember I have many Curves (Pressure based on Crank Angel, see attachment examples of this curves). Now additionally I have to interpolate on RPM AND Torque.
Actually the examples using Intake Pressure (IP in file Name) not Torque. But in principle same function I need. N in the file Names is the Speed / RPM.
Br,
Hannes
12-17-2013 01:32 AM - edited 12-17-2013 01:35 AM
Hi Hannes,
as said before: you have to reorganize your data! (as said in message #2 and mentioned in message #4…)
I will not do that for you: it's your data and your task!
In my snippet above "Z" needs to contain all your data, "Y" and "X" will be your input vector (RPM and IP). Then you can use "x" and "y" to interpolate for a give coordinate in your Z data...
So you have to load all your single small files, get the Z data from them and combine them to a big 2D array.
12-17-2013 03:08 AM
Hi GerdW,
of course you do not have to reorganize my Data 😉
But maybe you can help me to understand how I have to organize it.
My results always give me a single Value in that a 2D Array, but I need a Array with the same amount of Values then in one of the text files of course.
Br,
Hannes
12-17-2013 03:27 AM
Hi Hannes,
in those text files you have a list of "crank angle data" vs crank angle for a given speed/torque value.
Now you want to interpolate such a list for any random speed/torque.
So infact you have a Z value for any triple of input values: speed/torque and angle.
You can solve that by creating a Z table in the example above for each angle and iterate over all angle values!
12-17-2013 04:13 AM
Hi again,
Thank you!
Now I got it...
Br,
Hannes