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

ziedhosni

Active Participant

10-04-2016 11:11 AM

Options

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

Hello,

I I trying to find the best frequency spectrum. I used the interpolation function to get evenly spaced time dt. But the frequency spectrum does not give me the right value (that I can get using the peaks detection function. I get an inverse logarithmic curve instead.

I used also extract tone function but it is not giving the right value too.

I attached the vi.

Thanks,

Zied

johnsold

Knight of NI

10-04-2016 12:26 PM - edited 10-04-2016 12:27 PM

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

Zied,

It would help a lot if we had some of your data. Please run your VI again so that the Signal and Time arrays contain typical data. Then from the Edit menu select Make Current Values Default and save the VI. Post that VI.

Edit: Please tell us what the "right values: should be and how you determine what they are.

Lynn

altenbach

Knight of NI

10-04-2016 01:10 PM

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

Your raw data is not very periodic. What exactly are you expecting as a result?

Where is the data coming from and **what is the FFT supposed to show**?

Your inteval is not a multiple of the wavelength, so you have spectral leakage. Also the first ~80 seconds is quite different from the rest.

10-04-2016 02:37 PM

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

You are right. The signal starts not periodic but after certain variable time, it becomes periodic.

Actually the data comes from the integration of stiff differential equations. This is why the dt is not constant. So, I used the interpolation to overcome this problem.

The FFT is to show the frequency of the oscillations. I expect a peak corresponding to the frequency.

These data comes from certain chemical reactions and the imperfections of the periodicity should be normal at certain extend.

I attached the VI again with some real data as requested.

I am also wondering if the FFT can be used to compare 2 signal and detect if the phenomenon is chaotic.

johnsold

Knight of NI

10-04-2016 07:26 PM

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

Once you remove the large initial transient, the data is rather periodic.

What I did is rather similar to your approach. I created a time ramp with millisecond resolution (assuming that the times in the Time array are in seconds). Then I interpolated the Time and Signal data at the time points in that ramp. To remove the startup transient Array Subset is used with a threshold time set manually. I found that 110 seconds worked well.

Both spectrum measurments and Extract Tone Information VIs give similar results. The first spectral peak is at 4.7 mHz with significant harmonics as would be expected from the waveform. That is one cycle every 213 seconds. The DC component could be reduced by subtracting the mean before the spectral analysis but it is probalby not worth bothering.

There is some extra code left over from some things I tried and ended up not using. I did not take the time to remove it.

Do you have any idea what the spectrum should look like when the system is chaotic?

Lynn

10-05-2016 03:43 AM

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

Thank you Lynn.

So why do these results not show in the FFT spectrum. I expect to see a single peak corresponding to the periodicity.Why am I getting a broad logarithmic line instead?

The chaos should appear by comparing to spectra starting from very close points and after a while the 2 signal starts slowly to give very distinct signal without diverging completely (they can cross each other again).

Thanks,

Zied

altenbach

Knight of NI

10-05-2016 09:19 AM

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

@ziedhosni wrote:So why do these results not show in the FFT spectrum. I expect to see a single peak corresponding to the periodicity.Why am I getting a broad logarithmic line instead?

You only get a single peak if the signal is sinusoidal. Your signal is not. To get the complicate shape of each period you need a significant amount of higher harmonics, i.e. other frequencies.

Overall, I don't think FFT is the right way to analyze your data.

10-05-2016 11:15 AM

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

Thank you Altenbach.

If the FFT is not the right way to analyse this type of signal, do you suggest any other technique?

What do you think Labview can do for me to analyse this signal?

Cheers

Zied

altenbach

Knight of NI

10-05-2016 11:23 AM

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

This is not a LabVIEW problem, but an analysis problem independent of the programming language used.

Do you have collection of real or simulated datasets that show the various states that you need to distiguish? How variable is the atomic shape of a single period? What is the possible range of the fundamental frequency? can you measure for a longer time, e.g. more periods?

Does the system go from normal to chaotic in a single trace or is every trace either one or the other?

10-05-2016 12:54 PM

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

Actually Have hundreds of datasets of these oscillations with various amplitude and frequency.

I think the shape of the period can change slightly among the datasets.

My objective is actually to evaluate how broad is the range of frequency.

Indeed, I can measure for much longer time the oscillations.

The last question is tricky and I think that both phenomena can happen as the signal can start steady then periodic then chaotic then periodic...and obviously, this behaviour change from one signal to the other.