Showing results for 
Search instead for 
Did you mean: 

Resampling returns implausible values

Go to solution

Hi everyone,


First of all: these are implausible values for me, because I do not really understand the resampling function (actually with the 1D array interpolation contained there).


Attached is a VI with data that initially seems to be resampled and then going down to around zero.


Can anyone explain to me?


Many Thanks

0 Kudos
Message 1 of 8

Hallo Tanchris,


dir ist bewußt, dass dies ein englischsprachiges Forum ist?

Wenn du auf Deutsch kommunizieren willst, solltest du im schreiben…


Kannst du dein VI für LV2017 konvertieren und anhängen?

Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 8

Hello GerdW,


attached the older version.





0 Kudos
Message 3 of 8

Hi Tanchris,


your VI still is in LV2018, just renaming the VI doesn't help!

(File->Save for previous…)

Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 4 of 8

Sorry, I´ve saved it to times and load the wrong file...Now it should be the correct one...

0 Kudos
Message 5 of 8
Accepted by topic author Tanchris

Hi Tanchris,


set the interpolation mode to "FIR"…


Possible explanation:

Your signal contains two voltage levels, and when decimating you may select the upper or the lower level. You see the result in the "linear" or "spline" mode. With FIR you get some filtering added, which "smears" (aka averages) the two signal levels…

Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 6 of 8

Thanks GerdW...that seems to work.


Could you stil explain me, why linear-interpolation not works? Maybe then I also understand the working of 1D-Interpolation??!!



0 Kudos
Message 7 of 8

[Edit: that's twice this morning I started a reply, went away for a bit, and by the time I finished and posted, a solution had already been given.  I'll leave my post below in case any of the verbage helps with understanding.]


You're seeing an artifact caused by having a sample rate that's just about exactly an integer divisor of your waveform's frequency.   The same kind of thing would happen if you had a 10 kHz sine wave that you sampled at 10 Hz -- you'd measure a constant value because every sample would be taken at the same phase point of the regular waveform.


There's an input for 'interpolation mode' that you should experiment with.  When left unwired like you did, the default value is 'linear'.  That means it'll do a linear interpolation between the 2 neighboring points in the input data to calculate a resampled value at the target time.   


I suspect you may want to specify 'FIR filter' mode.  Odds are that the default FIR filter specifications will be ok.



-Kevin P

0 Kudos
Message 8 of 8