Hi all, I was given a matlab project to use a unit circle with 2poles and 2zeroes to create a notch filter. The component to be removed is 50 Hz, sampling frequency is 200 Hz. I tried putting 2 zeroes at z=1, angle= pie/2; and 2 poles at z=0.9, angle = pie/2. However, when i look at the spectra using SPTOOL MATLAB, nothing seems to be removed from the spectra. I tried playing with the values at gain, but it seems the frequency components at 20 Hz and above is removed. Any advice on how to create a notch filter using poles and zeroes to remove 50 Hz components from signal. (MATLAB SPTOOL). Can't figure it out....

# Notch filter design using poles and zeroes(2nd order) Newbie question

Started by ●May 5, 2006

Reply by ●May 5, 20062006-05-05

Any advice on how to create a notch filter using poles and zeroes to remove 50 Hz components from signal. (MATLAB SPTOOL). Can't figure it out.... In order to learn how they work, I suggest starting with only the zeroes.... maybe only one zero... then add the other zero.. by the way are they two independent zeros or a complex zero pair? Then add the poles and same question for them. Mark

Reply by ●May 5, 20062006-05-05

On Fri, 05 May 2006 07:19:15 -0500, "terrp" <terrp@hotmail.com> wrote:>Hi all, > I was given a matlab project to use a unit circle with 2poles and >2zeroes to create a notch filter. The component to be removed is 50 Hz, >sampling frequency is 200 Hz. >I tried putting 2 zeroes at z=1, angle= pie/2; >and 2 poles at z=0.9, angle = pie/2. However, when i look at the spectra >using SPTOOL MATLAB, nothing seems to be removed from the spectra. I tried >playing with the values at gain, but it seems the frequency components at >20 Hz and above is removed. > >Any advice on how to create a notch filter using poles and zeroes to >remove 50 Hz components from signal. (MATLAB SPTOOL). Can't figure it >out....Hi, put one zero at z = 0 + j1 (|z|=1 at angle pie/2), and put the other zero at z = 0 - j1 (|z|=1 at angle -pie/2). You'll have a real-valued-coefficients filter with notches at +50 Hz and -50 Hz. If you want to make those two notches very narrow, then put one pole at z = 0 + jM (|z|=M at angle pie/2), and put the other pole at z = 0 - jM (|z|=M at angle -pie/2). Then experiment by letting M be in the range of, say, 0.6 -to- 0.99 to see how M affects the width of the notches. [-Rick-]

Reply by ●May 5, 20062006-05-05

Check the post from Rune here, it's a very good one: <http://groups.google.com/group/comp.soft-sys.matlab/browse_frm/thread/bad839e1a15920bb/5248378bbcea10f8?q=notch&rnum=2#5248378bbcea10f8>

Reply by ●May 5, 20062006-05-05

"terrp" <terrp@hotmail.com> wrote in message news:_t6dnWlhYrBe38bZRVn-tg@giganews.com...> Hi all, > I was given a matlab project to use a unit circle with 2poles and > 2zeroes to create a notch filter. The component to be removed is 50 Hz, > sampling frequency is 200 Hz. > I tried putting 2 zeroes at z=1, angle= pie/2; > and 2 poles at z=0.9, angle = pie/2. However, when i look at the spectra > using SPTOOL MATLAB, nothing seems to be removed from the spectra. I tried > playing with the values at gain, but it seems the frequency components at > 20 Hz and above is removed. > > Any advice on how to create a notch filter using poles and zeroes to > remove 50 Hz components from signal. (MATLAB SPTOOL). Can't figure it > out.... > >The easy answer is to consider 50Hz as a fraction of 200Hz ie 50/200 = 1/4. So you need complex zeros at 1/4 sampling freq which is pi/2 and -pi/2 (since 2pi is fs). So we have zeros ta z=0+j1 and z=-0-j1. The filter is therefore (z-j1)(z+j1)=z^2+1. M.P

Reply by ●May 5, 20062006-05-05

Rick Lyons wrote:> On Fri, 05 May 2006 07:19:15 -0500, "terrp" <terrp@hotmail.com> wrote: > > >Hi all, > > I was given a matlab project to use a unit circle with 2poles and > >2zeroes to create a notch filter. The component to be removed is 50 Hz, > >sampling frequency is 200 Hz. > >I tried putting 2 zeroes at z=1, angle= pie/2; > >and 2 poles at z=0.9, angle = pie/2. However, when i look at the spectra > >using SPTOOL MATLAB, nothing seems to be removed from the spectra. I tried > >playing with the values at gain, but it seems the frequency components at > >20 Hz and above is removed. > > > >Any advice on how to create a notch filter using poles and zeroes to > >remove 50 Hz components from signal. (MATLAB SPTOOL). Can't figure it > >out.... > > Hi, > > put one zero at z = 0 + j1 (|z|=1 at > angle pie/2), and put the other zero at > z = 0 - j1 (|z|=1 at angle -pie/2). > You'll have a real-valued-coefficients filter > with notches at +50 Hz and -50 Hz. > > If you want to make those two notches very > narrow, then put one pole at z = 0 + jM (|z|=M at > angle pie/2), and put the other pole at > z = 0 - jM (|z|=M at angle -pie/2). > Then experiment by letting M be in the range > of, say, 0.6 -to- 0.99 to see how M affects > the width of the notches.All this talk about pies is making me hungry! ;-)

Reply by ●May 5, 20062006-05-05

Mad Prof wrote: ...> The easy answer is to consider 50Hz as a fraction of 200Hz ie 50/200 = 1/4. > So you need complex zeros at 1/4 sampling freq which is pi/2 and -pi/2 > (since 2pi is fs). > So we have zeros ta z=0+j1 and z=-0-j1. The filter is therefore > > (z-j1)(z+j1)=z^2+1.What about the poles to sharpen the notch? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

Reply by ●May 5, 20062006-05-05

"Jerry Avins" <jya@ieee.org> wrote in message news:-dCdnVcixZYYaMbZRVn-iA@rcn.net...> Mad Prof wrote: > > ... > > > The easy answer is to consider 50Hz as a fraction of 200Hz ie 50/200 =1/4.> > So you need complex zeros at 1/4 sampling freq which is pi/2 and -pi/2 > > (since 2pi is fs). > > So we have zeros ta z=0+j1 and z=-0-j1. The filter is therefore > > > > (z-j1)(z+j1)=z^2+1. > > What about the poles to sharpen the notch? > > Jerry > -- > Engineering is the art of making what you want from things you can get. > ���I think for a college exercise that maybe this is all he wants. After all we should really design Butterworth filters etc but this is just an exercise on the unit circle. M.P

Reply by ●May 6, 20062006-05-06

Mad Prof wrote:> "Jerry Avins" <jya@ieee.org> wrote in message > news:-dCdnVcixZYYaMbZRVn-iA@rcn.net... >> Mad Prof wrote: >> >> ... >> >>> The easy answer is to consider 50Hz as a fraction of 200Hz ie 50/200 = > 1/4. >>> So you need complex zeros at 1/4 sampling freq which is pi/2 and -pi/2 >>> (since 2pi is fs). >>> So we have zeros ta z=0+j1 and z=-0-j1. The filter is therefore >>> >>> (z-j1)(z+j1)=z^2+1. >> What about the poles to sharpen the notch? >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. >> ��� > I think for a college exercise that maybe this is all he wants. After all we > should really design Butterworth filters etc but this is just an exercise on > the unit circle.If you read the original question, you will see that he was asked to place two zeros and two poles. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

Reply by ●May 6, 20062006-05-06

"Jerry Avins" <jya@ieee.org> wrote in message news:MKGdnYh7J52eucHZnZ2dnUVZ_v-dnZ2d@rcn.net...> Mad Prof wrote: > > "Jerry Avins" <jya@ieee.org> wrote in message > > news:-dCdnVcixZYYaMbZRVn-iA@rcn.net... > >> Mad Prof wrote: > >> > >> ... > >> > >>> The easy answer is to consider 50Hz as a fraction of 200Hz ie 50/200 = > > 1/4. > >>> So you need complex zeros at 1/4 sampling freq which is pi/2 and -pi/2 > >>> (since 2pi is fs). > >>> So we have zeros ta z=0+j1 and z=-0-j1. The filter is therefore > >>> > >>> (z-j1)(z+j1)=z^2+1. > >> What about the poles to sharpen the notch? > >> > >> Jerry > >> -- > >> Engineering is the art of making what you want from things you can get. > >> ��� > > I think for a college exercise that maybe this is all he wants. Afterall we> > should really design Butterworth filters etc but this is just anexercise on> > the unit circle. > > If you read the original question, you will see that he was asked to > place two zeros and two poles. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > �����������������������������������������������������������������������They can be at z=0 ie 1+z^-2=0 M.P