Sunteți pe pagina 1din 8

Quantization Effects in Digital Filter

Rupinder Kaur
RB6803A02
10807906
LOVELY PROFESSIONAL UNIVERSITY

Abstract- The rapid development of integrated amplitude values. Such a sequence might originate
circuit technology led to the development of very from a continuous-time signal x (t) by periodically
powerful digital machines able to perform a very sampling it at the time instants t = nT, where T is
high number of computations in a very short the sampling interval. The output sequence y(n)
period of time. In addition, digital machines are arises by applying x(n) to the input of the digital
flexible, reliable, reproducible, and relatively filter, with the relationship between x(n) and y(n)
cheap. As a consequence, several signal represented by the operator F as:
processing tasks originally performed in the
analog domain have been implemented in the y (n) = F[x (n)]
digital domain. A digital filter is one of the basic
building blocks in digital signal processing Defining the z transform of the sequence x (n) is
systems. Digital filtering consists of mapping a written as:
discrete-time sequence into another discrete-time
sequence that highlights the desired information X (z) =∑n= -∞∞ x (n) z-n
while reducing the importance of the undesired
The transfer function of a digital filter is the ratio of
information. The term paper includes a short
the z transform of the output sequence to the z-
overview of digital filter (what actually it is, its
transform of the input signal: H (z) = Y (z)/ X (z)
types) and a brief overview of Quantization effects
in it. Digital filters are of two types on the basis of
impulse response-FIR & IIR. FIR & IIR Digital
Keywords-Digital, Filter, Quantization, Error
filters are briefly discussed below. Digital filters
1. Introduction are present in various digital signal processing
applications related to speech, audio, image, video,
and multi-rate processing systems as well as in
In signal processing, the function of a filter is to communication systems, CD players, digital radio,
remove unwanted parts of the signal, such as television, and control systems. Digital filters can
random noise, or to extract useful parts of the have either fixed or adaptive coefficients
signal, such as the components lying within a
certain frequency range. The following block 2. FIR filter-
diagram illustrates the basic idea. It stands for finite impulse response filter. It is also
called non recursive filter. In this filter, output
depends on present and previous input.
For example- y (n) =2x (n) +1/2x (n-1) +3x (n-2)
FIR filters can be designed to have a linear phase.
Digital filtering consists of mapping a discrete-time A linear phase is a desirable feature in a number of
sequence into another discrete-time sequence that signal processing applications (e.g., image
highlights the desired information while reducing processing). FIR filters can be designed by using
the importance of the undesired information. To optimization packages. The main drawback is that
make it clearer let us take an example of a discrete- to satisfy demanding magnitude specifications, the
time signal shown as FIR filter requires a relatively high number of
follows in fig: multiplications, additions, and storage elements.
These facts make FIR filters potentially more
In a digital filter, the expensive than IIR filters (discussed below)in
input signal x (n) is a applications where the number of arithmetic
sequence of numbers operations or numbers of storage elements are
indexed by the integer expensive or limited. However, FIR filters are
n that can assume only widely used because they are suitable for designing
a finite number of linear phase filters. An FIR filter has a linear phase
if and only if its impulse response is symmetric or No. Of delays=4
anti-symmetric.
3. IIR filter- Adders=4
An IIR filter is one whose impulse response
Multipliers=5
(theoretically) continues for ever i.e. infinite
impulse response. It is also called recursive filter. We can get Direct form 2 realisation from direct
Here, output depends on present input, previous form 1 realisation simply by interchanging the two
input and previous output. filters and then merge it.
For instance- y (n) =2y (n-1) +3y (n-2)-2x (n)-1/2x
(n-1)

4. Digital filter realizations-


Digital filters use three basic types of operations:
• Delay: Used to store previous samples of the
input and output signals, besides internal states of
the filter
• Multiplier: Used to implement multiplication
operations of a particular digital filter structure and
also used to implement divisions
• Adder: Used to implement additions and
subtractions of the digital filter
4.1. FIR Filter Realization-Let us Direct form 2 realization
take the same example i.e. y (n) =2x (n)
+1/2x (n-1) +3x (n-2) to understand the No. Of delays=2
FIR Filter realisation.
The following figure shows the direct-form non Adders=4
recursive structure for FIR filters. Here only Direct
form realization is possible. Multipliers=3
Adders=2
5. Quantization effects in Digital
Multipliers=3 Filters
Quantization errors in digital filters can be
No of delays=2 classified as:
Direct form • Round-off errors derived from internal
realisation signals that are quantized before or after
more down additions;
4.2.
4.2. • Deviations in the filter response due to
IIR filter Realization- To understand the IIR finite word length representation of
filter realisation and difference in FIR & multiplier coefficients; and
IIR filters,
• Errors due to representation of the input
let us take an example-- y (n) =2y (n-1) +3y (n-2)-
signal with a set of discrete levels.
2x (n)-1/2x (n-1).Here Direct form 1 & direct form
A general, digital filter structure with quantizers
2, two realisations are possible that are shown :
before delay elements can be represented as in
following fig. with the quantizers implementing
rounding for the granular quantization and
saturation arithmetic for the overflow nonlinearity.
The criterion to choose a digital filter structure for
a given application entails evaluating known
structures with respect to the effects of finite word
length arithmetic and choosing the most suitable
one.

This is the case of Direct form 1 Realisation.


Here,
noise source e (n) as shown in Figure A.
For product quantization performed by
rounding and for signal levels throughout
the filter much larger than the quantization
step q = 2-b, it can be shown that the power
spectral density of the noise source ei(n) is
given by:
Pei(z)=q2/12=2-2b/12
In this case, ei(n) represents a zero mean
white noise process. We can consider that
in practice, ei(n) and ek(n + l) are
statistically independent for any value of
n or l (for i != k). As a result, the
contributions of different noise sources
can be taken into consideration separately
by using the principle of superposition.
The power spectral density of the output
noise, in a fixed point digital-filter
implementation, is given by:
Py(z)=σe2 ∑i=1 k Gi(z) Gi(z-1)
Fig: Digital Filter Including Quantizers at the
Delay Inputs

5.1. Coefficient Quantization-


Approximations are known to generate Figure A
digital filter coefficients with high Model for the Noise generated after a
accuracy. After coefficient quantization, multiplication
the frequency response of the realized
digital filter will deviate from the ideal
response and eventually fail to meet the
prescribed specifications. Because the
sensitivity of the filter response to
coefficient quantization varies with the
structure, the development of low-
sensitivity digital filter realizations has
raised significant interest.
A common procedure is to design the
digital filter with infinite coefficient word
length satisfying tighter specifications
than required, to quantize the coefficients,
and to check if the prescribed
specifications are still met. Figure B: Digital Filter Including Scaling and
Noise Transfer Functions.
5.2. Quantization Noise- In fixed-
where Pei(ejw) = (σe)2, for all i, and each Gi(z) is a
point arithmetic, a number with a modulus
transfer function from multiplier output (gi(n)) to
less than one can be represented as
the output of the filter as shown in Figure B. The
follows: x = bob1 b2b3 . . . bb; where b0
word length, including sign, is b + 1 bit, and K is
is the sign bit and where bl b2b3 . . . bb
the number of multipliers of the filter.
represent the modulus using a binary code.
For digital filtering, the most widely used 5.3. Overflow Limit Cycle- Overflow
binary code is the two's complement nonlinearities influence the most
representation, where for positive numbers significant bits of the signal and cause
b0 = 0 and for negative numbers b0 = 1. severe distortion. An overflow can give
The fractionary part of the number, called rise to self-sustained, high-amplitude
x2 here is represented as: oscillations known as overflow limit
x2 = {x if b0 =0 & 2-|x| if b0 = 1 cycles. Digital filters, which are free of
The discussion here concentrates in the zero input limit cycles, are also free of
fixed-point implementation. A finite word overflow oscillations if the overflow
length multiplier can be modelled in terms nonlinearities are implemented with
of an ideal multiplier followed by a single saturation arithmetic, that is, by replacing
the number in overflow by a number with
the same sign and with maximum realizations, such as cascade or parallel
magnitude that fits the available word realizations of digital filters, optimum
length. When there is an input signal scaling is accomplished by applying one
applied to a digital filter, overflow might scaling multiplier per section. As an
occur. As a result, input signal scaling is illustration, we present the equation to
required to reduce the probability of compute the scaling factor for the cascade
overflow to an acceptable level. Ideally, realization with direct-form second-order
signal scaling should be applied to ensure sections:
that the probability of overflow is the Λi = 1/(||П (from j=1 to i-1) Hj(z)Fi(z)||
2
same at each internal node of the digital p ;Where Fi(z) = 1/(z +m1iz+m2i)
filter. This way, the signal-to-noise ratio is The noise power spectral density is
maximized in fixed-point computed as
implementations. In two's complement Py(z)= σe 2[3+(3/λ1 2)П(from i=1 to
arithmetic, the addition of more than two m)Hi(z)Hi(z-1)+5∑(from j=2 to m)1/λj 2
numbers will be correct independently of П(from i=j to m) Hi(z)Hi(z-1)]
the order in which they are added even if Whereas the output noise variance is given
overflow occurs in a partial summation as by:
long as the overall sum is within the σe 2 = σe 2[3+3/λ1 2 ||П(from i = 1 to m)
available range to represent the numbers. Hi(ejw)||22 +5∑j=2m 1/λ1 2 ||П(from i = j to m)
As a result, a simplified scaling technique Hi(ejw)||22]
can be used where only the multiplier As a design rule, the pairing of poles and
inputs require scaling. To perform scaling, zeros is performed as explained here:
a multiplier is used at the input of the filter poles closer to the unit circle pair with
section as illustrated in Figure B. It is closer zeros to themselves, such that ||H
possible to show that the signal at the i(z)||p is minimized for p = 2 or p =∞
multiplier input is given by: For ordering, we define the following:
xi(n) =( 1/2Пj)∫ Xi(z)z n-1dz = 1/2П∫(limits Pi=||Hi(z)||∞ / ||Hi(z)||2
from zero to 2П) Fi(ejw)X(ejw)ejwndw ;where For L2 scaling, we order the section such
c is the convergence region common to that Pi is decreasing. For L∞ scaling, Pi
Fi(z) and X(z). should be increasing.
The constant λ is usually calculated by
using Lp norm of the transfer function 5.4. Granularity Limit Cycles-The
from the filter input to the multiplier input quantization noise signals become highly
Fi(z), depending on the known properties correlated from sample to sample and
of the input signal. The Lp norm of Fi(z) is from source to source when signal levels
defined as: in a digital filter become constant or very
||Fi(ejw)||p = [1/2П]1/p low, at least for short periods of time. This
for each p > =1, such that ∫(limits from correlation can cause autonomous
zero to 2П) |Fi(e jw)|p dw <=∞. In general, oscillations called granularity limit cycles.
the following inequality is valid In recursive digital filters implemented
|xi(n) | <=[ ||Fi||p||X||q,(1/p + 1/q=1) for with rounding, magnitude truncation, 4
p, q = 1, 2 and ∞. and other types of quantization, limit
The scaling guarantees that the cycles oscillations might occur.
magnitudes of multiplier inputs are In many applications, the presence of limit
bounded by a number Mmax when |x(n)|< cycles can be harmful. Therefore, it is
=Mmax. Then, to ensure that all multiplier desirable to eliminate limit cycles or to
inputs are bounded by Mmax we must keep their amplitude bounds low.
choose λ as follows: If magnitude truncation is used to quantize
Λ=1/(Max{||F1||p,.......... ||Fi||p,.......... ,||Fk||p} particular signals in some filter structures,
Which means that: it can be shown that it is possible to
||Fi (ejw)||p<=1, for ||X(ejw)||q<=Mmax ;The eliminate zero-input limit cycles. As a
K is the number of multipliers in the filter. consequence, these digital filters are free
The norm p is usually chosen to be infinity of overflow limit cycles when overflow
or 2. The L∞ norm is used for input signals nonlinearities, such as saturation
that have some dominating frequency arithmetic, are used.
component, whereas the L2 norm is more In general, the referred methodology can
suitable for a random input signal. Scaling be applied to the following class of
coefficients can be implemented by simple structures:
shift operations provided they satisfy the • State-space structures: Cascade
overflow constraints. In case of modular and parallel realization of
second-order state-space additions, and storage elements. Multiplications
structures includes design and additions can be implemented using bit-serial
constraints to control nonlinear or bit-parallel architectures. In general, hardware
oscillations. implementations of digital filters are less flexible
• Wave digital filters: These filters than software (CPU-based) implementations.
emulate doubly terminated Special purpose hardware, however, is usually
lossless filters and have inherent necessary when high cost of development is offset
stability under Linear conditions by a large production and a DSP-based solution is
as well as in the nonlinear case too expensive or is incapable of meeting sampling
where the signals are subjected to frequency specifications.
quantization. Consider a heuristic related to the computational
• Lattice realization: Modular complexity of digital filters in a full custom design.
structures allowing easy limit The following figure shows an intuitive plot of
cycles elimination. complexity as a function of filter order for all
digital filter implementations meant to satisfy a
given set of specifications. The complexity of a
6. Real-Time Implementation of digital filter is measured in terms of number of bits
Digital Filters used in the coefficients and number of multiplier
There are many distinct means to implement a operations’.
digital filter. The detailed description of these
implementation methods is beyond the scope of
this term paper.
The most straightforward way to implement digital
filters relies on general purpose computers by
programming their central processing units (CPUs)
to execute the operations related to a particular
digital filter structure. This type of implementation
is very flexible because it consists of writing
software, allowing fast prototyping and testing.
This solution, however, might not be acceptable in
applications requiring high-processing speed, fast
data input/output interfaces, or large-scale
production.
Efficient software implementations of digital filters
are usually based on special-purpose CPUs known
as Digital Signal Processors (DSPs). These
processors are capable of implementing a sum of
product operations, also referred to as multiply-
and-accumulate (MAC) operations, in a very Figure: Complexity of Digital filter
efficient manner.
Another implementation alternative is to employ
programmable logic devices (PLD) that include a For a prescribed set of frequency specifications and
large number of logic functions on a single chip. a particular filter structure, a certain order N0 may
An advanced version of PLD is the field- be capable of meeting the specifications with
programmable gate array (FPGA). An FPGA is an infinite precision. For filters with an order lower
array of logic macro-cells that are interconnected than N0, it is not possible to meet the prescribed
through a number of communication channels specifications. Infinite precision is translated as
configured in horizontal and vertical directions. very high complexity because an infinite number of
The FPGAs allow the system designer to configure bits is required. If higher order is used, the number
very complex digital logic that can implement of bits necessary for multiplier coefficients may be
digital signal processing tasks at low cost with reduced, implying lower complexity. An order N1
reduced power consumption. Usually, high-level (in figure above) is the order of the implementation
software tools are available for the design of digital with the lowest possible complexity. Orders higher
systems using FPGAs. than N 1will necessarily imply higher complexity.
Special purpose hardware is also possible for The heuristic introduced here, when applied to the
implementing a digital filter. Hardware case of FIR filter designs using direct form
implementations consist of designing and possibly realizations, leads to complexity curves that are
integrating a digital circuit with logical gates to very flat around their minimum point, indicating
perform the basic operating blocks inherent to any that almost minimum complexity can be achieved
digital filter structure, namely multiplications, for a wide range of values for the filter order. On
the other hand, for IIR filters, the complexity curve 3) Good computer aided design (CAD)
is rather sharp, implying that a more careful choice support can make the design of digital
for the filter order should be made. filters an enjoyable task

7. Advantages & disadvantages of • Speed Limitation- 1) The maximum


digital filter over analog filter bandwidth of signals that digital filters can
handle, in real time, is much lower than
7.1. Advantages- The advantages are
for analog filters
as follows:
2) In real-time situations, the analog-digital-
analog conversion processes introduce a
• A digital filter is programmable, i.e. speed constraint on the digital filter
its operation is determined by a performance. The conversion time of the
program stored in the processor's ADC and the settling time of the DAC
memory. This means the digital filter limit the highest frequency that can be
can easily be changed without processed
affecting the circuitry (hardware). An 3) Further, the speed of operation of a digital
analog filter can only be changed by filter depends on the speed of the digital
redesigning the filter circuit. processor used and on the number of
• Digital filters are easily designed, arithmetic operations that must be
tested and implemented on a general- performed for the filtering algorithm,
purpose computer or workstation. which increases as the filter response is
• The characteristics of analog filter made tighter
circuits (particularly those containing • Finite Word length Effects- Digital filters
active components) are subject to drift are subject to ADC noise resulting from
and are dependent on temperature. quantizing a continuous signal, and to
Digital filters do not suffer from these round-off noise incurred during
problems, and so are computation.
extremely stable with respect both to
time and temperature. 8. Application of Digital filter-
• Unlike their analog counterparts, Traditionally, most digital filter applications
digital filters can handle low have been limited to audio and high-end image
frequency signals accurately. As the processing. With advances in process
speed of DSP technology continues to technologies and digital signal processing
increase, digital filters are being methodologies, digital filters are now cost-
applied to high frequency signals in effective in the IF range and in almost all video
the RF (radio frequency) domain, markets. Digital filters are commonly used for
which in the past was the exclusive audio frequencies for two reasons. First, digital
preserve of analog technology. filters for audio are superior in price and
• Digital filters are very much performance to the analog alternative. Second,
more versatile in their ability to audio Analog-to-Digital Converters (A/Ds)
process signals in a variety of ways; and Digital-to- Analog Converters (DACs) can
this includes the ability of some types be manufactured with high accuracy and are
of digital filter to adapt to changes in available at low cost. Thus, the combined cost
the characteristics of the signal. of filtering and conversion is low. The cost
trades are much more difficult in the 1MHz to
100MHz signal range, such as the IF ranges of
many radio receivers. While digital signal
processing technology can now produce cost
7.2. Disadvantages- The effective digital filters for IF, the cost or even
disadvantages are as follows: the availability of data conversion products are
• Long design and development times-1) the limiting factors. Many IF digital filtering
design and development times for digital applications are band-limiting and decimating.
filters, especially hardware development, In these cases the design engineer must not
can be much longer than for analog filter. only know digital filters, but also understand
2) However, once developed the hardware the effects of narrow-band-filtering
and / or software can be used for other processing-gain on A/D requirements.
filtering or DSP tasks with little or no Additionally, power dissipation must be
modifications. considered. Currently, digital IF filter solutions
are excluded from low power applications such
as personal communication devices. In dealt with by placing a three-time sample
contrast, audio frequency digital filters are rate expander in front of the DDC.
essential. One of its applications in detail is as The HSP50016 and HSP43216 Data
follows: Sheets provide greater detail.
• IF Processing- Intersil’s HSP43216 Half
band Filter IC (Figure C) can perform a
quadrature split on a real signal. In this
example, the input signal undergoes anti-
alias filtering and is digitized and passed
to the Halfband Filter IC. The quadrature
fS/4 local oscillator (LO) and mixer
circuits on the IC center the upper
sideband of the real signal spectrum at
DC.
The Halfband Filter itself operates on the
resultant complex signal to filter out the
lower sideband, forming a quadrature
signal (a characteristic of which is a
single-sided spectrum). Other circuits in
the IC then decimate the real and
imaginary output by two to eliminate the
unused spectral region.
To cite a more specific application, IF
processing can be implemented in a
cellular base station using the HSP50016
Digital Down Converter (DDC) and two
HSP43124 Serial I/O Filters (Figure D). In Figure C: REAL TO QUADRATURE
this example a 4MHz band of the GSM CONVERSION USING THE HSP43216
spectrum has already been mixed to a near HALFBAND FILTER
baseband IF, has been appropriately anti-
alias filtered, and digitized by an A/D.
The spectral plot makes the point that
aliasing may take place as long as it does
not encroach on the band of interest.
Because this is a channelizing application,
there is a Signal to- Noise Ratio (SNR)
processing gain of 3dB for every factor of
2 that the noise bandwidth is reduced. In
this example, the processing gain is
approximately 17dB. As a result, the SNR
of the A/D can be 17dB lower than the
desired output SNR.
The A/D’s Spurious Free Dynamic Range
(SFDR), however, must be equal to the
desired output SFDR since there is no gain
effect on in-band frequency spurs.
The DDC is a single-chip quadrature
down-converter and two stage filter. It is
used to tune the channel of interest to
baseband, and to perform narrow-band
filtering and decimation.
Figure D: GSM BASE STATION EXAMPLE
The Serial I/O Filters are used to apply
the GSM filter shape to the output
quadrature data stream. This process 9. Conclusion-
includes decimation by two to modify the As this term paper include the quick view about the
output sampling rate to that required by Digital Filters and a brief overview of the
the GSM Specification. quantization effects in digital filter. From all
This requirement forces the DDC to mentioned above, it is clear that these filters are
decimate at a rate below its minimum of very important building blocks for signal
64 in quadrature-output mode. This is processing systems implemented in discrete-time
domain. In particular, the widely available digital • http://www.scribd.com/doc/30426027/Dig
technology allows the implementation of very fast ital-Filters
and sophisticated filters in a cheap and reliable • Jackson, L.B. (1996). Digital filters and
manner. As a result, the digital filers are found in signal processing. (3rd ed.). Boston, MA:
numerous commercial products such as audio Kluwer Academic
systems, biomedical equipment, digital radio, and
• Antoniou, A. (1993). Digital filters:
TV just to mention a few. Quantization effects in
Analysis, design, and applications.
digital filters tell us about the quantisation errors,
(2nd). New York: McGraw-Hill.
noise, and limit overflow cycles which plays very
important role in the real time implementation of • http://en.scientificcommons.org/19830423
Digital filters. • http://www.dsptutor.freeuk.com/dfilt1.htm

10. References-
• http://en.wikipedia.org/wiki/Digital_filter

S-ar putea să vă placă și