0
$\begingroup$

When we use MatLab's fft function to Fourier transform a time signal, do we obtain a Fourier space signal in terms of frequency $f$, or angular frequency $\omega$?

Let say we have

tDelta = 0.1;
tMax = 8;
t = 0:tDelta:tMax;

sigFreq = 3*(2*pi);
s = sin(sigFreq*t);
s_FT = fft(s);

Here's what I think is going on, please correct me if I'm wrong:

  1. It seems that tDelta = 0.1 seconds means that the sampling rate is 1/tDelta = 10 Hz.
  2. And then when we Fourier transform the signal $s(t)$ with ftt MatLab gives us the spectrum $\hat{s}(f)$ with the frequency $f\in[-5,5]$ Hz.
  3. To convert this to angular frequency $\omega$ we must multiple $f$ by $2\pi$.
  4. So finally, in terms of angular frequency we have $\hat{s}(\omega)$ with $\omega\in[-5*(2\pi),5*(2\pi)]$.

Is this correct or have I have misinterpreted how fft works? I'm really not certain about when we have are dealing with frequency $f$ and when we are dealing with angular frequency $f$?

$\endgroup$
  • 1
    $\begingroup$ Can I please ask: What do you perceive as the key difference between the two? $\endgroup$ – A_A Oct 9 '17 at 7:31
  • $\begingroup$ Angular frequency is a factor of $2\pi$ larger than (regular) frequency. $\endgroup$ – eurocoder Oct 9 '17 at 9:55
1
$\begingroup$

There are two things to clarify here before the answer becomes self-evident.

  1. The trigonometric functions $\cos, \sin, \dots$
  2. The relationship between phase $\phi$ and frequency $f$.

The trigonometric functions $\cos(\phi)$ and $\sin(\phi)$ trace the periphery of a circle. Where we are on the circle is denoted by the argument of the function \phi. But, in general, once we are around the circle once, the values keep repeating periodically.

Now, suppose that we say $\cos(4)$ ... Where is that on the circle? Is this on the "4" or is it further down its "multiples" sequence?

If we said, $\cos(2 \pi 4)$, then we know this represents 4 times around a circle of $2 \pi$. If we say $\cos(2 \pi 0.5)$ then we know that's halfway around a full circle.

Please note that so far we are talking about instantaneous values, akin to saying "What is the cos of 60 degrees? What is the cos of (360 + 60) degrees? What is the cos of (2*360 + 60) degrees? What is the cos of (k*360 + 60) degrees?" and so on.

Let's bring time in to this. Let's now say, not "Where am I, around the circle?" but "How fast am I going around the circle?".

$$ y = \cos(2 \pi t) $$

Where $t$ is time and time is a variable we cannot stop, it starts (usually) at $0.0$ at some arbitrary set off point (i.e., $t=0$ when we power on a system) and increases for ever beyond our control. It also has units of seconds.

In $1.0$ second, we have been around the $2 \pi$ circle once, in $2.0$ seconds we have been around it twice...and so on.

This represents periodic events with a period of $1.0$ sec, the time it takes to go around the circle.

What if we have things that happen more frequently than once every second?

This is easy to deduct, we just have to go around the circle faster. How much faster? I don't care, some factor $f$ faster than 1 rev per second.

$$ y = cos(2 \pi t f + \theta )$$

So, now, the phase at which we find ourselves moving around the circle is $\phi = 2 \pi t f$ plus some $\theta$ term to account for any starting point around the circle.

If we differentiate phase with respect to time we get frequency. That is, the rate at which we move around the circle.

The rate has a $2 \pi$ factor, yes, but that offsets everything and means number of times around the circle. The key factor here is $f$.

So, $2 \pi 440$ radians per second is another way of saying 440 Hz.

Let's now turn to the Fast Fourier Transform (FFT).

We have a system that samples at an $Fs = 44.1$ Hz. We use it to acquire a buffer of 441 samples which we then pass through the FFT. The FFT returns a result that contains 441 complex values, symmetrical about the middle point. The question is, what is the frequency of "bin" 44?

It is $44 \times \frac{44100}{441} = 4400$ Hz. And in this formula we used Hz throughout.

Hope this helps.

$\endgroup$
1
$\begingroup$

Neither.

An FFT returns a result as a vector of bins that are related to an integer number of periods per aperture for that bin. The aperture dimension will depend on the units used for the length (width) of the FFT, or equivalently, to the time or distance between samples times the number of samples.

You can convert this measure of periodicity to any measure of frequency that you wish.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.