Why are the bins N/2 - N not a mirror image of bins 0 - N/2 in FFT analysis?

  • I
  • Thread starter GhostLoveScore
  • Start date
  • Tags
    Data Fft
In summary, the conversation discusses the process of doing Fast Fourier Transform on data recorded from RTL SDR. The individual has successfully written a program for this, but is facing an issue with the final result. They explain that their graph is using 5000 samples and there is a vertical line at 99.4 MHz in the upper graph, which is the same line as at 3500 in the lower graph. They also mention that when doing Fourier Analysis, the result should be N frequency bins, with a mirrored pattern between the left and right half of the graph. However, the individual is confused about why the bins N/2-N are not a mirror image of bins 0-N/2 and if their method of switching the bins
  • #1
GhostLoveScore
149
9
I am trying to do Fast Fourier Transform on some data recorded from RTL SDR. I managed to write a program that does that, but the problem is this. This is final result as it should look

IQ_plot.jpg


And this is my result

graph2.jpg

It may be hard to understand this, I'll try to explain. My graph is done using 5000 samples. At upper graph, see that vertical line at around 99.4 MHz? That's the same line as at 3500 at lower graph. And if you look closely at lower graph, you can see that it really should be cut vertically at 2500 and left and right side switched.

I understand that when doing Fourier Analysis using N samples, as a result we get N frequency bins. And the result looks like this

1,2,3,4,5,6...N/2,N/2...6,5,4,3,2,1

So in a way I understand why I need to have right and left half of my graph switched. The result would look like this

N/2,..., 6,5,4,3,2,1,0,1,2,3,4,5,6,...,N/2

And the graph looks like this

graph3.jpg


What I don't understand is why the bins N/2 - N are not mirror image of bins 0 - N/2. And what I am doing here, switching bins N/2 - N to the left and bins 0 - N/2 to the right is the correct way to do this?
I forgot to say that data that I used for input was complex data.
 
Last edited:
Mathematics news on Phys.org
  • #2
It would clarify it a little if you labelled the coordinates on your graph.
 
  • #3
As I said, I used 5000 samples so I got 5000 frequency bins. That's what is on X axis. Amplitude is on Y axis.
 
  • #5
Sorry, I didn't write frequency on the graph, just the bin number. I'll try to explain - signal bandwidth is 2.4MHz and center frequency is 100.122 MHz.

For my first graph that means 0 = 100.122MHz, 2500 = 98.9MHz/101.3MHz, 5000 = 100.122

For my second graph 0=98.9MHz, 2500 = 100.122MHz, 5000 = 101.3MHz

You will notice how there is a split at 2500. I didn't know exactly if 2500 = 98.9MHz 2501=101.3MHz or 2499=98.9MHz 2500= 101.3MHz so I wrote it like that.
 

1. What is FFT and how does it work?

FFT stands for Fast Fourier Transform and it is a mathematical algorithm used for analyzing signals and data. It takes a signal and decomposes it into its component frequencies, allowing for easier analysis and manipulation of the data.

2. Why am I getting unexpected data from FFT?

There are several reasons why you might be getting unexpected data from FFT. One common reason is that your input data may not be in the correct format or may contain noise. Additionally, the parameters used for the FFT calculation, such as the sampling rate or window size, may be incorrect.

3. Can FFT give inaccurate results?

Yes, FFT can give inaccurate results if the input data is not properly prepared or if the parameters used are incorrect. It is important to carefully prepare and clean your data before using FFT to ensure accurate results.

4. How can I troubleshoot unexpected data from FFT?

To troubleshoot unexpected data from FFT, you should first check if your input data is in the correct format and if any noise needs to be removed. Then, check the parameters used for the FFT calculation and adjust them as needed. If the issue persists, you may need to consult with an expert or try using a different FFT algorithm.

5. Are there any alternatives to FFT for analyzing data?

Yes, there are several alternatives to FFT for analyzing data. Some other commonly used methods include wavelet transform, short-time Fourier transform, and principal component analysis. The best method to use will depend on the specific type of data and analysis needed.

Similar threads

  • General Math
Replies
12
Views
1K
  • General Math
Replies
1
Views
751
  • Calculus and Beyond Homework Help
Replies
3
Views
556
Replies
5
Views
874
  • STEM Educators and Teaching
Replies
5
Views
669
Replies
3
Views
4K
  • Programming and Computer Science
Replies
5
Views
2K
Replies
4
Views
1K
Replies
3
Views
6K
Replies
5
Views
11K
Back
Top