Design analog Butterworth type IIR prototype filter.
public ButterAnalog(int Order, TVec z, TVec p, ref double k);
Design analog butterworth lowpass 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. 277):
k0
H(s) = -------------------------
(s - s[1])*...*(s - s[n])
The poles of the filter are located at
s[k] := Expj(Pi*(0.5+(2*k-1)/(2*n)));
n = order of filter
k = 1,...,n
k0 = gain
The magnitude response is down 3dB at the cutoff frequency.
References:
[1] Theory and application of digital signal processing, Lawrence R. Rabiner and Bernard Gold. Prentice-Hall, 1975.
ButterFilter, LowpassToHighpass, Bilinear
Design an analog lowpass filter with cutoff frequency at 3 rad/sec.
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.ButterAnalog(Order,z, p, out k); //design analog protype Wc = 3; //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); }
|
What do you think about this topic? Send feedback!
|
|
Copyright (c) 1999-2010 by Dew Research. All rights reserved.
|