Digital Filters: why is sampling frequency equal to 2*pi unit circle

In summary: Thanks @Joshy ! Yes, I realized I was really confused about very basic algebra and that led to confusion about the ## \omega T_s ## term (I will take your suggestion and write ## T_s ##!). I don't know how the ## T ## ended up in the denominator...I believe your reason about the ## 2 \pi ## is correct. @Merlin3189 kindly provided a similar argument along those lines (Nyquist frequencies) which helped to answer that.As for the exact numbers, I just realized that I have mistyped the value of ## f_s ## as 50 Hz instead of 150 Hz, but that doesn't change my confusion,
  • #1
Master1022
611
117
TL;DR Summary
We have some digital filter with a pulse transfer function ## G(z) ## with zeros on the unit circle. We know the sampling frequency and want to figure out what frequencies those zeros correspond to. Why do we let a ## 2\pi = f_s ##?
Hi,

I was working through a filter design problem and got stuck on a concept.

Scenario:
Let us say we have the following pulse transfer function and the sampling frequency is ## f_s = 50 \text{Hz} ##.
[tex] G(z) = \frac{1}{3} \left( 1 + z^{-1} + z^{-2} \right) [/tex]
The zeros of the transfer function are ## -\frac{1}{2} \pm j\frac{\sqrt{3}}{2} ##, which corresponds to an anti-clockwise rotation of ## 2\pi / 3 ##. How can we find out what frequency those zeros correspond to? That would allow us to know which frequencies are filtered out.

When we want to find the frequency response of a pulse transfer function, we evaluate it along the unit circle by letting ## z = e^{j \omega T} ##. Therefore:
[tex] z = -\frac{1}{2} \pm j\frac{\sqrt{3}}{2} = e^{j 2\pi / 3} = e^{j \omega T} [/tex]
which leads to: ## 2 \pi / 3 = \omega T \rightarrow 2 \pi / 3 = 2 \pi f /T ##

However, I am not quite sure how the analysis progresses from here in order to find out what frequency the zero with positive imaginary value is (book says it corresponds to 50 Hz)? I may have made an error along the way...

Any help would be greatly appreciated.
 
Engineering news on Phys.org
  • #2
It looks like you're on the right track to me or that's the way I would do it. What's stopping you? I'm not feeling clear on what it means to "corresponds to 50 Hz". You know what your ##T## is in your equation, right :)? I would normally write ##T_s## for clarity; also not sure if you meant to put the division symbol there I would double check that although I'm just kind of recalling from old lectures. I normally write this out in ##\Omega## domain where ##\Omega = 2 \pi f/f_s## or ##2 \pi f T_s## then I set ##z = e^{j\Omega}## it looks to me you are doing the same thing though.

I think you're asking why is the sampling frequency ##2\pi## on the polar plot. I'm not sure if I know the actual answer to that or if it's just a symptom. When you sample the signal its images repeat every ##f_s##. Let's say you sample at ##f_s = 10 Hz## a sinusoidal tones (in Hz) at ##-3## and ##3##, then you'll see tones for ##0f_s## at ##-3## and ##3##, then for ##1f_s## at ##7## and ##13##, then ##2f_s## at ##17## and ##23##...
 
  • Informative
Likes Master1022
  • #3
Joshy said:
It looks like you're on the right track to me or that's the way I would do it. What's stopping you? I'm not feeling clear on what it means to "corresponds to 50 Hz". You know what your ##T## is in your equation, right :)? I would normally write ##T_s## for clarity; also not sure if you meant to put the division symbol there I would double check that although I'm just kind of recalling from old lectures. I normally write this out in ##\Omega## domain where ##\Omega = 2 \pi f/f_s## or ##2 \pi f T_s## then I set ##z = e^{j\Omega}## it looks to me you are doing the same thing though.

I think you're asking why is the sampling frequency ##2\pi## on the polar plot. I'm not sure if I know the actual answer to that or if it's just a symptom. When you sample the signal its images repeat every ##f_s##. Let's say you sample at ##f_s = 10 Hz## a sinusoidal tones (in Hz) at ##-3## and ##3##, then you'll see tones for ##0f_s## at ##-3## and ##3##, then for ##1f_s## at ##7## and ##13##, then ##2f_s## at ##17## and ##23##...
Thanks @Joshy !

Yes, I realized I was really confused about very basic algebra and that led to confusion about the ## \omega T_s ## term (I will take your suggestion and write ## T_s ##!). I don't know how the ## T ## ended up in the denominator...

I believe your reason about the ## 2 \pi ## is correct. @Merlin3189 kindly provided a similar argument along those lines (Nyquist frequencies) which helped to answer that.

As for the exact numbers, I just realized that I have mistyped the value of ## f_s ## as 50 Hz instead of 150 Hz, but that doesn't change my confusion, which has now been solved...

The only follow up question I have is: is there any constraints on where we can put the zero on the unit circle? Do we need the ## f/f_s ## to be rational? The line of thought is as follows:
- The argument of the complex exponential is ## j 2 \pi \frac{f}{f_s} ##
- The ## \frac{f}{f_s} ## is like a digital frequency ## f_d ##
- I had read before that we need ## f_d ## to be a rational number in order for the signal to be periodic

Does the periodicity (or lack thereof) have any implications on our ability to filter this signal out? I think I am conflating two separate issues, but just want to confirm that I am not missing something.

Many thanks once again!
 
  • #4
edit: Any chance you can tell me what grade you're in or what your background is? I'm not sure if I'm just chucking material that isn't fitting for you.

--

Your questions are too scattered for me or not using verbiage I'm familiar with.

First I don't see anywhere Merlin posted in this thread. It's going to be too difficult for me to follow between multiple threads. I don't know what it means for "##f/f_s## to be rotational" neither am I familiar with digital frequency ##f_d## (or maybe I called it something else). I'm not sure what your question is or what the goal is.

As far as where zeros can go: It depends. It depends what kind of filter you're making and what the requirements are. To my recollection for real filters you'll need to use conjugate pairs if that's what you're asking. If you see it on the top half of the polar plot, then you'll need the conjugate pair on the bottom half mirroring the top. Here's an example pole zero plot for a filter I made in the classroom. Filter below I needed something narrowband and so my poles and zeros are very close to each other. Putting zeroes in the center didn't do anything for me (admittedly not sure if there's a practical application for that).

This one was a band reject filter. The professor gave us a sound file where he injected two random tones in there totally degrading the original sound. In other words I wanted to remove these two large peaks (1053 Hz and 2204 Hz) and keep the other things that were from the original sound file.

DTFT_Freq_zoom.png


Discrete time domain

n_unfiltered.png

To do this I needed the zeroes to be closer to the outside edge of the unit circle than the poles. You can see very clearly on this polar plot that there are 4 poles and 4 zeros. The pole would act like a low-pass filter, then the zero would bump it back up like a high-pass filter, which gave me each notch. I needed two sets of these (one for each frequency tone I wanted to remove) and their conjugates. The angle was related to the frequency, and so closer to 0 Hz would be close to 0, then maximum frequency would be up to ##\pi##. This was for a sound file I think maximum frequency was around 22 KHz. If I wanted to filter something at like 20 kHz for example then you could expect the X and 0's to be on the other (left) side of the plot.

pzplot.png


Filter_Omega.png


If the poles went outside the circle, then it was unstable and results would oscillate.

When I look at the results in the frequency domain alone everything looks great and the professor might even be happy, but results in time domain if the poles went outside the circle. I used ##n## because it was discrete.
Sound_unstablefilter.png


If I don't do the conjugate pair like below, then I got totally different results. Computer didn't know what to do with the imaginary component and just omitted it.

DO NOT DO THIS without conjugate pair like below
pz_complex.png


What I was expecting in the time domain
sound_filtered.png


What I got using a complex filter that did not use conjugate pairs
sound_complex.png


Not sure if that helps. Good luck.
 
Last edited:
  • Informative
Likes Master1022
  • #5
Thanks @Joshy for the reply again! Apologies for all the confusion.

I will just address your points here as I don't know where the feature has gone that allows me quote/respond to particular parts of your post. @Merlin3189 sent me a message so it won't show up on a thread- it was an explanation of the ## f_s ## mapping to ## 2\pi ## concept.

Background: currently an engineering undergrad and am what is equivalent to a junior. I can understand all the content in the post, so I really appreciate you taking the time to put that detail there!

'Rotational': sorry, may have been a typo, but I meant rational. I think I was conflating other ideas together about sampling signals. However, we are not trying to re-create a signal here per se, but instead remove content from a signal.

Your examples were clear. Out of interest, what language did you use to generate those graphs? Was it MATLAB or is there a particular Python package that was useful for this? (or perhaps neither of the two?)

Thanks.
 
  • #6
I did this on MATLAB.
 
  • Like
Likes Master1022

1. Why is sampling frequency important in digital filters?

The sampling frequency is important in digital filters because it determines the rate at which the signal is sampled and processed. A higher sampling frequency allows for a more accurate representation of the original signal, while a lower sampling frequency may result in loss of information and distortion in the filtered signal.

2. How is sampling frequency related to the unit circle in digital filters?

In digital filters, the unit circle represents the frequency domain. The sampling frequency, which is measured in units of cycles per second (Hz), is related to the unit circle by the Nyquist-Shannon sampling theorem. This theorem states that the sampling frequency must be at least twice the highest frequency component of the signal in order to accurately reconstruct the original signal.

3. Why is the sampling frequency equal to 2*pi in digital filters?

The sampling frequency is equal to 2*pi in digital filters because it is a representation of the angular frequency, which is measured in radians per second. In order to accurately sample and process a signal, the sampling frequency must be at least 2*pi times the highest frequency component of the signal, as per the Nyquist-Shannon sampling theorem.

4. Can the sampling frequency be higher than 2*pi in digital filters?

Yes, the sampling frequency can be higher than 2*pi in digital filters. In fact, it is common for the sampling frequency to be much higher than the minimum requirement of 2*pi in order to ensure a more accurate representation of the original signal. However, the sampling frequency should not be lower than 2*pi in order to avoid aliasing and distortion in the filtered signal.

5. How does the sampling frequency affect the performance of a digital filter?

The sampling frequency directly affects the performance of a digital filter. A higher sampling frequency allows for a more accurate representation of the original signal and results in a better performing filter. On the other hand, a lower sampling frequency may lead to loss of information and distortion in the filtered signal, resulting in a less effective filter.

Similar threads

  • Electrical Engineering
Replies
4
Views
838
Replies
7
Views
3K
  • Electrical Engineering
Replies
2
Views
1K
Replies
9
Views
1K
Replies
1
Views
663
  • Electrical Engineering
Replies
20
Views
2K
  • Electrical Engineering
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
245
Replies
10
Views
1K
  • Other Physics Topics
Replies
1
Views
636
Back
Top