You are on page 1of 37

Lecture 3: March 6, 2007

Topic:
1. Frequency-Sampling Methods (Part I)

1
Lecture 3: March 6, 2007
Topic:
1. Frequency-Sampling Methods (Part I)
• basic principle and tasks,
• non-uniform frequency-sampling method,
• uniform frequency-sampling method A.,
• uniform frequency-sampling method A.: optimization
approach included.

2
4.2. Frequency-Sampling Methods
To approximate any continuous frequency response, one
could sample frequency response at N points along the
frequency interval  0,  and evaluate the continuous
frequency response as an interpolation of the sampled
frequency response. The approximation error would then
be exactly zero at the sampling frequencies and be finite
between them. The smoother the frequency response being
approximated, the smaller the error of interpolation
between the sample points. For the solution of this
approximation – interpolation task (i.e. the evaluation of a
impulse response of FIR filter!) a number of methods will
be given in the next parts of our presentation.
3
Frequency-Sampling Method: Basic Principle
r e 
j
Desired real-valued frequency response: H
d

Approximation of ideal
frequency response: r 
j
H e
Approximation error:
ek =

=He
d
r -H
re

j

k
 
j k

Samples of H
dr e 
j
m

k
4
Frequency-Sampling Method: Basic Tasks
A. Sampling process:
Frequency Set the value of Set the
selection: sample (real-valued) phase

f  k 
jk
k H dr (e jk
) H (e )

Sample of frequency response is defined!


B. Approximation by interpolation:
H (e j1 ) H (e j2 ) K K K K H (e jM -1 ) H (e jM )

Interpolation H (e j ) Impulse response


is defined!
h n End of design!
5
The four cases of linear phase FIR filters. The
real-valued frequency response. Summary.

1. M-even, Symmetry-S (M/2-coefficients):


M
-1
 -
1
 M
2
H
(
r =
)2
=
k0
h
(k
)
co
s -
2
k

M
-1
2
Hr(
0 )=2h
(k)
k=
0

6
2. M-odd, Symmetry-S ((M+1)/2-coefficients):
M -3

 M -1 2
 M -1 
H r ( ) = h    2  h(k )cos   -k
 2  k =0  2 
M -3

 M -1 2
H r (0) = h    2  h(k )
 2  k =0

3. M-even, Symmetry-A (M/2-coefficients):


M
-1
 -
1
 M2
H
(
r =
)2
=
k0
h
(k
)
si
n  -
2
k

H r (0) = 0 7
4. M-odd, Symmetry-A ((M-1)/2-coefficients):

M -3
2
 M -1 
H r ( ) = 2  h(k )sin   -k
k =0  2 

H r (0) = 0

8
The four cases of linear phase FIR filters.
Phase response. Summary.

1-2. M-even: � M -1
�- for H r ( ) �0
� 2
f ( ) = �
� M -1
- - for H r ( ) �0
� 2

3-4. M-odd:
� M1
-
-
�  forHr
()� 0
�2 2
f
()=�

-
M
-13
 fo
rH 
()� 0
�2 2 r
9
4.2.1. Non-Uniform Frequency-Sampling Method

Each of the equations in the previous tables constitutes a


set of linear equations for determining the coefficients of
a linear phase FIR filter. Consequently, if we specify
response at either (M+1)/2 or (M-1)/2 or M/2 points in 
we can solve the corresponding set of linear equations
for the coefficients h(n). Generally, the values ofk and
H dr (e jk )

can be chosen arbitrarily. Therefore, the method is called


as non-uniform frequency sampling method.
10
4.2.1. Non-Uniform Frequency-Sampling Method

Each of the equations in the previous tables constitutes a


set of linear equations for determining the coefficients of
a linear phase FIR filter. Consequently, if we specify
response at either (M+1)/2 or (M-1)/2 or M/2 points in 
we can solve the corresponding set of linear equations
for the coefficients h(n). Generally, the values ofk and
H dr (e jk )

can be chosen arbitrarily. Therefore, the method is called


as non-uniform frequency sampling method.
11
4.2.1. Non-Uniform Frequency-Sampling Method

Each of the equations in the previous tables constitutes a


set of linear equations for determining the coefficients of
a linear phase FIR filter. Consequently, if we specify
response at either (M+1)/2 or (M-1)/2 or M/2 points in ,
we can solve the corresponding set of linear equations
for the coefficients h(n). Generally, the values ofk and
H dr (e jk )

can be chosen arbitrarily. Therefore, the method is called


as non-uniform frequency sampling method.
12
Example:
Build up a set of linear equations for the design of the 6-
th order linear phase FIR filter (M=6), which has a
symmetrical unit sample response and the real-valued
frequency response that satisfy the conditions:

1 = 0 H r  1  = H r (0) = 1
  
 2 = H r   2  = H r   = 0.8
3 3
  
 3 = H r   3  = H r   = 0.1
2 2
13
Solution:
If M=6 and unit sample response is symmetrical, then
the following expressions for H r (e j ) are validated:

M
-1
2
 M -1 
H r ( ) = 2  h(k )cos   -k=
k =0  2 
6
-1
2
 M -1 
= 2  h(k )cos   -k=
k =0  2 
2
 6 -1 
= 2  h(k )cos   -k
k =0  2 
14
5 5 
H r ( ) = 2h(0)cos     2h(1)cos   - 1
2 2 
5 
2h(2)cos   - 2 
2 

5 k 3 k k
H r ( k ) = 2h(0)cos  2h(1)cos  2h(2)cos
2 2 2

15
1 = 0 H r  1  = H r (0) = 1
  
 2 = H r   2  = H r   = 0.8
3 3
  
 3 = H r   3  = H r   = 0.1
2 2

16
1 = 0 H r  1  = H r (0) = 1
51 31 1
H r (1 ) = 2h(0) cos  2h(1) cos  2h(2) cos
2 2 2
5.0 3.0 1.0
1 = 2h(0)cos  2h(1)cos  2h(2)cos
2 2 2
1 = 2h(0)  2h(1)  2h(2) (1)

  
 2 = H r   2  = H r   = 0.8

=
0
.
82h(0 )
3
c
o
5
s  2
  
h (1)cos
3
3
 2h(2 )
c
os(2)
6 6 6
17
  
3 = H r   3  = H r   = 0.1
2 2

=
0
.
12h
(
0
)
co
s
5
2
h
(
1
)
3
c
o
s2
h
(
2
)
  
c
o
s(3)
8 8 4

18
The set of desired equations:

1 = 2h(0)  2h(1)  2h(2) (1)

=
0
.
82h
(
0
)
co
s
5
2
h
(
1
)
3
c
o
s2
h
(
2
)c
o
s(2)
  
6 6 6

5 3 
0.1 = 2h(0)cos  2h(1)cos  2 h(2)cos (3)
8 8 4

19
By solving of the above given set of linear equations
we can obtain:
h(0), h(1), h(2)

Because of symmetrical impulse response:

h(0) = h(5), h(1) = h(4), h(2) = h(3)

Therefore, by using these results, the complete


impulse response can be obtained:
h(0), h(1), h(2), h(3), h(4), h(5)

20
4.2.2. Uniform Frequency-Sampling Method A


Although the values of k and H dr ( e jk
) in the
corresponding equations can be chosen arbitrarily, it is
usually desirable to select equally spaced points in the
frequency, in the rage 0     . Following this idea the
frequencies can be selected in accordance with the next
rules:
2k M
M-even, Symmetry-S: k = k = 0,1 ,K , - 1
M 2

2k M-1
M-odd, Symmetry-S: k = k=0,K
,1 ,
M 2
21
Problem of H dr (0) for symmetry-A:
Because in this case H dr (0) = 0 independent of our
choice of h(n), it is obvious that the frequency
=0
cannot be used in the specification. Thus we may define
the frequencies in accordance with the following rules.
The proposed choice of equally spaced frequencies
allows to avoid completely the zeros at
 = 0  =
i.e the situations when
H dr (0) = H dr ( ) = 0 22
Method A.

2k M
M-even, Symmetry-A: k = k=1
,2,K,
M 2
2k M -1
M-odd, Symmetry-A: k = k=1
,2,K,
M 2

Method B.  1
2k 
 2 M
M-even, Symmetry-A: k = k=0
,1,K, - 1
M 2
 1
2k 
 2 M -1
M-odd, Symmetry-A: k = k=0,1,K,
M 23
2
4.2.2.1. Frequency Response Sample Specification
In the case of a linear phase FIR filter design by
frequency sampling methods, the values of
H r ( k )
have to be specified, too.
The simplest approach:
H r ( k ) = 1  k  pass-band

H r ( k ) = 0  k  stop-band
H r ( k ) is not specified in the transient-band,
i.e. the transient-band width is 2
24
M
In this form of H r ( ) specification, H r ( ) is changed
abruptly from the pass-band, where H r ( ) = 1, to the stop-
band, where H r ( ) = 0 . Instead of having an abrupt
change, if we specify an intermediate value of H r ( ) in
the transition band, the resulting frequency response has
significantly smaller side lobes in the stop-band. The
following example illustrates this point.

25
Example:
Determine the coefficients h(n) of a linear phase FIR
filter of length M=15 which has a symmetrical unit
sample response and the frequency response that
satisfies the condition: Transition band width: 2 /15

a) H
2
k
1
=

f
or=
k0
,1
,
2,
3
 
r 
 1
5 0
 f
or=
k4
,5
,
6,7


1f o
rk =0,1 ,
2,3

2k
= =
b) H
r  0
.
4fo
rk 4
15
0fo
rk =5, 6,7
Transition band width: 4 26/15
The magnitude response of the resulting filter are
illustrated in the next figures. In the case of the task of
a), we observe that the filter has an overshoot at the
edge of the pass-band, just prior to the transition
region. It also has relatively large side lobes in the stop-
band. In the case of the task b) it can be noted that the
side lobes are significantly lower than in the previous
design.

27
The magnitude response of the resulting filter are
illustrated in the next figures. In the case of the task of
a), we observe that the filter has an overshoot at the
edge of the pass-band, just prior to the transition
region. It also has relatively large side lobes in the stop-
band. In the case of the task b) it can be noted that the
side lobes are significantly lower than in the previous
design.

28
Example: magnitude responses (linear scale)
M = 15
Task of a): transition
region width= 2 / M
k=0 k=1 k=2 k=3

b) k=4
Task of b): transition
region width=4 / M

k=6 k=7

29
a) k=4 k=5
Example: magnitude responses (dB scale)
M = 15 Task of a): transition region width= 2 / M
20 * log H  e
10
j

[dB]

Task of b): transition region width= 4 / M


 30
4.2.2.2. Optimization Approach
The previous example clearly illustrate the advantages in
allowing a small transition in the design of filters. The
only disadvantage is that the width of the transition region
is increased. Specifically, the transition region was about
twice as wide as in the above example. The reduction in
the stop-band side-lobes can be obtained by allowing for
one or more (usually one or two) additional frequency
specifications in the transition bands.

31
4.2.2.2. Optimization Approach
The previous example clearly illustrate the advantages in
allowing a small transition in the design of filters. The
only disadvantage is that the width of the transition region
is increased. Specifically, the transition region was about
twice as wide as in the above example. The reduction in
the stop-band side-lobes can be obtained by allowing for
one or more (usually one or two) additional frequency
specifications in the transition bands.

32
4.2.2.2. Optimization Approach
The previous example clearly illustrate the advantages in
allowing a small transition in the design of filters. The
only disadvantage is that the width of the transition region
is increased. Specifically, the transition region was about
twice as wide as in the above example. The reduction in
the stop-band side-lobes can be obtained by allowing for
one or more (usually one or two) additional frequency
specifications in the transition bands.

33
Solution A: The suitable values of the sample
specifications in the transition band can be found
experimentally (e.g. by using MATLAB software).

Solution B: The optimum values of the sample


specifications in the transition band are tabulated and
available in some references.

34
Solution C: A set of equations must be written and
solved that mathematically expresses the desired
optimization. Let us assume that the frequency samples
in the transition band are labeled T1 and T2 for
convenience. These samples are ones to be optimized. In
order to find optimum values T1 and T2, a set of
constraint equations must be written for frequencies in the
pass-bad and stop-band. Typical sets of such constraints
might be:

35
Optimization task (constraint equations) C1:

e
(
)=
H
e
-
H 
e
j  �pass-band
� j
d ee  0 : fixed tolerance
e( ): approximation error

m
i
nma
x
H 

-
eH 
j
  d  
e  �stop-band by selection
j

of T1 and T2
e( ): approximation error

  : the „real“ frequency response function


He j

d e  : desired (ideal) frequency response


j
H 36
Optimization task (constraint equation) C2:

m
i
nm
ax
W
e
 
j
H e
  d
j
- H e
 
j
 
by selection
of T1 and T2
e( ): approximation error

a known weighting function on the frequency response


approximation error

weighed error of approximation

Solution of the C1 and C2 problem:


linear programming methods
37

You might also like