Help me understand the FFT function (Matlab)

1) In addition to negative frequencies, which is the minimum frequency provided by the FFT function? Zero? 2) If it is zero, how do we plot zero on a logarithmic scale?
3) Is the result always symmetrical? Or does it just seem symmetrical?
4) If I use abs (fft (y)) to compare two signals, can I lose some accuracy?

+7
matlab fft
source share
5 answers

1) In addition to negative frequencies, which is the minimum frequency provided by the FFT function? Is it zero?

fft(y) returns the vector from the 0th to the (N-1) -th DFT y , where y (t) should be considered as defined on 0 ... N-1 (hence the "periodic repetition" of y (t) can be considered as a periodic signal defined over Z).

The first sample fft(y) corresponds to frequency 0. The Fourier transform of real discrete-time periodic signals also has a discrete region, and it is periodic and Hermitian (see below). Therefore, the conversion for negative frequencies is conjugate to the corresponding patterns for positive frequencies.

For example, if you interpret (periodic repetition) y as a periodic real signal defined over Z (sampling period == 1), then the region fft(y) should be interpreted as N equidistant points 0, 2 Ο€ / N ... 2 ? pi (N-1) / N. Conversion samples at negative frequencies -? Pi ... -? Pi / N are conjugates of samples at frequencies pi ... ... pi / N, and are equal to samples at frequencies pi ... 2 pi (N-1) / N.

2) If it is equal to zero, how do we construct zero on a logarithmic scale?

If you want to make some kind of Bode plot , you can build the transformation only for positive frequencies, ignoring the patterns corresponding to the lowest frequencies (in particular, 0).

3) Is the result always symmetrical? Or does it just seem symmetrical?

It has Hermitian symmetry if y real: its real part is symmetric, its imaginary part is antisymmetric. In other words, its amplitude is symmetric and phase antisymmetry.

4) If I use abs (fft (y)) to compare two signals, can I lose some accuracy?

If you mean abs(fft(x - y)) , this is normal, and you can use it to get an idea of ​​the frequency distribution of the difference (or error if x is the estimate of y). If you mean abs(fft(x)) - abs(fft(y)) (???), you lose at least phase information.

+14
source share

Well, if you want to understand Fast Fourier Transform, you want to get back to the basics and understand DFT itself. But, this is not what you asked, so I just suggest you do it in due time :)

But in response to your questions:

  • Yes, (except for negatives, as you said), it is zero. The range is from 0 to (N-1) for N-point input.
  • In MATLAB? I'm not sure I understand your question - plot zero values, like any other values ​​... Although, as duffymo rightly pointed out, there is no natural logarithm of zero.
  • It essentially resembles the sinc (sine cardinal) function. However, this will not necessarily be symmetrical.
  • You won’t lose any accuracy, you just get an amplitude response (but I think you already knew that).
+2
source share

The Counseling Numerical Recipes in C, Chapter 12, Fast Fourier Transform, states:

  • The frequency varies from negative fc to positive fc, where fc is the critical Nyquist frequency equal to 1 / (2 * delta), where delta is the sampling interval. Therefore, frequencies can be negative.

  • You cannot draw something that does not exist. There is no natural logarithm of zero. You will either plot the frequency as the x axis, or select a range that does not contain zero for your semi-log axis.

  • The presence or absence of symmetry in the frequency range depends on the nature of the function in the time domain. You can have a graph in the frequency domain that is not symmetrical about the y axis.

  • I do not think that such an absolute value is a good idea. You want to read a lot more about convolution, correction, and signal processing to compare two signals.

+2
source share
  • The result of fft may be 0. Already answered by other people.
  • to build a frequency of 0, the trick is to set it to a very small positive number (for this purpose I use exp (-15)).
  • already answered by other people.
  • If you are only interested in magnitude, yes, you can do it. this applies, say, to many image processing problems.
+2
source share

Half of your question:

3) The results of the FFT operation depend on the nature of the signal; therefore there is nothing that would require it to be symmetrical, although if so, you can get additional information about the properties of the signal

4) This will compare the values ​​of a pair of signals, but those that are equal do not guarantee the identity of the FFT (do not forget about the phase). However, this may be enough for your purposes, but you must be sure of it.

0
source share

All Articles