Circuits and Signals
Signal Noise Reduction Using Passive Filters.
The aim of this experiment to design the passive filters for the given audio signal and to generate the code MATLAB – Simulink.
In analog and digital filtering technique, a filter is to remove the unwanted components or noise from a signal. The filtered signal composed of definite frequency bands and it derived from the transfer function of filter components of electronic circuits. Filter circuits depend on the fact that the impedance of the capacitors and inductors is a function of frequency as shown in Figure 1. Passive filters are composed of only passive components (resistors, capacitors and inductors) and do not provide amplification.
Figure 1. Design of passive RC low pass filter
The passive filters are low pass, high pass, band pass and band stop filters which are represented in the below Figure 2.
Figure 2. Signal representation of analog passive filters
Transfer function analysis of RC low pass and High pass filter and are given below:
The above transfer is used to design the low pass and high pass filter in Simulink for real time application system design in broadcasting applications.
Task 1: Preparation
For your report, write about the differences between low pass, high pass, band pass and band stop filters with their transfer function. Where are the poles and zeros?
Design a passive band-pass filter circuit with a cut off frequency of (FL, FH of 7.440, 13.440 kHz). (hint: cascade both low pass and high pass filter, as shown below).
Find the bandwidth, resonant frequency and the values of the required electrical components? (Hint: Use the mathematical function from Practical 2 for bandwidth, resonant frequency).
For eg: To determine the lower cut off frequency from “low pass” filter. RL and CL are the resistor and capacitor in low pass filter.
Task 2: Identify filter from transfer function using MATLAB
The MATLAB code provided here contains a transfer function. Find the filtering type from the output. Use frequency ranges of [1Hz to 1kHz] and [1kHz to 100kHz].
%required transfer function
%initialize the frequency range
You will need to set the w variable to the correct frequencies in this code. Refer to the help for the bode command (type help bode at the MATLAB command prompt) for more information.
Task 3: Simulink
Design the low pass and high pass filter for the given noisy signal using Simulink and read the output in oscilloscope and speaker. For your report, discuss the observation of the noise reduction signal output.
1. Open MATLAB
2. Type “Simulink” in the workspace and then press “Enter”.
3. The Simulink library will open (File >> new model)
4. Click blank model and the Simulink blank model will open as shown in below figure.
5. Use the Simulink library to add the components for the circuit design.
6. Click Simulink library browser and select the sources, subsystem, oscilloscope and the some of the electrical components are listed below.
Input signal as “Sine wave”
Adding two signals
The below figure represents the electrical components search in the library browser.
To design the low pass and high filter:
1. Add the subsystem as “RC low pass filter” and initialise the low pass filter transfer function.
2. Double click the “RC low pass filter” subsystem.
3. Select “Transfer function” from the library file
4. Initialise the transfer function as shown in below figure.
Note: Change the transfer function to increase the low pass filtering efficiency or to reduce the noise signal.
5. Mirror the steps for RC high pass filter and the design is shown in below figure., Add “Gain” to reduce the noise.
Extra Credits: How the noisy signal gets filtered by changing the transfer function in “S domain” as discussed in tutorial problems?
Task 4: Test filters on recorded audio
Generate the MATLAB code and short Algorithm for the recorded audio signal and to read the audio signal using passive low pass, high pass, band pass and band stop filtering techniques.
You will need to insert some additional lines to complete the code supplied here. Look for the lines marked TO DO.
recording=audiorecorder %audio file recording
recordblocking(recording,5); %relates the recording time
%TO DO: read the recorded file using function
N=8; %order of filter
fc=0.2; %Sampling freq
%Lowpass pass filter
num2=fir1(N,fc,'low'); %filtering function
plot(y) %original audio
title('original audio signal')
FILTER2=filter(num2,den2,y) %filtering function
title('Signal filtering using low pass filter')
%High pass filter
%TO DO: write the code for the passive high pass filter for the recorded audio signal
FILTER3= fir1(N,[f2 f1]);
title('Signal filtering using band pass filter')
%TO DO: write the function for the passive band stop filter
title('Signal filtering using band stop filter');
Outcome of the practical
Filter circuit design
Knowledge of MATLAB and Simulink software
Function representation in MATLAB
Interpretation skill in signal processing for audio signals
Report: Suggested Headings
Introduction of RC low pass and High pass filter
Experimental section and give description.
Generate the code and take screenshot of the answers.
Copy and paste the generated code in Appendix.
For extra credits: Initialize different frequencies for input signal and noisy signal and evaluate the filtered signal output.
These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction
of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.