- Community Home
- :
- Discussion Forums
- :
- Most Active Software Boards
- :
- LabVIEW
- :
- Interpolation filter (FIR) on a Nyquist sampled signal.

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

03-14-2018 11:29 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Labels:

Hi there, any help is appreciated:

When I generate a tone, say 4000 Hz Sin and sample it at Nyquist I get a linear interpolation.

I've been experimenting on how I could regenerate a more accurate representation of the original 4000Hz sine wave, instead of the linear 'triangle' wave that a direct connection would show.

So far I've had no luck in interpolation except using the 'Align and Resample' function, where a higher resample allows for FIR interpolation, but this only works if i resample the wave at much higher than Nyquist.

If anyone could advise me on this matter, with advice on how to 'smooth' my triangle wave into the original sine wave i put in.

I've attached my code.

Many thanks

Solved! Go to Solution.

03-16-2018 11:13 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

I think we need to clarify the concepts here. When you sample your 4 kHz tone at 10 kHz you only get 2.5 samples per period. When you graph it it may look interpolated using linear interpolation so you see a 'triangle' type of shape, but you still only have five valid samples for every two signal periods.

If you want to achieve a better graphing of your signal you need more samples and that is exactly what the resample VI is doing. It returns your signal sampled at a higher rate, so more samples per period.

When a desktop oscilloscope performs for example a Sin(x)/x smoothing of the waveform, it is doing the exact same thing. The Sin(x)/x function (in a finite truncated version) is nothing but a special FIR filter case.

If you overlay the original and resampled waveforms (and change the plot attributes) you can see both the original samples and the smoothed plot.

If this is not what you were looking for, please explain the purpose of your smoothing.

03-16-2018 11:49 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi LocalDSP,

Thanks for your comments. So this suggests that when I am using the 'resample' VI, it is in fact preforming FIR interpolation on the waveform,with the re sample [resample interval] rate defining the accuracy/order of the interpolation.

Do you have the VI for that graph?

Thanks again

Watter

Solution

Accepted by topic author Watter

03-23-2018 05:36 AM

03-16-2018 11:58 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Yes the resample VI interpolates your waveform to return a signal with the sample interval (dt) that you specified.

The resampling method uses an FIR filter (assuming of course that it is the method you've selected). If you select Linear Interpolation you'll get ... the 'triangle' waveform you see on your original graph.

The graph I showed is just displaying your two waveforms (pre-and post-interpolation). The original waveform plot has different plot properties as you can see on the legend. No interpolation and point style set to 'fat' point. Right-click on the legend to access the plot properties.