1. Digital Signal Processing
Lecture 1 Contents (Signals)
Follows Section 2.1 of the textbook (Proakis and
Manolakis, 4th ed.).
By
Dr. Muhammad Imran Farid
2. • What is a signal? What is a system?
• Continuous time vs. discrete time (analog vs. digital)
• Signal transformations
• Flipping/time reversal
• Scaling
• Shifting
• Combining transformations; order of operations
• Signal properties
• Even and odd
• Decomposing a signal into even and odd parts (with Matlab demo)
Lecture 1 Contents
3. • Periodicity
• Special signals
• The delta function
• The unit step function
• The relationship between the delta and step functions
• Decomposing a signal into delta functions
• The sampling property of delta functions
• Complex number review (magnitude, phase, Euler's formula)
• Real sinusoids (amplitude, frequency, phase)
• Real exponential signals
• Complex exponential signals
Lecture 1 Contents
11. % code for even and odd in DSP Lecture 1
clear all;
close all;
clc;
x = rand(1,9) - 0.5;
figure(1), stem(x,'LineWidth',2);
% to make the middle value zero
figure(2), stem(-4:4, x,'LineWidth',2);
% flip version of x
negx = fliplr(x); % flip left to right
figure(3), stem(-4:4, negx,'LineWidth',2);
% even and odd part of x
evx = (x + negx)/2;
odx = (x - negx)/2;
figure(4), stem(-4:4, evx,'LineWidth',2);
figure(5), stem(-4:4, odx,'LineWidth',2);
% verify whether we get beck original signal from even odd or nor ?
q = evx + odx;
figure(6), stem(-4:4, q,'LineWidth',2);
16. • For every value of k of delta, we are multiplying it with the corresponding values of X and add them all
up to get X[n]
• We use it a lot in convolution etc….
17. • Lets say we have a signal as a function of
k
• We can pick up any value of signal using delta function
24. Real envelope on
top of sinusoid
Not periodic (because amplitude change) but a sense of
periodicity inside the envelope
• If r < 0 it’s the decreasing envelope
• If r = 0 we don’t have envelope and it’s the regular sine and cosine
• If r > 0 it’s the increasing envelope
26. • In a similar way in discrete time signal
• If 𝛽 < 0 it’s the decreasing envelope
• If 𝛽 = 0 we don’t have envelope and it’s the regular sine and cosine
• If 𝛽 > 0 it’s the increasing envelope
𝛽 < 0
27.
28. • If we add 2𝜋 in any frequency, we ends up getting the same frequency
• Means there is no infinitely high frequencies in discrete time world
29. The lowest frequency one can get in
discrete world is one
• The highest frequency one can get
in discrete world is the back and
forth as quickly as possible
• This is the as fast digitally we can
go
31. • We need to be careful to determine whether a signal is periodic in the discrete world.
• Cosine is periodic but that is not always true in discrete world
Period looks like this
32. EXAMPLE:
for N to be an integer we must
have k = 2 for N to be 5
This will never be an integer
33. % code for even and odd in DSP Lecture 1
clear all;
close all;
clc;
n = -10:10;
x = cos(4*pi/5*n);
figure(1), stem(x,'LineWidth',2);
%non periodic example
x = cos(7*n);
figure(2), stem(x,'LineWidth',2);
• So we need to be very careful about very particular cosine that are periodic in discrete time world
• We will talk a lot about it in when Insha'Allah we will cover Fourier Series and Fourier Transform