Main Content

Multirate and Multistage Filters

Decimation, interpolation, rate conversion, and filter banks

多重速率的过滤器是变化的数字滤波器the sample rate of a digital signal without introducing aliasing or imaging in the rate-converted signal. These filters are categorized as decimators that reduce the sample rate, interpolators that increase the sample rate, and rate converters that do a combination of both. For details on these rate conversion operations and their effect on the signal in time and frequency domains, seeOverview of Multirate Filters. DSP System Toolbox™ offers several MATLAB®System objects and Simulink®blocks that implement decimators, interpolators, and rate converters. Advanced filter technologies such as channelizers, channel synthesizers, two-channel halfband filter banks, and multilevel filter banks use these filters as building components.

You can implement a multirate filter with a large rate conversion factor in two or more stages rather than in one single stage. When the design is long (contains many coefficients) and costly (requires many multiplications and additions per input sample), the multistage approach is more efficient to implement compared to the single-stage approach. For more details, seeOverview of Multistage Filters.

ThedesignMultistageDecimatoranddesignMultistageInterpolatorfunctions in DSP System Toolbox automatically determine the optimal configuration of the filter, which includes determining the number of stages and the rate conversion factor for each stage. An optimal configuration leads to the least computational effort and you can measure the cost of such an implementation using thecostfunction. For an example, seeMultistage Rate Conversion.

Objects

expand all

dsp.FarrowRateConverter Polynomial sample rate converter with arbitrary conversion factor
dsp.FIRDecimator Polyphase FIR decimator
dsp.FIRHalfbandDecimator Halfband decimator
dsp.FIRHalfbandInterpolator Halfband interpolator
dsp.FIRInterpolator Polyphase FIR interpolator
dsp.FIRRateConverter Sample rate converter
dsp.HDLFIRDecimator Finite impulse response (FIR) decimation filter—optimized for HDL code generation
dsp.HDLFIRRateConverter Upsample, filter, and downsample—optimized for HDL code generation
dsp.IIRHalfbandDecimator Decimate by factor of two using polyphase IIR
dsp.IIRHalfbandInterpolator Interpolate by a factor of two using polyphase IIR
dsp.ComplexBandpassDecimator Extract a frequency subband using a one-sided (complex) bandpass decimator
dsp.DigitalDownConverter Translate digital signal from intermediate frequency (IF) band to baseband and decimate it
dsp.DigitalUpConverter Interpolate digital signal and translate it from baseband to IF band
dsp.FilterCascade Create cascade of filter System objects
dsp.SampleRateConverter Multistage sample rate converter
dsp.CICCompensationDecimator Compensate for CIC decimation filter using FIR decimator
dsp.CICCompensationInterpolator Compensate for CIC interpolation filter using FIR interpolator
dsp.CICDecimator Decimate signal using cascaded integrator-comb (CIC) filter
dsp.CICInterpolator Interpolate signal using cascaded integrator-comb filter
dsp.HDLCICDecimation Decimate signal using cascaded integrator-comb filter — optimized for HDL code generation
dsp.Channelizer Polyphase FFT analysis filter bank
dsp.ChannelSynthesizer Polyphase FFT synthesis filter bank
dsp.HDLChannelizer Polyphase filter bank and fast Fourier transform—optimized for HDL code generation
dsp.DyadicAnalysisFilterBank Dyadic analysis filter bank
dsp.DyadicSynthesisFilterBank Reconstruct signals from subbands
dsp.SubbandAnalysisFilter Decompose signal into high-frequency and low-frequency subbands
dsp.SubbandSynthesisFilter Reconstruct signal from high-frequency and low-frequency subbands

Functions

expand all

coeffs Returns the filterSystem objectcoefficients in a structure
cost Estimate cost of implementing filterSystem object
cascade Cascade of filter system objects
freqz Frequency response of discrete-time filterSystem object
fvtool Visualize frequency response of DSP filters
info Information about filterSystem object
measure Measure frequency response characteristics of filterSystem object
polyphase Polyphase decomposition of multirate filter
designMultirateFIR Multirate FIR filter design
designMultistageDecimator Multistage decimator design
designMultistageInterpolator Multistage interpolator design
fdesign.decimator Decimator filter specification object
fdesign.interpolator Interpolator filter specification
fdesign.rsrc Rational-factor采样率转换器specification

Blocks

expand all

Farrow Rate Converter Polynomial sample-rate converter with arbitrary conversion factor
FIR Decimation Filter and downsample input signals
FIR Decimation HDL Optimized Finite impulse response (FIR) decimation filter—optimized for HDL code generation
FIR Halfband Decimator Decimate signal using polyphase FIR halfband filter
FIR Halfband Interpolator Interpolate signal using polyphase FIR half band filter
FIR Interpolation Upsample and filter input signals
FIR Rate Conversion Upsample, filter, and downsample input signals
FIR Rate Conversion HDL Optimized Upsample, filter, and downsample input signal and generates optimized HDL code
IIR Halfband Decimator Decimate signal using polyphase IIR halfband filter
IIR Halfband Interpolator Interpolate signal using polyphase IIR halfband filter
Complex Bandpass Decimator Extract a frequency subband using a one-sided (complex) bandpass decimator
Digital Down-Converter Translate digital signal from Intermediate Frequency (IF) band to baseband and decimate it
Digital Up-Converter Interpolate digital signal and translate it from baseband to Intermediate Frequency (IF) band
Sample-Rate Converter Multistage sample-rate conversion
CIC Compensation Decimator Compensate for CIC filter using FIR decimator
CIC Compensation Interpolator Compensate for CIC filter using FIR interpolator
CIC Decimation Decimate signal using cascaded integrator-comb filter
CIC Interpolation Interpolate signal using cascaded integrator-comb filter
CIC Decimation HDL Optimized Decimate signal using cascaded integrator-comb filter optimized for HDL code generation
Channelizer Polyphase FFT analysis filter bank
Channelizer HDL Optimized Polyphase filter bank and fast Fourier transform—optimized for HDL code generation
Channel Synthesizer Polyphase FFT synthesis filter bank
Dyadic Analysis Filter Bank Decompose signals into subbands with smaller bandwidths and slower sample rates or compute discrete wavelet transform (DWT)
Dyadic Synthesis Filter Bank Reconstruct signals from subbands with smaller bandwidths and slower sample rates or compute inverse discrete wavelet transform (IDWT)
Two-Channel Analysis Subband Filter Decompose signal into high-frequency and low-frequency subbands
Two-Channel Synthesis Subband Filter Reconstruct signal from high-frequency and low-frequency subbands

Topics

Sample and Frame Rates in Multirate Models

Inspect Sample and Frame Rates in Simulink

了解样品时间,采样率,帧期间,and frame rate in the context of a Simulink model. Determine the sample and frame rates of signals in your model.

Convert Sample and Frame Rates in Simulink Using Rate Conversion Blocks

Learn how direct-rate conversion blocks impact the sample rate and frame rate of signals in Simulink models.

Convert Sample and Frame Rates in Simulink Using Frame Rebuffering Blocks

Learn how frame rebuffering blocks impact the sample rate and frame rate of signals in Simulink models.

Multirate Filters

Overview of Multirate Filters

Define multirate filters and understand decimation and interpolation. Understand aliasing and imaging and ways to avoid them.

Design of Decimators and Interpolators

This example shows how to design filters for decimation and interpolation of discrete sequences.

Multirate Filtering in MATLAB and Simulink

Perform multirate filtering using rate conversion objects and blocks.

FIR Nyquist (L-th band) Filter Design

This example shows how to design lowpass FIR Nyquist filters.

Multistage Filters

Overview of Multistage Filters

Different types of multistage filters and their uses. Learn how to implement decimators and interpolators using the multistage approach.

Multistage Rate Conversion

Design multistage rate conversion filters.

Filter Banks

Overview of Filter Banks

Provides an overview of the channelizer, channel synthesizer, and the two-channel filter bank.

Two-Channel Filter Bank Using Halfband Decimators and Halfband Interpolators

Implement a two-channel filter bank using the FIR and IIR halfband filters. Compare the implementation cost and group delay.

Channelize and Synthesize Sine Wave in MATLAB

Channelize and synthesize sinusoidal signal in MATLAB.

Synthesize and Channelize Audio in Simulink

Synthesize and channelize audio signals.

Multilevel Filter Banks

Understand dyadic analysis and dyadic synthesis multilevel filter banks.

Calculate Channel Latencies Required for Wavelet Reconstruction

Learn how to calculate the latencies required for perfect wavelet reconstruction.

Dataflow

Model Multirate Signal Processing Systems Using Dataflow

Use aDataflow Subsystemto automatically calculate frame sizes in multirate systems.

Delay and Latency

Time-Based Scheduling and Code Generation(Simulink Coder)

Generate code that meets real-time execution requirements after reviewing sample time and tasking mode considerations.

Delay and Latency

Configure the Simulink environment to minimize delay and increase simulation performance.

Featured Examples