Fft and normalized vs real frequency question

In summary, the conversation is about the use of fft's and understanding the frequency axis when using numpy and matlab. The individual is struggling to understand how to read the normalized frequency and how to pull out the real frequency without knowing the sampling frequency. They provide examples and ask follow-up questions, but ultimately state that a friend helped them understand the concept.
  • #1
eric hardin
6
0
Hello,
I have a question regarding fft's. My experience with working with Fourier transforms is pretty much limited to transforming contrived functions pen and paper style, not dft's. But now I need something and I think the fft is the appropriate tool, but I'm having a hard time understanding some aspects of it. I figured I could get some help here... please be gentle.
I'm using numpy, I think it's a lot like matlab, so you should be able to read it if you know matlab.
My question deals with reading the normalized frequency axis. I think I understand that I can directly read the frequency from a plot but in units of cycles per sample. But I feel like I'm missing something that I need to pull out the real frequency if I don't know the sampling frequency.
So, of course, I started out with simple examples like a sinusoid according to some tutorials:
n=arange(0,30,1)
fs = 10
x=cos(2*pi*n/fs)
N1=2**8
X1 = abs(fft(x,N1))
F1 = linspace(0,N1-1,N1)/N1
pylab.plot(F1,X1)
And I see a spike at 0.1 and 0.9 corresponding to the frequencies 1 and -1 in units of 1/fs. But what I don't understand is how to pull out that frequency if I don't know fs, which is the sampling frequency, correct? For example, how would you find the frequency if I gave you x without telling you how I generated the data?
Also, what if the signal looks like,
x=cos(2*pi*n/2)+cos(2*pi*n/10).
Those are different sampling frequencies, so to which does the normalized frequency axis correspond.
Sorry if this is an elementary question, but I feel like I've looked around enough to warrant asking people.
As always, because I don't understand the material, I probably gave the wrong details. Please let me know if more information is needed.
My eternal gratitude,
Eric Hardin
 
Mathematics news on Phys.org
  • #2
eric hardin said:
Also, what if the signal looks like,
x=cos(2*pi*n/2)+cos(2*pi*n/10).
Those are different sampling frequencies, so to which does the normalized frequency axis correspond.
Sorry if this is an elementary question, but I feel like I've looked around enough to warrant asking people.
As always, because I don't understand the material, I probably gave the wrong details. Please let me know if more information is needed.
My eternal gratitude,
Eric Hardin

[tex]cos(t)[/tex] and [tex]cos(2t)[/tex] is literally the same function if I scale the time without telling you that I did so. Hence if you don't know the sampling frequency then the time information is lost. You have an information relative to your sampling freq. Hence the normalized means missing the sampling freq. The real freq axis is the T multiple of your normalized axis
 
  • #3
Thanks for the reply, please bear with me I'm going to ask some follow-up questions.
Ok so, I feared that that would be the answer, i.e., you don't know. So, in real life, how do you know the sampling frequency? Does it come from just being familiar with your signal? I thought that the fft was used to pull out embedded frequencies or periodicity, but it sounds like if I had a signal, for example x in my original question, I wouldn't be able to do that. Also, if all the better I can do is to get the normalized frequency, how do people use that or how is it useful? thanks again for you reply. I really appreciate the conversation.
Eric
 
  • #4
Thanks again for responding. I talked to a friend of mine who answered my questions.
 

Related to Fft and normalized vs real frequency question

What is FFT and how is it used?

FFT stands for Fast Fourier Transform, which is a mathematical algorithm used to convert a time-domain signal into its equivalent frequency-domain representation. It is commonly used in signal processing and data analysis to analyze and extract information from complex signals.

What is the difference between normalized and real frequency in FFT?

The frequency values obtained from FFT can either be normalized or real. Normalized frequency represents the frequency values in terms of cycles per sample, while real frequency represents the actual physical units of frequency such as Hertz. Normalized frequency is useful for comparing signals with different sampling rates, while real frequency is useful for understanding the actual frequency components in a signal.

How does normalization affect the FFT results?

Normalizing the frequency values in FFT does not change the actual frequency components in a signal, but it does affect the amplitude values. Normalization allows for a more intuitive interpretation of the frequency components, as the amplitudes are scaled to fit within a certain range. However, it should be noted that normalization does not change the underlying data or the overall shape of the frequency spectrum.

Why is normalization important in FFT?

Normalization is important in FFT because it allows for easier comparison between signals with different sampling rates. It also helps to remove the dependency on the length of the time-domain signal, as the frequency components are represented in terms of cycles per sample. Normalization also allows for a more intuitive understanding of the frequency components in a signal, as the amplitudes are scaled to fit within a certain range.

Can FFT be used to analyze any type of signal?

FFT can be used to analyze any type of signal that can be represented in a time-domain form. This includes audio signals, images, and other types of data. However, the accuracy of the FFT results may depend on the characteristics of the signal, such as its sampling rate and length. It is important to ensure that the signal is properly sampled and pre-processed before applying FFT for accurate results.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
399
  • Engineering and Comp Sci Homework Help
Replies
1
Views
398
Replies
12
Views
1K
Replies
14
Views
1K
  • General Math
Replies
4
Views
1K
  • Electrical Engineering
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Replies
26
Views
5K
  • Calculus and Beyond Homework Help
Replies
6
Views
419
Back
Top