Tunable Lowpass Filtering of Noisy Input in Simulink

This example shows how to filter a noisy chirp signal with a lowpass filter that has a tunable passband frequency. The filter is a Variable Bandwidth IIR Filter 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

 

model = 'ex_tunable_chirp_lowpass';
open_system(model);

 

On the input side, there is a Chirp signal block and a Random Source block. These signals feed into an adder. The output of the adder block is a noisy chirp signal. The noisy chirp signal feeds into the Variable Bandwidth IIR Filter block that acts as a tunable lowpass filter. The noisy chirp signal and the filtered signal are fed into the Spectrum Analyzer.

 

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.

Block dialog box of the Chirp signal. The parameters of the block dialog box are as follows. Frequency sweep is set to Linear, Sweep model is set to Bidirectional, Initial frequency is set to 5000 Hz, Target frequency is set to 8000 Hz, Target time is set to 1 s, sweep time is set to 1 s, Initial phase is set to 0 radians, Sample time is set to 1/44100 seconds, Samples per frame is set to 1024, and Output Data Type is set to double.

The Variable Bandwidth IIR Filter block has a lowpass frequency response, with the passband frequency set to 2000 Hz.

The image shows the magnitude response shown on the Filter Visualization Tool on the left and the block dialog of the Variable Bandwidth IIR Filter on the right. The Variable Bandwidth IIR Filter contains the following parameters. Filter type is set to Lowpass, IIR filter order is set to 8, Filter passband frequency is set to 2000 Hz, Filter passband ripple is set to 1 dB, Filter stopband attenuation is set to 60 dB, Inherit sample rate from input check box is not selected, Input sample rate is set to 44100 Hz, View Filter Response button, Simulate using is set to Interpreted execution. When you click on the View Filter Response button, the Filter Visualization Tool window launches and shows the magnitude response in dB by default. The y-axis of the FV Tool shows Magnitude in dB and scales from -85 dB to +5 dB. The x-axis shows frequency in kHz and scales from 0 to 22.5 kHz. The plot shows passband until 2000 Hz and stopband after that.

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.

Spectrum Analyzer plot showing the overlay of the original signal and the filtered signal. The y-axis is measured in dBm and scales from -175 dBm to 75 dBm. The x-axis shows the frequencies in KHz and ranges from 0 KHz to 22.5 KHz.

 

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. Click Apply and the output of the Spectrum Analyzer changes immediately.

The chirp's 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.

Spectrum Analyzer plot showing the overlay of the original signal and the filtered signal.

 

While in the filter's stopband frequency, the chirp is attenuated.

Spectrum Analyzer plot showing the overlay of the original signal and the filtered signal.

 

During simulation, you can tune any of the tunable parameters in the model and see the effect on the filtered output real time.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.

Machine Learning in MATLAB

Train Classification Models in Classification Learner App

Train Regression Models in Regression Learner App

Distribution Plots

Explore the Random Number Generation UI

Design of Experiments

Machine Learning Models

Logistic regression

Logistic regression create generalized linear regression model - MATLAB fitglm 2

Support Vector Machines for Binary Classification

Support Vector Machines for Binary Classification 2

Support Vector Machines for Binary Classification 3

Support Vector Machines for Binary Classification 4

Support Vector Machines for Binary Classification 5

Assess Neural Network Classifier Performance

Naive Bayes Classification

ClassificationTree class

Discriminant Analysis Classification

Ensemble classifier

ClassificationTree class 2

Train Generalized Additive Model for Binary Classification

Train Generalized Additive Model for Binary Classification 2

Classification Using Nearest Neighbors

Classification Using Nearest Neighbors 2

Classification Using Nearest Neighbors 3

Classification Using Nearest Neighbors 4

Classification Using Nearest Neighbors 5

Linear Regression

Linear Regression 2

Linear Regression 3

Linear Regression 4

Nonlinear Regression

Nonlinear Regression 2

Visualizing Multivariate Data

Generalized Linear Models

Generalized Linear Models 2

RegressionTree class

RegressionTree class 2

Neural networks

Gaussian Process Regression Models

Gaussian Process Regression Models 2

Understanding Support Vector Machine Regression

Understanding Support Vector Machine Regression 2

RegressionEnsemble