ELLIPTIC

Purpose:

Designs a digital IIR Elliptic filter.

Syntax:

ELLIPTIC(

type, order, rate, pb1, pb2, ripple, attn, sb1, sb2, "options")

type

-

An integer, the filter type.

1:

lowpass

2:

highpass

3:

bandpass

4:

bandstop

order

-

Optional. An integer, the filter length. If not specified or set to -1, the filter order is automatically estimated.

rate

-

A real, the sample rate of the filter in Hertz.

pb1

-

A real, the first passband edge in Hertz.

pb2

-

A real, the second passband edge in Hertz.

ripple

-

A real, the passband ripple in dB.

attn

-

A real, the stopband attenuation in dB.

sb1

-

Optional. A real, the first stopband edge frequency in Hertz. Defaults to pb1 - 0.05 * rate

sb2

-

Optional. A real, the second stopband edge frequency in Hertz. Defaults to pb2 + 0.05 * rate

"options"

-

Optional. A string, zero or more the filter options:

"analog" :

produce analog filter coefficients, rate is ignored

"matched_z" :

use the matched z method to convert an analog filter prototype to a digital filter

"unity_dc" :

force the amplitude at 0 Hz to be 1.0 (lowpass and bandstop filters only)

"non_unity_dc" :

do not force the amplitude at 0 Hz to be 1.0 (lowpass and bandstop filters only)

Returns:

A series, the Elliptic filter coefficients in multi-stage cascade format.

Example:

W1: elliptic(1, 1000.0, 100.0, 3, 40)

W2: 20*log10(filtmag(W1, 1024));sety(-80, 10)

 

 

 

W1 creates an Elliptic lowpass filter with a sample rate of 1000 Hz, a passband ripple of 3 dB and a stopband attenuation of 40 dB. The stopband frequency defaults to 150 Hz. W2 displays the frequency response of the resulting filter.

 

Example:

W1: elliptic(1, 1000.0, 100.0, 3, 40)

W2: gsin(1000, 1/1000, 3) + gsin(1000, 1/1000, 250)

W3: iirfilter(W2, W1)

 

 

Creates the same IIR lowpass filter as the previous example. W2 contains a series with two sinusoids and W3 applies the filter to recover the lower frequency sinewave.

Example:

W2: elliptic(1, 1000.0, 100.0, 3.0, 50.0, 130.0)

 

Creates a similar filter except the stopband attenuation is set to 50 dB and the stopband edge is set to 130 Hz.

Example:

W3: elliptic(3, 18, 1000.0, 200.0, 300.0, 3.0, 40.0)

 

Creates an Elliptic bandpass filter with a sample rate of 1000 Hz, a filter order of 18 and a passband that extends from 200 Hz to 300 Hz. The passband ripple is 3 dB and the stopband attenuation is 40 dB.

Example:

W4: elliptic(3, 24, 1000.0, 200.0, 300.0, 2.0, 50.0, 180.0, 320.0)

 

Creates a similar Elliptic bandpass filter as above except the order is set to 24 (resulting in 121 coefficients), the desired passband ripple is set to 2 dB and the desired stopband attenuation is set to 50 dB. The first stopband edge is 180 Hz and the last stopband edge is set to 320 Hz.

Example:

W1: elliptic(1, 1000.0, 100.0, 3, 40, "analog")

W2: 20*log10(filtmag(W1, 1024, "analog"))

 

Same as the first example, except the result is an analog filter. The rate parameter is ignored.

Remarks:

The generic ELLIPTIC filter specifications are depicted as follows:

 

                                              Type = 1, Lowpass

 

 

                                               Type = 2, Highpass

 

 

                                              Type = 3, Bandpass

 

 

                                              Type = 4, Bandstop

 

For filter type 1 and 2 (lowpass and highpass), the band frequencies pb2 and sb2 are omitted.

 

The ripple and attn parameters are required.

 

ELLIPTIC  uses the Bilinear Transform Method to compute the coefficients by converting an analog filter prototype to the digital domain. The filter order refers to the number of resulting poles (2X poles result for type 3 and type 4) and is not equivalent to the number of filter coefficients.

 

If "matched_z" is specified, the matched z transform is used instead of the BILINEAR transform. The matched z method maps the analog prototype filter poles and zeros to the digital domain with:

 

z = e sT   where T is the sample rate of the digital filter.

 

The band edges must lie between 0.0 and 0.5 * rate (the Nyquist frequency). Overlapping band edges are not permitted.

 

The filter coefficients are produced in multi-stage bi-quad form suitable for processing by the CASCADE function.

 

The cascade stages are ordered such that the poles of each stage are closer to the unit circle than the previous stage. The zeros of each stage are chosen to be closest to the poles of the same stage.

 

For lowpass and bandstop filters, if "unity_dc" is specified, the amplitude at 0 Hz is forced to 1.0 (i.e. 0 dB). This may require the filter to have a gain greater than 1 in the passband. The "non_unity_dc" option causes the filter to have a maximum passband response of 1.0, but the 0 Hz value will not be 1.0 for even order filters.

 

If "analog" is specified, the filter coefficients represent an analog filter, with coefficients in cascaded second order stages of analog frequency s. In this case, the rate parameter is ignored.

 

The gain of an analog low pass elliptic filter with a cut off frequency of ωc is given by the expression:

 

 

where n is the filter order and Rn is the nth order elliptic rational function. The gain at ωc is equal to the passband ripple. The passband ripple is determined by ε such that:

 

 

The stopband attenuation is determined by ε and ξ:

 

 

where Ln is the discrimination factor defined as:

 

 

An elliptic filter has ripple in both the passband and stopband but generally results in fewer coefficients than other IIR filter types for a given filter specification.

 

Elliptic filters are also referred to as Cauer filters.

 

See BANDPASS, BANDSTOP, HIGHPASS and LOWPASS to design linear phase FIR filters using the Remez Exchange method.

 

ELLIPTIC requires the DADiSP/Filters Module.

See Also:

BESSEL

BUTTERWORTH

CASCADE

CHEBY1

CHEBY2

DADiSP/Filters

RATE

References:

Oppenheim and Schafer

Discrete Time Signal Processing

Prentice Hall, 1989

 

Digital Signal Processing Committee

Programs for Digital Signal Processing

I.E.E.E. Press, 1979

 

Bateman & Yates

Digital Signal Processing Design

Computer Science Press, 1989