1
$\begingroup$

I am currently working in MATLAB and had to downsample a .WAV file (I used the downsample function in MATLAB) to 44.1 kHz.

However, when I compared the two spectrograms of the original signal vs the downsampled signal, the resolution of the downsampled signal looks like it has more resolution at frequencies 0-22 kHz than the original signal.

Is there a relationship between downsampling and the resolution of frequencies? I would think that decreasing the sampling rate would decrease the resolution but this does not seem like it is the case.

$\endgroup$
1
  • $\begingroup$ How do you calculate the spectrograms? Did you read the help page of the function you're using? (if it's specgram: yeah, you're using a fixed amount of bins, no matter what the sampling rate is, no surprises here) $\endgroup$ Commented Jun 25, 2020 at 8:08

3 Answers 3

3
$\begingroup$

Downsampling by a factor of $N$ in time-domain means that you throw away $N-1$ samples from $x[n]$ for every $N$ samples. In frequency domain this creates $N$ shifted copies of the original spectrum and expansion of frequency axis. The shifted copies are shifted by $\omega = 2\pi \frac{k}{N}, \ k = 0,1,2,...,N-1$. So, the DTFT of downsampled sequence $x_D[n]$ is basically given by: $$X_D(e^{j\omega}) = \frac{1}{N}\sum^{N-1}_{k=0}X\left(e^{j\left(\frac{\omega}{N} - 2\pi \frac{k}{N}\right)}\right)$$

This is why downsampling can cause aliasing and to avoid aliasing we need to Low pass filter the original sequence to suppress sprectrum outside of $|\omega| > \frac{\pi}{N}$.

Now, if the original signal was appropriately oversampled, then the DTFT would have been occupying only $\omega \in [-\frac{\pi}{N}, \frac{\pi}{N}]$. And, the downsampling will expand the spectrum by a factor of $N$ without aliasing and it will give an impression that the frequency resolution has increased. Because you are now seeing the same spectrum which extended from $\omega \in [-\frac{\pi}{N}, \frac{\pi}{N}]$ stretched to $\omega \in [-\pi, \pi]$.

$\endgroup$
2
$\begingroup$

To answer the OP's question, downsampling alone does NOT change the frequency resolution. The simple answer is that the frequency resolution is determined from the total time duration of the data (this applies universally whether we are in the analog or frequency domain). For rectangularly windowed data of time duration $T$, the frequency resolution given by the equivalent noise bandwidth is $1/T$ in Hz. For a DFT, the time duration is given by $N$, the total number of samples and the frequency resolution in Hz is equivalently $f_s/N$ where $f_s$ is the sampling rate in Hz.

So if you had a block of $N$ samples sampled at $f_s$, with frequency resolution as given above $f_s/N$, if you decimated by $D$ the new sampling rate is $f_s/D$ and the number of samples is $N/D$, thus the frequency resolution is unchanged and remains $f_s/N$.

However if you can increase the total number of samples as a result of the decimation, then in that case you can increase the frequency resolution. The reason is increasing the time duration of the data, NOT the decimation itself.

For more details see:

Specific Frequency Resolution

Windowing impact on frequency resolution: How to calculate resolution of DFT with Hamming/Hann window?

Demonstration of "frequency resolution" and zero-padding: What happens when N increases in N-point DFT

$\endgroup$
0
$\begingroup$

Let us suppose that we have a discrete signal like: $1,\,0,1,\,0,1,\,0,\ldots,1,\,0$. If you downsample it by a factor of two, you either get $1,1,1,\ldots,1,$ or $0,0,0,\ldots,0,$. Thus downsampling can lose information, any time. And cannot increase frequency resolution by design ONLY!

However, with several downsampled copies of a signal, one can increase the overall resolution. It is sometimes called super-resolution. In general, if you know of a model of the data beforehand, it is possible to increase the apparent resolution.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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