Products & Services Solutions Academia Support User Community Company

Learn more about Signal Processing Toolbox   

filterbuilder - GUI-based filter design

Syntax

filterbuilder(h)
filterbuilder('response')

Description

filterbuilder starts a GUI-based tool for building filters. It relies on the fdesign object-object oriented filter design paradigm, and is intended to reduce development time during the filter design process. filterbuilder uses a specification-centered approach to find the best algorithm for the desired response.

The filterbuilder GUI contains many features not available in FDATool. For more information on how to use filterbuilder, see Designing a Filter in the Filterbuilder GUI.

To use filterbuilder, enter filterbuilder at the MATLAB command line using one of three approaches:

Response StringDescription of Resulting Filter Design
arbmagArbitrary response filter (magnitude and phase)
arbmagnphaseArbitrary response filter (magnitude and phase)
bandpass or bpBandpass filter
bandstop or bsBandstop filter
cicCIC filter
ciccompCIC compensator
combComb filter
diffDifferentiator filter
fracdelayFractional delay filter
halfband or hbHalfband filter
highpass or hpHighpass filter
hilbHilbert filter
isinclpInverse sinc lowpass filter
lowpass or lpLowpass filter (default)
notchNotch filter
nyquistNyquist filter
octaveOctave filter
parameqParametric equalizer filter
peakPeak filter
pulseshapingPulse-shaping filter

Filterbuilder Dialog Box

Although the main pane of the filterbuilder dialog box varies depending on the filter response type, the basic structure is the same. The following figure shows the basic layout of the dialog box.

As you choose the response for the filter, the available options and design parameters displayed in the dialog box change. This display allows you to focus only on parameters that make sense in the context of your filter design.

Every filter design dialog box includes the options displayed at the top of the dialog box, shown in the following figure.

There are three tabs in the Filterbuilder dialog box, containing three panes: Main, Data Types, and Code Generation. The first pane changes according to the filter being designed. The last two panes are the same for all filters. These panes are discussed in the following sections.

Data Types Pane

The second tab in the Filterbuilder dialog box is shown in the following figure.

The Arithmetic drop down box allows the choice of Double precision, Single precision, or Fixed point. Some of these options may be unavailable depending on the filter parameters. The following table describes these options.

Arithmetic List EntryEffect on the Filter
Double precisionAll filtering operations and coefficients use double-precision, floating-point representations and math. When you use filterbuilder to create a filter, double precision is the default value for the Arithmetic property.
Single-precisionAll filtering operations and coefficients use single-precision floating-point representations and math.
Fixed pointThis string applies selected default values, typically used on many digital processors, for the properties in the fixed-point filter. These properties include coefficient word lengths, fraction lengths, and various operating modes. This setting allows signed fixed data types only. Fixed-point filter design with filterbuilder is available only when you install Fixed-Point Toolbox software along with Filter Design Toolbox software.

The following figure shows the Data Types pane after you select Fixed point for Arithmetic.

Not all parameters described in the following section apply to all filters. For example, FIR filters do not have the Section input and Section output parameters.

Input signal

Specify the format the filter applies to data to be filtered. For all cases, filterbuilder implements filters that use binary point scaling and signed input. You set the word length and fraction length as needed.

Coefficients

Choose how you specify the word length and the fraction length of the filter numerator and denominator coefficients:

  • Specify word length enables you to enter the word length of the coefficients in bits. In this mode, filterbuilder automatically sets the fraction length of the coefficients to the binary-point only scaling that provides the best possible precision for the value and word length of the coefficients.

  • Binary point scaling enables you to enter the word length and the fraction length of the coefficients in bits. If applicable, enter separate fraction lengths for the numerator and denominator coefficients.

  • The filter coefficients do not obey the Rounding mode and Overflow mode parameters that are available when you select Specify precision from the Filter internals list. Coefficients are always saturated and rounded to Nearest.

Section Input

Choose how you specify the word length and the fraction length of the fixed-point data type going into each section of an SOS filter. This parameter is visible only when the selected filter structure is IIR and SOS.

  • Binary point scaling enables you to enter the word and fraction lengths of the section input in bits.

  • Specify word length enables you to enter the word lengths in bits.

Section Output

Choose how you specify the word length and the fraction length of the fixed-point data type coming out of each section of an SOS filter. This parameter is visible only when the selected filter structure is IIR and SOS.

  • Binary point scaling enables you to enter the word and fraction lengths of the section output in bits.

  • Specify word length enables you to enter the output word lengths in bits.

State

Contains the filter states before, during, and after filter operations. States act as filter memory between filtering runs or sessions. Use this parameter to specify how to designate the state word and fraction lengths. This parameter is not visible for direct form and direct form I filter structures because filterbuilder deduces the state directly from the input format. States always use signed representation:

  • Binary point scaling enables you to enter the word length and the fraction length of the accumulator in bits.

  • Specify precision enables you to enter the word length and fraction length in bits (if available).

Product

Determines how the filter handles the output of product operations. Choose from the following options:

  • Full precision — Maintain full precision in the result.

  • Keep LSB — Keep the least significant bit in the result when you need to shorten the data words.

  • Specify Precision — Enables you to set the precision (the fraction length) used by the output from the multiplies.

Filter internals

Specify how the fixed-point filter performs arithmetic operations within the filter. The affected filter portions are filter products, sums, states, and output. Select one of these options:

  • Full precision — Specifies that the filter maintains full precision in all calculations for products, output, and in the accumulator.

  • Specify precision — Set the word and fraction lengths applied to the results of product operations, the filter output, and the accumulator. Selecting this option enables the word and fraction length controls.

Signed

Selecting this option directs the filter to use signed representations for the filter coefficients.

Word length

Sets the word length for the associated filter parameter in bits.

Fraction length

Sets the fraction length for the associate filter parameter in bits.

Accum

Use this parameter to specify how you would like to designate the accumulator word and fraction lengths.

Determines how the accumulator outputs stored values. Choose from the following options:

  • Full precision — Maintain full precision in the accumulator.

  • Keep MSB — Keep the most significant bit in the accumulator.

  • Keep LSB — Keep the least significant bit in the accumulator when you need to shorten the data words.

  • Specify Precision — Enables you to set the precision (the fraction length) used by the accumulator.

Output

Sets the mode the filter uses to scale the output data after filtering. You have the following choices:

  • Avoid Overflow — Set the output data fraction length to avoid causing the data to overflow. Avoid overflow is considered the conservative setting because it is independent of the input data values and range.

  • Best Precision — Set the output data fraction length to maximize the precision in the output data.

  • Specify Precision — Set the fraction length used by the filtered data.

Fixed-point operational parameters

Parameters in this group control how the filter rounds fixed-point values and how it treats values that overflow.

Rounding mode

Sets the mode the filter uses to quantize numeric values when the values lie between representable values for the data format (word and fraction lengths).

  • ceil - Round toward positive infinity.

  • convergent - Round to the closest representable integer. Ties round to the nearest even stored integer. This is the least biased of the methods available in this software.

  • zero/fix - Round toward zero.

  • floor - Round toward negative infinity.

  • nearest - Round toward nearest. Ties round toward positive infinity.

  • round - Round toward nearest. Ties round toward negative infinity for negative numbers, and toward positive infinity for positive numbers.

The choice you make affects everything except coefficient values and input data which always round. In most cases, products do not overflow—they maintain full precision.

Overflow mode

Sets the mode the filter uses to respond to overflow conditions in fixed-point arithmetic. Choose from the following options:

  • Saturate — Limit the output to the largest positive or negative representable value.

  • Wrap — Set overflowing values to the nearest representable value using modular arithmetic.

The choice you make affects everything except coefficient values and input data which always round. In most cases, products do not overflow—they maintain full precision.

Cast before sum

Specifies whether to cast numeric data to the appropriate accumulator format before performing sum operations. Selecting Cast before sum ensures that the results of the affected sum operations match most closely the results found on most digital signal processors. Performing the cast operation before the summation adds one or two additional quantization operations that can add error sources to your filter results.

If you clear Cast before sum, the filter prevents the addends from being cast to the sum format before the addition operation. Choose this setting to get the most accurate results from summations without considering the hardware your filter might use. The input format referenced by Cast before sum depends on the filter structure you are using.

The effect of clearing or selecting Cast before sum is as follows:

  • Cleared — Configures filter summation operations to retain the addends in the format carried from the previous operation.

  • Selected — Configures filter summation operations to convert the input format of the addends to match the summation output format before performing the summation operation. Usually, selecting Cast before sum generates results from the summation that more closely match those found from digital signal processors.

Code Generation Pane

The code generation pane contains options for various implementations of the completed filter design. You can generate VHDL and Verilog code from the designed filter. You can generated M-Code. You can also choose to create or update a Simulink model from the designed filter. The following section explains these options.

HDL

For more information on this option, see Opening the Generate HDL Dialog Box from the filterbuilder GUI documentation, where all the parameters on the sub dialog box are explained in detail.

M-Code

Clicking on the Generate M-Code button, brings up a Save File dialog. Specify the file name and location, and save. The filter is now contained in an editable M-file.

Simulink Model

Clicking on the Generate Model button brings up the Export to Simulink dialog box, as shown in the following figure.

You can set the following parameters in this dialog box:

  • Block Name — The name for the new subsystem block, set to Filter by default.

  • DestinationCurrent saves the generated model to the current Simulink model; New creates a new model to contain the generated block; User Defined creates a new model or subsystem to the user-specified location enumerated in the User Defined text box.

  • Overwrite generated 'Filter' block — When this check box is selected, Filter Design Toolbox software overwrites an existing block with the name specified in Block Name; when cleared, creates a new block with the same name.

  • Build model using basic elements — When this check box is selected, Filter Design Toolbox software builds the model using only basic blocks.

  • Optimize for zero gains — When this check box is selected, Filter Design Toolbox software removes all zero gain blocks from the model.

  • Optimize for unity gains — When this check box is selected, Filter Design Toolbox software replaces all unity gains with direct connections.

  • Optimize for negative gains — When this check box is selected, Filter Design Toolbox software removes all negative unity gain blocks, and changes sign at the nearest summation block.

  • Optimize delay chains — When this check box is selected, Filter Design Toolbox software replaces cascaded delay blocks with a single integer delay block with an equivalent total delay.

  • Realize Model — Filter Design Toolbox software builds the model with the set parameters.

Main Pane

Most of this pane contains parameters specific to the filter type. These are described in detail in the following sections:

Arbitrary Response Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your filter format, such as the impulse response and the filter order.

Impulse response

Select either FIR or IIR from the drop down list, where FIR is the default impulse response. When you choose an impulse response, the design methods and structures you can use to implement your filter change accordingly.

Order

Enter the order for FIR filter, or the order of the numerator for the IIR filter.

Denominator order

Select the check box and enter the denominator order. This option is enabled only if IIR is selected for Impulse response.

Filter type

This option is available for FIR filters only. Select Single-rate, Decimator, Interpolator, or Sample-rate converter. Your choice determines the type of filter as well as the design methods and structures that are available to implement your filter. By default, filterbuilder specifies single-rate filters.

  • Selecting Decimator or Interpolator activates the Decimation Factor or the Interpolation Factor options respectively.

  • Selecting Sample-rate converter activates both factors.

When you design either a decimator or interpolator, the resulting filter is a bandpass filter that either decimates or interpolates your input signal.

Decimation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Decimator or Sample-rate converter. The default factor value is 2.

Interpolation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Interpolator or Sample-rate converter. The default factor value is 2.

Response Specification

Number of Bands

Select the number of bands in the filter. Multiband design is available for both FIR and IIR filters.

Specify response as:

Specify the response as Amplitudes, Magnitudes and phase, or Frequency response.

Frequency units

Specify frequency units as either Normalized, which means normalized by the input sampling frequency, or select from Hz, kHz, MHz, or GHz.

Input Fs

Enter the input sampling frequency in the units specified in the Frequency units drop-down box. This option is enabled when the frequency units are selected.

Band Properties

These properties are modified automatically depending on the response chosen in the Specify response as drop-down box. Two or three columns are presented for input. The first column is always Frequencies. The other columns are either Amplitudes, Magnitudes, Phases, or Frequency Response. Enter the corresponding vectors of values for each column.

Algorithm

Design Method

Select the design method for the filter. Different methods are enabled depending on the defining parameters entered in the previous sections.

Structure

Select the structure for the filter, available for the design method selected in the previous box.

Design Options
  • Window — replace the square brackets with the name of a window function or function handle. For example, "hamming" or "@hamming". If the window function takes parameters other than the length, use a cell array. For example, {‘kaiser',3.5} or {@chebwin,60}

Bandpass Filter Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your filter format, such as the impulse response and the filter order.

Impulse response

Select either FIR or IIR from the drop-down list, where FIR is the default impulse response. When you choose an impulse response, the design methods and structures you can use to implement your filter change accordingly.

    Note   The design methods and structures for FIR filters are not the same as the methods and structures for IIR filters.

Filter order mode

Select either Minimum (the default) or Specify from the drop-down box. Selecting Specify enables the Order option (explained in the following descriptions) so you can enter the filter order.

Filter type

Select Single-rate, Decimator, Interpolator, or Sample-rate converter. Your choice determines the type of filter as well as the design methods and structures that are available to implement your filter. By default, filterbuilder specifies single-rate filters.

  • Selecting Decimator or Interpolator activates the Decimation Factor or the Interpolation Factor options respectively.

  • Selecting Sample-rate converter activates both factors.

When you design either a decimator or an interpolator, the resulting filter is a bandpass filter that either decimates or interpolates your input signal.

Order

Enter the filter order. This option is enabled only if Specify was selected for Filter order mode.

Decimation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Decimator or Sample-rate converter. The default factor value is 2.

Interpolation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Interpolator or Sample-rate converter. The default factor value is 2.

Frequency Specifications

The parameters in this group allow you to specify your filter response curve. Graphically, the filter specifications look similar to those shown in the following figure.

In the figure, regions between specification values such as Fstop1 and Fpass1 represent transition regions where the filter response is not explicitly defined.

Frequency constraints

Select the filter features to use to define the frequency response characteristics. The list contains the following options, when available for the filter specifications.

  • Passband and stopband edges — Define the filter by specifying the frequencies for the edges for the stop- and passbands.

  • Passband edges — Define the filter by specifying frequencies for the edges of the passband.

  • Stopband edges — Define the filter by specifying frequencies for the edges of the stopbands.

  • 3 dB points — Define the filter response by specifying the locations of the 3 dB points. The 3 dB point is the frequency for the point 3 dB point below the passband value.

  • 3 dB points and passband width — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the passband.

  • 3 dB points and stopband widths — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the stopband.

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Fstop1

Enter the frequency at the edge of the end of the first stopband. Specify the value in either normalized frequency units or the absolute units you select in Frequency units.

Fpass1

Enter the frequency at the edge of the start of the passband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Fpass2

Enter the frequency at the edge of the end of the passband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Fstop2

Enter the frequency at the edge of the start of the second stopband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Magnitude Specifications

The parameters in this group let you specify the filter response in the passbands and stopbands.

Magnitude units

Specify the units for any parameter you provide in magnitude specifications. Select one of the following options from the drop-down list.

  • Linear — Specify the magnitude in linear units.

  • dB — Specify the magnitude in dB (decibels). This is the default setting.

  • Squared — Specify the magnitude in squared units.

Astop1

Enter the filter attenuation in the first stopband in the units you choose for Magnitude units, either linear or decibels.

Apass

Enter the filter ripple allowed in the passband in the units you choose for Magnitude units, either linear or decibels.

Astop2

Enter the filter attenuation in the second stopband in the units you choose for Magnitude units, either linear or decibels.

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

Lists the design methods available for the frequency and magnitude specifications you entered. When you change the specifications for a filter, such as changing the impulse response, the methods available to design filters changes as well. The default IIR design method is usually Butterworth, and the default FIR method is equiripple.

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter. By default, FIR filters use direct-form structure, and IIR filters use direct-form II filters with SOS.

Scale SOS filter coefficients to reduce chance of overflow

Selecting this parameter directs the design to scale the filter coefficients to reduce the chances that the inputs or calculations in the filter overflow and exceed the representable range of the filter. Clearing this option removes the scaling. This parameter applies only to IIR filters.

Design Options

The options for each design are specific for each design method. This section does not present all of the available options for all designs and design methods. There are many more that you encounter as you select different design methods and filter specifications. The following options represent some of the most common ones available.

Density factor

Density factor controls the density of the frequency grid over which the design method optimization evaluates your filter response function. The number of equally spaced points in the grid is the value you enter for Density factor times (filter order + 1).

Increasing the value creates a filter that more closely approximates an ideal equiripple filter but increases the time required to design the filter. The default value of 20 represents a reasonable trade between the accurate approximation to the ideal filter and the time to design the filter.

Minimum phase

To design a filter that is minimum phase, select Minimum phase. Clearing the Minimum phase option removes the phase constraint—the resulting design is not minimum phase.

Minimum order

When you select this parameter, the design method determines and design the minimum order filter to meet your specifications. Some filters do not provide this parameter. Select Any, Even, or Odd from the drop-down list to direct the design to be any minimum order, or minimum even order, or minimum odd order.

    Note   Generally, Minimum order designs are not available for IIR filters.

Match Exactly

Specifies that the resulting filter design matches either the passband or stopband or both bands when you select passband or stopband or both from the drop-down list.

Stopband Shape

Stopband shape lets you specify how the stopband changes with increasing frequency. Choose one of the following options:

  • Flat — Specifies that the stopband is flat. The attenuation does not change as the frequency increases.

  • Linear — Specifies that the stopband attenuation changes linearly as the frequency increases. Change the slope of the stopband by setting Stopband decay.

  • 1/f — Specifies that the stopband attenuation changes exponentially as the frequency increases, where f is the frequency. Set the power (exponent) for the decay in Stopband decay.

Stopband Decay

When you set Stopband shape, Stopband decay specifies the amount of decay applied to the stopband. the following conditions apply to Stopband decay based on the value of Stopband Shape:

  • When you set Stopband shape to Flat, Stopband decay has no affect on the stopband.

  • When you set Stopband shape to Linear, enter the slope of the stopband in units of dB/rad/s. filterbuilder applies that slope to the stopband.

  • When you set Stopband shape to 1/f, enter a value for the exponent n in the relation (1/f)n to define the stopband decay. filterbuilder applies the (1/f)n relation to the stopband to result in an exponentially decreasing stopband attenuation.

Bandstop Filter Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your filter format, such as the impulse response and the filter order.

Impulse response

Select either FIR or IIR from the drop-down list, where FIR is the default impulse response. When you choose an impulse response, the design methods and structures you can use to implement your filter change accordingly.

    Note   The design methods and structures for FIR filters are not the same as the methods and structures for IIR filters.

Filter order mode

Select either Minimum (the default) or Specify from the drop-down list. Selecting Specify enables the Order option (see the following sections) so you can enter the filter order.

Filter type

Select Single-rate, Decimator, Interpolator, or Sample-rate converter. Your choice determines the type of filter as well as the design methods and structures that are available to implement your filter. By default, filterbuilder specifies single-rate filters.

  • Selecting Decimator or Interpolator activates the Decimation Factor or the Interpolation Factor options respectively.

  • Selecting Sample-rate converter activates both factors.

When you design either a decimator or an interpolator, the resulting filter is a bandpass filter that either decimates or interpolates your input signal.

Order

Enter the filter order. This option is enabled only if Specify was selected for Filter order mode.

Decimation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Decimator or Sample-rate converter. The default factor value is 2.

Interpolation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Interpolator or Sample-rate converter. The default factor value is 2.

Frequency Specifications

The parameters in this group allow you to specify your filter response curve. Graphically, the filter specifications look similar to those shown in the following figure.

Frequency constraints

Select the filter features to use to define the frequency response characteristics. The list contains the following options, when available for the filter specifications.

  • Passband and stopband edges — Define the filter by specifying the frequencies for the edges for the stop- and passbands.

  • Passband edges — Define the filter by specifying frequencies for the edges of the passband.

  • Stopband edges — Define the filter by specifying frequencies for the edges of the stopbands.

  • 3 dB points — Define the filter response by specifying the locations of the 3 dB points. The 3 dB point is the frequency for the point 3 dB point below the passband value.

  • 3 dB points and passband width — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the passband.

  • 3 dB points and stopband widths — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the stopband.

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Output Fs

When you design an interpolator, Fs represents the sampling frequency at the filter output rather than the filter input. This option is available only when you set Filter type is interpolator.

Fpass1

Enter the frequency at the edge of the end of the first passband. Specify the value in either normalized frequency units or the absolute units you select in Frequency units.

Fstop1

Enter the frequency at the edge of the start of the stopband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Fstop2

Enter the frequency at the edge of the end of the stopband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Fpass2

Enter the frequency at the edge of the start of the second passband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Magnitude Specifications

The parameters in this group let you specify the filter response in the passbands and stopbands.

Magnitude units

Specify the units for any parameter you provide in magnitude specifications. Select one of the following options from the drop-down list.

  • Linear — Specify the magnitude in linear units.

  • dB — Specify the magnitude in decibels (default).

  • Squared — Specify the magnitude in squared units.

Apass1

Enter the filter ripple allowed in the first passband in the units you choose for Magnitude units, either linear or decibels.

Astop

Enter the filter attenuation in the stopband in the units you choose for Magnitude units, either linear or decibels

Apass2

Enter the filter ripple allowed in the second passband in the units you choose for Magnitude units, either linear or decibels

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

Lists the design methods available for the frequency and magnitude specifications you entered. When you change the specifications for a filter, such as changing the impulse response, the methods available to design filters changes as well. The default IIR design method is usually Butterworth, and the default FIR method is equiripple.

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter. By default, FIR filters use direct-form structure, and IIR filters use direct-form II filters with SOS.

Scale SOS filter coefficients to reduce chance of overflow

Selecting this parameter directs the design to scale the filter coefficients to reduce the chances that the inputs or calculations in the filter overflow and exceed the representable range of the filter. Clearing this option removes the scaling. This parameter applies only to IIR filters.

Design Options

The options for each design are specific for each design method. This section does not present all of the available options for all designs and design methods. There are many more that you encounter as you select different design methods and filter specifications. The following options represent some of the most common ones available.

Density factor

Density factor controls the density of the frequency grid over which the design method optimization evaluates your filter response function. The number of equally spaced points in the grid is the value you enter for Density factor times (filter order + 1).

Increasing the value creates a filter that more closely approximates an ideal equiripple filter but increases the time required to design the filter. The default value of 20 represents a reasonable trade between the accurate approximation to the ideal filter and the time to design the filter.

Minimum phase

To design a filter that is minimum phase, select Minimum phase. Clearing the Minimum phase option removes the phase constraint—the resulting design is not minimum phase.

Minimum order

When you select this parameter, the design method determines and design the minimum order filter to meet your specifications. Some filters do not provide this parameter. Select Any, Even, or Odd from the drop-down list to direct the design to be any minimum order, or minimum even order, or minimum odd order.

    Note   Generally, Minimum order designs are not available for IIR filters.

Match Exactly

Specifies that the resulting filter design matches either the passband or stopband or both bands when you select passband or stopband or both from the drop-down list.

Stopband Shape

Stopband shape lets you specify how the stopband changes with increasing frequency. Choose one of the following options:

  • Flat — Specifies that the stopband is flat. The attenuation does not change as the frequency increases.

  • Linear — Specifies that the stopband attenuation changes linearly as the frequency increases. Change the slope of the stopband by setting Stopband decay.

  • 1/f — Specifies that the stopband attenuation changes exponentially as the frequency increases, where f is the frequency. Set the power (exponent) for the decay in Stopband decay.

Stopband Decay

When you set Stopband shape, Stopband decay specifies the amount of decay applied to the stopband. the following conditions apply to Stopband decay based on the value of Stopband Shape:

  • When you set Stopband shape to Flat, Stopband decay has no affect on the stopband.

  • When you set Stopband shape to Linear, enter the slope of the stopband in units of dB/rad/s. filterbuilder applies that slope to the stopband.

  • When you set Stopband shape to 1/f, enter a value for the exponent n in the relation (1/f)n to define the stopband decay. filterbuilder applies the (1/f)n relation to the stopband to result in an exponentially decreasing stopband attenuation.

CIC Filter Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your CIC filter format, such as the filter type and the differential delay.

Filter type

Select whether your filter will be a decimator or an interpolator. Your choice determines the type of filter and the design methods and structures that are available to implement your filter. Selecting decimator or interpolator activates the Factor option. When you design an interpolator, you enable the Output Fs parameter.

When you design either a decimator or interpolator, the resulting filter is a CIC filter that decimates or interpolates your input signal.

Differential Delay

Specify the differential delay of your CIC filter. The default value is 1. Most CIC filters use 1 or 2. Differential delay changes both the shape and number of nulls in the filter response. The delay value also affects the null locations. Increasing the delay increases the number and sharpness of the nulls and response between nulls. Generally, 1 or 2 work best as values for the delay.

Factor

When you select decimator or interpolator for Filter type, enter the decimation or interpolation factor for your filter in this field. You must enter a positive integer for the factor. The default factor value is 2.

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Output Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter output. When you provide an output sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available only when you design interpolators.

Fpass

Enter the frequency at the end of the passband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Magnitude units

Specify the units for any parameter you provide in magnitude specifications. Select one of the following options from the drop-down list.

  • Linear — Specify the magnitude in linear units.

  • dB — Specify the magnitude in decibels (default).

  • Squared — Specify the magnitude in squared units.

Astop

Enter the filter attenuation in the stopband in the units you choose for Magnitude units, either linear or decibels.

CIC Compensator Filter Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your filter format, such as the filter order mode and the filter type.

Filter order mode

Select either Minimum (the default) or Specify from the drop-down list. Selecting Specify enables the Order option (see the following sections) so you can enter the filter order.

Filter type

Select Single-rate, Decimator, Interpolator, or Sample-rate converter. Your choice determines the type of filter as well as the design methods and structures that are available to implement your filter. By default, filterbuilder specifies single-rate filters.

  • Selecting Decimator or Interpolator activates the Decimation Factor or the Interpolation Factor options respectively.

  • Selecting Sample-rate converter activates both factors.

When you design either a decimator or an interpolator, the resulting filter is a bandpass filter that either decimates or interpolates your input signal.

Order

Enter the filter order. This option is enabled only if Specify was selected for Filter order mode.

Decimation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Decimator or Sample-rate converter. The default factor value is 2.

Interpolation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Interpolator or Sample-rate converter. The default factor value is 2.

Number of CIC sections

Specify the number of sections in the CIC filter for which you are designing this compensator. Select the number of sections from the drop-down list or enter the number.

Differential Delay

Specify the differential delay of your target CIC filter. The default value is 1. Most CIC filters use 1 or 2.

Frequency Specifications

The parameters in this group allow you to specify your filter response curve.

Frequency Specifications

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Output Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter output. When you provide an output sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available only when you design interpolators.

Fpass

Enter the frequency at the end of the passband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Fstop

Enter the frequency at the start of the stopband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Magnitude Specifications

The parameters in this group let you specify the filter response in the passbands and stopbands.

Magnitude units

Specify the units for any parameter you provide in magnitude specifications. Select one of the following options from the drop-down list.

  • Linear — Specify the magnitude in linear units.

  • dB — Specify the magnitude in decibels (default).

  • Squared — Specify the magnitude in squared units.

Apass

Enter the filter ripple allowed in the passband in the units you choose for Magnitude units, either linear or decibels

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

Lists the design methods available for the frequency and magnitude specifications you entered. When you change the specifications for a filter, such as changing the impulse response, the methods available to design filters changes as well. The default IIR design method is usually Butterworth, and the default FIR method is equiripple.

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter. By default, FIR filters use direct-form structure, and IIR filters use direct-form II filters with SOS.

Design Options

The options for each design are specific for each design method. This section does not present all of the available options for all designs and design methods. There are many more that you encounter as you select different design methods and filter specifications. The following options represent some of the most common ones available.

Density factor

Density factor controls the density of the frequency grid over which the design method optimization evaluates your filter response function. The number of equally spaced points in the grid is the value you enter for Density factor times (filter order + 1).

Increasing the value creates a filter that more closely approximates an ideal equiripple filter but increases the time required to design the filter. The default value of 20 represents a reasonable trade between the accurate approximation to the ideal filter and the time to design the filter.

Minimum phase

To design a filter that is minimum phase, select Minimum phase. Clearing the Minimum phase option removes the phase constraint—the resulting design is not minimum phase.

Minimum order

When you select this parameter, the design method determines and design the minimum order filter to meet your specifications. Some filters do not provide this parameter. Select Any, Even, or Odd from the drop-down list to direct the design to be any minimum order, or minimum even order, or minimum odd order.

    Note   Generally, Minimum order designs are not available for IIR filters.

Match Exactly

Specifies that the resulting filter design matches either the passband or stopband or both bands when you select passband or stopband or both from the drop-down list.

Stopband Shape

Stopband shape lets you specify how the stopband changes with increasing frequency. Choose one of the following options:

  • Flat — Specifies that the stopband is flat. The attenuation does not change as the frequency increases.

  • Linear — Specifies that the stopband attenuation changes linearly as the frequency increases. Change the slope of the stopband by setting Stopband decay.

  • 1/f — Specifies that the stopband attenuation changes exponentially as the frequency increases, where f is the frequency. Set the power (exponent) for the decay in Stopband decay.

Stopband Decay

When you set Stopband shape, Stopband decay specifies the amount of decay applied to the stopband. the following conditions apply to Stopband decay based on the value of Stopband Shape:

  • When you set Stopband shape to Flat, Stopband decay has no affect on the stopband.

  • When you set Stopband shape to Linear, enter the slope of the stopband in units of dB/rad/s. filterbuilder applies that slope to the stopband.

  • When you set Stopband shape to 1/f, enter a value for the exponent n in the relation (1/f)n to define the stopband decay. filterbuilder applies the (1/f)n relation to the stopband to result in an exponentially decreasing stopband attenuation.

Comb Filter Design Dialog Box—Main Pane

Filter Specifications

Parameters in this group enable you to specify the type of comb filter and the number of peaks or notches.

Comb Type

Select either Notch or Peak from the drop-down list. Notch creates a comb filter that attenuates a set of harmonically related frequencies. Peak creates a comb filter that amplifies a set of harmonically related frequencies.

Order mode

Select either Order or Number of Peaks/Notches from the drop-down menu.

Select Order to enter the desired filter order in the dialog box. The comb filter has notches or peaks at increments of 2/Order in normalized frequency units.

Select Number of Peaks or Number of Notches to specify the number of peaks or notches and the Shelving filter order

.

Shelving filter order

The Shelving filter order is a positive integer that determines the sharpness of the peaks or notches. Larger values result in sharper peaks or notches.

Frequency specifications

Parameters in this group enable you to specify the frequency constraints and frequency units.

Frequency specifications

Select either Quality factor or Bandwidth.

Quality factor is the ratio of the center frequency of the peak or notch to the bandwidth calculated at the –3 dB point.

Bandwidth specifies the bandwidth of the peak or notch. By default the bandwidth is measured at the –3 dB point. For example, setting the bandwidth equal to 0.1 results in 3 dB frequencies at normalized frequencies 0.05 above and below the center frequency of the peak or notch.

Frequency Units

Specify the frequency units. The default is normalized frequency. Choosing an option in Hz enables the Input Fs dialog box.

Magnitude specifications

Specify the units for the magnitude specification and the gain at which the bandwidth is measured. This menu is disabled if you specify a filter order. Select one of the following magnitude units from the drop down list:

Bandwidth gain — Specify the gain at which the bandwidth is measured. The default is –3 dB.

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

The IIR Butterworth design is the only option for peaking or notching comb filters.

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter.

Design Options

Differentiator Filter Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your filter format, such as the impulse response and the filter order. Graphically, the filter specifications look similar to those shown in the following figure.

In the figure, regions between specification values such as Fpass (f1) and Fstop (f3) represent transition regions where the filter response is not explicitly defined.

Filter order mode

Select either Minimum (the default) or Specify from the drop-down list. Selecting Specify enables the Order option (see the following sections) so you can enter the filter order.

Filter type

Select Single-rate, Decimator, Interpolator, or Sample-rate converter. Your choice determines the type of filter as well as the design methods and structures that are available to implement your filter. By default, filterbuilder specifies single-rate filters.

  • Selecting Decimator or Interpolator activates the Decimation Factor or the Interpolation Factor options respectively.

  • Selecting Sample-rate converter activates both factors.

When you design either a decimator or an interpolator, the resulting filter is a bandpass filter that either decimates or interpolates your input signal.

Order

Enter the filter order. This option is enabled only if Specify was selected for Filter order mode.

Decimation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Decimator or Sample-rate converter. The default factor value is 2.

Interpolation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Interpolator or Sample-rate converter. The default factor value is 2.

Frequency Specifications

The parameters in this group allow you to specify your filter response curve.

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Fpass

Enter the frequency at the end of the passband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Fstop

Enter the frequency at the start of the stopband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Magnitude Specifications

The parameters in this group let you specify the filter response in the passbands and stopbands.

Magnitude units

Specify the units for any parameter you provide in magnitude specifications. Select one of the following options from the drop-down list.

  • Linear — Specify the magnitude in linear units.

  • dB — Specify the magnitude in decibels (default).

  • Squared — Specify the magnitude in squared units.

Apass

Enter the filter ripple allowed in the passband in the units you choose for Magnitude units, either linear or decibels.

Astop2

Enter the filter attenuation in the second stopband in the units you choose for Magnitude units, either linear or decibels.

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

Lists the design methods available for the frequency and magnitude specifications you entered. When you change the specifications for a filter, such as changing the impulse response, the methods available to design filters changes as well. The default IIR design method is usually Butterworth, and the default FIR method is equiripple.

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter. By default, FIR filters use direct-form structure, and IIR filters use direct-form II filters with SOS.

Scale SOS filter coefficients to reduce chance of overflow

Selecting this parameter directs the design to scale the filter coefficients to reduce the chances that the inputs or calculations in the filter overflow and exceed the representable range of the filter. Clearing this option removes the scaling. This parameter applies only to IIR filters.

Design Options

The options for each design are specific for each design method. This section does not present all of the available options for all designs and design methods. There are many more that you encounter as you select different design methods and filter specifications. The following options represent some of the most common ones available.

Density factor

Density factor controls the density of the frequency grid over which the design method optimization evaluates your filter response function. The number of equally spaced points in the grid is the value you enter for Density factor times (filter order + 1).

Increasing the value creates a filter that more closely approximates an ideal equiripple filter but increases the time required to design the filter. The default value of 20 represents a reasonable trade between the accurate approximation to the ideal filter and the time to design the filter.

Minimum phase

To design a filter that is minimum phase, select Minimum phase. Clearing the Minimum phase option removes the phase constraint—the resulting design is not minimum phase.

Minimum order

When you select this parameter, the design method determines and design the minimum order filter to meet your specifications. Some filters do not provide this parameter. Select Any, Even, or Odd from the drop-down list to direct the design to be any minimum order, or minimum even order, or minimum odd order.

    Note   Generally, Minimum order designs are not available for IIR filters.

Match Exactly

Specifies that the resulting filter design matches either the passband or stopband or both bands when you select passband or stopband or both from the drop-down list.

Stopband Shape

Stopband shape lets you specify how the stopband changes with increasing frequency. Choose one of the following options:

  • Flat — Specifies that the stopband is flat. The attenuation does not change as the frequency increases.

  • Linear — Specifies that the stopband attenuation changes linearly as the frequency increases. Change the slope of the stopband by setting Stopband decay.

  • 1/f — Specifies that the stopband attenuation changes exponentially as the frequency increases, where f is the frequency. Set the power (exponent) for the decay in Stopband decay.

Stopband Decay

When you set Stopband shape, Stopband decay specifies the amount of decay applied to the stopband. the following conditions apply to Stopband decay based on the value of Stopband Shape:

  • When you set Stopband shape to Flat, Stopband decay has no affect on the stopband.

  • When you set Stopband shape to Linear, enter the slope of the stopband in units of dB/rad/s. filterbuilder applies that slope to the stopband.

  • When you set Stopband shape to 1/f, enter a value for the exponent n in the relation (1/f)n to define the stopband decay. filterbuilder applies the (1/f)n relation to the stopband to result in an exponentially decreasing stopband attenuation.

Fractional Delay Filter Design Dialog Box — Main Pane

Frequency Specifications

Parameters in this group enable you to specify your filter format, such as the fractional delay and the filter order.

Order

If you choose Specify for Filter order mode, enter your filter order in this field, or select the order from the drop-down list.filterbuilder designs a filter with the order you specify.

Fractional delay

Specify a value between 0 and 1 samples for the filter fractional delay. The default value is 0.5 samples.

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Halfband Filter Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your filter type and order.

Impulse response

Select either FIR or IIR from the drop-down list, where FIR is the default impulse response. When you choose an impulse response, the design methods and structures you can use to implement your filter change accordingly.

    Note   The design methods and structures for FIR filters are not the same as the methods and structures for IIR filters.

Filter order mode

Select either Minimum (the default) or Specify from the drop-down list. Selecting Specify enables the Order option (see the following sections) so you can enter the filter order.

Filter type

Select Single-rate, Decimator, or Interpolator. By default, filterbuilder specifies single-rate filters.

When you design either a decimator or an interpolator, the resulting filter is a bandpass filter that decimates or interpolates your input by a factor of two.

Order

Enter the filter order. This option is enabled only if Specify was selected for Filter order mode.

Frequency Specifications

The parameters in this group allow you to specify your filter response curve. Graphically, the filter specifications for a halfband lowpass filter look similar to those shown in the following figure.

In the figure, the transition region lies between the end of the passband and the start of the stopband. The width is defined explicitly by the value of Transition width.

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Transition width

Specify the width of the transition between the end of the passband and the edge of the stopband. Specify the value in normalized frequency units or the absolute units you select in Frequency units.

Magnitude Specifications

The parameters in this group let you specify the filter response in the passbands and stopbands.

Magnitude units

Specify the units for any parameter you provide in magnitude specifications. Select one of the following options from the drop-down list.

  • Linear — Specify the magnitude in linear units.

  • dB — Specify the magnitude in decibels (default).

Astop

Enter the filter attenuation in the stopband in the units you choose for Magnitude units, either linear or decibels.

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

Lists the design methods available for the frequency and magnitude specifications you entered. For FIR halfband filters, the available design options are equiripple and kaiser. For IIR halfband filters, the available design options are Butterworth, elliptic, and IIR quasi-linear phase.

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter.

Design Options

The following design options are available for FIR halfband filters when the user specifies an equiripple design:

Minimum phase

To design a filter that is minimum phase, select Minimum phase. Clearing the Minimum phase option removes the phase constraint—the resulting design is not minimum phase.

Stopband Shape

Stopband shape lets you specify how the stopband changes with increasing frequency. Choose one of the following options:

  • Flat — Specifies that the stopband is flat. The attenuation does not change as the frequency increases.

  • Linear — Specifies that the stopband attenuation changes linearly as the frequency increases. Change the slope of the stopband by setting Stopband decay.

  • 1/f — Specifies that the stopband attenuation changes exponentially as the frequency increases, where f is the frequency. Set the power (exponent) for the decay in Stopband decay.

Stopband Decay

When you set Stopband shape, Stopband decay specifies the amount of decay applied to the stopband. the following conditions apply to Stopband decay based on the value of Stopband Shape:

  • When you set Stopband shape to Flat, Stopband decay has no affect on the stopband.

  • When you set Stopband shape to Linear, enter the slope of the stopband in units of dB/rad/s. filterbuilder applies that slope to the stopband.

  • When you set Stopband shape to 1/f, enter a value for the exponent n in the relation (1/f)n to define the stopband decay. filterbuilder applies the (1/f)n relation to the stopband to result in an exponentially decreasing stopband attenuation.

Highpass Filter Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your filter format, such as the impulse response and the filter order.

Impulse response

Select either FIR or IIR from the drop-down list, where FIR is the default impulse response. When you choose an impulse response, the design methods and structures you can use to implement your filter change accordingly.

    Note   The design methods and structures for FIR filters are not the same as the methods and structures for IIR filters.

Filter order mode

Select either Minimum (the default) or Specify from the drop-down list. Selecting Specify enables the Order option (see the following sections) so you can enter the filter order.

Filter type

Select Single-rate, Decimator, Interpolator, or Sample-rate converter. Your choice determines the type of filter as well as the design methods and structures that are available to implement your filter. By default, filterbuilder specifies single-rate filters.

  • Selecting Decimator or Interpolator activates the Decimation Factor or the Interpolation Factor options respectively.

  • Selecting Sample-rate converter activates both factors.

When you design either a decimator or an interpolator, the resulting filter is a bandpass filter that either decimates or interpolates your input signal.

Order

Enter the filter order. This option is enabled only if Specify was selected for Filter order mode.

Decimation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Decimator or Sample-rate converter. The default factor value is 2.

Interpolation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Interpolator or Sample-rate converter. The default factor value is 2.

Frequency Specifications

The parameters in this group allow you to specify your filter response curve. Graphically, the filter specifications look similar to those shown in the following figure.

In the figure, the region between specification values Fstop and Fpass represents the transition region where the filter response is not explicitly defined.

Frequency constraints

Select the filter features to use to define the frequency response characteristics. The list contains the following options, when available for the filter specifications.

  • Passband and stopband edges — Define the filter by specifying the frequencies for the edges for the stop- and passbands.

  • Passband edges — Define the filter by specifying frequencies for the edges of the passband.

  • Stopband edges — Define the filter by specifying frequencies for the edges of the stopbands.

  • 3 dB points — Define the filter response by specifying the locations of the 3 dB points. The 3 dB point is the frequency for the point 3 dB point below the passband value.

  • 3 dB points and passband width — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the passband.

  • 3 dB points and stopband widths — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the stopband.

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Fstop

Enter the frequency at the edge of the end of the stopband. Specify the value in either normalized frequency units or the absolute units you select in Frequency units.

Fpass

Enter the frequency at the edge of the start of the passband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Magnitude Specifications

The parameters in this group let you specify the filter response in the passbands and stopbands.

Magnitude units

Specify the units for any parameter you provide in magnitude specifications. Select one of the following options from the drop-down list.

  • Linear — Specify the magnitude in linear units.

  • dB — Specify the magnitude in decibels (default).

  • Squared — Specify the magnitude in squared units.

Astop

Enter the filter attenuation in the stopband in the units you choose for Magnitude units, either linear or decibels.

Apass

Enter the filter ripple allowed in the passband in the units you choose for Magnitude units, either linear or decibels.

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

Lists the design methods available for the frequency and magnitude specifications you entered. When you change the specifications for a filter, such as changing the impulse response, the methods available to design filters changes as well. The default IIR design method is usually Butterworth, and the default FIR method is equiripple.

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter. By default, FIR filters use direct-form structure, and IIR filters use direct-form II filters with SOS.

Scale SOS filter coefficients to reduce chance of overflow

Selecting this parameter directs the design to scale the filter coefficients to reduce the chances that the inputs or calculations in the filter overflow and exceed the representable range of the filter. Clearing this option removes the scaling. This parameter applies only to IIR filters.

Design Options

The options for each design are specific for each design method. This section does not present all of the available options for all designs and design methods. There are many more that you encounter as you select different design methods and filter specifications. The following options represent some of the most common ones available.

Density factor

Density factor controls the density of the frequency grid over which the design method optimization evaluates your filter response function. The number of equally spaced points in the grid is the value you enter for Density factor times (filter order + 1).

Increasing the value creates a filter that more closely approximates an ideal equiripple filter but increases the time required to design the filter. The default value of 20 represents a reasonable trade between the accurate approximation to the ideal filter and the time to design the filter.

Minimum phase

To design a filter that is minimum phase, select Minimum phase. Clearing the Minimum phase option removes the phase constraint—the resulting design is not minimum phase.

Minimum order

When you select this parameter, the design method determines and design the minimum order filter to meet your specifications. Some filters do not provide this parameter. Select Any, Even, or Odd from the drop-down list to direct the design to be any minimum order, or minimum even order, or minimum odd order.

    Note   Generally, Minimum order designs are not available for IIR filters.

Match Exactly

Specifies that the resulting filter design matches either the passband or stopband or both bands when you select passband or stopband or both from the drop-down list.

Stopband Shape

Stopband shape lets you specify how the stopband changes with increasing frequency. Choose one of the following options:

  • Flat — Specifies that the stopband is flat. The attenuation does not change as the frequency increases.

  • Linear — Specifies that the stopband attenuation changes linearly as the frequency increases. Change the slope of the stopband by setting Stopband decay.

  • 1/f — Specifies that the stopband attenuation changes exponentially as the frequency increases, where f is the frequency. Set the power (exponent) for the decay in Stopband decay.

Stopband Decay

When you set Stopband shape, Stopband decay specifies the amount of decay applied to the stopband. the following conditions apply to Stopband decay based on the value of Stopband Shape:

  • When you set Stopband shape to Flat, Stopband decay has no affect on the stopband.

  • When you set Stopband shape to Linear, enter the slope of the stopband in units of dB/rad/s. filterbuilder applies that slope to the stopband.

  • When you set Stopband shape to 1/f, enter a value for the exponent n in the relation (1/f)n to define the stopband decay. filterbuilder applies the (1/f)n relation to the stopband to result in an exponentially decreasing stopband attenuation.

Hilbert Filter Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your filter format, such as the impulse response and the filter order.

Impulse response

Select either FIR or IIR from the drop-down list, where FIR is the default impulse response. When you choose an impulse response, the design methods and structures you can use to implement your filter change accordingly.

    Note   The design methods and structures for FIR filters are not the same as the methods and structures for IIR filters.

Filter order mode

Select either Minimum (the default) or Specify from the drop-down list. Selecting Specify enables the Order option (see the following sections) so you can enter the filter order.

Filter type

Select Single-rate, Decimator, Interpolator, or Sample-rate converter. Your choice determines the type of filter as well as the design methods and structures that are available to implement your filter. By default, filterbuilder specifies single-rate filters.

  • Selecting Decimator or Interpolator activates the Decimation Factor or the Interpolation Factor options respectively.

  • Selecting Sample-rate converter activates both factors.

When you design either a decimator or an interpolator, the resulting filter is a bandpass filter that either decimates or interpolates your input signal.

Order

Enter the filter order. This option is enabled only if Specify was selected for Filter order mode.

Decimation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Decimator or Sample-rate converter. The default factor value is 2.

Interpolation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Interpolator or Sample-rate converter. The default factor value is 2.

Frequency Specifications

The parameters in this group allow you to specify your filter response curve. Graphically, the filter specifications look similar to those shown in the following figure.

In the figure, the regions between 0 and f1 and between f2 and 1 represent the transition regions where the filter response is explicitly defined by the transition width.

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Transition width

Specify the width of the transitions at the ends of the passband. Specify the value in normalized frequency units or the absolute units you select in Frequency units.

Magnitude Specifications

The parameters in this group let you specify the filter response in the passbands and stopbands.

Magnitude units

Specify the units for any parameter you provide in magnitude specifications. Select one of the following options from the drop-down list.

  • Linear — Specify the magnitude in linear units.

  • dB — Specify the magnitude in decibels (default)

  • Squared — Specify the magnitude in squared units.

Apass

Enter the filter ripple allowed in the passband in the units you choose for Magnitude units, either linear or decibels.

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

Lists the design methods available for the frequency and magnitude specifications you entered. When you change the specifications for a filter, such as changing the impulse response, the methods available to design filters changes as well. The default IIR design method is usually Butterworth, and the default FIR method is equiripple.

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter. By default, FIR filters use direct-form structure, and IIR filters use direct-form II filters with SOS.

Scale SOS filter coefficients to reduce chance of overflow

Selecting this parameter directs the design to scale the filter coefficients to reduce the chances that the inputs or calculations in the filter overflow and exceed the representable range of the filter. Clearing this option removes the scaling. This parameter applies only to IIR filters.

Design Options

The options for each design are specific for each design method. This section does not present all of the available options for all designs and design methods. There are many more that you encounter as you select different design methods and filter specifications. The following options represent some of the most common ones available.

Density factor

Density factor controls the density of the frequency grid over which the design method optimization evaluates your filter response function. The number of equally spaced points in the grid is the value you enter for Density factor times (filter order + 1).

Increasing the value creates a filter that more closely approximates an ideal equiripple filter but increases the time required to design the filter. The default value of 20 represents a reasonable trade between the accurate approximation to the ideal filter and the time to design the filter.

FIR Type

Specify whether to design a type 3 or a type 4 FIR filter. The filter type is defined as follows:

  • Type 3 — FIR filter with even order antisymmetric coefficients

  • Type 4 — FIR filter with odd order antisymmetric coefficients

Select either 3 or 4 from the drop-down list.

Minimum order

When you select this parameter, the design method determines and design the minimum order filter to meet your specifications. Some filters do not provide this parameter. Select Any, Even, or Odd from the drop-down list to direct the design to be any minimum order, or minimum even order, or minimum odd order.

    Note   Generally, Minimum order designs are not available for IIR filters.

Inverse Sinc Filter Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your filter format, such as the impulse response and the filter order.

Filter order mode

Select either Minimum (the default) or Specify from the drop-down list. Selecting Specify enables the Order option (see the following sections) so you can enter the filter order.

Filter type

Select Single-rate, Decimator, Interpolator, or Sample-rate converter. Your choice determines the type of filter as well as the design methods and structures that are available to implement your filter. By default, filterbuilder specifies single-rate filters.

  • Selecting Decimator or Interpolator activates the Decimation Factor or the Interpolation Factor options respectively.

  • Selecting Sample-rate converter activates both factors.

When you design either a decimator or an interpolator, the resulting filter is a bandpass filter that either decimates or interpolates your input signal.

Order

Enter the filter order. This option is enabled only if Specify was selected for Filter order mode.

Decimation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Decimator or Sample-rate converter. The default factor value is 2.

Interpolation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Interpolator or Sample-rate converter. The default factor value is 2.

Frequency Specifications

The parameters in this group allow you to specify your filter response curve. Graphically, the filter specifications look similar to those shown in the following figure.

Regions between specification values such as Fpass and Fstop represent transition regions where the filter response is not explicitly defined.

Frequency constraints

Select the filter features to use to define the frequency response characteristics. The list contains the following options, when available for the filter specifications.

  • Passband and stopband edges — Define the filter by specifying the frequencies for the edges for the stop- and passbands.

  • Passband edges — Define the filter by specifying frequencies for the edges of the passband.

  • Stopband edges — Define the filter by specifying frequencies for the edges of the stopbands.

  • 3 dB points — Define the filter response by specifying the locations of the 3 dB points. The 3 dB point is the frequency for the point 3 dB point below the passband value.

  • 3 dB points and passband width — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the passband.

  • 3 dB points and stopband widths — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the stopband.

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Fpass

Enter the frequency at the end of the passband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Fstop

Enter the frequency at the start of the stopband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Magnitude Specifications

The parameters in this group let you specify the filter response in the passbands and stopbands.

Magnitude units

Specify the units for any parameter you provide in magnitude specifications. Select one of the following options from the drop-down list.

  • Linear — Specify the magnitude in linear units.

  • dB — Specify the magnitude in decibels (default)

  • Squared — Specify the magnitude in squared units.

Apass

Enter the filter ripple allowed in the passband in the units you choose for Magnitude units, either linear or decibels.

Astop

Enter the filter attenuation in the stopband in the units you choose for Magnitude units, either linear or decibels.

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

Lists the design methods available for the frequency and magnitude specifications you entered. When you change the specifications for a filter, such as changing the impulse response, the methods available to design filters changes as well. The default IIR design method is usually Butterworth, and the default FIR method is equiripple.

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter. By default, FIR filters use direct-form structure, and IIR filters use direct-form II filters with SOS.

Scale SOS filter coefficients to reduce chance of overflow

Selecting this parameter directs the design to scale the filter coefficients to reduce the chances that the inputs or calculations in the filter overflow and exceed the representable range of the filter. Clearing this option removes the scaling. This parameter applies only to IIR filters.

Design Options

The options for each design are specific for each design method. This section does not present all of the available options for all designs and design methods. There are many more that you encounter as you select different design methods and filter specifications. The following options represent some of the most common ones available.

Density factor

Density factor controls the density of the frequency grid over which the design method optimization evaluates your filter response function. The number of equally spaced points in the grid is the value you enter for Density factor times (filter order + 1).

Increasing the value creates a filter that more closely approximates an ideal equiripple filter but increases the time required to design the filter. The default value of 20 represents a reasonable trade between the accurate approximation to the ideal filter and the time to design the filter.

Minimum phase

To design a filter that is minimum phase, select Minimum phase. Clearing the Minimum phase option removes the phase constraint—the resulting design is not minimum phase.

Minimum order

When you select this parameter, the design method determines and design the minimum order filter to meet your specifications. Some filters do not provide this parameter. Select Any, Even, or Odd from the drop-down list to direct the design to be any minimum order, or minimum even order, or minimum odd order.

    Note   Generally, Minimum order designs are not available for IIR filters.

Match Exactly

Specifies that the resulting filter design matches either the passband or stopband or both bands when you select passband or stopband or both from the drop-down list.

Stopband Shape

Stopband shape lets you specify how the stopband changes with increasing frequency. Choose one of the following options;

  • Flat — Specifies that the stopband is flat. The attenuation does not change as the frequency increases.

  • Linear — Specifies that the stopband attenuation changes linearly as the frequency increases. Change the slope of the stopband by setting Stopband decay.

  • 1/f — Specifies that the stopband attenuation changes exponentially as the frequency increases, where f is the frequency. Set the power (exponent) for the decay in Stopband decay.

Stopband Decay

When you set Stopband shape, Stopband decay specifies the amount of decay applied to the stopband. the following conditions apply to Stopband decay based on the value of Stopband Shape:

  • When you set Stopband shape to Flat, Stopband decay has no affect on the stopband.

  • When you set Stopband shape to Linear, enter the slope of the stopband in units of dB/rad/s. filterbuilder applies that slope to the stopband.

  • When you set Stopband shape to 1/f, enter a value for the exponent n in the relation (1/f)n to define the stopband decay. filterbuilder applies the (1/f)n relation to the stopband to result in an exponentially decreasing stopband attenuation.

Lowpass Filter Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your filter format, such as the impulse response and the filter order.

Impulse response

Select either FIR or IIR from the drop-down list, where FIR is the default impulse response. When you choose an impulse response, the design methods and structures you can use to implement your filter change accordingly.

    Note   The design methods and structures for FIR filters are not the same as the methods and structures for IIR filters.

Filter order mode

Select either Minimum (the default) or Specify from the drop-down list. Selecting Specify enables the Order option (see the following sections) so you can enter the filter order.

Filter type

Select Single-rate, Decimator, Interpolator, or Sample-rate converter. Your choice determines the type of filter as well as the design methods and structures that are available to implement your filter. By default, filterbuilder specifies single-rate filters.

  • Selecting Decimator or Interpolator activates the Decimation Factor or the Interpolation Factor options respectively.

  • Selecting Sample-rate converter activates both factors.

When you design either a decimator or an interpolator, the resulting filter is a bandpass filter that either decimates or interpolates your input signal.

Order

Enter the filter order. This option is enabled only if Specify was selected for Filter order mode.

Decimation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Decimator or Sample-rate converter. The default factor value is 2.

Interpolation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Interpolator or Sample-rate converter. The default factor value is 2.

Frequency Specifications

The parameters in this group allow you to specify your filter response curve. Graphically, the filter specifications look similar to the one shown in the following figure.

In the figure, regions between specification values such as Fpass and Fstop represent transition regions where the filter response is not explicitly defined.

Frequency constraints

Select the filter features to use to define the frequency response characteristics. The list contains the following options, when available for the filter specifications.

  • Passband and stopband edges — Define the filter by specifying the frequencies for the edges for the stopbands and passbands.

  • Passband edges — Define the filter by specifying frequencies for the edges of the passband.

  • Stopband edges — Define the filter by specifying frequencies for the edges of the stopbands.

  • 3 dB points — Define the filter response by specifying the locations of the 3 dB points. The 3 dB point is the frequency for the point 3 dB point below the passband value.

  • 3 dB points and passband width — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the passband.

  • 3 dB points and stopband widths — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the stopband.

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Fpass

Enter the frequency at the of the passband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Fstop

Enter the frequency at the start of the stopband. Specify the value in either normalized frequency units or the absolute units you select Frequency units.

Magnitude Specifications

The parameters in this group let you specify the filter response in the passbands and stopbands.

Magnitude units

Specify the units for any parameter you provide in magnitude specifications. Select one of the following options from the drop-down list.

  • Linear — Specify the magnitude in linear units.

  • dB — Specify the magnitude in decibels (default)

  • Squared — Specify the magnitude in squared units.

Apass

Enter the filter ripple allowed in the passband in the units you choose for Magnitude units, either linear or decibels.

Astop

Enter the filter attenuation in the stopband in the units you choose for Magnitude units, either linear or decibels.

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

Lists the design methods available for the frequency and magnitude specifications you entered. When you change the specifications for a filter, such as changing the impulse response, the methods available to design filters changes as well. The default IIR design method is usually Butterworth, and the default FIR method is equiripple.

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter. By default, FIR filters use direct-form structure, and IIR filters use direct-form II filters with SOS.

Scale SOS filter coefficients to reduce chance of overflow

Selecting this parameter directs the design to scale the filter coefficients to reduce the chances that the inputs or calculations in the filter overflow and exceed the representable range of the filter. Clearing this option removes the scaling. This parameter applies only to IIR filters.

Design Options

The options for each design are specific for each design method. This section does not present all of the available options for all designs and design methods. There are many more that you encounter as you select different design methods and filter specifications. The following options represent some of the most common ones available.

Density factor

Density factor controls the density of the frequency grid over which the design method optimization evaluates your filter response function. The number of equally spaced points in the grid is the value you enter for Density factor times (filter order + 1).

Increasing the value creates a filter that more closely approximates an ideal equiripple filter but increases the time required to design the filter. The default value of 20 represents a reasonable trade between the accurate approximation to the ideal filter and the time to design the filter.

Minimum phase

To design a filter that is minimum phase, select Minimum phase. Clearing the Minimum phase option removes the phase constraint—the resulting design is not minimum phase.

Minimum order

When you select this parameter, the design method determines and design the minimum order filter to meet your specifications. Some filters do not provide this parameter. Select Any, Even, or Odd from the drop-down list to direct the design to be any minimum order, or minimum even order, or minimum odd order.

    Note   Generally, Minimum order designs are not available for IIR filters.

Match Exactly

Specifies that the resulting filter design matches either the passband or stopband or both bands when you select passband or stopband or both from the drop-down list.

Stopband Shape

Stopband shape lets you specify how the stopband changes with increasing frequency. Choose one of the following options:

  • Flat — Specifies that the stopband is flat. The attenuation does not change as the frequency increases.

  • Linear — Specifies that the stopband attenuation changes linearly as the frequency increases. Change the slope of the stopband by setting Stopband decay.

  • 1/f — Specifies that the stopband attenuation changes exponentially as the frequency increases, where f is the frequency. Set the power (exponent) for the decay in Stopband decay.

Stopband Decay

When you set Stopband shape, Stopband decay specifies the amount of decay applied to the stopband. the following conditions apply to Stopband decay based on the value of Stopband Shape:

  • When you set Stopband shape to Flat, Stopband decay has no affect on the stopband.

  • When you set Stopband shape to Linear, enter the slope of the stopband in units of dB/rad/s. filterbuilder applies that slope to the stopband.

  • When you set Stopband shape to 1/f, enter a value for the exponent n in the relation (1/f)n to define the stopband decay. filterbuilder applies the (1/f)n relation to the stopband to result in an exponentially decreasing stopband attenuation.

Nyquist Filter Design Dialog Box — Main Pane

Filter Specifications

Parameters in this group enable you to specify your filter format, such as the impulse response and the filter order.

Band

Specifies the location of the center of the transition region between the passband and the stopband. The center of the transition region, bw, is calculated using the value for Band:

bw = Fs/(2*Band).

Impulse response

Select either FIR or IIR from the drop-down list, where FIR is the default impulse response. When you choose an impulse response, the design methods and structures you can use to implement your filter change accordingly.

    Note   The design methods and structures for FIR filters are not the same as the methods and structures for IIR filters.

Filter order mode

Select either Minimum (the default) or Specify from the drop-down list. Selecting Specify enables the Order option (see the following sections) so you can enter the filter order.

Filter type

Select Single-rate, Decimator, Interpolator, or Sample-rate converter. Your choice determines the type of filter as well as the design methods and structures that are available to implement your filter. By default, filterbuilder specifies single-rate filters.

  • Selecting Decimator or Interpolator activates the Decimation Factor or the Interpolation Factor options respectively.

  • Selecting Sample-rate converter activates both factors.

When you design either a decimator or an interpolator, the resulting filter is a bandpass filter that either decimates or interpolates your input signal.

Order

Enter the filter order. This option is enabled only if Specify was selected for Filter order mode.

Decimation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Decimator or Sample-rate converter. The default factor value is 2.

Interpolation Factor

Enter the decimation factor. This option is enabled only if the Filter type is set to Interpolator or Sample-rate converter. The default factor value is 2.

Frequency Specifications

The parameters in this group allow you to specify your filter response curve. Graphically, the filter specifications look similar to those shown in the following figure.

In the figure, BW is the width of the transition region and Band determines the location of the center of the region.

Frequency constraints

Select the filter features to use to define the frequency response characteristics. The list contains the following options, when available for the filter specifications.

  • Passband and stopband edges — Define the filter by specifying the frequencies for the edges for the stopbands and passbands.

  • Passband edges — Define the filter by specifying frequencies for the edges of the passband.

  • Stopband edges — Define the filter by specifying frequencies for the edges of the stopbands.

  • 3 dB points — Define the filter response by specifying the locations of the 3 dB points. The 3 dB point is the frequency for the point 3 dB point below the passband value.

  • 3 dB points and passband width — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the passband.

  • 3 dB points and stopband widths — Define the filter by specifying frequencies for the 3 dB points in the filter response and the width of the stopband.

Frequency units

Use this parameter to specify whether your frequency settings are normalized or in absolute frequency. Select Normalized (0–1) to enter frequencies in normalized form. This behavior is the default. To enter frequencies in absolute values, select one of the frequency units from the drop-down list—Hz, kHz, MHz, or GHz. Selecting one of the unit options enables the Input Fs parameter.

Input Fs

Fs, specified in the units you selected for Frequency units, defines the sampling frequency at the filter input. When you provide an input sampling frequency, all frequencies in the specifications are in the selected units as well. This parameter is available when you select one of the frequency options from the Frequency units list.

Transition width

Specify the width of the transition between the end of the passband and the edge of the stopband. Specify the value in normalized frequency units or the absolute units you select in Frequency units.

Magnitude Specifications

The parameters in this group let you specify the filter response in the passbands and stopbands.

Magnitude units

Specify the units for any parameter you provide in magnitude specifications. Select one of the following options from the drop-down list.

  • Linear — Specify the magnitude in linear units.

  • dB — Specify the magnitude in decibels (default)

  • Squared — Specify the magnitude in squared units.

Astop

Enter the filter attenuation in the stopband in the units you choose for Magnitude units, either linear or decibels.

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

Lists the design methods available for the frequency and magnitude specifications you entered. When you change the specifications for a filter, such as changing the impulse response, the methods available to design filters changes as well. The default IIR design method is usually Butterworth, and the default FIR method is equiripple.

Structure

For the filter specifications and design method you select, this parameter lists the filter structures available to implement your filter. By default, FIR filters use direct-form structure, and IIR filters use direct-form II filters with SOS.

Scale SOS filter coefficients to reduce chance of overflow

Selecting this parameter directs the design to scale the filter coefficients to reduce the chances that the inputs or calculations in the filter overflow and exceed the representable range of the filter. Clearing this option removes the scaling. This parameter applies only to IIR filters.

Design Options

The options for each design are specific for each design method. This section does not present all of the available options for all designs and design methods. There are many more that you encounter as you select different design methods and filter specifications. The following options represent some of the most common ones available.

Density factor

Density factor controls the density of the frequency grid over which the design method optimization evaluates your filter response function. The number of equally spaced points in the grid is the value you enter for Density factor times (filter order + 1).

Increasing the value creates a filter that more closely approximates an ideal equiripple filter but increases the time required to design the filter. The default value of 20 represents a reasonable trade between the accurate approximation to the ideal filter and the time to design the filter.

Minimum phase

To design a filter that is minimum phase, select Minimum phase. Clearing the Minimum phase option removes the phase constraint—the resulting design is not minimum phase.

Minimum order

When you select this parameter, the design method determines and design the minimum order filter to meet your specifications. Some filters do not provide this parameter. Select Any, Even, or Odd from the drop-down list to direct the design to be any minimum order, or minimum even order, or minimum odd order.

    Note   Generally, Minimum order designs are not available for IIR filters.

Match Exactly

Specifies that the resulting filter design matches either the passband or stopband or both bands when you select passband or stopband or both from the drop-down list.

Stopband Shape

Stopband shape lets you specify how the stopband changes with increasing frequency. Choose one of the following options:

  • Flat — Specifies that the stopband is flat. The attenuation does not change as the frequency increases.

  • Linear — Specifies that the stopband attenuation changes linearly as the frequency increases. Change the slope of the stopband by setting Stopband decay.

  • 1/f — Specifies that the stopband attenuation changes exponentially as the frequency increases, where f is the frequency. Set the power (exponent) for the decay in Stopband decay.

Stopband Decay

When you set Stopband shape, Stopband decay specifies the amount of decay applied to the stopband. the following conditions apply to Stopband decay based on the value of Stopband Shape:

  • When you set Stopband shape to Flat, Stopband decay has no affect on the stopband.

  • When you set Stopband shape to Linear, enter the slope of the stopband in units of dB/rad/s. filterbuilder applies that slope to the stopband.

  • When you set Stopband shape to 1/f, enter a value for the exponent n in the relation (1/f)n to define the stopband decay. filterbuilder applies the (1/f)n relation to the stopband to result in an exponentially decreasing stopband attenuation.

Notch

See Peak/Notch Filter Design Dialog Box — Main Pane.

Octave Filter Design Dialog Box — Main Pane

Filter Specifications

Order

Specify filter order. Possible values are: 4, 6, 8, 10.

Bands per octave

Specify the number of bands per octave. Possible values are: 1, 3, 6, 12, 24.

Frequency units

Specify frequency units as Hz or kHz.

Input Fs

Specify the input sampling frequency in the frequency units specified previously.

Center Frequency

Select from the drop-down list of available center frequency values.

Algorithm

Design Method

Butterworth is the design method used for this type of filter.

Structure

Specify filter structure. Choose from:

  • Direct-form I SOS

  • Direct-form II SOS

  • Direct-form I transposed SOS

  • Direct-form II transposed SOS

Scale SOS filter coefficients to reduce chance of overflow

Select the check box to scale the filter coefficients.

Parametric Equalizer Filter Design Dialog Box — Main Pane

Filter Specifications

Filter Specifications

Order mode

Select Minimum for minimum filter order, or Specify to enter a specific filter order. The order mode also affects the possible frequency constraints, which in turn limit the gain specifications. For example, if you specify a Minimum order filter, the available frequency constraints are:

  • Center frequency, bandwidth, passband width

  • Center frequency, bandwidth, stopband width

If you select Specify, the available frequency constraints are:

  • Center frequency, bandwidth

  • Center frequency, quality factor

  • Shelf type, cutoff frequency, quality factor

  • Shelf type, cutoff frequency, shelf slope parameter

  • Low frequency, high frequency

Order

This parameter is enabled only if theOrder mode is set to Specify. Enter the filter order in this text box.

Frequency specifications

Depending on the filter order, the possible frequency constraints change. Once you choose the frequency constraints the input boxes in this area change to reflect the selection.

Frequency constraints

Select the specification array to represent frequency constraints. The following options are available:

  • Center frequency, bandwidth, passband width (available for minimum order only)

  • Center frequency, bandwidth, stopband width (available for minimum order only)

  • Center frequency, bandwidth (available for a specified order only)

  • Center frequency, quality factor (available for a specified order only)

  • Shelf type, cutoff frequency, quality factor (available for a specified order only)

  • Shelf type, cutoff frequency, shelf slope parameter (available for a specified order only)

  • Low frequency, high frequency (available for a specified order only)

Frequency units

Select the frequency units from the available drop down list (Normalized, Hz, kHz, MHz, GHz). If Normalized is selected, then the Input Fs box is disabled for input.

Input Fs

Enter the input sampling frequency. This input box is disabled for input if Normalized is selected in the Frequency units input box.

Center frequency

Enter the center frequency, either normalized, or in the units selected previously.

Bandwidth

Enter the bandwidth.

Passband width

Enter the passband width. This option is enabled only if the filter is of minimum order, and the frequency constraint selected is Center frequency, bandwidth, passband width.

Stopband width

Enter the stopband width. This option is enabled only if the filter is of minimum order, and the frequency constraint selected is Center frequency, bandwidth, stopband width.

Low frequency

Enter the low frequency. This option is enabled only if the filter order is user specified and the frequency constraint selected is Low frequency, high frequency

High frequency

Enter the high frequency. This option is enabled only if the filter order is user specified and the frequency constraint selected is Low frequency, high frequency

Gain Specifications

Depending on the filter order and frequency constraints, the possible gain constraints change. Also, once you choose the gain constraints the input boxes in this area change to reflect the selection.

Gain constraints

Select the specification array to represent gain constraints, and remember that not all of these options are available for all configurations. The following is a list of all available options:

  • Reference, center frequency, bandwidth, passband

  • Reference, center frequency, bandwidth, stopband

  • Reference, center frequency, bandwidth, passband, stopband

  • Reference, center frequency, bandwidth

Gain units

Specify the gain units either dB or squared. These units are used for all gain specifications in the dialog box.

Reference

Enter the reference gain.

Bandwidth

Enter the bandwidth.

Center frequency

Enter the center frequency (in the units specified in Frequency units input box)

Passband

Specify the passband gain. This input is enabled only for specific configurations.

Stopband

Specify the stopband gain. This input is enabled only for specific configurations.

Algorithm

Design method

Select the design method from the drop-down list. Different methods are available depending on the chosen filter constraints.

Structure

Select filter structure. The possible choices are:

  • Direct-form I SOS

  • Direct-form II SOS

  • Direct-form I transposed SOS

  • Direct-form II transposed SOS

Scale SOS filter coefficients to reduce chance of overflow

Select the check box to scale the filter coefficients.

Peak/Notch Filter Design Dialog Box — Main Pane

Filter Specifications

In this area you can specify whether you want to design a peaking filter or a notching filter, as well as the order of the filter.

Response

Select Peak or Notch from the drop-down box. The rest of the parameters that specify are equivalent for either filter type.

Order

Enter the filter order. The order must be even.

Frequency Specifications

This group of parameters allows you to specify frequency constraints and units.

Frequency Constraints

Select the frequency constraints for filter specification. There are two choices as follows:

  • Center frequency and quality factor

  • Center frequency and bandwidth

Frequency units

The frequency units are normalized by default. If you specify units other than normalized, filterbuilder assumes that you wish to specify an input sampling frequency, and enables this input box. The choice of frequency units are: Normalized (0 to 1), Hz, kHz, MHz, GHz.

Input Fs

This input box is enabled if Frequency units other than Normalized (0 to 1) are specified. Enter the input sampling frequency.

Center frequency

Enter the center frequency in the units specified previously.

Quality Factor

This input box is enabled only when Center frequency and quality factor is chosen for the Frequency Constraints. Enter the quality factor.

Bandwidth

This input box is enabled only when Center frequency and bandwidth is chosen for the Frequency Constraints. Enter the bandwidth.

Magnitude Specifications

This group of parameters allows you to specify the magnitude constraints, as well as their values and units.

Magnitude Constraints

Depending on the choice of constraints, the other input boxes are enabled or disabled. Select from four magnitude constraints available:

  • Unconstrained

  • Passband ripple

  • Stopband attenuation

  • Passband ripple and stopband attenuation

Magnitude units

Select the magnitude units: either dB or squared.

Apass

This input box is enabled if the magnitude constraints selected are Passband ripple or Passband ripple and stopband attenuation. Enter the passband ripple.

Astop

This input box is enabled if the magnitude constraints selected are Stopband attenuation or Passband ripple and stopband attenuation. Enter the stopband attenuation.

Algorithm

The parameters in this group allow you to specify the design method and structure that filterbuilder uses to implement your filter.

Design Method

Lists all design methods available for the frequency and magnitude specifications you entered. When you change the specifications for a filter the methods available to design filters changes as well.

Structure

Lists all available filter structures for the filter specifications and design method you select. The typical options are:

  • Direct-form I SOS

  • Direct-form II SOS

  • Direct-form I transposed SOS

  • Direct-form II transposed SOS

Scale SOS filter coefficients to reduce chance of overflow

Selecting this parameter directs the design to scale the filter coefficients to reduce the chances that the inputs or calculations in the filter overflow and exceed the representable range of the filter. Clearing this option removes the scaling. This parameter applies only to IIR filters.

Pulse-shaping Filter Design Dialog Box—Main Pane

Filter Specifications

Parameters in this group enable you to specify the shape and length of the filter.

Pulse shape

Select the shape of the impulse response from the following options:

  • Raised Cosine

  • Square Root Raised Cosine

  • Gaussian

Order mode

This specification is only available for raised cosine and square root raised cosine filters. For these filters, select one of the following options:

  • Minimum— This option will result in the minimum-length filter satisfying the user-specified Frequency specifications.

  • Specify order—This option allows the user to construct a raised cosine or square root cosine filter of a specified order by entering an even number in the Order input box. The length of the impulse response will be Order+1 .

  • Specify symbols—This option enables the user to specify the length of the impulse response in an alternative manner. If Specify symbols is chosen, the Order input box changes to the Number of symbols input box.

Samples per symbol

Specify the oversampling factor. Increasing the oversampling factor guards against aliasing and improves the FIR filter approximation to the ideal frequency response. If Order is specified in Number of symbols, the filter length will be Number of symbols*Samples per symbol+1. The product Number of symbols*Samples per symbol must be an even number.

If a Gaussian filter is specified, the filter length must be specified in Number of symbols and Samples per symbol. The product Number of symbols*Samples per symbol must be an even number. The filter length will be Number of symbols*Samples per symbol+1.

Frequency specifications

Parameters in this group enable you to specify the frequency response of the filter. For raised cosine and square root raised cosine filters, the frequency specifications include:

Rolloff factor

The rolloff factor takes values in the range [0,1]. The smaller the rolloff factor, the steeper the transition in the stopband.

Frequency units

The frequency units are normalized by default. If you specify units other than normalized, filterbuilder assumes that you wish to specify an input sampling frequency, and enables this input box. The choice of frequency units are: Normalized (0 to 1), Hz, kHz, MHz, GHz

For a Gaussian pulse shape, the available frequency specifications are:

Bandwidth-time product

This option allows the user to specify the width of the Gaussian filter. Note that this is independent of the length of the filter. The bandwidth-time product (BT) must be a positive real number. Smaller values of the bandwidth-time product result in larger pulse widths in time and steeper stopband transitions in the frequency response.

Frequency units

The frequency units are normalized by default. If you specify units other than normalized, filterbuilder assumes that you wish to specify an input sampling frequency, and enables this input box. The choice of frequency units are: Normalized (0 to 1), Hz, kHz, MHz, GHz

Magnitude specifications

If the Order mode is specified as minimum, the magnitude units may be selected from:

Algorithm

The only design method available for FIR pulse-shaping filters is the window method.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS