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

AI Thread Summary
The discussion revolves around understanding the relationship between sampling frequency and the unit circle in digital filter design. A user seeks clarification on how to determine the frequency corresponding to the zeros of a pulse transfer function, particularly after realizing a mistake in the sampling frequency value. Participants emphasize the importance of using the correct notation and understanding the implications of zeros and poles in filter design, including the necessity of conjugate pairs for stability. The conversation also touches on the periodicity of signals and the conditions under which zeros can be placed on the unit circle. Overall, the thread highlights key concepts in digital signal processing and filter design techniques.
Master1022
Messages
590
Reaction score
116
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} ##.
G(z) = \frac{1}{3} \left( 1 + z^{-1} + z^{-2} \right)
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:
z = -\frac{1}{2} \pm j\frac{\sqrt{3}}{2} = e^{j 2\pi / 3} = e^{j \omega T}
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
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##...
 
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!
 
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:
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.
 
I did this on MATLAB.
 
I have recently moved into a new (rather ancient) house and had a few trips of my Residual Current breaker. I dug out my old Socket tester which tell me the three pins are correct. But then the Red warning light tells me my socket(s) fail the loop test. I never had this before but my last house had an overhead supply with no Earth from the company. The tester said "get this checked" and the man said the (high but not ridiculous) earth resistance was acceptable. I stuck a new copper earth...
Thread 'Electromagnet magnetic field issue'
Hi Guys We are a bunch a mechanical engineers trying to build a simple electromagnet. Our design is based on a very similar magnet. However, our version is about 10 times less magnetic and we are wondering why. Our coil has exactly same length, same number of layers and turns. What is possibly wrong? PIN and bracket are made of iron and are in electrical contact, exactly like the reference design. Any help will be appreciated. Thanks. edit: even same wire diameter and coil was wounded by a...
Thread 'Beauty of old electrical and measuring things, etc.'
Even as a kid, I saw beauty in old devices. That made me want to understand how they worked. I had lots of old things that I keep and now reviving. Old things need to work to see the beauty. Here's what I've done so far. Two views of the gadgets shelves and my small work space: Here's a close up look at the meters, gauges and other measuring things: This is what I think of as surface-mount electrical components and wiring. The components are very old and shows how...
Back
Top