主要内容

Bandpass FIR

Design bandpass finite impulse response filter

Description

A bandpass filter attenuates the energy of an input signal outside a specified frequency range. A finite impulse response (FIR) filter computes an output signal as a running weighted average of input samples.

Signal Processing Toolbox™ provides different ways to design bandpass FIR filters:

All of these methods return digitalFilter objects. If you have a DSP System Toolbox™ license, you can generate your design as a filter System object™ and include additional Design Method Options.

For other ways to design bandpass FIR filters using MATLAB, see Other Bandpass FIR Filter Design Functions.

Examples

expand all

To design the filter at the command line or in a script, use the designfilt function with "bandpassfir" as the first argument. Use name-value arguments to specify your design further.

d = designfilt("bandpassfir", ...                          % Filter type
    SampleRate=2000, ...                                   % Sample rate
    FilterOrder=30, ...                                    % Filter order
    StopbandFrequency1=300,PassbandFrequency1=350, ...     % Frequency constraints
    PassbandFrequency2=550,StopbandFrequency2=750, ...
    DesignMethod="ls", ...                                 % Design method
    StopbandWeight1=3,PassbandWeight=1,StopbandWeight2=5); % Design method options
filterAnalyzer(d)

To design the filter using the Design Filter Live Editor task:

  1. Specify the filter:

    • Under Select filter response, select Bandpass FIR.

    • Under Sample Rate, specify Frequency units as Hz and Input sample rate (Hz) as 2000.

    • Under Specify filter order, set Order mode to Specify and enter a value of 30.

    • Under Specify frequency parameters, specify:

      • Stopband frequency 1 as 300 Hz

      • Passband frequency 1 as 350 Hz

      • Passband frequency 2 as 550 Hz

      • Stopband frequency 2 as 750 Hz

    • Under Specify algorithm, select FIR least-squares. Under Specify algorithm options, specify:

      • Stopband weight 1 as 3

      • Passband weight as 1

      • Stopband weight 2 as 5

  2. The Live Editor task updates the filter automatically by default.

    Bandpass FIR filter design using Live Editor task

To design the filter using the Filter Designer app:

  1. In the Response gallery of the Designer tab in the app toolstrip, select Bandpass FIR.

  2. Specify the filter using the options in the Filter Parameters table:

    • In Design by, select Specification.

    • In Sample Rate, specify Frequency units as Hz and Input sample rate (Hz) as 2000.

    • Under Filter Order, set Order mode to Specify and enter a value of 30.

    • Under Frequency Specifications, specify:

      • Stopband frequency 1 as 300 Hz

      • Passband frequency 1 as 350 Hz

      • Passband frequency 2 as 550 Hz

      • Stopband frequency 2 as 750 Hz

    • Under Algorithm, select FIR least-squares. Under Algorithm Options, specify:

      • Stopband weight 1 as 3

      • Passband weight as 1

      • Stopband weight 2 as 5

  3. In the Filter section of the Designer tab, click Update Filter.

    Bandpass FIR filter design using Filter Designer app

  4. Export code to create your digital filter. On the toolstrip, click Export and select Generate MATLAB function > Digital Filter Object. The code appears in the editor.

    function designedFilter = bandpassfir1filt
    
    designedFilter = designfilt('bandpassfir', ...
        'FilterOrder',30,'StopbandFrequency1',300, ...
        'PassbandFrequency1',350,'PassbandFrequency2',550, ...
        'StopbandFrequency2',750,'SampleRate',2000, ...
        'DesignMethod','ls','StopbandWeight1',3, ...
        'StopbandWeight2',5);
    
    end

Parameters

expand all

Design Method

Specify the algorithm to design the filter. The available design methods correlate with the set of design specifications that you choose.

Design the filter using the Parks-McClellan algorithm. Equiripple filters have a frequency response that minimizes the maximum ripple magnitude over all bands.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App

Specify DesignMethod="equiripple".

In the Specify algorithm section of the task, set Design method to Equiripple.

In the Algorithm section of the filter parameters panel, set Design method to Equiripple.

The equiripple design method supports these design parameter combinations.

Design the filter using the Kaiser window algorithm. The method truncates the impulse response of an ideal filter and uses a Kaiser window to attenuate the resulting truncation oscillations.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App

Specify DesignMethod="kaiserwin".

In the Specify algorithm section of the task, set Design method to Kaiser window.

In the Algorithm section of the filter parameters panel, set Design method to Kaiser window.

The Kaiser window design method supports these design parameter combinations.

Filter OrderFrequency SpecificationsMagnitude SpecificationsDesign Method OptionsDSP System Toolbox License Required
N/A

 

Design the filter using the window algorithm. The method uses a least-squares approximation to compute the filter coefficients and then smooths the impulse response with Window.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App

Specify DesignMethod="window".

In the Specify algorithm section of the task, set Design method to Window.

In the Algorithm section of the filter parameters panel, set Design method to Window.

The window design method supports these design parameter combinations.

Filter OrderFrequency SpecificationsMagnitude SpecificationsDesign Method OptionsDSP System Toolbox License Required

N/A

 

Design the filter using the constrained least-squares algorithm. The method minimizes the discrepancy between a specified arbitrary piecewise-linear function and the magnitude response of the filter. At the same time, it lets you set constraints on the passband ripple and the stopband attenuation.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App

Specify DesignMethod="cls".

In the Specify algorithm section of the task, set Design method to FIR constrained least-squares.

In the Algorithm section of the filter parameters panel, set Design method to FIR constrained least-squares.

The constrained least-squares design method supports these design parameter combinations.

Filter OrderFrequency SpecificationsMagnitude SpecificationsDesign Method OptionsDSP System Toolbox License Required

 

Design the filter using the least-squares algorithm. The method minimizes the discrepancy between a specified arbitrary piecewise-linear function and the filter’s magnitude response.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App

Specify DesignMethod="ls".

In the Specify algorithm section of the task, set Design method to FIR least-squares.

In the Algorithm section of the filter parameters panel, set Design method to FIR least-squares.

The least-squares design method supports these design parameter combinations.

Filter OrderFrequency SpecificationsMagnitude SpecificationsDesign Method OptionsDSP System Toolbox License Required

N/A

 

Design the filter using the least Pth-norm unconstrained optimization algorithm.

You must have a DSP System Toolbox license to use this design method.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App

Specify DesignMethod="lpnorm".

In the Specify algorithm section of the task, set Design method to FIR least p-norm.

In the Algorithm section of the filter parameters panel, set Design method to FIR least p-norm.

The least Pth-norm method supports these design parameter combinations.

Sample Rate

Specify the filter sample rate as a positive scalar expressed in hertz.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • To specify a sample rate, use the SampleRate name-value argument and input a value in hertz.

  • To work with normalized frequencies, omit the sample rate.

In the Sample Rate section of the task:

  • To specify a sample rate, set Frequency units to Hz and type a value for Input sample rate (Hz).

  • To work with normalized frequencies, set Frequency units to Normalized.

In the Sample Rate section of the filter parameters panel:

  • To specify a sample rate, set Frequency units to Hz and type a value for Input sample rate (Hz).

  • To work with normalized frequencies, set Frequency units to Normalized.

Filter Order

Specify the filter order N as a positive integer. Some design methods let you specify the order. Others generate minimum-order designs, which are the shortest filters that satisfy the specified constraints.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App

  • To specify a filter order, use the FilterOrder name-value argument and input a positive integer.

  • To use a minimum-order design, specify frequency and magnitude constraints accordingly.

In the Specify Filter Order section of the task:

  • To specify a filter order, set Order mode to Specify and enter a value for Order.

  • To use a minimum-order design, set Order mode to Minimum.

In the Filter Order section of the filter parameters panel:

  • To specify a filter order, set Order mode to Specify and enter a value for Order.

  • To use a minimum-order design, set Order mode to Minimum.

Frequency Specifications

Specify the lower stopband frequency as a positive scalar smaller than the Nyquist frequency. If you work with normalized frequencies, the Nyquist frequency is 1. If you specify a sample rate Fs, the Nyquist frequency is Fs/2.

The lower stopband frequency is the highest frequency in the lower stopband for which the magnitude response of the filter is at least Stopband Attenuation 1 dB lower than the reference value, usually 0 dB.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the StopbandFrequency1 name-value argument. Input the value as a positive scalar.

  • In the Specify Frequency Parameters section of the task, select a set of Frequency Constraints containing Stopband frequency 1 and enter a positive scalar as the value.

  • In the Frequency Specifications section of the filter parameters panel, select a set of Frequency Constraints containing Stopband frequency 1 and enter a positive scalar as the value.

Specify the lower cutoff frequency as a positive scalar smaller than the Nyquist frequency. If you work with normalized frequencies, the Nyquist frequency is 1. If you specify a sample rate Fs, the Nyquist frequency is Fs/2.

The lower cutoff frequency is the lowest frequency at which the magnitude response of the filter is mag2db(1/2)= 20 log10½ = –6.02 dB below the reference value, usually 0 dB.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the CutoffFrequency1 name-value argument. Input the value as a positive scalar.

  • In the Specify Frequency Parameters section of the task, set Frequency Constraints to Cutoff (6dB) frequency 1 and enter a positive scalar as the value.

  • In the Frequency Specifications section of the filter parameters panel, set Frequency Constraints to Cutoff (6dB) Frequency 1 and enter a positive scalar as the value.

Specify the lower passband frequency as a positive scalar smaller than the Nyquist frequency. If you work with normalized frequencies, the Nyquist frequency is 1. If you specify a sample rate Fs, the Nyquist frequency is Fs/2.

The lower passband frequency is the lowest frequency in the passband for which the magnitude response of the filter is within an interval of width Passband Ripple about the reference value, usually 0 dB.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the PassbandFrequency1 name-value argument. Input the value as a positive scalar.

  • In the Specify Frequency Parameters section of the task, select a set of Frequency Constraints containing Passband frequency 1 and enter a positive scalar as the value.

  • In the Frequency Specifications section of the filter parameters panel, select a set of Frequency Constraints containing Passband frequency 1 and enter a positive scalar as the value.

Specify the higher passband frequency as a positive scalar smaller than the Nyquist frequency. If you work with normalized frequencies, the Nyquist frequency is 1. If you specify a sample rate Fs, the Nyquist frequency is Fs/2.

The higher passband frequency is the highest frequency in the passband for which the magnitude response of the filter is within an interval of width Passband Ripple about the reference value, usually 0 dB.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the PassbandFrequency2 name-value argument. Input the value as a positive scalar.

  • In the Specify Frequency Parameters section of the task, select a set of Frequency Constraints containing Passband frequency 2 and enter a positive scalar as the value.

  • In the Frequency Specifications section of the filter parameters panel, select a set of Frequency Constraints containing Passband frequency 2 and enter a positive scalar as the value.

Specify the higher cutoff frequency as a positive scalar smaller than the Nyquist frequency. If you work with normalized frequencies, the Nyquist frequency is 1. If you specify a sample rate Fs, the Nyquist frequency is Fs/2.

The higher cutoff frequency is the highest frequency at which the magnitude response of the filter is mag2db(1/2)= 20 log10½ = –6.02 dB below the reference value, usually 0 dB.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the CutoffFrequency2 name-value argument. Input the value as a positive scalar.

  • In the Specify Frequency Parameters section of the task, set Frequency Constraints to Cutoff (6dB) frequency 2 and enter a positive scalar as the value.

  • In the Frequency Specifications section of the filter parameters panel, set Frequency Constraints to Cutoff (6dB) Frequency 2 and enter a positive scalar as the value.

Specify the higher stopband frequency as a positive scalar smaller than the Nyquist frequency. If you work with normalized frequencies, the Nyquist frequency is 1. If you specify a sample rate Fs, the Nyquist frequency is Fs/2.

The higher stopband frequency is the lowest frequency in the higher stopband for which the magnitude response of the filter is at least Stopband Attenuation 2 dB lower than the reference value, usually 0 dB.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the StopbandFrequency2 name-value argument. Input the value as a positive scalar.

  • In the Specify Frequency Parameters section of the task, select a set of Frequency Constraints containing Stopband frequency 2 and enter a positive scalar as the value.

  • In the Frequency Specifications section of the filter parameters panel, select a set of Frequency Constraints containing Stopband frequency 2 and enter a positive scalar as the value.

Magnitude Specifications

Specify the lower stopband attenuation as a positive scalar in decibels.

The lower stopband attenuation measures the extent by which the filter gain in the lower stopband is decreased in comparison to the reference value, usually 0 dB.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the StopbandAttenuation1 name-value argument. Input the value as a positive scalar in decibels.

  • In the Specify Magnitude Parameters section of the task, select a set of Magnitude Constraints containing Stopband attenuation 1 (dB) and enter a positive scalar in decibels as the value.

  • In the Magnitude Specifications section of the filter parameters panel, select a set of Magnitude Constraints containing Stopband attenuation 1 (dB) and enter a positive scalar in decibels as the value.

Specify the passband ripple as a positive scalar in decibels.

The passband ripple measures the fluctuation of the passband gain of the filter about the reference value, usually 0 dB.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the PassbandRipple name-value argument. Input the value as a positive scalar in decibels.

  • In the Specify Magnitude Parameters section of the task, select a set of Magnitude Constraints containing Passband ripple (dB) and enter a positive scalar in decibels as the value.

  • In the Magnitude Specifications section of the filter parameters panel, select a set of Magnitude Constraints containing Passband ripple (dB) and enter a positive scalar in decibels as the value.

Specify the higher stopband attenuation as a positive scalar in decibels.

The higher stopband attenuation measures the extent by which the filter gain in the higher stopband is decreased in comparison to the reference value, usually 0 dB.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the StopbandAttenuation2 name-value argument. Input the value as a positive scalar in decibels.

  • In the Specify Magnitude Parameters section of the task, select a set of Magnitude Constraints containing Stopband attenuation 2 (dB) and enter a positive scalar in decibels as the value.

  • In the Magnitude Specifications section of the filter parameters panel, select a set of Magnitude Constraints containing Stopband attenuation 2 (dB) and enter a positive scalar in decibels as the value.

Use this argument to constrain the attenuation of the lower stopband for an Equiripple design.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the Stopband1Constrained name-value argument. Input the value as true.

  • In the Specify magnitude parameters section of the task, set Magnitude Constraints to Constrained bands and check Constrained first stopband attenuation.

  • In the Magnitude Specifications section of the filter parameters panel, set Magnitude constraints to Constrained bands and check Constrained first stopband attenuation.

Use this argument to constrain the ripple in the passband for an Equiripple design.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the PassbandConstrained name-value argument. Input the value as true.

  • In the Specify magnitude parameters section of the task, set Magnitude Constraints to Constrained bands and check Constrained passband ripple.

  • In the Magnitude Specifications section of the filter parameters panel, set Magnitude constraints to Constrained bands and check Constrained passband ripple.

Use this argument to constrain the attenuation of the higher stopband for an Equiripple design.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the Stopband2Constrained name-value argument. Input the value as true.

  • In the Specify magnitude parameters section of the task, set Magnitude Constraints to Constrained bands and check Constrained second stopband attenuation.

  • In the Magnitude Specifications section of the filter parameters panel, set Magnitude constraints to Constrained bands and check Constrained second stopband attenuation.

Design Method Options

Basic Options

Minimum order parity of a Kaiser Window design or an Equiripple design, specified as one of these options:

  • Any — The returned filter can have even or odd order, whichever is smaller.

  • Even — The returned filter has the smallest possible even order.

  • Odd — The returned filter has the smallest possible odd order. This option is available only for equiripple designs.

You must have a DSP System Toolbox license to use this option with the equiripple method.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the MinOrder name-value argument. Input the value as "any", "even", or "odd".

  • In the Specify Algorithm Options section of the task, set Minimum Order to Any or Even.

  • In the Algorithm Options section of the filter parameters panel, set Minimum Order to Any or Even.

Passband offset for a Constrained Least Squares design, specified as a positive scalar in decibels. This parameter specifies the filter gain in the passband. For example:

  • Setting this parameter to 2 results in a filter with a passband gain of 2 dB or 1.259.

  • Setting this parameter to 0 results in a filter with unit gain in the passband.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the PassbandOffset name-value argument. Input the value as a positive scalar.

  • In the Specify Algorithm Options section of the task, specify Passband Offset as a positive scalar.

  • In the Algorithm Options section of the filter parameters panel, specify Passband Offset as a positive scalar.

Passband optimization weight for an Equiripple, Least Squares, or Least Pth-Norm design, specified as a positive scalar.

Weights are a way of specifying the relative importance of the passband ripple and the stopband attenuation in a filter design. By default, the passband and the stopband are equally weighted, each with unit weight. By increasing the passband weight, you can decrease the passband ripple at the expense of decreasing stopband attenuation.

You must have a DSP System Toolbox license to use this option with some syntaxes.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the PassbandWeight name-value argument. Input the value as a positive scalar.

  • In the Specify Algorithm Options section of the task, specify Passband Weight as a positive scalar.

  • In the Algorithm Options section of the filter parameters panel, specify Passband Weight as a positive scalar.

Scale passband when using the Kaiser Window design method or the Window design method, specified as a logical scalar. When you set this parameter to true, the passband is scaled, after windowing, so that the filter has unit gain at zero frequency.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the ScalePassband name-value argument. Input the value as true or false.

  • In the Specify Algorithm Options section of the task, select the Scale Passband box.

  • In the Algorithm Options section of the filter parameters panel, select the Scale Passband box.

Lower stopband optimization weight for an Equiripple, Least Squares, or Least Pth-Norm design, specified as a positive scalar.

Weights are a way of specifying the relative importance of the passband ripple and the stopband attenuation in a filter design. By default, the passband and the stopbands are equally weighted, each with unit weight. By increasing a stopband weight, you can increase the attenuation of a stopband at the expense of increasing the passband ripple.

You must have a DSP System Toolbox license to use this option with some syntaxes.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the StopbandWeight1 name-value argument. Input the value as a positive scalar.

  • In the Specify Algorithm Options section of the task, specify Stopband Weight 1 as a positive scalar.

  • In the Algorithm Options section of the filter parameters panel, specify Stopband Weight 1 as a positive scalar.

Higher stopband optimization weight for an Equiripple, Least Squares, or Least Pth-Norm design, specified as a positive scalar.

Weights are a way of specifying the relative importance of the passband ripple and the stopband attenuation in a filter design. By default, the passband and the stopbands are equally weighted, each with unit weight. By increasing a stopband weight, you can increase the attenuation of a stopband at the expense of increasing the passband ripple.

You must have a DSP System Toolbox license to use this option with some syntaxes.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the StopbandWeight2 name-value argument. Input the value as a positive scalar.

  • In the Specify Algorithm Options section of the task, specify Stopband Weight 2 as a positive scalar.

  • In the Algorithm Options section of the filter parameters panel, specify Stopband Weight 2 as a positive scalar.

Window used by the Window algorithm, specified as one of these options:

  • Hamming (@hamming)

  • Hann (@hann)

  • Kaiser (@kaiser) — Specify the shape factor as a positive real scalar.

  • Rectangular (@rectwin)

  • Chebyshev (@chebwin) — Specify the sidelobe magnitude factor as a positive scalar in decibels.

  • Bartlett (@bartlett)

  • Blackman (@blackman)

  • Flat top (@flattopwin)

  • Gaussian (@gausswin) — To use a Gaussian window with a width factor α ≠ 2.5 in the Filter Designer app or the Design Filter Live Editor task, specify it as a custom window.

  • Nuttall (@nuttallwin)

  • Triangular (@triang)

  • Custom — Specify a custom window as a vector of length N + 1, where N is the Filter Order. You can also specify the custom window as a function name or a function handle with N + 1 as first input. Additional inputs can be passed by specifying a cell array.

Example: hann(N+1) and (1-cos(2*pi*(0:N)'/N))/2 both specify a Hann window to use with a filter of order N.

Example: "hamming" specifies a Hamming window of the required order.

Example: @hann specifies a Hann window of the required order.

Example: {@kaiser,0.5} specifies a Kaiser window of the required order with shape parameter 0.5.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the Window name-value argument. Input the value as a numeric vector, a window name, a function handle, or a cell array if you need to specify additional window parameter values.

  • In the Specify Algorithm Options section of the task, specify a value from the Window drop-down list and enter additional window parameter values if needed.

  • In the Algorithm Options section of the filter parameters panel, specify a value from the Window drop-down list and enter additional window parameter values if needed.

Zero phase for a Constrained Least Squares design, specified as logical scalar. When you set this parameter to true, the zero-phase response of the filter is always positive, enabling you to perform spectral factorization on the result and obtain a minimum-phase filter from it.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the ZeroPhase name-value argument. Input the value as true or false.

  • In the Specify Algorithm Options section of the task, select the Zero Phase box.

  • In the Algorithm Options section of the filter parameters panel, select the Zero Phase box.

Advanced Options

Density of the frequency grid used by the Least Pth-Norm algorithm, specified as a positive scalar ≥ 10. The frequency grid has roughly (Density Factor × Filter Order)/(2 × Passband Frequency) frequency points. Increasing the density factor results in filters that more closely approximate an equiripple filter but take longer to compute.

You must have a DSP System Toolbox license to use this option. This parameter is available only in the designfilt function.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the DensityFactor name-value argument. Input the value as a positive scalar greater than 10.

N/A

N/A

Initial Pth norm used by the Least Pth-Norm algorithm, specified as a positive scalar. Starting the optimization with a smaller initial value aids in the convergence of the algorithm. For more information, see Least Pth-Norm Optimal IIR Filter Design.

You must have a DSP System Toolbox license to use this option. This parameter is available only in the designfilt function.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the InitialNorm name-value argument. Input the value as a positive scalar.

N/A

N/A

Initial estimate of the filter numerator coefficients for the Least Pth-Norm algorithm, specified as a vector of size (N+1)-by-1, where N is the Filter Order that you specify.

You must have a DSP System Toolbox license to use this option. This parameter is available only in the designfilt function.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the InitialNumerator name-value argument. Input the value as a vector of size (N+1)-by-1, where N is the filter order.

N/A

N/A

L-infinity norm used by the Least Pth-Norm algorithm, specified as a positive scalar.

You must have a DSP System Toolbox license to use this option.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the Norm name-value argument. Input the value as a positive scalar.

  • In the Specify Algorithm Options section of the task, specify Norm as a positive scalar.

  • In the Algorithm Options section of the filter parameters panel, specify Norm as a positive scalar.

Phase constraint for an Equiripple or Least Pth-Norm design, specified as one of these options:

  • Linear — Design a linear-phase equiripple FIR filter.

  • Minimum — Design a minimum-phase equiripple FIR filter.

  • Maximum — Design a maximum-phase equiripple FIR filter.

You must have a DSP System Toolbox license to use this option.

designfilt FunctionDesign Filter Live Editor TaskFilter Designer App
  • Use the PhaseConstraint name-value argument. Input the value as "linear", "minimum", or "maximum".

  • In the Specify Algorithm Options section of the task, set Phase Constraint to Linear, Minimum, or Maximum.

  • In the Algorithm Options section of the filter parameters panel, set Phase Constraint to Linear, Minimum, or Maximum.

More About

expand all