Main Content

cheby1

Chebyshev Type I filter using specification object

Description

example

chebOneFilter = cheby1(designSpecs,'SystemObject',true) designs a type I Chebyshev IIR digital filter using specifications in the designSpecs object.

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

help(designSpecs,'cheby1')

You cannot use the cheby1 design method for certain filter specification objects. Use the designmethods function with the filter specification object to determine if the cheby1 design method is valid for your filter specifications.

designmethods(designSpecs,'Systemobject',true)

cheby1 returns filters that use second-order sections (SOS). SOS filters are particularly well-suited for most fixed-point applications.

chebOneFilter = cheby1(designSpecs,designoption,value,... 'SystemObject',true) returns a type I Chebyshev IIR digital filter with the specified design options. You can specify one or more design options and their corresponding values.

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

designoptions(designSpecs,'cheby1')

chebOneFilter = design(designSpecs,'cheby1','SystemObject',true) is an alternative syntax for designing a type I Chebyshev IIR digital filter.

Examples

collapse all

Design a type 1 Chebyshev IIR filter with lowpass and highpass frequency responses. 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, use the designoptions function.

  4. Design the filter using the design function.

Lowpass Filter

Create a default lowpass filter specification object using the fdesign.lowpass function.

designSpecs = fdesign.lowpass; 

Determine the available design methods using the designmethods function. To design a type 1 Chebyshev filter, pick cheby1.

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


butter
cheby1
cheby2
ellip
equiripple
ifir
kaiserwin
multistage

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

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

Use the design function to design the filter. Pass 'cheby1' and the designSpecs object containing the filter design specifications as input arguments. Set the filter structure to 'df1sos' to design a filter with a direct form I SOS structure.

LowpassCheb1 = design(designSpecs,'cheby1','FilterStructure','df1sos',...
    'SystemObject',true)
LowpassCheb1 = 
  dsp.BiquadFilter with properties:

                       Structure: 'Direct form I'
                 SOSMatrixSource: 'Property'
                       SOSMatrix: [5x6 double]
                     ScaleValues: [6x1 double]
      NumeratorInitialConditions: 0
    DenominatorInitialConditions: 0
        OptimizeUnityScaleValues: true

  Show all properties

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

fvtool(LowpassCheb1)

Figure Filter Visualization Tool - Magnitude Response (dB) contains an axes object and other objects of type uitoolbar, uimenu. The axes object with title Magnitude Response (dB) contains 2 objects of type line.

Highpass Filter

Create a highpass filter design specification object using the fdesign.highpass function. Specify the filter order, passband edge frequency, and the passband ripple.

designSpecs = fdesign.highpass('n,fp,ap',7,20,.4,50); 

Determine the available design methods.

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


cheby1

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.

HighpassCheb1 = design(designSpecs,'cheby1','SystemObject',true)
HighpassCheb1 = 
  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 visualize the highpass frequency response.

fvtool(HighpassCheb1)

Figure Filter Visualization Tool - Magnitude Response (dB) contains an axes object and other objects of type uitoolbar, uimenu. The axes object with title Magnitude Response (dB) contains 2 objects of type line.

Input Arguments

collapse all

Filter specification object, specified as one of the following:

Output Arguments

collapse all

Type I Chebyshev IIR digital filter, returned as a System object. The System object and the values of its properties depend on the input designSpecs object and the other design options that you specify as inputs to the function.

Introduced in R2011a