tunable lowpass filtering of noisy input in simulink -凯发k8网页登录
this example shows how to filter a noisy chirp signal with a lowpass filter that has a tunable passband frequency. the filter in this example is designed using a block with filter type set to lowpass
. this type of filter enables you to change the passband frequency during simulation without having to redesign the whole filter. the filter algorithm recomputes the filter coefficients whenever the passband frequency changes.
open lowpass filter model
open the ex_tunable_chirp_lowpass
model.
the input signal is a noisy chirp sampled at 44.1 khz. the chirp has an initial frequency of 5000 hz and a target frequency of 8000 hz.
the variable bandwidth iir filter block has a lowpass frequency response, with the passband frequency set to 2000 hz.
simulate the model
after you configure the block parameters, simulate the model. in the initial configuration, the chirp sweeps from 5000 hz to 8000 hz, which falls in the stopband of the filter. when the chirp input passes through this filter, the filter attenuates the chirp.
to tune the passband frequency of the filter, in the variable bandwidth iir filter block dialog box, change filter passband frequency (hz) to 6000 hz while the simulation is running. click apply and the output of the spectrum analyzer changes immediately.
the chirp sweep frequency ranges from 5000 to 8000 hz. part of this frequency range is in the passband and the remaining part is in the stopband. while in the filter's passband frequency, the chirp is unaffected.
while in the filter's stopband frequency, the chirp is attenuated.
tuning frequency specifications through input port
during simulation, you can tune the filter specifications such as the passband frequency, center frequency, and filter bandwidth through the input port, and see the impact on the filtered output in real time.
using normalized frequency units
you can provide the frequency specifications in normalized frequency units (ranging from 0 to 1) by setting the sample rate mode parameter to use normalized frequency (0 to 1)
.
see also
| | |