Main Content

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.BiquadFilter with properties:

                   Structure: 'Direct form II'
             SOSMatrixSource: 'Property'
                   SOSMatrix: [4x6 double]
                 ScaleValues: [5x1 double]
           InitialConditions: 0
    OptimizeUnityScaleValues: true

  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.BiquadFilter with properties:

                   Structure: 'Direct form II'
             SOSMatrixSource: 'Property'
                   SOSMatrix: [3x6 double]
                 ScaleValues: [4x1 double]
           InitialConditions: 0
    OptimizeUnityScaleValues: true

  Show all properties

Use fvtool to visualize the lowpass frequency response.

fvtool(ellipLowpass)

Input Arguments

collapse all

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.

Introduced in R2011a