Discrete Time Signal Processing - Mohd Farhan
Discrete Time Signal Processing - Mohd Farhan
BY
Mohd Farhan
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.
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: [email protected]
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.0 Discrete Fourier Transform & Fast Fourier Transform
1.1 Definition and Properties of DFT, IDFT, Circular convolution of sequences using DFT and IDFT. Filtering of
long data sequences: Overlap-Save and Overlap-Add Method for computation of DFT
1.2 Fast Fourier Transforms (FFT), Radix-2 decimation in time and decimation in frequency FFT algorithms,
inverse FFT, and introduction to composite FFT.
2.1 Types of IIR Filters (Low Pass, High Pass, Band Pass, Band Stop and All Pass), Analog filter approximations:
Butterworth, Chebyshev I, Elliptic.
2.2 Mapping of S-plane to Z-plane, impulse invariance method, bilinear transformation method, Design of IIR
digital filters (Butterworth and Chebyshev-I) from Analog filters with examples.
3.1 Characteristics of FIR digital filters, Minimum Phase, Maximum Phase, Mixed Phase and Linear Phase Filters.
Frequency response, location of the zeros of linear phase FIR filters.
3.2 Design of FIR filters using Window techniques (Rectangular, Hamming, Hanning, Blackmann, Kaiser), Design
of FIR filters using Frequency Sampling technique, Comparison of IIR and FIR filters
4.1 Quantization, truncation and rounding, Effects due to truncation and rounding, Input quantization error,
Product quantization error, Coefficient quantization error, Zero-input limit cycle oscillations, Overflow limit cycle
oscillations, Scaling.
4.2 Quantization in Floating Point realization of IIR digital filters, Finite word length effects in FIR digital filters.
5.1 Introduction to General Purpose and Special Purpose DSP processors, fixed point and floating point DSP
processor, Computer architecture for signal processing, Harvard Architecture, Pipelining, multiplier and
accumulator (MAC), Special Instructions, Replication, On-chip memory, Extended Parallelism.
5.2 General purpose digital signal processors, Selecting digital signal processors, Special purpose DSP hardware,
Architecture of TMS320CX fixed and floating DSP processors.
6.2 Application of DSP for Dual Tone Multi Frequency signal detection.
V0516th20201
Chapter 1
Discrete Fourier Transform and Fast Fourier
Transform
Content
DFT
IDFT
FFT
Compare DFT and FFT
Circular convolution
Parserval Theorem
Chap 1 / DFT
1. Explain Quantization effect in computation of DFT
Let x(n) be a finite duration complex-valued sequence of length N.
nk
By definition, X(k) = DFT[x(n)] = ∑ Nx(n) ⋅ W N , where k = 0, 1, 2, …N − 1 and W is the twiddle factor.
nk
Let the real and imaginary components of x(n) and W N be represented by b bits with fixed-point arithmetic. Each
complex multiplication involves 4 real multiplications. Each real multiplication is rounded from 2 b bits to b bits,
and hence there are four quantization (round-off) errors for cach complex-valued multiplication.
In the direct computation of the DFT, there are N complex-valued multiplications for each point in the DFT. So,
there are 4 N real multiplications for each point. Hence, there are 4 N quantization errors.
Round-off errors in DFT multiplication are analyzed using Additive White Noise Model.
Following assumptions are made about the statistical properties of the quantization errors.
−Δ Δ
Quantization (round-off) errors are uniformly distributed random variables in the range 2
to 2
where
Δ = 2 − b.
4 N quantization errors are mutually uncorrelated.
4 N quantization errors are uncorrelated with the sequence x(n).
2 Δ2 2 − 2b
Variance of each quantization error σ e = 12
= 12
2 N
Variance of the quantization errors from the 4 N multiplications σ q = 3
2 − 2b
2 1
If N = 2 m then σ q = 3 2 − 2 ( b − m / 2 )
Hence the variance of the quantization error is proportional to the size of DFT. For every four-fold increase in the
size N of the DFT requires an additional bit in computational precision to maintain same quantization error.
Moreover, while computing DFT another Quantization error is occurs because of overflow due to addition To
prevent overflow due to addition, the input sequence to the DFT must to scaled.
N−1
To satisfy the scaling condition ∑ n = 0 | x(n) | < 1, each point in the input sequence should be divided by N.
Chap 1 / DFT
2. Compute the DFT of the sequence x(n) = {0, 1, 2, 1}
nk
For N = 4, Twiddle factor is W 4 = e − j2πkn / 4
W 04 W 14 W 24 W 34
W=
W 04 W 24 W 44 W 64
[ ]
W 04 W 34 W 64 W 94
0
Consider, W 4 = e − 0 / 4 = 1
π π
W 14 = e − jπ2 / 4 = cos 2 − jsin 2 = 0 − j × 1 = − j
2
W 4 = e − jπ4 / 4 = cosπ − jsinπ = − 1 − 0 = − 1
3 3π 3π
W 4 = e − j6π / 4 = cos 2
− jsin 2
=0−j× −1=j
9π 9π
W 94 = e − j18π / 4 = cos 2
− jsin 2
=0−j×1= −j
1 1 1 1
1 −j −1 j
∴W=
[ 11 −1
j
1
−1
−1
−j
]
Let x(n) = {0, 1, 2, 1}}
Chap 1 / DFT
3. Find DFT of the following sequence using DIT FFT algorithm.
x(n) = {1, 1, 1, 1, 1, 1, 1, 0}
Solution:
N = 8 = 23
Step 1: x(n) is written in bit reversed order i.e. {1, 1, 1, 1, 1, 1, 1, 0} is the input for step 1.
0
The phase factor for step 1 is W 2 = e 0 = 1
1 2π 2π 1 1
W 8 = e − j2π / 8 = cos 8
− jsin 8
= −j
√2 √2
2 4π 4π
W 8 = e − j4π / 8 = cos 8
− jsin 8
=0−j×1= −j
3 6π 6π −1 1
W 8 = e − j6π / 8 = cos 8
− jsin 8
= −j
√2 √2
The butterfly computations for step 3 are:
−1 1 1 1 1 1 −1 1
Output of step 3 = 7,
{ √2
−
√2
j, − j,
√2
−
√2
j, 1,
√2
+
√2
j, j,
√2
+
√2
j
}
Hence, the DFT of given sequence x(n) is
−1 1 1 1 1 1 −1 1
X(k) = DFT{x(n)} = 7,
{ √2
−
√2
j, − j,
√2
−
√2
j, 1,
√2
+
√2
j, j,
√2
+
√2
j
}
Chap 1 / DFT
4. Find the DFT of the following sequence using DIT-FFT ,X{n} =
{1,1,1,1,1,1,0,0,}
Given, x(n) = {1, 1, 1, 1, 1, 1, 0, 0} and N = 8 = 2 3
Step 1: x(n) is written in bit reversed order i.e. {1, 1, 1, 0, 1, 1, 1, 0} is the input for step 1.
0
The phase factor for step 1 is W 2 = e 0 = 1
1 2π 2π 1 1
W 8 = e − j2π / 8 = cos 8
− jsin 8
= −j
√2 √2
2 4π 4π
W 8 = e − j4π / 8 = cos 8
− jsin 8
=0−j×1= −j
3 6π 6π −1 1
W 8 = e − j6π / 8 = cos 8
− jsin 8
= −j
√2 √2
The butterfly computations for step 3 are:
Output of step 3 =
{6, − 0.7071 − 1.7071j, 1 − j, 0.7071 + 0.2929j, 0, 0.7071 − 0.2929j, 1 + j, − 0.7071 + 1.7071j}
X(k) = DFT{x(n)} = {6, − 0.7071 − 1.7071j, 1 − j, 0.7071 + 0.2929j, 0, 0.7071 − 0.2929j, 1 + j, − 0.7071 + 1.7071
Chap 1 / DFT
5. Compute 4- point DFT of a casual four sample sequence given by X(n) =
{j, 0, j, 1}
Chap 1 / DFT
6. Find DFT of the following sequence using DIT FFT algorithm. X(n)={-1,
-1, 2, 0, 2, 0, 2, 0} and sketch the magnitude and phase response.
Chap 1 / DFT
7. Let x be a finite sequence with DFT
X = DFT[x] = [0, 1 + j, 1, 1 − j]
Using the properties of the DFT determine the DFT's of the following:
i) y[n] = e j ( π / 2 ) nx(n)
No answer yet!
Chap 1 / DFT
8. Find DFT of the image
0121
1232
2343
1232
4 −2 0 −2
8 −2 0 −2
R=
[ 128 −2 0
−2 0
−2
−2
]
Step2: Perform Column-wise Transform using FFT Flowgraph
32 −8 0 −8
−8 0 0 0
Result of column-wise transform,C =
[ −08 0
0
0
0
0
0
]
1
Step3: Scale by
N
1
DFT[f(x, y)] =
N[C]
8 −2 0 −2
−2 0 0 0
DFT[f(x, y)] =
[ −02 0
0
0
0
0
0
]
Chap 1 / DFT
9. State and prove shifting properly of DFT
Appeared in exams: Once
1 − j2 π kn
x(n) = ∑ N − 1X(k). e
N k=0
N
− j2 π kl − j2 π kl j2 π kn
N−1
IDFT[X(K). e N ] = 1 / N ∑ k = 0 X(k). e N .e N
−j(2πk(n−l) )
1 / N ∑N −1
k=0
X(K). e N
Chap 1 / DFT
10. Check whether 1-D DFT is an example of a unitary transform or not.
The Fourier transform can be represented as
X(k) = X(ω) | ω=
2πk
N
Chap 1 / DFT
12. Prove that 2D DFT matrix is an unitary matrix.
1 1 1 1
1 1 −j −1 j
Consider DFT matrix for N=4,A =
[1
√4 1 − 1
j
1
−1
−1
−j
]
If AA*=I
For N=4,
1 1 1 1 1 1 1 1
1 1 −j −1 j 1 1 j −1 −j
AA ∗ =
[1
√4 1 − 1
j −1
1
−j
] [
− 1 √4 1
1
−1
−j
1
−1
−1
j
]
4 0 0 0
1 0 4 0 0
= 4
[ 00 0
0
4
0
0
4
]
1 0 0 0
0 1 0 0
=
[ 00 0
0
1
0
0
1
]
AA*= I
Chap 1 / DFT
13. (i) Determine the DFT of the sequence x(n) (ii) Also Find the DFT of the
following sequences, using the result obtained in (i)
i)
ii)
x 1(n) = 1, n = 0
x 1(n) = 0, 1 < n < 4
x(n)={1,1,1,1,0,0,0,0}
DFT by DIF-FFT
Output of stage-1
Output of stage-2
0 0
S 2(2) = S 1(0) + S 1(2)]W 8 = (1 − 1)W 8 = 0
2 2
S 2(3) = S 1(1) + S 1(3)]W 8 = (1 − 1)W 8 = 0 = 0
Final Output
ii)x 1(n) = 1, 0, 0, 0, 0, 1, 1,
x 1(n) = x(n + 3)
0
X 1(0) = X(0)W 8 = 4(1) = 4
X 1(1) = X(1)W 8− .3 = (1 − 2.414j)( − 0.707 + j0.707)
−6
X 1(2) = X(2)W 8 = 0
−9
X 1(3) = X(3)W 8 = (1 − 0.414j)(0.707 + 0.707j)
X 1(4) = X(4)W 8− 12 = 0
X 1(6) = X(6)W 8− 18 = 0
− 21
X 1(7) = X(7)W 8 = (1 + 2.414j)( − 0.707 − 0.707j)
ii)x 2(n) = 0, 0, 1, 1, 1, 1, 0, 0
x 2(n) = x(n − 2)
X 2(2) = X(2)W 48 = 0
8
X 2(4) = X(4)W 8 = (0)(1) = 0
10
X 2(5) = X(5)W 8 = (1 + 0.414j)( − j) = 0.414 − j
X 2(6) = X(5)W 12
8
=0
X 2(7) = X(7)W 14
8
= − 2.414 + j
Chap 1 / DFT
14. Justify DFT as a linear transformation.
If x 1(n)( < − > ) DFTx 1(k) And
x(k) = ∑ x(n) (W n) Kn
Hence proved.
Chap 1 / DFT
15. x(n)=4γ(n)+3γ(n-1)+2γ(n-2)+γ(n-3)is a six point sequence. i) Find p(n),if
P(K)= W_N^2K X(K) ii) If Q(K)=X(K-3),Find q(n)
Appeared in exams: Once
x(n)={4,3,2,1,0,0}
2
i) Find p(n)=ifP(K)= W NKX(K)
By comparison we have,
l=2 ,N=6
p(n)=x(n-2)
P(n)={0,0,4,3,2,1}
ii) If Q(K)=X(K-3),Find q(n)
By comparison we have,
l=3
− j2 π ln
q(n) = x(n)e 6
q(n) = x(n). e − j π n
q(0) = x(0)e 0 = 4
q(1) = x(1)e − j π = − 3
q(2) = x(2)e − 2j π = 2
q(3) = x(3)e − 3j π = − 1
q(4) = x(4)e − 4j π = 0
q(5) = x(5)e − 5j π = 0
q(n)={4,-3,2,-1,0,0}
Chap 1 / DFT
16. If x(n)={2,3,4,5} i) Find DFT of x(n)using DIT-FFT ii) If y(n)=x(n-
1)Find DFT of y(n) iii) m(n)=x(n)+jy(n). Find DFT of m(m)using above
results only.
Appeared in exams: Once
Output of stage 1
Final Output
1
X(1) = S 1(1) + S 1(3)W 4 = − 2 + 2j
0
X(2) = S 1(0) − S 1(2)W 4 = 6 − 8
3
Y(3) = X(3)W 4 = ( − 2 − 2j)( + j) = 2 − 2j
iii) m(n)=x(n)+jy(n)
By linearly property
M(K)=X(K)+jY(K)
M(0)=14+14j
M(1)=(-2+2j)+j(+2+2j)=-4+4j
M(2)=-2+2j
M(3)=(-2-2j)+j(2-2j)=0
M(K)={14+14j,-4+4j,-2+2j,0}
Chap 1 / DFT
17. List the properties of 2D-DFT.
Translation
Distributive and scaling
Rotation
Periodicity and Conjugate Symmetry
Separability (kernel separating)
Linearity
Convolution and Correlation
Chap 1 / DFT
18. Find the DFT using MATRIX method x(n) = {0, 1, 2, 1}.
Chap 1 / DFT
19. The first points of 8-point DFT of real valued sequence are{0.25,0.125-
j0.3018,0,0.125-j0.0518,0} Find the remaining three points.
By Symmetry property we have,
X(k) = X ∗ (N − k)
We have
X(0)=0.25
X(1)=0.125-j0.3018
X(2)=0
X(3)=0.125-j0.0518
X(4)=0
k = 5, X(5) = X ∗ (8 − 5)
=X ∗ (3)
=0.125+j0.0518
k = 6, X(6) = X ∗ (8 − 6)
= X ∗ (2)
=0
k = 7, X(7) = X ∗ (8 − 7)
= X ∗ (1)
=0.125+j0.3018
Chap 1 / DFT
20. State the following DFT properties:
1. Linearity property
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
If x(n) ← FT → X(k)
3.Time shift
4. Convolution
5. Time Reversal
If we fold the sequence in time domain then the magnitude spectrum is unchanged but the polarity of phase
spectrum is unchanged.
Chap 1 / DFT
21. What is the formula of 1-D DFT and 2-D DFT along with its inverse?
Chap 1 / DFT
22. Compute the circular convolution of x(n){2,1,2,1}and h(n)={1,2,3,4,}by
using FFT-IFFT method.
Calculate DFT of x(n)by DIT-FFT
Calculate DFT of h(n)by DIT-FFT
Y(k)=X(k).H(k)
={60 ,0,-4,0}
y(n)={14,16,14,16}
Chap 1 / IDFT
23. Compute IDFT of the following sequence using inverse FFT algorithm.
x(k) = {3, 0, 3, 0, 3, 0, 3, 0}
Solution:
N = 8 = 23
The computation of 8 − point DFT using radix- 2 DITFFT involves three steps.
X ∗ (k) = {3, 0, 3, 0, 3, 0, 3, 0}
Step 1: The four pairs of X ∗ (k) in bit reversed order is the input for step 1
0
The phase factor for step 1 is W 2 = e 0 = 1
Step 2: The output of step 1 forms the input for second step.
0 1 2π 2π
The phase factor for step 2 are W 4 = e 0 = 1& W 4 = e − j2π / 4 = cos 4
− jsin 4
=0−j×1= −j
Step 3: The output of step 2 forms the input for third step.
0
The phase factor for step 3 are W 8 = e 0 = 1;
2π 2π 1 1
W 18 = e − j2π / 8 = cos 8
− jsin 8
= −j
√2 √2
2 4π 4π
W 8 = e − j4π / 8 = cos 8
− jsin 8
=0−j×1= −j
3 6π 6π −1 1
W 8 = e − j6π / 8 = cos 8
− jsin 8
= −j ;
√2 √2
The butterfly computations for step 3 are:
∴ x(n) = IDFT[X(k)]
1
= N
q ∗ (n)
1
= 8 {12, 0, 0, 0, 12, 0, 0, 0}
1
= 8 {12, 0, 0, 0, 12, 0, 0, 0}
= {1.5, 0, 0, 0, 1.5, 0, 0, 0}
= {1.5, 0, 0, 0, 1.5, 0, 0, 0}
Chap 1 / FFT
24. Explain the speed improvement in calculating the DFT using FFT.
Computational benefits of FFT over DFT are
4N 2 2N
Speed Improvement Factor for complex multiplication in Radix-2 FFT = 2Nlog 2 N
= log 2 N
= 2Nlog N2
For example, Consider a computer which can execute 1 multiplication operation in 1 nano-seconds. We assume
that the amount of time to compute a DFT is determined by the amount of time to perform all the multiplications.
Let us consider a DT signal having total of N = 10 9 points Time required for evaluating DFT by direct method on
the given Computer = N 2 = 10 9 ( ) 2
= 10 18 Nano-sconds, which is approximately 31 years.
N 10 9
Time required for evaluating FFT = 2
log 2N = 2
log 210 9 ≈ 15 × 10 9Nano-seconds approximately 15 secs.
Chap 1 / FFT
25. Find the IDIF-FFT for a given sequence X(k)={26, -2+2j, -2, -2-2j}.
Appeared in exams: Once
Output stage – 1
S 1(0) = X(0) + X(2) = 26 − 2 = 24
−1
S 1(3) = [X(1) − X(3)]W 4 = ( − 2 + 2j − ( − 2 − 2j))( + j) = − 4
Final Output
1 1
x(0) = 4 [S 1(0) + S 1(1)] = 4 [24 − 4] = 5
1 1
x(2) = 4 [S 1(0) − S 1(1)] = 4 [24 + 4] = 7
1 1
x(1) = 4 [S 1(2) + S 1(3)] = 4 [28 − 4] = 6
1 1
x(3) = 4 [S 1(2) − S 1(3)] = 4 [28 + 4] = 8
x(n) = 5, 6, 7, 8
Chap 1 / FFT
26. Develop composite radix DIT-FFT flow graph for N=6=2*3
Appeared in exams: 4 times
For N=6=2×3
=m 1 × N 1
i.e N 1 = 3, m 1 = 2
2 2nk 2 ( 2n + 1 ) k
X(k) = ∑ n = 0x(2n)W 6 + ∑ n = 0x(2n + 1)W 6
2 2nk 2 ( 2nk ) k
= ∑ n = 0x(2n)W 6 + ∑ n = 0x(2n + 1)W 6 W6
k
Let, X(k) = X 1(k) + W 6X 2(k)……………………………….(1)
2 2nk
X 1(k) = ∑ n = 0x(2n)W 6
2k 4k
X 1(k) = x(0) + x(2)W 6 + x(4)W 6
4 8
X 1(2) = x(0) + x(2)W 6 + x(4)W 6
Similarly,
2 2nk
X 2(k) = ∑ n = 0x(2n + 1)W 6
2 4
X 2(1) = x(1) + x(3)W 6 + x(5)W 6
4 8
X 2(2) = x(1) + x(3)W 6 + x(5)W 6
1
X(1) = X 1(1) + W 6X 2(1)…………………….(ii)
2
X(2) = X 1(2) + W 6X 2(2)…………………….(iii)
4
X(4) = X 1(4) + W 6X 2(4)
3
= X 1(1) + W 6X 2(1)………………….(v)
5
X(5) = X 1(5) + W 6X 2(5)
Now, develop the algorithm flow diagram as per equations (i) to (vi)
Chap 1 / Compare DFT and FFT
27. If x(n) = {1, 2, 3, 4, 5, 6, 7, 8}, Find X(k) using DIT-FFT algorithm.
Compare the computational complexity of above algorithm with DFT.
Appeared in exams: 3 times
Output of stage – 1
S 1(0)=x(0)+x(4)=1+5=6
S 1(1)=x(0)-x(4)=1-5=-4
S 1(2)=x(2)+x(6)=3+7=10
S 1(3)=x(2)-x(6)=3-7=-4
S 1(4)=x(1)+x(5)=2+6=8
S 1(5)=x(1)-x(5)=2-6=-4
S 1(6)=x(3)+x(7)=4+8=12
S 1(7)=x(3)-x(7)=4-8=-4
*Output of stage 2 *
2
S 2(1) = S 1(1) + W 8S 1(3) = − 4 + ( − j)( − 4) = − 4 + 4j
0
S 2(2) = S 1(0) − W 8S 1(2) = 6 − (1)(10) = − 4
0
S 2(6) = S 1(4) − W 8S 1(6) = 8 − (1)(12) = − 4
2
S 2(7) = S 1(5) − W 8S 1(7) = − 4 − ( − j)( − 4) = − 4 − 4j
Final output
0
X(0) = S 2(0) + W 8S 2(4) = 16 + (1)(20)
1
X(1) = S 2(1) + W 8S 2(5) = − 4 + 4j + (0.707 − j0.707)( − 4 + 4j)
2
X(2) = S 2(2) + W 8S 2(6) = − 4 + ( − j)( − 4)
3
X(3) = S 2(3) + W 8S 2(7) = − 4 − 4j + ( − 0.707 − j0.707)( − 4 − 4j)
6
X(4) = S 2(0) − W 8S 2(4) = 16 − (1)(20)
1
X(5) = S 2(1) − W 8S 2(5) = − 4 + 4j − (0.707 − j0.707)( − 4 + 4j)
2
X(6) = S 2(2) − W 8S 2(6) = − 4( − j)( − 4)
Output of stage-1:
0 0
S 1(4) = [x(0) − x(4)]W 8 = (1 − 1)W 8 = 0
2
S 1(6) = [x(2) − x(6)]W 8 = (2 − 0)( − j) = − 2j
Output of stage- 2
S 2(0) = S 1(0) + S 1(2) = 2 + 2 = 4
2
S 2(3) = [S 1(1) − S 1(3)]W 8 = (2 − 2)( − j) = 0
0
S 2(6) = [S 1(4) − S 1(6)]W 8 = (0 + 2j)(1) = 2j
2
S 2(7) = [S 1(5) − S 1(7)]W 8 = (1.414 − 1.414j + 1.414 + 1.414j)( − j) = − 2.828j
Final Output
For DFT
No. ofcomplexmultiplication = N 2 = 64
For FFT
N
No. ofcomplexmultiplication = 2
log 2N
= 4log 2(8) = 12
[y (n) ]
p 4×1 [
= x p(n) ] [h (n) ]
4×4 p 4×1
1 2 1 2 4
2 1 2 1 0
= ×
[ 12 2 1
1 2
]1 [ 40 ]
2
4+0+4+0
8+0+8+0
=
[ 48 ++ 00 ++ 48 ++ 00 ]
y p(0)
8
y p(1) 16
=
[ y (3) ] [ 16 ]
y (2)
p 8
∴ x(n) = {1, 2, 0, 0}
[ ]
By Definition, DFT x 1(n) = X 1(k) = W × x 1(n)
1 1 1 1 2
1 −j −1 j 2
∴ H(k) = ×
[ 11 −1
j
1
−1
−1
−j
] [ 1
1
]
2+2+1+1
2 − 2j − 1 + j
[ 22 −+ 22j+−11−−1j ]
6
1−j
=
[ 1 0+ j ]
Hence, H(k) = {6, 1 − j, 0, 1 + j}
∴ Y(k) = X(k)H(k)
1 1 1 1 18
1 1 j −1 −j − 1 − 3j
∴ y(n) = ×
4
[ 11 −1
−j −1
1 −1
j
] [ − 1 0+ 3j ]
18 + ( − 1 − 3j) + 0 + ( − 1 + 3j)
1 18 + j( − 1 − 3j) − 0 − j( − 1 + 3j)
= 4
[ 1818−−j(( −− 11 −− 3j) + 0 − ( − 1 + 3j)
3j) − 0 + j( − 1 + 3j)
]
16
1 24
=
[ 12 ]
4 20
4
= 5
3
[ ]
Hence, the circular convolution of the sequences x(n) and h(n) is y(n) = {4, 6, 5, 3}
[ ] [
y(3) x 1(3) x 1(2) x 1(1) x 1(0) x 1(4)
] [ x (3) ]
2
y(4) x 1(4) x 1(3) x 1(2) x 1(1) x 1(0) x 2(4)
1 −1 3 −2 −1 1
−1 1 −1 3 −2 2
= −2 −1 1 −1 3 × 3
[
3 −2 −1 1 −1 ] [ ]
0
−1 3 −2 −1 1 0
1−2+9+0+0
−1 + 2 − 3 + 0 + 0
= −2 − 2 + 3 + 0 + 0
[
3−4−3+0+0 ]
−1 + 6 − 6 + 0 + 0
y(0) 8
y(1) −2
∴ y(2) = − 1
[ ] [ ]
y(3) −4
y(4) −1
where, X 1(k) & X 2(k) are DFTs of x 1(n) &. x 2(n) respectively.
x 1(n) ∗ x 2(n) ≡ X 1(k). X 2(k) = {14, 3-5j, 0, 3+5j}.{10, 2+2j, -2, 2-2j}
y(n)=
[2 5 4 3][5]
|3 2 5 4| |2|
|4 3 2 5| |3|
[5 4 3 2][4]
[10 + 10 + 12 + 12]
| 15 + 4+ 15 + 16 |
| 20 + 6+ 6+ 20 |
[25 + 8+ 9+ 8]
[44]
| 50 |
=
| 52 |
[50]
y(n)={44,50,52,50}
X(k) =
[1 1 1 1][2]
|1 −j −1 +j | | 3 |
|1 −1 1 −1 | | 4 |
[1 +j −1 − j][5]
=
14
− 2 + 2j
−2
− 2 − 2j
H(k) =
[1 1 1 1][5]
|1 −j −1 +j | | 2 |
|1 −1 1 −1 | | 3 |
[1 +j −1 − j][4]
14
2 + 2j
2
2 − 2j
Y(k)=X(k).H(k)
={196,-8,-4,-8}
y(n) =
[1 1 1 1][196]
1 |1 +j −1 −j | | − 8 |
*
N |1 −1 1 −1 | | − 4 |
[1 −j −1 + j][ − 2]
1
=4*
176
200
208
200
y(n)={44,50,52,50}
N−1 1 N−1
∑ n = 0 x(n). y ∗ (n) = N
∑ n = 0 X(k). Y ∗ (k)
Proof:-We have
N−1
r xy(m) = ∑ n = 0 x(n). y ∗ (n − m) N
At
m = 0, r xy(m) = ∑ N −1
n=0
x(n). y ∗ (n) ………(1)
By DFT, we have
By IDFT eqn
1 j2 π km
N−1
r xy(m) = ∑
N k=0
X(k). Y ∗ (K). e N
at m=0
1 N−1
r xy(0) = N
∑ k = 0 X(k). Y ∗ (k) ……………(2)
N−1 1 N−1
∑ n = 0 x(n). y ∗ (n) = N
∑ k = 0 X(k). Y ∗ (k)
N−1 1 N−1
∑ n = 0 (x(n)) 2 = N
∑ k = 0 ( | X(k) | ) 2
Given x(n)={1,2,3,4}
Consider LHS
∑N −1
n=0
( | x(n) | ) 2 = ∑ 3n = 0( | x(n) | ) 2
=30
Consider RHS
1 N−1 1 3
N
∑ k = 0 ( | X(k) | ) 2 = 4
∑ k = 0( | X(k) | ) 2
1
= 4 100 + ( + 8) + (4) + (8)
1
= 4 [100 + 8 + 4 + 8]
= 30
Chapter 2
IIR Digital Filters
Content
IIR Filters
Mapping of S-plane to Z-plane
Design of IIR digital filters
Frequency transformation
Digital filter
For the unit circle,r=1. Thus putting r=1in the equation 1, we get
2 ( 2sin ω )
Ω= Ts
× ( 1 + 2cos ω + 1 )
2 ( 2sin ω )
∴Ω= Ts
× ( 2 + 2cos ω )
2 sin ω
∴Ω= Ts
× ( 1 + cos ω )
…………….….(2)
1 + cosω
ω
2 2sin 2
Ω= Ts
× ω
2cos 2
2 ω
Ω= Ts
tan 2
Ω Ts
ω = 2tan ( − 1) 2
…..(2)
Now for different values of ΩT s ; the graph of ΩT s versus ω is as shown in below Fig.
Putz = e j ω
b
H(ω) =
1 − 0.9e − j ω
1
H(ω) = ( ( 1 − 0.9cos w ) − j0.9sinw
w H(w)
0 0.52
0.25π 0.55
0.5π 0.74
0.75π 1.28
π 10
From pass band it is observed that the given filter is “High pass filter”
Sr.
IIM BLT
No.
Poles are transferred by using the equation Poles are transferred by using the equation s=
1 1 1 2(z−1)
→
( S − Pk ) ( 1 − e PkTsz − 1 Ts ( z + 1 )
2 Mapping is many to one Mapping is one to many
3 Aliasing effect is present Aliasing effect is not present
It is not suitable to design high pass filter and band reset High pass filter and band reset filter can be
4
filter designed
5 Only poles of the system can be mapped Poles as well as zeros can be mapped
6 No frequency warping effect Frequency warping effect is present
Limitation:
π −π
We know that Ω is analog frequency and its range is from Ts
to Ts
. While the digital frequency ωvaries
π −π
from -π to π. That total means from Ts
to Ts
.ω maps from -π to π. Let K be any integer. Then we can write
π π
the general range of Ω as (K − 1) T to (K + 1) T ; But for this range also , ω maps from -π to π Thus mapping
s s
from analog from analog frequency Ω to digital frequency ωis many to one. This mapping is not one to one.
Analog filters are not band limited so there will be aliasing due to the sampling process. Because of this
aliasing, the frequency response of resulting digital filter will not be identical to the original frequency
response of analog filter.
The change in the value of sampling time (T s) has no effect on the amount of aliasing
Now,
3
H(s) = ( (s+2) (s+3) )
………………(i)
3 = A(s + 3) + B(s + 2)
1 1 1
→ − 3 ( 0.1 ) −1 =
(s+3) (1−e Z ( 1 − 0.740Z − 1
3Z 3Z
H(z) = ( Z − 0.818 )
− ( Z − 0.740 )
( s + 0.1 ) ( s + 0.1 )
H(s) = H(s) = From above equation we can say that, Ω=4. And The value of ω r is
( ( s + 0.1 ) 2 + 16 ) ( ( s + 0.1 ) 2 + ( 4 ) 2 )
π 2 ω 2 π 2 π
given as ω r = 2 Now we know that Ω = Ts
tan( 2 ) ∴ 4 = Ts
tan( 4 ) ∴ T s = 4 tan( 4 ) ∴ T s = 0.5sec Using
2 ( (z−1)
bilinear transformation H(z) can be obtained by putting , s = Ts ( z + 1 ) )
in the equation of H(s)
(z−1) ( 4z − 4 )
(4( ( (z+1)
) ) + 0.1 ) ( (z+1)
+ 0.1 ) ( ( 4.1z − 3.9 ) ( z + 1 ) )
∴ H(z) = (z−1) ∴ H(z) = ( 4z − 4 + 0.1z + 0.1 ) ∴ H(z) =
( [4( 2
) + 0.1 ] + 16 ) ([ 2
] + 16 ) ( 16.81z 2 − 31.98z + 15.21 + 16 ( z + 1 ) 2 )
(z+1) (z+1)
( 4.1z 2 + 4.1z − 3.9z − 3.9 ) ( 4.1z 2 + 0.2z − 3.9 )
∴ H(z) = ∴ H(z) =
( 32.81z 2 + 0.02z + 31.21 ) ( 32.81z 2 + 0.02z + 31.21 )
Now,
2 ωp
Ωp = T
tan( 2
) = 12.25rad / sec
2 ωs
Ωs = T
tan( 2
) = 39.25rad / sec
Step-2: Calculation of order of filter
N≥1.72≅2
Ω c = 10.60rad / sec
when k=0;
∴ P o = − 7.49 + j7.49
when k=1;
∴ P 1 = − 7.49 − j7.49
( Ω c )N
H(s) = ( ( s − Po ) ( s − P1 ) )
( 10.60 ) 2
= ( ( s + 749 − j7.49 ) ( s + 7.49 + j7.49 ) )
112.36
∴ H(s) =
( ( s + 7.49 ) 2 + ( 7.49 ) 2 )
112.36
H(z) = ( 20 ( ( z − 1 ) + (7.49) 2 + (7.49) 2
(z+1)
1−z −1
H(z) =
( 1 − 0.5z − 1 ) ( 1 + 0.3z − 1 )
In cascade form
Here
(1−z −1)
H 1(z) =
( 1 − 0.5z − 1 )
1
H 2(z) =
( 1 + 0.3z − 1 )
Parallel Form:-
(z−1)
( z
) (z−1)z
∴ H(z) = ( ( z − 0.5 ) ( z + 0.3 ) ) = ( ( z − 0.5 ) ( z + 0.3 ) )
(
z2 )
H(z) (z−1)
∴ z
= ( ( z − 0.5 ) ( z + 0.3 ) )
Now,
H(z) ( − 0.625 ) 1.625
z
= ( z − 0.5 )
+ ( z + 0.3 )
( − 0.625 ) 1.625
H(z) = ( +
( 1 − 0.5z − 1 ) ) ( 1 + 0.3z ( − 1 ) )
Solution:
−1
h(n) = 1, 2
Taking Z transform
1
H(z) = ∑ n = 0h(n)z − n
1
= 1 − 2z −1
PutZ = e jw
1
H(w) = 1 − 2 e − jw
1
= 1 − 2 [cosw − jsinw]
1 w
H(w) = 1 − 2 cosw − jsin 2
w H(w)
0 0.5
π
0.736
4
π
1.11
2
3π
1.39
4
π 1.5
From pass band it is observed that given filter is High pass filter.
(z −1−a)
ii)H(z) =
( 1 − az − 1 )
Putz = e jw
( e − jw − a )
H(w) =
( 1 − ae − jw )
( ( cos w − jsinw ) − a )
= ( 1 − a ( cos w − jsinw ) )
( ( cos w − a ) − jsin w )
= ( ( − acos w ) + jasin w )
Assuming a=1
( ( cos ω − 1 ) − jsin w )
H(w) = ( ( 1 − cos w ) + jsinw )
w H(w)
0.1π -1
0.2π -1
0.3π -1
0.4π -1
0.5π -1
All the value of w gives same response, Hence it is all pass filter.
Now, we have
F SB
F SB = FS
= 0.25
ω S = 2πF SB = 1.57
And
F PB
F PB = FS
= 0.166
ω P = 2πF PB = 1.043
Now,
( − A) p(dB) = 20log(A p)
− 1 = 20log(A p)
A p = 0.891
And
( − A) s(dB) = 20log(A s)
− 40 = 20log(A s)
∴ A s = 0.01
2 ωP
ΩP = T
tan( 2
) = 27.583Krad / sec
2 ωS
ΩS = T
tan( 2
) = 47.969Krad / sec
∴ N = 9.54 ≅ 10
Ωc = 29.506Krad / sec
P k = Ωce ( j ( N + 2k + 1 ) 2N
When k=0
∴ P o = − 4615 + j29142
( Ω c )N
H(s) = ( ( S − P0 ) ( S − P1 ) ( S − P2 ) ( S − P3 ) ( S − P4 ) ( S − P5 ) ( S − P6 ) ( S − P7 ) ( S − P8 ) ( S − P9 ) )
Now,
ωp
Ωp = T
= 0.942rad / sec
ωs
Ωs = T
= 39.25rad / sec
N ≥ 1.73 ≅ 2
Ω c = 0.941rad / sec
Now,
when k=0;
∴ P o = − 0.665 + j0.665
when k=1;
∴ P 1 = − 0.665 − j0.665
( Ω c )N
H(s) = ( ( s − Po ) ( s − P1 ) )
0.885
= ( ( s + 0.665 − j0.665 ) ( s + 0.665 + j0.665 ) )
0.885
∴ H(s) =
( ( s + 0.665 ) 2 + ( 0.665 ) 2 )
We know that,
In IIT the impulse response of the CT system is sampled to produce the impulse response of the DT system.
∞
[
Frequency Response of DT system H(ω) = F s ∑ k = − ∞H a (ω − 2πk)F s ]
The frequency response H(ω) of the DT system is a sum of shifted copies of the frequency response H a(ω) of the
CT system. If the CT system is band-limited to a frequency less than the Nyquist frequency F s of the sampling,
then H(ω) will be approximately cqual to H a(ω) for frequencies below the F s.
Ω
In IIT, the frequency of Digital filter ω = ΩT s = Fs
, where Ω is the analog frequency.,
The relation between CT and DT frequency is linear. So, except for aliasing, the shape of the frequency response is
preserved. The mapping of points from the s-plane to the z − plane is given by the relation z = e sT. In IIT there is
many to one mapping of poles from s-plane to z-plane.
BLT is a conformal mapping which converts imaginary axis of s-plane into unit circle in z-plane. It is one to one
mapping between s-plane and z − plane. There is no aliasing effect in BLT.
In BLT , the relation between the analog frequency (Ω) and corresponding digital frequency (ω) is
2 ω ΩT
Ω= T
tan 2 or ω = 2tan − 1
( )
2
However "Tan inverse" being non-linear function causes nonlinear compression of the frequency axis. This non-
linear mapping which introduces a distortion in the frequency axis, which is called Frequency Warping.
So, the design of discrete-time filters using the BLT is useful only when this distortion can be tolerated or
compensated for, as in the case of filters that approximate ideal piecewise constant magnitude response
characteristics.
Due to Frequency Warping, phase response of analog filter cannot be preserved but magnitude response can be
preserved by pre-warping analog frequencies.
A continuous frequency response is then calculated as an interpolation of the sampled frequency response. The
approximation error would then be exactly zero at the sampling frequencies and would be finite in frequencies
between them. The smoother the frequency response being approximated, the smaller will be the error of
interpolation between the sample points.
There are two distinct types of Non-Recursive Frequency Sampling method of FIR filter design, depending on
where the initial frequency sample occurred. The type 1 designs have the initial point at ω = 0 , whereas the type 2
1 π
designs have the initial point at f = 2N
or ω = N
2πk
2) Sample H d(ω) at N -points by taking ω = ω k = N
where k = 0, 1, 2, 3, …. . . (N − 1), generate the sequence
H(k). To obtain a good approximation of the desired frequency response, a sufficiently large number of the
frequency samples should be taken. H(k) = H d(ω) | ω = 2πk / N
for k = 0, 1, …(N − 1)
3) The N-point inverse DFT of the sequence H(k) gives the impulse response of the filter h( n). For practical
realization of the filter, samples of impulse responsed should be real. This can happen if all the complex terms
appear in conjugate pairs.
when
N−1 N
N is odd UL = 2
and when N is even UL = 2
−1
4) Take z-transform of the impulse response h (n) to get the filter transfer function, H(z)
N−1
H(z) = ∑ n = 0 h(n) ⋅ z − n
H(k) = H d(ω) | ω = πk ( 2k + 1 ) / N
for k = 0, 1, …N − 1
Type 2 frequency samples give additional flexibility in the design method to specify the desired frequency
response at a second possible set of frequencies.
Advantage
Unlike the window method, this technique can be used for any given magnitude response.
This method is useful for the design of non-prototype filters where the desired magnitude response can take
any irregular shape.
Major advantage of Frequency sampling method lies in the efficient frequency sampling structure, which is
obtained when most of the frequency samples are zero.
Disadvantage
One disadvantage with this method is that the frequency response obtained by interpolation is equal to the desired
frequency response only at the sampled points. At the other points, there will be a finite error present.
1. Many input signals can be filtered by one digital filter without replacing the hardware.
2. Digital filter have characteristic like linear phase response. Such characteristics are not possible to obtain in
case of analog filters.
3. The performance of digital filters does not vary with environmental parameter.
4. Unlike analog filters; the digital filters are portable.
5. From unit to unit, the performance of digital filters is repeatable.
6. Digital filters are highly flexible.
1.Speed Limitation:
In the case of digital filters. ADC and DAC are used, so the speed of digital filter depends on the conversion time
of ADC and the settling time of DAC. Similarly the speed of operation of digital filter depends on the speed of
processor. Thus the band width of the input signal processed is limited by ADC and DAC.
The accuracy of digital filter depends on the word length should be long enough to obtain the required accuracy.
The digital filter also affected by the ADC noise, resulting from the quantization of the continuous signal.
An initial design and development time for digital hardware is more than analog filters.
Chapter 3
FIR Digital Filters
Content
2.H2(z) = 1 − z − 1 − 6z − 2
5 3
3.H3(z) = 1 − 2 z − 1 − 2 z − 2
5 2
4.H4(z) = 1 − 2 z − 1 − 3 z − 2
i) H(z) = 6 + z − 1 + 6z − 2
1 6
=6+ z
+ z2
( 6z 2 + z + 6 )
=
z2
Poles: 0, 0
Zeros:-0.08±0.99j
z 1 = 0.99∠85.38°
z 2 = 0.99∠85.38°
Both the zeros lie inside the unit circle, poles are also at origin. Hence , the system is “Stable Minimum phase”
ii)H 2(z) = 1 − z − 1 − 6z − 2
1 6
=1− −
z z2
( z2 − z − 6 )
= z2
Poles: 0, 0 Zeros: 3, -2
Both the zeros lie outside the unit circle, poles are at origin. Hence, the system is “Stable Maximum Phase”
5 3
iii)H 3(z) = 1 − −1 −
2z 2z − 2
5 3
=1− −
2z 2z 2
5 3
z 2 − 2z − 2
=
z2
One of the zero is inside the unit circle and other is outside the unit circle and poles are at origin. Hence the system
is “Stable Mixed Phase”
5 2
iv) H 4(z) = 1 − −1 −
2z 3z − 2
5 2
=1− 2z
− 3z
5 2
z 2 − 2z − 3
=
z2
One of the zero is inside the unit circle and other one is outside the unit circle and poles are at origin. Hence, the
system is “Stable Mixed Phase”.
z = ej ω
M−1
∴ H(e j ω ) ∑ n = 0 h(n)z − j ω n
The phase delay (T_p) and group delay (T_g)are given by,
(−ϕ(ω))
Tp = ω
and
( −dϕ ( ω ) )
Tg = dω
(M−1)
The parameter T is constant phase delay parameter and it is given by 2
If the phase delay and group delay are constant then such filters are called as linear phase filters. The condition for
linear phase in terms of delay parameter is:
ϕ(ω)=-ωT
h(n)=h(M-1-n)
If only constant group delay is considered then the Linear phase condition is,
h(n)=-h(M-1-n)
We know that,
$H(z)=∑_{n=0}^{N-1}h(n) z^{-n}$…………………(3)
Put the value of h(n) from equation (2) to equation (3), we get
j2 π kn
N−1 1 N−1
H(z) = ∑ n = 0 N ∑ k = 0 H(k)e N z −n
1 j2 π kn
N−1 N−1
H(z) = N
∑ k = 0 H(k) ∑ n = 0 e N z −n
We know that, e j2 π k = 1
We have,
Taking z transform
i) Put ω=0
b
H(0) = ( 1 − 0.9 )
=1
b=0.1
ii) We have,
0.1
H(ω) =
( 1 − 0.9e − j ω )
0.1
= ( 1 − 0.9 ( cos ω − jsin ω )
0.1
H(ω) = ( ( 1 − 0.9cos ω ) )
H d(e j ω ) = | H(ω) | e − j ∝ ω ; − ω c ≤ ω ≤ ω c
But N=M=7
We know that,
(N−1)
∝= 2
=3
Therefore,
=0 ; otherwise
1 − 0.4 π ) 1 0.6 π
= ∫
2 π − 0.6 π
e j ω ne − j3 ω dω + ∫
2 π 0.4 π
e − j3 ω e j ω ndω
1 − 0.4 π 1 0.6 π
= ∫
2 π − 0.6 π
e j ω ( n − 3 ) dω + ∫
2 π 0.4 π
ej ( n − 3 ) ω d
1 ej ( n − 3 ) ω − 0.4 π 1 e j ( n − 3 ) ω 0.6 π
= [ ]
2 π ( j ( n − 3 ) − 0.6 π
+ [ ]
2 π ( j ( n − 3 ) 0.4 π
1
= π (n−3)
[sin[0.6π(n − 3)] − sin[0.4π(n − 3)]]
[ 0.4 π ( n − 3 ) ] )
h d(n) = (sin[0.6π(n − 3)] − π (n−3)
By L-Hospital’s Rule
h d(n) = 0.2
W(1)=0.31=W(5)
W(2)=0.77=W(4)
W(3)=1
h(0)=0=h(6)
h(1)=-0.057=h(5)
h(2)=0=h(4)
h(3)=0.2
H(z) = ∑ N −1
n=0
h(n)z − n
6
∴ H(z) = ∑ n = h(n)z − n )
=0 ; otherwise
3π
1
= ∫4
2π ( −3π )
e − j3 ω e j ω ndω
4
3π
1
= ∫4
2π ( −3π )
e j ( n − 3 ) ω dω
4
3π
−j(n−3) )
1 3π 4
= 2π
[(e j ( n − 3 ) 4 −e (j(n−3) ]
3π
−j(n−3) ))
1 3π 4
= π (n−3)
[(e j ( n − 3 ) 4 −e 2j ]
3π
sin 4
(n−3)
h d(n) = ( π (n−3)
By L-Hospital’s Rule
h d(3) = 0.75
W(0)=0.08=W(6)
W(1)=0.31=W(5)
W(2)=0.77=W(4)
W(3)=1
h(0)=0.006=W(6)
h(1)=-0.049=W(5)
h(2)=0.173=W(4)
h(3)=0.75
N = 7 ∝= 3ω c = − 1 < ω < 1
1 1
= ∫ e − j3 ω e j ω nd
2π −1
1 1
= ∫ e j ( n − 3 ) ω dω
2π −1
1 j(n−3) ω )
1
= 2π
[e (j(n−3) ) ] −1
1 −j(n−3) ) )
= ( π (n−3) )
[(e j ( n − 3 ) − e 2j ]
sin ( n − 3 )
h d(n) = ( π (n−3) )
By L-Hospital’s Rule
h d(3) = 0.318
W(0)=0.08=ω(6)
W(1)=0.31=ω(5)
W(2)=0.77=ω(4)
W(3)=1
h(0)=0.0012=h(6)
h(1)=0.044=h(5)
h(2)=0.205=h(4)
h(3)=0.318
We know that
2πk
H(k) = H(ω) ( ω = N
) ………(1)
H(e j ω ) = e − j3 ω
Here ∝=3
(N−1)
And ∝= 2
∴N=7
π 2πk
= 0; 2
≤ 7
≤π
( − j6 π k ) 7π
∴ H(k) = e 7 ;0 ≤ k ≤ 4π
7π 7π
= 0; 4π
≤k≤ 2π
( − j6 π k )
∴ H(k) = e 7 ;0 ≤ k ≤ 2
= 0; 2 ≤ k ≤ 4
Now , Here K is vary from 0 to 2
When k=0
∴ H(0) = 1
When k=1
( − j6 π )
∴ H(1) = e 7
When K=2
( − j12 π )
∴ H(2) = e 7
It is a two pole bandpass filter, having a pair of complex conjugate poles located near the unit circle.
The frequency magnitude response resonates near the location of poles. It is having large magnitude response.
We can select two zeros & two poles system to represent digital resonator
( b oz 2 )
H(z) =
( z − re ( j ω 0 ) ) ( z − re ( − j ω 0 ) )
Notch filter are used to remove the specific frequency components from the total frequency response.
The notch filter contains ideally nulls in the frequency response characteristics.
The nulls are obtained at the frequencies ω 0andω 1. To obtain null at ω 0a pair of complex conjugate zero is
introduced on unit circle.
Z 1, 2 = e ± j ω 0
Bandwidth is relatively large. So that frequency components round the nulls are also affected.
Chapter 4
Finite Word length effects in Digital Filters
Content
Quantization in FIR
Truncation and Rounding
Cycle oscillations
Floating Point realization
Finite word length effects
Scaling FIR
Digital FIR filters are designed such that they have linear phase characteristics in the pass band, if FIR filters
are realized using Direct Form realization in linear phase is maintained even when quantization of the filter is
done.
Quantization does not affect the phase characteristics of FIR filter, but it affects the magnitude response.
To avoid this affect, the cascade form realization should be used and 12 to 14 beats should be used to
represent the coefficients.
Similarly the number of bits for coefficient must be increased to maintain the same and in the frequency
response of characteristics of the filter.
Let us consider each filter coefficient is rounded to (b + 1) bits, then the maximum error in the
coefficient value is bounded as:
where, each variable is represented by a fixed number of bits. Typically the input and output samples, x(n-m) and
y(n), are each represented by 12 bit in the coefficients by 16 bits and two's complement format.
• Output of the filter is obtained as a sum of product of h(m) and x(n-m). After each multiplication the product
contains more bit then either h(m) or x(n-m).
• For example, if 12 bit input is multiplied by 16 bit coefficient, result is 28 bit long and will need to be quantize
back to 16 bits before it can be stored in a memory or to 12 bits before it can be sent as an output of the DAC.
• This leads to error was effects are similar to those of ADC noise. The common way to quantize the result of
arithmetic operation is either:
(i) Truncate the result, i.e. to retain the MSB and to discard the LSB.
(ii) To round of the results, i.e. to choose the higher order bits closest to the unrounded results. This is achieved by
adding half an LSB to the results.
• Round-off errors can be minimized by representing all products exactly with the double length register, and then
rounding the results after obtaining the final sum.
• Digital Signal Processing the computations like FFT algorithm, ADC and filter designs are associated with
numbers and coefficients.
• These numbers and coefficients are stored in a finite length registers but due to mathematical manipulations
perform with fixed point arithmetic number of errors are present by storing the numbers and coefficients are
required to quantize the different type of number representations are used for this purpose.
• The implementation of digital filters involves the use of finite precision arithmetic. This leads to quantization of
the filter coefficients and the results of the arithmetic operations. Such quantization operations are nonlinear and
cause a filter response substantially different from the response of the underlying infinite-precision model.
• Finite word length of the signals to be processed the finite word length of the filter coefficients does not affect the
linearity of the filter behavior. This effect only amounts to restrictions on the linear filter characteristics, resulting
in discrete grids of pole-zero patterns.
• These effects, which divide into those due to "signal quantization" and those due to "overflow".
This creates undesired oscillations at the output, hence results in nonlinearity. It becomes difficult to analyze
the digital filter precisely.
To limit this overflow it is required to scale the input signal and unit sample response. This scaling is done
between the input and any internal summing node in the system.
Let us assume that YK denotes the response of the system at kth node, for the input x(n) and let hk(n) be the
impulse response of the system.
According to the definition of convolution:
∞
y k(n) = ∑ k = − ∞ h k(m). x(n − m)
∞
| y k(n) | ≤ A x ∑ m = − ∞ | h k(m) |
1
Ax ≤ ∞
( ∑m = − ∞ | hk ( m ) | )
This is the necessary and sufficient condition to prevent overflow in the system. It means to avoid the overflow,
proper dynamic scaling should be done at that particular node.
Chapter 5
DSP Processors
Content
DSP processors support various addressing modes for execution of instructions and to access data. The efficient
way of accessing data (signal sample and filter coefficients) can significantly improve implementation
performance, it provides flexible ways to access data helps in writing programs. Data addressing modes enhance
DSP implementation, DSP processors addressing modes are:
Operand is explicitly known in value, capability to include data as part of the instruction
Instruction Operation
ADD #imm #imm #imm+ A->A
#imm: value represented by imm (fixed number such as filter coefficients is known ahead of time)
A: accumulator register
Operand is always in processor register reg, it provides capability to reference data through its register
Instruction Operation
ADD Reg Reg + A->A
A: accumulator register.
• Direct Addressing Mode
Operand is always in memory location mem, provides capability to reference data by giving its memory location
directly.
Instruction Operation
ADD Mem Mem + A->A
Mem: specified memory location provides operand (e.g., memory could hold input signal value).
A: accumulator register
Operand memory location is variable, operand address is given by the value of register Addrreg, operand accessed
using pointer Addrreg.
Instruction Operation
ADD *Addrreg *Addrreg + A->A
A: accumulator register.
i.Circular Addressing Mode: Circular buffer allows one to handle a continuous stream of incoming data samples;
once the end of the buffer is reached, samples are added to the beginning again.
ii.Bit-Reversed Addressing Mode: Address generation unit can be provided with the capability of providing bit-
reversed indices.
2) Decoding of instruction.
4) Execution of instruction
Now each of the above steps (micro-instruction) can be carried out separately by 5 functional units in CPU.
Suppose each micro instruction requires same amount of execution time.
In a conventional processor, CPU processes only one instruction at a time, so each functional unit is busy only
for one-fifth time period. But in case of processes which use pipelining all these 5 micro-instructions can be
carried out simultaneously in the CPU
iv. Two 32-bit store data buses namely ST1 and ST2.
v. A 32-bit Direct Memory Access (DMA) data bus and 32-Bit DMA address bus.
vi. External memory is accessed through a bit 20-Bit address bus and 32-Bit data bus.
1.EDMA (Enhanced Direct Memory Access): It has 16 Programmable channels and RAM space to hold multiple
configurations. It makes the movement of data from one place in memory to the other place without interfering
with CPU operation.
2.Boot Loader: It boots the code from HPI to internal memory. It is basically used to determine what actions the
DSP performs; when the device is reset.
3.McBSP (Multichannel Buffered Serial Port): It provides high speed multi-channel serial communication link.
This port can buffer serial samples in memory automatically with the help of a EDMA controller. It is also having
multichannel capability which is compatible with various networking standards.
4.HPI (Host Port Interference): It allows the host to access internal memory. The host and CPU can exchange
the data via internal memory.
5.Time and Power down unit: Two 32-Bit general purpose timer and used to time events, count events, general
pulses, interrupt the CPU etc. This unit also sends synchronization event to DMA controller. Power down unit is
used to save the power for duration when CPU is inactive.
6.EMI (External Memory Interface): This block supports an interface to several external devices, like
synchronous burst, asynchronous devices, external shared memory device.
Sr
Fixed Point Implementation Floating Point Implementation
no
It has limited dynamic range. For example It has large dynamic range. For example single bit positive
1 16-Bit integer represents a maximum range number has range 2 − 149 to (3.409 × 10) 38 and double precision
65,536. number has a range ( − 10) − 308 to (10) 308.
Difference between two successive number
The difference between two successive small valued number
2 whether it is small valued or large valued
large valued number is different.
remains same.
Error due to rounding and truncation are
3 Floating point representation gives larger precision.
large; so it has less precision
Output of multiply and add stage produces
4 Due to large dynamic range such errors are not produced.
error in the algorithm.
5 Software implementation is complicated. Software implementation is easy.
6 Less computational power. More computational power.
Addition of two numbers does not affect the
7 Addition of two number, usually affect the precision.
precision.
Rounding and truncation must be a part of
8 It is not necessary to specify rounding and truncation.
program.
Overflow error occurs because the size of
The size of intermediate register is around 80-Bits, so overflow
9 intermediate register is comparatively
error does not occur.
small.
Requires less registers and less number of
10 Requires large registers and more number of input-output pins.
input-output pins.
Chapter 6
Applications of Digital Signal Processing
Content
Application of DSP
• Dual Tone Multi-Frequency or DTMF is a method for instructing a telephone switching system of the telephone
number to be dialed, or to issue commands to switching systems or related telephony equipment.
• The DTMF dialing system follow the technique proposed by AT&T in the 1950s called MF (Multi-Frequency)
which was deployed within the AT&T telephone network to direct calls between switching facilities using in-band
signaling.
• The DTMF system uses eight different frequency signals transmitted in pairs to represent sixteen different
numbers, symbols and letters. This table shows how the frequencies are organized:
• The frequencies used were chosen to prevent any harmonics from being incorrectly detected by the receiver as
some other DTMF frequency. The transmitter of a DTMF signal simultaneously sends one frequency from the
high-group and one frequency from the low-group.
• This pair of signals represents the digit or symbol shown at the intersection of row and column in the table. For
example, sending 1209Hz and 770Hz indicates that the "4" digit is being sent.
• At the transmitter, the maximum signal strength of a pair of tones must not exceed +1 dBm, and the minimum
strength is -10.5 dBm for the low-group frequencies and -8.5 dBm for the high-group frequencies.
• The DTMF telephone keypad is laid out in a 4×4 matrix of push buttons in which each row represents the low
frequency component and each column represents the high frequency component of the DTMF signal. Pressing a
key sends a combination of the row and column frequencies.
• For example, the key 1 produces a superimposition of tones of 697 and 1209 hertz (Hz). Initial pushbutton
designs employed levers, so that each button activated two contacts. The tones are decoded by the switching center
to determine the keys pressed by the user.
• DTMF was originally decoded by tuned filter banks. By the end of the 20th century, digital signal processing
became the predominant technology for decoding. DTMF decoding algorithms often use the Goertzel algorithm to
detect tones.
Discrete wavelet transform (DWT) is any wavelet transform for which the wavelets are discretely sampled. As
with other wavelet transforms, a key advantage it has over Fourier transforms is temporal resolution: it captures
both frequency and location information (location in time).
It may be considered to pair up input values, storing the difference and passing the sum. This process is repeated
recursively, pairing up the sums to provide the next scale, which leads to (2 n − 1) differences and a final sum.
Z-transform converts a discrete-time signal, which is a sequence of real or complex numbers, into a complex
frequency domain representation.
The bilateral or two-sided Z-transform of a discrete-time signal x[n] is the formal power series X(z) defined as
oo
X(z) = Zx[n] = ∑ n = − oox[n]z − n
where C is a counterclockwise closed path encircling the origin and entirely in the region of convergence (ROC).
In the case where the ROC is causal (see Example 2), this means the path C must encircle all of the poles of X(z).
Frequency domain:
Fourier transform decomposes a function of time (a signal) into the frequencies that make it up, similarly to how a
musical chord can be expressed as the amplitude (or loudness) of its constituent notes. The Fourier transform of a
function of time itself is a complex-valued function of frequency, whose absolute value represents the amount of
that frequency present in the original function, and whose complex argument is the phase offset of the basic
sinusoid in that frequency. The Fourier transform is called the frequency domain representation of the original
signal. The term Fourier transform refers to both the frequency domain representation and the mathematical
operation that associates the frequency domain representation to a function of time
For a square image of size N×N, the two-dimensional DFT is given by:
Time domain:
The most common processing approach in the time or space domain is enhancement of the input signal through a
method called filtering. Digital filtering generally consists of some linear transformation of a number of
surrounding samples around the current sample of the input or output signal. There are various ways to
characterize filters; for example:
(i) A "linear" filter is a linear transformation of input samples; other filters are "non-linear". Linear filters satisfy
the superposition condition, i.e. if an input is a weighted linear combination of different signals, the output is a
similarly weighted linear combination of the corresponding output signals.
(ii) A "causal" filter uses only previous samples of the input or output signals; while a "non-causal" filter uses
future input samples. A non-causal filter can usually be changed into a causal filter by adding a delay to it.
(iii) A "time-invariant" filter has constant properties over time; other filters such as adaptive filters change in time.
(iv) A "stable" filter produces an output that converges to a constant value with time, or remains bounded within a
finite interval. An "unstable" filter can produce an output that grows without bounds, with bounded or even zero
input.
Then, the signals from each track are manipulated by the sound engineer to add special audio effects and are
combined in a mix-down system to finally generate the stereo recording on a two-track tape recorder.
The audio effects are artificially generated using various signal processing circuits and devices, and they are
increasingly being performed using digital signal processing techniques.
Echoes are simply generated by delay units. For example, the direct sound and a single echo appearing R sampling
periods later can be simply generated by the FIR filter shown in figure, which is characterized by the difference
equation:
To generate a fixed number of multiple echoes spaced R sampling periods apart with exponentially decaying
amplitudes, one can use an FIR filter with a transfer function of the form
H(z) = 1 + az − R + a 2z − 2R + a 3z − 3R + ⋯
3.Reverberation:
The sound reaching the listener in a closed space, such as a concert hall, consists of several components: direct
sound, early reflections, and reverberation. The early reflections are composed of several closely spaced echoes
that are basically delayed and attenuated copies of the direct sound, whereas the reverberation is composed of
densely packed echoes. The sound recorded in an inert studio is different from that recorded inside a closed space,
and, as a result, the former does not sound “natural” to a listener. However, digital filtering can be employed to
convert the sound recorded in an inert studio into a natural-sounding one by artificially creating the echoes and
adding them to the original signal.
4.Flanging
There are a number of special sound effects that are often used in the mix-down process. One such effect is called
flanging. Originally, it was created by feeding the same musical piece to two tape recorders and then combining
their delayed outputs while varying the difference between their delay times. Filter used for generation of flanging
is given in figure below:
One way of varying Δt is to slow down one of the tape recorders by placing the operator’s thumb on the flange of
the feed reel, which led to the name flanging. The corresponding input–output relation is then given by:
y(n) = x(n) + ax[n − β(n)]
Congratulations! you've done it.
Hope you found this book useful. We'd love to hear your comments. Just send them over to [email protected]
.
Answer:
— Found repeated in "+ paper_year + " • "+ lesson_no +" • "+ seq_num +"
"); // 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"); } }); } });
OceanofPDF.com