LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate frequency response using FFT and inverse FFT

Hi,

Attached is the program using FFT and inverse FFT to filter a time domain signal. The frequency response of the LPF can be obtained by using the chirp signal from 0 to 5kHz. However, I don't know why the signal obtained from a sine wave input is so strange. The amplitude is wrong and has a envelope outside. Please help to point out what's wrong with that.

Bill
0 Kudos
Message 1 of 2
(3,250 Views)
If you check the help text for sine wave.vi you'll see that it generates the sine wave based on the following formula:

yi = a*sin(phase[i])

for i = 0, 1, 2, …, n – 1 and where

a is amplitude,

phase[i] = initial_phase + f*360*i


This means that when you input a=1, f=0,1 and initial_phase=0 you will get a sine wave that is based on samples at every n*36 degrees; i.e. at 0, 36, 72 etc...due to this sample rate you never see the full amplitude (+/- 90 degrees), the wave is clipped at the top. If you input an initial phase of 64 degrees you will get the full amplitude, but the wave is still deformed due to digitalization...

The lower the frequency you put in, the closer the digitalized representation will be to the true sine.

Use the Waveform Generator VIs from the analyze palette if you want to have more control over the wave generation (sample rates etc.). (Not available if you have the base package.)
0 Kudos
Message 2 of 2
(3,243 Views)