# Does sampling in the frequency domain cause time-domain aliasing?

Let's say I have an impulse response $h[n]$.

I analyze the power spectrum of that impulse response similar to fourier transformed $h[n]$ corresponding to roughly $H[f]$.

Now I compare $H[f]$ with some target $H_{0}[f]$ by subtracting $H_{0}[f]-H[f]$.

I create a compensation filter based on this via inverse fourier transform: $\mathrm{ifft}(H_{0}[f]-H[f])$.

But this is inadequate because time-domain aliasing is observed: Why?

What I want to understand is, just as sampling in the time-domain cause aliasing in the frequency domain, is this operation of creating a filter via ifft akin to sampling in the frequency domain and likewise causing aliasing in the time domain?

Or is this because the $H[f]$ was not sufficiently padded and the result is a circular convolution that causes ringing (but is this time-domain aliasing?)

Is this a direct result of the duality of the DFT? In that, just as a sinusoid of a given frequency will show up as a frequency-axis shifted impulse in the frequency domain, an envelope of some frequency will show up as a time-axis shifted impulse in the time domain?

Confusedly yours, @panthyon

• Sampling in frequency is multiplication by a train of pulses, so it should be equivalent to convolution in time by a (related) train of pulses. Is that along the lines of what you're thinking?
– MBaz
Commented Nov 8, 2015 at 1:01
• Also, see this recent question: dsp.stackexchange.com/questions/26928/…
– MBaz
Commented Nov 8, 2015 at 1:01
• @MBaz that related question does help, thanks for the link. that is what i'm thinking, that time-domain aliasing for a frequency-domain sampling scenario is a natural result of the duality property of the DFT. Commented Nov 8, 2015 at 2:35
• Sampling in the frequency domain definitely causes aliasing in the time domain. A discrete spectrum corresponds to a periodic (aliased) time-domain signal; a discrete spectrum corresponds to a Fourier series expansion of a periodic signal. Commented Nov 8, 2015 at 10:04

The answer is: yes, sampling in the frequency domain causes aliasing in the time domain, exactly like the dual case: sampling in the time domain causes aliasing in the frequency domain.

There are many ways to see this. One standard way is to sample the discrete-time Fourier transform (DTFT) of a discrete-time signal by multiplying it with a Dirac comb and see what this does to the time domain signal. Here, however, I would like to show it in another way, namely by taking samples of the DTFT and asking which periodic signal has these samples as its discrete Fourier transform (DFT).

Let $Y(e^{j\omega})$ be the DTFT of the sequence $y[n]$ (note that $y[n]$ is not necessarily of finite length):

$$Y(e^{j\omega})=\sum_{n=-\infty}^{\infty}y[n]e^{-jn\omega}\tag{1}$$

Now we take samples of $Y(e^{j\omega})$ at $\omega_k=2\pi k/N$, $k=0,1,\ldots,N-1$, and derive the time domain sequence with a DFT equal to these samples:

\begin{align}Y_k\doteq Y(e^{j2\pi k/N})&=\sum_{n=-\infty}^{\infty}y[n]e^{-j2\pi nk/N}\\&=\sum_{l=-\infty}^{\infty}\sum_{n=0}^{N-1}y[n+lN]e^{-j2\pi nk/N}\\&= \sum_{n=0}^{N-1}\sum_{l=-\infty}^{\infty}y[n+lN]e^{-j2\pi nk/N}\\&=\sum_{n=0}^{N-1}\tilde{y}[n]e^{-j2\pi nk/N}\tag{2}\end{align}

where $\tilde{y}[n]$ is an aliased version of the original sequence $y[n]$:

$$\tilde{y}[n]=\sum_{l=-\infty}^{\infty}y[n+lN]\tag{3}$$

Note that the right-hand side of $(2)$ is the DFT of $\tilde{y}[n]$. Eq. $(2)$ shows that the samples $Y_k$ of the DTFT $Y(e^{j\omega})$ are the DFT coefficients of $\tilde{y}[n]$, which is an aliased version of $y[n]$. Consequently, sampling in the frequency domain causes time-domain aliasing, which is obviously the dual of the well-known aliasing in the frequency domain caused by sampling in the time domain.

• Very nice theorem. But what exactly we have to do to the frequency domain sampling to avoid aliasing? In some text there is $L$ to the length of the sequence and $N$ to the size of DFT and set the condition $N>L$, otherwise aliasing. Commented Feb 10, 2020 at 14:41
• @jomegaA: If you look at the RHS of (3), it's clear that the shifted versions of $y[n]$ don't overlap if $N$ is equal to or greater than the length of the sequence. So for finite length sequences with length $L\le N$ there is no time domain aliasing. Commented Feb 10, 2020 at 14:45

There is also a duality between resampling band-limited signals in the time-domain and resampling zero-padded (time-limited) signals in the frequency domain. Sufficient band-limiting or zero-padding for the given resampling rate prevents aliasing. This is because the circular convolution will just add a lot of zero values around the circle, which can leave the circular result identical to the linear convolution result. e.g. the portion of the spectrum or time domain data that would have been aliased will be zero.