FIR FILTER DESIGN USING ANALOG PROTOTYPING

Experiment No. 5 FIR FILTER DESIGN USING ANALOG PROTOTYPING Introduction The traditional approach to design IIR digital filters involves the transfor...
Author: Rafe Fleming
5 downloads 2 Views 328KB Size
Experiment No. 5

FIR FILTER DESIGN USING ANALOG PROTOTYPING Introduction The traditional approach to design IIR digital filters involves the transformation of an analog filter into a digital filter meeting prescribed specification because 1. The art of analog filter design is highly advanced and since useful results can be achieved, it is advantageous to utilize the design procedures already developed for analog filters 2.

Many useful analog design methods have relatively simple closed-form design formulas. Therefore digital filter design methods based on such analog design formulas are rather simple to implement.

3. In many applications it is of interest to use a digital filter to simulate the performance of an analog linear filter Analog Filter Design in MATLAB

Butterworth Filter A low-pass Butterworth filter is an all-pole filter with a squared magnitude response given by

The parameter N is the order of the filter (number of poles in the system function), and Ω c is the 3-dB cutoff frequency. Magnitude response of Butterworth filter of order 2,4,6,8 is shown in figure1.

Figure 1

MATLAB Command [b,a] = butter(n,Wn,'ftype','s') designs an order n lowpass analog Butterworth filter with angular cutoff frequency Wn rad/s. It returns the filter coefficients derived from this transfer function:

If Wn is a two-element vector with w1 < w2, butter(n,Wn,'s') returns an order (2*n) Order , bandpass analog filter with passband w1 < ω < w2. [b,a] = butter(n,Wn,'ftype','s') designs a highpass, lowpass, or bandstop filter. Type of analog filter can be specified as high pass, low pass, or band stop filter, by setting the string 'ftype' to one of the following.

  

'high' for a high pass filter with cutoff frequency Wn 'low' for a low pass filter with cutoff frequency Wn 'stop' for an order 2*n band stop digital filter, if Wn is a two-element vector, Wn = [w1 w2]. The stop band is w1 < ω < w2.

To obtain zero-pole-gain form, use three output arguments as shown below: [z,p,k] = butter(n,Wn,'s') or [z,p,k] = butter(n,Wn,'ftype','s') returns the zeros, poles and the scalar gain k.

Sample Code % Sample Code for analog butter worth low pass filter % Butterworth Low pass Filter, 12th Order, Cutoff Freq. 100 rad/s. [b,a] = butter(12,1000,'low','s'); % Generation of 10000 logarithmically spaced points between 10^-3 and 10^3 w = logspace(-1,10,10000); %Plot the frequency response evaluated at points in the s domain specified by w. freqs(b,a,w);

Chebyshev Filters There are two types of Chebyshev filters.

Chebyshev Type I Filter A type I Chebyshev filter is all-pole with an equiripple passband and a monotonically decreasing stopband. The magnitude of type I chebyshev filter frequency response is

where TN is a chebyshev polynomial, Ωp is the passband cutoff frequency, ε is a parameter controlling passband ripple amplitude. The magnitude response of a chebyshev type I 6 th order filter is shown in figure 2.

Figure 2

MATLAB Command [b,a] = cheby1(n,R,Wp,'s') designs a lowpass analog Chebyshev Type I filter with order n and angular passband edge frequency Wp rad/s. It returns the filter coefficients in vectors b and a, in descending powers of s, derived from the transfer function

Angular passband edge frequency is the frequency at which the magnitude response of the filter is -R dB. If Wp is a two-element vector Wp = [w1 w2] with w1 < w2, then cheby1(n,R,Wp,'s') returns a bandpass analog filter with passband w1

Suggest Documents