09-05-2015 09:51 PM
I'm new to labview pls. I tried to remove the dc offset of a generated sine signal but observed that the fft does not work well, it only sees the magnitude of the first amplitude. However, if I connect the signal directly without dc removal, it works well. Can someone advise on what to do because it is important that i remove the dc offset. And I do not want to presume that I have knowledge of the offset.My VI is attached.
Solved! Go to Solution.
09-06-2015 10:40 AM
Use a slightly different technique for removing the offset. The Averaged DC-RMS.vi produces a waveform of offset values while you really only want a single scalar value. Use the Mean.vi (Mathematics >> Probability & Statistics palette).
There is no need to feed a waveform to the FFT.vi because it only looks at the Y values. If you want a waveform-like cluster to feed to the graph, you can either create your own from the sampling rate and number of samples or use the FFT Spectrum (Mag-Phase) VI from the Signal Processing palette.
You also seem to have an aversion to straight wires. It is much easier to read and understand a block diagram if the wires have minimal numbers of bends and do not pass behind other objects.
Lynn
09-07-2015 02:00 AM
And some words about an accurate FFT:
The FFT assumes that the signal provided is periodic and you provide exactly one (or n) periodes. In all other cases you get a more or less accurate FFT result.
If you provide one (or n) full periodes of your signal, the offset will show up in the first bin, no need to remove it 😉
09-07-2015 02:34 AM
Hi Lynn,
It worked nicely.
Thanks.