Main Content

ellipap

Elliptic analog lowpass filter prototype

Description

[z,p,k] = ellipap(n,Rp,Rs) returns the zeros, poles, and gain of an nth-order elliptic analog lowpass filter prototype, with Rp dB of ripple in the passband and a stopband Rs dB down from the peak value in the passband.

example

Examples

collapse all

Design a 6th-order elliptic analog lowpass filter with 5 dB of ripple in the passband and 50 dB of stopband attenuation.

[z,p,k] = ellipap(6,5,50);

Convert the zero-pole-gain filter parameters to transfer function form and display the frequency response of the filter.

[b,a] = zp2tf(z,p,k);
freqs(b,a)

Figure contains 2 axes objects. Axes object 1 with xlabel Frequency (rad/s), ylabel Phase (degrees) contains an object of type line. Axes object 2 with xlabel Frequency (rad/s), ylabel Magnitude contains an object of type line.

Input Arguments

collapse all

Filter order, specified as a positive integer scalar.

Data Types: double

Passband ripple, specified as a positive scalar in decibels.

Data Types: double

Stopband attenuation down from the peak passband value, specified as a positive scalar in decibels.

Data Types: double

Output Arguments

collapse all

Zeros of the filter, returned as a column vector of length n. If n is odd, then z has a length equal to n – 1.

Poles of the filter, returned as a column vector of length n.

Gain of the filter, returned as a scalar.

Algorithms

The ellipap function uses the algorithm outlined in [1]. It employs ellipke to calculate the complete elliptic integral of the first kind [2] and uses elliptic functions to compute the zeros and poles.

The function sets the passband edge angular frequency ωp of the elliptic filter to 1 for a normalized result and finds a value for the stopband edge angular frequency ωs. At these frequencies, the filter magnitude response has a passband ripple and stopband attenuation of Rp dB and Rs dB, respectively.

The transfer function in factored zero-pole form is

H(s)=z(s)p(s)=k(sz1)(sz2)(szN)(sp1)(sp2)(spM).

As part of the filter prototype design process, ellipap verifies that the filter order n, passband ripple Rp, and stopband attenuation Rs satisfy

nK(m0)K(1m1)K(1m0)K(m1),

where m0=1ωs2 must be less than 1, m1=10Rp/10110Rs/101, and K(m) is the complete elliptic integral of the first kind with parameter m such that

K(m)=01dt(1t2)(1mt2).

Note

If you specify too high a value for n, ellipap can error out. To resolve this error, reduce n.

References

[1] Parks, T. W., and C. S. Burrus. Digital Filter Design. New York: John Wiley & Sons, 1987, chap. 7.

[2] Abramowitz, Milton, and Stegun, Irene A. Handbook of Mathematical Functions With Formulas, Graphs, and Mathematical Tables. National Bureau of Standards, Applied Mathematical Series, 1972.

Extended Capabilities

expand all

Version History

Introduced before R2006a