# ellip

Elliptic filter using specification object

## Description

example

ellipFilter = ellip(designSpecs,SystemObject=true) designs an elliptical IIR digital filter using the specifications in the object designSpecs.

Depending on the filter specification object designSpecs, the ellip design method might not be valid. Use designmethods with the filter specification object to determine if an elliptic IIR filter design is possible.

designmethods(designSpecs,SystemObject=true)

example

ellipFilter = ellip(designSpecs,designoption=value,... SystemObject=true) returns an elliptic IIR digital filter with one or more specified designed options and the corresponding values.

To view a list of available design options, run the designoptions function on the specification object. The function also lists the default design options the filter uses.

designoptions(designSpecs,'ellip')

ellipFilter = design(designSpecs,'ellip',SystemObject=true) is an alternative syntax for designing the elliptic IIR digital filter.

For complete help about using the ellip design method for a specification object, designSpecs, enter the following at the MATLAB® command prompt.

help(designSpecs,'ellip')

## Examples

collapse all

Design an elliptic digital filter with bandpass frequency response. The filter design procedure is:

1. Specify the filter design specifications using a fdesign function.

2. Pick a design method provided by the designmethods function.

3. To determine the available design options to choose from, use the designoptions function.

4. Design the filter using the design function.

Construct the default bandpass filter specification object using fdesign.bandpass.

designSpecs = fdesign.bandpass
designSpecs =
bandpass with properties:

Response: 'Bandpass'
Specification: 'Fst1,Fp1,Fp2,Fst2,Ast1,Ap,Ast2'
Description: {7x1 cell}
NormalizedFrequency: 1
Fstop1: 0.3500
Fpass1: 0.4500
Fpass2: 0.5500
Fstop2: 0.6500
Astop1: 60
Apass: 1
Astop2: 60

Determine the available design methods using the designmethods function. To design an elliptic digital filter, pick ellip.

designmethods(designSpecs,SystemObject=true)
Design Methods that support System objects for class fdesign.bandpass (Fst1,Fp1,Fp2,Fst2,Ast1,Ap,Ast2):

butter
cheby1
cheby2
ellip
equiripple
kaiserwin

While designing the filter, you can specify additional design options. View a list of the options using the designoptions function. This function also shows the default design options the filter uses.

designoptions(designSpecs,'ellip',SystemObject=true)
ans = struct with fields:
FilterStructure: {1x6 cell}
SOSScaleNorm: 'ustring'
SOSScaleOpts: 'fdopts.sosscaling'
MatchExactly: {'passband'  'stopband'  'both'}
DefaultFilterStructure: 'df2sos'
DefaultMatchExactly: 'both'
DefaultSOSScaleNorm: ''
DefaultSOSScaleOpts: [1x1 fdopts.sosscaling]

Use the design function to design the filter. Pass 'ellip' and the specifications given by the variable designSpecs, as input arguments. Specify the 'matchexactly' design option to 'both' to ensure the performance of the filter in both the passband and the stopband regions.

bandpassEllip = design(designSpecs,'ellip',matchexactly='both',...
SystemObject=true)
bandpassEllip =
dsp.SOSFilter with properties:

Structure: 'Direct form II'
CoefficientSource: 'Property'
Numerator: [4x3 double]
Denominator: [4x3 double]
HasScaleValues: true
ScaleValues: [0.4705 0.4705 0.0936 0.0936 1]

Show all properties

Use fvtool to view the frequency response of the designed filter.

fvtool(bandpassEllip)

Design an elliptic digital filter with lowpass frequency response.

Construct a lowpass filter specification object using fdesign.lowpass. Specify the filter order, passband edge frequency, stopband edge frequency, and the passband ripple of the filter.

designSpecs = fdesign.lowpass('n,fp,fst,ap',6,20,25,.8,80);

Determine the available design methods. To design an elliptic filter, pick ellip.

designmethods(designSpecs,SystemObject=true)
Design Methods that support System objects for class fdesign.lowpass (N,Fp,Fst,Ap):

ellip
equiripple

Use the design function to design the filter. Pass 'ellip' and the specifications given by the variable designSpecs, as input arguments.

ellipLowpass = design(designSpecs,'ellip',SystemObject=true)
ellipLowpass =
dsp.SOSFilter with properties:

Structure: 'Direct form II'
CoefficientSource: 'Property'
Numerator: [3x3 double]
Denominator: [3x3 double]
HasScaleValues: true
ScaleValues: [0.0968 0.4116 0.6792 1]

Show all properties

Use fvtool to visualize the lowpass frequency response.

fvtool(ellipLowpass)

## Input Arguments

collapse all

Filter specification object, specified as one of the following:

## Output Arguments

collapse all

Elliptical digital filter, returned as a filter System object. The System object and the values of its properties depend on the input designSpecs object and the other design options specified to the function.

## Version History

Introduced in R2011a

expand all