Hi, Can anyone give introduction about POTSBAND Design filter? and what the purpose of this filter??? I found matlab code for this filter, function [b,a]=bandfilter(fs, f1, f2) %POTSBAND Design filter for 300-3400 telephone bandwidth [B,A]=(FS) %Input: FS=sample frequency in Hz %Output: B/A is a discrete time bandpass filter with a passband gain of 1 %The filter meets the specifications of G.151 for any sample frequency and has a gain of -3dB at the passband edges. if( nargin<2 ) f1 = 300 ; end if( nargin<3 ) f2 = 3400 ; end szp=[0.19892796195357i; -0.48623571568937+0.86535995266875i]; szp=[[0; -0.97247143137874] szp conj(szp)]; zl=2./(1-szp*tan(f1*pi/fs))-1; al=real(poly(zl(2,:))); bl=real(poly(zl(1,:))); sw=[1;-1;1;-1]; bl=bl*(al*sw)/(bl*sw); zh=2./(szp/tan(f2*pi/fs)-1)+1; ah=real(poly(zh(2,:))); bh=real(poly(zh(1,:))); bh=bh*sum(ah)/sum(bh); b=conv(bh,bl); a=conv(ah,al); Thankyou

# POTSBAND Design filter

Started by ●August 3, 2015

Reply by ●August 3, 20152015-08-03

On Mon, 03 Aug 2015 17:42:51 -0700, Biruntha Gnaneswaran wrote:> Hi, > Can anyone give introduction about POTSBAND Design filter? and what the > purpose of this filter??? > > I found matlab code for this filter, > function [b,a]=bandfilter(fs, f1, f2) > %POTSBAND Design filter for 300-3400 telephone bandwidth [B,A]=(FS) > %Input: FS=sample frequency in Hz %Output: B/A is a discrete time > bandpass filter with a passband gain of 1 %The filter meets the > specifications of G.151 for any sample frequency and has a gain of -3dB > at the passband edges. > > if( nargin<2 ) > f1 = 300 ; > end if( nargin<3 ) > f2 = 3400 ; > end > > szp=[0.19892796195357i; -0.48623571568937+0.86535995266875i]; > szp=[[0; -0.97247143137874] szp conj(szp)]; > > zl=2./(1-szp*tan(f1*pi/fs))-1; > > al=real(poly(zl(2,:))); > bl=real(poly(zl(1,:))); > sw=[1;-1;1;-1]; > bl=bl*(al*sw)/(bl*sw); > > zh=2./(szp/tan(f2*pi/fs)-1)+1; > > ah=real(poly(zh(2,:))); > bh=real(poly(zh(1,:))); > bh=bh*sum(ah)/sum(bh); > b=conv(bh,bl); > a=conv(ah,al); > > ThankyouPOTS is Plain Old Telephone Service. When a comment in some code says "XXXX specification", that means you're supposed to USE GOOGLE to see if you can find the spec -- G.151 in this case. If you find a G.151 specification that's about the viscosity of toilet bowl cleaners or the diameter of ramming rods for muzzle-loader rifles, you most likely need to keep looking until you find one pertaining to telephony. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com