Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Electrical & Computer Engineering Department Nauman Tareen

LAB 03 & 04
Sampling of a Continuous Time Signal, its Frequency Analysis & Reconstruction
Objective:
In today’s Lab we will take a continuous time signal and sample it out with a fixed sampling time period
and analyze its frequency response at each point.
Commands to be used:

Help on these commands is available in MATLAB help directory.

• plot • imag • diff


• real • tf2zp • sin/cos
• exp • freqz • hold on/off

Procedure:
1. Open M-file or M-Book
2. Save it by any useful name but remember not to start the name by any numeric digit, do not use any
special character other than under-the-score ( _ ) and also remember not to give any space in the
name.

Task I
3. Firstly, take a continuous time sinusoidal with a cutoff frequency of 35 Hz. Analyze its frequency
spectrum using fft.
4. Generate a square wave of frequency 70 Hz.
5. Analyze its frequency spectrum using fft.
6. Take its absolute derivative which would result in impulses thus generating impulse-train, followed
by step 5.
7. Now multiply the impulse train with the sinusoidal & repeat step 5.
8. The resultant is a discrete signal if zeros are terminated using a particular algorithm.
9. Once again repeat step 5.
10. Now generate a square wave with frequency 200Hz and 35Hz and repeat step 5 to 9 for both the
frequencies.
Task II
11. Generate a sinusoidal of two different frequencies (Continuous time).
12. Take its samples after every 10 units, later keep on changing these frequency rates and analyze the
effect on reconstruction.
13. Now multiply sinc with each sample and step by step add and multiply to reconstruct the original
signal.
Questions:
1. Provide your analysis for the changed frequency of Impulse train.
2. Explain if you observe under, over sampling.
3. Also use con2dis demo and provide detailed information on aliasing process. (The
con2dis demo is available on portal)
4. 𝑥(𝑡) = sin(2𝜋𝑓1 𝑡) + sin(2𝜋𝑓2 𝑡) ; 𝑡𝑎𝑘𝑒 𝑓1 & 𝑓2 𝑜𝑓 𝑦𝑜𝑢𝑟 𝑜𝑤𝑛 𝑐ℎ𝑜𝑖𝑐𝑒
5. Provide a full analysis of reconstruction process and effect different sampling rates on
reconstruction using your MATLAB outputs.

Page |1 COMSATS University Islamabad, Abbottabad Campus

You might also like