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

coolhandLV7

Member

08-03-2020 11:40 AM

Options

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

Labels:

I have 1D data that is being captured at 1S/s the signal is very noisy but you can see a pattern in the data. Is it possible to pull out the frequencies and magnitudes of the data? I have tried using the FFT vi's but I'm not familiar with them at all. See attached v2019

I want to be able to use the frequencies from the signal to track down what could be causing the noise in the system. Anyway, any help would be greatly appreciated.

Download All

Virus scan in progress. Please wait to download attachments.

- Tags:
- FFT

GerdW

Knight of NI

08-03-2020 11:58 AM

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

Hi LV7,

@coolhandLV7 wrote:

I have 1D data that is being captured at 1S/s the signal is very noisy but you can see a pattern in the data. Is it possible to pull out the frequencies and magnitudes of the data? I have tried using the FFT vi's but I'm not familiar with them at all.

There are example VIs in the example finder…

Btw. when you sample at 1S/s then you can get frequencies of max. 0.5Hz, pretty unusual to detect noise.

You should thnik about using a higher sample rate (like 1000Hz) and then average each block of 1000 samples (worth of 1s) down to a single sample to reduce noise…

Best regards,

GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO

GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO

altenbach

Knight of NI

08-03-2020 12:02 PM

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

1S/s is very slow and unless you do appropripate analog filtering, any periodic high frequency noise pattern (e.g. 50 or 60Hz) will show up as alias frequency. So what is the source of the signal and how is it filtered?

08-03-2020 01:51 PM - edited 08-03-2020 01:52 PM

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

altenbach

Knight of NI

08-03-2020 02:19 PM - edited 08-03-2020 02:21 PM

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

If there is no filtering, any periodic noise will show up as alias frequency. Be aware of that! How accurate is your sampling rate (software or hardware timed?)

Graph 2:

- Express VI expects waveform, defining dx at least, but since it is 1 in your case, you are probably OK.
- ...

Graph 1:

- You are doing the FFT already, but your DC component dominates the graph 2.
- If you would subtract the mean of the data before FFT, you would not get that large peak at zero frequency (seems the express VI takes care of this behind the scenes). Or you could just ignore the zero frequency component and scale Y to the rest of the transform.
- You are graphing the RE part, meaning your amplitudes are distorted and could even be zero if completely out of phase. Take the absolute value before graphing or graph RE and IM. Your FFT has twice the size needed, with the nyquist frequency in the middle and negative frequencies on the right. You can trim to half.
- You need to relabel the x axis and set df according to dt in the data.
- ...

Also: "delete from array" is not the correct function to get a column from a 2D array. Use "Index array" instead.

08-04-2020 07:32 AM - edited 08-04-2020 07:33 AM

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

Thanks Altenbach, I've attached the updated code. Seems like i'm getting some useful info from these graphs now. I don't understand the X and Y axis though what are the units? I reviewed the FFT and Power Spectrum Units.vi in the examples but i'm unclear on what is actually being displayed on the graphs.

Waveform Graph 2 has me most confused, the Max amplitude and frequency occurs at 0.0159058 amplitude @ 0.00835452Hz, I'm confused because my data rate is at 1Hz seems as though i wouldn't have that kind of resolution with such a low sample rate.

edit: Software timed sample rate from the device.

altenbach

Knight of NI

08-04-2020 11:05 AM

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

There are plenty of details already described, e.g. here. No need to repeat it.

mcduff

Active Participant

08-04-2020 11:56 AM

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

@coolhandLV7 wrote:

Waveform Graph 2 has me most confused, the Max amplitude and frequency occurs at 0.0159058 amplitude @ 0.00835452Hz, I'm confused because my data rate is at 1Hz seems as though i wouldn't have that kind of resolution with such a low sample rate.

The resolution of a FFT depends on how long, or the period, of acquisition. In your data file you take 2752 seconds of data, which corresponds to 1/2752 = 0.00036 Hz resolution. The maximum frequency you can detect is 0.5 Hz, or 1/2 the sampling rate.

@coolhandLV7 wrote:

edit: Software timed sample rate from the device.

If you samples are evenly spaced, you should either interpolate data for evenly spaced samples or use a FFT that can handle non evenly spaced samples.

mcduff

altenbach

Knight of NI

08-04-2020 12:06 PM

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

Software timing at 1Hz (programmed correctly) probably has less than 1% jitter so you can assume equal spacing for the purpose of the FFT. Can you measure the actual timing to verify?

08-04-2020 01:43 PM

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

I'm not completely sure of the data spacing, i'm left to assume it's evenly spaced, since i'm using the canned DAQ that is provided in the system software. I do not have a high speed external DAQ connected to get actual sample spacing.

I'm going to turn up the sampling frequency on the gauge. I was hoping to see anomalies in this data related to the slow moving system, for example the system has an actuator that is changing position at a measured period and amplitude. It is very slow, ~240s per cycle, i'm trying to find how that motion effects what the gauge is measuring. I'm not sure what the FFT is doing as i dont see much of a peak at (0.004Hz) in the data. Then again i'm not sure the FFT is reporting amplitude (Y) and Frequency (X) on the chart.