Sie sind auf Seite 1von 98

All-Pass Filters

Two-Path Filters

Transformations

Digital Signal Pro essing


for Communi ations
J. Eri Salt and Ha H. Nguyen

Department of Ele tri al & Computer Engineering


University of Saskat hewan
Saskatoon, SK, Canada, S7N 5A9
eri .saltusask. a, ha.nguyenusask. a

ColTe h  Vietnam National University, May 2011

Salt & Nguyen, DSP for Communi ations

Page 1

All-Pass Filters

Two-Path Filters

+ z 1
,
1 + z 1

H(z) =

Transformations

1
*

Salt & Nguyen, DSP for Communi ations

Page 2

All-Pass Filters
For small

the zero goes

phase response.

Two-Path Filters
to and only

Transformations
the pole ae ts the

max
p

+ z 1
= z 1
0 1 + z 1

lim H(z) = lim

0
<0

<0

Spe ial- ase all-pass lter

Salt & Nguyen, DSP for Communi ations

z 1 ,

single pole at

z=0

Page 3

All-Pass Filters

Two-Path Filters
=
c
z

c
p

Transformations
e j

complementary
angle to z

pc =

zc =

= cz cp



=
z
p
2
2
= p z = (z p ) = H(ej )

Salt & Nguyen, DSP for Communi ations

Page 4

All-Pass Filters

Two-Path Filters

Phase Properties

Transformations

(0) = 0

() =

( )

( )

Salt & Nguyen, DSP for Communi ations

Page 5

All-Pass Filters
Now onsider

Two-Path Filters
= 1 , where is small:

Transformations

( )

( ) changes rapidly
when approaches

Salt & Nguyen, DSP for Communi ations

= 1 +

Page 6

All-Pass Filters

Two-Path Filters

Transformations

Using All-Pass Networks in Filters

All-pass
network 1

x[ n]

y[ n ]

All-pass
network 2

Salt & Nguyen, DSP for Communi ations

Page 7

All-Pass Filters

Two-Path Filters
0

Transformations

( ) both 1 ( ) & 2 ( )

1 ( )

2 ( )

pass band

transision band

stop band

1 ( ) = 2 ( )

2 ( ) 1 ( )

2 ( ) = 1 ( )

Salt & Nguyen, DSP for Communi ations

Page 8

All-Pass Filters

Two-Path Filters

Upsampling an All-Pass Filter with Zero Stung

3
2

for both high rate


and low rate

( )

Transformations

(high rate)

(low rate)
low-rate spectrum is
squeezed by a factor of 2

H(z) = HL (z 2 ) =

Salt & Nguyen, DSP for Communi ations

+ z 2
H(ej ) = HL (ej2 )
1 + z 2

Page 9

All-Pass Filters
Lo ations of poles and

Two-Path Filters
2
zeros in H(z) = HL (z ):
1

Transformations

H L (z)

H (z) = H L ( z 2 )

j
1
j

Salt & Nguyen, DSP for Communi ations

Page 10

All-Pass Filters

Two-Path Filters

Transformations

The frequen y response is

jM

1j

1
1+

tan

+
e
+ e


= M
=
M
j 2
1 + ejM
e
+ ej 2
1 + j 1
1+ tan

H(ej ) =

j M

ejM

M
2
M
2




deno

tor
mina

Salt & Nguyen, DSP for Communi ations

nume

rator

1
M

tan

1
+

1
M

tan

1
+

Page 11

All-Pass Filters

Two-Path Filters

Transformations

Implementing First-Order All-Pass Networks


+ z 1
1 + z 1

H(z) =

x[n ]

v[n ]

y[ n ]

z 1

direct form II

Salt & Nguyen, DSP for Communi ations

Page 12

All-Pass Filters

Two-Path Filters

Noise Model

Transformations
q1[n]

v[n ]

y[ n ]

x[n ]

z 1

q2 [n] = q1[n 1]

q[n]

z 1

q2 [n]

q1[n]

z 1

yq [ n ]

H ( z)

Salt & Nguyen, DSP for Communi ations

Page 13

All-Pass Filters

Two-Path Filters

Transformations

Dire t Form I and a Derivative

+ z 1
1 + z 1

H(z) =

x[n ]

v[n ]

z 1

y[ n ]

z 1

Salt & Nguyen, DSP for Communi ations

Page 14

All-Pass Filters

Two-Path Filters

z 1

x[n ]

v[n ]

Transformations

y[ n ]

z 1

do not need this

x[n ]

z 1

y[ n ]

z 1

x[n ]

The node labeled v[n]


has been removed

z 1

Rearranged direct form I,

z 1

Salt & Nguyen, DSP for Communi ations

i.e., a derivative from


direct form I
y[ n ]

Page 15

All-Pass Filters

Two-Path Filters

Noise Model

Transformations

z 1

x[n 1]

x[n ]

z 1

Q( z )

Yq (z) = Q(z) z 1 Yq (z)


Salt & Nguyen, DSP for Communi ations

Hq (z) =

q[n]

y[ n ]

Yq ( z )

Yq (z)
1
=
Q(z)
1 + z 1
Page 16

All-Pass Filters

Two-Path Filters

Signal Level Analysis

Transformations

z 1

x[n ]
+

[ n]

v[n]

z 1

y[ n ]

z 1

X ( z)

( z )

out [n]

( z )

in [n]

z 1
Y (z)

Salt & Nguyen, DSP for Communi ations

Page 17

All-Pass Filters

Two-Path Filters

(z)
(1 z 1 )(1 + z 1 )
1 z 2
=
=
1
X(z)
1 + z
1 + z 1

H (z) =

Transformations

Salt & Nguyen, DSP for Communi ations

Page 18

All-Pass Filters
Plots of



H (ej ) 2 =

Two-Path Filters

Transformations

22 cos(2)
for ve values of
1+2 +2 cos

=0

= 0.99

D
3.5

= 0.99

= 0.7

H (ej ) 2

2.5

= 0.7

1.5
1

0.5
0
0

0.1
0.2
0.3
0.4
frequency in cycles per sample, i.e., /(2)

Salt & Nguyen, DSP for Communi ations

0.5

Page 19

All-Pass Filters

Two-Path Filters

Transformations

Example

Suppose the input to the lter below is a 1.11 signed fra tion and a
signed 18 bit 18 bit multiplier is used to implement .
z 1

12.11

x[n ]

[ n]

z 1

v[n]

y[ n ]

(a) What is the signal format of [n].

(b) Does x[n] need to be sign extended? If so by how many bits?


( ) Does x[n] need to be zero padded? If so by how many bits?
(d) v[n] must be trun ated. After trun ation what is the signal format
of v[n]?
Salt & Nguyen, DSP for Communi ations

Page 20

All-Pass Filters

Two-Path Filters

Solution

(a) The multiplier that implements

Transformations
has 18-bit input so

[n]

will

be an 18-bit number. Sin e no information is given on the

x[n], the worst ase analysis is used for [n]peak ,


[n]peak = 2x[n]peak . Sin e x[n] is a 1.11 number and
[n] an be twi e as large as x[n] and sin e [n] is an 18-bit
number, [n] should have a 2.16 bit format.

spe trum of
whi h is

(b) Te hni ally,

x[n]

does not have to be sign extended. The

adder produ es a arry out whi h provides an extra integer bit


in its output.
( ) Yes
(d)

x[n]

needs to be zero padded to a 1.16 number.

x[n 1] and then delayed and subtra ted


from x[n] to be ome [n]. Therefore v[n] must have the same
number of fra tion bits as [n] whi h is 16. Therefore, v[n]
v[n]

is added to

must be trun ated to 16 fra tion bits.

Salt & Nguyen, DSP for Communi ations

Page 21

All-Pass Filters

The Stru ture of Interest

Two-Path Filters

Transformations

z 1

X ( z)

H0 ( z2 )

H1 ( z 2 )

Y ( z)

H0 ( z2 )

X ( z)

z 1

Y ( z)

H1 ( z 2 )

1) One leg must be a fun tion of

z2.

2) The other leg must be a fun tion of

z2

in as ade with a

1 .
z

Salt & Nguyen, DSP for Communi ations

Page 22

All-Pass Filters

Two-Path Filters

Transformations

H (e )
H (e j )

H (e j ( + ) )





H ej 2 + H ej() 2 = 4

Salt & Nguyen, DSP for Communi ations

Page 23

All-Pass Filters

Two-Path Filters

Transformations

S aling the two-path system output by a fa tor of 0.5 yields the


following two-path stru ture:

H0 ( z2 )

X ( z)

z 1

0.5

Y (z)

H1 ( z 2 )





H ej 2 + H ej() 2 = 1

Salt & Nguyen, DSP for Communi ations

Page 24

All-Pass Filters

Two-Path Filters
H (e j )

Transformations

p 0

0.707

0.5

s 0

2
2
2
1) H ej = 1 H ej() H ej 1.

2
2) H ej 2 =
3) 3-dB = 2 .

4) p2

1 .
2

{z

positive

s2 (
2 +)
.
2

Salt & Nguyen, DSP for Communi ations

Page 25

All-Pass Filters

Two-Path Filters

Transformations

Example
A lter is designed to have a stop band attenuation of 60 dB
relative to the pass band. What is maximum value of

is in the stop band?

if

is su h that
2

Solution:

60

dB

p ( 2 )

= 20 log10 s_max
60

s_max = 10 20 = 103 = 0.001

Cal ulated exa tly:

p_max = 1

1 s2_max = 1

1 106 = 5.0000012 107

Cal ulated approximately:

p_max =

s2_max
2

106
= 5.0000000 107
2

The error in the approximation is

Salt & Nguyen, DSP for Communi ations

12
50000012

= 2.4 105 %.

Page 26

All-Pass Filters

Natural Transition Band

Transformations

p 0

H (e j )

Two-Path Filters

0.707

0.5

stop band template

s 0

Remark: p

+ s

2s
is a fun tion of

s ,

i.e.,

p =

s2
2 , and is usually mu h

smaller than the pass band ripple spe ied for a pra ti al lter.

Salt & Nguyen, DSP for Communi ations

Page 27

All-Pass Filters

Two-Path Filters

Transformations

Design Pro edure


1) Guess the order of the lter.
2) Pla e zeros on the unit ir le in the stop band with spa ing

determined by trial and error to satisfy one but not both of the
following riteria:

a) The maximum gain at frequen ies between the zeros on the


unit ir le is s .
b) The stop band orner frequen y is s .

3) On ea h trial pla ement of the zeros plot the frequen y


response to see if the riterion used is met.

4) If the riterion used was a), then after pla ing the zeros to
satisfy riterion a) use the plot to nd

s .

If the riterion used

was b), then use the nal plot to determine

Salt & Nguyen, DSP for Communi ations

s .

Page 28

All-Pass Filters

Two-Path Filters

Transformations

3
2
1

Salt & Nguyen, DSP for Communi ations

Page 29

All-Pass Filters

Two-Path Filters

Transformations

gain = 1 at

= 1 , 2 , 3
and at

H (e j )

0.707

template

0.5

does not meet SPEC

1 2

1 1

If the riterion used is to make


need to be moved toward

Salt & Nguyen, DSP for Communi ations

meet the SPEC. Then the zeros

.
Page 30

All-Pass Filters

Two-Path Filters

Non-Linear Phase Two-Path Filters  Simplest Case


0 + z 1
,
1 + 0 z 1

H1 (z) = 1

H0 (z) =

Transformations

H0 ( z2 )

0 + z 2
1 + 0 z 2

X ( z)

z 1

0.5

Y (z)

H1 ( z 2 )

H(z) =




0 + z 2
z(1 + 0 z 2 ) + (0 + z 2 )
1
+z
0.5 =
0.5
1 + 0 z 2
(0 + z 2 )z

Salt & Nguyen, DSP for Communi ations

Page 31

All-Pass Filters

Two-Path Filters

0 + z + z 2 + 0 z 3
0.5
(0 + z 2 )z

H(z) =

Transformations

1) Noti e the numerator polynomial is symmetri . This, in


general, pla es restri tions on the lotions of the zeros:

a) zeros an be on the real axis.


b) zeros an appear as omplex pairs on the unit ir le.
) zeros an appear as a set of four at rej , 1r ej , rej , 1r ej .

2) For

0 0 < 1

(stability riterion), the poles are on the

imaginary axis at

1 < 0 0,

z = j0, z = j 0 ,

the poles are on the real

Salt & Nguyen, DSP for Communi ations

z = j 0 .

axes at 0 .

and

For

Page 32

All-Pass Filters
Case 1:

Two-Path Filters
z1 = 1, z2 = r, z3 = z12 = 1r where 1 r 1.

1
1r

1
r

for

this ase

1 0
|{z}

0 =

Case 2:

r=1

z1 = 1, z2 = ej , z3 = z2 = ej
0 =

= , 0 =

1
3

Salt & Nguyen, DSP for Communi ations

1
,
1 2 cos

for

1 0
,
3 3

Transformations

1
3
|{z}

r=1

0, 0 1
3

Page 33

All-Pass Filters

Two-Path Filters

Transformations

Plot of 0 = 1/(1 2 cos )

2
1.5

This is the region of interest

0.5
0

0.5
1

1.5

2
0

0.2

0.4

0.6

0.8

Salt & Nguyen, DSP for Communi ations

Page 34

All-Pass Filters

Two-Path Filters

Transformations

Example
Design a 3rd-order low-pass half-band lter with a stop band
attenuation of 40 dB (i.e.,

s ()max = 0.01

in the stop band). Find

the stop band orner frequen y and natural pass band orner
frequen y.
Solution:

1. Guess zeros at
2. Find

z = ej , z = ej( 8 ) .

using Matlab.

3. Find the frequen y response using Matlab.

Salt & Nguyen, DSP for Communi ations

Page 35

All-Pass Filters

Two-Path Filters

Trial #1: Choose

Transformations

7
8 .

Trial magnitude response for zeros on the unit circle at = 0.875


10
0


20log10 H ej

10
20
30
40
50

60
0

0.2
0.4
0.6
0.8
frequency normalized to radians per sample, i.e., /

Salt & Nguyen, DSP for Communi ations

Page 36

All-Pass Filters

Two-Path Filters

Trial #4: Make

= 0.818 .

Transformations

This works!

Trial magnitude response for zeros on the unit circle at = 0.818


10
0


20log10 H ej

10
20
30

stop band

40
50

60
0

s 0.791
0.2
0.4
0.6
0.8
frequency normalized to radians per sample, i.e., /

Salt & Nguyen, DSP for Communi ations

Page 37

All-Pass Filters

Two-Path Filters

Transformations

Pass band of the nal lter:


Trial magnitude response for zeros on the unit circle at = 0.818

0
0.5


20log10 H ej

1.5

2.5

3.5

0.1
0.2
0.3
0.4
0.5
frequency normalized to radians per sample, i.e., /

Ripple SPEC
Pass band orner
Salt & Nguyen, DSP for Communi ations

0.5 dB

1 dB

3 dB

0.405

0.435

0.5

Page 38

All-Pass Filters

Two-Path Filters

Transformations

Magnied pass band of the nal lter:

x 10

Magnitude response for zeros at = 0.818

0
0.1
0.2

20log10(1 p )


20log10 H ej

0.3
0.4
0.5
0.6
0.7
0.8

0.9
1
0

= 0.182
2

0.1
0.2
0.3
0.4
0.5
frequency normalized to radians per sample, i.e., /

Salt & Nguyen, DSP for Communi ations

Page 39

All-Pass Filters

Two-Path Filters

p =

Transformations

s2
(0.01)2
=
= 5.0 105
2
2

Che k:

20 log(1 p ) = 0.42 103


1 p = 10

0.42103
20

= 102.110
5

p = 1 102.110

= 4.8 105 .

The above result is basi ally the same as al ulated value.

Salt & Nguyen, DSP for Communi ations

Page 40

All-Pass Filters

Two-Path Filters

Transformations

Phase Response of a Two-Path Filter




0 () = H0 (z )

z=e j


1 () = z 1 H1 (z 2 )

z=ej


0 ()
H(ej ) = 0.5 e|j{z
}+
H0 (ej2 )

H(e ) = 0.5e
H(ej ) = ej

0 ()+1 ()
2

0 ()+1 ()
2

cos

e


ej H1 (ej2 )

1 ()0 ()
2

+e

1 () 0 ()
2






()

()
1
0
j
H(e ) = cos



2

Salt & Nguyen, DSP for Communi ations

j1 ()
|e {z }

H(ej ) =

1 ()0 ()
2

0 () + 1 ()
2
Page 41

All-Pass Filters
Phase relationship between

Two-Path Filters
0 () and 1 ()

in the pass band

radians

|1 () 0 ()| 2s ( )

Transformations

Relationship between output phase and

0 ()

and

1 ()

() = 1 () s ( )

radians

for

in pass band.

() = 0 () s ( )

radians

for

in pass band.

Important observation:
system, i.e.,

If H1 (z) is hosen to be a linear-phase


H1 (z) = z M , then H(z) will have a nearly

linear-phase response in its pass band:

() =

k
|{z}

phase of

z 1 H1 (z 2 )

H0 (z)
Salt & Nguyen, DSP for Communi ations
The same is true if

( )
|s {z }

radians

deviation from
linear phase
in units of radians

is hosen to be a linear phase system.

Page 42

All-Pass Filters

Two-Path Filters

Transformations

Phase in the stop band


radians

0 () 1 () (2k + 1) 2s ()


s ()

s ()

1
H(e ) = 1 () k +
2
j

1
H(e ) = 0 () + k +
2
j

Salt & Nguyen, DSP for Communi ations

Page 43

All-Pass Filters

Two-Path Filters
0

Transformations

Phase response for zeros on the unit circle at = 0.818


phase normalized to , i.e., 6 H ej /

0.5
1

1.5
2

2.5
3

3.5

zero in H(z) at z = ej0.818

4.5
0

0.2
0.4
0.6
0.8
frequency normalized to radians per sample, i.e., /

Salt & Nguyen, DSP for Communi ations

Page 44

All-Pass Filters

Two-Path Filters

Transformations

j
The below graph shows the dieren e between H(e ) and

1
2
z H1 (z ) z=ej = 1 () = .

deviation in phase from 1 () = (units radians)

Illustration of being nearly linear phase in the pass band

0.02

0.015
0.01

0.005

s = 40dB, which is 0.01

0.005
0.01

natural pass band corner frequency

0.015
0.02
0

0.05
0.1
0.15
0.2
frequency normalized to radians per sample, i.e., /

Salt & Nguyen, DSP for Communi ations

0.25

Page 45

All-Pass Filters

Two-Path Filters

Transformations

fred harris's Matlab fun tion that designs two-path non-linear phase
lters is alled

Kp :

It has three arguments:

We have studied two-path lters so this parameter should be 2.

rst-order

Npaths :

nonlineardesign_2.

The number of

H1 (z).

all-pass se tions used in

H0 (z)

and

There is only one parameter so the number of se tions

It seems that using


higher-order all-pass se tions is not needed in the design
of half-band low-pass lters with nonlinear phase.
in ea h path must be the same.

p :

s . It is the
p = 0.4 then

This parameter is named in orre tly. It should be


stop band orner frequen y normalized to
the stop band orner is

The fun tion is alled by

Salt & Nguyen, DSP for Communi ations

(0.4)2

2 .

If

radians/sample.

nonlineardesign_2(Npaths ,Kp ,p ).

Page 46

All-Pass Filters

Two-Path Filters

The plots for

nonlineardesign_2_ha(2,2,0.3)

Transformations
are shown next,

whereas the following is printed in the Matlab ommand window:

Coeffi ient Sets: a(n,k), of 2 Path Filter


Polynomials: H_N(Z,n,k) = Z^N + a(n,k), N = 2
Path-0 Coeffi ients
a(0,0): 0.545323651071
a(0,1): 0.079866426236
Path-1 Coeffi ients
a(1,0): 0.834411891481
a(1,1): 0.283829344874

Salt & Nguyen, DSP for Communi ations

Page 47

All-Pass Filters

Two-Path Filters

Transformations

Impulse response of 2-path filter

0.2

amplitude

0.4


20log10 H ej

0.2
0

20

40

60
80
samples
Frequency response of 2-path filter

100

20
40
60
80

100
0

0.05

0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45


frequency in cycles per sample, i.e., /(2)

Salt & Nguyen, DSP for Communi ations

0.5

Page 48

All-Pass Filters

Two-Path Filters

Transformations

Roots of 2-path, 4-coefficient filter


1

0.8
0.6
0.4
0.2
0

0.2
0.4
0.6
0.8
1

1 0.8 0.6 0.4 0.2

Salt & Nguyen, DSP for Communi ations

0.2 0.4 0.6 0.8

Page 49

All-Pass Filters

Two-Path Filters

Transformations

Phase profiles of 2-path filter


0

Normalized phase, i.e., ()/(2)

0.5
1

phase of H(z)

1.5
2

phase of z 1 H1 (z 2 )

2.5

phase of H0 (z)

3.5

4
0

0.05

0.1 0.15 0.2 0.25 0.3 0.35 0.4


frequency in cycles per sample, i.e., /(2)

Salt & Nguyen, DSP for Communi ations

0.45

0.5

Page 50

All-Pass Filters

Two-Path Filters

Transformations

Half-Band High-Pass Filters

The stru ture for a high-pass lter is the same as a low-pass lter

ex ept the output is the dieren e of the two paths.

HLP (z) =

H0 (z 2 ) + z 1 H1 (z 2 )
2

H0 (z 2 ) z 1 H1 (z 2 )
2





H0 (z 2 ) 2 + z 1 2 H1 (z 2 ) 2
2
2
|HLP (z)| + |HHP (z)| =
2
HHP (z) =

If

H0 (z 2 )

and

H1 (z 2 )

are

all-pass systems

then





HLP (ej ) 2 + HHP (ej ) 2 = 1

The above result means that the stop band of


pass band of

HHP (z),

Salt & Nguyen, DSP for Communi ations

HLP (z)

be omes the

making it a high-pass lter.

Page 51

All-Pass Filters

Two-Path Filters

Transformations

Nearly Linear Phase Design

z 2M
X ( z)

z 1

Remark:

H1 ( z 2 )

fred harris uses this stru ture in his

design s ript alled

lineardesign_2.

Salt & Nguyen, DSP for Communi ations

Y (z)

Matlab

linear lter

Page 52

All-Pass Filters

Two-Path Filters

Transformations

The stru ture on the previous page ould be rearranged as shown


below. Note that the ommon delay of two paths is unne essary
and an be removed. fred harris's phase response in lude this

unne essary delay.

this becomes H1 ( z 2 )

z 2( M 1)

X ( z)

z 1

z 1

Y (z)

H1 ( z 2 )

this becomes H 0 ( z 2 )

Salt & Nguyen, DSP for Communi ations

Page 53

All-Pass Filters

Two-Path Filters

Transformations

H 0 ( z ) = z 2

z 4

X ( z)

Y (z)

H1 ( z 2 )

z 1

H(z) =

1
1
+
z4
z

1 + 1 z 2
1 + z 2



1 + 3 z 2
3 + z 2

Example: Using lineardesign_2 to design a nearly linear phase


half-band lter with a stop band orner of 0.35 2 . The lter
oe ients 1 and 3 are printed as follows:

Roots =
4 Poles at Origin
bran h 0 - 4 Delays,
Z^(-4)
Roots =
-0.56245233422427
0.11285645628677
bran h 1 - type1
oeffi ient

Salt & Nguyen, DSP for Communi ations

0.562452334224268

-0.1128564562867698

Page 54

Two-Path Filters

Transformations

20log10 H ( e j )

All-Pass Filters

zeros on unit circle

frequency in cycles/sample

1 = 0.56245
3 = 0.11285

Salt & Nguyen, DSP for Communi ations

Page 55

All-Pass Filters

Two-Path Filters

Transformations

Pole-zero diagram
4
3

These zeros force high attenuation


in the stop band and thereby
force a nearly flat pass band

2
1
0

rogue zeros

2
3
4

Salt & Nguyen, DSP for Communi ations

Page 56

All-Pass Filters

Two-Path Filters

Transformations

Phase response
0


H ej (radians)

phase response for z 4 , i.e., 6 H0 ej2

10

15
0

0.1
0.2
0.3
0.4
frequency in cycles per sample, i.e., /(2)

Salt & Nguyen, DSP for Communi ations

n 4
2
4.5
0.5

Page 57

All-Pass Filters

Two-Path Filters

Transformations

Se ond-Order All-Pass Filters

c1 + c0 z 1 + z 2
1 + c0 z 1 + c1 z 2

H(z) =

The dire t form I stru ture that implements

c1

x[n ]

c0

z 1

c0

c1

H(z)

(1)
is plotted below.

y[ n ]

z 1
z 1

Salt & Nguyen, DSP for Communi ations

Page 58

All-Pass Filters

Two-Path Filters

x[n ]

Transformations

c1

y[ n ]

z 1

c0

c0

z 1
z 1

c1

z 1

z 1

x[n ]

c1

c0

z 1

y[ n ]

Salt & Nguyen, DSP for Communi ations

Page 59

All-Pass Filters

Two-Path Filters

c1 + c0 z 1 + z 2
1 + c0 z 1 + c1 z 2

H(z) =

Transformations
(2)

1 j
e
r

re j

re j

Salt & Nguyen, DSP for Communi ations

1 j
e
r

Page 60

All-Pass Filters

Two-Path Filters

Transformations

The exe utable is lineardesign_2.


This is GUI driven so all is lineardesign_2 without any parameters.

The GUI has a graph window whi h displays the magnitude response of
the filter. It also has several fields that an be set. These field are:
resolution: The parameter asso iated with field sets the number of points
displayed on the graph. The default is 300
iterations: The parameter asso iated with field sets the number of
iterations used to al ulate the oeffi ients.
The default is 20 (this is probably low; should use 50)
w from x.xx to y.yy: This is the field where the stop band orner, ws, is
spe ified. The x.xx to y.yy gives the range of valid
values for ws. The range depends on the number of paths
(i.e. bran hes) used in the filter.
The units of ws are y les/sample.
No of Paths:

The parameter asso iated with this field spe ifies the number
of bran hes (i.e. paths) used in the filter.

No of oeffi ients: The parameter asso iated with field sets the number of
oeffi ients per bran h (i.e. oeffi ients per path)

Salt & Nguyen, DSP for Communi ations

Page 61

All-Pass Filters

Two-Path Filters

Transformations

There are three a tion buttons.


The ompute button auses lineardesign_2 to ompute new
oeffi ients and generate new plots.

ompute:

reiterate: The reiterate button auses lineardesign_2 to refine the


oeffi ient value by ontinuing its iterative sear h from
where it left off. It will update the oeffi ients and
redraw the graphs.
move zero: The move zero button provides the apability to hange
the lo ation of the zeros that are on the unit ir le.
The two fields below this button are used to sele t the
zero that is to be moved and by how mu h.
The number in the field on the left spe ifies the zero
to be moved. Zero 1 is the one nearest the stop band
orner. Zero 2 is the next zero in the dire tion toward
pi, et .
The number in the field on the right spe ifies by how mu h
the angle of the zero is to be hanged. The units are
y les/sample. For example if the zero to be hanged was
at exp(j*2) then a hange of -0.05 would relo ate the
zero to exp(j*(2-0.05*2*pi)).

Salt & Nguyen, DSP for Communi ations

Page 62

All-Pass Filters

Two-Path Filters

Transformations

The oeffi ients are printed in the ommand window. The are listed as
type 1 oeffi ients or type 2 oeffi ients. Type 1 oeffi ients are
for first order all-pass se tions and type 2 oeffi ients are for
se ond order all-pass se tions.

The ompute button also generates Figures 2, 3, 4 and 5. These are plots
of pole/zero lo ations, impulse response, group delay and phase response
respe tively.

It is pointed out that lineardesign_2 does not handle the


simplest design dis ussed on page 31.

Salt & Nguyen, DSP for Communi ations

Page 63

Two-Path Filters

Transformations

20 log10 H ( e j )

All-Pass Filters

zero #1

frequency in cycles/sample

number of zeros

change angle (really frequency)


by this amount (units cycles/sample)

Salt & Nguyen, DSP for Communi ations

Page 64

All-Pass Filters

Two-Path Filters

Roots =
8 Poles at Origin
bran h 0 - 8 Delays,

Transformations

Z^(-8)

Roots =
-0.74306768611189
-0.00226674995220 + 0.29194638242415i
-0.00226674995220 - 0.29194638242415i
0.26079311355045
bran h 1 - type1
oeffi ient
bran h 1 - type2 1st oeffi ient
bran h 1 - type2 2nd oeffi ient

Remarks:

0.7430676861118883
0.004533499904404936
0.08523782836589149

-0.260793113550452

type1 and type2 refer to rst-order and se ond-order

se tions, respe tively. For a se ond-order se tion, 1st oe ient


is

c0

and 2nd oe ient is

Salt & Nguyen, DSP for Communi ations

c1 .

Page 65

All-Pass Filters

Two-Path Filters

Transformations

Pole-zero diagram
2.5

2
1.5
1

0.5
0

0.5
1

1.5
2

2.5
2

Salt & Nguyen, DSP for Communi ations

Page 66

All-Pass Filters

Two-Path Filters

Transformations

Phase response


H ej (radians)

10

15

20

25
0

0.1
0.2
0.3
0.4
frequency in cycles per sample, i.e., /(2)

Salt & Nguyen, DSP for Communi ations

6.5

0.5

Page 67

All-Pass Filters

Two-Path Filters

Transformations

Impulse response
1

0.8

Amplitude

0.6
0.4
0.2
0

0.2

0.4
0

20

40

60

80

100

Samples

Salt & Nguyen, DSP for Communi ations

Page 68

All-Pass Filters

Two-Path Filters

Transformations

Low-Pass to Low-Pass Transformation

x[n ]

1
g(z)

where

g(z)

is an all-pass system

HG (z) = H

b0

y[ n ]

x[n ]

b0

y[ n ]

z 1

z 1

z 1

b1

b1

z 1

z 1

z 1

b2
H ( z)

Salt & Nguyen, DSP for Communi ations

b2

HG ( z)

Page 69

All-Pass Filters

Two-Path Filters
Frequen y Response of HG (z)

g ej = ej()

D
j

HG e

where

()

j samples

=H e

Transformations



= H ejwarp ()

()
warp () = samples
.


H ej with the
frequen y axis ompressed when warp () > and raried when
warp () < . The ompression fa tor for frequen y is
Observation:

HG ej

an be thought of as

warp ()
()
=
= delay

samples

Salt & Nguyen, DSP for Communi ations

of

 1 
g z samples

at frequen y

Page 70

All-Pass Filters

warp (0 ) = (0 )

Two-Path Filters

Transformations

z old
s old

location of a zero in H (e j )

warp ( ) = ( )

s new

z new
2

used in H G (e j )

location of the zero in H G (e j )

Salt & Nguyen, DSP for Communi ations

Page 71

All-Pass Filters

Two-Path Filters

Transformations

H (e j )

s old = warp (s new )


z old

H G (e j )

s new =

Salt & Nguyen, DSP for Communi ations

s old
2

z new

Page 72

All-Pass Filters

Two-Path Filters

Transformations

Phase response curves for first-order APF with as indicated


Negative of phase angle normalized to 2, i.e., ()
2 (units cycles)

0.5
0.45

0.95
0.90

0.80

0.4

0.60

0.35

0.30

0.3

0.25

0.00

0.30

0.2

0.15

0.60

0.1

0.80
0.90

0.05
0
0

0.95
0.1
0.2
0.3
0.4
frequency in cycles per sample, i.e., /(2) - for new filter

Salt & Nguyen, DSP for Communi ations

0.5

Page 73

All-Pass Filters

Two-Path Filters

Transformations

H G (e j3dB ) = H (e j (3dB ) ) =

1
(3dB ) = 0.25 2 for half-band filter
2
(3dB )
(s )

2
2

Transforming a Half-Band Filter

3dB
of H G (e j )
2

Salt & Nguyen, DSP for Communi ations

H G (e js ) = H (e j (s ) )

Page 74

All-Pass Filters

Two-Path Filters

Transformations

Example
A low-pass lter is onstru ted from a half-band lter using

0.3 + z 1
1 0.3z 1

D
g(z) =

The magnitude response of the half-band lter is given on the next


page. Find the following for

HG (z):

(a) The 3dB-down frequen y.

(b) The stop band orner frequen y.

( ) The lo ation of the zeros that are on the unit ir le.


(d) The 1dB-down frequen y.

Then plot the frequen y response.

Salt & Nguyen, DSP for Communi ations

Page 75

Two-Path Filters

Transformations

0.25

All-Pass Filters

3dB = 2 0.157

1dB = 2 0.147

Salt & Nguyen, DSP for Communi ations

z ,1 = 2 0.222
z ,2 = 2 0.291
s = 2 0.214

Page 76

Two-Path Filters

Transformations

All-Pass Filters

Salt & Nguyen, DSP for Communi ations

Page 77

Two-Path Filters

Transformations

All-Pass Filters

3dB = 2 0.157

1dB = 2 0.147

Salt & Nguyen, DSP for Communi ations

z ,1 = 2 0.222
z ,2 = 2 0.291
s = 2 0.214

Page 78

All-Pass Filters
Two-Path Filters
Transformations
Example
Find the parameter T that transforms a half-band low-pass lter into a
low-pass lter with a 3dB-bandwidth of 2 0.4 radians
.
sample
Phase response curves for first-order APF with as indicated

Negative of phase angle normalized to 2, i.e., ()


2 (units cycles)

0.5

0.95
0.90

0.45

0.80

0.4

0.60

0.35

(3dB )
= 0.25
2

0.30

0.3

9 mm

0.25

4 mm

0.00

0.30

0.2

0.15

0.60

0.1

3dB

0.80
0.90

0.05
0
0

0.95
0.1
0.2
0.3
0.4
frequency in cycles per sample, i.e., /(2) - for new filter

Salt & Nguyen, DSP for Communi ations

0.5

Page 79

All-Pass Filters

Two-Path Filters

Transformations

Finding the Transformation Parameter for the First-Order


All-Pass Filter Used as the Frequen y-Sele tive Delay
Suppose the lter designer wants the riti al frequen y

half-band prototype to map to riti al frequen y

in the

in the new

low-pass lter. This means






HG ejc = H ejc = H ej(c ) .
T =

sin
sin

c c
2

c +c
2

If the riti al frequen ies are the 3dB-down frequen ies then

c =

2 and

sin
T =
sin
Salt & Nguyen, DSP for Communi ations

3dB
2
3dB
2


4
tan

=
+4
tan

3dB 
2
3dB 
2

1
+1
Page 80

All-Pass Filters

Two-Path Filters

Transformations

Example

T = 0.5. The stop


low-pass lter is s = 0.4 .

A low-pass to low-pass transformation uses


band orner frequen y for the new

Find the stop band orner frequen y of the half-band prototype.


Solution:

s =

0.5 + ej0.4
= 0.363 2
1 0.5ej0.4

radians
sample

Comment on Loss of Linear Phase

If the half-band prototype is a linear phase lter, then the low-pass


lter will not be a linear phase lter.

HG



H ej = H ej ejM (linear phase)

 




ej = H ej() = H ej() ejM () (not

Salt & Nguyen, DSP for Communi ations

linear phase)

Page 81

All-Pass Filters

Two-Path Filters

Transformations

Constru tion of Transformed Filters

Consider

H(z) = HAP (z 2 )

HAP (z) =



= HAP (z )

0 +z 1
1+0 z 1 .

c2 + c1 z 1 + z 2
1 + c1 z 1 + c2 z 2



HG (z) = H(z)

where

c1 =

1
z= g(z)

2T (0 + 1)
,
1 + 0 2T
z 1

1
z= g(z)

c2 =

0 + 2T
1 + 0 2T

z 1

X ( z)

c2

z 1

c1

z 1
Y (z)

Salt & Nguyen, DSP for Communi ations

Page 82

All-Pass Filters

Two-Path Filters

Transformations
z 1

x[ n ]

z 1

z 1

z 1

x[ n ]

z 1

z 1

y[ n ]

z 1

z 1

y[ n ]

T
z 1

z 1

x[ n ]

c2

z 1

c1

z 1

Salt & Nguyen, DSP for Communi ations

y[ n ]

c1 =

2T ( 0 + 1)
1 + 0T2

c2 =

0 + T2
1 + 0T2

Page 83

All-Pass Filters

Two-Path Filters

Transformations

High-Pass to Band-Pass Transformation


H HP (e j )

Response of prototype highpass filter

3dB down point

0.707

0.5

3
2
2
frequency for prototype response

3
2

( )

( ) = 2

3
4

frequency for transformed filter

Plot of g (e j ) versus for g ( z ) = z 2


g (e j ) = e j 2 g (e j ) = 2
compression factor is 2

Salt & Nguyen, DSP for Communi ations

Page 84

All-Pass Filters

Two-Path Filters

Transformations

0.707

H BP (e j )

bandwidth =

Salt & Nguyen, DSP for Communi ations

3
4

3
2

Page 85

All-Pass Filters

Two-Path Filters

Transformations

Low-Pass to Band-Pass Transformation


H LP (e j )

Response of prototype lowpass filter

1
0.707

0.5

3
2
2
frequency for prototype response

3
2

5
2

5
2

( )
3

( ) = + 2

3
4

frequency for transformed filter

Plot of g (e j ) versus for g ( z ) = z 2


g (e j ) = e j 2 =e j ( + 2 ) g (e j ) = + 2

Salt & Nguyen, DSP for Communi ations

Page 86

All-Pass Filters

Two-Path Filters

Transformations

H LP (e j )
1

0.707

0.5

3
2

5
2

H BP (e j )

0.707

0.5

3
4

Salt & Nguyen, DSP for Communi ations

Page 87

All-Pass Filters

Two-Path Filters

Transformations

To ontrol the enter frequen y of the band-pass lter a generalized


delay, i.e.,

c +z 1
1+c z 1 , is used in pla e of one of the

c for c 0.4

This gives:

c + z 1
1 + c z 1

g(z) = z 1

z 1 .

g (e j ) = ( )

c = 0

c 0.4

c for c 0.4

c 0.4

Salt & Nguyen, DSP for Communi ations

Note that c = 0 has g ( z ) = z 2

Page 88

All-Pass Filters

Two-Path Filters

The transformation maps the response of


the response of

HG (z)

at frequen y

H(z)

c :
c + ejc
1 + c ejc

ejc = g(ejc ) ejc = ejc

Solving the equation with

at frequen y

c = 0

Transformations
c to

yields

c = cos c

is not the enter frequen y of the band-pass lter sin e the pass

band orners of the low-pass lter will not s ale to be equal


distan es from

c .

H G (e j )

These distances are not equal

0.707

Salt & Nguyen, DSP for Communi ations

3
4

Page 89

All-Pass Filters

Two-Path Filters

Transformations

c +z
Negative phase response curves for z1 1+
1 with c indicated
cz
1

c = 0.4
negative phase of z1

Negative of phase angle normalized to 2, i.e., ()


2 (units cycles)

1.5

c = 0.4

negative phase of z1

0.5

negative phase of

c = 0.4

c + z1
1 + c z1

c + z1
1 + c z1

c = 0.4
c
cos1 (c )
=
2
2
0
0

0.5
1
frequency in cycles per sample, i.e., /(2) for new filter

Salt & Nguyen, DSP for Communi ations

1.5

Page 90

All-Pass Filters

Two-Path Filters

Steps to obtain a generalized band-pass lter with a


spe ied bandwidth and spe ied enter frequen y:

Transformations

1) Transform a half-band prototype into a low-pass lter with a


spe ied bandwidth using the transformation:

HGLP (z) = H

1
g(z)

where

g(z) =

T + z 1
1 + T z 1

In terms of hardware, this means repla ing se tions


with

c2 +c1 z 1 +z 2
, where
1+c1 z 1 +c2 z 2

c1 =

The

i +z 2
1+i z 2

z 1

2T (i + 1)
1 + i 2T

in series with

Salt & Nguyen, DSP for Communi ations

H1 (z)

and

c2 =

i + 2T
1 + i 2T

is repla ed with

T +z 1
.
1+T z 1

Page 91

All-Pass Filters
2) Transform the

Two-Path Filters
low-pass lter HGLP (z)

Transformations
into a band-pass lter

with the transformation:

1
g(z)

where

g(z) = z 1

HGBP (z) = HGLP

c + z 1
1 + c z 1

In hardware this is equivalent to repla ing the all-pass se tions

i + z 2
with the fourth-order all-pass se tion
1 + i z 2
d4 + d3 z 1 + d2 z 2 + d1 z 3 + z 4
1 + d1 z 1 + d2 z 2 + d3 z 3 + d4 z 4
1 in the bottom path is repla ed with
The z

T + z 1
e2 + e1 z 1 + z 2
=

1 + i z 1 z 1 =z 1 c +z1
1 + e1 z 1 + e2 z 2
of

1+c z 1

Salt & Nguyen, DSP for Communi ations

Page 92

All-Pass Filters

Two-Path Filters

z 1

z 1

z 1

Transformations

z 1

X ( z)
d4
+

d3

z 1

z 1

d2

z 1

z 1

d1

z 1
Y ( z)

z 1

X ( z)

+
+

e2

+
+

e1
z

+
Y (z)

Salt & Nguyen, DSP for Communi ations

Page 93

All-Pass Filters

Two-Path Filters

Transformations

tony_des_2.m

There is a eld that spe ies the order and stop band orner
frequen y (in units y les/sample) of the half-band lter that is to
be transformed. The order must be odd and the minimum order is 5.
There is also a eld that spe ies the 3dB-bandwidth of the
low-pass lter.
The third eld ontrols the translation of the low-pass lter
( onstru ted to have a 3dB-bandwidth as spe ied in the low-pass
lter eld) to a band-pass lter. The parameter for this eld is
alled enter frequen y, but does not end up being the enter
frequen y of the band-pass lter.
The fourth eld is a polynomial order eld. It should be set to two.
It is not sure what this eld does.

Salt & Nguyen, DSP for Communi ations

Page 94

All-Pass Filters

Two-Path Filters

Transformations

Lowpass filter

= 0.137

polynomial order

Salt & Nguyen, DSP for Communi ations

Page 95

All-Pass Filters
Two-Path Filters
Denominator Polynomials, path-0
(a0 Z^2 + a1 Z^1 + a2)
c1

-1.0781
-1.3795

c2

0.3326
0.7051

Se tion #1
Se tion #2

1.0000
1.0000

Transformations

Denominator Polynomials, path-1


(b0 Z^2 + b1 Z^1 + b2)
c1

1.0000
1.0000
1.0000
|

-1.2185
-1.5365
-0.5095

{z

first-order se tion
that repla es z 1

Salt & Nguyen, DSP for Communi ations

c2

0.5061
0.8992
0

Se tion #1
Se tion #2

Page 96

All-Pass Filters

Two-Path Filters

Transformations

Bandpass filter

Salt & Nguyen, DSP for Communi ations

Page 97

All-Pass Filters

Two-Path Filters

Denominator Polynomials, path-0


(a0 Z^4 + a1 Z^3 + a2 Z^2
-1.8093

d1

1.9110

d2

a3 Z^1

-1.9864

2.4452

Denominator Polynomials, path-1


(b0 Z^4 + b1 Z^3 + b2 Z^2
1.0000
Se tion #1
1.0000
Se tion #2
1.0000

-1.8918

d1

2.1598

-2.0787

2.7235

-0.8873

0.5095

Salt & Nguyen, DSP for Communi ations

{z

e1

d2

b3 Z^1

0.7051

{z

b4)
d3

-1.3112

d4

0.5061

-1.9602

e2

d4

0.3326

-1.6397

a4)
d3

-1.0247

1.0000
Se tion #1
1.0000
Se tion #2

Transformations

0.8992
0

Page 98

Das könnte Ihnen auch gefallen