Digital Signal and Image Processing
Digital Signal and Image Processing
Lecture-1
Overview
• Signal
• Continuous or analog signals
• Discrete-time signals
• Causal signals
• Deterministic and Random signals
• Digital Functions (Impulse, Step, Ramp, Power, Exponential, Sine)
• Notation for Digital Signals
• Composite Functions
• Linear, Time-Invariant (LTI), Causal Systems
Signal
• A signal is a physical quantity, or quality, which conveys
information
• The variation of the signal value as a function of the
independent variable is called a waveform
• The independent variable often represents time
• We define a signal as a function of one independent variable
that contains information about the behavior or nature of a
phenomenon
• We assume that the independent variable is time even in
cases where the independent variable is a physical quantity
other than time
Continuous or Analog Signals
• Continuous signal is a signal that exists at every instant of time
• The instant when the signal begins is called the starting time
12
Unit Impulse Function
Answers
a) δ[0] = 1
b) δ[3] = 0
c) δ[-2] = 0
Scaled Unit Impulse Function
x[n] = 4δ[n]
Scaled Unit Impulse Function
x[n] = -2δ[n]
Shifted Unit Impulse Function
a) x[n] = δ[n - 2]
b) x[n] = δ[n + 2]
Shifted Unit Impulse Function
x[n] = δ[n - 3]
Unit Impulse Function
Example: write a function to describe the signal in the figure.
20
Unit Impulse Function
Example: write a function to describe the signal in the figure.
21
Unit Impulse Function
1, k = 0
k =
0, k 0
Matlab Code
Unit impulse sequence
k1 = -5;
k2 = 10; 1
k = k1:k2;
0.8
x = (k==0); k
0.6
stem(k, x) 0.4
xlabel('k') 0.2
ylabel('\delta_k')
title('Unit impulse sequence') 0
axis([k1 k2 -0.1 1.1]) -5 0 5 10
k
Unit Step Function
The unit step function u[n] has an amplitude of zero for n < 0
and an amplitude of one for all other samples.
The signal u[-n] has the value one up to and including n = 0, and
the value zero thereafter.
Unit Step Function
Answers
a) u[-1] = 0
b) u[0] = 1
c) u[1] = 1
Scaled Unit Step Function
Example: Draw the signal x[n] = u[n - 2], and x[n] = u[n + 2]
Unit Step Function
Answer
Substituting n = (n – 3) gives
1, k 0
uk =
0, k 0
Matlab Code
Unit step sequence
k1 = -5;
1
k2 = 10;
k = k1:k2; 0.8
x = (k>=0); 0.6
uk
stem(k, x) 0.4
xlabel('k') 0.2
ylabel('u_k')
0
title('Unit step sequence')
axis([k1 k2 -0.1 1.1]) -5 0 5 10
k
Connection b/w Impulse and Step Functions
𝒖 𝒏 = 𝜹 𝒏−𝒎
𝒎=𝟎
35
Connection b/w Impulse and Step Functions
37
Power Function
• Power functions take the form:
x[n] = Aα βn
• In the special case where α = e, such functions are called
exponential functions.
• When β is positive, the function grows.
• When β is negative the function decays.
• When α is negative, the signal samples alternate positive and
negative.
• The value of A is determine the magnitude/amplitude/value
of the function when n = 0
38
Power Function
• Example: Draw a signal x[n] = (-0.6)n
39
Power Function
xe, k = X e a k
Matlab Code
xe,k = Xe ak
Xe = 0.8;
0.8
a = 0.75;
k1 = 0; 0.6
k2 = 10;
k = k1:k2; xe
0.4
x = Xe*a.^k;
0.2
stem(k, x)
xlabel('k')
ylabel('x_e') 0
0 2 4 6 8 10
title('x_{e,k} = X_e a^k') k
Exponential Function
• Exponential functions take the form:
x[n] = Ae βn
• Where e = 2.71828
• When β is positive, the function grows.
• When β is negative the function decays.
• The value of A is determine the magnitude/amplitude/value
of the function when n = 0
41
Exponential Function
• Example: Draw a signal x[n] = e-0.5n
42
Complex Exponential Function
• A digital signal of the form
x[n] = Aejβn
44
Complex Exponential Function
Example: plot the first eight samples of the digital signal
x[n] = e-jπn/6
x[n] = e-jπn/6
Using the Euler’s identity
𝜋𝑛 𝜋𝑛
𝑥 𝑛 = cos + 𝑗 sin
6 6
45
Notation for Digital Signals
• A stream of digital codes is presented to a digital signal processor
for processing.
• The integer n marks the number of the sample, taken at the time t
= nTS, where TS is the sampling interval.
46
Notation for Digital Signals
• A digital signal x[n] may be modified by time shifts and
resampling.
For Example
• Signal x[n-2], shifts x[n] two steps to the right
• Signal x[n+3], shifts x[n] three steps to the left
• Signal x[2n], selects every other sample from x[n]
• Signal x[3n], selects every third sample
47
Notation for Digital Signals
Example: Find the Following:
a) x[0] = 0.25
b) x[5] = 0.5
48
Notation for Digital Signals
Example: Find the Following:
a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
49
Notation for Digital Signals
Example: Find the Following:
a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]
50
Notation for Digital Signals
Example: Find the Following:
a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]
e) x[2n]
51
Notation for Digital Signals
Example: Find the Following:
a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]
e) x[2n]
f) x[3n]
52
Composite Functions
• They are the combinations of basic functions.
53
Composite Functions
Example: Draw a signal x[n] = u[n]u[3-n]
𝒙 𝒏 = 𝜹 𝒏 + 𝜹 𝒏 − 𝟏 + 𝜹 𝒏 − 𝟐 + 𝜹[𝒏 − 𝟑]
54
Composite Functions
Example: Draw a signal x[n] = e-2nu[n]
• First draw two basic signals (e-2n, u[n]) and then multiply as shown in the figure.
• The u[n] has the effect of turning on the other function at n = 0.
• The u[n] is zero for n < 0, so x[n] is also for n < 0.
• The u[n] has a value of 1 for n ≥ 0, so x[n] is the same as e-2n for n ≥ 0.
55
Linear System
56
Linear System
57
Linear System
58
Linear System
59
Linear System
H.W.
60