Sie sind auf Seite 1von 11

University of Babylon

College of Engineering
Electrical Department

Filter Design

Supervised by : Dr. Osama Al-Thahb

Prepared by: Israa Mohammed

1
FINITE WORD-LENGTH EFFECTS
The registers are the basic storage devices in digital systems. The
maximum size of the binary information (or data) that can be stored in a
register is called register word length. Digital signal processing (DSP)
algorithms are realized either with special purpose digital hardware or as
programs for a general purpose digital computer. In both cases, the
numbers and coefficients are stored in unite-length registers.
Therefore, the coefficients and numbers which are usually of larger length
are quantized by truncation or rounding off when they are stored. Various
problems can arise in the digital implementation of the arithmetic
operations involving the binary data due to the finite word
length limitations of the registers storing the numbers and the results of
arithmetic operations. In general, the effects due to finite precision
representation of numbers in a digital system are commonly referred to as
finite word length effects.
In implementing a discrete-time system in hardware or software, it is
important to consider the finite word-length effects. For example, if a filter
is to be implemented on a fixed-point processor, the filter coefficients must
be quantized to a finite number of bits. This will change the frequency
response characteristics of the filter. In this section, we look at the finite
precision effects in digital filter implementations

Quantization of Filter Coefficients


In order to implement a filter on a digital processor. The filter coefficients
must be converted into binary form. This conversion leads to movements
in the pole and zero locations and a change in the frequency response of
the filter. The accuracy with which the filter coefficients can be specified
depends upon the word length of the processor, and the sensitivity of the
filter to coefficient quantization depends on the structure of the filter, as
well as on the locations of the poles and zeros
For a second-order section with poles at

2
the filter coefficients in a direct form realization are

a(1)=2r cos θ a(2)=-r2


If a(1) and a(2) are quantized to B + 1 bits, the real part of the pole
location is restricted to 2B+1 possible values, and the radius squared is
restricted to 2B values. The set of allowable pole locations for a 4-bit
processor is shown in Fig.1.

Fig.1. The set of allowable pole locations in the first quadrant of the z-plane for a
second-order IIR filter implemented in direct form using a 4-bit processor

3
A general sensitivity analysis of a pth-order polynomial

Shows that the root locations are more sensitive to coefficient


quantization errors when the roots are tightly clustered. For example, if
the coefficients a (k) are quantized,

then the sensitivity of the location of the i th pole to changes ∆a(k) in the
coefficients a(k) is approximately

Thus, if the poles are tightly clustered, |𝜶𝒊 - 𝛼𝑗 | is small, and small changes
in a(k) will result in large changes in the pole locations.
The movement of the poles may be minimized by maximizing the distance
between the poles, |𝛼𝒊 - 𝛼𝑗 |. This may be accomplished by implementing a
high-order filter as a combination of first- or second order systems. For
example, with a cascade of second-order sections. Each pair of complex
conjugate poles and zeros may be realized separately, thereby localizing
the coefficient quantization errors to each section.
For an FIR filter

4
Thus, the quantization errors may be modeled as H ( z ) in parallel with
∆H(z) as shown in Fig.2. If we assume that the coefficients h(n) are less
than 1 in magnitude, and that the coefficients are rounded to B + 1
bits,

Therefore, a loose bound on the error in the frequency response is

As with IIR filters, if the zeros are tightly clustered, the zero locations
will be sensitive to coefficient quantization errors. However, FIR filters
are commonly implemented in direct form for two reasons:
1. The zeros of FIR filters are not generally tightly clustered.
2. In direct form, linear phase is easily preserved.

Fig. 2. Model for the coefficient quantization error in FIR filter

5
EXAMPLE: Consider the following implementation of a second-order
filter:

(a) Find the system function corresponding to this network.


(b) If the coefficients (r cos𝝎o) and (r sin𝝎o) are quantized to 4 bits, draw
the set of allowable pole locations in the z-plane. For what types of filters
would this filter structure be preferred over a direct form structure?

(a) This filter structure is called the coupled form realization. The
system function for this filter may be found as follows. The
difference equations relating x (n), v (n). and y(n) are

6
7
8
Filter Design
INTRODUCTION
The design process begins with the filter specifications, which may include
constraints on the magnitude and/or phase of the frequency response,
constraints on the unit sample response or step response of the filter,
specification of the type of filter (e.g., FIR or IIR), and the filter order.
Once the specifications have been defined, the next step is to find a set of
filter coefficients that produce an acceptable filter. After the filter has been
designed, the last step is to implement the system in hardware or software,
quantizing the filter coefficients if necessary.

FILTER SPECIFICATIONS
Before a filter can be designed, a set of filter specifications must be
defined. For example, suppose that we would like to design a low-pass
filter with a cutoff frequency 𝝎𝒄 .The frequency response of an ideal low-
pass filter with linear phase and a cutoff frequency 𝝎𝒄 is

which has a unit sample response


1 𝜔𝑐 −𝑗𝛼𝜔 𝑗𝜔𝑛
hd (n) = ∫ 𝑒
2𝜋 −𝜔𝑐
.𝑒 d𝜔

Because this filter is unrealizable (noncausal and unstable), it is necessary


to relax the ideal constraints on the frequency response and allow some
deviation from the ideal response. The specifications for a low-pass filter
will typically have the form

as illustrated in Fig. 3. Thus, the specifications include the passband


cutoff frequency, 𝜔𝑝 the stopband cutoff frequency 𝜔𝑠 , the passband
deviation, 𝛿𝑝 . and the stopband deviation,𝛿𝑠 . The passband and stopband
deviations
9
Fig. 3. Filter specifications for a low-pass filter.

are often given in decibels (dB) as follows:

10
The interval [𝜔𝑝 , 𝝎𝒔 ] is called the transition band.
Once the filter specifications have been defined, the next step is to design
a filter that meets these specifications.
FIR FILTER DESIGN
The frequency response of an N th-order causal FIR filter is

And the design of an FIR filter involves finding the coefficients h(n) that
result in a frequency response that satisfies a given set of filter
specifications. FIR filters have two important advantages over 1IR filters.
First, they are guaranteed to be stable, even after the filter coefficients have
been quantized. Second, they may be easily constrained to have
(generalized) linear phase. Because FIR filters are generally designed to
have linear phase, in the following we consider the design of linear phase
FIR filters.

Reference: (McGraw) Schaum's Outlines of Digital


Signal Processing

11

Das könnte Ihnen auch gefallen