Module 4-Lab-4
Module 4-Lab-4
1
[Introduction to matlab programming]
2. to study the MATLAB Blocks required to create the model for filters
Low Pass Filter
3. to use plot to plot the filtered output of wireless signals
Introduction
𝑅
From the previous lecture, for LPF:
𝑓 𝑉
𝑋
𝑉 𝑉
𝑋𝑐 𝑅
So,
𝑉 𝑋
𝑉 𝑋 𝑅
Where,
Course Module
1 1
𝑋
𝑗2𝜋𝑓𝐶 𝑗𝜔𝐶
In Matlab we represent 𝑗𝜔 𝑠
So,
𝑉 𝑗𝜔
𝑉 𝑗𝜔 𝑅
Which is,
𝑉 𝑠 𝑠𝐶
𝑉 𝑠 𝑅 𝑠𝐶
1
1 𝑠𝑅𝐶
Where,
𝑅𝐶is the time constant 𝑇
So, the transfer function of the LPF is:
𝑅 𝑉
Where,
1 1
𝑋
𝑗2𝜋𝑓𝐶 𝑗𝜔𝐶
In Matlab we represent 𝑗𝜔 𝑠
So,
𝑉 𝑗𝜔 𝑅
𝑉 𝑗𝜔 𝑅
[MECH662-matlab]
3
[Introduction to matlab programming]
Which is,
𝑉 𝑠 𝑅 𝑠𝐶
𝑉 𝑠 .𝑅 𝑠𝐶
𝑠𝑅𝐶
1 𝑠𝑅𝐶
Where,
𝑅𝐶is the time constant 𝑇
So, the transfer function of the HPF is:
𝑉 𝑠 𝑇𝑠
𝑉 𝑠 1 𝑇𝑠
4- Save as “LAB2”
5- Go to “Simulink” >>“Sources” and add “Sine Wave”
Course Module
6- Go to “Simulink” >>“Sinks” and add “Scope”
12- Go to “DSP SystemBlockset” >>“DSP System Sinks” and add “Spectrum Scope”TWICE!
13- Double click on “Spectrum Scope” and double check the following parameters
Course Module
14- Go to “Simulink” >> “Discrete” and add “Zero-Order Hold”TWICE!
15- Double click on “Zero-Oder Hold” and check the parameter as shown below
17- Connect the design as shown below, make sure the Simulation End Time = 5e-3 and rename
“Spectrum Scope” and “Transfer Fcn” as shown below.
18- Copy “Low_Pass_Filter”, “Zero-Order Hold” and “After_LPF” then paste them TWICE!
19- Connect them as shown below
Course Module
20- Make sure you save your design and keep it safe for future work.
21- Double click on Low_Pass_Filter and edit the time constant (T) as shown below
<Exercises >
1) Construct a signals with varied values of transfer functions.
Course Module