Overload List
Overload 1: function EllipticFilter(Order: Integer; PassRipple: Double; StopRipple: Double; CutoffFreq: TDoubleArray; FilterType: TFilterType; Analog: Boolean; A: TMtx; B: TVec; C: TVec; out d: Double): Double;
The resulting transfer function is returned in the state-space form with A,B,C,D variables.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Order | Integer | |
| 2 | PassRipple | Double | scalar |
| 3 | StopRipple | Double | scalar |
| 4 | CutoffFreq | TDoubleArray | |
| 5 | FilterType | TFilterType | |
| 6 | Analog | Boolean | |
| 7 | A | TMtx | source TMtx |
| 8 | B | TVec | source TVec |
| 9 | C | TVec | source TVec |
| 10 | d | Double |
Returns: Double
Overload 2: function EllipticFilter(Order: Integer; PassRipple: Double; StopRipple: Double; CutoffFreq: TDoubleArray; FilterType: TFilterType; Analog: Boolean; Num: TVec; Den: TVec; IirFrequencyTransform: TIirFrequencyTransform): Double;
The resulting transfer function is returned in the numerator/denumerator form with num and den.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Order | Integer | |
| 2 | PassRipple | Double | scalar |
| 3 | StopRipple | Double | scalar |
| 4 | CutoffFreq | TDoubleArray | |
| 5 | FilterType | TFilterType | |
| 6 | Analog | Boolean | |
| 7 | Num | TVec | source TVec |
| 8 | Den | TVec | source TVec |
| 9 | IirFrequencyTransform | TIirFrequencyTransform |
Returns: Double
Overload 3: function EllipticFilter(Order: Integer; PassRipple: Double; StopRipple: Double; CutoffFreq: TDoubleArray; FilterType: TFilterType; Analog: Boolean; z: TVec; p: TVec; var k: Double; IirFrequencyTransform: TIirFrequencyTransform): Double;
Design Elliptic IIR filter.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Order | Integer | |
| 2 | PassRipple | Double | scalar |
| 3 | StopRipple | Double | scalar |
| 4 | CutoffFreq | TDoubleArray | |
| 5 | FilterType | TFilterType | |
| 6 | Analog | Boolean | |
| 7 | z | TVec | source TVec |
| 8 | p | TVec | source TVec |
| 9 | k | Double | |
| 10 | IirFrequencyTransform | TIirFrequencyTransform |
Returns: Double
Design Elliptic filter of Order with CutoffFreq frequencies and of FilterType type. Set Analog to True, to request an analog filter design in s-plane or set it to false to obtain a digital filter design in z-plane. CutoffFreq must be in range between 0 and 1 (Sampling frequency = 2) in case of a digital filter design.
IIrFrequencyTransform specifies when and how will the frequency band transformation be applied. PassRipple defines the passband ripple in dB and StopRipple defines the stopband ripple in dB. The resulting transfer function is returned in the zero-pole form, with z,p,k variables.
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,Bw,Wc: double;
WcArray: TDoubleArray; //modified 3dB frequency
begin
SetLength(WcArray,1);
Order := EllipticOrder([5/15,6/15],0.1,40,ftLowpass,WcArray,false);
EllipticFilter(Order,0.1,40,WcArray,ftLowpass,false,num,den);
FrequencyResponse(num,den,Response,64);
FreqFr := Ramp(response.Length,mvDouble,0,30*0.5/Response.Length);
DrawIt(FreqFr,20*Log10(Abs(Response)));
end;
Overload 4: function EllipticFilter(Order: Integer; PassRipple: Double; StopRipple: Double; CutoffFreq: TDoubleArray; FilterType: TFilterType; Analog: Boolean; sos: TVec; IirFrequencyTransform: TIirFrequencyTransform): Double;
The resulting transfer function is returned in the second order section form stored in the sos variable.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Order | Integer | |
| 2 | PassRipple | Double | scalar |
| 3 | StopRipple | Double | scalar |
| 4 | CutoffFreq | TDoubleArray | |
| 5 | FilterType | TFilterType | |
| 6 | Analog | Boolean | |
| 7 | sos | TVec | source TVec |
| 8 | IirFrequencyTransform | TIirFrequencyTransform |
Returns: Double
The sos variable can be passed directly to the IirInitBQ digital filter initialization routine. Second order section form delivers substantially higher numerical stability and range than filtering with num/den form used by the IirInit function.