LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get minimum frequency from FFT of three signals

Solved!
Go to solution

Hi,

 

I am implementing an online closed loop controller using LABVIEW. There are three signal inputs, the FFT of each signal are to be computed online,and the frequency at which the spectra is lowest is to be detected.

 

The plot of the spectra is attached..

Please advice on how to acheive this...

 

thanks,

 

ruser.

 

 

0 Kudos
Message 1 of 17
(3,642 Views)

ruser,

 

you should provide more information about what the "minimum frequency from FFT of three signals" is. Looking into the docx-file, i can see a graph with three different plots. Is that minimum frequency you refer to the minimum for each plot (4.7 or 6.1 for blue, 2.3 or some other for red and 3.2 for green)? Or is it the point where all plots in sum have the lowest value (should be somewhere 4.7 or 6.0)?

 

In addition to that, i hope that you have a performant algorithm for the FFT in order to keep your controller loop time. And depending on the requirement of the stability of the controller: Are you running RT?

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 17
(3,632 Views)

Nobert,

 

Thank you for the reply,...

 

The frequency to be detected is at the "point where all plots in sum have the lowest value"..; hence please advice on which function block to use

 

The program will be run in real time, however , i dont understand what you mentioned about the "performant algorithm for the FFT ".;

 

i have run the program in real time before with controllers etc ; but they didnt have to execute the FFT of the signals...

 

regards,

 

Ruser

0 Kudos
Message 3 of 17
(3,621 Views)

Ruser,

 

the basic requirment for a FFT is a periodic, repeating signal. Hence, a single data point of a waveform cannot have a frequency. And here the dilemma starts: You want to do control, but you have to acquire several data points and expect those data points to build a continuous, selfrepeating, periodic signal. So acquisition times are longer and you need some data computation (FFT) before getting a new setpoint for your control. This takes time.

 

There are methods to accomplish this, of course. For instance, LV delivers a function called "FFT (single point)". This is most probable the function you will go for. But be carefull since it does not return acceptable values for the first iterations..... see attached example for this (LV 2011).

 

Now regarding your question:

Simply sum up your data arrays and search for the smallest value. Since the "distance" of each datapoint is constant (Delta f for the result of the FFT), you can compute the frequency of that point by multiplying the index with Delta f.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 17
(3,616 Views)

Dear Nobert,

 

Thank you for your reply,

 

I have version 9.0; but the vi you sent is in version 11.0...

If you have the time, pls can you send me a snapshot of the vi block diagram, so that i can have a look?

 

I was thinking of collecting the signals using a collector before passing them on to the FFT single point block ? would that make it easier?

 

thanks again,

 

Regards,

 

Ruser

0 Kudos
Message 5 of 17
(3,609 Views)

FFT_Point_by_Point.PNG

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 17
(3,604 Views)

Nobert,

 

thank you for the .png image; somehow i cannot open it, though!!...

 

could you send it again pasted in word document?

 

Thanks for the help..

 

regards,

 

ruser

0 Kudos
Message 7 of 17
(3,588 Views)

Ruser,

 

i am not sure what you mean by "open the png". I assume you are talking about putting it into LV as code. This of course cannot work since the screenshot is nothing more than a screenshot, so no VI snippet. No functionality included in the png to create LV code...

 

The screenshot displays the issue you face regarding the FFT, not an answer to the original question "How do i find the minimum of the frequency plots?". To find the minimum of the frequencies, as already pointed out, simply sum up all three data array (should have the same length of course) and then use the Min/Max function....

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 17
(3,581 Views)

Hi Nobert,

 

What i meant was that i could not 'view' the snapshot;...

 

I tried using the ' compound arithmetic ' block to sum the array elements synchrously... that just doesne seem to work though!

 

ruser

 

 

0 Kudos
Message 9 of 17
(3,576 Views)

Nobert,

 

 I am attaching a word document which has the VI front panel and block diagram... i cant get any fft graph either ways...

 

One graph displays the acceleration data in the x, y and z axis....

 

Thanks a lot,

 

regards,

 

fesmi.

 

 

0 Kudos
Message 10 of 17
(3,571 Views)