Turn on suggestions

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

Showing results for

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

07-21-2011 08:10 PM

Options

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

Hello! I have a text file that contains a signal. I had it read in a format of waveforms and plotted the signal in the time domain. I then put the waveform through the PSD vi in order to graph the waveform in the frequency-domain. This graph has a lot of noise in it so I want to have a smoother graph.

One possible way to smooth the graph is to take the average of a few points at each time interval and graph the new values. So I took the waveform signal and split it into x(time) and y(amplitude) arrays. I then took the fourier transform of the amplitude and took the absolute value of it.

From here, I am trying to create a design where I would have the average of the fourier transform values taken every 3 points and then add these points into an array. I would then plot this new array, spaced out evenly between 0 and the end point of the original frequency-domain graph, thereby having a smoother plot.

My design went horribly wrong, however. The resulting graph goes crazy while plotting a straight line and I am also not sure how to have the points evenly spaced out until the original frequency graph's end point. So I have attached my vi and my signal text file and was wondering if anyone could help me solve this problem. Thanks!

Solved! Go to Solution.

Download All

Virus scan in progress. Please wait to download attachments.

Solution

Accepted by topic author xcontradictorx

07-21-2011 08:45 PM

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

Yes, it went wrong. You create a series of arrays of increasing length and constant value. A 3-point smoothing filter is easy to implement with a shift register. See the image below.

Lynn

07-27-2011 04:54 PM

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

It works perfectly! Thank you!