0
$\begingroup$

Considering a signal $f(t)=\sin(2\pi t)$ with frequency $10\textrm{ Hz}$:

enter image description here

Middle and bottom plots show the results of sampling at different rates.

I'm trying to understand the case shown at the bottom.

  • Is the sampling rate too high that it's capturing noise?
  • What's the name of this effect? May I call it a kind of aliasing caused by high sampling rate?
$\endgroup$
  • $\begingroup$ What do you mean by "frequency 10Hz", is it the sampling frequency? Also your image cannot be accessed you have to recheck it. $\endgroup$ – Likely Jun 8 '17 at 22:09
  • $\begingroup$ I mean I know that signal (at the top) and it has 10Hz. What do you mean by "image cannot be accessed "? Middle and bottom show the results of sampling, using 100 and 128 samples. $\endgroup$ – KcFnMi Jun 8 '17 at 22:20
  • 1
    $\begingroup$ Your signal $f(t)$ more seems to have a frequency of 1Hz, and $x[n]$ is $f(t)$ sampled at 10Hz. $\endgroup$ – anpar Jun 9 '17 at 5:52
  • $\begingroup$ How can you say that, just observing the red figure? $\endgroup$ – KcFnMi Jun 9 '17 at 9:59
  • 2
    $\begingroup$ Your signal is given by $f(t) = \sin(2\pi t)$, this corresponds to a 1Hz frequency (a period lasts 1s). Then, on the red figure showing $x[n]$, the sampled version of $f(t)$, I count 10 samples per period, that is 10 samples per second, or 10Hz. $\endgroup$ – anpar Jun 9 '17 at 12:40
4
$\begingroup$

The name of this effect is Spectral Leakage. Remember the relation $$\frac{k}{N} = \frac{F}{F_S}$$ where $k$ is the bin number, $N$ is the FFT size, $F$ is the continuous frequency in Hz and $F_S$ is the sample rate in Hz. It can be seen that $k$ varies from $-N/2$ to $N/2-1$ (or from $0$ to $N-1$). So there are only $N$ continuous frequencies $F$ for which you will get a single impulse in discrete frequency domain.

So in the first figure, the frequency of the signal contains an exact integer number of periods within the FFT duration and hence the correlation of other DFT sinusoids with the signal is zero. In the second figure, the signal span is not equal to the integer number of periods that violates the orthogonality requirement. Hence, the correlation of different DFT sinusoids appears as leakage around the true frequency.

$\endgroup$
4
$\begingroup$

When discussing DFT, you have to remember two things:

  1. you're windowing your true signal $x[n]$ (which is periodic, and then infinitely long) with a window $w[n]$ (here a rectangular window) to obtain a truncated version $x'[n]$ of it $$x'[n] = x[n]w[n].$$
  2. you're sampling the Fourier Transform $X'(e^{j\Omega})$ of your signal at normalized pulsation $\Omega_k = \frac{2\pi k}{N}$ where $N$ is the number of points of your signal (and thus the number of points of your DFT) $$X'[k] = X'(e^{j\Omega_k}).$$

So now, let's discuss your specific example. The real Fourier transform $X(e^{j\Omega})$ of your signal $x[n]$ is composed of two delta's at $\pm 1$Hz or $\Omega = \pm \frac{2\pi}{10}$ in normalized pulsation (i.e. $\Omega = 2\pi f/f_s$ where $f_s$ is your sampling frequency). This is illustrated in the figure below.

enter image description here

Then, in the time domain, you're applying a rectangular window $w[n]$ of length $N$ to $x[n]$, this is equivalent to convolving the real spectrum $X(e^{j\Omega})$ with the Fourier transform $W(e^{j\Omega})$ of your rectangular window, which is a sinc function $$X'(e^{j\Omega}) = X(e^{j\Omega}) \circledast W(e^{j\Omega})$$ where $\circledast$ represents the convolution.

Those sinc functions are null at multiples of $\Omega = \frac{2\pi}{N}$. Convolving with a delta is equivalent to moving the signal centered on this delta and so you end up with two sinc functions centered around $\Omega = \pm \frac{2\pi}{10}$. The Fourier Transform of $x'[n]$ is illustrated in the figure below (for the case of $N = 100$). To obtain such a plot showing what is "hidden" in $X'(e^{j\Omega})$, you can use zero-padding on $x'[n]$.

enter image description here

Finally, you're sampling the spectrum $X'(e^{j\Omega})$ of your truncated version of $x[n]$ at $\Omega _k = \frac{2\pi k}{N}$ to obtain the DFT $X[k]$. For $N = 100$ (i.e. an integer multiple of the period of $x[n]$), you will thus exactly sample at the places where

  1. the sinc functions are centered (for $k = \pm 10$, $\Omega_k$ coincides with the center of the two sinc functions $\Omega = \pm \frac{2\pi}{10}$), and
  2. the sinc functions are null.

And so you go back to the two delta's at $k = \pm 10$ you observed in the first figure.

For $N = 128$ however, the sinc functions are no longer well positionned (the places where the sinc are null do no longer coincides with the pulsation $\Omega_k$ where you will sample). This leads to the second figure you have.

$\endgroup$
  • $\begingroup$ Would you recommend specific literature in order to clarify the notation? $\endgroup$ – KcFnMi Jun 11 '17 at 1:59
  • $\begingroup$ Which notations do you want me to clarify? $\endgroup$ – anpar Jun 11 '17 at 5:21
3
$\begingroup$

Think of it this way: You have a 10Hz signal. You try to make a 10Hz signals with some building blocks.

1) Your building blocks are this signals: 1Hz, 2Hz,.. 10Hz, .. 20Hz.

Quite easy right? You just make your 10Hz signals using the 10Hz "building block".

2) Your building blocks are: 0.6Hz, 1.2Hz, .. 9.6Hz, 10.2Hz, ... Now what can we do? Well.. the signal looks almost like a 10.2Hz so we use a big block of 10.2. But it's not exactly that so we add a little bit of 9.6 and some others.

That's exactly spectral leakage. You're trying to describe a signal with elements you don't have so you project them and use a component of each.

$\endgroup$
  • $\begingroup$ But it has something to do with aliasing? $\endgroup$ – KcFnMi Jun 9 '17 at 1:15
  • $\begingroup$ @KcFnMi Not really. Alias and spectral leakage are different phenomenons. Alias is when you don't have enough information to properly describe a signal, i.e. you're sampling it too slow and it's impossible to describe a signal with that amount of information. Spectral leakage is something specific of DFT's. It occurs when your "building blocks" don't match exactly to the signal you have. But all the information is there. With all the information in the DFT you can recreate the original signal you had originally. This is not true for aliased signals. $\endgroup$ – Andrés Jun 9 '17 at 16:00

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.