DIRECT FORM FOR LINEAR PHASE FIR SYSTEM:
BY:
JAHAGIRDAR.V.S &
GAURAV BHAGWAT
OF M.TECH(ELECTRONICS)
UNDER THE GUIDANCE OF
PROF. R.B. DESHMUKH &
PROF. W.S. KHOKLE
OF THE DEPARTMENT OF ELECTRONICS ENGINEERING VISVESVAREAYA REGIONAL COLLEGE OF ENGINEERING NAGPUR - 10
FIR filters find useful applications in the fields of speech, audio, image, and video processing, pulse shaping, correlation and equalization etc.
The general equation governing FIR Filters is
y(n) = Sh(k)x(n-k) ..............................(1) k=0 toM-1
where x(n) is the input sequence y(n) is the output sequence and h(n) is the unit sample response.
Designing of Fir Filter involves determining the coefficients h(0), h(1), h(2),..........h(n) according to design constraints.
There are many methods of designing FIR Filters. These are:
1. WINDOW method 2. Frequency Sampling method 3. Hilbert transform Method etc.
These algorithms are complex and are carried out before the actual implementation of the filter by either hardware or software. All of these methods finally provide us a set of coefficients h(0), h(1), h(2),.............h(n) , which are then used to implement the FIR filter.
In general we can view eqn (1) as computational procedure (an algorithm) for determining the output sequence y(n) of the system from the input sequence x(n).However in many ways, the computations in eqn. can be arranged into equivalent sets of difference equations. Each set of equations defines a computational procedure or an algorithm for implementatingthe system. From each set of equations we can construct a block diagram consisting of an interconnection of delay elements, multipliers, and adders. Such block diagrams are called realizations of the system or equivalently structures for realizing the system.
The major factors that influence the choice of realization are
1. Computational Complexity 2. Memory Requirements 3. Finite Word-length Effects and 4. Ease of Implementation.
Computational complexity refers to the number of arithmetic operations (multiplications, divisions, and additions) required to compute an output value y(n) for the system.
Memory requirements refers to the amount of memory required to store the system parameters, past inputs, past outputs and any intermediate computed values.
Finite word-length effects or finite precision effects refers to the quantization effects that are inherent in any digital implementation of system, either in hardware or in software.
In general, an FIR system is described by the difference equation
y(n) = Sbkx(n-k) .........................(2) k=0 to M-1or equivalently, by the system function
H(z) = Sbkz -k ...........................(3) k=0 toM-1
Furthermore, the unit sample response of he FIR system is identical to the coefficients {bk} ,that is,
H(n) | =bn, 0 <= M-1 |
=0, otherwise |
The length of FIR Filter is selected as M.
There are many methods of implementing an FIR system
The direct-form realization follows immediately from the nonrecursive difference equation given by eqn (1) that is
y(n) =Sh(k)x(n-k) k=0 toM-1
This structure is illustrated in Fig.1 This structure requires M - 1 memory elements for storing the M - 1 previous inputs, and has a complexity of M multiplications and M - 1 additions per output point.
When the FIR system has linear phase, the unit sample response of the system satisfies either the symmetry or asymmetry condition
h(n) = +h(M - 1 - n)
For such a system the number of multiplications is reduced from M to M/2 for M even and to (M - 1)/2 for M odd. The structure that takes advantage of this symmetry is illustrated in Fig.2 for the case in which M is odd.
The cascade realization follows naturally from the system function given by eqn. (3). It is simple matter to factor H(z) into second-order FIR systems so that
H(z) = P Hk (z) k=1to K
where
Hk (z) = bk0+bk1z-1+bk2z-2 k=1,2,..........,K
and K is the integer part of (M+1)/2. The cascade-form realization along with the basic second-order section are shown in Fig.3.
There are a few other complex structures also namely Frequency-Sampling Structure and Lattice structure etc.
The implementation selected is the Direct form structure.
register word length | 8bits |
Data register word length | 8 bits |
Length of filter | Scalable |
Blocks | Area l*l | Delay | Other details |
Adder | 77x142 | 1ns | |
Multiplier | 532x1111 | 8ns | 8bit fixed point I/P 16 bit O/P |
Register | 97x66 | 1ns | 1bit |
Latch | 46x59 | 1ns | 1bit |
The filter could be implemented by: Cascading as many units of the unit cell as the length of the filter. This can be done if the application in which the filter is to be used is known and that application requires a fixed length filter. Alternatively, we can construct a filter of fixed length and number of unit cells with a special configuration register used to select the length of the filter. Such a filter can be generally configured as per the situation .
Fig 1:A unit cell block diagram
The operation of the filter cell is as follows: When the clock goes low... Data from cell (n-2) is passed to cell (n-1). cell (n-2) gets the data of cell(n-3)...and data from the data source is loaded to cell0.i.e data is shifted out to the next cell. When the clock goes high... The coefficients h (0), h (1), h (2)...h (n-1) are loaded in the coefficient register. The multiplication of h (n) with x (n-k) takes place in the multiplier this is then added to the output of the previous cell and the result is passed on to the next cell where the same process is repeated.
Typical working of the ckt
Clock | Cell-0 h(0) | Cell-1 h(1) | Cell-2 h(2) | Cell-3 h(3) | Cell-4 h(4) | Operation |
L | x(0) | * | * | * | * | Load cell-0 |
H | x(0)h(0) | * | * | * | * | Compute y(0) |
L | x(1) | x(0) | * | * | * | Shift data |
H | x(1)h(0) | x(0)h(1) | * | * | * | Compute y(1) |
L | x(2) | x(1) | x(0) | * | * | Shift data |
H | x(2)h(0) | x(1) h(1) | x(0) h(2) | * | * | Compute y(2) |
L | x(3) | x(2) | x(1) | x(0) | * | Shift data |
H | x(3)h(0) | x(2) h(1) | x(1) h(2) | x(0) h(3) | * | Compute y(3) |
L | x(4) | x(3) | x(2) | x(1) | x(0) | Shift data |
H | x(4)h(0) | x(3) h(1) | x(2) h(2) | x(1) h(3) | x(0) h(4) | Compute y(4) |
L | x(5) | x(4) | x(3) | x(2) | x(1) | Shift data |
H | x(5)h(0) | x(4) h(1) | x(3) h(2) | x(2) h(3) | x(1) h(4) | Compute y(5) |