0% found this document useful (0 votes)
95 views37 pages

2 CS2403 Formula

This document contains important formulas and concepts related to digital signal processing including signals and systems, sampling theorem, discrete time signals, discrete time systems, z-transform and region of convergence. Key applications of DSP include telecommunications, military, consumer electronics, instrumentation and control.

Uploaded by

sakthirsivarajan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views37 pages

2 CS2403 Formula

This document contains important formulas and concepts related to digital signal processing including signals and systems, sampling theorem, discrete time signals, discrete time systems, z-transform and region of convergence. Key applications of DSP include telecommunications, military, consumer electronics, instrumentation and control.

Uploaded by

sakthirsivarajan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Om Sakthi

Adhiparasakthi Engineering College, Melmaruvathur – 603319


Department of Electronics and Communication Engineering
CS2403 Digital Signal Processing
Important Formulas and Concepts:
Unit I Signals and Systems
Basic Elements of DSP:

Advantages of DSP over ASP:


Stable, reliable, flexible, predictable, repeatable
Choose any accuracy by increasing or decreasing number of bits
Sharing of digital processor
Achieve linear phase characteristics
Multi rate processing is possible
Digital circuits connected in cascade without any loading problem
Storage of digital data very easy
For processing low frequency signal (seismic signal), analog circuits requires inductor and
capacitor of very large size, so we prefer digital processor for such application
Disadvantages of DSP over ASP:
Needs pre and post processing (ADC & DAC)
Suffer from frequency limitation
Analog circuits don’t need much power where digital circuit needs more power
consumption
Applications of DSP:
Telecommunication
Military
Consumer Electronics
Instrumentation and Control
Seismology
Image processing
Speech processing
Medicine, Signal filtering
Concept of Frequency in Analog and Digital Signal
Continuous time sinusoid signal
CS2403 Digital Signal Processing: Formula Page 1
Simple harmonic oscillation à defined by sinusoid signal as
X a ( t )= A cos ( Ωt +θ ) ,−∞<t <∞
A – amplitude of sinusoids; Ω – frequency in rad/sec; θ – phase in radians
Ω and F related as Ω=2 π F
Thus, X a (t)= A cos (2 π Ft +θ ) ,−∞ <t <∞
Properties of CT sinusoid signal
X a (t) is periodic; X a ( t )=X a (t+T p ), T p=1/ F , T p is a fundamental period of sinusoids
CT sinusoid signal with distinct frequency themselves differ
Increase in F result in increase in rate of oscillation of the signal
Relationship of sinusoid signal in terms of exponential signal
A A
X a ( t )= e j ( Ω t +θ) + e− j (Ω t +θ) ,−∞< t<∞
2 2
Sinusoidal signal à adding two equal amplitude complex conjugate exponential signal
Positive frequency à counter clockwise uniform angular motion
Negative frequency à clockwise uniform angular motion
Discrete time sinusoid signal
The DT sinusoid signal expressed as
X (n)= A cos(ω n+θ),−∞< n<∞
A – amplitude of sinusoids; ω – frequency in rad/samples; θ – phase in radians; ω and f
related as ω=2 π f
Thus, X (n)= A cos(2 π fn +θ) ,−∞ <n< ∞
Properties of DT sinusoid signal
X (n) is periodic only if its frequency is rational number; X (n+ N )=X (n), smallest value of N
is fundamental period
DT sinusoids whose frequency separated by an integer multiples of 2π are identical
The highest rate of oscillation in a discrete time sinusoids is attained when ω=π (or ω=−π)
or equivalently f =½ (or f =−½)
Relationship of sinusoid signal in terms of exponential signal
A A
X ( n ) = e j (ω n +θ) + e− j( ω n+θ ) ,−∞< n<∞
2 2
Sinusoidal signal à adding two equal amplitude complex conjugate exponential signal
Positive frequency à counter clockwise uniform angular motion
Negative frequency à clockwise uniform angular motion
Sampling Theorem
Sampling à continuous time to discrete time signal
Sampling performed by taking samples of CT signal at definite interval of time
Time interval between successive samples à sampling time
Inverse of sampling period à sampling frequency Fs.
x (n)=x a ( t ) /¿ t=nT ¿
If highest frequency of analog signal is X a ( t ) is F max=B and signal is sampled at F s >2 F max ≈ 2 B
, then X a ( t ) can easily extracted from its sample value using interpolation function

CS2403 Digital Signal Processing: Formula Page 2


sin ( 2 π Bt )
g (t)=
2 π Bt
Sampling rate F s=2 B=2 Fmax , Nyquist rate
Discrete Time Signals
Representation of Signals
Functional representation
Tabular representation
Sequence representation
Graphical representation
Some elementary DT Signals:
Unit sample sequence
δ (n)=1 for n=0; δ (n)=0 for n ≠ 0
Unit step sequence
u(n)=1 for n ≥ 0; u(n)=0 for n<0
Unit ramp sequence
r ( n)=n for n≥ 0; r ( n)=0 for n<0
Exponential sequence:
x (n)=an for all n
a> 1
Grows exponentially
0< a<1
Decays exponentially
a←1
Grows exponentially; Alternates between +ve and –ve
−1<a< 0
Decays exponentially; Alternates between +ve and –ve
Discrete Time Sinusoid Signal:
x (n)= A cos (ω 0 n+θ);−∞ <n<+ ∞
x (n)= A sin( ω0 n+θ);−∞< n<+∞
ω 0 – frequency in radians/ sample
θ – phase in radians
ω0
f 0=

Deterministic Signal: Nature and amplitude of signal can be predicted
Random Signal: Nature and amplitude of signal cannot be predicted
Periodic Signal: x (n+ N )=x (n) ,−∞< n<∞
Aperiodic Signal: x (n+ N )≠ x (n),−∞< n<∞
Even Signal: x (n)=x (−n)
Odd Signal: x (n)=−x (−n)
1
Even component of signal: x even (n)= ( x ( n )+ x (−n ))
2

CS2403 Digital Signal Processing: Formula Page 3


1
Odd component of signal: x odd (n)= ( x ( n )−x (−n ) )
2
Causal Signal: Right Sided Sequence, x (n)=0 , n< 0, x ( n ) defined at n ≥ 0;
Non Causal Signal: Two Sided Sequence, x ( n ) defined at both n ≥ 0 and n> 0;
Anti Causal Signal: Left Sided Sequence, x ( n ) defined at n ≤ 0.
Energy and Power Signal:
 Energy signal: finite energy and zero average power
 Power signal: infinite energy and finite average power
 Energy of the signal:
N
2
E= lim ∑ |x ( n )|
N → ∞ n=−N

 Power of the Signal:


N
1 2
P= lim ∑ |x ( n )|
N → ∞ 2 N +1 n=−N

Discrete Time Systems


Representation of Systems:
Block diagram representation
Signal flow graph
Element Block Diagram Signal flow Graph
Representation
Adder

Constant
Multiplier
Unit delay
element
Unit advance
element
Classification of Systems
Static System:
Output depends on present input not on past or future input
No memory
Dynamic System:
Output depends on both present and past input
Has a memory
Linear System: Superposition principle holds
H[a*x(n)+b*y(n)]=a*H[x(n)]+b*H[y(n)]
Non Linear System: Superposition principle does not holds
Time Inariant System: Input Output relationship does not vary with time
H[x(n-k)]=y(n-k)
Time Variant System: Input Output relationship vary with time

CS2403 Digital Signal Processing: Formula Page 4


Linear Time Invariant (LTI) System: System which satisfy both linearity and time
invariant condition called LTI System
Causal System: Output depends only on present and past input and does not depends on
future input
Non Causal System: Output depends on present, past and future input
Stable and Unstable System:
System said to be bounded input bounded output (BIBO) stable, if every bounded input
produces bounded output
Bounded signal has amplitude which remains finite
BIBO stable system produces bounded output for any bounded input so that it does not
grow unreasonable large
Conditions:
If system transfer function is a rational fraction, then degree of numerator must no longer
than degree of denominator
Poles lie in left half plane of S – plane or within unit circle in Z – plane
No repeated poles lie on the imaginary axis
Analysis of Discrete Time LTI Systems
Techniques for the analysis of linear system:
Input output equation for system
y (n)=F { y ( n−1 ) , y ( n−2 ) , … … … , y ( n−N ) , x ( n ) , x ( n−1 ) , … … … , x ( n−N ) }
For an LTI system, input output relationship can be expressed as
M N
y ( n )=∑ bk x ( n−k ) −∑ a k y ( n−k )
k=0 k=1

This input output relationship is called difference equation


Response of LTI systems to arbitrary inputs: The Convolution Sum:

y ( n )= ∑ x ( k ) h ( n−k )
k=−∞

Properties of Convolution:
Commutative Property:
x (n)∗h(n)=h (n)∗x (n)
Associative Property:
[ x(n)∗h(n)]∗z (n)=x (n)∗[h(n)∗z( n)]
Distributive Property:
x (n)∗[h(n)+ z (n)]=[x ( n)∗h(n)]+[x ( n)∗z (n)]
Condition for Stability of LTI Systems:

∑ |h ( n )|< ∞
n=−∞

FIR System: Finite number of samples, Requires a memory of length N, Described by a


difference equation,
N−1
y ( n )= ∑ b k x ( n−k )
k=0
IIR System: Infinite number of samples, Requires a infinite memory, Described by a
difference equation,

CS2403 Digital Signal Processing: Formula Page 5


M N
y ( n )=∑ bk x ( n−k ) −∑ a k y ( n−k )
k=0 k=1

Z Transform
Two Sided Z Transform:

X ( z )=Z [ x ( n ) ]= ∑ x ( n ) z−n
n=−∞

One Sided Z Transform:



X ( z )=Z [ x ( n ) ]=∑ x ( n ) z −n
n=0

Inverse Z transform:
1
x ( n )= ∮ X ( z ) z n−1 dz
2 πj
ROC
Definition:
ROC (Region of Convergence) of X ( z ) is the set of all values of z, for which X ( z ) attains a
finite value.
Properties:
ROC of X ( z ) is a ring or disk in Z plane, with center at origin.
If x ( n ) is finite duration right sided (causal) signal, then the ROC is entire Z plane except
z=0.
If x ( n ) is finite duration left sided (anti causal) signal, then the ROC is entire Z plane except
z=∞.
If x ( n ) is finite duration two sided (non causal) signal, then the ROC is entire Z plane except
z=0and z=∞.
If x ( n ) is infinite duration right sided (causal) signal, then ROC is exterior of the circle of
radius r 1.
If x ( n ) is infinite duration left sided (anti causal) signal, then ROC is interior of the circle of
radius r 2.
If x ( n ) is infinite duration both sided (non causal) signal, then ROC is the region in between
two circles of radius r 1and r 2.
If X ( z ) is rational, then ROC does not include any poles of X ( z ).
If X ( z ) is rational, and if x ( n ) is right sided (causal), then ROC is exterior of the circle whose
radius corresponds to the pole with largest magnitude.
If X ( z ) is rational, and if x ( n ) is left sided (anti causal), then ROC is interior of the circle
whose radius corresponds to the pole with smallest magnitude.
If X ( z ) is rational, and if x ( n ) is two sided (non causal), then ROC is region in between two
circles whose radius corresponds to the pole of causal part with largest magnitude and
pole of anti causal with smallest magnitude.
Properties of Z Transform
Linearity Property:
Z { ax ( n ) +by ( n ) } =aZ [ x ( n ) ] +bZ [ y ( n ) ] =aX ( z ) + bY ( z )

CS2403 Digital Signal Processing: Formula Page 6


Proof:

Z [ ax ( n ) +by ( n ) ] = ∑ [ ax ( n ) +by ( n ) ] z−n
n=−∞
∞ ∞
−n
Z [ ax ( n ) +by ( n ) ] = ∑ ax ( n ) z + ∑ by ( n ) z−n
n=−∞ n=−∞
∞ ∞
Z [ ax ( n ) +by ( n ) ] =a ∑ x ( n ) z−n +b ∑ y ( n ) z−n
n=−∞ n=−∞
Z [ ax ( n ) +by ( n ) ]=aX ( z ) +bY ( z )
Multiplication by exponential sequence a n:
z
Z [ a n x ( n ) ]= X
a()
Proof:

Z [ x ( n ) ] = ∑ x ( n ) z−n
n=−∞

Z [ a n x ( n ) ]= ∑ a n x ( n ) z−n
n=−∞

−n
Z [ a n x ( n ) ]= ∑ x ( n ) ( a−1 z )
n=−∞
n
Z [ a x ( n ) ]= X ( a−1 z )
z
Z [ a n x ( n ) ]= X
a ()
Multiplication by n:
dX ( z )
Z [ nx ( n ) ]=−z
dz
Proof:

X ( z )= ∑ x ( n ) z−n
n=−∞

dX ( z ) d ∞
dz
=
( ∑ x ( n ) z−n
dz n=−∞

)
dX ( z ) d
= ∑ x ( n ) ( z−n )
dz n=−∞ dz

dX ( z )
= ∑ x ( n ) (−n z −n−1 )
dz n=−∞

dX z )
(
−z = ∑ ( nx ( n )) z−1
dz n=−∞
dX ( z )
−z =Z [ nx ( n ) ]
dz
dX ( z )
Z [ nx ( n ) ]=−z
dz
Shifting property:
If Z [ x ( n ) ] =X ( z ), then
Z [ x ( n−m ) ] =z−m X ( z )
CS2403 Digital Signal Processing: Formula Page 7
Z [ x ( n+ m ) ]=z m X ( z )
Proof:

Z [ x ( n−m ) ]= ∑ x ( n−m ) z −n
n=−∞
Let p=n−m, then n= p+m
If n=−∞, then p=−∞
If n=∞, then p=∞

Z [ x ( n−m ) ]= ∑ x ( p ) z−( p +m)
p=−∞

Z [ x ( n−m ) ] = ∑ x ( p ) z− p z −m
p=−∞

Z [ x ( n−m ) ] =z−m ∑ x ( p ) z− p
p=−∞
Z [ x ( n−m ) ] =z−m X ( z )
Similarly, we can prove
Z [ x ( n−m ) ]=z m X ( z )
Convolution Theorem:
If Z [ x ( n ) ] =X ( z ) and Z [ y ( n ) ] =Y ( z ), then Z [ x ( n )∗y ( n ) ]= X ( z ) Y ( z )
where,

x ( n )∗y ( n )= ∑ x ( m ) y ( n−m)
m=−∞

Proof:

Z [ x ( n )∗y ( n ) ]= ∑ [ x ( n )∗y ( n ) ] z−n
n =−∞
∞ ∞
Z [ x ( n )∗y ( n ) ]= ∑ ∑ x ( m ) y ( n−m ) z −n
n =−∞ m=−∞
Let p=n−m, then n= p+m
∞ ∞
Z [ x ( n )∗y ( n ) ]= ∑ ∑ x ( m ) y ( p ) z−( p +m)
p =−∞ m=−∞
∞ ∞
Z [ x ( n )∗y ( n ) ] = ∑ x ( m ) z−m ∑ y ( p ) z− p
m =−∞ p=−∞
Z [ x ( n )∗y ( n ) ]= X ( z ) Y ( z )
Initial Value Theorem:
If Z [ x ( n ) ] =X ( z ), then
x ( 0 )=lim X ( z )
z →∞

Proof:

X ( z )=∑ x ( n ) z−n
n=0
x (1) x (2)
X ( z )=x ( 0 ) + + 2 +………¿∞
z z
Taking limit z → ∞,
lim X ( z ) =x ( 0 )
z →∞

CS2403 Digital Signal Processing: Formula Page 8


Final Value Theorem:
If Z [ x ( n ) ] =X ( z ), then
x ( ∞ )=lim ( 1−z−1 ) X ( z )
z→1
Inverse Z Transform
Residue Method
Long Division Method
Partial Fraction Method
Convolution
Linear Convolution

y ( n )= ∑ x ( k ) h ( n−k )
k=−∞

Circular Convolution:
N−1
x 3 ( n )=x 1 ( n ) ○ x 2 ( n )= ∑ x 1 ( m ) x2 ( ( n−m ) )N
m=0
N−1
x 3 ( n )=x 2 ( n ) ○ x 1 ( n )= ∑ x 2 ( m ) x1 ( ( n−m ) )N
m=0

Various Methods of calculating both Linear and Circular Convolution between two
sequences are
Graphical Method
Tabular Method
Matrix method
Correlation
Auto Correlation:

r xx ( m )= ∑ x ( n ) x ( n−m )
n=−∞

Cross Correlation:

r xy ( m) = ∑ x ( n ) y ( n−m )
n=−∞

Unit II Discrete Fourier Transform


Discrete Fourier Transform and its inverse
N −1
X ( k )= ∑ x ( n ) e− j2 πnk / N , k=0 ,1 , 2 ,… … … , N −1
n=0
N −1
1
∑ X ( k ) e j 2 πnk / N ,n=0 , 1 ,2 , … … … , N −1
x ( n )=
N k =0
8 point DFT using DITFFT Algorithm

CS2403 Digital Signal Processing: Formula Page 9


8 point DFT using DIFFFT Algorithm

Circular Convolution using DFT Method


Step 1: Find the DFT of the first input sequence x ( n ) to get X ( k ).
Step 2: Find the DFT of the second input sequence h ( n ) to get H (k ).
Step 3: Multiply both X ( k ) H ( k ) to get Y ( k ) .
Step 4: Find the IDFT for the sequence Y ( k ) to get y ( n ).
(Condition: Both sequence are equal in length and length must be 2m, i.e.,
4 , 8 ,16 ,32 , 64 , … … …)
Linear Convolution using DFT Method
Step 1: See the length of the input sequence x ( n ) and impulse sequence y ( n ). Assume iits
length as N and M respectively.
Step 2: Calculate the length of the output sequence L=N + M −1.
Step 3: Append zeros to the input and impulse sequence in accordance to the length of the
output sequence (Condition: Length must be in 2m, i.e., 4 , 8 ,16 ,32 , 64 , … … …). If the length is
not in this form, then append zero to the sequences to reach the minimum value greater
than L.

CS2403 Digital Signal Processing: Formula Page 10


Step 4: Find the DFT of the first input sequence x ( n ) to get X ( k ).
Step 5: Find the DFT of the second input sequence h ( n ) to get H (k ).
Step 6: Multiply both X ( k ) H ( k ) to get Y ( k ) .
Step 7: Find the IDFT for the sequence Y ( k ) to get y ( n ).
Overlap Add Method
Step 1: ( N−1 ) zeros are padded at the end of the impulse response sequence h ( n ) which is of
length M and a sequence of length M + N−1=L is obtained. Then, this L – point FFT is
performed and the output values are stored.
Step 2: An L – point FFT on the selected data block is performed. Here each data block has
N input data values and ( M −1 ) zeros.
Step 3: The stored frequency response of the filter, i.e., the FFT output sequence obtained
in Step 1 is multiplied by the FFT output sequence of the selected data block obtained in
Step 2.
Step 4: An L point inverse FFT is performed on the product sequence obtained in Step 3.
Step 5: The first ( M −1 ) IFFT values obtained in Step 4 is overlapped with last ( M −1 ) IFFT
values for the previous block. Then addition is done to produce the final convolution
output sequence y ( n ).
Step 6: For the next data block, go to step 2.
Overlap Save Method
Step 1: ( N−1 ) zeros are padded at the end of the impulse response h ( n ) which is of length M
and a sequence of length M + N−1=L is obtained. Then this L – point FFT is performed and
the output values are stored.
Step 2: An L – point FFT on the selected data block is performed. Here each data block
begins with the last ( M −1 ) values in the previous data block, except the first data block
which begins with ( M −1 ) zeros.
Step 3: The stored frequency response of the filter, i.e., the FFT output sequence obtained
in Step 1 is multiplied by the FFT output sequence of the selected data block obtained in
Step 2.
Step 4: An L point inverse FFT is performed on the product sequence obtained in Step 3.
Step 5: The first ( M −1 ) values from successive output of Step 4 are discarded and the last
N values of the IFFT obtained in Step 4 is saved to produce the output y ( n ).
Step 6: For the next data block, go to step 2.
Unit III IIR Filter Design
Impulse Invariant Transformation
1 1

s−a 1−eaT z−1
1 (−1 )m−1 d m−1 1
( s+ a )
m

[
( m−1 ) ! d s m−1
] −sT −1
1−e z s →a
1−e cos bT z−1
−aT
s+ a

( s+ a )2 +b2 1−2 e−aT cos bT z−1 +e−2 aT z−2
b e−aT sin bT z−1

( s+ a )2 +b2 1−2 e−aT cos bT z−1 +e−2 aT z−2
Bilinear Transformation
2 1−z−1
s→
T 1+ z −1

CS2403 Digital Signal Processing: Formula Page 11


Butterworth Low Pass Filter
Specification:

δ 1 ≤|H ( e )|≤1 , 0 ≤ω ≤ ω p
|H ( e jω )|≤ δ2 , ωs ≤ ω ≤ π
Step 1: Determination of Analog Edge Frequencies:
ωp

{
Ωp = T

T
2

ωs
, Impulse Invariant Transformation

tan
ωp
2
, Bilinear Transformation

{
Ω s= T

T
2
, Impulse Invariant Tran sformation
ω
tan s , Bilinear Transformation
2
Step 2: Determination of Order of the Filter:
1 1

N≥
1 {( ) ( )}
log 2 −1 / 2 −1
δ2 δ1
2 log ( Ω s /Ω p )
Step 3: Determination of Cut off Frequency:
Ωp
Ωc = 1 /2 N
1
( )
δ 21
−1

Step 4: Determination of Analog Transfer Function H a ( s ):


For N even,
N /2
Bk Ω2c
H a ( s )= ∏ 2 2
k=1 s +b k Ω c s+c k Ωc

For N odd,
B Ω ( N−1) /2 B k Ω 2c
H a ( s )= 0 c ∏ 2
s +c 0 Ω c k=1 s + bk Ωc s+ c k Ω 2c
where,
( 2 k−1 ) π
b k =2 sin ( 2N )
c k =1
Bk can obtained from
For N even,
N/2
A=1=∏ B k
k =1
For N odd,
¿¿
A=1=∏ ¿
k=0
Step 5: Determination of Digital Transfer Function H ( z ) :
H ( z ) can be obtained from H a ( s ) using either impulse invariant transformation or bilinear
transformation.

CS2403 Digital Signal Processing: Formula Page 12


Using Impulse Invariant Transformation:
1 1

s−a 1−eaT z−1
1 (−1 )m−1 d m−1 1
( s+ a )
m

( m−1 ) ! d s m−1
[ ] −sT −1
1−e z s →a
1−e cos bT z−1
−aT
s+ a

( s+ a )2 +b2 1−2 e−aT cos bT z−1 +e−2 aT z−2
b e−aT sin bT z−1

( s+ a )2 +b2 1−2 e−aT cos bT z−1 +e−2 aT z−2
Using Bilinear Transformation:
2 1−z−1
s→
T 1+ z −1
Chebyshev Low Pass Filter
δ 1 ≤|H ( e jω )|≤1 , 0 ≤ω ≤ ω p
|H ( e jω )|≤ δ2 , ωs ≤ ω ≤ π
Step 1: Determination of Analog Edge Frequencies:
ωp

{
Ωp = T

T
ωs
2
, Impulse Invariant Transformation
ω
tan p , Bilinear Transformation
2

{
Ω s= T
2
T
, Impulse Invariant Transformation
ωs
tan , Bilinear Transformation
2

Step 2: Determination of Order of the Filter:


1 /2
1 1

N≥
cosh−1
{( ) }
ε δ 22
−1

cosh−1 ( Ω s /Ω p )
where
1 /2
1
( )
ε = 2 −1
δ1
Step 3: Determination of Cut off Frequency:
Ωc =Ω p
Step 4: Determination of Analog Transfer Function H a ( s ):
For N even,
N /2
Bk Ω2c
H a ( s )= ∏ 2 2
k=1 s +b k Ω c s+c k Ωc

For N odd,

CS2403 Digital Signal Processing: Formula Page 13


B0 Ωc ( N−1) /2 B k Ω 2c
H a ( s )= ∏
s +c 0 Ω c k=1 s 2+ bk Ωc s+ c k Ω 2c
where,
( 2 k −1 ) π
b k =2 y N sin ( 2N )
( 2 k−1 ) π
c k = y 2N + cos2 ( 2N )
c 0= y N
1/ 2 1/ N 1/ 2 −1 / N

y N=
1
2 {[( 1
ε2
+1
) +
1
ε ] [( ) ] }1
− 2 +1
ε
+
1
ε
Bk can obtained from
For N even,
N/2
A 1 B
= =∏ k
2 1 /2 2 1 /2
( 1+ε ) ( 1+ ε ) k=1 c k

For N odd,
¿¿
A=1=∏ ¿
k=0
Step 5: Determination of Digital Transfer Function H ( z ) :
H ( z ) can be obtained from H a ( s ) using either impulse invariant transformation or bilinear
transformation.
Impulse Invariant Transformation:
1 1

s−a 1−eaT z−1
1 (−1 )m−1 d m−1 1
( s+ a )
m

( m−1 ) ! d s m−1 −sT −1
1−e z s →a [ ]
1−e cos bT z−1
−aT
s+ a

( s+ a )2 +b2 1−2 e−aT cos bT z−1 +e−2 aT z−2
b e−aT sin bT z−1

( s+ a )2 +b2 1−2 e−aT cos bT z−1 +e−2 aT z−2
Bilinear Transformation:
2 1−z−1
s→
T 1+ z −1
Frequency Transformation:
Analog Frequency Transformation:
Low pass filter with cut off frequency Ωc to Low pass filter with cut off frequency Ωc :
¿

Ωc
s→ ¿ s
Ωc
Low pass filter with cut off frequency Ωc to High pass filter with cut off frequency Ωc :
¿

Ω Ω¿
s→ c c
s
Low pass filter with cut off frequency Ωc to Band pass filter with cut off frequencyΩ1
and Ω2:

CS2403 Digital Signal Processing: Formula Page 14


s 2+Ω 1 Ω2
s →Ω c
s ( Ω 2−Ω1 )
Low pass filter with cut off frequency Ωc to Bandstop filter with cut off frequencyΩ1
and Ω2:
s ( Ω 2−Ω1 )
s →Ω c 2
s +Ω 1 Ω2
Digital Frequency Transformation:
Low pass filter with cut off frequency ω c to Low pass filter with cut off frequency ω c:
¿

−1 z −1 −a
z →
1−a z−1
where
sin [ ( ω c −ω¿c ) /2 ]
a=
sin [ ( ω c + ω¿c ) / 2 ]
Low pass filter with cut off frequency ω c to High pass filter with cut off frequency ω c:
¿

z −1 + a
−1
z →−
[1+ a z−1 ]
where
cos [ ( ω c −ω ¿c ) /2 ]
a=
cos [ ( ωc +ω¿c ) /2 ]

Low pass filter with cut off frequency ω c to Band pass filter with cut off frequencyω 1
and ω 2:
z −2 −a1 z−1+ a2
−1
z →−
[ a2 z−2−a1 z−1+1 ]
where
−2 αk
a 1=
k +1
k−1
a 2=
k +1
cos [ ( ω2 +ω 1) /2 ]
α=
cos [ ( ω2−ω 1 ) /2 ]

k =cot ( ω −ω
2
2
) 1 ω
tan ( )
2
c

Low pass filter with cut off frequency ω c to Band stop filter with cut off frequency ω 1
and ω 2:
z −2 −a1 z−1+ a2
−1
z →−
[
a2 z−2−a1 z−1+1 ]
where
−2 α
a 1=
k +1
CS2403 Digital Signal Processing: Formula Page 15
1−k
a 2=
1+ k
cos [ ( ω2 +ω 1) /2 ]
α=
cos [ ( ω2−ω 1 ) /2 ]
ω2−ω1 ω
k =tan ( 2 ) ( )
tan c
2
Unit IV FIR Filter Design
Design of FIR filter by Fourier Series Method
Given specification:
 Desired frequency response, H d ( e jω )
 Cut off frequency ω c for Low pass and High pass, and ω c1 and ω c2 for Band pass and
Band stop filter
 Sampling frequency ω s
 The number of samples, M
Ideal LPF:
1 ,−ωc ≤ω ≤ ω c

H d ( e )=

Ideal HPF:
{
0 ,ω c ≤|ω|≤ s
ω
2

0 ,−ω c ≤ ω ≤ ωc

H d ( e )=

Ideal BPF:
{
1 , ωc ≤|ω|≤ s
ω
2

1 , ωc 1 ≤|ω|≤ω c 2

Ideal BSF:
0
{
H d ( e ) = ,−ω c1 ≤ω ≤ ω c1
0 , ωc 2 ≤|ω|≤ s
ω
2

0 , ωc 1 ≤|ω|≤ω c 2

H d ( e )=
{
1 ,−ωc 1 ≤ ω ≤ ωc 1

1 , ω c2 ≤|ω|≤ s
ω
2
M −1
Note: For non ideal (practical) filter, 1 is replaced as e− jωα where α =
2
Step 1: Determination of desired impulse response h d ( n )
ωs /2
1
h d ( n )= H ( e jω ) e jωnT dω
ω s −ω∫/ 2 d
s

For ideal Low Pass Filter,


2
h d ( n )= sin ( n ω c ) , n ≠ 0
n ωs

h d ( 0 )= c
ωs
For ideal high pass filter,
CS2403 Digital Signal Processing: Formula Page 16
n ωs
h d ( n )=
2
n ωs [ ( )
sin
2
−sin ( n ω c ) , n ≠ 0 ]
2 ωs
h d ( 0 )=
ωs 2 [ −ωc ]
For ideal band pass filter,
2
h d ( n )= sin ( n ω c2 ) −sin ( n ω c1 ) ] , n ≠ 0
n ωs [
2
h d ( 0 )= [ ω c2−ωc 1 ]
ωs
For ideal band reject filter,
n ωs
h d ( n )=
2
n ωs [ ( )
sin
2 ]
−sin ( n ω c2 ) +sin ( n ω c 1) ,n ≠ 0

2 ωs
h d ( 0 )=
ωs 2 [ −ωc 2 +ω c1 ]
For non ideal Low Pass Filter,
2
h d ( n )= sin ( ( α −n ) ω c ) ,n ≠ α
( α −n ) ω s
2 ωc
h d ( α )=
ωs
For non ideal high pass filter,

h d ( n )=
2
( α −n ) ω s
sin
[ (( α−n ) ωs
2 ) ]
−sin ( ( α −n ) ω c ) , n≠ α

2 ωs
h d ( α )=
ωs 2 [ −ω c ]
For non idealband pass filter,
2
h d ( n )= [ sin (( α−n ) ωc 2 )−sin ( ( α−n ) ωc 1 ) ] , n ≠ α
( α −n ) ω s
2
h d ( α )= [ ω c 2−ω c1 ]
ωs
For non ideal band reject filter,

h d ( n )=
2
( α −n ) ω s
sin
[ (( α−n ) ωs
2 ) ]
−sin ( ( α −n ) ω c2 ) + sin ( ( α −n ) ωc 1 ) , n ≠ α

2 ωs
h d ( α )=
ωs 2 [ −ω c2 +ω c1 ]
Step 2: Calculate M samples of h d ( n ) for n=0 ¿ M −1
h ( n ) =hd ( n ) /¿ n=0 ¿ M −1
Step 3: Determination of H ( z )
M −1

H ( z ) =z
− ( M −1)
2
[ 2
h ( 0 )+ ∑ h ( n ) ( z n + z−n )

Step 4: Determination of Frequency Response


n=1
]
H ( e jω )=H ( z )/ ¿z → e ¿ jω

Design of FIR Filter using Windowing technique


CS2403 Digital Signal Processing: Formula Page 17
Filter Desired frequency response:
Low Pass Filter:
1 ,−ωc ≤ω ≤ ω c
{
H d ( e jω ) =
0 , ωc <|ω|≤ π
High Pass Filter:
0 ,−ω c ≤ ω ≤ ωc
{
H d ( e jω ) =
1 , ωc <|ω|≤ π
Band Pass Filter:
1 , ωc 1 ≤|ω|≤ω c 2

{
H d ( e ) = 0 ,−ω c1 ≤ ω ≤ω c1
0 , ω c2 ≤|ω|≤ π
Band Reject Filter:
0 , ωc 1 ≤|ω|≤ω c 2
( jω

{
H d e = 1 ,−ωc 1 ≤ ω ≤ ωc 1
)
1 , ωc 2 ≤|ω|≤ π
For non ideal (practical) filter, replace 1 by e jωα .
Step 1: Determination of h d ( n ):
π
1
h d ( n )= ∫ H d ( e jω ) e jωn dω
2 π −π
For ideal Low Pass Filter,
1
h d ( n )= sin ( n ωc ) , n≠ 0

ωc
h d ( 0 )=
π
For ideal high pass filter,
1
h d ( n )= [ sin ( nπ )−sin ( n ω c ) ] , n≠ 0

1
h d ( 0 )= [ π−ω c ]
π
For ideal band pass filter,
1
h d ( n )= [ sin ( n ωc 2 )−sin ( n ωc 1 ) ] , n≠ 0

1
h d ( 0 )= [ ω c2−ωc 1 ]
π
For ideal band reject filter,
1
h d ( n )= [ sin ( nπ )−sin ( n ω c 2) + sin ( n ωc 1 ) ] , n ≠0

1
h d ( 0 )= [ π−ω c 2+ ωc 1 ]
π
For non ideal Low Pass Filter,
1
h d ( n )= sin ( ( α −n ) ω c ) ,n ≠ α
( α −n ) π
ωc
h d ( α )=
π
For non ideal high pass filter,

CS2403 Digital Signal Processing: Formula Page 18


1
h d ( n )= [ sin ( ( α −n ) π ) −sin ( ( α −n ) ω c ) ] ,n ≠ α
( α −n ) π
1
h d ( α )= [ π−ωc ]
π
For non idealband pass filter,
1
h d ( n )= [ sin ( ( α−n ) ωc 2 )−sin ( ( α−n ) ωc 1 ) ] , n ≠ α
( α −n ) π
1
h d ( α )= [ ω c 2−ω c1 ]
π
For non ideal band reject filter,
1
h d ( n )= [ sin ( ( α −n ) π ) −sin ( ( α −n ) ω c2 ) +sin ( ( α −n ) ωc 1 ) ] , n ≠ α
( α −n ) π
1
h d ( α )= [ π−ωc 2+ ωc 1 ]
π
Step 2: Determination of h ( n ) :
h ( n ) =hd ( n ) w ( n )
wherew ( n ) is the windowing function
Step 3: Determination of Frequency Response
For non causal system,
M −1
2
H ( e jω )= ∑ h ( n ) e− jωn
n=− ( M2−1 )
For causal system,
M−1
H ( e jω )= ∑ h ( n ) e− jωn
n=0
Some of the Window Function:
Rectangular Window Function:
Causal Rectangular Window Function:
w H ( n )= 1 , 0 ≤n< M −1
{
0 , ot h erwise
Non Causal Rectangular Window Function:
M −1
wR (n)=
{
1 ,|n|≤
2
0 , ot h erwise

Hamming Window Function:


Causal Hamming Window Function:
2 πn
w H ( n )=
{
0.54−0.46 cos
M −1
,0 ≤ n< M −1
0 , ot h erwise
Non Causal Hamming Window Function:
2 πn M −1
w H ( n )=

Hanning Window Function:


{
0.54 +0.46 cos
M −1
,|n|≤
0 ,ot h erwise
2

Causal Hanning Window Function:


CS2403 Digital Signal Processing: Formula Page 19
2 πn
w Hann ( n )=
{
0.5−0.5cos

Non Causal Hanning Window Function:


M −1
, 0≤ n< M −1
0 , ot h erwise

2 πn M −1
w H ( n )=
{ 0.5+ 0.5cos

Blackmann Window Function:


M −1
0 , ot h erwise
,|n|≤
2

Causal Blackmann Window Function:


2 πn 4 πn
wB (n)=
{ 0.42−0.5 cos

Non Causal Blackmann Window Function:


M −1
+0.08 cos
0 , ot h erwise
M −1
,0 ≤ n< M −1

2 πn 4 πn M −1
wB (n)=
{
0.42+0.5 cos

Bartlett Window Function:


M −1
+0.08 cos
0 ,ot h erwise
M −1
,|n|≤
2

M −1
W bart =
{
1+n ,−

1−n , 1<n<
2
<n<1
M −1
2
Design of FIR filter by Type 1 frequency sampling method
 Choose the desired frequency response H d ( e jω )
2 πk
 Sample H d ( e jω ) at M – points by taking ω k = where k =0 , 1 ,2 , … … … , M −1, to
M
generate the sequence
H ( k )=H d ( e jω ) /¿ 2 πk for k =0 , 1, 2 , … … … , M −1¿
ω=
M
 Compute the M samples of impulse response h ( n ) using following equation
M−1

h (n)=
1
M [ 2

]
H ( 0 )+ 2 ∑ ℜ [ H ( k ) e j 2 πnk / M ] , M odd
k=1
M

[ ]
−1
2
1
h (n)= H ( 0 )+ 2 ∑ ℜ [ H ( k ) e j 2 πnk / M ] , M even
M k=1

 Take Z transform of the impulse response h ( n ) to get the filter transfer function H ( z )
M −1
H ( z ) = ∑ h ( n ) z−n
n=0
Design of FIR filter by Type 2 frequency sampling method
 Choose the desired frequency response H d ( e jω )
2 π ( 2 k +1 )
 Sample H d ( e jω ) at M – points by taking ω k = where k =0 , 1 ,2 , … … … , M −1, to
2M
generate the sequence
H ( k )=H d ( e jω ) /¿ 2 π ( 2 k+1) for k=0 ,1 , 2, … … … , M −1 ¿
ω=
2M

CS2403 Digital Signal Processing: Formula Page 20


 Compute the M samples of impulse response h ( n ) using following equation
M −3

h (n)=
2
N [ 2

∑ ℜ [ H ( k ) e j πn( 2 k+1) / M ]
k=0
M
] , M odd

[ ]
−1
2
2
h (n)= 2 ℜ [ H ( k ) e j πn (2 k+1 )/ M ] , M even
N ∑ k=0

 Take Z transform of the impulse response h ( n ) to get the filter transfer function H ( z )
M −1
H ( z ) = ∑ h ( n ) z−n
n=0
Types of Number Representation
 Fixed point representation
 Floating point representation
Fixed Point Representation
 It is a generalization of the familiar decimal representation of a number as a string of
digits with a decimal points.
 In this notation, the digits to the left of the decimal point represent the integer part of
the number and the digit to the right of the decimal point represent the fractional
part of the number.
 There are three ways to represent the negative number.
 Sign Magnitude Format: In this, the MSB is set to 1 to represent the negative sign.
Example: (−2 )10=1010
 One’s Complement Format: In this, the MSB is set to 1 and all the other digits are
represented by its complement.
Example:(−2 )10=1101
 Two’s Complement Format: In this, a negative number is represented by forming
the two’s complement of the corresponding positive number. In other words, the
negative number is obtained by subtracting the positive number from 2.
Example:(−2 )10=1' scomplement ( 2 ) +1=1101+ 1=1110
Floating Point Representation
 A floating point representation can be employed as a means for covering a large
dynamic range.
 The binary floating point representation commonly used in practice, consists of a
1
mantissa M, which is the fractional part of the number and falls in the range ≤ M <1
2
E
, multiplied by the exponential factor 2 , where the exponent E is either a positive or
negative integer.
 Hence a number X is represented by
X =M . 2 E
 Example 1: The number X =5 is represented as
5
5= 23=0.625∗23
8
Mantissa: M =( 0.625 )10= ( 0.101000 )2
Exponent: E=( 3 )10=( 011 )2
5=0.101000∗2011

CS2403 Digital Signal Processing: Formula Page 21


3
 Example 2: The number X = is represented as
8
3 6 −1
= 2 =0.75∗2−1
8 8
Mantissa: M =( 0.755 )10= ( 0.110000 )2
Exponent: E=(−1 )10=( 101 )2
3
=0.110000∗2101
8
Types of Quantization Error
 Rounding or truncation introduces an error whose magnitude depends on the
number of bits truncated or rounded off.
 Also, the characteristic of the error depends on the form of binary number
representation.
 Consider a number x , whose original length is ‘ L ’ bits.
 Let this number be quantized (truncated or rounded) to ‘ B ’ bits.
 This quantized number is represented as Q ( x ) .
 Both x and Q ( x ) are shown above.
 Note that B< L.
 A truncation error, ε T , is introduced in the input signal and thus quantized signal is
Q T =x+ ε T
 The range of values of the error due to truncation of the signal is analyzed here for
both sign magnitude and two’s complement.
 Quantization error follows the uniform distribution
Truncation Error
Truncation is defined as the removal of excessive bits. This leads to the reduction in the
magnitude of the number.
Truncation error depends on type of number representation.
Truncation Error for Fixed Point Number Representation
Range of Error
Range of Error
Representation Error (Infinite
(Finite Precision)
Precision)
Positive number Negative −B −L
−( 2 −2 ) ≤ ε T ≤0 −2−B ≤ ε T ≤0
Sign Magnitude Negative Number Positive 0 ≤ ε T ≤ ( 2− B−2−L ) 0 ≤ ε T ≤ 2−B
One’s Complement Negative
Positive 0 ≤ ε T ≤ ( 2− B−2−L ) 0 ≤ ε T ≤ 2−B
Number
Two’s Complement Negative
Negative −( 2−B−2−L ) ≤ ε T ≤0 −2−B ≤ ε T ≤0
Number
Probability Density Function for Fixed Point Number Representation
Sign Magnitude and one’s complement:
Overall range: −2−B ≤ ε T ≤2−B
2B −B −B
p ( ε T )=
,−2 ≤ ε T ≤ 2
2
Two’s Complement:
Overall range: −2−B ≤ ε T ≤0

CS2403 Digital Signal Processing: Formula Page 22


p ( ε T )=2 B ,−2−B ≤ ε T ≤0
Truncation Error for Floating Point Number Representation
Range of Error
Range of Error
Representation Error (Infinite
(Finite Precision)
Precision)
Positive Mantissa Negative −2 ( 2− B−2−L ) ≤ ε T ≤ 0 −2∗2−B ≤ ε T ≤ 0
Sign Magnitude Negative Mantissa Negative −2 ( 2− B−2−L ) ≤ ε T ≤ 0 −2∗2−B ≤ ε T ≤ 0
One’s Complement Negative
Negative −2 ( 2− B−2−L ) ≤ ε T ≤ 0 −2∗2−B ≤ ε T ≤ 0
Mantissa
Two’s Complement Negative
Positive 0 ≤ ε T ≤ 2 ( 2−B −2− L ) 0 ≤ ε T ≤ 2∗2−B
Mantissa
Probability Density Function for Floating Point Number Representation
Sign Magnitude and one’s complement:
Overall range: −2∗2−B ≤ ε T ≤ 0
2B −B
p ( ε T )=
,−2 ≤ ε T ≤ 0
2
Two’s Complement:
Overall range: −2∗2−B ≤ ε T ≤ 2∗2−B
2B −B −B
p ( ε T )= ,−2∗2 ≤ ε T ≤ 2∗2
4
Rounding Error
Rounding is defined as changing a fractional value to the nearest integer. This leads to the
decrease or increase in the magnitude of the number.
Rounding error does not depends on types of number representation
For the positive number, the rounding error is positive and for the negative number, the
rounding error is negative
Therefore, the range of rounding error is
−2−B −2− L 2− B−2−L
≤ εR ≤
2 2
For infinite precision,
−2−B 2−B
≤ εR ≤
2 2
The probability density function of the rounding error is
B 2−B 2− B
p ( ε r )=2 ,− ≤ εr ≤
2 2
Quantization effects in Analog to Digital Conversion of signals
 The process of analog to digital conversion involves
 Sampling the continuous time signal at a rate much greater than the Nyquist
rate
 Quantizing the amplitude of the sampled signal into a set of discrete amplitude
levels

CS2403 Digital Signal Processing: Formula Page 23


 In ADC, when B bits binary code is selected, we can generate 2B different binary
numbers.
 If the range of analog signal to be quantized be R , then the quantization step size is
given by
R
q=
2B
 This quantiser rounds the sampled signal to the nearest quantised output level.
 The difference between the quantised signal amplitude x Q ( n ) and the actual signal
amplitude x ( n ) is called quantization error e ( n ). That is
e ( n )=x Q ( n )−x ( n )
 Since rounding is involved in the process of quantization, the range of values for the
quantization error is
−q q
≤ e ( n) ≤
2 2
−B
−R 2 R 2−B
≤e n ≤
( )
2 2
Input Quantization Noise Power from ADC:
2
 The power of the quantization noise, which is nothing but the variance (σ e) is given
by
−B
R2
2
Pe (n )=σ 2e = ∫ e2 p ( ε R ) de
−B
−R 2
2
−B
R2
2
1
Pe ( n ) = −B ∫
e 2 de
R 2 −R2 −B

2
−B
R2
1 e3
Pe ( n ) = − B
R2 3 [ ] 2
−R 2−B
2
3 −3 B
1 R 2 R 3 2−3 B
Pe ( n ) = [
R 2− B 24
+
24 ]
1
−B
∗2∗R3 2−3 B
R2
Pe ( n ) =
24
2 −2 B
R 2
Pe ( n ) =
12
Signal to Noise Ratio:

CS2403 Digital Signal Processing: Formula Page 24


P x ( n)
SNR=10 log
P e ( n)
SNR=10 log Px (n )−10 log P e ( n)
R2 2−2 B
SNR=10 log Px (n )−10 log ( )
12
SNR=10 log Px (n )−( 10 log R +10 log 2−2 B−10 log 12 )
2

SNR=10 log Px (n )−10 log R 2+ 10 log22 B+ 10 log12


2B
SNR=10 log Px (n )−20 log R+10 log 2 +10 log 12
SNR=10 log Px (n )−20 log R+20 B log2+10 log 12
SNR=10 log Px (n )−20 log R+6 B +10.8−→ ( 4 )
Consider the range R=1V ,
SNR=10 log Px (n )+ 6 B+10.8
Dynamic Range:
 The dynamic range (DR) is given by
DR=−10 log Pe (n )=−20 log R+6 B +10.8
 Consider the range R=1V ,
DR=−10 log Pe (n )=6 B+ 10.8
Output Quantization Power from digital System:
 After converting the continuous time signal into a digital signal, let us assume that
this quantised signal is applied as an input to a digital system with a transfer
function H ( z ) .
 This quantised input to the digital systems consists of two components
 The unquantised input signal x ( n )
 The quantization error signal e ( n )
 The output of the digital system, therefore, consists of two components
 The output y Q ( n ) due to the quantised input signal
 The error output e 0 ( n ) due to the quantization error signal at the input of the digital
system
 From the figure above, it can be seen that the output Y ( n ) of the digital system is
given by
Y ( n )=Y Q ( n )+ e 0 ( n )−→ ( 1 )
 The error output e 0 ( n ) is a random process and it is the response of the digital system
to the input error signal e ( n ).
 The digital system is assumed to be causal.
 The error output e 0 ( n ) is obtained by convolving the system impulse response h ( n )
with input error signal e ( n ).
 Thus,

e 0 ( n )=∑ h ( k ) e ( n−k )−→ ( 2 )
k=0
 Let us relate the statistical characteristics of the output error signal to the statistical
characteristics of the input error signal and the characteristics of the system.
 The autocorrelation sequence for the output error signal e 0 ( n ) is
γ e e ( m )=E [ e ¿0 ( n ) e0 ( n+m ) ]−→ ( 3 )
0 0

where E represents the statistical expectation

CS2403 Digital Signal Processing: Formula Page 25


∞ ∞
γ e e ( m )=E
0 0


[ ∑ h ( k ) e¿ ( n−k ) ∑ h ( k ) e ( n+m−k )
k=0 k=0
]
γ e e ( m )=∑ h2 ( k ) E [ e ¿ ( n−k ) e ( n+ m−k ) ]
0 0
k=0

γ e e ( m )=∑ h2 ( k ) γ ee ( m )
0 0
k=0
 It has been assumed that the noise resulting from the quantization process is a
white noise. For this case,
γ e e ( m )=σ 2e
0 0 0

and
γ ee ( m ) =σ 2e
2
where, σ e is the output noise power and σ 2e is the input noise power.
0

 Thus,

σ 2e =σ 2e ∑ h2 ( n )
0
n=0
 Using Parseval’s theorem,

∑ h2 ( n )= 21πj ∮ H ( z ) H ( z −1 ) z−1 dz
n=0
 Thus,
2 σ 2e −1 −1
σe = ∮ H ( z ) H ( z ) z dz
0
2 πj
where the closed contour of integration is around the unit circle |z|=1.
Coefficient Quantization Effect
 The realization of the digital filters in hardware or software has some limitation due
to the finite word length of the registers that are available to store these filter
coefficients.
 Since the coefficients stored in these registers are either truncated or rounded off,
the system that is realized using these coefficients is not accurate.
 The location of poles and zeros of the resulting system will be different from the
original location and consequently the system may have a different frequency
response than the one desired.
 We know that the stability and system performance of a digital filter depends on the
poles and zeros location.
 Thus if the poles and zeros location are changed, then the system performance can
vary.
 For example, if we want to design a Low Pass Filter and the filter coefficients are
quantized, then it will change the system as a High Pass Filter or Band Pass Filter or
Band Reject Filer.
Product Quantization
 The error due to the quantization of the output of multiplier is referred to as product
quantization error.
 When two B – bit numbers are multiplied, the product must be rounded to B – bits in
all digital processing applications.
 The output of a finite word length multiplier can be expressed as
Q [ α i x ( n ) ]=α i x ( n ) +e ( n )
CS2403 Digital Signal Processing: Formula Page 26
whereα i x ( n ) is the product which is 2B – bit long and e ( n ) is the error resulting from
rounding the product to B – bits.
 The fixed point, finite word length multiplier can be modeled as given below:

 In digital system, the product quantization is performed by rounding due to the


following characteristics of rounding.
 In rounding the error signal is independent of the type of arithmetic employed.
 The mean value of error signal due to rounding is zero.
 The variance of the error signal due to the rounding is least.
 The analysis of product quantization error is similar to the analysis of quantization
error due to ADC.
 But, in product quantization error analysis, it is necessary to define the noise
transfer function, which depends on the structure of the digital network.
 The noise transfer function (NTF) is defined as transfer function from the noise
source to the filter output.
 NTF is the transfer function obtained by treating the noise source as actual input.
 The product quantization error signal is treated as a random process with uniform
probability distribution function.
 In general the following assumptions are made regarding the statistical
independence of the various noise sources of the digital filter.
 Any two different samples from the same noise source are uncorrelated.
 Any two different noise sources, when considered as random processes are
uncorrelated.
 Each noise source is uncorrelated with the input sequence.
Product Quantization Noise Models for IIR filter
First Order Direct Form I

Second Order Direct Form I

CS2403 Digital Signal Processing: Formula Page 27


First Order Direct Form II

Second Order Direct Form II

Cascading of two second order section

CS2403 Digital Signal Processing: Formula Page 28


Cascading of two first order section

Analysis
The average power (variance) is given by
−2 B
2 2
σ e=
12
The effects of rounding due to multiplication in cascaded IIR sections are discussed now.
Let h ( n ) be the system response and e 0 ( n ) be the response of the system to the input error
e ( n ).
Then the output noise power is given by

σ 2e =σ 2e ∑ h2 ( n )
0
n=0
Using Parseval’s relation
2 σ 2e −1 −1
σe = ∮ H ( z ) H ( z ) z dz
0
2 πj
Assume that the M cascaded sections, then the output noise power at the k th product in
the ith section is given by

2 2
σ =σ
ek e ∑ h 2i ( n )
n=0
Then the overall output noise power is given by

σ 2err=∑ σ 2ei
i=0
Limit Cycle Oscillation
 In recursive systems, when the input is zero or some nonzero constant value, the
nonlinearities due to finite precision arithmetic operators may cause periodic
oscillations in the output.
 During periodic oscillations, the output y ( n ) of a system will oscillate between a finite
positive and negative value for increasing n or the output will become constant for
increasing n.
 Such oscillations are called limit cycle oscillation.
CS2403 Digital Signal Processing: Formula Page 29
 These oscillations are due to round off errors in multiplications and overflow in
additions.
Types of Limit cycle oscillation
 Zero input limit cycle oscillation
 Overflow limit cycle oscillation
Zero input limit cycle oscillation
In recursive systems, if a system output enters a limit cycle, it will continue to remain in
limit cycle even when the input is made zero.
Hence these limit cycles are called zero input limit cycle.
Consider the difference equation of first order system with only pole as
y ( n )=ay ( n−1 ) + x ( n )
The system has one product ay ( n−1 ).
If the product is quantised to finite word length then the response y ( n ) will deviate from
actual value.
Let y ' ( n ) be the response of the system when the product is quantised in each recursive
realization. Now,
y ' ( n )=Q [ ay ( n−1 ) ] + x ( n )
whereQ stands for quantization operation.
In the first order system with only pole, the coefficient “a” will be the pole of the systems.
Let us examine the nature of response of first order system for an impulse input and
various values of poles.
For simplicity, let us choose sign magnitude representation for binary product and
response.
Let the product be quantised to five bit binary.
Let
y ' ( n )=0 , for n<0
and
15
{
x ( n )= 16
, n=0
0,n≠0
1
anda=
2
n Before rounding After rounding ( 5 bits )
Decimal Binary Binary Decimal
−1 0 0.00000 0.0000 0
0 0.9375 0.11110 0.1111 0.9375
1 0.46875 0.01111 0.1000 0.5
2 0.25 0.01000 0.0100 0.25
3 0.125 0.00100 0.0010 0.125
4 0.0625 0.00010 0.0001 0.0625
5 0.3125 0.00001 0.0001 0.0625
Dead Band
In limit cycle, the amplitudes of the output are confined to the range of values, which is
called dead band of the filter.
For a first order system described by the equation y ( n )=ay ( n−1 ) + x ( n ), the dead band is given
by

CS2403 Digital Signal Processing: Formula Page 30


2−B
Dead band=±
1−|a|
For a second order system described by the equation y ( n )=a1 y ( n−1 )+ a2 y ( n−2 ) + x ( n ), the dead
band is given by
2−B
Dead band=±
1−|a 2|
Overflow Limit Cycle
The oscillation occurs due to the truncation of output of the adder or multiplier is called
overflow limit cycle oscillations.
Methods used to prevent overflow:
 Saturation arithmetic
 Scaling
Saturation arithmetic:
In saturation arithmetic, if the output exceeds the maximum value then the output is set
to maximum value and if the output goes below the minimum value then the output is set
to minimum value.
Scaling:
Scaling can be done by scale the input at certain points in the digital filter to prevent
overflow.
Consider y ( n ) be the output of the system h ( n ) for the input x ( n ).
Then the output y ( n ) can be represented as

y ( n )= ∑ h ( k ) x ( n−k )
k=−∞
Apply magnitude on both side,

|
| y ( n )|= ∑ h ( k ) x ( n−k )
k=−∞
|
Using Schwarz’s inequality,

| y ( n )|≤ ∑ |h ( k )||x ( n−k )|
k=−∞
If the maximum value of input x ( n ) is set as X , then

| y ( n )|≤ X ∑ |h ( k )|for all n
k=−∞
If the maximum range of the data handled by DSP processor is (−1,1 ), then the output must
be lesser than 1

X ∑ |h ( k )|< 1
k=−∞
1
X< ∞

∑ |h ( k )|
k=− ∞
This is necessary condition for preventing overflow in a digital IIR system.
For an FIR Filter, the condition will be
1
X < M −1
∑ |h ( k )|
k=0
Unit V DSP Application

CS2403 Digital Signal Processing: Formula Page 31


Decimator or Down Sampling
The process of reducing sampling rate is called decimator or down sampling.
It is also called as sampling rate compressor.
Let f s be the sampling rate of the digital signal before decimator, f 's be the sampling rate of
the digital signal after decimator, and M be the down sampling factor.
' fs
f s=
M
'
T s=M T s

If the input of the decimator is x ( n ), the output of the decimator is given by


y ( n )=x ( nM )
The spectrum of the decimated signal is
Y ( e jω )= X ( e j ω/ M )
Let’s consider a spectrum of input digital signal be a full band signal as
X ( e jω ) ≠ 0 ,|ω|≤ π
Then the spectrum of the decimated signal is given by
Y ( e jω ) ≠ 0 ,|ω|≤ πM
Figure below shows the input and decimated signal as given below:

To avoid the aliasing effect in the decimator, low pass filter is used which is called as anti
aliasing filter.
The frequency response of the Anti aliasing filter is
H ( e jω )=1 ,|ω|≤ π / M

CS2403 Digital Signal Processing: Formula Page 32


Time domain Representation:
The output of the filter is
w ( n )=x ( n )∗h ( n )

w ( n )= ∑ x ( k ) h ( n−k )
k=−∞
The output of the decimator is
y ( n )=w ( nM )

y ( n )= ∑ x ( k ) h ( nM −k )
k=−∞

Frequency Domain Representation:


The output of the filter is
W ( e jω )= X ( e jω ) H ( e jω )
The output of the decimator is

Y ( e jω )= ∑ y ( n ) e− jωn
n=−∞

Y ( e jω )= ∑ w ( nM ) e− jωn
n=−∞

Y ( e jω )= ∑ w ( n ) e− j ωn/ M
n=−∞
If we solve this equation, we can get the spectrum of decimator as
1
Y ( e jω )= W ( e j ω / M )
M

CS2403 Digital Signal Processing: Formula Page 33


1
Y ( e jω )= H ( e j ω/ M ) X ( e j ω/ M )
M
Interpolator or Up Sampling:
The process of increasing sampling rate is called interpolator or up sampling.
It is also called as sampling rate expander.
Let f s be the sampling rate of the digital signal before interpolator, f 's be the sampling rate
of the digital signal after interpolator, and L be the up sampling factor.
f 's=f s L
' Ts
T s=
L

If the input of the interpolator is x ( n ), the output of the interpolator is given by


n
y ( n )=x ( ) L
The spectrum of the interpolated signal is
Y ( e jω )= X ( e jωL )
Let’s consider a spectrum of input digital signal be a full band signal as
X ( e jω ) ≠ 0 ,|ω|≤ π
Then the spectrum of the interpolated signal is given by
Y ( e jω ) ≠ 0 ,|ω|≤ π / L
Figure below shows the input and interpolated signal as given below:

To avoid the imaging in the interpolator, low pass filter is used which is called as anti
imaging filter.
The frequency response of the Anti imaging filter is
H ( e jω )=1 ,|ω|≤ π / L

Time domain Representation:


The output of the interpolator is

CS2403 Digital Signal Processing: Formula Page 34


w ( n )=x ( nL )
The output of the anti imaging filter is
y ( n )=w ( n )∗h ( n )

y ( n )= ∑ w ( k ) h ( n−k )
k=−∞

y ( n )= ∑
k=−∞
x ( kL ) h( n−k )

Frequency Domain Representation:


The output of the interpolator is

W ( e jω )= ∑ w ( n ) e− jωn
n=−∞

W ( e jω )= ∑
n=−∞

x ( nL ) e − jωn

W ( e jω )= ∑ x ( n ) e− jωnL
n=−∞

W ( e )= X ( e jωL )

The output of the anti imagingfilter is


Y ( e jω )=W ( e jω ) H ( e jω )
Y ( e jω )= X ( e jωL ) H ( e jω )
Sampling Rate Converter by rational factor (L/M)

CS2403 Digital Signal Processing: Formula Page 35


In this type of conversion, interpolator is first performed following the decimation process
is done.
h ai ( n ) is the anti imaging filter whose response is
H ai ( e jω ) =1 ,|ω|≤ π /L
h aa ( n ) is the anti aliasing filter whose response is
H aa ( e jω )=1 ,|ω|≤ π /M

Here, it is clear that the filters h ai ( n ) and h aa ( n ) are connected in cascade. Hence these two
filters are multiplied and get a single filter h ( n ) whose frequency response is
H aa ( e jω )=1 ,|ω|≤ min [ π /M , π /L ]

The relation between the sampling frequency before and after conversion is
L
f 's= f s
M
M
T 's= T s
L
Time Domain Relationship:
The output of the interpolator is
n
w 1 ( n )=x ()
L
The output of the filter is
w ( n )=w 1 ( n )∗h ( n )

w ( n )= ∑ w 1 ( k ) h ( n−k )
k=−∞

w ( n )= ∑
k=−∞
x ( kL ) h ( n−k )
The output of the decimator is
y ( n )=w ( nM )

k
y ( n )= ∑ x
k=−∞
()
L
h ( nM −k )
Frequency Domain Relationship:
The output of the interpolator is
W 1 ( e jω )= X ( e jωL )
The output of the filter is
W ( e jω )=W 1 ( e jω ) H ( e jω )
W ( e jω )= X ( e jωL ) H ( e jω )
The output of the decimator is
1
Y ( e jω )= W ( e j ω / M )
M

CS2403 Digital Signal Processing: Formula Page 36


1
Y ( e jω )= X ( e j ωL/ M ) H ( e j ω/ M )
M

CS2403 Digital Signal Processing: Formula Page 37

You might also like