0
$\begingroup$

Is there a relationship for calculating the number of samples ($N$) that must be used in order to minimize spectral leakage of a discrete time signal.

For example, given a signal

$$x[n] = \sin(2\pi f_0 n T)$$

and $f_0 = 5, T = 0.02, n = 0, \ldots, N-1$, and no information regarding the sampling frequency, how do we choose the value for $N$?

I saw somewhere that $N$ would be equivalent to the sampling frequency, yet again, assuming that isn't available, is there a way of obtaining $N$?

$\endgroup$

2 Answers 2

1
$\begingroup$

The DFT of a discrete-time sinusoid will only have components at the sinusoid's frequency if there are an integer number of periods inside the window. I.e., you must figure out the period $M$ of the sinusoid and choose the number of points $N$ as an integer multiple of $M$ ($N=kM$). I'm sure you can figure out the period of the given sinusoid.

Also have a look at this answer to a related question.

$\endgroup$
1
$\begingroup$

The number that minimizes leakage (windowing artifacts), given an unknown ratio between a sinusoid's frequency and the sample rate, is infinity. e.g. the longer the DFT width (and/or the closer that window is to being an integer number of input waveform periods in length) the lower the visible rectangular windowing artifacts.

$\endgroup$

Your Answer

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

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