I have complex values of a periodic signal which is clearly visible in time domain. But I want to find its frequency content ? FFT is not working with me and I am looking for alternate ways to solve the problem.
If the reason you cant use FFT is that you need instantaneous frequency information, then wavelets is one method. Another computationally simple method is based on the principle that instantaneous frequency is derivative of phase. As you have complex signal, you can find phase using hilbert transform (wrap around is to be done on this phase). Then estimate frequency by taking derivative of phase. You may also refer to ' Parameter Estimation of Chirp Signals' by Kay and Djuric in IEEE ASSP Dec 1990
The problem I am facing is that I have large number of data points (around 4,30,000 complex values). Their representation in time domain is a perfect sine wave of 1 THz frequency (which I require), but their FFT is showing a peak at 0.2 THz.
When I reduce the number of data points, the output of FFT becomes closer to the required value, but the time domain waveform starts distorting.
I am not able to understand the relation between number of data points and calculation of FFT.
Most likely your problem is that FFT is exclusively applicable on 2^x samples. In your case I'd clip the input to 2^22 = 4,194,304 samples. (The alternative to fill the input with '0' values distorts the results in the frequency domain.)
FFT basics are available in a lot of textbooks - or at
If your FFT continues to show a peak at 0.2 THz, it is possible that your signal is not perfectly a sine. To be expected in real-world signals, possibly also occurring in 'simulated' signals due to the limited precision of the simulation. OR due to the limited precision of the FFT itself.
The length of the signal (at a given sampling rate) gives the frequency resolution of the FFT. Basically this has nothing to do with "precision". But in the real world, numerical effects like overflow (when calculating in integer) resp. loss of precision (using float/double) occur.
Both the periodogram and the PSD that Mr. Silva proposes above include FFT in their algorithms.
If you need another approach for determining the spectral content of a signal, I recommend to use Wavelet Transform. It is useful for this and other purposes. You may find examples in the MatLab product help.
What's your sample rate Arpit? If you're not sampling at 2THz or above (classical Nyquist) then you will get foldover (e.g. if you sample at 800GHz, 1THz would appear at 0.2THz)
The main disadvantage of using a Goertzel filter is when Doppler effect is considered (transmitter or receiver in relative movement). The frequency shift makes this approach not valid. However, if the frequency components are static, the Goertzel filter can be a nice solution.
One of the other method other than the DFT or FFT is the using a band pass filter bank. As the filter bandwidth decreases and its sharpness increases it can resolve the frequency components in the signal. The DFT and FFT are equivalent to using using filter bank.
In order to get a correct representation in the frequency domain you have to properly sample your signal with a sampling frequency fs>= fmax the highest frequency contained in the waveform. The other condition is that have to take sufficient length of the waveform or a time window which is long enough to resolve the lowest frequency in the signal. Increasing the sampling frequency or the window time time T will lead to increase the size of the FFT transform and increases the computational load.
These are the two parameters which control the resulting obtained fft analysis results.