0% found this document useful (0 votes)
196 views

Digital Signal Processing Lab 2

The document provides instructions for a digital signal processing lab assignment. Students are asked to: 1) Write MATLAB programs to generate and plot deterministic signals including sine, square and sawtooth waves. They also generate a Fourier series representation of a periodic signal. 2) Create MATLAB programs to generate and examine random signals including a random Gaussian noise signal and a sinusoid with added noise. 3) Analyze and report properties of the generated signals including amplitude, frequency, period, and duty cycle.

Uploaded by

Muhammad Adib
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
196 views

Digital Signal Processing Lab 2

The document provides instructions for a digital signal processing lab assignment. Students are asked to: 1) Write MATLAB programs to generate and plot deterministic signals including sine, square and sawtooth waves. They also generate a Fourier series representation of a periodic signal. 2) Create MATLAB programs to generate and examine random signals including a random Gaussian noise signal and a sinusoid with added noise. 3) Analyze and report properties of the generated signals including amplitude, frequency, period, and duty cycle.

Uploaded by

Muhammad Adib
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Kulliyyah of Engineering, IIUM Department of Electrical and Electronics Engineering

Digital Signal Processing Lab Semester II, Due Date: March 12, 2014
Lab 2. Random and Deterministic Signals Introduction: In this lab session, we will familiarize ourselves with basics of MATLAB. We will write MATLAB programs to generate deterministic and random signals. We will also write programs to plot various graphs that will illustrate Fourier series theory. Procedure: 1. To run MATLAB go to Start >> Programs >> MATLAB. Click the left button of the mouse on icon MATLAB.

2. Create a directory called DSP lab 2. Make this directory the current Directory of MATLAB. To perform this step click on the icon and browse to the DSP lab 2 directory. Save all your MATLAB files in this directory. I. Deterministic Signals I.I Sinusoidal Signals 3. Write the following program to plot a sine wave. Save this program and name it as sine_wave.m. Run this program. ( Hint: Use sin MATLAB command.) Q1) Determine the amplitude, phase, period, sampling frequency, circular frequency (Hz), and angular frequency (rad/sec) of the sine wave. I.II Fourier Series Fourier series theory states that a periodic wave can be represented as a summation of sinusoidal waves with different frequencies, amplitudes and phase values. 4. Write a program that plots the signal s(t). Name this program as sine_wave_1.m.
N

s (t ) =
n =1

sin(2 nt ) n

where n = 1, 3, 5, 7, 9

and N = 9

or

s (t ) = sin(2t ) +

sin(6t ) sin(10t ) sin(14t ) sin(18t ) + + + 3 5 7 9

5.

Write a program that plots the signal s(t) in step 2 but with N = 100. Name this program as sine_wave_2.m

Q2) What do you conclude from steps 4 & 5? I.III Other Signals
6. Plot the discrete signal x = [0, 1, 3, 1, -2, 0, 2, 0, 1, 4]. Name this program as Discrete_1.m. (Hint: Use stem MATLAB command) 7. Write the following program to plot a discrete-time square wave. Name this program as square_wave.m. (Hint: Use square MATLAB command)

Q3) Determine the sampling frequency, circular frequency (Hz), relative frequency, period, and duty cycle of the square wave signal.
8. Write a program that plots a discrete time sawtooth signal. Name this program as sawtooth_wave.m. (Hint: use sawtooth MATLAB command)

II. Random Signals


9. A normally distributed random signal of length N can be generated using the MATLAB command randn(1,N). Write the following MATLAB program that generates a normally distributed random signal of length 100 samples. Name this program as randn_wave.m. 10. Write the following Matlab program to generate noisy sinusoidal wave. Name this program as noisy_sine_wave.m.

You might also like