SlideShare a Scribd company logo
1 of 69
UNIT-5
Multirate signal processing &
Finite Word length Effects
1
Single vs Multirate Processing
2
Basic Multirate operations: Decimation and
Interpolation
3
M-fold Decimator
4
Sampling Rate Reduction by an Integer Factor:
Downsampling
• We reduce the sampling rate of a sequence by “sampling” it
• This is accomplished with a sampling rate compressor
• We obtain xd[n] that is identical to what we would get by
reconstructing the signal and resampling it with T’=MT
• There will be no aliasing if
     
nMT
x
nM
x
n
x c
d 

N
MT
'
T





5
Frequency Domain Representation of Downsampling
• Recall the DTFT of x[n]=xc(nT)
• The DTFT of the downsampled signal can similarly written as
• Let’s represent the summation index as
• And finally
  

















 



k
c
j
T
k
2
T
j
X
T
1
e
X
  





















 
















 



r
c
r
c
j
d
MT
r
2
MT
j
X
MT
1
'
T
r
2
'
T
j
X
'
T
1
e
X
M
i
0
and
k
-
where
kM
i
r 







   

























 





1
M
0
i r
c
j
d
MT
i
2
T
k
2
MT
j
X
T
1
M
1
e
X
  







 












1
M
0
i
M
i
2
M
j
j
d e
X
M
1
e
X
6
Frequency Domain Representation of Downsampling
7
Aliasing
8
Frequency Domain Representation of Downsampling w/ Prefilter
9
Decimation filter
10
L-fold Interpolator
11
Increasing the Sampling Rate by an Integer Factor:
Upsampling
• We increase the sampling rate of a sequence interpolating it
• This is accomplished with a sampling rate expander
• We obtain xi[n] that is identical to what we would get by
reconstructing the signal and resampling it with T’=T/L
• Upsampling consists of two steps
– Expanding
– Interpolating
     
L
/
nT
x
L
/
n
x
n
x c
i 

       









 

k
e kL
n
k
x
else
0
,...
L
2
,
L
,
0
n
L
/
n
x
n
x


12
Frequency Domain Representation of Expander
• The DTFT of xe[n] can be written as
• The output of the expander is frequency-scaled
         

 




























k
L
j
Lk
j
n
n
j
k
j
e e
X
e
k
x
e
kL
n
k
x
e
X
13
Input-output relation on the Spectrum
14
Periodicity and spectrum images
15
Frequency Domain Representation of Interpolator
• The DTFT of the desired interpolated signals is
• The extrapolator output is given as
• To get interpolated signal we apply the following LPF
16
Interpolation filters
17
Fractional sampling rate convertor
18
Fractional sampling rate convertor
19
Lowpass filter
Gain = L
Cutoff =
min(p/L, p/M)
L M
xd[n]
x[n] xe[n] xo[n]
T T/L T/L TM/L
L
Lowpass filter
Gain = L
Cutoff = p/L
Lowpass filter
Gain = 1
Cutoff = p/M
M
x[n] xd[n]
xe[n] xi[n] xo[n]
T T/L T/L T/L TM/L
Interpolator Decimator
• Combine decimation and interpolation for non-integer factors
• The two low-pass filters can be combined into a single one
Changing the Sampling Rate by Non-Integer Factor
20
Time Domain
• xi[n] in a low-pass filtered version of x[n]
• The low-pass filter impulse response is
• Hence the interpolated signal is written as
• Note that
• Therefore the filter output can be written as
   
L
/
n
L
/
n
sin
n
hi



     
 
 



 




k
i
L
/
kL
n
L
/
kL
n
sin
k
x
n
x
 
  2L,...
L,
n
0
n
h
1
0
h
i
i





        2L,...
L,
0,
n
for
'
nT
x
L
/
nT
x
L
/
n
x
n
x c
c
i 





21
Sampling of bandpass signals
22
Sampling of bandpass signals
23
Over sampling -ADC
24
25
26
27
Sub band coding
28
Sub band coding
29
Digital filter banks
30
Finite Word length Effects
31
Finite Wordlength Effects
• Finite register lengths and A/D converters
cause errors in:-
(i) Input quantisation.
(ii) Coefficient (or multiplier)
quantisation
(iii) Products of multiplication truncated
or rounded due to machine length
32
Finite Wordlength Effects
• Quantisation
Q
Output
Input
2
)
(
2
,
Q
k
e
Q
o
i 


)
(k
ei
)
(k
eo
33
Finite Wordlength Effects
• The pdf for e using rounding
• Noise power
or
2
Q

2
Q
Q
1
 


2
2
2
2
2
}
{
).
(
Q
Q
e
E
de
e
p
e

12
2
2 Q


34
Finite Wordlength Effects
• Let input signal be sinusoidal of unity
amplitude. Then total signal power
• If b bits used for binary then
so that
• Hence
or dB
2
1

P
b
Q 2
2

3
2 2
2 b



b
P 2
2
2
.
2
3 


b
6
8
.
1
SNR 

35
Finite Wordlength Effects
• Consider a simple example of finite
precision on the coefficients a,b of second
order system with poles
• where
2
1
1
1
)
( 




bz
az
z
H

 j
e
2
2
1
.
.
cos
2
1
1
)
( 




z
z
z
H



2


b

cos
2

a
36
Finite Wordlength Effects
•
bit pattern
000 0 0
001 0.125 0.354
010 0.25 0.5
011 0.375 0.611
100 0.5 0.707
101 0.625 0.791
110 0.75 0.866
111 0.875 0.935
1.0 1.0 1.0
2
,
cos
2 

 
37
Finite Wordlength Effects
• Finite wordlength computations
+
INPUT OUTPU
T
+
+
38
Limit-cycles; "Effective Pole"
Model; Deadband
• Observe that for
• instability occurs when
• i.e. poles are
• (i) either on unit circle when complex
• (ii) or one real pole is outside unit
circle.
• Instability under the "effective pole" model
is considered as follows
)
1
(
1
)
( 2
2
1
1





z
b
z
b
z
H
1
2 
b
39
Finite Wordlength Effects
• In the time domain with
•
• With for instability we have
indistinguishable from
• Where is quantisation
)
(
)
(
)
(
z
X
z
Y
z
H 
)
2
(
)
1
(
)
(
)
( 2
1 



 n
y
b
n
y
b
n
x
n
y
1
2 
b
 
)
2
(
2 
n
y
b
Q )
2
( 
n
y


Q
40
Finite Wordlength Effects
• With rounding, therefore we have
are indistinguishable (for integers)
or
• Hence
• With both positive and negative numbers
5
.
0
)
2
(
2 

n
y
b )
2
( 
n
y
)
2
(
5
.
0
)
2
(
2 


 n
y
n
y
b
2
1
5
.
0
)
2
(
b
n
y




2
1
5
.
0
)
2
(
b
n
y




41
Finite Wordlength Effects
• The range of integers
constitutes a set of integers that cannot be
individually distinguished as separate or from the
asymptotic system behaviour.
• The band of integers
is known as the "deadband".
• In the second order system, under rounding, the
output assumes a cyclic set of values of the
deadband. This is a limit-cycle.
2
1
5
.
0
b














2
2 1
5
.
0
,
1
5
.
0
b
b
42
Finite Wordlength Effects
• Consider the transfer function
• if poles are complex then impulse response
is given by
)
1
(
1
)
( 2
2
1
1





z
b
z
b
z
G
2
2
1
1 
 

 k
k
k
k y
b
y
b
x
y
k
h
 



)
1
(
sin
.
sin

 k
h
k
k
43
Finite Wordlength Effects
• Where
• If then the response is sinusiodal
with frequency
• Thus product quantisation causes instability
implying an "effective “ .
2
b

 





 
2
1
1
2
cos
b
b

1
2 
b






 
2
cos
1 1
1 b
T

1
2 
b
44
Finite Wordlength Effects
• Notice that with infinite precision the
response converges to the origin
• With finite precision the reponse does not
converge to the origin but assumes
cyclically a set of values –the Limit Cycle
45
Finite Wordlength Effects
• Assume , ….. are not
correlated, random processes etc.
Hence total output noise power
• Where and
 
)
(
1 k
e  
)
(
2 k
e



0
2
2
2
0 )
(
k
i
e
i k
h


12
2
2 Q
e 

 








0
2
2
2
2
2
02
2
01
2
0
sin
)
1
(
sin
.
12
2
.
2
k
k
b
k






b
Q 
 2
  0
;
sin
)
1
(
sin
.
)
(
)
( 2
1 


 k
k
k
h
k
h k



46
Finite Wordlength Effects
• ie


















2
cos
2
1
1
.
1
1
6
2
2
4
2
2
2
2
0
b
47
Finite Wordlength Effects
• For FFT
A(n)
B(n)
B(n+1)
B(n+1)
-
A(n)
B(n+1)
B(n)W(n)
B(n)
A(n+1)
)
(
).
(
)
(
)
1
(
)
(
).
(
)
(
)
1
(
n
B
n
W
n
A
n
B
n
B
n
W
n
A
n
A






W(n)
48
Finite Wordlength Effects
• FFT
• AVERAGE GROWTH: 1/2 BIT/PASS
2
)
1
(
)
1
(
2
2



 n
B
n
A
)
(
2
)
(
)
(
2
)
1
(
2
2
n
A
n
A
n
A
n
A



49
Finite Wordlength Effects
• FFT
• PEAK GROWTH: 1.21.. BITS/PASS
IMAG
REAL
1.0
1.0
-1.0
-1.0
....
414
.
2
)
(
)
(
0
.
1
)
(
)
1
(
)
(
)
(
)
(
)
(
)
(
)
1
(
)
(
)
(
)
(
)
(
)
(
)
1
(













n
S
n
C
n
A
n
A
n
S
n
B
n
C
n
B
n
A
n
A
n
S
n
B
n
C
n
B
n
A
n
A
x
x
y
x
x
x
y
x
x
x
50
Finite Wordlength Effects
• Linear modelling of product quantisation
• Modelled as
x(n) )
(
~ n
x
x(n)
q(n)
+ )
(
)
(
)
(
~ n
q
n
x
n
x 



Q
51
Finite Wordlength Effects
• For rounding operations q(n) is uniform
distributed between , and where Q is
the quantisation step (i.e. in a wordlength of
bits with sign magnitude representation or
mod 2, ).
• A discrete-time system with quantisation at
the output of each multiplier may be
considered as a multi-input linear system
2
Q

2
Q
b
Q 
 2
52
Finite Wordlength Effects
• Then
• where is the impulse response of the
system from the output of the multiplier
to y(n).
h(n)
)
(
)...
(
)...
( 2
1 n
q
n
q
n
q p
 
)
(n
x  
)
(n
y
 





 

 






p
r
r
r
n
h
r
q
r
n
h
r
x
n
y
1 0
0
)
(
).
(
)
(
).
(
)
(



)
(n
h

53
Finite Wordlength Effects
• For zero input i.e. we can write
• where is the maximum of
which is not more than
• ie
n
n
x 
 ,
0
)
(
  




p
r
r
n
h
q
n
y
1 0
)
(
.
ˆ
)
(




q̂ r
r
q ,
,
)
( 
 
2
Q
 





 




p
n
r
n
h
Q
n
y
1 0
)
(
.
2
)
(


54
Finite Wordlength Effects
• However
• And hence
• ie we can estimate the maximum swing at
the output from the system parameters and
quantisation level
 





0 0
)
(
)
(
n n
n
h
n
h



0
)
(
.
2
)
(
n
n
h
pQ
n
y
55
Finite Precision Numerical Effects
56
57
Quantization in Implementing Systems
• Consider the following system
• A more realistic model would be
• In order to analyze it we would prefer
58
Effects of Coefficient Quantization in IIR Systems
• When the parameters of a rational system are quantized
– The poles and zeros of the system function move
• If the system structure of the system is sensitive to
perturbation of coefficients
– The resulting system may no longer be stable
– The resulting system may no longer meet the original specs
• We need to do a detailed sensitivity analysis
– Quantize the coefficients and analyze frequency response
– Compare frequency response to original response
• We would like to have a general sense of the effect of
quantization
59
Effects on Roots
• Each root is affected by quantization errors in ALL coefficient
• Tightly clustered roots can be significantly effected
– Narrow-bandwidth lowpass or bandpass filters can be very
sensitive to quantization noise
• The larger the number of roots in a cluster the more sensitive it
becomes
• This is the reason why second order cascade structures are less
sensitive to quantization error than higher order system
– Each second order system is independent from each other
 







 N
1
k
k
k
M
0
k
k
k
z
a
1
z
b
z
H  







 N
1
k
k
k
M
0
k
k
k
z
â
1
z
b̂
z
Ĥ
Quantiza
tion
60
Poles of Quantized Second-Order Sections
• Consider a 2nd order system with complex-conjugate pole pair
• The pole locations after quantization will be on the grid point
 3-bits
7-bits 
61
Coupled-Form Implementation of Complex-Conjugate Pair
• Equivalent implementation of the
second order system
• But the quantization grid this time is
62
Effects of Coefficient Quantization in FIR Systems
• No poles to worry about only zeros
• Direct form is commonly used for FIR systems
• Suppose the coefficients are quantized
• Quantized system is linearly related to the quantization error
• Again quantization noise is higher for clustered zeros
• However, most FIR filters have spread zeros
   




M
0
n
n
z
n
h
z
H
       
z
H
z
H
z
n
ĥ
z
Ĥ
M
0
n
n



 

    






M
0
n
n
z
n
h
z
H
63
Round-Off Noise in Digital Filters
• Difference equations
implemented with finite-
precision arithmetic are
non-linear systems
• Second order direct form I
system
• Model with quantization
effect
• Density function error
terms for rounding
64
Analysis of Quantization Error
• Combine all error terms to single location to get
• The variance of e[n] in the general case is
• The contribution of e[n] to the output is
• The variance of the output error term f[n] is
     
     
n
e
n
e
n
e
n
e
n
e
n
e
4
3
2
1
0





 
12
2
N
1
M
B
2
2
e





     





N
1
k
k n
e
k
n
f
a
n
f
   









n
2
ef
B
2
2
f n
h
12
2
N
1
M    
z
A
/
1
z
Hef 
65
Round-Off Noise in a First-Order System
• Suppose we want to implement the following stable system
• The quantization error noise variance is
• Noise variance increases as |a| gets closer to the unit circle
• As |a| gets closer to 1 we have to use more bits to compensate for the
increasing error
  1
a
az
1
b
z
H 1


 
    























 2
B
2
0
n
n
2
B
2
n
2
ef
B
2
2
f
a
1
1
12
2
2
a
12
2
2
n
h
12
2
N
1
M
66
Zero-Input Limit Cycles in Fixed-Point Realization of IIR Filters
• For stable IIR systems the output will decay to zero when the input
becomes zero
• A finite-precision implementation, however, may continue to oscillate
indefinitely
• Nonlinear behaviour very difficult to analyze so we sill study by example
• Example: Limit Cycle Behavior in First-Order Systems
• Assume x[n] and y[n-1]
are implemented by 4 bit registers
      1
a
n
x
1
n
ay
n
y 



67
Example Cont’d
• Assume that a=1/2=0.100b and the input is
• If we calculate the output for values of n
• A finite input caused an oscillation with period 1
       
n
b
111
.
0
n
8
7
n
x 



n y[n] Q(y[n])
0 7/8=0.111b 7/8=0.111b
1 7/16=0.011100b 1/2=0.100b
2 1/4=0.010000b 1/4=0.010b
3 1/8=0.001000b 1/8=0.001b
4 1/16=0.00010b 1/8=0.001b
      1
a
n
x
1
n
ay
n
y 



68
Example: Limit Cycles due to Overflow
• Consider a second-order system realized by
– Where Q() represents two’s complement rounding
– Word length is chosen to be 4 bits
• Assume a1=3/4=0.110b and a2=-3/4=1.010b
• Also assume
• The output at sample n=0 is
• After rounding up we get
• Binary carry overflows into the sign bit changing the sign
• When repeated for n=1
     
   
 
2
n
ŷ
a
Q
1
n
ŷ
a
Q
n
x
n
ŷ 2
1 




    b
010
.
1
4
/
3
2
ŷ
and
b
110
.
0
4
/
3
1
ŷ 






 
0.100100b
0.100100b
1.010b
b
010
.
1
0.110b
b
110
.
0
0
ŷ






  -3/4
1.010b
0.101b
0.101b
0
ŷ 



  4
/
3
110
.
0
1.010b
1.010b
0
ŷ 



69
Avoiding Limit Cycles
• Desirable to get zero output for zero input: Avoid limit-cycles
• Generally adding more bits would avoid overflow
• Using double-length accumulators at addition points would
decrease likelihood of limit cycles
• Trade-off between limit-cycle avoidance and complexity
• FIR systems cannot support zero-input limit cycles

More Related Content

Similar to DSP-UNIT-V-PPT-1.pptx

RF Module Design - [Chapter 8] Phase-Locked Loops
RF Module Design - [Chapter 8] Phase-Locked LoopsRF Module Design - [Chapter 8] Phase-Locked Loops
RF Module Design - [Chapter 8] Phase-Locked LoopsSimen Li
 
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...Rohde & Schwarz North America
 
DIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.ppt
DIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.pptDIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.ppt
DIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.pptdebeshidutta2
 
Digital filters (FIR).ppt
Digital filters (FIR).pptDigital filters (FIR).ppt
Digital filters (FIR).pptDevipriyaS21
 
1-Digital filters (FIR).pdf
1-Digital filters (FIR).pdf1-Digital filters (FIR).pdf
1-Digital filters (FIR).pdfsnehasingh75493
 
Chapter communication_Lect7.ppt
Chapter communication_Lect7.pptChapter communication_Lect7.ppt
Chapter communication_Lect7.pptraaed5
 
Module iv sp
Module iv spModule iv sp
Module iv spVijaya79
 
Design of infinite impulse response digital filters 2
Design of infinite impulse response digital filters 2Design of infinite impulse response digital filters 2
Design of infinite impulse response digital filters 2HIMANSHU DIWAKAR
 
Digital communication
Digital communicationDigital communication
Digital communicationmeashi
 

Similar to DSP-UNIT-V-PPT-1.pptx (20)

RF Module Design - [Chapter 8] Phase-Locked Loops
RF Module Design - [Chapter 8] Phase-Locked LoopsRF Module Design - [Chapter 8] Phase-Locked Loops
RF Module Design - [Chapter 8] Phase-Locked Loops
 
Lecture13
Lecture13Lecture13
Lecture13
 
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
 
DIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.ppt
DIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.pptDIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.ppt
DIGITAL FILTER SPECIFICATIONS AND MATHEMATICS.ppt
 
Digital filters (FIR).ppt
Digital filters (FIR).pptDigital filters (FIR).ppt
Digital filters (FIR).ppt
 
lecture_16.ppt
lecture_16.pptlecture_16.ppt
lecture_16.ppt
 
PAM
PAMPAM
PAM
 
1-Digital filters (FIR).pdf
1-Digital filters (FIR).pdf1-Digital filters (FIR).pdf
1-Digital filters (FIR).pdf
 
ch3-2
ch3-2ch3-2
ch3-2
 
Filters2
Filters2Filters2
Filters2
 
Chapter communication_Lect7.ppt
Chapter communication_Lect7.pptChapter communication_Lect7.ppt
Chapter communication_Lect7.ppt
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Module iv sp
Module iv spModule iv sp
Module iv sp
 
Filters.pdf
Filters.pdfFilters.pdf
Filters.pdf
 
lecture_37.pptx
lecture_37.pptxlecture_37.pptx
lecture_37.pptx
 
Design of infinite impulse response digital filters 2
Design of infinite impulse response digital filters 2Design of infinite impulse response digital filters 2
Design of infinite impulse response digital filters 2
 
Digital communication
Digital communicationDigital communication
Digital communication
 
Filter dengan-op-amp
Filter dengan-op-ampFilter dengan-op-amp
Filter dengan-op-amp
 
IMT Advanced
IMT AdvancedIMT Advanced
IMT Advanced
 

Recently uploaded

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 

Recently uploaded (20)

Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 

DSP-UNIT-V-PPT-1.pptx

  • 1. UNIT-5 Multirate signal processing & Finite Word length Effects 1
  • 2. Single vs Multirate Processing 2
  • 3. Basic Multirate operations: Decimation and Interpolation 3
  • 5. Sampling Rate Reduction by an Integer Factor: Downsampling • We reduce the sampling rate of a sequence by “sampling” it • This is accomplished with a sampling rate compressor • We obtain xd[n] that is identical to what we would get by reconstructing the signal and resampling it with T’=MT • There will be no aliasing if       nMT x nM x n x c d   N MT ' T      5
  • 6. Frequency Domain Representation of Downsampling • Recall the DTFT of x[n]=xc(nT) • The DTFT of the downsampled signal can similarly written as • Let’s represent the summation index as • And finally                          k c j T k 2 T j X T 1 e X                                                r c r c j d MT r 2 MT j X MT 1 ' T r 2 ' T j X ' T 1 e X M i 0 and k - where kM i r                                             1 M 0 i r c j d MT i 2 T k 2 MT j X T 1 M 1 e X                         1 M 0 i M i 2 M j j d e X M 1 e X 6
  • 9. Frequency Domain Representation of Downsampling w/ Prefilter 9
  • 12. Increasing the Sampling Rate by an Integer Factor: Upsampling • We increase the sampling rate of a sequence interpolating it • This is accomplished with a sampling rate expander • We obtain xi[n] that is identical to what we would get by reconstructing the signal and resampling it with T’=T/L • Upsampling consists of two steps – Expanding – Interpolating       L / nT x L / n x n x c i                       k e kL n k x else 0 ,... L 2 , L , 0 n L / n x n x   12
  • 13. Frequency Domain Representation of Expander • The DTFT of xe[n] can be written as • The output of the expander is frequency-scaled                                          k L j Lk j n n j k j e e X e k x e kL n k x e X 13
  • 14. Input-output relation on the Spectrum 14
  • 16. Frequency Domain Representation of Interpolator • The DTFT of the desired interpolated signals is • The extrapolator output is given as • To get interpolated signal we apply the following LPF 16
  • 18. Fractional sampling rate convertor 18
  • 19. Fractional sampling rate convertor 19
  • 20. Lowpass filter Gain = L Cutoff = min(p/L, p/M) L M xd[n] x[n] xe[n] xo[n] T T/L T/L TM/L L Lowpass filter Gain = L Cutoff = p/L Lowpass filter Gain = 1 Cutoff = p/M M x[n] xd[n] xe[n] xi[n] xo[n] T T/L T/L T/L TM/L Interpolator Decimator • Combine decimation and interpolation for non-integer factors • The two low-pass filters can be combined into a single one Changing the Sampling Rate by Non-Integer Factor 20
  • 21. Time Domain • xi[n] in a low-pass filtered version of x[n] • The low-pass filter impulse response is • Hence the interpolated signal is written as • Note that • Therefore the filter output can be written as     L / n L / n sin n hi                       k i L / kL n L / kL n sin k x n x     2L,... L, n 0 n h 1 0 h i i              2L,... L, 0, n for ' nT x L / nT x L / n x n x c c i       21
  • 22. Sampling of bandpass signals 22
  • 23. Sampling of bandpass signals 23
  • 25. 25
  • 26. 26
  • 27. 27
  • 31. Finite Word length Effects 31
  • 32. Finite Wordlength Effects • Finite register lengths and A/D converters cause errors in:- (i) Input quantisation. (ii) Coefficient (or multiplier) quantisation (iii) Products of multiplication truncated or rounded due to machine length 32
  • 33. Finite Wordlength Effects • Quantisation Q Output Input 2 ) ( 2 , Q k e Q o i    ) (k ei ) (k eo 33
  • 34. Finite Wordlength Effects • The pdf for e using rounding • Noise power or 2 Q  2 Q Q 1     2 2 2 2 2 } { ). ( Q Q e E de e p e  12 2 2 Q   34
  • 35. Finite Wordlength Effects • Let input signal be sinusoidal of unity amplitude. Then total signal power • If b bits used for binary then so that • Hence or dB 2 1  P b Q 2 2  3 2 2 2 b    b P 2 2 2 . 2 3    b 6 8 . 1 SNR   35
  • 36. Finite Wordlength Effects • Consider a simple example of finite precision on the coefficients a,b of second order system with poles • where 2 1 1 1 ) (      bz az z H   j e 2 2 1 . . cos 2 1 1 ) (      z z z H    2   b  cos 2  a 36
  • 37. Finite Wordlength Effects • bit pattern 000 0 0 001 0.125 0.354 010 0.25 0.5 011 0.375 0.611 100 0.5 0.707 101 0.625 0.791 110 0.75 0.866 111 0.875 0.935 1.0 1.0 1.0 2 , cos 2     37
  • 38. Finite Wordlength Effects • Finite wordlength computations + INPUT OUTPU T + + 38
  • 39. Limit-cycles; "Effective Pole" Model; Deadband • Observe that for • instability occurs when • i.e. poles are • (i) either on unit circle when complex • (ii) or one real pole is outside unit circle. • Instability under the "effective pole" model is considered as follows ) 1 ( 1 ) ( 2 2 1 1      z b z b z H 1 2  b 39
  • 40. Finite Wordlength Effects • In the time domain with • • With for instability we have indistinguishable from • Where is quantisation ) ( ) ( ) ( z X z Y z H  ) 2 ( ) 1 ( ) ( ) ( 2 1      n y b n y b n x n y 1 2  b   ) 2 ( 2  n y b Q ) 2 (  n y   Q 40
  • 41. Finite Wordlength Effects • With rounding, therefore we have are indistinguishable (for integers) or • Hence • With both positive and negative numbers 5 . 0 ) 2 ( 2   n y b ) 2 (  n y ) 2 ( 5 . 0 ) 2 ( 2     n y n y b 2 1 5 . 0 ) 2 ( b n y     2 1 5 . 0 ) 2 ( b n y     41
  • 42. Finite Wordlength Effects • The range of integers constitutes a set of integers that cannot be individually distinguished as separate or from the asymptotic system behaviour. • The band of integers is known as the "deadband". • In the second order system, under rounding, the output assumes a cyclic set of values of the deadband. This is a limit-cycle. 2 1 5 . 0 b               2 2 1 5 . 0 , 1 5 . 0 b b 42
  • 43. Finite Wordlength Effects • Consider the transfer function • if poles are complex then impulse response is given by ) 1 ( 1 ) ( 2 2 1 1      z b z b z G 2 2 1 1      k k k k y b y b x y k h      ) 1 ( sin . sin   k h k k 43
  • 44. Finite Wordlength Effects • Where • If then the response is sinusiodal with frequency • Thus product quantisation causes instability implying an "effective “ . 2 b           2 1 1 2 cos b b  1 2  b         2 cos 1 1 1 b T  1 2  b 44
  • 45. Finite Wordlength Effects • Notice that with infinite precision the response converges to the origin • With finite precision the reponse does not converge to the origin but assumes cyclically a set of values –the Limit Cycle 45
  • 46. Finite Wordlength Effects • Assume , ….. are not correlated, random processes etc. Hence total output noise power • Where and   ) ( 1 k e   ) ( 2 k e    0 2 2 2 0 ) ( k i e i k h   12 2 2 Q e             0 2 2 2 2 2 02 2 01 2 0 sin ) 1 ( sin . 12 2 . 2 k k b k       b Q   2   0 ; sin ) 1 ( sin . ) ( ) ( 2 1     k k k h k h k    46
  • 47. Finite Wordlength Effects • ie                   2 cos 2 1 1 . 1 1 6 2 2 4 2 2 2 2 0 b 47
  • 48. Finite Wordlength Effects • For FFT A(n) B(n) B(n+1) B(n+1) - A(n) B(n+1) B(n)W(n) B(n) A(n+1) ) ( ). ( ) ( ) 1 ( ) ( ). ( ) ( ) 1 ( n B n W n A n B n B n W n A n A       W(n) 48
  • 49. Finite Wordlength Effects • FFT • AVERAGE GROWTH: 1/2 BIT/PASS 2 ) 1 ( ) 1 ( 2 2     n B n A ) ( 2 ) ( ) ( 2 ) 1 ( 2 2 n A n A n A n A    49
  • 50. Finite Wordlength Effects • FFT • PEAK GROWTH: 1.21.. BITS/PASS IMAG REAL 1.0 1.0 -1.0 -1.0 .... 414 . 2 ) ( ) ( 0 . 1 ) ( ) 1 ( ) ( ) ( ) ( ) ( ) ( ) 1 ( ) ( ) ( ) ( ) ( ) ( ) 1 (              n S n C n A n A n S n B n C n B n A n A n S n B n C n B n A n A x x y x x x y x x x 50
  • 51. Finite Wordlength Effects • Linear modelling of product quantisation • Modelled as x(n) ) ( ~ n x x(n) q(n) + ) ( ) ( ) ( ~ n q n x n x     Q 51
  • 52. Finite Wordlength Effects • For rounding operations q(n) is uniform distributed between , and where Q is the quantisation step (i.e. in a wordlength of bits with sign magnitude representation or mod 2, ). • A discrete-time system with quantisation at the output of each multiplier may be considered as a multi-input linear system 2 Q  2 Q b Q   2 52
  • 53. Finite Wordlength Effects • Then • where is the impulse response of the system from the output of the multiplier to y(n). h(n) ) ( )... ( )... ( 2 1 n q n q n q p   ) (n x   ) (n y                   p r r r n h r q r n h r x n y 1 0 0 ) ( ). ( ) ( ). ( ) (    ) (n h  53
  • 54. Finite Wordlength Effects • For zero input i.e. we can write • where is the maximum of which is not more than • ie n n x   , 0 ) (        p r r n h q n y 1 0 ) ( . ˆ ) (     q̂ r r q , , ) (    2 Q              p n r n h Q n y 1 0 ) ( . 2 ) (   54
  • 55. Finite Wordlength Effects • However • And hence • ie we can estimate the maximum swing at the output from the system parameters and quantisation level        0 0 ) ( ) ( n n n h n h    0 ) ( . 2 ) ( n n h pQ n y 55
  • 57. 57 Quantization in Implementing Systems • Consider the following system • A more realistic model would be • In order to analyze it we would prefer
  • 58. 58 Effects of Coefficient Quantization in IIR Systems • When the parameters of a rational system are quantized – The poles and zeros of the system function move • If the system structure of the system is sensitive to perturbation of coefficients – The resulting system may no longer be stable – The resulting system may no longer meet the original specs • We need to do a detailed sensitivity analysis – Quantize the coefficients and analyze frequency response – Compare frequency response to original response • We would like to have a general sense of the effect of quantization
  • 59. 59 Effects on Roots • Each root is affected by quantization errors in ALL coefficient • Tightly clustered roots can be significantly effected – Narrow-bandwidth lowpass or bandpass filters can be very sensitive to quantization noise • The larger the number of roots in a cluster the more sensitive it becomes • This is the reason why second order cascade structures are less sensitive to quantization error than higher order system – Each second order system is independent from each other           N 1 k k k M 0 k k k z a 1 z b z H           N 1 k k k M 0 k k k z â 1 z b̂ z Ĥ Quantiza tion
  • 60. 60 Poles of Quantized Second-Order Sections • Consider a 2nd order system with complex-conjugate pole pair • The pole locations after quantization will be on the grid point  3-bits 7-bits 
  • 61. 61 Coupled-Form Implementation of Complex-Conjugate Pair • Equivalent implementation of the second order system • But the quantization grid this time is
  • 62. 62 Effects of Coefficient Quantization in FIR Systems • No poles to worry about only zeros • Direct form is commonly used for FIR systems • Suppose the coefficients are quantized • Quantized system is linearly related to the quantization error • Again quantization noise is higher for clustered zeros • However, most FIR filters have spread zeros         M 0 n n z n h z H         z H z H z n ĥ z Ĥ M 0 n n                  M 0 n n z n h z H
  • 63. 63 Round-Off Noise in Digital Filters • Difference equations implemented with finite- precision arithmetic are non-linear systems • Second order direct form I system • Model with quantization effect • Density function error terms for rounding
  • 64. 64 Analysis of Quantization Error • Combine all error terms to single location to get • The variance of e[n] in the general case is • The contribution of e[n] to the output is • The variance of the output error term f[n] is             n e n e n e n e n e n e 4 3 2 1 0        12 2 N 1 M B 2 2 e                 N 1 k k n e k n f a n f              n 2 ef B 2 2 f n h 12 2 N 1 M     z A / 1 z Hef 
  • 65. 65 Round-Off Noise in a First-Order System • Suppose we want to implement the following stable system • The quantization error noise variance is • Noise variance increases as |a| gets closer to the unit circle • As |a| gets closer to 1 we have to use more bits to compensate for the increasing error   1 a az 1 b z H 1                                  2 B 2 0 n n 2 B 2 n 2 ef B 2 2 f a 1 1 12 2 2 a 12 2 2 n h 12 2 N 1 M
  • 66. 66 Zero-Input Limit Cycles in Fixed-Point Realization of IIR Filters • For stable IIR systems the output will decay to zero when the input becomes zero • A finite-precision implementation, however, may continue to oscillate indefinitely • Nonlinear behaviour very difficult to analyze so we sill study by example • Example: Limit Cycle Behavior in First-Order Systems • Assume x[n] and y[n-1] are implemented by 4 bit registers       1 a n x 1 n ay n y    
  • 67. 67 Example Cont’d • Assume that a=1/2=0.100b and the input is • If we calculate the output for values of n • A finite input caused an oscillation with period 1         n b 111 . 0 n 8 7 n x     n y[n] Q(y[n]) 0 7/8=0.111b 7/8=0.111b 1 7/16=0.011100b 1/2=0.100b 2 1/4=0.010000b 1/4=0.010b 3 1/8=0.001000b 1/8=0.001b 4 1/16=0.00010b 1/8=0.001b       1 a n x 1 n ay n y    
  • 68. 68 Example: Limit Cycles due to Overflow • Consider a second-order system realized by – Where Q() represents two’s complement rounding – Word length is chosen to be 4 bits • Assume a1=3/4=0.110b and a2=-3/4=1.010b • Also assume • The output at sample n=0 is • After rounding up we get • Binary carry overflows into the sign bit changing the sign • When repeated for n=1             2 n ŷ a Q 1 n ŷ a Q n x n ŷ 2 1          b 010 . 1 4 / 3 2 ŷ and b 110 . 0 4 / 3 1 ŷ          0.100100b 0.100100b 1.010b b 010 . 1 0.110b b 110 . 0 0 ŷ         -3/4 1.010b 0.101b 0.101b 0 ŷ       4 / 3 110 . 0 1.010b 1.010b 0 ŷ    
  • 69. 69 Avoiding Limit Cycles • Desirable to get zero output for zero input: Avoid limit-cycles • Generally adding more bits would avoid overflow • Using double-length accumulators at addition points would decrease likelihood of limit cycles • Trade-off between limit-cycle avoidance and complexity • FIR systems cannot support zero-input limit cycles