LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resampling returns implausible values

Solved!
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
(1,686 Views)

Hallo Tanchris,

 

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

Wenn du auf Deutsch kommunizieren willst, solltest du im www.labviewforum.de schreiben…

 

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

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(1,670 Views)

Hello GerdW,

 

attached the older version.

 

Regards

 

TanChris

0 Kudos
Message 3 of 8
(1,652 Views)

Hi Tanchris,

 

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

(File->Save for previous…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(1,644 Views)

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
(1,638 Views)
Solution
Accepted by 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,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(1,617 Views)

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
(1,613 Views)

[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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 8 of 8
(1,597 Views)