LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using FFT Mag-Phase to display magnitude with respect to frequency

Solved!
Go to solution

I have to displaying frequency from accelerator signal, i am using mma7361 accelerator connected to Labjack U3, and displayed in Labview. The signal of acceleration was easily displayed (with respect to time) but when i try to performing FFT mag-phase, the graph won't came up. the magnitude value can be shown (in indicator) but can't in graph also phase doesn't appear in graph. if anyone know what the problem is or have any other solution, i do appreciate it. 

 

I attached the file below, also i use butterworth bandpass to filter the signal (fL=2 hz, fH = 25 hz, f sampling = 100) before performing fft mag-phase. 

0 Kudos
Message 1 of 13
(5,219 Views)

Run the VI once more until all indicators have data then stop and "menu ... edit ... make current values default". Save the VI under a new name and attach it again.

0 Kudos
Message 2 of 13
(5,215 Views)

Done, i record all the values

0 Kudos
Message 3 of 13
(5,204 Views)
Solution
Accepted by topic author MarsianaM

You are only collecting 1 sample of data.  How do you expect to do a FFT and get a frequency with only one data point?

0 Kudos
Message 4 of 13
(5,165 Views)

what should i do to make a waveform data, from accelerator? did i missed a step before performing fft?

0 Kudos
Message 5 of 13
(5,161 Views)

can't open your vi, but you need to tell your DAQ to read 100 values at a rate of 100 Hz.

(that should take about one second 😉 )

Now you have a waveform or array that has 100 values and NOW you can make a DFT 🙂

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 6 of 13
(5,148 Views)

Thankyou for your answer, i didnt realize that i was only collecting one data. I am attaching a file of my VI, but my VI seems not showing the real frequency (because the value not meet my expectation : about 2-25 hz). Do you mind checking my VI? also any suggestion what function do i need to shifting the phase by 180 degree, and also to forming new signal based on frequency and phase (shifted) that i got from fft?  

0 Kudos
Message 7 of 13
(5,099 Views)

You're apparently misunderstanding something.

The FFT Vi that you use already provides the MAGNITUDE and PHASE, ready to plot.

But you are running them thru a COMPLEX-TO-POLAR function.

 

 

 

Screen Shot 2017-04-15 at 6.10.50 AM.png

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 8 of 13
(5,095 Views)

Yeah, i am corrected it right away.. Thanks
do you know how to shifting phase by 180 degree? i need to cancelling the signal with the new signal (phase shifted)

0 Kudos
Message 9 of 13
(5,089 Views)

Negating the input signal before doing an FFT will give you 180 phase shift.

But if you want to cancel, just subtract A-B in the time domain and you don't need the FFT.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 10 of 13
(5,081 Views)