Lab #1
Lab #1
LAB 01
Introduction to Signal Analysis and Continuous Time Fourier Transform using
Matlab
Objective:
In today’s Lab we will take a continuous time signal and use “fft” to estimate its continuous time frequency
transform.
Commands to be used:
• plot • imag • linspace
• real • fft • sin/cos
• exp • fftshift
Help on these commands is available in MATLAB help directory.
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. In order to generate a continuous time signal we require a fundamental frequency fn and a simulated
frequency fs.
4. Firstly, take a continuous time sinusoidal with fundamental frequency of fn=50 Hz & a simulated
sampling frequency of fs=1000Hz.
2𝜋𝑓𝑛
𝑥(𝑡) = cos( 𝑡)
𝑓𝑠
5. Let “t” be an integer index.
6. In order to analyze its frequency spectrum using “fft” following step needs to be taken.
a. Generate a variable “N” indicating the size of frequency components let it be 1200.
b. Now calculate the Fourier transform using “fft”, and use “fftshift” to make the spectrum
centered.
7. Use “linspace” to generate Ω-axis.
8. Now by varying the variable “t” & “fn” analyze the changes in the spectrum. As the spectrum is a
complex entity used magnitude, phase, real, and imaginary properties to conclude proper analysis.
Task II
9. Now generate a nonstationary signal as given below and compare the results with a stationary one.
𝑁𝑜𝑛𝑠𝑡𝑎𝑡𝑖𝑜𝑛𝑎𝑟𝑦𝑆𝑖𝑔𝑛𝑎𝑙:
2𝜋(100) 2𝜋(65)
𝑤(𝑡) = cos ( 𝑡) 𝑢(𝑡 − 10) + cos( 𝑡) 𝑢(−𝑡 + 2)
𝑓𝑠 𝑓𝑠
𝑆𝑡𝑎𝑡𝑖𝑜𝑛𝑎𝑟𝑦𝑆𝑖𝑔𝑛𝑎𝑙:
2𝜋(100) 2𝜋(65)
𝑦(𝑡) = cos ( 𝑡) + cos ( 𝑡)
𝑓𝑠 𝑓𝑠
Questions:
1. Provide your analysis for the change in frequency fn.
2. What is meant by the terms frequency resolution and time resolution.
3. Do you think Fourier Transform provides all required information for stationary and
nonstationary signals?