Effect of sampling frequency on Discrete Fourier Transform?

467 Views Asked by At

I don't get it. I have the following form of the DFT:

$$ Y_N(e^{j\omega_n})=\sum_{k=1}^{N-1}y(k)e^{j\omega_n k}\quad\omega_n=\frac{2\pi n}{N}\quad n=0,1,...,N-1 $$

But this assumes that the sampling time $T_s=1$ (1 second). I have a signal, however, that was sampled at 50 Hz so $T_s=0.02$. How does that get taken into account?

My problem is that I fit a transfer function to the DFT by first writing the continuous form and then discretizing with a sampling time of 0.02 seconds. But the result is the output being noticeably smaller amplitude than in reality: enter image description here

The confusing part is that the transfer function itself, sampled at 50 Hz, fits the ETFE perfectly (the first subplot). But the output is smaller amplitude. If I sample the fitted transfer function at 1 Hz the problem is fixed... but of course in reality I should be sampling at 50 Hz. What's wrong here? Thank you!

1

There are 1 best solutions below

0
On

I answered my own question. It was a MATLAB/conceptual problem.

Here's the trick. When we sample at 1 Hz, we can use:

H_freqresp=squeeze(freqresp(H,w_n));

Where $\omega_n=0,...,2\pi$. However, when we sample at frequency $1/T_s$ this is no longer the correct command, we must make sure that the frequencies go $\omega_n=0,...,2\pi/T_s$. Therefore we must write:

H_freqresp=squeeze(freqresp(H,w_n/Ts));

This solves the problem.