1 finite wordlength
DESCRIPTION
lTRANSCRIPT
1 Professor A G Constantinides
Finite Wordlength EffectsFinite 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
2 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• Quantisation
Q
Output
Input
2)(
2 ,Q
keQ
oi
)(kei
)(keo
3 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• The pdf for e using rounding
• Noise poweror
2Q
2Q
Q1
2
2
222 }{).(Q
QeEdeepe
12
22 Q
4 Professor A G Constantinides
Finite Wordlength EffectsFinite 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
21P
bQ 22
32 22 b
bP 22 2.23
b68.1SNR
5 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• Consider a simple example of finite precision on the coefficients a,b of second order system with poles
• where
211
1)(
bzazzH
je
221 ..cos21
1)(
zzzH
2b cos2a
6 Professor A G Constantinides
Finite Wordlength EffectsFinite 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 ,cos2
7 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• Finite wordlength computations
+
INPUT OUTPUT
+
+
8 Professor A G Constantinides
Limit-cycles; "Effective Pole"Limit-cycles; "Effective Pole"Model; Deadband 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
21
1
zbzb
zH
12 b
9 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• In the time domain with
•
• With for instability we have
indistinguishable from
• Where is quantisation
)()()( zXzYzH
)2()1()()( 21 nybnybnxny
12 b
)2(2 nybQ )2( ny
Q
10 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• With rounding, therefore we have
are indistinguishable (for integers)
or
• Hence
• With both positive and negative numbers
5.0)2(2 nyb )2( ny
)2(5.0)2(2 nynyb
215.0
)2(b
ny
215.0
)2(b
ny
11 Professor A G Constantinides
Finite Wordlength EffectsFinite 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.
215.0b
22 1
5.0 ,
15.0
bb
12 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• Consider the transfer function
• if poles are complex then impulse response is given by
)1(1)( 2
21
1
zbzb
zG
2211 kkkk ybybxy
kh
)1(sin.
sin kh
k
k
13 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• Where
• If then the response is sinusiodal with frequency
• Thus product quantisation causes instability implying an "effective “ .
2b
2
11
2cos
bb
12 b
2cos1 11 bT
12 b
14 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• Consider infinite precision computations for
21 9.0 kkkk yyxy0 ; 0
100
kx
x
k
-10 -5 0 5 10-10
-8
-6
-4
-2
0
2
4
6
8
10
15 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• Now the same operation with integer precision
-10 -5 0 5 10-10
-8
-6
-4
-2
0
2
4
6
8
10
16 Professor A G Constantinides
Finite Wordlength EffectsFinite 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
17 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• Assume , ….. are not correlated, random processes etc.
Hence total output noise power
• Where and
)(1 ke )(2 ke
0
2220 )(
kiei kh
12
22 Qe
02
22
22
022
012
0sin
)1(sin.
122
.2k
kb k
bQ 2
0 ;
sin)1(sin
.)()( 21 kk
khkh k
18 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• ie
2cos21
1.
1
16
2242
222
0
b
19 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• For FFTA(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(
nBnWnAnB
nBnWnAnA
W(n)
20 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• FFT
• AVERAGE GROWTH: 1/2 BIT/PASS
2)1()1( 22 nBnA
)(2)(
)(2)1( 22
nAnA
nAnA
21 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• FFT
• PEAK GROWTH: 1.21.. BITS/PASS
IMAG
REAL1.0
1.0
-1.0
-1.0
....414.2)()(0.1)(
)1(
)()()()()()1(
)()()()()()1(
nSnCnA
nA
nSnBnCnBnAnA
nSnBnCnBnAnA
x
x
yxxx
yxxx
22 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• Linear modelling of product quantisation
• Modelled as
x(n) )(~ nx
x(n)
q(n)
+ )()()(~ nqnxnx
Q
23 Professor A G Constantinides
Finite Wordlength EffectsFinite 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
2Q
2Q
bQ 2
24 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• Then
• where is the impulse response of the system from the output of the multiplier to y(n).
h(n)
)()...()...( 21 nqnqnq p
)(nx )(ny
p
rrrnhrqrnhrxny
1 00)().()().()(
)(nh
25 Professor A G Constantinides
Finite Wordlength EffectsFinite Wordlength Effects
• For zero input i.e. we can write
• where is the maximum of which is not more than
• ie
nnx ,0)(
p
rrnhqny
1 0)(.ˆ)(
q̂ rrq , ,)(
2Q
p
nrnh
Qny
1 0)(.
2)(