LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

obtaining interpolated data from a table

Solved!
Go to solution

Hello to everyone,

 

I want to enter with the Power data in the table and obtain the value of the speed in rad/s, any suggestions? The thing is that I have 2 points with the same value of power for different speeds because the shape of the plot is a curve.

Download All
0 Kudos
Message 1 of 7
(3,359 Views)

I would try to do a curve fit using a parabola (2nd order polynomial). You could even do it in Excel. Once you have the curve fit function established, you could generate values for any Power.

0 Kudos
Message 2 of 7
(3,351 Views)

Hi Inigo,

 

two methods to solve your request in LabVIEW:

check.png

Both have their disadvantages. And they don't give the same result…

 

because the shape of the plot is a curve.

Wrong!

YOU made that a "curve" because YOU enabled "plot smoothing" in Excel! You can also show that plot with straight lines between the points…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 7
(3,347 Views)

Hi Gerd,

 

Here you are entering to the table with the speed, in my case I want to enter with the power.

0 Kudos
Message 4 of 7
(3,344 Views)

Hi Inigo,

 

Here you are entering to the table with the speed, in my case I want to enter with the power.

I took the values from your image - and you already named them "power".

No idea where you got the term "speed" from…

 

Edit:

You FORGOT to include a proper label in your data table. You should have written "Speed (rad/s)" in the column header! (Didn't your teacher told you how to label data tables/graphs scientifically correct?)

 

"Not as simple as it is" solution: just switch X and Y arrays/columns in my suggestion!

The Interpolate1DArray method will fail for certain power inputs (read it's help!), but the polynom interpolation will still work as intended.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(3,337 Views)

Thank you Gerd and I am sorry for not defining the table properly.

 

I also thought about dividing the data in two arrays, the first one with the data from 0 rad/s until the speed where the power is the maximum (Vpmax) and the other one with the data from Vpmax to 50 rad/s.

0 Kudos
Message 6 of 7
(3,330 Views)
Solution
Accepted by topic author IñigoP

Hi Inigo,

 

yes, that would help to use Interpolate1DArray.

But you need to keep track of the actual "position" of the power to always know which side of the parabola to calculate!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(3,324 Views)