Unit - 4
Structure and Implementation of FIR and IIR Filter
These techniques are used for transforming analog filters to digital filters. These techniques have their own advantages in filter designing. The design techniques are discussed in section below. Here we will discuss the importance of these structures. The FIR and IIR filters have their own merits which helps us to select them according to different needs.
FIR filters being non-recursive are always stable and also the poles are located at z=0. But, for IIR filter stability cannot be guaranteed always. FIR filters have linear phase response and has no phase distortion.
IIR filters design is more efficient in terms of computation time and memory requirements. Among IIR and FIR filters for given amplitude response specification FIR requires more processing time and storage due to more coefficients. If computer aided designs are not available FIR filters are more difficult.
Analogous filters can be transformed easily into equivalent IIR digital filter of same specifications but we cannot do the same with FIR filters.
Key takeaway
S.No | IIR system | FIR system |
1. | IIR stands for infinite impulse response systems | FIR stands for finite impulse response systems |
2. | IIR filters are less powerful that FIR filters, & require less processing power and less work to set up the filters | FIR filters are more powerful than IIR filters, but also require more processing power and more work to set up the filters |
3. | They are easier to change “on the fly”. | They are also less easy to change “on the fly” as you can by tweaking (say) the frequency setting of a parametric (IIR) filter |
4. | These are less flexible. | Their greater power means more flexibility and ability to finely adjust the response of your active loudspeaker. |
5. | It cannot implement linear-phase filtering. | It can implement linear-phase filtering. |
6. | It cannot be used to correct frequency-response errors in a loudspeaker | It can be used to correct frequency- response errors in a loudspeaker to a finer degree of precision than using IIRs. |
Direct form structures
The direct form is obtained from
Based on the above equation, we need the current input sample and M−1 previous samples of the input to produce an output point. For M=5, we can simply obtain the following diagram from Equation 1.
Fig 1 DF-1 Realization
On the other hand, for a linear-phase FIR filter, we observe the following symmetry in coefficients of the difference equation
The structure obtained from the above equation is shown in Figure 2. While Figure 1 requires five multipliers, employing the symmetry of a linear-phase FIR filter, we can implement the filter using only three multipliers. This example shows that for an odd M, the symmetry property reduces the number of multipliers of an (M−1)th-order FIR filter from M to M+1/2.
Fig 2 Final direct form structure
Cascade-Form Structure
The cascade structure is obtained from the system function H(z). The idea is to decompose the target system function into a cascade of second-order FIR systems. In other words, we need to find second-order systems which satisfy
Where P is the integer part of M/2. For example, M=5, H(z) will be a polynomial of degree four which can be decomposed into two second-order sections. Each of these second-order filters can be realized using a direct form structure. It is desirable to set a pair of complex-conjugate roots for each of the second-order sections so that the coefficients become real.
Assume that we need to implement the nine-tap FIR filter given by the following table using a cascade structure.
k | 4 | 3 and 5 | 2 and 6 | 1 and 7 | 0 and 8 |
0.3333 | 0.2813 | 0.1497 | 0 | -0.0977 |
Solution:
The system function of this filter is
It can be show
Where
Fig 3 Cascade structure
Frequency-Sampling Structure
The frequency sampling method allows the use of recursive implementation of FIR Filter. There are two ways for frequency sampling
Non-Recursive frequency sampling filter
If the frequency shown below are sampled in the interval 0 to N-1 where N-1 is number of sampling. Sampling interval is Kfs/N, 0≤k≤N-1.
Fig 4 Frequency Sampling
The FIR coefficient h[n] is calculated by IDFT of frequency samples.
h[n] = 0≤k≤N-1.
=
=
h[n] =
α = [N-1]/2
For N=odd, summation limit will be [N-1]/2
Recursive frequency sampling filter
The recursive force of frequency sampling filter offers significant computational advantages over non recursive form if large number of frequency samples are zero valued. The transfer function of an FIR filter H[z] should be in recursive form. Impulse response of filter may be defined in terms of frequency samples.
h[n]=
H[z]=
Substituting value of h[n] and inter changing summation we have
H[z] = ]
H[z] can be represented as H[z] =H1[z]H2[z]
H1[z]=
H2[z] = ]
Expanding above terms and solving them we finally get
H[z] = H1[z]H2[z]
H[z] =[
For frequency response we can replace z=ejωTs
H[ωn] = H[k] 0≤k≤N-1.
Key takeaway
- Specify ideal or desired frequency response, stop band attenuation, band edge frequencies etc of target filter.
- From specifications select type 1 or type 2 frequency sampling structure.
- Find number of frequency samples (N), number of transition band frequency samples (M), number of frequency samples in transition band (Ti), number of frequency samples in passband (BW).
- Use appropriate equation to calculate filter coefficients.
Linear phase is a property of a filter, where the phase response of the filter is a linear function of frequency. The result is that all frequency components of the input signal are shifted in time (usually delayed) by the same constant amount, which is referred to as the phase delay. And consequently, there is no phase distortion due to the time delay of frequencies relative to one another. Linear-phase filters have a symmetric impulse response. The FIR filter has linear phase if its unit sample response satisfies the following condition: h(n) = h(M − 1 − n) n = 0, 1, 2, . . . , N − 1 The Z transform of the unit sample response is given as
H[z] =
Symmetric impulse response with M=odd Then h(n) = h(M − 1 − n) and (z = ejω)
For M=even
In practice it may be impossible to use all the terms of a Fourier series. For example, suppose we have a device that manipulates a periodic signal by first finding the Fourier series of the signal, then manipulating the sinusoidal components, and, finally, reconstructing the signal by adding up the modified Fourier series. Such a device will only be able to use a finite number of terms of the series.
Gibbs’ phenomenon occurs near a jump discontinuity in the signal. It says that no matter how many terms you include in your Fourier series there will always be an error in the form of an overshoot near the discontinuity.
The overshoot always be about 9% of the size of the jump. We illustrate with the example. Of the square wave sq(t). The Fourier series of sq(t) fits it well at points of continuity. But there is always an overshoot of about .18 (9% of the jump of 2) near the points of discontinuity.
Fig 5 Gibbs Phenomenon
In these figures, for example, ’max n=9’ means we we included the terms for n = 1, 3, 5, 7 and 9 in the Fourier sum
Windowing method
Let the frequency response of the desired LTI ststem we wish to approximate be given by
Where is the corresponding impulse response.
Consider obtaining a casual FIR filter that approximates by letting
The FIR filter then has frequency response
Note that sibce we can write
We are actually forming a finite Fourier series approximation to
Since the ideal may contain discontinuities at the band edges, truncation of the Fourier series will result in the Gibbs phenomenon.
To allow for a less abrupt Fourier series truncation and hence reduce Gibbs phenomenon oscillations, we may generalize h [n] by writing
Where is a finite duration window function of length M +1.
Filter design using Kaiser window
- Let be a Kaiser window i.e
Where
2. Choose for the specified .
3. The window length M is then chosen to satisfy
4. The value for is chosen as before
Note: Using the Kaiser empirical formula M can be determined over a wide range of values to within . Very little if any literation is needed.
Design an FIR lowpass using the windowing method such that
From the window characteristic we immediately see that for Hammering window will work.
To find M set
The cut-off frequency is
If a Kaiser window is desired, then for choose
The prescribed value for M should be
Rectangular Window
This is the simplest window function but provides the worst performance from the viewpoint of stopband attenuation. The width of main lobe is 4π/N
ωR(n) = 1 for n=0,1,M-1
= 0 otherwise
Magnitude response of rectangular window is
|WR(ω)| =
Fig 6 Rectangular Window
Bartlett (Triangular) Window
Bartlett Window is also Triangular window. The width of main lobe is 8π/M
ωt(n) = 1-
Fig 7 Bartlett Window
Hanning Window
This is a raised cosine window function given by:
W(n) = ]
W(ω) = 0.5WR(ω) +0.25[WR (ω -) + WR (ω -)]
Fig 8 Hanning Window
Hamming Window
This is a modified version of the raised cosine window
W(n) = ]
W(ω) = 0.54WR(ω) +0.23[WR (ω -) + WR (ω -)]
Fig 9 Hamming Window
Blackman Window
This is a 2nd -order raised cosine window
W(n) = ]
W(ω) = 0.42WR(ω) +0.25[WR (ω -) + WR (ω -)]+ 0.04[WR (ω -) + WR (ω -)]
Fig 10 Blackman Window
Key takeaway
Window name
| Window function |
Rectangular | |
Triangular
| |
Hamming | |
Hanning | |
Blackman |
Window name | Transition width of main lobe | Min. Stopband attenuation | Peak value of side lobe |
Rectangular | -21dB | -21dB | |
Hanning | -44dB | -31dB | |
Hamming | -53dB | -41Db | |
Barlett | -25dB | -25Db | |
Blackman | -74dB | -57Db |
Example
Q1) Design a LPF using rectangular window for the desired frequency response of a low pass filter given by ωc = π/2 rad/sec, and take M=11. Find the values of h(n). Also plot the magnitude response.
Sol:
r= M-1/2 = 5
By taking inverse Fourier transform
For and
For Using L’Hospital Rule
Where
The given window is rectangular window ω(n) = 1 for 0 ≤ n ≤ 10
=0 Otherwise
This is rectangular window of length M=11. h(n) = hd (n)ω(n) = hd (n) for 0 ≤ n ≤ 10
H[z]= =
The impulse response is symmetric with M=odd=11
Response
Q2) The desired frequency response of low pass filter is given by Hd (ejω) = e−j3ω − 3π/ 4 ≤ ω ≤ 3π/ 4 and 0 for 3π /4 ≤ |ω| ≤ π Determine the frequency response of the FIR if Hamming window is used with N=7
Sol
t = M-1/2 = 3
For and
For Using L’Hospital Rule
Where
The given window is hamming window
To calculate the value of h(n)
The frequency response is symmetric with M=odd=7
RESPONSE
Q3) Design the FIR filter using Hanning window
Sol:
To calculate the value of
Q4) Design an FIR filter (lowpass) using rectangular window with passband gain of 0 dB, cut-off frequency of 200 Hz, sampling frequency of 1 kHz. Assume the length of the impulse response as 7.
Sol:
When
When
Calculating h(n)
As it is rectangular window h(n) = w(n)=hd(n)=h(n)
For M=7
n | |
0 | -0.062341 |
1 | 0.093511 |
2 | 0.302609 |
3 | 0.4 |
4 | -0.062341 |
5 | 0.093511 |
6 | 0.302609 |
Q5) Using rectangular window design a lowpass filter with passband gain of unity, cut-off frequency of 1000 Hz, sampling frequency of 5 kHz. The length of the impulse response should be 7.
Sol:
The filter specifications (ωc and M=7) are similar to the previous example. Hence same filter coefficients are obtained.
h (0) =-0.062341, h(1)=0.093511, h(2)=0.302609 h(3)=0.4, h(4)=0.302609, h(5)=0.093511, h(6)=-0.062341
Q6) Design a HPF using Hamming window. Given that cut-off frequency the filter coefficients hd (n) for the desired frequency response of a low pass filter given by ωc = 1rad/sec, and take M=7. Also plot the magnitude response.
Sol:
By taking inverse Fourier transform
The given window function is Hamming window. In this case
for
0 | -0.00119 |
1 | -0.00448 |
2 | -0.2062 |
3 | 0.6816 |
4 | -0.00119 |
5 | -0.00448 |
6 | -0.2062 |
The magnitude response of a symmetric FIR filter with is
For M=7
Q7) Design an ideal bandpass filter having frequency response Hde (jω) for π/ 4 ≤ |ω| ≤ 3π/ 4. Use rectangular window with N=11 in your design.
Sol:
The length of the filter with given is related by
And
The given window is rectangular hence
For n=0,1,2,…,10 estimate the FIR filter coefficients h(n).
The frequency sampling method is use to design recursive and non-recursive FIR filters for both standard frequency selective filters and with arbitrary frequency response. The main idea of the frequency sampling design method is that a desired frequency response can be approximated by sampling it at N evenly spaced points and then obtaining N-point filter response.
A continuous frequency response is then calculated as an interpolation of the sampled frequency response. The approximation error would then be exactly zero at the sampling frequencies and would be finite in frequencies between them. The smoother the frequency response being approximated, the smaller will be the error of interpolation between the sample points.
There are two distinct types of Non-Recursive Frequency Sampling method of FIR filter design, depending on where the initial frequency sample occurred. The type 1 designs have the initial point at ω=0, whereas the type 2 designs have the initial point at f=1/2N or ω=π/N.
Procedure for Type I design
- Choose the desired frequency response
- Samples at N points by taking where generate the sequence H(k). To obtain a good approximation of the desired frequency response, a sufficiently large number of the frequency samples should be taken
- The N points inverse DFT of the sequence H (k) gives the impulse response of the filter h (n). For a practical realization of the filter, samples of impulse response should be real. This can happen if all the complex terms appears in conjugate pairs.
Desired filter coefficients
For linear phase filter with positive symmetrical impulse response,
4) take z transform of the impulse response h (n) to get the filter transfer function H (z)
Procedure for Type 2 Design
(Same steps as above expect step 2)
2) Samples at N points by taking where generate the sequence H (z)
Type 2 frequency samples gives additional flexibility in the design method to satisfy the desired frequency response at a second possible set of frequencies.
Key takeaway
There are two distinct types of Non-Recursive Frequency Sampling method of FIR filter design, depending on where the initial frequency sample occurred. The type 1 designs have the initial point at ω=0, whereas the type 2 designs have the initial point at f=1/2N or ω=π/N.
Direct-Form Structure
Direct form I
The difference equation
Specifies the Direct-Form I (DF-I) implementation of a digital filter. The DF-I signal flow graph for the second-order case is shown in Fig.
Figure 11: Direct-Form-I implementation of a 2nd-order digital filter.
Direct form II
The signal flow graph for the Direct-Form-II (DF-II) realization of the second-order IIR filter section is shown in Fig.
Figure 12: Direct-Form-II implementation of a 2nd-order digital filter.
The difference equation for the second-order DF-II structure can be written as
Which can be interpreted as a two-pole filter followed in series by a two-zero filter.
Signal Flow Graphs
A signal flow graph is a set of directed branches that connect at nodes. It provides the graphical representation of block diagram structure.
Fig 13 Representation of Branches and Nodes
The main points for SFG are listed below
- A variable node is associated with each node.
- The signal out of the branch is equal to the branch gain times the signal into the branch.
- Signal at a node is equal to the sum of signals from all branches connecting nodes.
- Branch transmittances are indicated for the branches in flow graph.
- Branch transmittances are indicated for the branches in the flow graph.
- Delay is indicated by z-1
- When branch transmittance is unity, it is not labeled.
Transposed Structure
Many times, it is required to transform one flow graph to another without changing basic input output relationship. Then we use trans position technique. It uses flow graph reversal theorem. The theorem stated that if we reverse the direction of all branch transmittances and interchange the input and output in the flow graph the system function remains unchanged. The resulting structure is called transposed structure.
Fig 14 Transposed Structure
From above figure we can understand the concept. The above figure clearly shows that the role of adder and branching node is reversed. Now we draw the block diagram representation for the flow graph to get the transposed structure as shown in fig b.
Cascade-Form Structure
The filter section can be seen to be an FIR filter and can be realized as shown below
W[n] = p0x[n] + p1x[n-1] + p2x[n-2] +p3x[n-3]
Fig 15 H1(z) realisation
The time-domain representation of H2(z) is given by
Y[n] = w[n] –d1y[n-1] –d2y[n-2] – d3y[n-3]
Fig 16 H2(z)
A cascade of the two structures realizing and leads to the realization of shown below and is known as the direct form I structure
Fig 17 Cascade Realisation
Direct form II and cascade form realizations of
Fig 18 Direct form II
Fig 19 Cascade form
Parallel-Form Structure
Example. A partial fraction expansion of
The corresponding parallel form I realization is shown below
Examples
Q1) Draw block diagram for the function using parallel form H(z)=
A1)
H(z)=
Writing above transfer function in standard form for parallel realisation we get
H(z)=-20+
The structure is shown below
Fig 20: Parallel Realisation of H(z)=
Q2) For the following LTI system H(z)= . Realise the cascade form IIR filter.
A2) H(z)=
The above function can be simplified as
H(z)=
Fig 21: Cascade IIR Form
Hence, using the above structure and placing the values of …. And similarly,
Q3) For the system given y(n) -y(n-1) + y(n-2) = x(n) + x(n-1) realise using cascade form?
A3) The system transfer function is given as
H(z) = Y(z)/X(z)
Taking z transform of y(n) -y(n-1) + y(n-2) = x(n) + x(n-1)
Y(z) - z-1Y(z) + z-2 Y(z) = X(z) + z-1 X(z)
H(z)=
Again, simplifying the above function to get into standard cascade form we ca write
H(z) =
= H1(z)+H2(z)
H1(z)=
H2(z)=
The final structure is shown below
Fig 22: Cascade Form of H(z) =
Q4) For the following LTI system H(z)= . Realise the cascade form?
A4) H(z)=
Writing the above in standard form for cascade realisation
H1(z)=
H2(z)=
The cascade structure is shown below
Fig 23: Cascade Form of H(z)=
Q5) Realize the system transfer function using parallel structure H(z)=
A5) H(z)=
Taking Z common and then dividing the above function to convert it into standard form for parallel realisation we get
H(z)=Z [ ++]
The parallel structure is shown below
Fig 24: Parallel Realisation of H(z)=
Q6) Realize the system transfer function using parallel structure H(z)=
A6) Converting the above function to standard form using partial fraction technique
H(z)= +
Solving for A and B we get
A= 10/3
B= -7/3
H(z) = +
H1(z) =
H2(z) =
The parallel form realisation is shown below
Fig 25: Parallel Realisation of H(z)=
Q7) For the transfer function H(z) = . Realise using cascade form?
A7) H(z) =
Writing in standard form
H(z) =
H1(z) =
H2(z) =
The cascade structure is shown below
Fig 26: Cascade Form of H(z) =
Butterworth filter design
At the expense of steepness in transition medium from pass band to stop band this Butterworth filter will provide a flat response in the output signal. So, it is also referred as a maximally flat magnitude filter. The rate of falloff response of the filter is determined by the number of poles taken in the circuit. The pole number will depend on the number of the reactive elements in the circuit that is the number of inductors or capacitors used in the circuits.
The amplitude response of nth order Butterworth filter is given as follows:
Vout / Vin = 1 / √{1 + (f / fc)2n}
Where ‘n’ is the number of poles in the circuit. As the value of the ‘n’ increases the flatness of the filter response also increases.
'f' = operating frequency of the circuit and 'fc' = centre frequency or cut off frequency of the circuit.
These filters have pre-determined considerations whose applications are mainly at active RC circuits at higher frequencies. Even though it does not provide the sharp cut-off response it is often considered as the all-round filter which is used in many applications.
4.7.1 First Order Low Pass Butterworth Filter
The below circuit shows the low pass Butterworth filter:
Fig 27: First order LP Butterworth Filter
The required pass band gain of the Butterworth filter will mainly depends on the resistor values of ‘R1’ and ‘Rf’ and the cut off frequency of the filter will depend on R and C elements in the above circuit.
The gain of the filter is given as Amax = 1 + (R1 / Rf)
The impedance of the capacitor ‘C’ is given by the -jXC and the voltage across the capacitor is given as,
Vc = - jXC / (R - jXC) * Vin
Where XC = 1 / (2πfc), capacitive Reactance.
The transfer function of the filter in polar form is given as
H(jω) = |Vout/Vin| ∟ø
Where gain of the filter Vout / Vin = Amax / √{1 + (f/fH)²}
And phase angle Ø = - tan-1 ( f/fH )
At lower frequencies means when the operating frequency is lower than the cut-off frequency, the pass band gain is equal to maximum gain.
Vout / Vin = Amax i.e. constant.
At higher frequencies means when the operating frequency is higher than the cut-off frequency, then the gain is less than the maximum gain.
Vout / Vin < Amax
When operating frequency is equal to the cut-off frequency the transfer function is equal to Amax /√2. The rate of decrease in the gain is 20dB/decade or 6dB/octave and can be represented in the response slope as -20dB/decade.
4.7.2 Second Order Low Pass Butterworth Filter
An additional RC network connected to the first order Butterworth filter gives us a second order low pass filter. This second order low pass filter has an advantage that the gain rolls-off very fast after the cut-off frequency, in the stop band.
Fig 28: Second Order LP Butterworth Filter
In this second order filter, the cut-off frequency value depends on the resistor and capacitor values of two RC sections. The cut-off frequency is calculated using the below formula.
fc = 1 / (2π√R2C2)
The gain rolls off at a rate of 40dB/decade and this response is shown in slope -40dB/decade. The transfer function of the filter can be given as:
Vout / Vin = Amax / √{1 + (f/fc)4}
The standard form of transfer function of the second order filter is given as
Vout / Vin = Amax /s2 + 2εωns + ωn2
Where ωn = natural frequency of oscillations = 1/R2C2
ε = Damping factor = (3 - Amax ) / 2
For second order Butterworth filter, the middle term required is sqrt(2) = 1.414, from the normalized Butterworth polynomial is
3 - Amax = √2 = 1.414
In order to have secured output filter response, it is necessary that the gain Amax is 1.586.
Higher order Butterworth filters are obtained by cascading first and second order Butterworth filters.
n (order) | Normalized Denominator polynomials in factored form |
1 | |
2 | |
3 |
The transfer function of the nth order Butterworth filter is given as follows:
H(jω) = 1/√{1 + ε² (ω/ωc)2n}
Where n is the order of the filter
ω is the radian frequency and it is equal to 2πf
And ε is the maximum pass band gain, Amax
Examples
Let us consider the Butterworth low pass filter with cut-off frequency 15.9 kHz and with the pass band gain 1.5 and capacitor C = 0.001µF.
fc = 1/2πRC
15.9 * 10³ = 1 / {2πR1 * 0.001 * 10-6}
R = 10kΩ
Amax = 1.5 and assume R1 as 10 kΩ
Amax = 1 + {Rf / R1}
Rf = 5 kΩ
Characteristics of Butterworth filters
Ideal Frequency Response of the Butterworth Filter
The flatness of the output response increases as the order of the filter increases. The gain and normalized response of the Butterworth filter for different orders are given below:
Fig 29: Frequency Response of Butterworth Filter
Example. A Butterworth Amplitude Response design
Let,
Solving for N gives
Matching at
The normal from the table is
Frequency seal impliea that we let
Finally, the frequency scaled system function is
Chebyshev filters and elliptic filters
A Chebyshev design achieves a more rapid roll-off rate near the cut-off frequency than the Butterworth by allowing ripple in the passband (type I) or stopband (type II). Monotonicity of the stopband or passband is still maintained respectively.
Fig 30 Chebyshev Filter Type I and II
Chebyshev Type I
The magnitude response is given by
Where,
Nth order Chebyshev polynomial
And specifies the passband ripple
The Chebyshev polynomials are of the form\
With recurrence formula
An alternate form for which will be useful in both analysis and design is
Design a Chebyshev type I lowpass filter to satisfy the following amplitude specification
Using the design formula for N
From the 2dB ripple table (9-20)
Elliptic Design
Allows both passband and stopband ripple to obtain a narrow transition band. The elliptic (Cauer) filter is optimum in the sense that no other filter of the same order can provide a narrower transition band.
The squared magnitude response is given by
Fig 31: Magnitude Response
Define the transition region ratio as
The normalized lowpass system function can be written in factored form as
Note: contains conjugate pairs of zeros on the j axis which give the stopband nulls.
The filter coefficients if N is odd.
Design an elliptic lowpass filter to satisfy the following amplitude specifications,
From the 1dB ripple, 40Db stopband attenuation table wew find that N meets or exceeds the = 1.2187, so we can scale and then the desired stopband attenuation will actually be achieved at .
T6he normalized H (z) is
H(s)=(0.046998s4+0.22007s2+0.22985)/(s5+0.92339s4+1.84712s3+1.12923s2+0.78813s
To complete the design scale H (s) by letting
Example. Design from a Rational H (s)
Let,
Inverse Laplace transforming yields
Sampling seconds and gain scaling we obtain
Which implies that
Setting requires that
Example: Design a Chebyshev type 1 low pass filter to satisfy the following amplitude specifications:
Solution:
Using the design formula for N
N = [2.08]=3
Note:
The normalized system function is
With poles at
To frequency scale let
So in the z domain
Note that when the design originates from discrete time specifications the poles of H (z) are independent of .
Design of Low-pass, Band-pass, Band-stop and High-pass filters.
The procedure to design high-pass, band-pass or band-stop digital filter is listed in the following steps.
- Write the digital filter specifications.
- From these specifications find the normalized low-pass filter H(s).
- For LPF and HPF have only one critical frequency but for BPF and BSF we have lower and upper band edge frequencies ω1 and ω2.
- Replace the S in transfer function H(s)
S=s/ ωp From LPF to LPF
S= ωp/s From LPF to HPF
S= From LPF to BPF
S= From LPF to BSF
= ω1 ω2
W = ω2- ω1
- Find Lower edge frequency and Upper band edge frequency
Example
Design a digital filter for given specifications cut-off frequency =30Hz, sampling frequency=150Hz. The filter should be HPF.
Sol: First order transfer function of LPF is
Step 1: HL(s) =
Step 2: Prewrap critical frequency
Ωp = tan(ωp Ts/2)= tan[(30x2xπ)/(2x150)] =0.7265
Step 3: Using LPF to HPF Transformation equation
HH(s) = HL(s) = = =
For LPF
H(z) = HH(s) for s=
HH(s) = = 0.5792 [ ]
Example: Design a BPF with pass band of 200-300 Hz, sampling frequency 2000Hz and filter order 2.
Sol:
STEP 1: Passband edge frequency ω1 =200Hz
ω2= 300Hz
STEP 2: Prewrap critical frequency
Ω1 = tan(ω1 Ts/2)= tan(200xπ/2000) = 0.3249
Ω2 = tan(ω2 Ts/2)= tan(300xπ/2000) = 0.5095
STEP 3: = Ω1 Ω2 = 0.3249 x 0.5095 = 0.1655
W = Ω2 – Ω1 = 0.5095-0.3249 = 0.1846
STEP 4: HB(s) = HL(s) for s = S=
For LPF
H(z) =
HB(s) = = =
STEP 5: Replace s by
HB(s) =
H(z) = 0.1367 [ ]
Key takeaway
References:
- Digital Signal Processing – Principles, Algorithms and Applications by J. G. Proakis and D. G. Manolakis, Pearson.
- Digital Signal Processing: Tarun Kumar Rawat, Oxford University Press.
- Digital Signal Processing – S. Salivahan, A. Vallavraj and C. Gnanapriya, Tata McGrawHill.
- Digital Signal Processing – Manson H. Hayes (Schaum’s Outlines) Adapted by Subrata Bhattacharya, Tata McGraw Hill.
- Digital Signal Processing - Dr. Shalia D. Apte, Willey Publication