MATLAB Examples

Implement an FIR Decimator in Simulink

You can design and implement the FIR multirate filters in Simulink using the FIR Decimation, FIR Interpolation, and FIR Rate Conversion blocks. When you set Coefficient source to Dialog parameters, you can provide designMultirateFIR(1,2) as a parameter to specify the filter coefficients. To design the Decimator using the designMultirateFIR function, you must specify the decimation factor of interest (usually greater than 1) and an interpolation factor equal to 1. You can use the default half-polyphase length of 12 and the default stopband attenuation of 80 dB. Alternatively, you can also specify the half-polyphase length and stopband attenuation values.

The block chooses the coefficients computed using the designMultirateFIR function.

Similarly, you can design an FIR interpolator and FIR rate converter by providing appropriate inputs to the designMultirateFIR function.

When you set Coefficient source to Auto, the block computes the coefficients using the designMultirateFIR function. The function uses the decimation factor specified in the block dialog box.

You can design an FIR Interpolator and an FIR Rate Converter using a similar approach in the corresponding blocks.