Fir Filter Design And Digital Signal Processing Accounting Essay

Published: October 28, 2015 Words: 2455

FILTER DESIGN plays an important role in the Digital Signal Processing. FIR filters have a transfer function of a polynomial in z and is an all-zero filter in the sense that the zeroes in the z-plane determine the frequency response magnitude characteristic.

FIR filters are particularly useful for applications where exact linear phase response is required and is generally implemented in a non-recursive way which guarantees a stable filter.

The FIR filter design in general can be implemented using the following three types of design methodologies: 1.Fourier window Method, 2.Frequency sampling technique, 3.Optimal filter design method. Of these methodologies, optimal filter design method provides a wide variety of Time-domain Constraints in addition to the usual Frequency-domain requirements. Eigenfilter approach is the efficient and popular design methodology among the available optimal filter design methods as they are easy to compute and implement.

Need for Eigenfilters

According to the choice of Performance measure (i.e., objective function) to be minimized, we employ several classes of optimal filters. Eigenfilter approach minimizes the quadratic measure of the error in the passband and stopband. Thus, EigenFilters are referred as optimal filters, optimal in the least square sense, but these filters employ the objective function defined in a different manner in which it is formed by formulating it as a sum of the pass-band and stop-band errors. Furthermore the transition band error is also excluded in this approach. Such a formulation leads to obtain the optimal filter coefficients from an eigenvector of the appropriate matrix.

Eigenfilters can be designed to incorporate a wide variety of time domain constraints in addition to the usual frequency domain requirements with ease. The filter coefficients are obtained merely by computing an Eigen vector of a positive definite matrix, which is derived from the time and frequency domain specifications.

Thus in contrast to other filter design algorithms such as the least-squares approach which requires the computation of the matrix inverse, the Eigenfilter method requires only the computation of a single eigenvector, which can be found efficiently via the iterative power method. Apart from its inherent low design complexity, the Eigenfilter methods can also incorporate a variety of time and frequency-domain constraints into the design problem with relative ease, in contrast to other conventional filter design methods such as the McClellan-Parks algorithm.

FORMULATION OF EIGENFILTER

The Eigenfilter design methodology is implemented, by considering a Type-1 linear phase filters to prevent phase distortion, i.e., we constrain h(n) to have a linear phase. The general form of these filters of order N are given as

Here h(n) satisfies the symmetry condition, h(n)=h(N-n) and also N is even [5]. Therefore, H(e^j? ) can be specified as

Here H_R (?) represents the amplitude response of H(e^j? ) and can be represented as [3]

here M=N/2 and also

(4)

Often, we would like the amplitude response of a real coefficient FIR filter h(n) to approximate a real desired response, say D(?), over a particular frequency region R ? [0,p]. In general, to obtain H_R (?) to approximate the desired response D(?) over the region R is to choose the coefficients of {b_n } to minimize the mean-squared error between D(?) and H_R (?) given by

(5)

Thus we consider approximating a low-pass filter with passband frequency ?_p and stopband frequency ?_s, whose desired response given of the form

As a consequence, to obtain the amplitude response of the filter, H_R (?) to approximate with that of the real desired response, D(?) as specified in (6), two quantities are considered, viz. a stopband error measure E_s and a passband error measure? E?_p. Hence the objective function thereby reflects the stop-band energy as well as the pass-band accuracy. We will formulate the minimization problem in a manner that the optimal coefficient of b can be computed as an eigenvector of an appropriate positive definite matrix such that the appropriate objective function is minimized.

So the Stop-band energy formulated using (6) is given as

Thus the mean square stopband error is given as

(7)

where

(8)

Here the (m, n) element of P is given as

which can be evaluated in terms of ?_s, m, and n.

Unlike the stopband error measure, if the mean-squared error of (5) is used, the resulting expression will not be in the form of a quadratic form in terms of the vector b. To overcome this, a reference frequency is introduced into the design problem. Thus, we consider the amplitude response at zero frequency given by H_R (0)= b^T 1, where 1 is the vector of all 1's, as a reference. Thus the pass-band deviation at any frequency w.r.t. to the reference amplitude reference is given as

As a consequence the passband error is chosen to be of the form

Thus the mean square passband error is given as

(10)

The objective function is defined by formulating it as the sum of the stopband and passband errors given by

f= aE_s+ (1-a) E_p

(11)

where 0< ? <1. Here '?' is a tradeoff parameter between passband and stopband performances.

Thus formulating the objective function from (7) and (8) in (11) leads to

Thus, the objective function which minimizes the performance measure in least square sense is given as

It can be easily verified that R is a real, symmetric and positive definite matrix since 0= ? =1. To avoid trivial solutions, we impose that b has unit norm, i.e., b^T b=1. Thus, the unit-norm vector b which minimizes the objective function f, is the eigenvector corresponding to the minimum Eigen value ?_0 of R which can be calculated using the 'Iterative Power Method'.

Simulation results

Here in our literature we have carried out the design of Linear Phase Eigenfilters as explained above with band-edges ?_p=0.3p,?_s=0.5p, and order of the filter being N=30. Thus, the transition bandwidth for the specified band-edges is (?_p-?_s )=0.20p. The magnitude response of the Eigenfilter is plotted for ?=0.56 and 0.2 is shown in the Fig. 1.

Fig. 1. Magnitude response obtained using Eigenfilter approach.

Fig. 2. Magnitude response obtained using Eigenfilter approach.

As ? is increased the peak stop-band ripple is reduced at the expense of peak pass-band ripple. The trade-off parameter ? controls the performance of the passband and stopband. When ?˜0, most of the design emphasis is on the passband and thereby the passband ripple sizes are smaller than for the other values of ?. Similarly, when ?˜1, most of the design emphasis is on the stopband and thereby the stopband ripple sizes are smaller compared to all the other values of ?.

Fig. 3. Magnitude response obtained using Eigenfilter approach.

The figure shows the magnitude response of the Eigenfilter, where the specified passband and the stopband frequencies provides the required filter design specifications. As the transition bandwidth (?_p-?_s )=0.10p is very low compared to that of the previous example in which the transition bandwidth is (?_p-?_s )=0.20p, we need to increase the order of the filter to obtain the desired cut-off From the plots and its general formalization, we can analyze that the Eigenfilter approach has the magnitude response similar to that of any other optimal filter designs methods (viz., least square approach, McClellan-Parks Algorithm, etc.,), but the filter design using these approaches is much complicated than that of the Eigenfilter approach.

IFIR IMPLEMENTATION

The interpolated Finite impulse response (IFIR) approach is an efficient way to design and implement narrow band filters. The interpolated FIR (IFIR) filter approach can design FIR filters efficiently and implement them with significant savings in the number of arithmetic operations and thereby reducing the number of adders and multipliers needed for the practical realization of the filter.

Fig 4: Cascade implementation of IFIR filters design.

Here filter H(z) is realized as the cascade of the model filter G(z^L) and an image suppressor filter K(z), where L is the interpolation factor. Here the transition band width of the model filter is L times that of the overall filter. The image filter K(z) is designed to remove the unwanted spectral images of the passband of the model filter. The IFIR filter implementations require only about (1/L) time as many multipliers and adders in disparity with that of a conventional FIR filter, with L denoting the interpolation factor.

The IFIR Eigenfilters is implemented using a type-1 linear-phase FIR filter of order N. The transfer function of these filters in z-domain is given by (1), so that H(e^j? ) can be represented by combining (2) and (3) of the form given as

here b and c(?) are same as that of (4).

Here, the coefficients b_n^' s and h_n^' s are related as h=Db and b=Eh. Since the order of the filter considered is of order N, therefore the vector h has N+1 coefficients represented by a column vector as

As b represents the folded version of h and therefore consists of ( N/2+1) coefficients represented by a column vector of the form

b

(14)

The coefficients of b is selected such that H_R (?) given by (3) stays close to a zero value in the stopband and also H_R (?) remains close to H_0 (e^j?) in the passband. Thus, for the lowpass filter with band edges at ?_p and ?_s, the objective function is formulated in a manner that it is minimized as

(15)

The typical IFIR filter structure implementation is shown in Fig. 4. Here the first section, G(z) is a filter with bandedges L?_p and L?_s, with L denoting the interpolation factor. Since the transition bandwidth is increased, the order required to realize G(z) is considerably reduced to about (1/L) times the order required in the direct design approach. Evidently, the function G(z^L) has the approximate band edges ?_p and ?_s. The second section, K(z) then eliminates the (L-1) additional passband images which are present in G(z^L). Typically, the transition bandwidth of K(z) is typically much wider than (??_p-??_s), and therefore the design of the filter, K(z) requires a much lower order. Because of its low order, the design and implementation of K(z) is not significant. Hence we need to design and implement G(z) such that the total system H(z)=G(z^L )K(z) approximate the desired frequency response. Therefore, in IFIR structure, we need to set up the objective function of H(z) related only to the coefficients of G(z). Thus, the objective function of H(z) should be of the form given by

E=c^T P^' c.

Here c is related only to coefficients of G(z).

Let the transfer function of the FIR filter G(z) of order M is given as

G(z)=?_(n=0)^M¦?g_n z^(-n) ?

(16)

Since, G(z) is of order M, it has (M+1) coefficients represented in a column matrix of the form

g=[g_0 g_1….g_M ]^T.

Then the coefficients of c are formed by folding the coefficients of g. Similarly, let the transfer function of H(z) is of the form given in (1). Since H(z) if of order N, we can define the coefficients of H(z) represented in a column vector as

h=[h_0 h_1….h_N ]^T.

The folded version of h is given by the column vector b. Here, b has (M/2+1) coefficients.

If the image suppressor filter, K(z) is considered to be of Jth order. Then the transfer function of this filter is given by

K(z)=?_(n=0)^J¦?k_n z^(-n) ?

(17)

Since K(z) if of order J, we can define the coefficients of K(z) represented in a column vector as

k=[k_0 k_1….k_J ]^T.

The IFIR filter structure as shown in Fig. 4, can be approximated with the total system H(z) iff

N=LM+J

(18)

here N,M,J specifies the order of the filters H(z), G(z) and K(z), with L being the interpolation factor.

The objective function of H(z) can be represented as (13). The folded b of H(z) is therefore obtainable as

b=Eh.

(19)

h represents the filter coefficients of H(z).

But in IFIR filter structure depicted in Fig 4, we have H(z)=G(z^2 )K(z). Here the interpolation factor L is taken as 2 for simplicity, but the result can be easily generalized to any value of L. Thus the filter coefficients of H(z) can be written in terms of the filter coefficients of G(z^2 ) and K(z) given by

h=kg^'.

(20)

Here g' and k represents the filter coefficients of G(z^2 ) and K(z) respectively. The filter coefficients of G(z^2 ) can be obtained from the filter coefficients of G(z) by incorporating zeroes between the filter coefficients of g. Thus the generalized formula to determine the filter coefficients of G(z^2 ) from the coefficients of G(z) is given as

g^'=Sg,

(21)

where

(22)

If c represents the folded version of g, then these two vectors are related as

g=Dc.

(23)

Thus the objective function of H(z) of the form, E=b^T Pb can be re-formulated in terms of the filter coefficients of G(z^2 ) and K(z) as follows:

Since

Combining the above equation with the objective function of H(z) leads to

Thus the objective function is re-formulated as

?E=c?^T P^' c.

(24)

Thus, to find the optimal coefficients of G(z) which minimize the E, we find the eigenvector c of P' corresponding to the smallest Eigenvalue, and then unfold it to get g.

Simulation of IFIR filters using Eigenfilter approach:

To design the Filter H(z) with the passband frequency, ?_p being 0.15p and the stopband frequency ?_s, being 0.25p generally requires an order of the filter to be N=42. This filter is actually implemented via IFIR approach as described above using the Eigenfilter approach by formulating two filters G(z) and K(z) of order M=18 and J=6 respectively. Thus the objective function ?E=c?^T P^' c , with c being the filter coefficients of G(z). Fig. 5 corresponds to the magnitude response of G(z) which minimizes the objective function given by (24).

Fig. 5. Magnitude response of G(z) of order M=18, using the IFIR filter design approach

Since the filter K(z) is of low order, the K(z) is chosen arbitrarily as a maximally flat frequency response at ?=0 and ?=p. The magnitude response of the filter G(z^2 ) is obtained by using the relation (21). Thus as in Fig. 4, the IFIR filter structure is implemented by convolving the filters k and g' which is shown in Fig. 6.

Fig.6. Magnitude response of G(z^2) and K(z) of order M=18 and J=6 respectively using the IFIR filter design approach

The magnitude response of the low-pass IFIR Eigenfilter is shown in Fig. 7.

With order of the filter M=18 and J=2 and alpha=0.98, designed the filter response of the order N=42.

The actual implementation of the filter H(z) with order N=42, involves many computations and require many adders and multipliers compared to the filter design involving IFIR filter

approach, and thereby the IFIR filter approach significantly reduces the arithmetic operations and as a result, a significant reduction in the number of adders and multipliers is attained which improves the computational efficiency.