1
$\begingroup$

I'm a noobie to DSP, and recently I'm learning DSP for an urgent assignment. There's a problem that has been confused me for days. I hope anybody could shed some light on it, although it might seem to be silly.

The assignment asks me to filter a signal so that it's in $20-800$Hz. After I spent several days to learn DSP, I finally get some idea about frequency domain, DTFT, FIR, IIR, etc. But I still have no idea about how to proceed. Furthermore, I have a huge confusion about frequency: in the frequency domain, we always talk about the radian $\omega$ which is always less than $\pi$, how can I connect this $\omega$ to the physical frequency? Is it right to use $\omega/2\pi$?

$\endgroup$
0
$\begingroup$

It's easier to keep straight if you consider units.

$\omega$ has units of radians per sample, as you stated.

$f_{Hz}$ has units of cycles per second.

$2\pi$ has units of radians per cycle.

$f_s$ has units of samples per second.

So your conversion equation from $\omega$ to $f_{Hz}$ is:

$$ f_{Hz} = \omega \cdot \frac{f_s}{2\pi} $$

Where the units are:

$$ \frac{cycles}{second} = \frac{radians}{sample} \cdot \frac{\frac{samples}{second}}{\frac{radians}{cycle}} $$

And the reverse is:

$$ \omega = f_{Hz} \cdot \frac{2\pi}{f_s} $$

Where the units are:

$$ \frac{radians}{sample} = \frac{cycles}{second} \cdot \frac{\frac{radians}{cycle}}{\frac{samples}{second}} $$

Hope this helps.

Ced


Follow up:

When you bring the DFT into the picture, you introduce:

$N$ has units of samples per frame.

$k$, the bin index, has units of cycles per frame.

$$ \omega = k \cdot \frac{2\pi}{N} $$

Where the units are:

$$ \frac{radians}{sample} = \frac{cycles}{frame} \cdot \frac{\frac{radians}{cycle}}{\frac{samples}{frame}} $$

And

$$ f_{Hz} = k \cdot \frac{f_s}{N} $$

Where the units are:

$$ \frac{cycles}{second} = \frac{cycles}{frame} \cdot \frac{\frac{samples}{second}}{\frac{samples}{frame}} $$

$\endgroup$
  • $\begingroup$ I often wonder why someone is assigned an “urgent” task which they obviously aren’t qualified to do and their efforts end up in the real world, where death and mayhem may result. A student asking the same question should be expected to be supervised and are naturally hesitant. Has this occurred to you? $\endgroup$ – Stanley Pawlukiewicz Apr 2 '18 at 15:31
  • $\begingroup$ @StanleyPawlukiewicz, Your comment reminds me of my high school Calculus teacher. She did not give any partial credit. She said "If you were building a bridge, and you got the answer partially wrong, the bridge could collapse." This has relevance with the recent collapse in Florida. If you forgot a "+C" on an indefinite integral, zero points, even if you got the integration right. $\endgroup$ – Cedron Dawg Apr 2 '18 at 15:54
  • $\begingroup$ As long as “I” don’t remind you of your HS teacher, we’re OK $\endgroup$ – Stanley Pawlukiewicz Apr 2 '18 at 16:39
  • $\begingroup$ Thanks. And please don't worry, it wouldn't cause any trouble even if I did it wrong :( $\endgroup$ – Maybe Apr 2 '18 at 22:19
1
$\begingroup$

There are several "frequency" variables in signal processing, the most common all being related by constant factors. I will use the notation from Digital Signal Processing by Proakis & Manolakis:

  • $F$: "Ordinary" frequency in units of Hz.
  • $\Omega$: Angular frqeuency, in units of radians/second; $\Omega = 2\pi F$
  • $f$: Normalized or "digital frequency". $f = F/F_s$, where $F_s$ is the sample rate in Hz. This is a formally unitless quantity, but sometimes its units are listed as being cycles/sample. Sampling produces aliasing, which means that the spectrum of a sampled signal will be periodic with period 1 cycle/sample. For this reason DSP engineers only look at the spectrum of the signal in the principal period of $-1/2 \leq f < 1/2$.
  • $\omega$: Normalized radian frequency. $\omega = \Omega/F_s = 2\pi F/F_s$. Sometimes its units are listed as being radians/sample. Because of aliasing, it is only necessary to study the spectrum of a signal from $-\pi \leq \omega < \pi$ in the digital domain.

Other notions of the concept of "frequency" exist (such as instantaneous frequency, and a notion of an "instantaneous spectrum"), but these are more advanced concepts that you probably don't need to worry about yet.

$\endgroup$
0
$\begingroup$

$\omega$ you are referring to which always lies in the range [-π, π] or [0, 2π], is normalised by the sampling frequency Fs. Therefore, the Nyquist frequency would be π(rad/samples).

In your case, 20Hz (physical frequency), in $\omega$ domain will be (2•π•20)/Fs

$\endgroup$

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.