DewDSPMasterNET
BesselAnalog Routine
Summary
Design analog Bessel type IIR prototype filter.

Unit
IIRFilters

Declaration
Procedure BesselAnalog(Order: integer; z, p: TVec; out k: TSample);

Description
Design analog Bessel prototype filter of order Order. Place the resulting transfer function in zero-pole form in Z (zeros), P (poles) and K (gain). The cutoff frequency of the prototype filter is preset to 1 rad/sec. The filter has all zeros in infinity. The transfer function is defined as([1], p. 230):
d0 H(s) = -------- Bn(s) (2*n)! n d0 = ------- , Bn(s) = Sum(d[k]*s^k), k = 0,...,n 2^n*n! k=0 (2*n-k)! d[k] = -------------- , n = order of the filter 2^(n-k)*(n-k)! Filter poles must be scaled with d0^(1/n)

Roots of the Bessel polynomial Bn(s) are found with the PolyRoots routine. Bessel lowpass filters are charachterized by the property that the group delay is maximally flat at the origing of the s-plane. ([1], p. 228).
Categories
IIR filter design routines
 See Also 
[1] "Theory and application of digital signal processing, Lawrence R. Rabiner and Bernard Gold. Prentice-Hall, 1975". 
BesselFilter 
LowpassToHighpass 
Bilinear 

Example 1

Design an analog lowpass filter with cutoff at 1.1 rad/sec.
uses MtxExpr, Math387, MtxVec, SignalUtils, MtxVecTee, MtxVecEdit, IirFilters, LinearSystems; procedure TForm1.Button1Click(Sender: TObject); var z,p, num,den, FreqFr,Response: Vector; Order: integer; k,Wc,BW: TSample; begin Order := 5; //design a fifth order filter. BesselAnalog(Order,z,p,k); //design analog protype Wc := 1.1; LowpassToLowpass(z,p,k,Wc); //frequency transformation in s-domain ZeroPoleToTransferFun(num,den,z,p,k); FreqFr.Length := 1000; //Define the frequency grid (logarithmic) LogRamp(FreqFr,-1,1); //between 0.1 (=10^(-1)) and 10 (=10^1) rad/sec FrequencyResponseS(num,den,FreqFr,Response); //Laplace DrawIt(Response); //Y axis linear, X axis logarithmic; end;
#include "MtxVecCPP.h" //MtxVecCPP.cpp must be included in the project #include "MtxVecEdit.hpp" #include "MtxVecTee.hpp" #include "SignalUtils.hpp" #include "IirFilters.hpp" #include "LinearSystems.hpp" void __fastcall TForm1::BitBtn1Click(TObject *Sender) { Vector z,p, num,den, FreqFr, Response; int Order; double k,Wc,BW; Order = 5; //design a fifth order filter. BesselAnalog(Order,z,p,k); //design analog protype Wc = 1.1; LowpassToLowpass(z,p,k,Wc); //frequency transformation in s-domain ZeroPoleToTransferFun(num,den,z,p,k); FreqFr->Length = 1000; //Define the frequency grid (logarithmic) LogRamp(FreqFr,-1,1); //between 0.1 (=10^(-1)) and 10 (=10^1) rad/sec FrequencyResponseS(num,den,FreqFr,Response); //Laplace DrawIt(Response); //Y axis linear, X axis logarithmic; }
using Dew.Math; using Dew.Math.Editors; using Dew.Math.Units; using Dew.Signal; using Dew.Signal.Units; using Dew.Math.Tee; using Dew.Signal.Tee; private void button1_Click(object sender, EventArgs e) { Vector z = new Vector(0); Vector p = new Vector(0); Vector num = new Vector(0); Vector den = new Vector(0); Vector Response = new Vector(0); Vector FreqFr = new Vector(0); double k, Wc; int Order = 5; //design a fifth order filter. IIRFilters.BesselAnalog(Order,z, p, out k); //design analog protype Wc = 1.1; //cutoff frequency LinearSystems.LowpassToLowpass(z, p, ref k, Wc); LinearSystems.ZeroPoleToTransferFun(num, den, z, p, k); FreqFr.Length = 1000; SignalUtils.LogRamp(FreqFr, -1, 1); SignalUtils.FrequencyResponseS(num, den, FreqFr, Response, 0); TeeChart.DrawIt(Response, "Frequency response", false); }

Copyright 2008 Dew Research
http://www.dewresearch.com