0% found this document useful (0 votes)
24 views

Digital Signal Processing Filter Design by Using PSO

This document provides specifications for designing two digital filters using particle swarm optimization (PSO). Students must design: 1) A bandpass filter with a passband of 16.8-26.8 kHz. 2) A bandstop filter with a stopband of 16.8-26.8 kHz. The specifications are normalized and transformed to lowpass equivalents for filter design. PSO is used to design IIR filters that meet the equiripple passband and monotonic stopband constraints within the given transition bands and magnitude responses.

Uploaded by

haseeb ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Digital Signal Processing Filter Design by Using PSO

This document provides specifications for designing two digital filters using particle swarm optimization (PSO). Students must design: 1) A bandpass filter with a passband of 16.8-26.8 kHz. 2) A bandstop filter with a stopband of 16.8-26.8 kHz. The specifications are normalized and transformed to lowpass equivalents for filter design. PSO is used to design IIR filters that meet the equiripple passband and monotonic stopband constraints within the given transition bands and magnitude responses.

Uploaded by

haseeb ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

Digital Signal Processing

Filter Design by Using PSO


This is an individual filter design assignment for each student who has registered for the course.
In the discussion below, the specification of each filter is provided according to its number. Each
student who has registered for the course, for credit or audit, is required to design two Filters with
the specifications as per the Filter Number M assigned to the student, by the Teaching Associates
for this course, on the course Moodle webpage. This assignment of numbers M, will be put up on
the course website by 1 March 2016.

In the filter design, you are encouraged to partly make use of SCILAB/ MATLAB or any
equivalent open source software as available. You are encouraged to contact the Computer
Centre/ the PC Laboratory in the Department of Electrical Engineering for more information on
open source software available in the Institute. It is not mandatory to use any package, of course!
You could write a small C program / high level language program as well.

For designing the IIR and FIR filters, you are NOT permitted to use “filter design” commands
directly. Neither is you permitted to carry out the whole design simply by using a filter design
package. You may use basic SCILAB/ MATLAB statements relating to matrix operations,
window function generation, and so on. You may write small programs in MATLAB. Your final
design submission must be as follows, in an electronic file to be uploaded appropriately as per
instructions from Teaching Associates, in the ‘Filter Design Assignment Forum’ on the Course
Moodle Page:

 Write your name, roll number and filter number M.


 The following data pertinent to the two filter designs assigned to you, must be submitted,
in that order.
1. The un-normalized discrete time filter specifications: including whether the pass band
and stop band are equiripple or monotonic respectively.
2. The corresponding normalized digital filter specifications.

3. The corresponding analog filter specifications for the same type of analog filter using the
bilinear transformation.

4. The frequency transformation to be employed with relevant parameters.


5. The frequency transformed low pass analog filter specifications.
6. The analog low pass filter transfer function H analog,LPF (sL).
7. The analog transfer functions for the appropriate type of filter.
8. The discrete time filter transfer function.
9. Its realization using Direct Form II.
10. An FIR Filter Transfer functions for realizing the same specifications using the Kaiser
Window. You may use a MATLAB statement for generating the Kaiser window
coefficients directly.

As it is tedious to write/type out coefficients and data by hand each time, you are welcome to
include a printout or electronic write-out of results/ data from a computer program/ SCILAB/
MATLAB program wherever appropriate. Further, you must demonstrate the frequency
response of the filter that you have designed in MATLAB/ any other means. The
demonstration must be made to a Teaching Associate for this course. The evaluation scheme will
be displayed on the course web-page in due course. The report is due to be submitted at least
one week prior to the semester-end examination in this course.
The Filter Specifications:

We wish to build a series of discrete time filters, as described below, to extract specific
bands of this analog signal, or to suppress specific parts of the analog signal.

(i) For all filters, the passband AND stopband tolerances are 0.15 in magnitude.
That is, the filter magnitude response (note: NOT magnitude squared) must
lie between 1.15 and 0.85 in the passband; and between 0 and 0.15 in the
stopband.

(ii) For bandpass filters, the transition band is 2 kHz on either side of the
passband. For bandstop filters, the transition band is 2 kHz on either side of
the stopband.

(iii) When realized as an IIR Filter, all these filters have a monotonic stopband.
(For FIR Filters, of course, we do not have a choice of the nature of stopband /
passband).

First Filter Specification: An analog signal is bandlimited to 45 kHz. It is ideally


sampled, with a sampling rate of 100 kHz. The first filter to be designed by each student
is a bandpass filter. Filter numbers 1 to 75 have a monotonic passband, whereas filter
numbers 76 to 150 have an equiripple passband. For filter numbers m and 75+m; m going
from 1 to 75; the passband is from BL(m) kHz to BH(m) kHz, where BL(m) and BH(m)
are numbers determined from m as follows. Define:
q(m) = greatest integer strictly less than 0.1m. For example, q(5) = 0,
q(30) = 2 r(m) = m – 10q(m). For example, r(5) = 5, r(30) = 10
BL(m) = 4 + 0.7 q(m) + 2 r(m). For example, BL(30) = 4 + 0.7 (2) + 2 (10)
= 25.4 BH(m) = B L(m) + 10.

Second Filter Specification: An analog signal is bandlimited to 45 kHz. It is ideally


sampled, with a sampling rate of 100 kHz. The second filter to be designed by each
student is a bandstop filter. Filter numbers 1 to 75 have an equiripple passband, whereas
filter numbers 76 to 150 have a monotonic passband. For filter numbers m and 75+m; m
going from 1 to 75; the stopband is from BL(m) kHz to BH(m) kHz, where BL(m) and
BH(m) are numbers determined from m as follows. Define:

q(m) = greatest integer strictly less than 0.1m. For example, q(5) = 0,
q(30) = 2 r(m) = m – 10q(m). For example, r(5) = 5, r(30) = 10
BL(m) = 4 + 0.9 q(m) + 2 r(m). For example, BL(30) = 4 + 0.9 (2) + 2 (10)
= 25.8 BH(m) = B L(m) + 10.

Use either Butterworth or Chebyshev approximation to design the IIR Filter as


appropriate.

For the FIR Filter, use the Kaiser window as stated above.
Matlab Calculations:
m = 120 - 75 = 45, =) q(m) = 4 & r(m) = 5

PSO Technique:
I. Un-normalized discrete time lter speci cations:
Sampling frequency = 100
KHz Equiripple passband
Passband: 16.8 kHz to 26.8 kHz
Stopband: 0 kHz to 14.8 kHz & 28.8 kHz to 50 kHz
Transition band: 14.8 kHz to 16.8 kHz & 26.8 kHz to 28.8 kHz
Passband magnitude response: 0.85 to 1.15
Stopband magnitude response: 0 to 0.15
II. Normalized digital lter speci cations:
Equiripple passband
Passband: 0.336 to 0.536
Stopband: 0 to 0.296 & 0.576 to
Transition band: 0.296 to 0.336 & 0.536 to 0.576
Passband magnitude response: 0.85 to 1.15
Stopband magnitude response: 0 to 0.15
III. Corresponding analog lter speci cations:
Using the bilinear transformation to map the normalized frequencies from the discrete
domain to the analog domain,
!
= tan( 2 ) (1)
Equiripple passband
Passband: 0.5829 to 1.12
Stopband: 0 to 0.5016 & 1.2726 to 1
Transition band: 0.5016 to 0.5829 & 1.12 to 1.2726
Passband magnitude response: 0.85 to 1.15
Stopband magnitude response: 0 to 0.15
IV. The frequency transformation to be employed
To convert these bandpass analog lter speci cations to low pass analog lter speci cations, we need to employ
the frequency transform,
2 2
= 0
LB
Where the bandpass is inter frequency and L is the frequency of the equivalent low pass
inter.0 and B are the parameters with the following value,
p
0 = p1 p2
B = p2 p1
Where the p1 and p2 are the frequencies of the passband. In increasing order so that B is
positive. In our case p1=0:5829 p2=1:12, which gives 0=0:808 and B=0.5371.
V. The frequency transformed low pass analog lter speci cations:
Under the above frequency transformation, the edge frequencies of passband and stopband
get mapped as follows:
L
+
0
) )
0:5016 (= s1 1:4894 (= Ls1
) )
0:5829 (= p1 1 (= Lp
) )
1:12 (= p2 1 (= Lp
) )
1:2726 (= s2 1:4142 (= Ls2
+1 +1
Therefore, the speci cations of the low pass lter are as follows:

Equiripple passband
Passband: 0 to 1
Stopband: 1.4142 (= min (Ls1; Ls2))
Passband magnitude response: 0.85 to 1.15
Stopband magnitude response: 0 to 0.15

The require table is also given in the following.

You might also like