Professional Documents
Culture Documents
BY
Team Ques10
Digital Signal Processing
Team Ques10
This book is sold subject to the condition that it shall not, by the way of trade
or otherwise, be lent, resold, hired out, or otherwise circulated without the
publisher's prior written consent in any form of building or cover other than
which it is published and without a similar condition including this condition
being imposed on the subsequent purchaser and without limiting the rights
under copyright reserved above.
This edition is for sale in India only. Sale and purchase of this book outside
of this country is unauthorized by the publisher.
Published by:
Ques10
Shop No. 18, Tapovan Arcade, Nahur (W), Mumbai - 400078.
Email: helpdesk@ques10.com
Website: www.ques10.com
Preface
People say, "Don't judge a book by its cover". But don't we?
But, while studying we do notice that they are not up to the mark. No clear
explanation, tons of mistakes, tough sentences.. you know what we are
talking about. That's why we have made Ques10 books.
We thought what if we can write books which are concise and to-the-point?
That’s pretty much it. We hope you like our books and benefit from them.
Team Ques10
Syllabus
1. Discrete Time Signal
5. DSP Algorithms
V0516th20201
Chapter 1
Discrete Time Signal
Content
Cross Correlation
Discrete Time signals
Circular Convolution
r xh (l) = {487871601712}
rxh(l)={487871601712}
⎡1 2 1 2⎤ ⎡4⎤
⎢ 2 1 2 1⎥ ⎢0⎥
=⎢ ⎥ × ⎢ =[1212212112122121]×[4040]
⎥
⎢1 2 1 2⎥ ⎢4⎥
⎣2 1 2 1⎦ ⎣0⎦
⎡4+0+4+0 ⎤
⎢ 8+0+8+0 ⎥
=⎢ ⎥
=[4+0+4+08+0+8+04+0+4+08+0+8+0]
⎢4+0+4+0 ⎥
⎣8+0+8+0 ⎦
⎡ yp (0) ⎤ ⎡ 8 ⎤
⎢
⎢ yp (1) ⎥⎥=⎢ 16 ⎥
⎢ ⎥ ⎢ [yp(0)yp(1)yp(2)yp(3)]=[816816]
⎥
⎢ p
y (2) ⎥ ⎢ 8 ⎥
⎣ y (3) ⎦ ⎣ 16 ⎦
p
∴ x(n) = {1, 2, 0, 0}
∴x(n)={1,2,0,0}
By Definition,
DF T [x 1 (n)] = X 1 (k) = W × x 1 DFT[x1(n)]=X1(k)=W×x1(n)
(n)
where WW is the Twiddle Factor Matrix for N
= 4N=4
⎡1 1 1 1 ⎤ ⎡1⎤
1 −j −1 j ⎥ ⎢2⎥
∴ X(k) = ⎢⎢ ⎥ × ⎢∴X(k)=[11111−j−1j1−11−11j−1−j]×
⎥
⎢ 1 −1 1 −1 ⎥ ⎢ 0 ⎥
⎣1 j −1 −j ⎦ ⎣ 0 ⎦
⎡ 1+2+0+0 ⎤
1 − 2j + 0 + 0 ⎥
=⎢⎢ ⎥
=[1+2+0+01−2j+0+01−2+0+01+2j+0+0]
⎢ 1−2+0+0 ⎥
⎣ 1 + 2j + 0 + 0 ⎦
⎡ 3 ⎤
1 − 2j ⎥
=⎢⎢ ⎥
=[31−2j−11+2j]
⎢ −1 ⎥
⎣ 1 + 2j ⎦
= {2, 2, 1, 1}
Similarly, h(n) h(n)={2,2,1,1}
⎡1 1 1 1 ⎤ ⎡2⎤
⎢ 1 −j −1 j ⎥ ⎢ 2 ⎥
∴ H(k) = ⎢ ⎥ × ⎢∴H(k)=[11111−j−1j1−11−11j−1−j]×
⎥
⎢ 1 −1 1 −1 ⎥ ⎢ 1 ⎥
⎣1 j −1 −j ⎦ ⎣ 1 ⎦
⎡2+2+1+1 ⎤
⎢ 2 − 2j − 1 + j ⎥
⎢ ⎥
⎢2−2+1−1 ⎥
⎣ 2 + 2j − 1 − j ⎦
[2+2+1+12−2j−1+j2−2+1−12+2j−1−j]=[61−j01+j]
⎡ 6 ⎤
⎢ 1−j ⎥
=⎢ ⎥
⎢ 0 ⎥
⎣1+j ⎦
Hence, H(k) = {6, 1 − j, 0, 1 + H(k)={6,1−j,0,1+j}
j}
Let, y(n) = x(n) ⊗ h(n)y(n)=x(n)⊗h(n)
By Circular Convolution Property of DFT,
∴ Y (k) = X(k)H(k)
∴Y(k)=X(k)H(k)
For
k = 0, Y(0) = X(0)H(0) = 3 × 6 =k=0,Y(0)=X(0)H(0)=3×6=18
18
For
⎡4⎤
=⎢ 5 ⎥
⎣3⎦
x(n) h(n)
⎣ ⎦
Hence, the circular convolution of the sequences x(n)x(n) and h(n)h(n) is
y(n) = {4, 6, 5, 3} y(n)={4,6,5,3}
In matrix form,
[y(n)]5×1 = [x 1 (n)] 5×5 [x 2 (n)][y(n)]5×1=[x1(n)]5×5[x2(n)]5×1
5×1
⎡ 1−2+9+0+0 ⎤
⎢
⎢ ⎥
⎥
=⎢ ⎥
⎡ 1−2+9+0+0 ⎤
⎢ −1 + 2 − 3 + 0 + 0 ⎥
⎢ ⎥
⎢ ⎥
= ⎢ −2 − 2 + 3 + 0 + 0=[1−2+9+0+0−1+2−3+0+0−2−2+3+0+03−4−3+0+0−1+
⎥
⎢
⎢ 3−4−3+0+0 ⎥ ⎥
⎣ −1 + 6 − 6 + 0 + 0 ⎦
⎡ y(0) ⎤ ⎡ 8 ⎤
⎢ y(1) ⎥ ⎢ −2 ⎥
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
∴ ⎢ y(2) ⎥ = ⎢ −1∴[y(0)y(1)y(2)y(3)y(4)]=[8−2−1−4−1]
⎥
⎢ ⎥ ⎢ ⎢ ⎥
⎢ y(3) ⎥ −4 ⎥
⎣ y(4) ⎦ ⎣ −1 ⎦
y(n)=
[2 5 4 3][5]
|3 2 5 4||2|
[2543][5]|3254||2||4325||3|[5432][4]
|4 3 2 5||3|
[5 4 3 2][4]
[10+ 10+ 12+ 12]
[10+ 10+ 12+ 12]
|15+ 4+ 15+ 16|
[10+10+12+12]|15+4+15+16||20+6+6+20|[25+8+9+8]
|20+ 6+ 6+ 20|
[25+ 8+ 9+ 8]
[44]
|50|
= =[44]|50||52|[50]
|52|
[50]
y(n)={44,50,52,50}
X(k) =
[1 1 1 1][2]
|1 −j −1 +j||3|
[1111][2]|1−j−1+j||3||1−11−1||4|[1+j−1−j][5]
|1 −1 1 −1||4|
[1 +j −1 −j][5]
=
14
−2 + 2j
14−2+2j−2−2−2j
−2
−2 − 2j
Calculate DFT of h(n)
H(k) =
[1 1 1 1][5]
|1 −j −1 +j||2|
[1111][5]|1−j−1+j||2||1−11−1||3|[1+j−1−j][4]
|1 −1 1 −1||3|
[1 +j −1 −j][4]
=
14
2 + 2j
142+2j22−2j
2
2 − 2j
We know that convolution in time domain is equivalent to multiplication in
frequency domain
Y(k)=X(k).H(k)
={196,-8,-4,-8}
y(n) =
1
1N*
N
[1 1 1 1][196]
|1 +j −1 −j|| − 8|
[1111][196]|1+j−1−j||−8||1−11−1||−4|[1−j−1+j][−2]
|1 −1 1 −1|| − 4|
[1 −j −1 +j][−2]
1
= 14*
4
176
176
200
176200208200
208
200
y(n)={44,50,52,50}
y(n)={10,19,32,50,34,31,20}
Linear Convolution
IIR-FIR Systems
LTI Digital Filter
i) Static or Dynamic
1 (n) = 1 (2n)– 1 (n − 1)
2 2 2
y1 (n) = x 1 (2n)– x 1 (n − 1)
y2 (n) = x 2 (2n)– x 2 (n − 1)
∴ y1 (n) + y2 (n) = x 1 (2n)– x 1 (n − 1) + x 2 (2n)– x 2 (n −
Replacingx(n)byx 1 (n) + x 2 (n);
y(n) = x 1 (2n) + x 2 (2n)– x 1 (n − 1)– x 2 (n − 1) … … …
from (1) & (2), y(n) = y1 (n) + y2 (n)
y(n)=y1(n)+y2(n)
∴∴ Linear System
iii) Shift invariant or variant
v) Stable or unstable
Ans:
y1 (n) = 2x 1 (n − 1) + x 1 (2n)
y2 (n) = 2x 2 (n − 1) + x 2 (2n)
∴ y1 (n) + y2 (n) = 2x 1 (n − 1) + 2x 2 (n − 1) + x 1 (2n) +
Replacing x(n)byx 1 (n) + x 2 (n);
y(n) = 2x 1 (n − 1) + 2x 2 (n − 1) + x 1 (2n) + x 2 (2n) …
from(1)(2), y(n) = y1 (n) + y2 (n)
∴∴ Linear System
2. Causal or non-causal
∴∴ System is TimeVariant.
4. Static or Dynamic
h(n) = {1, 2, 3, 1}
L+M-1 = 9+4-1 = 12
9.
IIR filter uses current input FIR filter uses only current and past
sample value, past input and input digital samples to obtain a current
10.
output samples to obtain current output sample value. It does not utilize
output sample value. past output samples.
Simple IIR equation is mention
below.,y(n)= b(0)x(n) + Simple FIR equation is mention below.
11. b(1)x(n-1) + b(2)x(n-2) + y(n)= h(0)x(n) + h(1)x(n-1) + h(2)x(n-
b(3)x(n-3) + a(1)y(n-1) + 2) + h(3)x(n-3) + h(4)x(n-4)
a(2)y(n-2) + a(3)y(n-3)
Transfer function of IIR filter
will have both zeros and poles Transfer function of FIR filter will have
12.
and will require less memory only zeros, need more memory
than FIR counterpart
IIR filters are not stable as they FIR filters are preferred due to its linear
are recursive in nature and phase response and also they are non-
feedback is also involved in the
13. process of calculating output recursive. Feedback is not involved in
sample values. FIR, hence they are stable
Types Of Signals
DFT-FFT Graph
k
i.e., if f = f=kN where, k & N both are integers
N
1. X 1 (n) = cos(0.5πn + 0.3) X1(n)=cos(0.5πn+0.3)
ωn = 0.5πn
ωn = 0.5πn ωn=0.5πn∴2πfn=πn2∴f=14
πn
∴ 2πfn =
2
1
∴f=
4
Result: Given signal, X 1X1 (n) is periodic with Fundamental Period, N
=4
−3t
energy signals. Calculate energy/power accordingly:
(i) x(t) = 0.9e −3t u(t)
x(t)=0.9e−3tu(t)
∞
E = ∫ |x(t)| 2 dtE=∫−∞∞|x(t)|2dt
−∞
∞
= ∫ |0.9e −3t u(t)| 2 =∫−∞∞|0.9e−3tu(t)|2dt=0.81∫0∞e−6tdt=0.81[e−6t−6]0∞=0.81/
dt
−∞
∞
= 0.81 ∫ e −6t dt
0
e −6t ∞
= 0.81[ ]
−6 0
= 0.81/6
E = the
Since 0.135J
signal is not periodic hence it’s not a power signal but it is a energy
signal.
1 N
P = |x[n] 2
1 N
P = lim ∑ |x[n] |2
P=limN→∞12N+1∑−NN|x[n]|2=limN→∞12N+1∑−
N→∞ 2N + 1 −N
1 N
= lim ∑ |u[n]|2
N→∞ 2N + 1 −N
1
= lim
N→∞ 2N + 1
N
∑(1)2
0
Since
N
∑(1)2 = 1 + 1 + 1 + ⋯ ∞ = (N +∑0N(1)2=1+1+1+⋯∞=(N+1)P=limN→
1)
0
1
P = lim (N + 1)
N→∞ 2N + 1
1
N(1 + )
= lim N = 0.5W .
N→∞ 1
N(2 + )
N
P = 0.5W
Chap 3 / DFT-FFT Graph
3. For the causal signal x(n) ={2, 2, 4, 4} compute
four point DFT using DIT-FFT.
Result: X(k)={12, -2-12j, 0, -2-2j}
Statement: If
x 1 (n) ← F T → X 1 (ω)and x 2 (n) ← F T → Xx1(n)←FT→X1(ω)and
2 (ω)
then,
a 1 x 1 (n) + a 2 x 2 (n) ← F T → a 1 X 1 (ω) + a 2 Xa1x1(n)+a2x2(n)←FT→
2 (ω)
2. Periodicity
If x(n) ← F T → X(k)
x(n)←FT→X(k)
−jωk
Statement: If
x(n) ← F T → X(ω)then, x(n − k) ← F T → e −jωk X(ω
x(n)←FT→X(ω
Statement: If
x 1 (n) ← F T → X 1 (ω)andx 2 (n) ← F T → Xx1(n)←FT→X1(ω)andx2
2 (ω)
then,
x 1 (n) ∗ x 2 (n) ← F T → X 1 (ω) ∗ X 2x1(n)∗x2(n)←FT→X1(ω)∗X2(ω)
(ω)
Convolution of two signals in time domain is equivalent to multiplication in
frequency domain.
5. Time Reversal
Statement: If
x(n) ← F T → X(ω)then, x(−n) ← F T → X(−ω)
x(n)←FT→X(ω)then,x
DFT-FFT Graph
1 1 2 2
Statement: If
x 1 (n) ← F T → X 1 (ω)and x 2 (n) ← F T → Xx1(n)←FT→X1(ω)and
2 (ω)
then,
a 1 x 1 (n) + a 2 x 2 (n) ← F T → a 1 X 1 (ω) + a 2 Xa1x1(n)+a2x2(n)←FT→
2 (ω)
2. Periodicity
If x(n) ← F T → X(k)
x(n)←FT→X(k)
Statement: If
x(n) ← F T → X(ω)then, x(n − k) ← F T → e −jωk X(ω
x(n)←FT→X(ω
Statement: If
x 1 (n) ← F T → X 1 (ω)andx 2 (n) ← F T → Xx1(n)←FT→X1(ω)andx2
2 (ω)
then,
x 1 (n) ∗ x 2 (n) ← F T → X 1 (ω) ∗ X 2x1(n)∗x2(n)←FT→X1(ω)∗X2(ω)
(ω)
Convolution of two signals in time domain is equivalent to multiplication in
frequency domain.
5. Time Reversal
Statement: If
x(n) ← F T → X(ω)then, x(−n) ← F T → X(−ω)
x(n)←FT→X(ω)then,x
.
.
h(n) = {2, 3, 0, 4, 1, 0, 0, 0, . . . . }
The closer it is to 1(or -1), the stronger the positive(or negative) linear
relationship between the two variables. If it is close to 0, there is no linear
relation.
Example :
Number of cases: n = 10
∑ X = 1813
∑ Y = 761
X2
2
∑ X 2X2= 329069
∑ Y 2Y2 = 59177
∑ XY = 138646
∑ X ∑ Y = 138646
Architecture:
Figure (c) illustrates the next level of sophistication, the Super Harvard
Architecture. This term was coined by Analog Devices to describe the
internal operation of their ADSP-2106x and new ADSP-211xx families of
Digital Signal Processors. These are called SHARC® DSPs, a contraction of
the longer term, Super Harvard ARChitecture. The idea is to build upon the
Harvard architecture by adding features to improve the throughput. While the
SHARC DSPs are optimized in dozens of ways, two areas are important
enough to be included in Fig. 28-4c: an instruction cache, and an I/O
controller.
First, let's look at how the instruction cache improves the performance of the
Harvard architecture. A handicap of the basic Harvard design is that the data
memory bus is busier than the program memory bus. When two numbers are
multiplied, two binary values (the numbers) must be passed over the data
memory bus, while only one binary value (the program instruction) is passed
over the program memory bus. To improve upon this situation, we start by
relocating part of the "data" to program memory. For instance, we might
place the filter coefficients in program memory, while keeping the input
signal in data memory. (This relocated data is called "secondary data" in the
illustration). At first glance, this doesn't seem to help the situation; now we
must transfer one value over the data memory bus (the input signal sample),
but two values over the program memory bus (the program instruction and
the coefficient). In fact, if we were executing random instructions, this
situation would be no better at all.
DSPs dominate the area of waveform, speech, and image coding. They are
extremely suitable processors to implement filters, transforms, and many
other signal-processing tasks. More importantly, they are flexible. When a
more efficient coding scheme is discovered or a new coding standard is
issued, DSPs can be used immediately for implementation.
Congratulations! you've done it.
Hope you found this book useful. We'd love to hear your comments. Just
send them over to helpdesk@ques10.com .
Answer:
— Found repeated in "+ paper_year + " • "+ lesson_no +" • "+ seq_num
+"