Escolar Documentos
Profissional Documentos
Cultura Documentos
Y ( z) ∑b Z n
−n
H ( z) = = n =0
X ( z) M 1
1 + ∑ am Z −m
m =1
N M
y ( k ) = ∑ bn x( k − n ) − ∑ am y ( k − m ) 2
n =0 m =1
w(n-2)
• b0 = 0.00094469184384
• b1 = 0.00188938368768
• b2 = 0.00094469184384
• a0 = 1.00000000000000
• a1 = -1.91119706742607 use -a1 or 1.91119706742607
• a2 = 0.91497583480143 use -a2 or -0.91497583480143
Mark Allie comp.dsp 2004 5
Topics of Interest
In a fixed point processor the accumulator has at least 2 times the number of bits as in the native data word .
It is assumed that data needs to be stored for multiplying , delaying and sending to a converter.
lo
null
N bits N bits
hi
Truncate
• This occurs because the exponents of floating point numbers must be equal
to add them.
• The number of bits lost is dependant on the ratio of the 2 numbers being
added.
• The number of bits truncated depends on the coefficients and input signal
statistics.
• If the recursive products can be kept larger than the direct products then the
recursive data path will not be truncated very much.
Is it correct to use the bit pattern in the lower half of the register as e (n)?
The pattern is correct for e (n) but what is the sign of e (n)? ???? N bits
For 2's complement math the sign of e (n) is always positive. 0000... N bits
lo
e(n)
N bits
Q N bits
hi
yt(n)
Truncate
• Overload considerations.
1. Input scaling.
2. Modulo math.
• Noise generation considerations.
1. Truncation noise.
2. Terms affected.
N(lo)
N N
N b0 2N 2N N(hi)
x(n) y(n) yt(n) yt(n)
Q Q
Z-1 N N Z-1
N b1 2N 2N -a1 N
Z-1 N N Z-1
N b2 2N 2N -a2 N
b0 + b1 z −1 + b2 z −2 1
Yt ( z ) = −1 −1
X (z) − E ( z)
1 + a1 z + a 2 z 1 + a1 z + a 2 z −1
−1
xn*b0 yn
This means there are 4 summations performed per sample period (Ts).
Find the maximum ratio for the 4 sets of addends for each Ts .
N(lo) N(lo)
N N
y(n)
N 2N N(hi) b0 2N N(hi)
x(n) w(n) yt(n)
Q Q
N Z-1 N
2N -a1 b1 2N
w(n-1)
N Z-1 N
2N -a2 b2 2N
w(n-2)
N N b0 2N N (hi)
x(n) yt(n)
Q Q
y(n)
Z-1 Z-1
e1(n) e4(n)
N
N (hi) 2N -a1 b1 2N N (hi)
Q Q
e2(n) e5(n)
-1 N
Z Z-1
N (hi) 2N -a2 b2 2N N (hi)
Q Q
N(lo)
N N
N b0 2N 2N N(hi)
x(n) yt(n)
Q Q
y(n)
yt(n)
Z-1 Fixed Point:
Modulo math useful. One summer before saturator .
N(hi) No Input scaling required to prevent internal overflow .
N(lo)
Multiple truncation feedback error terms *.
Q e1(n)
Truncation noise affects recursive terms .
N Truncation noise negligible for N large enough.
2N
b1 -a1 * One if Q1 and Q2 are removed. Dattorro
2N 2N
N N
Z-1 Floating point:
No input scaling required.
N(hi) No overflow concerns.
N(lo)
Truncation error is coefficient dependant and not
Q e2(n) correctible.
Truncation noise affects recursive terms .
N Number of bits in mantissa critical .
2N
b2 -a2
2N 2N
N N
Mark Allie comp.dsp 2004 24
Tabulated Results
Input scaling + + + + + +
Modulo math + +
Truncation noise + + + - - - -
Performs well with 32 bit
mantissa + + + + + +
Error compensation + + + - - - -
+ Good Attribute + Qualified Good Attribute - Poor Attribute
2N k1
Z-1
N(lo) e(n)
N b0 2N 2N N(hi)
x(n) y(n) yt(n)
Q
Z-1 Z-1
N b1 2N 2N -a1 N
Z-1 Z-1
N b2 2N 2N -a2 N
2N k1
−1
b + b1 z + b2 z −2 −1
1 − k1 z − k 2 z −2 Z-1
Yt ( z ) = 0 −1 −1
X (z) − E( z)
1 + a1 z + a 2 z 1 + a1 z −1 + a 2 z −1
N(lo) e(n)
Trivial k 2N N(hi)
y(n) yt(n)
k1 k2 Region θ Q
+2 -1 0 Twice
-2 -1 π Twice
0 +1 0 and π Z-1
2N -a1 N
+1 -1 π/3 Twice
-1 -1 2π/3 Twice
+1 0 0 Once
-1 0 π Once Z-1
2N -a2 N
For k 1 = 1 and k2 = 0 the noise is
attenuated at dc and low frequencies .
2N k1
b0 + b1 z −1 + b2 z −2 1 − k1 z − 1 − k 2 z − 2
Yt ( z ) =
-1
X ( z) − E ( z) Z
1 + a1 z −1 + a 2 z −1 1 + a1 z −1 + a 2 z −1
N(lo) e(n)
2N N(hi)
Optimal k y(n) yt(n)
Q
k1 = -a1
k2 = -a2 Z-1
2N -a1 N
b0 + b1 z −1 + b2 z −2
Yt ( z ) = X ( z) − E( z)
1 + a1 z −1 + a 2 z −1
Z-1
2N -a2 N
N(lo) e(n)
3N 2N
y(n) yt(n)
Q
Z-1
3N -a1 2N
Z-1
3N -a2 2N