UNIT V
Digital Signal Processors
Architecture – Features – Addressing Formats
– Functional modes – Instruction
Set– Quantization error-Finite word length
effects in designing digital filters
Contents
Effect
Eff t off finite
fi it word
d length
l th
Fixed point and floating point arithmetic
Types
yp of errors due to q
quantization
¾Input quantization error
¾Coefficient quantization error
¾Product q
quantization error
Steady state input noise power
Steady state output noise power
Limit cycles and Dead band
Architecture –
¾ Von Neumann
¾ Harvard
¾ Modified
¾ VLIW
¾ TMS320C50 ( architecture, addressing modes, instruction set)
¾ TMS320C54X( architecture, addressing modes, instruction set)
Finite word length effects in digital filter
The fundamental operation in digital filters are multiplication and
addition.
When these operations are performed in a digital system the input data
and output data (product & sum) have to be represented in finite word
length, which depends on the size (length of the register) used to store
the data.
data
In digital computation the input & output data (sum & product) are
quantized
ti d by
b rounding
di or truncation
t ti to
t convertt them
th t a finite
to fi it wordd
size.
This creates error(noise)
( ) in the input
p or creates oscillations(limit
( cycles)
y )
in the output.
These effects due to finite precision representation of numbers in a
digital system are called finite word length effects.
effects
The following are some of the finite word length effects in digital
filters:
Errors due to quantization of input data by A/D converter.
Errors due to quantization of filter co
co-efficient.
efficient.
Errors due to rounding the products in multiplication.
Errors due to overflow in addition.
Limit cycles
Types of quantization Errors
Input quantization error
¾ errors due to rounding of I/P data
Product quantization error
¾ errors due to rounding the product in
multiplication
l i li i
Coefficient quantization error
¾ errors due
d tto quantization
ti ti off filter
filt coefficients
ffi i t
Limit cycles
¾ due
d tto product
d t quantization
ti ti & overflowfl ini
addition
Input quantization error
¾ in DSP, the continuous time input signals are converted
into digital using a b-bit ADC.
¾ The representation of continuous signal amplitude by a
fixed digit produces an error, which is known as input
quantization
ti ti error.
Product quantization error
¾A i at the
¾Arises h output off a multiplier.
l i li
¾ Multiplication of a b-bit data with a b – bit coefficient
results a product having 2b bits.
bits Since a b-
b bit register is
used, the multiplier output must be rounded or truncated
to b-bits, which produces an error.
Coefficient quantization error
¾ in digital computation the filter coefficients are represented in
binary & are stored in registers.
¾ if b- bit register
g is used , the filter coefficients must be rounded
or truncated to b- bits, which produce an error.
¾ due to quantization of coefficients, the frequency response of
the
h filter
fil may differ
diff appreciably
i bl from
f the
h desired
d i d response &
some times the filter may actually fail to meet the desired
p
specifications.
¾ If the poles of desired filter are close to the unit circle, then
those of the filter with quantized coefficients may lie just
outside
id the
h unit
i circle,
i l leading
l di to unstability
bili .
Quantization step size:
¾ let us assume a sinusoidal signal varying between +1 & -
1 having a dynamic range 2
¾ if ADC usedd to t convertt the
th sinusoidal
i id l signal
i l employs
l
b+1 bits including sign bit, the number levels available
for quantizing X(n) is 2^(b+
b+11)
¾ Thus the interval between successive levels represents
the step size.
¾ quantization
ti ti stept size
i isi given
i b
by.
If 8-bit register is available, then step size varies with respect
to range of the signal.
For the range between 0V to 5V, 5V
For the range between -5V to 5V,
Methods of quantization
Truncation
T ti
¾ process of discarding all bits less significant than LSB that is retained.
Rounding
¾ rounded
d d to the
h closest
l off the
h original
i i l number.
b
What is rounding effect?
¾ Rounding is the process of reducing size of a binary number to finite
size
i off ‘b’ bits
bit suchh that
th t the
th rounded
d d b-bit
b bit number
b is
i closest
l t to
t the
th
original unquantized number.
¾ The rounding process consists of truncation and addition.
¾ In
I rounding
di off a number
b to t b-bits,
b bit fi
firstt th
the unquantized
ti d number
b iis
truncated to b-bits by retaining the most significant b-bits.
¾ Then zero or one is added to the least significant bit of the truncated
number depending on the bit that is next to the least significant bit
that is retained.
¾ For example:
0.101010 rounded to four bits is either 0.1010 or 0.1011(here( adding
g
one is called rounding up)
Error due to rounding: the quantization error is fixed point
number
b due
d to rounding
di iis defined
d fi d as
In fixed point representation the range of error made by
rounding a number to ‘b’ bits is
Error due to truncation
In fixed point representation the range of error made by
rounding a number to ‘b’
b bits is
Quantization of filter coefficients:
Example : Consider a second order IIR filter with
Find the effect on qquantization on ppole locations of the given
g
system function in direct form-1 & in cascade form. Take
b=3 bits.
¾ Solution
Direct form-I
Steady state output noise power
¾ using Parseval
Parseval’ss theorem,
theorem the steady state output noise variance due to
the quantization error is given by,
¾ Where the closed contour of integration is around the unit circle |Z| = 1 in
which case only the poles that lies in the unit circle are evaluated using
residue theorem.
Limit cycle
y oscillations:
¾ For an IIR filter, implemented with infinite precision arithmetic, the
output should approach zero in the steady state if the input is zero & it
should approach a constant value, if the input is a constant.
¾ However, with a implementation using finite length register an output
can occur even with zero input if there is a non-zero initial condition
on one of the register.
¾ The output may be a fixed value (or) it may oscillate between finite
positive & negative values.
¾ This effect is referred to as (zero-input ) limit cycle oscillations & is
due to the non
non-linear
linear nature of the arithmetic quantization.
¾ The amplitude of the output during a limit cycle are confined to a
range of values called the dead band of the filter.
¾ In the case of FIR filter,, there are no limit cycle
y oscillations,, if the
filter is realized in direct form or cascade form since, these structures
have no feedback.
Example
E l
Explain the characteristics of limit cycle oscillation with respect to the
system described by the difference equation,
Y(n)= 0.95 Y(n-1) + X(n)
Determine the dead band of the filter.
¾S l ti
¾Solution:
Let us assume 4-bit sign magnitude representation(excluding sign bit)
e thee input,
Let pu ,
X(n) = 0.875 for n=0
= 0, otherwise