You are on page 1of 53

Digital Signal Processing

BY

Team Ques10
Digital Signal Processing
Team Ques10

Copyright © by Ques10. All rights reserved. No part of this publication may


be reproduced, copied, or stored in a retrieval system, distributed or
transmitted in any form or by any means, including photocopy, recording or
other electronic or mechanical methods without the prior written permission
of the publisher.

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.

Edition: May 2020

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?

As engineering students, we are master procrastinators. We only want to


study stuff that is absolutely necessary.

So just days before the exams, when no-head-no-tail-heavy-weight reference


books stop making any sense, we start looking for something which does. We
run to the nearest bookstore and buy whatever everyone else has.

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?

So we approached academically proficient faculties who have been teaching


for years and asked them to write decent books. And we're proud of what
we've come out with.

It needs to be mentioned that many have helped us unconditionally along the


way. We can't name them all here because that'd be a really long list. We
thank them for their support. We also thank those who have dedicatedly
mailed us for their priceless comments and reviews.

That’s pretty much it. We hope you like our books and benefit from them.

Team Ques10
Syllabus
1. Discrete Time Signal

Introduction to Digital Signal Processing, Discrete Time Signals,


Sampling and Reconstruction, Standard DT Signals, Concept of Digital
Frequency, Representation of DT signal using Standard DT Signals,
Signal Manipulations(shifting, addition, subtraction, multiplication),
Classification of Signals, Linear Convolution formulation(without
mathematical proof), Circular Convolution formulation(without
mathematical proof), Matrix Representation of Circular Convolution,
Linear by Circular Convolution. Auto and Cross Correlation formula
evaluation,

2. Discrete Time System

Introduction to Discrete Time System, Classification of DT Systems


(Linear/Non Linear, Causal/Non Causal, Time Invariant/Time Variant
Systems, Stable/ Unstable), BIBO Time Domain Stability Criteria. LTI
system, Concept of Impulse Response and Step Response.
Concept of IIR System and FIR System, Output of IIR and FIR DT
system using Time Domain Linear Convolution formula Method.

3. Discrete Fourier Transform

Introduction to DTFT, DFT, Relation between DFT and DTFT,


Properties of DFT without mathematical proof (Scaling and Linearity,
Periodicity, Time Shift and Frequency Shift, Time Reversal,
Convolution Property and Parsevals’ Energy Theorem). DFT
computation using DFT properties.
Transfer function of DT System in frequency domain using DFT. Linear
and Circular Convolution using DFT. Response of FIR system
calculation in frequency domain using DFT.

4. Fast Fourier Transform


Radix-2 DIT-FFT algorithm, DIT-FFT Flowgraph for N=4, 6 & 8,
Inverse FFT algorithm. Spectral Analysis using FFT, Comparison of
complex and real, multiplication and additions of DFT and FFT.

5. DSP Algorithms

Carls’ Correlation Coefficient Algorithm, Fast Circular Convolution


Algorithm, Fast Linear Convolution Algorithm, Linear FIR filtering
using Fast Overlap Add Algorithm and Fast Overlap Save Algorithm,

6. DSP Processors and Application of DSP

Need for Special architecture of DSP processor, Difference between


DSP processor & microprocessor, A general DSP processor
TMS320C54XX series, Case study of Real Time DSP applications to
Speech Signal Processing and Biomedical Signal Processing.

V0516th20201
Chapter 1
Discrete Time Signal
Content

Cross Correlation
Discrete Time signals
Circular Convolution

Chap 1 / Cross Correlation


1. For the given causal sequences x(n) = { 8, 9, 2, 3}
and h(n) ={ 4, 3, 6} find the cross correlation.
Formula: Cross correlation of x(l) & y(l),

r xy (l) = ∑ x(l)y(l − rxy(l)=∑−∞∞x(l)y(l−k)


k)
−∞

r xh (l) = {487871601712}
rxh(l)={487871601712}

Result: Cross Correlation of the sequences x(n) & h(n) is,


Chap 1 / Cross Correlation
2. Find the cross correlation of the sequences x(n) =
{1, 2, 3, 4 } and h(n) = {2, 4, 6 }
To find : rxh(l) = ?

Formula: Cross correlation of x(l) & y(l),


r xy (l) = ∑ x(l)y(l − rxy(l)=∑−∞∞x(l)y(l−k)


k)
−∞

r xh (l) = 6162840228 rxh(l)=6162840228 … by


Tabular Method

Result: Cross Correlation of the sequences x(n) & y(n) is,

Chap 1 / Circular Convolution


3. Find the circular convolution of the sequences
x(n) = {1, 2, 1, 2}
x(n) = {1, 2, 1, 2}x(n)={1,2,1,2} and
h(n) = {4, 0, 4, 0}h(n)={4,0,4,0}
In matrix form,

[yp (n)] 4×1 = [x p (n)] 4×4 [h p (n)][yp(n)]4×1=[xp(n)]4×4[hp(n)]4×1


4×1

⎡ yp (0) ⎤ ⎡ x p (0) x p (3) x p (2) x p (1) ⎤ ⎡ h p



⎢ yp (1) ⎥⎥=⎢ ⎢ x p (1) x p (0) x p (3) x p (2) ⎥ ⎥×⎢ ⎢ h[yp(0)yp(1)yp(2
p

⎢ yp (2) ⎥⎥ ⎢ ⎢ x p (2) x p (1) x p (0) x p (3) ⎥ ⎥ ⎢ ⎢ hp
⎣ y (3) ⎦ ⎣ x (3) x (2) x (1) x (0) ⎦ ⎣ h
p p p p p p

⎡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

Chap 1 / Circular Convolution


4. Compute the circular convolution of the
sequence using DFT and IDFT, x1(n)={1, 2, 0} and
x2(n)={2,2,1,1}.
Let N = 4N=4
We make the length of x(n)x(n) and h(n)h(n) equal to 4 byby zero
padding.

∴ 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 ⎦

X(k) = {3, 1 − 2j, −1, 1 + 2j}


Hence, X(k) = {3, 1 − 2j, −1, 1 + 2j}
X(k)={3,1−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,

DF T [y(n)] = DF T [x(n) ⊗ h(n)]


DFT [y(n)]=DFT[x(n)⊗h(n)]

∴ 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

k = 1, Y(1) = X(1)H(1) = (1 − 2j)(1 − j) = −1 − 3j


k = 1, Y(1) = X(1)H(1) = (1 − 2j)(1 − j) = −1k=1,Y(1)=X(1)H(1
− 3j
For
k = 2, Y(2) = X(2)H(2) = (−1) × 0k=2,Y(2)=X(2)H(2)=(−1)×0=0
=0
For
k = 3, Y(3) = X(3)H(3) = (1 + 2j)(1 + j) = −1k=3,Y(3)=X(3)H(3
+ 3j
Hence, Y (k) = {18, −1 − 3j, 0, −1 + Y(k)={18,−1−3j,0,−1+3j}
3j}
By Definition,
IDF T [Y (k)] = y(n) = N1 W ∗ × YIDFT (k) [Y(k)]=y(n)=1NW∗×Y(k)
⎡1 1 1 1 ⎤ ⎡ 18 ⎤
1 ⎢
1 j −1 −j ⎥ ⎢ −1 − 3j ⎥
∴ y(n) = 4 ⎢ ⎥×⎢ ⎥
∴y(n)=14[11111j−1−j1−1
⎢ 1 −1 1 −1 ⎥ ⎢ 0 ⎥
⎣ 1 −j −1 j ⎦ ⎣ −1 + 3j ⎦
⎡ 18 + (−1 − 3j) + 0 + (−1 + 3j) ⎤
1 ⎢
18 + j(−1 − 3j) − 0 − j(−1 + 3j) ⎥
= 4⎢ ⎢ ⎥
=14[18+(−1−3j)+0+(−1+3j)18+j(−
⎢ 18 − (−1 − 3j) + 0 − (−1 + 3j) ⎥ ⎥
⎣ 18 − j(−1 − 3j) − 0 + j(−1 + 3j) ⎦
⎡ 16 ⎤
1 ⎢ 24 ⎥
= ⎢ ⎥
4 ⎢ 20 ⎥
⎣ 12 ⎦
=14[16242012]=[453]

⎡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}

Chap 1 / Circular Convolution


5. Find the circular convolution of the two finite
duration sequences
x1(n) = {1, −1, −2, 3, −1} x2(n) = {1,
Let period of x 1 (n)x1(n) and x 2 (n)x2(n) be 5

x 1 (n) = {1, −1, −2, 3, −1} and x 2 (n) = {1, 2, 30, 0}


x1(n)={1,−1,−2,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

⎡ y(0) ⎤ ⎡ x 1 (0) x 1 (4) x 1 (3) x 1 (2) x 1 (1) ⎤


⎢ y(1) ⎥ ⎢ x 1 (1) x 1 (0) x 1 (4) x 1 (3) x 1 (2) ⎥
⎢ ⎥ ⎢ ⎥
⎢ y(2) ⎥ = ⎢ x 1 (2) x 1 (1) x 1 (0) x 1 (4) x 1 (3) ⎥

⎢ ⎥ ⎥
⎢ ⎥ ⎢ ⎥
⎢ y(3) ⎥ ⎢ x 1 (3) x 1 (2) x 1 (1) x 1 (0) x 1 (4) ⎥
⎣ y(4) ⎦ ⎣ x 1 (4) x 1 (3) x 1 (2) x 1 (1) x 1 (0) ⎦
⎡ 1 −1 3 −2 −1 ⎤ ⎡ 1 ⎤
⎢ −1 1 −1 3 −2 ⎥ ⎢ 2 ⎥
⎢ ⎥ ⎢ ⎥
=⎢ ⎢ −2 −1 1 −1 3 ⎥ ⎥×⎢ ⎢ 3⎥⎥
=[1−13−2−1−11−13−2−2−11−133−2−

⎢ 3 ⎥ ⎢ ⎥
−2 −1 1 −1 ⎥ ⎢ 0 ⎥
⎣ −1 3 −2 −1 1 ⎦ ⎣ 0 ⎦

⎡ 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 ⎦

Chap 1 / Circular Convolution


6. If x(n)={2,3,4,5}and h(n)={5,2,3,4} i) Find
circular convolution by time-domain method ii)
Find circular convolution by frequency domain
method. iii) Determine linear convolution
Given x(n)={2,3,4,5}and h(n)={5,2,3,4}

i) By time domain method

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}

ii) By frequency domain method

Calculate DFT of x(n)

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}

Now calculate IDFT , to get y(n)

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}

iii) Linear Convolution

y(n)={10,19,32,50,34,31,20}

Chap 1 / Circular Convolution


7. Find circular convolution of x1(n) ={5, 6, 2, 1}
and x2(n)= {3, 2, 1, 4} by computing DFT of
x 1(n)x1(n) and x 2(n)x2(n).
By Convolution Theorem:

Convolution of two signals in time domain is equivalent to multiplication in


frequency domain.

x 1 (n) ∗ x 2 (n) ← F T → X 1 (k). X 2x1(n)∗x2(n)←FT→X1(k).X2(k)


(k)

X 1 (k) X 2 (k) 1 (n)


2
where, X 1 (k)X1(k) & X 2 (k)X2(k) are DFTs of x 1 (n)x1(n) &.
x 2 (n)x2(n) respectively.

X 1 (k)X1(k) ={14, 3-5j, 0, 3+5j}

X 2 (k)X2(k) = {10, 2+2j, -2, 2-2j}


x 1 (n) ∗ x 2 (n) ≡ X 1 (k). X 2 (k)
x1(n)∗x2(n)≡X1(k).X2(k) = {14, 3-5j,
0, 3+5j}.{10, 2+2j, -2, 2-2j}

y(n) = x 1 (n) ∗ x 2 (n)


y(n)=x1(n)∗x2(n) = {140, 16-4j, 0, 16+4j}

Result: y(n) ={140, 16-4j, 0, 16+4j}


Chapter 2
Discrete Time System
Content

Linear Convolution
IIR-FIR Systems
LTI Digital Filter

Chap 2 / Linear Convolution


1. Check whether the given system
y(n) = x(2n) – x(n-1) is -

i) Static or Dynamic

In y(n) = x(2n) – x(n-1) ,

2n indicates past(for negative n) or future(for positive n) signal;

Also, n-1 indicates signal in past

Hence, the given system is dynamic.

ii) Linear or non-linear

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

y(n) = x(2n)– x(n − 1) y(n)=x(2n)–x(n−1


∴ y(n, k) = x(2n − k)– x(n − 1 − k) … . . . . . . (1)
y(n − k) = x(2(n − k))– x(n − k − 1)
i. e. , y(n − k) = x(2n − 2k)– x(n − k − 1) … . . . . . (2)
from(1)(2), y(n, k) ≠ y(n − k)
∴∴ System is Shift Variant.
iv) Causal or non-causal

2n indicates future signal for positive n,

Hence, the given system is Non-Causal.

v) Stable or unstable

y(n) = x(2n) – x(n-1) provides Bounded output for bounded input,

Hence, the system is Stable.

Chap 2 / Linear Convolution


2. Check whether following system
y(n) = 2x(n − 1) + x(2n) y(n)=2x(n−1)+x(2n) is:

1. Linear or non linear:

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

Ans: the terms 2x(n-1)&x(2n) both indicate signals in future,

Thus, System is Non-Causal.

3. Time variant or Time invariant

Ans: y(n) = 2x(n-1) + x(2n)

∴∴, Delaying input by k units;


y(n,k) = 2x(n-1-k) + x(2n-k) …. . . . .. (1)

& replacing n by n-1;

y(n-k) = 2x(n-k-1) + x(2(n-k))

i.e., y(n-k) = 2x(n-1-k) + x(2n-2k)… . . ... (2)


from (1) & (2), y(n,k) ¹ y(n-k)

∴∴ System is TimeVariant.
4. Static or Dynamic

Ans: the terms 2x(n-1)&x(2n) both indicate signals in future/past,

Thus, System is Dynamic.

Chap 2 / Linear Convolution


3. Compute Linear convolution of causal x(n) and
h(n) using overlap add method in time domain X(n)
= {1, 2, 3, 4, 5, 6, 7, 8 }, h(n) = {1, 1, 1 }
x(n) = 1, 2, 3, 4, 5, 6, 7, 8 h(n) = 1, 1, 1 ∴, h(n) = 1, 1
= 1, 2, 0, 0 x 2 (n) = 3, 4, 0, 0 x 3 (n) = 5, 6, 0, 0 x 4 (n) =
⊗ h 1 (n)
![enter image description here][1] ∴, y1∴,y1(n) = {1, 2, 3, 2}
y2 (n) = x 2 (n) ⊗ h 2 (n) y2(n)=x2(n)⊗h2(n) ![enter image description
here][2] ∴, y2 (n)∴,y2(n) = {3, 7, 7, 4}
y3 (n) = x 3 (n) ⊗ h 3 (n) y3(n)=x3(n)⊗h3(n) ![enter image description
here][3] ∴, y3 (n)∴,y3(n) = {5, 11, 11, 6}
y4 (n) = x 4 (n) ⊗ h 4 (n) y4(n)=x4(n)⊗h4(n) ![enter image description
here][4] ∴, y4 (n)∴,y4(n) = {7, 15, 15, 8}
Result: y(n) = {1, 3, 6, 9, 12, 15, 18, 21, 15, 8}

Chap 2 / Linear Convolution


4. Compute Linear Convolution of causal sequence
x(n)={7, 6, 4, 5, 2, 4, 5, 2, 3} and h(n)={1 2 3 1} using
fast overlap save method.
x(n) = {7, 6, 4, 5, 2, 4, 5, 2, 3}

h(n) = {1, 2, 3, 1}

L+M-1 = 9+4-1 = 12

∴∴, x 1 (n) = 0, 0, 0, 7, 6, 4,x1(n)=0,0,0,7,6,4,5,x2(n)=6,4,5,2,4,5,2


5,
x 2 (n) = 6, 4, 5, 2, 4, 5, 2
& x 3 (n) = 4, 5, 2, 3, 0, 0,x3(n)=4,5,2,3,0,0,0
0
h(n) = {1, 2, 3, 1, 0, 0, 0}
1 (n) = 1 (n) ⊗ h(n)
y1 (n) = x 1 (n) ⊗ h(n)
y1(n)=x1(n)⊗h(n)
Result: y(n) = {7, 20, 37, 37, 38, 37, 28, 34, 25, 17, 11, 3}

Chap 2 / IIR-FIR Systems


5. Differentiate IIR and FIR systems.
Sr.
IIR systems FIR systems
No.
IIR stands for infinite impulse FIR stands for finite impulse response
1.
response systems systems
IIR filters are less powerful FIR filters are more powerful than IIR
than FIR filters, & require less filters, but also require more processing
2.
processing power and less work power and more work to set up the
to set up the filters filters
They are also less easy to change "on
They are more easy to change the fly" as you can by tweaking (say)
3.
"on the fly”. the frequency setting of a parametric
(IIR) filter
Their,greater power means more
4. These are less flexible. flexibility and ability to finely adjust
the response of your active
loudspeaker.
It cannot implement linear-
5. It can implement linear-phase filtering.
phase filtering.
It can be used to correct frequency-
It cannot be used to correct
response errors in a loudspeaker to a
6. frequency-response errors in a
finer degree of precision than using
loudspeaker
IIRs
FIRs can be limited in resolution at low
IIRs can provide good frequencies, and the success of
7. resolution even at low applying FIR filters depends greatly on
frequencies. the program that is used to generate the
filter coefficients
Usage is generally more easier Usage is generally more complicated
8.
than FIR filters. and time-consuming than IIR filters

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

IIR filter need more power due


14. to more coefficients in the FIR filter consume low power
design.
IIR filters have analog
15. FIR have no analog equivalent.
equivalent
16. IIR filters are more efficient FIR filters are less efficient
IIR filters are used as
FIR filters are used as anti-aliasing,low
17. notch(band stop),band pass
pass and baseband filters
functions.
IIR filter need lower order than
FIR filter need higher order than IIR
18. FIR filter to achieve same
filter to achieve same performance.
performance
19 Delay is less than FIR filter. Delay is more than IIR filter.
It has higher sensitivity than
20. It has lower sensitivity than IIR filter
FIR filter

Chap 2 / LTI Digital Filter


6. For the causal LTI digital filter with impulse
response given by
h(n) = 0.3δ(n) − δ(n − 1) + 0.38δ(n − 3)
h(n)=0.3δ(
sketch the magnitude spectrum of the filter. Using
DFT
A causal system is one that does not depend on future inputs. Thus a causal
system cannot respond before the input is applied.

The impulse response satisfy the linear difference equation.

h(n) = 0.3δ(n) − δ(n − 1) + 0.38δ(n − 3)


h(n) = 0.3δ(n) − δ(n − 1) + 0.38δ(n − 3) h(n)=0.3δ(n)−δ
∴ h(n) = 0.3δ(n) − δ(n − 1) + 0δ(n − 2) + 0.38δ(n −
h(0) = 0.3δ(0) − δ(−1) + 0δ(−2) + 0.38δ(−3) = 0.3
h(1) = 0.3δ(1) − δ(0) + 0δ(−1) + 0.38δ(−2) = (−1)
h(2) = 0.3δ(2) − δ(1) + 0δ(0) + 0.38δ(−1) = 0
h(3) = 0.3δ(3) − δ(2) + 0δ(1) + 0.38δ(0) = 0.38
h(4) = 0.3δ(4) − δ(3) + 0δ(2) + 0.38δ(1) = 0
.
.
= can
h(n)h(n)
Here, {0.3, −1, 0,
be written as,0.38,
h(n)= {0, 0,-1,0,0,. 0.38
0.3, . . . }}
.....(Since DFT of δ(n)δ(n) is always 1)
Chapter 3
Discrete Fourier Transform
Content

Types Of Signals
DFT-FFT Graph

Chap 3 / Types Of Signals


1. Determine whether or not the following signals
are periodic. If periodic, specify its fundamental
period.
A signal is said to be periodic signal if x(n) = x(n+N)

Where, N = Fundamental Period

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)

Sol: Consider Standard equation


x(n) = A cos(ωn + θ) x(n)=Acos⁡(ωn+θ)

Comparing given signal we get,

ω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

1. X 2 (n) = cos(0.3πn) + sin(0.25πn)


X2(n)=cos⁡(0.3πn)+sin⁡(0.25πn)

Sol: Consider X 2 (n)X2(n) to be combination of


x 1 (n)&x 2 (n)x1(n)&x2(n)
Where,
x 1 (n) = cos(0.3πn 1 )&x 2 (n) = sin(0.25πx1(n)=cos⁡(0.3πn1)&x2(n
n2)
∴ ω1 n 1 = 0.3πn 1 & ω2 n 2 = 0.25π n2
∴ω1n1=0.3πn1 & ω2n2=0.25πn2
3 1
∴ 2πf 1 n 1 = πn 1 & 2πf 2 n 2 = ∴2πf1n1=310πn1
πn 2 & 2πf2n2
10 4
3 1
∴ f1 = &f 2 = ∴f1=320&f2=18
20 8
∴ N 1 = 20 & N 2 =∴N1=208 & N2=8

∴ N = LCMof N 1 & N 2 = ∴N=LCMofN1


40 & N2=40

Result: Given signal, X 2 (n)X2(n) is periodic with Fundamental Period,


N = 40

Chap 3 / Types Of Signals


2. Determine whether the signals are power or

−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.

(ii) x[n] = u[n]x[n]=u[n]


The signal is periodic because u(n) repeats after every sample and of infinite
duration.

Hence it is a Power 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}

Chap 3 / DFT-FFT Graph


4. Draw the radix 2 DIT flow graph and find the
DFT of the sequence x(n)={10, 11, 8, 5} using FFT
flow graph.

Result: X(k)={34, 2-6j, 2, 2+6j}

Chap 3 / DFT-FFT Graph


5. Derive radix 2 DIT FFT flow graph and find the
DFT of the sequence x(n) = {0, 1, 2, 3}
x(n) = {x(1), x(2), x(3), x(4)}

Result: X(k)={6, -2+2j, -2, -2-2j}

Chap 3 / DFT-FFT Graph


6. Find the value of
x(n) = cos(0.25πn)x(n)=cos(0.25πn) for n=0, 1,
2, 3. Compute the DFT of x(n) using FFT flow
graph.
n ππ cos πcos⁡π
0 0 1
π 1
1 π4 –12
4 √2
π
2 π2 0
2
3π 1
+3 3π4 –12
4 √2
Result: X(k)={1, 1-√2 j, 1, 1+√2 j}

Chap 3 / DFT-FFT Graph


7. State the following DFT properties:
1. Linearity property

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 (ω)

Fourier transform of a linear combination of two or more signals is equal to


the same linear combination of fourier transform of individual signal.

2. Periodicity

Statement: The periodicity is defined as


X(ω) = X(ω + 2ωk). X(ω)=X(ω+2ωk).

If x(n) ← F T → X(k)
x(n)←FT→X(k)

Then, 1.x(n) = x(n + N),1.x(n)=x(n+N),2.X(k)=X(k+N)


2.X(k) = X(k + N)
3.Time shift

−jωk
Statement: If
x(n) ← F T → X(ω)then, x(n − k) ← F T → e −jωk X(ω
x(n)←FT→X(ω

If a signal is shifted in time domain by k samples then the magnitude


spectrum is unchanged but the phase spectrum is unchanged by amount
(−ωk).(−ωk).
4. Convolution

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

If we fold the sequence in time domain then the magnitude spectrum is


unchanged but the polarity of phase spectrum is unchanged.
Chapter 4
Fast Fourier Transform
Content

DFT-FFT Graph

Chap 4 / DFT-FFT Graph


1. 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}

Chap 4 / DFT-FFT Graph


2. Draw the radix 2 DIT flow graph and find the
DFT of the sequence x(n)={10, 11, 8, 5} using FFT
flow graph.
Result: X(k)={34, 2-6j, 2, 2+6j}

Chap 4 / DFT-FFT Graph


3. Derive radix 2 DIT FFT flow graph and find the
DFT of the sequence x(n) = {0, 1, 2, 3}
x(n) = {x(1), x(2), x(3), x(4)}
Result: X(k)={6, -2+2j, -2, -2-2j}

Chap 4 / DFT-FFT Graph


4. Find the value of
x(n) = cos(0.25πn)x(n)=cos(0.25πn) for n=0, 1,
2, 3. Compute the DFT of x(n) using FFT flow
graph.
n ππ cos πcos⁡π
0 0 1
π 1
1 π4 –12
4 √2
π
2 π2 0
2
3π 1
+3 3π4 –12
4 √2

Result: X(k)={1, 1-√2 j, 1, 1+√2 j}

Chap 4 / DFT-FFT Graph


5. State the following DFT properties:
1. Linearity property

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 (ω)

Fourier transform of a linear combination of two or more signals is equal to


the same linear combination of fourier transform of individual signal.

2. Periodicity

Statement: The periodicity is defined as


X(ω) = X(ω + 2ωk). X(ω)=X(ω+2ωk).

If x(n) ← F T → X(k)
x(n)←FT→X(k)

Then, 1.x(n) = x(n + N),1.x(n)=x(n+N),2.X(k)=X(k+N)


2.X(k) = X(k + N)
3.Time shift

Statement: If
x(n) ← F T → X(ω)then, x(n − k) ← F T → e −jωk X(ω
x(n)←FT→X(ω

If a signal is shifted in time domain by k samples then the magnitude


spectrum is unchanged but the phase spectrum is unchanged by amount
(−ωk).(−ωk).
4. Convolution

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

If we fold the sequence in time domain then the magnitude spectrum is


unchanged but the polarity of phase spectrum is unchanged.
Chapter 5
DSP Algorithms
Content

FIR Digital Filter


Carl's Correlation

Chap 5 / FIR Digital Filter


1. For the FIR digital filter with impulse response
given by
h(n) = 2δ(n) + 3δ(n − 1) + 4δ(n − 3) + δ
sketch the magnitude response of the filter.
To sketch the magnitude of the filter, we find h(n) using iteration method.

h(0) = 2 δ(0) + 3 δ(-1) + 4 δ(-3) + δ(-4) = 2

h(1) = 2 δ(1) + 3 δ(0) + 4 δ(-2) + δ(-3) = 3

h(2) = 2 δ(2) + 3 δ(1) + 4 δ(-1) + δ(-2) = 0

h(3) = 2 δ(3) + 3 δ(2) + 4 δ(0) + δ(-1) = 4

h(4) = 2 δ(4) + 3 δ(3) + 4 δ(1) + δ(0) = 1

h(5) = 2 δ(5) + 3 δ(4) + 4 δ(2) + δ(1) = 0

.
.

h(n) = {2, 3, 0, 4, 1, 0, 0, 0, . . . . }

The impulse response exists only for finite values of n.

Hence the name finite impulse response system(FIR).

This is a system without feedback

Chap 5 / Carl's Correlation


2. Write a detailed note on Carl's Correlation
Coefficient Algorithm. Justify the necessary of
Algorithm by giving suitable example.
Carl Pearson Coefficient of correlation is a measure of linear relationship
between two variables. It lies between -1 and 1.

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 :

X(height - cm) Y(weight - kg)


174 61
175 65
176 67
177 68
178 72
182 74
183 80
186 87
189 92
193 95

Number of cases: n = 10

Sr. No. X Y X 2X2 Y 2Y2 XY


1 174 61 30276 3721 10614
2 175 65 30625 4225 11375
3 176 67 30976 4489 11792
4 177 68 31329 4624 12036
5 178 72 31684 5184 12816
6 182 74 33124 5476 13468
7 183 80 33489 6400 14640
8 186 87 34596 7569 16182
9 189 92 35721 8464 17388
10 193 95 37249 9025 18335
∑ 1813 761 329069 59177 138646

∑ X = 1813

∑ Y = 761

X2
2
∑ X 2X2= 329069

∑ Y 2Y2 = 59177

∑ XY = 138646

∑ X ∑ Y = 138646

n(∑ xy) − (∑ x)(∑ y)


r = −−−−−−−−−−−−−−−−−−−−−−−−−r=n(∑xy)−(∑x)(∑y)[n∑x2−(∑x
−−−
√[n ∑ x 2 − (∑ x)2 ][n ∑ y 2 − (∑ y)2 ]
∴∴ Correlation coefficient: r = 0.9864
Chapter 6
DSP Processors and Application of
DSP
Content
DSP Processor

Chap 6 / DSP Processor


1. Write a detailed note on DSP Processor.
Digital Signal Processing is carried out by mathematical operations. In
comparison, word processing and similar programs merely rearrange stored
data. This means that computers designed for business and other general
applications are not optimized for algorithms such as digital filtering and
Fourier analysis. Digital Signal Processors are microprocessors specifically
designed to handle Digital Signal Processing tasks. These devices have seen
tremendous growth in the last decade, finding use in everything from cellular
telephones to advanced scientific instruments. In fact, hardware engineers use
"DSP" to mean Digital Signal Processor, just as algorithm developers use
"DSP" to mean Digital Signal Processing. This chapter looks at how DSPs
are different from other types of microprocessors, how to decide if a DSP is
right for your application, and how to get started in this exciting new field. In
the next chapter we will take a more detailed look at one of these
sophisticated products: the Analog Devices SHARC? family.

How Fast are DSPs?

The primary reason for using a DSP instead of a traditional microprocessor is


speed, the ability to move samples into the device, carry out the needed
mathematical operations, and output the processed data. This brings up the
question: How fast are DSPs? The usual way of answering this question is
benchmarks, methods for expressing the speed of a microprocessor as a
number. For instance, fixed point systems are often quoted in MIPS (million
integer operations per second). Likewise, floating point devices can be
specified in MFLOPS (million floating point operations per second).

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.

However, DSP algorithms generally spend most of their execution time in


loops, such as instructions 6-12 of Table 28-1. This means that the same set
of program instructions will continually pass from program memory to the
CPU. The Super Harvard architecture takes advantage of this situation by
including an instruction cache in the CPU. This is a small memory that
contains about 32 of the most recent program instructions. The first time
through a loop, the program instructions must be passed over the program
memory bus. This results in slower operation because of the conflict with the
coefficients that must also be fetched along this path. However, on additional
executions of the loop, the program instructions can be pulled from the
instruction cache. This means that all of the memory to CPU information
transfers can be accomplished in a single cycle: the sample from the input
signal comes over the data memory bus, the coefficient comes over the
program memory bus, and the program instruction comes from the instruction
cache. In the jargon of the field, this efficient transfer of data is called a high
memory-access bandwidth.
Applications of DSP

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 .

Question papers included

• "+ lesson_no +" • "+ seq_num +"


" + answer_block.html() + "
"); if( !answer_block.html().match('Found repeated in ') ) {
answer_block.html("

Answer:

— Found repeated in "+ paper_year + " • "+ lesson_no +" • "+ seq_num
+"

"); } } else { elem_paper.after("NOT FOUND!"); }


elem_paper.siblings(".paper-ques-desc").wrap(""); } else {
elem_paper.after("Not mapped"); } }); function
get_seq_num(paper_year, lesson_no) { if(typeof chap_seq_obj ===
"undefined") { chap_seq_obj = { "Chap 1": 0, "Chap 2": 0, "Chap 3":
0, "Chap 4": 0, "Chap 5": 0, "Chap 6": 0, "Chap 7": 0, "Chap 8": 0,
"Chap 9": 0, "Chap 10": 0, "Chap 11": 0, "Chap 12": 0, "Chap 13": 0,
"Chap 14": 0, "Chap 15": 0 } } var key = paper_year + " " + lesson_no;
if(typeof chap_seq_obj[key] === "undefined") { chap_seq_obj[key] = 0;
} return ++chap_seq_obj[key] } // Arrange questions chapter-wise within
paper var chap_seq_arr = ['Chap 1', 'Chap 2', 'Chap 3', 'Chap 4', 'Chap
5', 'Chap 6', 'Chap 7', 'Chap 8', 'Chap 9', 'Chap 10', 'Chap 11', 'Chap
12', 'Chap 13', 'Chap 14', 'Chap 15',]; $(".papers-
page").each(function(k,v) { $(v).append("
Solution to the paper
"); $.each(chap_seq_arr, function(k1,v1) { var this_lessno =
$(v).find(".paper-question .lessno:contains('"+ v1 +"')");
if(this_lessno.length > 0) { var cflag = true; $.each(this_lessno,
function(k2, v2){ var this_question = $(v2).closest('.paper-question');
if(this_question.html().indexOf("Found repeated") 0) { if(cflag) {
$(v).append("

"+ v1 + ": " + $(".lesson-no:contains('"+ v1 +"')").siblings(".lesson-


heading").text() || "" +"

"); cflag = false; } $(v).append(this_question.html());


this_question.find(".answer-block").html("

— " + this_question.find(".bubble.right").text() + "

"); } this_question.find(".bubble.right").remove(); }) } }); // create


papers box on last page $(".qp-included-wrapper").append("

" + $(v).find("h2 .paper-header").text().split("-")[1].trim() + "

"); // create link to the paper header $(v).find("h2 .paper-


header").html(""+ $(v).find("h2 .paper-header").text() +""); }); // show
papers and hide lessons $(".qp-included-
wrapper").removeClass("hide"); $('.lesson-container').addClass('hide');
} else if(print_type == "chapwise") { // if not solutions // remove repeated
topic names $(".question-block p:contains('Subject')").remove();
$(".question-block p:contains('subject')").remove(); // remove question
metadata from older questions $(".question-block p:contains('Mumbai
University')").remove(); $(".question-block p:contains('Mumbai
university')").remove(); $(".question-block p:contains('mumbai
university')").remove(); $(".question-block
p:contains('Year')").remove(); $(".question-block
p:contains('year')").remove(); // Map questions in QP to lessons
$(".paper-page-id").each(function(k,v){ var elem_paper = $(v); var
page_id = $.trim(elem_paper.text()); if(page_id != "00") { var elem_ques
= $("div[data-page-id="+ page_id +"]"); if(elem_ques.length > 0) { var
lesson_no = elem_ques.siblings(".lesson-no").text(); var ques_no =
elem_ques.find(".qno").text().replace(")", ""); elem_paper.after(""+
lesson_no +""+ ques_no +""); } else { elem_paper.after("NOT
FOUND!"); } } else { elem_paper.after("Not mapped"); } }); } });

You might also like