Professional Documents
Culture Documents
by
A THESIS
IN
ELECTRICAL ENGINEERING
MASTER OF SCIENCE
IN
ELECTRICAL ENGINEERING
Approved
Accepted
May, 1982
/ *-
/ •
ACKNOWLEDGMENTS
11
CONTENTS
ACKNOWLEDGMENTS ii
LIST OF FIGURES v
LIST OF TABLES vii
I. INTRODUCTION 1
1.1 S t a t e m e n t o f t h e Problem 1
1.2 S i g n a l Sampling 1
1.3 Z-Transform 3
1.4 D i s c r e t e - T i m e Systems 4
1.5 Overview 4
II. DIGITAL SIGNAL PROCESSING HARDWARE 6
2.1 Introduction 6
2.2 Block Diagram 6
2.3 Address Decoder 9
2.4 Sampler and A/D Converter 10
2.5 Multiplier Data Interface 10
2.6 Multiplier 11
2.7 Accumulator 12
2.8 Digital to ikialog Converter 13
2.9 Echo Cancellation 14
2.10 Summary 14
III. DIGITAL FILTERS 25
3.1 Introduction 25
3.2 B i l i n e a r Transformation 26
3.3 Frequency T r a n s f o r m a t i o n 27
3.4 P r o t o t y p e Low-Pass F i l t e r 28
3.5 T r a n s f o r m a t i o n of a P r o t o t y p e F i l t e r 35
into other Digital Filters
3.6 Low-Pass t o Low-Pass T r a n s f o r m a t i o n 35
3.7 Low-Pass t o H i g h - P a s s T r a n s f o r m a t i o n 38
3.8 Low-Pass t o B a n d - P a s s T r a n s f o r m a t i o n 43
3.9 Low-Pass t o Band-Stop T r a n s f o r m a t i o n 50
3 . 1 0 Summary 53
iii
IV. ECHO CANCELLATION 56
4.1 Introduction 56
4.2 Echo Synthesis 57
4.3 Echo Cancellation 59
V. CONCLUSIONS 63
LIST OF REFERENCES 65
APPENDIX 66
IV
LIST OF FIGURES
1.1 S i g n a l sampler 2
2.1 Block diagram of hardware 8
2.2 Address decoder 15
2.3 Sampler and A/D c o n v e r t e r 16
2.4 Multiplier data interface 17
2.5 Multiplier 18
2.6 Subproduct adder 19
2.7 Product complementer 20
2.8 Accumulator 21
2.9 Accumulator clock 22
2.10 D i g i t a l to analog c o n v e r t e r 23
2.11 Echo sampling and delay c i r c u i t 24
3.1 Digital f i l t e r 25
3.2 Flow diagram of f i r s t order low-pass d i g i t a l f i l t e r 29
3.3 Response of f i r s t order low-pass d i g i t a l f i l t e r 30
3.4 Flow diagram of t h i r d order low-pass d i g i t a l f i l t e r 33
3.5 Response of t h i r d order low-pass d i g i t a l f i l t e r 34
3.6 Transformation from low-pass t o low-pass f i l t e r 36
3.7 Flow diagram of transformed f i r s t order low-pass f i l t e r . . . . 37
3.8 Low-pass t o h i g h - p a s s t r a n s f o r m a t i o n 39
3.9 Response of f i r s t order h i g h - p a s s d i g i t a l f i l t e r 41
3.10 Response of t h i r d order h i g h - p a s s d i g i t a l f i l t e r 42
3.11 Low-pass t o band-pass t r a n s f o r m a t i o n 43
3.12 Flow diagram of f i r s t order band-pass d i g i t a l f i l t e r 45
3.13 Response of f i r s t order band-pass d i g i t a l f i l t e r 46
3.14 Flow diagram of t h i r d order band-pass d i g i t a l f i l t e r 48
3.15 Response of t h i r d order band-pass d i g i t a l f i l t e r 49
3.16 Low-pass t o band-stop t r a n s f o r m a t i o n 50
3.17 Response of f i r s t order band-stop d i g i t a l f i l t e r 52
3.18 Response of t h i r d order band-stop d i g i t a l f i l t e r 54
v
4.1 Typical long distance telephone circuit 56
4.2 Typical impulse response 58
4.3 Block diagram of echo cancellation 59
4.4 Flow diagram of echo cancellation 61
4.5 Results of echo cancellation 62
VI
LIST OF TABLES
Vll
CHAPTER I
INTRODUCTION
f(t) f*(t)
g(t) J
Figure 1.1 Signal sampler
The output of the sampler f*(t) is given by Eq. (1.2) and consists of
a series of impulses with area f(t).
I t=nT
f*(t) =
Z f(nT)6(t-nT) (1.8)
n=-a>
The Fourier transform of Eq. (1.8) is
F*(o.) = 1 f(nT)e-^"'"T (^•'>
n=_oo
1.3 Z-Transform
n=_oo
where kT i s t h e delay of t h e s i g n a l .
M -k
L aj^z
1 + Z bvz
k=l ^
A Z-transform e x p r e s s i o n such as t h a t given by Eq. (1.15) can be
transformed i n t o a d i f f e r e n c e equation given by Eq. ( 1 . 1 3 ) . I t i s an
a l g o r i t h m t h a t can be processed by a d i g i t a l computer or microprocessor.
1. 5 Overview
In t h i s chapter we have covered t h e g e n e r a l sampling t h e o r y , the
Z-transform and d i s c r e t e - t i m e systems. We examined the transformation
of Z-transform expressions into difference equations. Chapter I I i s
dedicated to the hardware we used for d i g i t a l signal processing. First
we present a block diagram of the system. The microprocessor i s used
b a s i c a l l y for data handling. A sampler i s used to take samples of the
analog input at constant i n t e r v a l s . The samples are d i g i t i z e d and
loaded into the microprocessor. The f a s t m u l t i p l i e r generates the
product of a v a r i a b l e by a decimal f a c t o r . The external accumulator
i s used to add or subtract the f i n a l products. Finally, the d i g i t a l
output of the accumulator i s converted to analog in order to obtain
the desired response.
D i g i t a l f i l t e r s are analyzed in Chapter I I I . We will examine the
general theory of d i g i t a l f i l t e r s . The b i l i n e a r transformation w i l l
be presented which we w i l l use to design low-pass d i g i t a l f i l t e r s . We
w i l l discuss the transformation of a prototype low-pass f i l t e r into
high-pass, band-pass, band-stop, and other low-pass f i l t e r s . We w i l l
present the flow diagrams that we used to implement the d i g i t a l f i l t e r s .
The experiment of echo cancellation in telephone systems w i l l be
examined in Chapter IV. The echo w i l l be sjmthesized u t i l i z i n g a
d i s c r e t e - t i m e convolution process. The synthetic echo w i l l then be
subtracted from the actual echo in order to cancel i t .
In Chapter V we w i l l present the conclusions of the experiments
performed with d i g i t a l f i l t e r s and echo cancellation. The micro-
processor programs u t i l i z e d in the experiments are included in the
Appendix.
CHAPTER II
2.1 Introduction
Address
Buffer C Microprocessor
<=c> Data
Buffer
f(t)
EJ
I Clock
J
Address 1
Decoder
Accumulator t> Ace.
Buffer = ^
1 Peripheral
Multiplier Interface
C Adapter
J
2 ' S Complement
D/A C o n v e r t e r
Echo
I i
Sampler
Output Subtracter and Delay
Circuit
RAM Memory
(RAM) ^
Decoder
V
Address Data
Bus Bus
Figure 2.1 Block diagram of hardware
A delay circuit was incorporated for echo cancellation. The
input is applied to a sampler. The sampled signal goes to an analog
to digital converter. The signal is converted back to analog after a
delay determined by the microprocessor program. The output of the DAC
has an offset which is corrected using an operational amplifier. This
signal is then subtracted from the synthetic echo generated by the
processing circuits.
Table 2.1 indicates the name and function of each address and also the
gate used in Fig. 2.2. Signal RE enables the microprocessor to read
signals from the processing circuit. It goes low when one of the
signals PR, ACR, or ADR is low and R/W is high. Gates U303D, U304A,
and U304B are used to generate RE. A diode is provided in order to
10
The sampler and A/D converter are shown in Fig. 2.3. The analog
input is sampled once per processing cycle utilizing device U312 (AD582)
which is a sample/hold integrated circuit. The output signal of U312
is held at a constant value during the analog to digital conversion by
the DR (Data Ready) signal from ADC device U U O (AD570) .
The A/D conversion starts when address 6000 or 6800 is decoded. A
negative going pulse is applied to latch U304C - U304D which makes the
B/C (Blank/Convert) input of the ADC go high. The DR (Data Ready)
output goes high 1.5 ys later and resets the latch. The B/C input
goes back to low to start a new conversion. At the end of the conver-
sion which takes about 25 ys, the data is presented at the output of
the ADC in offset binary code. It is converted to 2'S complement code
by inverting bit 7 using inverter U305C. The 2'S complement digital
signal is presented to buffer U109 (74LS244). Its output is enabled
when address 7000 is decoded. The data is sent to the microprocessor
via the data bus.
2 . 6 Multiplier
2.7 Accumulator
The accumulator is set to add when the multiplier is positive and the
multiplicand is output by the microprocessor with address 4C00 or 4C10.
It is set to subtract when the multiplier is negative or the multipli-
cand is output with address 4C10 or 4C30. The accumulator is cleared
when the signal CLA goes low and it occurs when address 6800 is
decoded. The output of the accumulator is stored into its internal
register when it receives a clock pulse. The circuits shown in Fig. 2.9
were used to generate the clock pulse. The first "one shot" flip-flop
U310A (74LS221) generates a 2 us delay. The second "one shot" U310B
generates the actual clock pulse.
2.10 Summary
u
(U
O
a
0)
to
cn
0)
M
:^
CM
CN
0)
}-i
13
00
16
o
iD m * K) CM o
Q Q o Q O o o
f^ "O f^ CD CVJ ID CO
U
0)
4-1
U
0)
>
c
o
o
T3
C
CO
CN
0)
M
D
00
•H
•N.
17
f^ lO «n rt-
rO cvj — O
X X X X X X X X
0 P 0 O
0 Q O 0
0)
O
lU
U
<U
4-1
c:
•H
a
4J
CO
X)
u
(U
-3-
CM
(U
U
:3
00
r^ t D i n ^ f O c \ j - O r ^ U ) i n ' J - r o < v j - o
fi OL a Q. Q. CL
C>J
CO O
CD o
to
CO
3
o UJ
o _ CVJ lO
o CO
CO
CVJ
CO
O
CO
I?
^
CO CO
o Q Q Q Q O Q tr llJ CJ
o u a:
cvi
fO <NJ
I
Q
b 6 oCD 6 6 6 b C > b 6 6 6
1-
a Q Q Q
O
< |< CVJ
CO CE
o
18
fVJ (O _ rii (O
— <VI lO _ «• m (O h- - » • - • • •
Q * + +
CVJCJCMCVJCJc c c c 2 = = = c . — iOICVJCMCVJ
< < < < C Q C V J f V J C V J C V J C 3 < \ J C \ J C V J C N j l c 3 ll O
t CO cn CD
— ( M f O ^ f i n c D f ^ 0OC7»
M
(U
•H
a.
•H
i
in
CN
0)
M
00
•H
CO »o lo '»• f — o
X X X X X X X X
O
19
CM
<\j -o rw
(VJ o <vj
Hi
lO o
CVJ
lO
74LS8;
<
U307
riJ
(VI
m W •^ a
Cl
<
•«•
CO
^
^r Ul
M
CU
Xl
CO
U
o
XJ
o
u
CL,
-CI
CO
4i
CN
(U
M
d
a> 00
HI •H
u o>
<VJ
o PM
Ul <o MJ
t*l
OJ
<\J
f 0
rvi
u (^
5
Ul (D
lO
^
u (VI
*
20
CD
in fO O
a. OL CL 2 a. a. Q.
Q O c? CD O C?
lO (VJ
Ul u rO u Ul
rO
CO CD _,
CO i n
-J o ^§ O
O I'
N 13
U
0)
4-1
C
(U
e
iH
6
o
o
o
X)
o
u
PL.
CM
CU
u
d
00
<
21
u
o
4J
03
r-\
3
e
O
a
<:
00
CN
0)
U
3
oo
•H
22
o
o
o
o
iH
O
>-i
O
4-t
CO
iH
i
3
o
o
CT.
•
CN
(U
3
00
•H
23
0^
a)
4J
M
(U
>
O
o
00
o
d
CO
O
4J
CO
4-1
•H
oo
•H
Q
N ID in 'f
CD CD CO oo
Q Q Q Q
CM
CVJ QJ
U
Q 00
o ^ 3
CvjQ 00
lA cn
CVJ
3
rO
•H
Id:
o <
l< a
t ^ i D i n ^ f ^ f ^ " O
24
CD in lO C\J
(- Q _i o
z> z UJ z <
C) Ul (/)
> (/> H o lUi
00
1- 3 lu
3 in o UJ
O in — O CO
> Q 'T > o u
< z> <T>
UJ
C_) |l' •H
r^ CD in Tj- m CVJ 3
o O Q Q Q
Q O
M
•H
O
>v
CO
tH
CU
-O
CO
OO
•H
iH
O-
6
CO
en
o
X
o
w
CM
CU
U
3
OO
•H
CHAPTER I I I
DIGITAL FILTERS
3.1 Introduction
25
26
3.2 B i l i n e a r Transformation
The b i l i n e a r transformation
1 + s (3.3)
z = -.
1 - s
oz b=t a ire"'
n . Replacing t h e s e e x p r e s s i o n s of s and z i n t o Eq. ( 3 . 3 ) , we
^^j9 ^ l + g + j o ) (3.4)
1 - a- jco
The magnitude | r | is
(1+5)2+0)2 h (3.5)
r = (1-a)^ +0)^
The b i p o l a r t r a n s f o r m a t i o n r e s u l t s in a d i f f e r e n t frequency
range of t h e d i g i t a l f i l t e r with r e s p e c t to t h e analog f i l t e r . Let
Q and o) r e p r e s e n t t h e frequency in t h e analog f i l t e r and d i g i t a l
f i l t e r respectively. From the b i l i n e a r transformation
z - 1 (3.7)
z+1
• rn
j"^"^-! (3.8)
jfi = - ^
e-^ +1
•n ' . ^T (3.9)
jn = jtan—
and ™
Q = tan^ (3.10)
^^"^^ = ~ 9? (3.12)
1 + (a)/f2c)
The Butterworth filter has the property that A(n^) = if or -3dB
for all N. The squared amplitude A(a)) is given in terms of G(ja)) as
G(s) = 1 ^ = 5k (3.15)
G(s) = - ^ (3.16)
s +1
The expression (3.16) can be transformed into the z-plane utilizing
the bilinear transformation, and we obtain
I I
Store 1/2 Transfer ace.A
as multiplier t o a c e . B. Keep
f (nT - T) i n a c e . B
I I
Load f(nT)
from ADC Wait 10 ysec.
into ace.A
I
Clear external
accumulator and
start ADC
I
Add product
(l/2)f(nT)
I
Wait 2 ysec.
I
Add product
(l/2)f(nT-T)
0.2
f(KHz)
6 8 10 12 14
(a) Amplitude response
f(KHz)
A Experimental d a t a
-180'
(b) Phase response
G(s) = ^ ».19)
s^ +2s +2s + 1
G(z) = 1 ^ ^ 3 z - ^ ^ 3 z - +Z-3
1+|.
The inputs and outputs of the filter are stored in memory with a rela-
tive address with respect to the index register as shown in Table 3.1.
The microprocessor program for the third order filter is more complex
than that used for the first order filter. The longer processing time
results in lower sampling frequencies.
32
Relative Indexed
Variable Address
y(nT-T) 01
f(nT-T) 02
y(nT-2T) 03
f(nT-2T) 04
y(nT-3T) 05
f(nT-3T) 06
y(nT-4T) 07
f(nT-4T) 08
y(nT-5T) 09
f(nT-5T) OA
y(nT-6T) OB
f(nT-6T) OC
The inputs and outputs are also stored in the stack in order to have
the data readily available when the index register jumps back to the
upper end of the allowed memory. This jump of the index register is
achieved by transferring the stack pointer to the index register. The
memory area from 09FF to OFFF is assigned to the stack pointer and
the area from 03FF to 09FF is for the index register. We start the
program execution at the high end of the memory allowed for the index
register and stack pointer.
The cutoff frequency w^ can be calculated utilizing Eq. (3.10)
with T = 27r/a)g. We obtain w^ = Wg/4, where Wg is the sampling
frequency. The filter can be realized with the difference equation
(3.21)
The filter was actually executed following the flow diagram shown in
Fig. 3.4. The sampling frequency found was 16.12 KHz and the cutoff
frequency measured was 4.04 KHz. The microprocessor program is shown in
the Appendix.
33
1 1
Initialize PIA Send y(nT)
and index regis- Add
t o DAC and
ter (//09FF) (l/2)f(nT-2T)
load i t i n t o ace. A
I I I
Load #0FFF Load f(nT- -T)
into Push f(nT)
i n t o a c e . A,
stack pointer X = 02 into stack
I I I
Clear external
accumulator and Add Push y(nT)
start ADC (l/2)f(nT-T) into stack
I i I
S t o r e 1/3 a s Store 1/6 as
Store f(nT) a t
multiplier multiplier
X = 00 and decrement
index r e g i s t e r
I I I
Load y ( n T - 2 T ) Load f ( n T - 3 T ) Store y(nT)
i n t o ace. A, X = 03 i n t o ace. A, X=06 a t X= 00
I I
Subtract Add
(l/3)y(nT-2T) (l/6)f(nT-3T)
I I
Load f(nT) Transfer
S t o r e 1/2 as from ADC i n t o stack pointer
multiplier ace. A to index r e g i s t e r
I I
Decrement
Load f ( n T - 2 T ) Add
index r e g i s t e r
i n t o a c e . A, X = 04 (l/6)f(nT)
and wait 8 cycles
1.0
0.8 •
0.6 ••
0.4 -
0.2 ••
0.0 f(KHz)
3 4 5 6 8
(a) Amplitude response
f(KHz)
A Experimental d a t a
- 1 8 0 ••
where D(z) is a polynomial with real coefficients and all its roots are
inside the unit circle. The roots of D(z~l) are the reciprocal of the
roots of D(z) and must lie outside the unit circle. D(z) has constant
coefficients and the conjugate of any of its complex roots must also
be a root.
Let p.,...,p be the roots of D(z) and let us factor expression
(3.22)
_^ N z-1 -p^* (3.23)
Z = ± n
k=l 1 -p, z
Then -jJ^T
e J =
e ^'^^-p^
(3.25)
1 - pe jwT
Z-plane z-plane
Load f(nT)
1
from ADC into Store p
ace. A as multiplier
i i
Clear external
accumulator Load y(nT - T)
and start ADC into ace. B
* i
Store 1/2 (1 - p) Add
as multiplier pf(nT-T)
i ^
i i
Wait 2 ysec. Store B as
y(nT-T)
i
Load f (nT-T)
into ace. B
Add
1/2) (1 -p)f(nT-T)
-1 (3.27)
G(z) = 1
(l-p)+(l-p)z
, 2 -1
1-pz
Eq. (3.27) can be transformed i n t o t h e d i f f e r e n c e equation
-1 (3.30)
7-1 _ z -p
1-pz
39
Z-plane z-plane
(3.31)
pJ^cT = e -^ c - p
1 - pe -^ c
F i r s t Order High-Pass F i l t e r
The prototype f i r s t order low-pass f i l t e r can be transformed into
a high-pass f i l t e r u t i l i z i n g Eq. (3.30) and Eq. (3.32). If the cutoff
frequency of the high-pass f i l t e r i s chosen to be a)-/4, then p = 0 and
the transformation i s
Z ^ = -z ^ (3.33)
1 1 -3 - 1 . 1 . - 5 -2 -3 (3.36)
^. . 1 1 - 3z + 3z - z
^(^> = 6 , ^ 1 -2
I+3Z
The filter expressed by Eq. (3.36) can be realized by the difference
equation /o -^'j)
y(nT) =|-f(nT) -yf(nT-T) +yf(nT-2T) -•|f(nT-3T) -pr(nT-2T)
41
f(KHz)
0 6 8 10 12 14
(a) Amplitude response
f(KHz)
A Experimental data
-180 •
(b) Phase response
1.0 •
0.8"
0.6--
0.4--
0.2--
0.0
f(KHz)
0 3 4 5 6 8
(a) Amplitude response
f(KHz)
^ Experimental data
•135-
Z-plane z-plane
Low-pass f i l t e r Band-pass f i l t e r
d^ = -2ai^/(k + l) (3.40)
d2 = ( k - l ) / ( k + l ) (3.41)
F i r s t Order Band-Pass F i l t e r
The f i r s t order band-pass f i l t e r can be designed u t i l i z i n g the
t r a n s f o r m a t i o n given by Eq. ( 3 . 3 8 ) , and the f i r s t order low-pass
prototype. We w i l l design a f i l t e r with cutoff frequencies w^ = a)g/8
and u)2 = 3a)s/8. According to Eq. (3.42) and Eq. ( 3 . 4 3 ) , k = l and a = 0 ;
t h e r e f o r e di =d2 = 0 and we o b t a i n t h e transformation
i
Initialize Subtract
PIA (1/2) f(nT-2T)
i i
Store 1/2 Load f(nT-T)
as multiplier into ace. B
i i
Load f(nT) Store ace. B
from ADC into as f(nT-2T)
ace. A
1 i
Clear Store ace. A
ext. accumulator as f(nT-T)
and start ADC
i 1
Add Send y(nT)
(l/2)f(nT) to DAC
i *
i
Wait 1 ysec.
3ass digit
Figu]re 3 .12 FlovJ diagram of fii-St oreler band-]
46
f(KHz)
6 8 10 12
(a) Amplitude response
f(KHz)
A Experimental data
- 1 8 0 ••
The sampling frequency found was 38.46 KHz and t h e cutoff frequencies
measured 4 . 8 KHz and 14.42 KHz. The response of the f i l t e r i s shown
i n Fig. 3 . 1 3 . The phase angle of t h e output s t a r t s a t 90 and changes
l i n e a r l y w i t h frequency. It is 0 a t the peak of the amplitude
response.
-1 -2 (3.47)
Z = -z
therefore
The band-pass filter was implemented following the flow diagram shown
in Fig. 3.14 and Program 5 in the Appendix. The sampling frequency
found was 16.12 KHz and the cutoff frequencies measured were 2.01 KHz
«
Initialize PIA
1 1
Send y(nT)
and Add
(1/2) f(nT-4T) t o DAC and
index register load i t into a c e . A
I
Load //OFFF
I I
into Load f(nT-2T) Push f(nT)
stack pointer into ace. A, X = 04 into stack
I
Clear external
I I
accumulator and Subtract Push y(nT)
start ADC (1/2) f(nT-2T) into stack
I I I
Store f (nT) atX=00
Store 1/3 as Store 1/6 as
and decrement
multiplier multiplier
index r e g i s t e r
I I I
Load y(nT-4T) Load f ( n T - 6 T ) S t o r e y(nT)
into ace. A, X = 07 i n t o ace. A, X= OC a t X= 00
I I
Subtract Subtract
(l/3)y(nT-4T) (l/6)f(nT-6T)
I I
Load f(nT) Transfer
Store 1/2 as from ADC stack pointer
multiplier i n t o ace.A t o index r e g i s t e r
i i
Decrement
Load f(nT-4T)
into ace. A, X = 08
Add
(l/6)f(nT)
index r e g i s t e r
and wait 8 c y c l e s
J
f(KHz)
3 4 5 6 7 8
(a) Amplitude response
f(KHz)
A Experimental data
-180-•
and 6.04 KHz. The response of the f i l t e r i s shown in Fig. 3.15. The
phase angle of the output s t a r t s at -90°, I t changes with frequency
and i s 0 a t the center frequency CJQ.
Z-plane z-plane
Low-pass f i l t e r Band-stop f i l t e r
A ^A
(3.50)
_ d2 +d]^z - 1 . L+ z -2
' ^ ^1 ^
1 +d]^z +d2Z
51
d i + d i e - J ^ T + e-J2^^ (3-51)
.-jfiT _
11 +
^Adj^e^-J^T , , -j2a)T
"^ +d2e "^
di = -.2a/(l+k) (3.52)
d2 = (l-k)/(l+k) (3.53)
k = tan[(a)2-a)i)T/2]tan(fi^T/2) (3.54)
F i r s t Order Band-Stop F i l t e r
The f i r s t order band-stop f i l t e r can be designed u t i l i z i n g t h e
t r a n s f o r m a t i o n given by Eq. ( 3 . 5 0 ) . We w i l l o b t a i n a f i l t e r with
0)^,]^ = a)g/8 and 0)^.2-3a)g/8. According to Eq. (3.54) and Eq. ( 3 . 5 5 ) ,
k = l and a = 0 . The t r a n s f o r m a t i o n from low-pass to band-stop i s
therefore
G(z) = j + | z " ^ (3.57)
The first order band-stop filter was implemented with a flow diagram
similar to that shown in Fig. 3.12 and Program 4 but with positive sign
52
G*
1.0 •^...jk
S ^
0.8 k
N. 4
0.6 • \ i i
0.4 •
0.2 -
0.0 — — I 1 f(KHz)
0 6 8 10 12 18
(a) Amplitude response
f(KHz)
A. Experimental d a t a
-180 •
(b) Phase response
on the second term. The sampling frequency found was 38,46 KHz and the
cutoff frequencies were 4.80 KHz and 14.42 KHz. The response of the
filter is shown in Fig. 3.17. The phase angle of the output is 0° at
a)=0 and w = 0)3/2 where the amplitude response is 1.0.
-1 -2
Z ^= z ^ (3.59)
therefore
(3.61)
y(nT) = •|-f(nT) +yf (nT - 2T) +^f(nT-4T) +-|-f(nT-6T) -pr(nT-4T)
3.10 Summary
f(KHz)
0 3 4 5 6 7
(a) Amplitude response
f(KHz)
A Experimental data
-180"
(b) Phase response
ECHO CANCELLATION
4.1 Introduction
T r a n s m i s s i o n and r e c e p t i o n of l o c a l t e l e p h o n e conversations
u t i l i z e two-wire c i r c u i t s . They a r e s e t up by c o n n e c t i n g t h e two
customers' telephone c i r c u i t s at the central office. For a d i s t a n c e
l o n g e r t h a n 35 m i l e s , a m p l i f i c a t i o n of t h e s i g n a l s i s o f t e n required.
S i n c e a m p l i f i e r s a r e one-way d e v i c e s , t h e two d i r e c t i o n s of transmission
must be s e p a r a t e d t o form a f o u r - w i r e s y s t e m . T r a n s m i s s i o n of m u l t i -
c h a n n e l s y s t e m s a l s o r e q u i r e s s e p a r a t i o n of s i g n a l s i n two d i r e c t i o n s
and t r a n s m i s s i o n over a f o u r - w i r e s y s t e m . The f o u r - w i r e system must
be c o n n e c t e d t o t h e l o c a l t w o - w i r e system by means of a d e v i c e called
a h y b r i d which i s b a s i c a l l y a d i f f e r e n t i a l transformer. Fig. 4.1
shows a t y p i c a l l o n g d i s t a n c e t e l e p h o n e circuit.
Ik Echo of B ' s s p e e c h
Talker A Talker B
Echo of A ' s s p e e c h ^
56
57
= Z Tf(nT)h(t-nT)
n=0
58
h(t)
4 . 3 Echo C a n c e l l a t i o n
A/D
1
Conversion
I
Echo
Sjmthesis
D/A
I Echo ^
Conversion
OH D/A
Conversion
A/D
Conversion
requires that the actual echo be sampled and converted to digital and
then back to analog. The delayed echo will then be in phase with the
synthetic echo. Finally, the synthetic echo is subtracted from the
actual echo utilizing an operational amplifier. The echo cancellation
was executed following the flow diagram shown in Fig. 4.4 and the
results are presented in Fig. 4.5 for a frequency range of 0 to 3600 Hz.
The microprocessor program is presented in the Appendix. The input
f(t) is stored in memory using indexed addressing. The previous inputs
are loaded from memory with relative indexed addresses according to
Table 4.1.
Relative Indexed
Input Address
f(t-T) 01
f(t -2T) 02
f(t-3T) 03
f(t-4T) 04
f(t-5T) 05
f(t-6T) 06
f(t-7T) 07
f(t-8T) 08
f(t -9T) 09
61
1
Initialize Add product
PIA h(nT)f(t -nT)
I
Initialize
index register Decrement X
and stack pointer
I I
Clear external
accumulator and
start ADC
n = n +1 Wait
four cycles i
I
Load f(t) Transfer
n =1 from ADC stack pointer to
into ace. A index register
I
Load h(nT)
I
Push ace. A
I
into ace. B into stack and Decrement X
store it at X= 00
I I
Store h(0) as
I
Store h(nT) Load //OFFF
multiplier and
as multiplier
add h(0)f(t) into stack pointer
I I
Load f (t -nT) Send synthetic
into ace. A echo to DAC
a (dB)
20--
4 •-
2 --
-I 1- -I 1- f(KHz)
0.5 1.0 1.5 2.0 2.5 3.0 3.5
CONCLUSIONS
63
64
REFERENCES
66
67