• No results found

Image processing using a two-dimensional digital convolution filter.

N/A
N/A
Protected

Academic year: 2020

Share "Image processing using a two-dimensional digital convolution filter."

Copied!
169
0
0

Loading.... (view fulltext now)

Full text

(1)

Scholarship at UWindsor

Scholarship at UWindsor

Electronic Theses and Dissertations Theses, Dissertations, and Major Papers

1-1-1984

Image processing using a two-dimensional digital convolution

Image processing using a two-dimensional digital convolution

filter.

filter.

Rajendra P. Rathi University of Windsor

Follow this and additional works at: https://scholar.uwindsor.ca/etd

Recommended Citation Recommended Citation

Rathi, Rajendra P., "Image processing using a two-dimensional digital convolution filter." (1984). Electronic Theses and Dissertations. 6788.

https://scholar.uwindsor.ca/etd/6788

(2)

NOTE TO USERS

This reproduction is the best copy available.

(3)
(4)

C O N V O L U T I O N F I L T E R

by

B d j e n d r a P. R a t n i

A t h e s i s

p r e s e n t e d to the U n i v e r s i t y of W i n d s o r in p a r t i a l f u l f i l l m e n t of t h e

r e q u i r e m e n t s t o e t h e d e q r e e of M a s t e r of A p p l i e d S c i e n c e

in

D e p a r t m e n t o f E l e c t r i c a l E n g i n e e r i n g

W i n d s o r , O n t a r i o , 1984

(5)

INFO RM ATIO N TO USERS

The quality of this reproduction is dependent upon the quality of the copy

submitted. Broken or indistinct print, colored or poor quality illustrations

and photographs, print bleed-through, substandard margins, and improper

alignment can adversely affect reproduction.

In the unlikely event that the author did not send a complete manuscript

and there are missing pages, these will be noted. Also, if unauthorized

copyright material had to be removed, a note will indicate the deletion.

UMI Microform E C 5 4 7 7 4 Copyright 2010 by ProQuest LLC

All rights reserved. This microform edition is protected against unauthorized copying under Title 17, United States Code.

ProQuest LLC

789 East Eisenhower Parkway P.O. Box 1346

(6)

A t w o - d i m e n s i o n a l d i q i t a l c o n v o l u t i o n f i l t e r (re­

f e r r e d a s C o n v o l v e r ) e m p l o y i n q the F a s t n u m b e r t h e o r e t i c

t r a n s f o r m (FNTT) a l q o r i t h m was b u i l t in t he D e p a r t m e n t as an

e x t e r n a l p e r i p h e r a l to the 3BL tuini-computer f o r I m a q e P r o ­

c e s s i n g . The p u r p o s e of t h is r e s e a r c h is to a n a l y s e the d e

-siqn, s u q q e s t i m p r o v e m e n t s , p r o v i d e a w o r k i n q s y s t e m and i l ­

l u s t r a t e the use of the c o n v o l v e r t hr o uq h v a r i o u s e x a m p l e s .

The t h e s i s d e s c r i b e s the t h e o r e t i c a l bacicqround a n d

the n a rd va re i m p l e m e n t a t i o n or the c o n v o l v e r . A d e t a i l e d

e x p l a i n a t i o n of the d e s i g n c o n s i d e r a t i o n s has been d e v e l o p e d

to pr ov id e an e a s y and c o m p l e t e r e f e r e n c e f or the user.

S e v e r a l c o m p a r i s o n s have been p r e s en te d, as part of a n a l y ­

sis, to e s t a b l i s h t he e f f i c i e n c y of the t e c h n i q u e s used i n

the d e s i q n or tne c o n v o l v e r . T i m i n q d i a q r a m s have b e e n p r e ­

p a r e d to f a c i l i t a t e the u n d e r s t a n d i n g of the p r o c e s s i n g of

s i q n a l s t hrouqh t he filter. T h r o u q h - p u t r a t e c a l c u l a t i o n s

are i n c l u d e d to i n d i c a t e the s p e e d of p r o c e s s i n g .

A s y s t e m a t i c way to wr it e the i n t e r f a c i n g s o f t w a r e

has teen e x p l a i n e d . A d i r e c t o r y of the a v a i l a b l e s o f t w a re ,

and a table of the m a i n I n t e g r a t e d C i r c u i t s used in the c o n ­

v o l v e r is i nc luded. S o f t w a r e has been w r i t t e n to make the

(7)
(8)

Carl and Viola Glos

(9)

I am deeply Indebted to Dr. W.C. Miller and Dr. G.A. Jullien for

their constant help, support and guidance throughout the course of ray

degree. I express my sincere gratitude to Dr. M. Shridhar for his valuable

advices and encouragements. I express ray sincere thanks to Dr. M. Ahmadi,

Dr. M. Sid-Ahraed, and Dr. J. J. Soltis for their constructive comments

and criticisms. I am also thankful to Mrs. S.A. Ouellette and Mrs. L.J.

Kennedy for their invaluable assistance.

I sincerely acknowledge the support provided by the American-Nepal

Education Foundation, Oregon, U.S.A. In particular I am grateful to

Dr. Hugh B. Wood, Executive Director of the Foundation, for his personal

interest in me.

I am especially grateful to Mr. Carl M. Glos and Mrs. Viola Glos

whose guidance has been a perennial source of inspiration for me in my

personal life throughout my degree at Windsor. I also thank Mr. Edwin D.

Reimer and Mrs. Elfrieda Reimer for being my wonderful friends at Windsor.

I express my sincerest thanks and gratitude to my parents for their help,

love and patience. I also wish to mention my gratefulness to Dr. K.K.

Aggarwal, my professor at Regional Engineering College, Kurukshetra, India,

(10)

A B S T B A C T ... i i

A C K H O U L E D G E N E N T S ... i v

T A B L E OF C O N T E N T S ... . . . v i

T A B L E O F F I G U B E S ... T i i

L I S T OF T A B L E S ... ix

L I S T O F A B B R E V I A T I O N S ... x i

C h a p t e r . page

I. I N T R O D U C T I O N ... 1

O b j e c t i v e and o u t l i n e of the R e s e a r c h work . . . 1

T h e s i s O r g a n i z a t i o n . . . 8

II. D I G I T A L F I L T E R I N G U S I N G F A S T N U M B E R T H E O R E T I C

T R A N S F O R M T E C H N I Q U E S ... 10

I n t r o d u c t i o n ... . . . 1 0 D e f i n i t i o n of N u m b e r T n e o r e t i c T r a n s f o r m . . . . 12 M o d u l a r A r i t h m e t i c ... . . . 1 J

An E x a m p l e of c o n v o l u t i o n u s i n g NTT when M is a prime . . . 2 1 P r a c t i c a l C o n s i d e r a t i o n s in c h o o s i n q &,N a n d M

for a n N T T ... 23 D e s i g n c o n s i d e r a t i o n tor NTT u s ed in C o n v o l v e r . 2h

c n o o s i n q M ... . 2 5

c h o o s i n g N a n d 8 . . . . . . 2 7

O R D E R E D - I N P U T - O S D E B E D - O U T P U T - N I T a l q o r i t h m . . . 28 R e s i d u e to B i n a r y C o n v e r s i o n . . . . ... 29

Use of MHC in o b t a i n i n g the f i n a l r e s u l t . . 30

c o n c l u s i o n ... . . . . . . 3 1

III. I M P L E M E N T A T I O N OF B U T T E R F L Y AND A N A L Y S I S O N T H E

C O N V O L V E R ... 3 3

I n t r o d u c t i o n . ... - ... . . . 3 3

(11)

m o d u l a r a p p r o a c h ... 36 c a l c u l a t i n g the e n t r i e s in the L o o k - u p t a b l e s 38 m e m o r y s a v i n g by the use o£ s u b - m o d u l a r

a p p r o a c h . . . ...40

f u r t n e r r e d u c t i o n in m e mo ry r e g u i r e m e n t s . . 43

t i m in g c o n s i d e r a t i o n for the b u t t e r f l y . - . . . 44

T h r o u g h p u t R a t e C o n s i d e r a t i o n s (0100-al go ri thm) 46

s e r i a l s e g u e n t i a l p r o c e s s i n g . . . 4 6

S p e e d c o n s i d e r a t i o n in tne C o n v o l v e r . . . . 49

C a s c a d e P r o c e s s i n g . . . . . . 5 1

t h r e e - m e m o r y s t r u c t u r e f or f a s t e r p r o c e s s i n g . . 52

usrng a c o m p l e t e b u t t e r f l y for f a s t e r s p e e d . . 54

A bri e f C o m p a r i s o n of F F T and F N T T b u t t e r f l y

i m p l e m e n t a t i o n s . . . 5 6

C o m p a r i s o n of 1 - D - r a d i x - 2 and 2 - D - r a d i x - 2

b u t t e r f l i e s . . . . . . 5 8

C o m p a r i s o n of R/B c o n v e r s i o n m e t h o d s . . . 60 C o n c l u s i o n . . . 6 2

IV. H A R D W A R E AMD F U N C T I O N A L D E T A I L S O F T H E C O N V O L V E R . 69

i n t r o d u c t i o n . . . . . . . . 6 9

O v e r v i e w of the H a r d w a r e ... . . . 7 0

S y s t e m C l o c x s a n d R e s e t L o g i c ... . . . . 7 5

H S D / c o n v o l v e r i n t e r f a c e . . . 7 6

Line D r i v e r s / R e c e i v e r s . ... . . . . 7 8

NTT s t a g e / b u t t e r f l y c o u n t e r . . . 7 8

I n t e r f a c e c o n t r o l logi c . . . 7 9

L D I M G o p e r a t i o n ... . 8 1 L D C O F o p e r a t i o n ... 81 C L 8 M C N T o p e r a t i o n ... . . . 8 2 S D F I L D T o p e r a t i o n . . . ... . . . . 8 2

S DC A HOT o p e r a t i o n ... . . . 8 2

MEMORY B U F F E R S ... 84

M e m o r y W r i t e A d d r e s s G e n e r a t o r . . . . . . . 8 4

M e m o ry R e a d A d d r e s s G e n e r a t o r . . . 8 5 T wi d d l e F a c t o r / T r a n s , of F i l t e r C o ef r. Audr.

G e n r a t o r ... . . . 8 5

M e m o r y A d d r e s s M u l t i p l e x e r . . . 8 6

M e m o r y B u t t e r MEM 1 a n d M E M 2 ... 87 M e m or y B u f f e r T C O F M E M ... 87 T w i d d l e F a c t o r E P R G M s ... . . . 8 8 The B u t t e r f l y U n i t ... . . 8 8 P i p e l i n e T i m i n g . . . 9 2

R e s i d u e to B i n a r y C o n v e r t e r . . . 9 2

using the c o n v o l v e r . . . ... 95

V. F I L T E R I N G A P P L I C A T I O N S A N D F I L T E R I N G OF L A R G E

M A T R I C E S ... 98

(12)

t r a n s m i s s i o n s [ 1 6 ] ... ... 100 Low Pass F i l t e r i n q ... 10 1

Hiqh Pass F i l t e r i n q ... ... 104

H o m o - m o r p h i c F i l t e r i n q . . . 106

E x a m p l e s of the I m a q e F i l t e r i n q . . . 107

F i l t e r in q or I m a q e s of l ar qe r d i m e n s i o n s . . . 112

B l o c k - m o d e f i l t e r i n q ... 113

B l o c k - M o d e F i l t e r i n q A l q o r i t h m . . . 115

W r a p - a r o u n d Error C o n s i d e r a t i o n for Fi rs t

3 1 o c k ... 119

N u m be r or B l o c k s to be P r o c e s s e d . . . 120

T i m i n q C o n s i d e r a t i o n in P r o c e s s i n q L a r q e r

I m a q e s ... . . . 120

c o n c l u s i o n s ... . . . 123

VI. C O N C L U S I O N S ... 124

A p pe n di x p a o e

A. D E V E L O P M E N T OF 0 I 0 0 - N T T A L G O R I T H M ... 128

B. P R O C E D U R E TO U S B AN HSD D E V I C E ON S E L M INI­

C O M P U T E R ... 132

C. D I R E C T O R Y O F A V A I L A B L E S O F T W A R E R E L A T E D T O T H E

C O N V O L V E R ...138

R E F E R E N C E S ... 139

(13)

F i gu re

3.1 A 2-D r a d i x - 2 B u t t e r f l y in O I O O

a l q o r i t h m

3.2 S u b - m o d u l a r I n d e x T a b l e s

3 . 3 A m o d u l o 19 ROM a r r a y m u l t i p l i e r

(sub -moduli 7 a n d d)

3.4 The B u t t e r f l y c o m p u t a t i o n u n it

3.5 T i m i n g D i a g r a m and tleqister C o n t e n t s

m the C o n v o l v e r b u t t e r f l y

3.6 G r a p h i c a l r e p r e s e n t a t i o n of 0 1 0 0 - a l q o r i t h m

for the c a s e of N=d (1-0-raaix-2)

3 .7 A T hr ee M e m o r y B u f f e r S t r u c t u r e for

I m p r o v e d s p e e d of p r o c e s s i n g

3.8 T i m i n g C o n s i d e r a t i o n in the use of M e m o r y

C o n f i g u r a t i o n s n o w n in F i q . (3.7)

3 . 9 I n t e r c o n n e c t i o n s in the use of a

(14)

J .11 I m p l e m e n t a t i o n ◦£ the n i x e d Radix

C o n v e r s i o n M e t h o d

4.1 O v e r v i e w of the C o n v o l v e r h a r d w a r e

4.2 T h e F i l t e r I n t e r f a c e and I/O C o n t r o l

Unit

4.3 The M e m or y B u f f e r O r g a n i z a t i o n

4.4 The B u t t e r f l y C o m p u t a t i o n U n i t

4.5 The p i p e l i n e t i m in g d ia g r a m

4.6 The R e s i d u e to B i n a r y C o n v e s i o n Unit

5. 1 T he r a d i a l c r o s s - s e c t i o n of Low P a s s F i l t e r s

5.2 The r a d i a l c r o s s - s e c t i o n of High P a s s F i l t e r s

5. 3 A c r o s s - s e c t i o n of a Homo-tnorphic F i l t e r

5.4 to 5.20 E x a m p l e s of the f i l t e r i n q

t h r o u g h the use of the c o n v o l v e r

(15)

T a b l e

3.1 Memo ry R e q u i r e m e n t s by D i r e c t and

S u b m o d u l a r a p p r o a c h of M u l t i p l i c a t i o n

a n d the M e m o r y S a v i n q R at io (MSH)

3.2 C o m p a r i s o n of T i m e r e q ui re d for

c o n v o l u t i o n by d i f f e r e n t m e t h o d s of

P r o c e s s i n q

3.3 C o m p a r i s o n of b u t t e r f l y c o m p u t a t i o n a l

r e q u i r e m e n t (1-D -r ad if-2 a n d

2 -D - radix -2 )

3.4

C o m p a r i s o n of C RT and

Mac

i m p l e m e n t a t i o n

4.1 Main f e a t u r e s of the c o n v o l v e r

4 . 2 Main I C ' s a n d th ei r usa qe in tae C o n v o l v e r

5.1 A p p r o x i m a t e C o m p u t a t i o n t i me us in q

d i f f e r e n t m e t h o d s or c o n v o l u t i o n

5.3 P r o c e s s i n q T i m e by the u se of d i f f e r e n t s i ze

of B a s i c b l o c k for l a r q e r i m a q e s

(16)
(17)

A / 0 A u a l o q to D i q i t a l

B / R B i n a r y to R e s i d u e C o n v e r s i o n

C R T C h i n e s e R e m a i n d e r T h e o r e m

F I R F i n i t e I m p u l s e R e s p o n s e

F NT F e r m a t Numbe r T r a n s f o r m

U S D H i q n S p e e d D e vi ce

MEM M e m o r y B u f fe r

MRC M i x e d R a d i x C o n v e r s i o n M e t h o d

NTT N u mb er T h e o r e t i c T r a n s f o r m

O I O O O r d e r e d I n p u t o r d e r e d o u t p u t

R / B R e s i d u e to B i na ry C o n v e r s i o n

R NS R e s i d u e N u m b e r S y s t e m

RI R a de r T r a n s f o r m

d G e n e r a t o r used in d e f i n i t i o n of NTT

PL i ch p r i m e m o d ul i

ri i th r e s x d u e

|. | m o p e r a t i o n m o d u l o H

* Si qn to r e p r e s e n t m u l t i p l i c a t i o n

(18)

I N X B O D O C T I O M

1-1 O B J E C T I VE A N D O U T L I N E OF T H J R E S E A R C H W O R K

High s pe e d d i g i t a l f i l t e r i n q of t w o - d i m e n s i o n a l s i g n a l s

is an e s s e n t i a l e l e m e n t of c o n t e m p o r a r y r e s e a r c h o n s i q n a l

p r o c e s si nq . Th e a p p l i c a t i o n a r e a s i n c l u d e i m a q e p ro c e s s i n q ,

p a t t e r n r e c o g n i t i o n , d i g i t a l c o m m u n i c a t i o n and r o b o t i c v i ­

sion. T h e p r e - p r o c e s s i n q of s i q n a l s is a l s o i m p o r t a n t for

i m a g e s o b t a i n e d from s p a c e e x p l o r a t i o n p h o t o q r a p h s , r a d i o

-qraphs , n uc le ar m e d i c a l imaqes, and g e o p h y s i c a l data. T h e

f i ltering , or the c o n v o l u t i o n of i m a q e s w i t h a f i l t e r k e r ­

nel, c an be a c h i e v e d e i t n e r by d i r e c t c o m p u t a t i o n or i n d i ­

rectly , by the use of a t r a n s r o r m h avi nq the c y c l i c c o n v o l u ­

t i o n p ro perty.

One of the i n d i r e c t t e c n n i q u e s for tne c o n v o l u t i o n is

use of the D i s c r e t e F o u r i e r T r a n s f o r m (DF T) . T h e use of D FT

ror c o n v o l u t i o n b e c a m e p o p u l a r when C o o l e y a n d T u k e y [23 1

i n t r o d u c e d t he e f f i c i e n t Fast F o u r i e r T r a n s f o r m (FFT) a l g o r ­

i t h m to c o m p u t e D F T r e s u l t i n g in a s i g n i f i c a n t s a v i n q i n

c o m p u t a t i o n and p e r f o r m a n c e i m p r o v e m e n t o v e r the d i r e c t

method. The FFT u s e s the c y c l i c p ro p e r t y of the c o m p l e x e x ­

p o n e n t i a l f u n c t i o n to r e d u c e the n u m b e r of m u l t i p l i c a t i o n s .

(19)

-ing s p e e d s t i l l r e m a i n s p r o p o r t i o n a l to the (complex) m u l t i ­

p l i c a t i o n time. A t t e m p t s were m a d e to r e d u c e t h e m u l t i p l i ­

c a t i o n time, for e x a m p l e , Liu and Peled f 25) p r o p o s e d to us e

a b i t - s l x c i n q a l q o r i t h m a nd t a b l e l o o k - u p s c h e m e to r e p l a c e

the c o n v e n t i o n a l m u l t i p l i e r . Also, tn er e xs a d e f i n i t e

d r a w b a c k in the use of DP T for m a c h i n e i m p l e m e n t a t i o n , that

th er e xs f i n i t e p r e c x s i o n r e p r e s e n t a t i o n or the t r a n s c e n d e n ­

tal m u l t i p l i e r f u n c t x o n s . T h e s e a p p r o x i m a t i o n s c o n t r i b u t e to

the e r r o r no is e in t h e output.

An a l t e r n a t i v e t r a n s f o r m d o m a i n t e c h n i q u e w h i c h has a t ­

trac ted c o n s i d e r a o l e i n t e r e s t in last few y e a r s i s the u s e

or the N u m b e r T h e o r e t i c T r a n s f o r m (NTT). F e r m a t N u mb er

T r a n s f o r m s (FNT) a n d R ad er T r a n s f o r m s ( R T) , w hi ch a r e s p e

-c x f i -c N T T ' s hav e b ee n i m p l e m e n t e d [ 7 , 1U). A v e r y a t t r a c t i v e

m e t h o d of i m p l e m e n t a t i o n or N T T ' s for c o n v o l u t i o n is, h o w e v ­

er, o ver the r i a q s that are i s o m o r p h x c to d i r e c t sums of

G a l o x s F i e l d s £ 1 3 1. T h x s i m p l i e s the use of the R e s i d u e N u m ­

ber S y s t e m (RNS) , w h i c h i t s e l f is of p a r t i c u l a r i n t e r e s t in

l i q i t a l s i g n a l p r o c e s s i n q £ 3 1 1 o e c a u s e of the p a r a l l e l n a ­

ture or its a r i t h m e t i c . T h e RNS was e x t e n s i v e l y x n v e s t x q a t e d

by S z a b o and T a n a k a [ 3 ] in 1967 for use in the d e s i q n of a

q e n e r a l p u r p os e c o m p u t e r . R e s x d u e t e c h n i q u e s , h o w e ve r, d id

not r e c e i v e w i d e - s p r e a d a t t e n t i o n b e c a u s e tne x e r r i t e c o r e

raeraorxes u s e d at t h at t i m e w e re too e x p e n s i v e and bulk y to

(20)

With the c u r r e n t a d v a n c e s in s e m i - c o n d u c t o r m e m o r y

t e ch n ol oq y, the i m p l e m e n t a t i o n of NTT's for s i q n a l p r o c e s s ­

inq is a v i a b l e a l t e r n a t i v e to c o n v e n t i o n a l m e t h o d s I" 7

1-T h o u q h the t r a n s f o r m d o m a i n r e p r e s e n t a t i o n of NTT s e q u e n c e s

nas no known p r a c t i c a l i n t e r p r e t a t i o n , its i m p l e m e n t a t i o n

for c o n v o l u t i o n is m e a n i n q f u l . T h e only r e s t r i c t i o n to be

o b s e r v e d is that the d a t a p oi nt s are s m a l l e n o u q h (scaled)

so that the f i n a l r e s u l t d o e s not p r o d u c e a d a t a p o i n t

q r e a t e r than the r t n q modulus. Also, s i n c e the t r a n s f o r m is

d e f i n e d over a f i n i t e rinq, the r e s u l t s a r e exa ct . F ur th er,

in RNS a r i t h m e t i c i m p l e m e n t a t i o n , a m u l t i p l i c a t i o n can be

r e p l a c e d by a tao le l q o k u p o p e r a t i o n , a n d thus the t h r o u q h

-put r a t e can ue e x p e c t e d to be hiqh w i th r e l a t i v e l y low

n a r d w a r e cost. T n e n u m b e r of b i t s used f o r d at a r e p r e s e n t a ­

tion, nowever, s h o u l d b e sm al l so t h a t m e m o r i e s r e q u i r e d f or

l o o k - u p tables are c o m m e r c i a l l y a v a i l a b l e . J u l l i e n f 51 s u q

-q e s t e d a m e th o d to i m p l e m e n t m u l t i p l i c a t i o n s w h i c h r e s u l t s

m t r e m e n d o u s m e m o r y s a v i n q a nd r ed u c e s m e m o r y r e q u i r e m e n t

to a v i a b l e size, s t i l l us in q l o o k - u p tables.

T h e t r a n s f o r m d o m a i n t e c h n i q u e s a r e only a t t r a c t i v e

when o n e or t he f a s t a l q o r i t h m s are e m p l o y e d in t h e i r c o m p u ­

tation. F a s t F o u r i e r T r a n s f o r m type a l q o r i t n m s c a n be a p ­

p l i e d to c o m p u t e the NTT. T h e heart of s u c n f a s t a l q o r i t h m

is a c o m p u t a t i o n a l u n i t c a l l e d a " B u t t e r f l y " . One o r m ul t i

d i m e n s i o n a l b u t t e r r l i e s h a v e oeeu u se d to c o m p u t e the t r a n s ­

(21)

-i th m £ 4] -is or p a r t i c u l a r i n t e r e s t s i n c e it e l i m i n a t e s the

d a t a p r e - s h u f f l i n q . T h i s f u r t h e r r e q u i r e s unity t wi dd l e

f a c t o r s at the la st s t a q e of the b u t t e r r f l y c o a p u t a t i o n .

Hence, t he t r a n s f o r m of the c o e f f i c i e n t s can be m u l t i p l i e d

by the t r a n s f o r m of the d a t a p o i n t s at the l a s t s t a q e of

b u t t e r f l y c o m p u t a t i o n i n s t e a d o f the m u l t i p l i c a t i o n by tne

t w i d d l e factors. T h i s r e s u l t s in s a v i n q in the t o t a l n u m b e r

of c o m p u t a t i o n s .

for its p r a c t i c a l use, a n y RNS a r i t h m e t i c s t r u c t u r e r e ­

q u i r e s B i na ry to R e s i d u e (B/R) a nd R e s i d u e t o B i n a r y (R/B)

c o n v e r t e r units. S e v e r a l h a r d w a r e t e c h n i q u e s [ 3 ] a re a v a i l a ­

ble ror a B/R c o n v e r t e r . The s e p a r a t e n e e d of s u c h a B/R c a n

be a v o i d e d if the A /D c o n v e r t e r u s e d q i v e s the b i n a r y o u t p u t

w h i c h a l so is a residue. T h i s can be a c a s e w h e n the rinq

m o d u l u s is l a rq e r t h a n the p o s s i b l e m a x i m u m v a l u e of a n y

d a t a point. T h e t i n a l o u t p u t s o b t a i n e d f r o m a two or m o r e

moduli, however, h av e to ne c o m b i n e d to o b t a i n the result.

T h e C h i n e s e R e m a i n d e r T h e o r e m (CRT) is o n e of tne m e t h o d s

[3], but it s u f f e r s f r o m the d i s a d v a n t a q e that it needs a

mod M adder, w he re M is tne d y n a m i c ranqe. T h e o t h e r met ho d

is via the use of a M i x e d R a d i x C o n v e r s i o n (MRC) t e c h ni qu e .

The m u l t i p l i c a t i o n n e e d e d in t h is m e t h o d c an be i m p l e m e n t e d

usi nq l o o k - u p tables. T h i s m e t h o d has c o m p u t a t i o n a l a d v a n

-ta qe s o v e r the C R T w n e n f e w e r m o d u l i a r e used.

H a r d w a r e r e a l i z a t i o n s are n o r m a l l y fi xe d for a s p e c i f i c

(22)

-t e c h n i q u e s c a n be u s ed ia p r o c e s s i n q of i m a q e s of l a r q e r d i ­

m e n s i o n s £ 18 1 th an that of the b a s i c b l o c k size. S u c h a l q o r

-i th m s are a t t r a c t -i v e wh en w o r k i n q in a l i m i t e d m e m o r y s y s ­

tem, s u c h as t nat of a m i ni -c o m p u t e r .

A s p e c i a l p u r p o s e d i q i t a l s i q n a l p r o c e s s o r is a d e d i ­

c a t e d piece of h a r d w a r e whose f u n c t i o n i s t o p e r f o r m a s p e ­

c i f i c set of p r o c e s s i n q a l q o r i t h m s (in r e a l time) a s a s e l f

c o n t a i n e d s u b s y s t e m . O b v i o u s l y a l l the s i q n a l p r o c e s i n q a l ­

q o r i t h m s c an be i m p l e m e n t e d on a q e n e r a l p u r p o s e c o m p u t e r ,

h o w e v e r the speed of such i m p l e m e n t a t i o n s on q e n e r a l p u r p o s e

c o m p u t e r s a r e not p a r t i c u l a r l y a t t r a c t i v e . M a n y i n d u s t r i a l

n e e d s h a ve only o ne a p p l i c a t i o n in mind, f o r e x a m p l e , f a u l ­

ty pact d e t e c t i o n in an a s s e m b l y line. S e c o n d l y , m o s t q e n ­

eral p u r p o s e c o m p u t e r a r c h i t e c t u r e s c an n o t n o r m a l l y handl e

s i m u l t a n e o u s c o m p u t a t i o n s . A d e d i c a t e d pie ce of hardwa re ,

h ow ever, is d e s i q n e d to h a n d l e a la rq e n u m b e r of c o m p u t a ­

tions, a n d e m p l o y s a p a r a l l e l p r o c e s s i n q and p i p e l i n i n q to

a c h i e v e s p e e d s s e v e r a l o r d e c s of m a q n i t u d e f a st er t h a n q e n ­

e r a l p u r p o s e c o m p u t e r s .

T h i s r e s e a r c h is an e x t e n s i v e i n v e s t i q a t i o n

into the p r o c e s s o r a r c h i t e c t u r e of a F a s t 2 - d i a e n s i o n a l D i ­

(23)

S i g n a l s and S y s t e m s qrou p, Dept. of E l e c t r i c a l E n g i n e e r i n g

at the U n i v e r s i t y of W i n d s o r [ 29 1. A l t h o u g h d i f f e r e n t h a r d ­

ware s t r u c t u r e s for the r e a l i z a t i o n of F a s t F o u r i e r T r a n s ­

f o r m s have b e e n p r o p o s e d , p r o c e s s i n q i m a g e s a nd o t h e r i n h e ­

r e n t l y t w o - d i m e n s i o n a l s i q n a l s u s i n g a F a s t N u m b e r T h e o r e t i c

T r a n s f o r m (FNTT) with a t w o - d i m e n s i o n a l b u t t e r f l y s t r u c t u r e

is a r e l a t i v e l y r e c e n t method. T h e v a r i o u s c o m p o n e n t s wh ic h

m a k e up the c o m p l e t e p r o c e s s o r a r e e x a m i n e d in t h is thesis.

In t h e r e a l i z a t i o n of d i g i t a l s y s t e m s usi nq s p e c i a l

p u r p o s e h ar dware, the c o n c e p t s of p a r a l l e l i s m , m u l t i p l e x i n g ,

and p i p e l i n g are ox g r e a t i m p o rt a nc e in a c h i e v i n g a m a x i mu m

v a l u e of p e r f o r m a n c e - c o s t ra ti o for the p a r t i c u l a r a p p l i c a ­

t i o n b ei n g c o n s i d e r e d . T h e t h e o r e t i c a l c o n s i d e r a t i o n s u s e ­

ful with r e s p e c t to 'speed and c os t t r a d e - of fs ' a r e r e v i e w e d

in this work.

The m e m or y a r c h i t e c t u r e n e e d e d for i m p l e m e n t a t i o n of

t w o - d i m e n s i o n a l O r d e r e d - I n p u t - O r d e r e d - O u t p u t NTT a l g o r i t n m

is i n v e s t i g a t e d in l i g n t of the s p e e d / c o s t t r a d e - o f f . T h e

i m p l e m e n t a t i o n of s u c h a b u t t e r r l y is d e s c r i D e d in detail.

T h e u s e of t a b l e l o o k - u p lor m a t h e m a t i c a l o p e r a t i o n s , in

p a r t i c u l a r m u l t i p l i c a t i o n , by a s u b - m o d u l a r a p p r o a c h , is

in-ves tiqated.

S e v e r a l d e s i q u a s p e c t s u s e d in i m p l e m e n t a t i o n of the

p r o c e s s o r a re c o m p a r e d to e s t a b l i s h the e f f i c i e n c y of the

(24)

m e n s i o n a l b u t t e r f l y . S e ve r a l o t h e r c o m p a r i s o n s are made to

s u p p o r t the a r c h i t e c t u r e used in tne c o n v o l v e r . F o r i n s ­

tance, the use of the M i x e d R a d i x C o n v e r s i o n m e t h o d is j u st ­

i f i e d c o m p a r e d to the C h i n e s e R e m a i n d e r T h e o r e m in the i m ­

p l e m e n t a t i o n of R e s i d u e to B i n a r y c o n v e r t e r . T h e

i m p l e m e n t a t i o n of m u l t i p l i c a t i o n ny s u b - m o d u l a r l o o k - u p t a ­

ble and by the use or d i r e c t R O M m u l t i p l i e r s i s c o m p a r e d .

T i m i n q c o n s i d e r a t i o n s a re m a d e for s e r i a l s e q u e n t i a l

p r o c e s i n q (used in the c onvolver) and c a s c a d e p r o c e s s i n q ,

and s p e e d / c o s t (efficiency) c o n s i d e r a t i o n for t h e s e m e t h o d s

are i n v e s t i q a t e d £oj; v i d e o - r a t e p r o c e s s i n q spe ed. T w o

s t r u c t u r e s , namely, a t h r e e - m e m o r y b u f f e r s t r u c t u r e and u s e

of a 'complete' b u t t e r f l y s t r u c t u r e , h a v e been p r o p o s e d to

i m p r o v e the p r o c e s s i n q speed. T h e t i m i n q d i a q r a m s w i t h r e ­

s p e c t to r e q i s t e r c o n t e n t s in the b u t t e r f l y of the c o n v o l v e r

are presented.

S e v e r a l e x a m p l e s or imaqe f i l t e r i n q a r e p r e s e n t e d to

i l l u s t r a t e tne a p p l i c a t i o n of the proc es so r . T h e e x a m p l e s

are t a k e n from w e ll d e f i n e d imaqes. k s i m p l e and a p p r o x i m a t e

m e t h o d to o b t a i n t he c o e f f i c i e n t s of a t w o — a i m e s n s i o n a l f i ­

n i t e i m p u l s e r e s p o n s e f i l t e r i s d e s c r i b e d . S e v e r a l s t a n d a r d

f i l t e r s are used tor I m a q e S m o o t h e m n q , I m a q e E n h a n c e m e n t

and o t h e r f e a t u r e e x t r a c t i o n on imaqes. T he r e s u l t s o b ­

t a i n e d from three d i f f e r e n t m e t h o d s in s o f t w a r e , n a m e l y d i ­

(25)

T h e use of b l o c k - m o d e f i l t e r i n q is i n v e s t i q a t e d in f i l ­

t e r i n q of v e r y larqe s e q u e n c e s , in a l i m i t e d m a i n - m e m o r y

system. T h e c h o i c e of the b a s i c - b l o c k s i z e is a t r a d e - o f f

w i th speed. T h e o r e t i c a l c o m p a r i s o n s f o r t h i s t r a d e - o f f ar e

presented.

1.2 X H E S I S o r g a n i z a t i o n

C h a p t e r - 2 p r o v i d e s the t h e o r e t i c a l b a c k q r o u n d on the

a p p l i c a t i o n of F a s t N u mb e r T h e o r e t i c T r a n s f o r m t e c h n i q u e s in

d i q i t a l f i l t e r i n q of tvo d i m e n s i o n a l s e q u e n c e s . I t d e t a i l s

the m o d u l a r a r i t h m e t i c , a l q e b r a i c c o n s t r a i n t s to be o b s e r v e d

in the use of the NTT a nd the r e s t r i c t i o n s i m p o s e d f r o m

p r a c t i c a l poi nt of view. F u r t h e r it d e s c r i b e s the c o n c e p t s

of the 2-diraensional O I O O - N T T a l qo r i t h m , a n d the m e th od of

Mir ed Radix c o n v e r s i o n used in the r e s i d u e to b i n a r y c o n v e r ­

sion. T n e d e s i q n c o n s i d e r a t i o n s used in the c o n v o l v e r a r e

d e t a i l e d in t h is c h a p te r .

The i m p l e m e n t a t i o n of the t r a n s f o r m c o m p u t a t i o n a l e l e ­

ment, the n u t te rf ly , a nd the m u l t i p l i c a t i o n in the b u t t e r f l y

u si nq the s u b - m o d u l a r a p p r o ac h, are d e s c r i b e d in C h a p t e r - 3 .

A n u m b e r of c o m p a r i s o n s vita r e s p e c t to speed, c o s t and m e ­

m o r y s t o r a q e are i n c l u d e d in t hi s part to d e s c r i b e t h e p e r ­

f o r m a n c e of tne p r o c e s s o r . V a r i o u s t i m i n q d i a q r a m s are a l s o

i n c l u d e d in tnis part.

C h a p t e r - 4 d e a l s w i th the h a r d w a r e a n d the f u n c t i o n a l

(26)

The Hiqh S p e e d D e v i c e (HSD) i n t e r f a c e of the P i l t e r with the

m i n i - c o m p u t e r SEL and t h e c o n t r o l loqic are e x a m i n e d . T h e

d i s c u s s i o n on the s o f t w a r e of the HSD is i n c l u d e d in the a p ­

pendix. The s te p s for the use of the c o n v o l v e r are d e s c r i b e d

in this c ha pter.

In t he next part, C h a p t e r - 5 , we d e t a i l the r e s u l t s of

f i l t e r i n q by the use of s e v e r a l s t a n d a r d f i l t e r s on test

ia-aqes. T h e a p p l i c a t i o n s in mind were I m a q e S m o o t h e n i n q and

E dqe E n h a n c e m e n t . T h i s final p art c o n s i d e r s the p r o c e s s i n q

of la rq e a r r a y s (larqer than c a n be p r o c e s s e d in o n e block)

uy b l o c k - m o d e f i l t e r i n q . The time of p r o c e s s i n q , w h i c h d e ­

pends on bl oc k s i z e has been compared. C h a p t e r - 6 p r e s e n t s

(27)

D I G I T A L F I L T E R I N G USING F A S T N U M B E R T H E O R E T I C T R A N S F O R M T E C H N I Q U E S

2,1 I N T R O D U C T I O N

In d i g i t a l i m a q e p r o c e s s i n g , as well as in o t h e r areas,

it is d e s i r a b l e to f i l t e r a t w o - d i m e n s i o n a l d i s c r e t e s i g n a l

x(i#1) by c o n v o l v i n g that s i g n a l with the t w o - d i m e n s i o n a l

d i g i t a l pulse r e s p o n s e of a p p l i e d f i l t er h(i,j) p r o d u c i n g an

o u t pu t s i g n a l y ( i , j ) . T h e t w o - d i m e n s i o n a l c o n v o l u t i o n is d e ­

fined as

y (i,i) = x * n

= £ X x(k,l) .h(i-k,j-l) (2-1)

K90

i# 1= 0 , 1 , ... M-1

where t he s e q u e n c e s x, h a nd y a re a s s u m e d to have

s q u a r e s h a p e of d i m e n s i o n (NxN) , (LxL) a n d (iixa) r e s p e c t i v e ­

ly, M ^ N+L-1.

P r o c e s s i n g s i g n a l s w ith a d i g i t a l c o m p u t e r or with s p e ­

c ial purp os e d i g i t a l h a r d w a r e i n v o l v e s the i m p l e m e n t a t i o n of

c o m p u t a t i o n a l s c h e m e s on s e q u e n c e s of n umbers. For exam pl e,

Eqn.{2.1) c a n be i m p l e m e n t e d hy a c t u a l l y takinq the sum of

p r o d u c t s as d e f i n e d or by i n d i r e c t methods. T h e i n d i r e c t

(28)

t r a n s f o r m of the product. T he i n d i r e c t m e t h o d s a r e a t t r a c ­

tive, b e c a u s e v i t h v i a b l e r e s t r i c t i o n s on the l e n q t h of s e ­

quences, c o m p u t a t i o n a l l y e f f i c i e n t a l g o r i t h m s c an be d e v e l ­

o p e d which h a ve a d v a n t a q e s o v e r d i r ec t m e t h o d s in t er m s of

s p e e d and thus the c o s t of filtering. T h e m o s t c o m m o n t e c h ­

n i q u e to r e d u c e t he c o m p u t a t i o n a l cost o f c o n v o l u t i o n is by

the use of the D i s c r e t e F o u r i e r T r a n s f o r m c o m p u t e d via u se

of Fast F o u r i e r T r a n s f o r m (FFT) al qo r it hm .

It is i n t e r e s t i n g to note that the FFT has b ee n used to

c o m p u t e c o n v o l u t i o n s and many h a r d w a r e s t r u c t u r e s h av e been

i m p l e m e n t e d [ 4 , 2 4 ] wifh s l i q h t v a r i a t i o n s to the b a s i c a l ­

q o r i t h m s u g g e s t e d by C o o l e y and T u c k e y [ 23 1 . Each s t r u c t u r e

l o o k s at the h a r d w a r e / s p e e d t r a d e - o f f a s s o c i a t e d with both

the c o m p u t a t i o n a l e l e m e n t s a n d the s u p p o r t i n g s t r u c t u r e .

However, this p r o c e d u r e is t i m e - c o n s u m i n g on m i n i - c o m p u t e r s

even with m u l t i p l i c a t i o n n a r d w a r e i n s t a l l e d , due to the

l a r q e numoer of c o m p l e x m u l t i p l i c a t i o n s r e q u i re d. F ur th er

there is c o n s i d e r a b l e b u i l d - u p of r o u n d - o f f e r r o r b e c a u s e of

the fin ite p r e c i s i o n in r e p r e s e n t i n q r e al n u m b e r s on d xq i t a l

co mp u te rs . F i l t e r d e s i g n s usinq ROM o r i e n t e d HNS a r i t h m e t i c

u n i t s [ 1 1 ] a n d i m p l e m e n t a t i o n of the FFT vitn the use of R e ­

s i d u e N u mb er S y s t e m [ 3 1 1 have been s u q g e s t e d for i m p r o v e d

e ff i c i e n c y , s i n c e f o r c o n v o l u t i o n we a re o n l y i n t e r e s t e d in

the C y c l i c C o n v o l u t i o n P r o p e r t y (CCP) of the t r a n s f o r m , it

(29)

v o l ve d i n FFT t w i d d l e f a c t o r s h a ve been i n v e s t i g a t e d . H u m b e r

T h e o r e t i c T r a n s f o r m s ( N T T ) , w h i c h a r e d e f i n e d as part of

G e n e r a l i z e d D i s c r e t e F o u r i e r T r a n s f o r m s (GDFT) , use i n t e g e r

t wi d d l e f a c t o r s a nd h a v e g a i n e d c o n s i d e r a b l e i n t e r e s t for

s e v e r a l y e a r s a s a c l a s s of s i g n a l p r o c e s s i n g a l g o r i t h m s .

The h a r d w a r e o f t h e I m a g e c o n v o l v e r u s e s H u m b e r T h e o r e t i c

T r a n s f o r m f o r e m p l o y i n g the i n d i r e c t m e t h o d of f i l t e r i n g .

2.2

DEFINITION OF MIJHBBB TBBQBBTIC IBABSFQBH

N u m b e r T h e o r e t i c T r a n s f o r m s are d e f i n e d as p a r t of a

c l a s s of G e n e r a l i z e d D i s c e r e t e F o u r i e r T r a n s f o r m s and a r e

c o m p u t e d o v e r f i n i t e f i e l d s [13],

*k

r nk ) x e

n

M

-nk

(

2

.

2

)

M

w h e r e N is the s e q u e n c e l e n gt h and M r e p r e s e n t s the m o d u l u s

of the f i e l d a r i t h m e t i c ; the g e n e r a t o r 5 is a n Nth ro ot of

uni ty (S**N= 1; S**N1j^1 m o d M f or 1 £ N K N ) a n d N e xi st s. It

has b een s u g g e s t e d t h a t N T T * s be i m p l e m e n t e d in r i n g s w h i c h

(30)

w h er e the pi are p r i s e s and r r e p r e s e n t s the d e q r e e of t he

e x t e n s i o n fields. T h e r e s u l t s of the o p e r a t i o n c a n be r e c o v ­

e re d by either u si n q the C h i n e s e R e m a i n d e r T h e o r e m or a m i x ­

ed radix c o n v e r s i o n [3 1 a l q o r i t n m . T h i s a m o u n t s to impl

e-me nt in q t he NTT u s i n q the R e s i d u e Number S y s t e m (RNS) and

the i nh er en t p a r a l l e l i s m of RNS i m p l e m e n t a t i o n can be m ade

to a d v a n t a q e to o b t a i n f a s t e r speed of p r o c e s s i n q . We

rir st d i s c u s s s om e of the b a s i c c o n c e p t s of RNS from n u mb er

t h e or y r e l e v a n t to the NTT in the next s ec ti o n.

2.3 M O D U L A R A R I T H M E T I C

D E F I N I T I O N - 2.1: T w o i n t e q e r s a a nd b a r e s a i d to be c o n q r

-uent mod a if

a = b + k.H (2.4)

w h e r e k is s o m e i n t e q e r an d H is the modulus. T he b is r e s i ­

due of a mod M when

0 < b < a

and is w r i t t e n as

a = b (mod i1)

D E F I N I T I O N - 2 . 2 : All i n t e q e r s are c o n q r u e n t mod M to s om e

i n t e q e r in the f i n i t e se t ( 0, 1 , 2 , ... #M-1) and let the s e t

of e l e m e n t s be c o m b i n e d by two d i f f e r e n t o p e r a t i o n s '+ 1 a n d

both mod a . T h e n tnis s et is c a l l e d the rinq of i n t e q ­

(31)

D E F I N I T I O H - 2 . 3 : If in d cinq of i n t e q e r s m u l t i p l i c a t i v e

i n v e r s e s exi st for a ll n o n z e r o i nt e qe rs , t h is rinq is k n o w n

as a Fi eld . It c an he sh ow n that Zm is a fie ld if and onl y

if a is a prime. The se t of a ll i n v e r t i b l e e l e m e n t s of a

rinq is a qroup with respect to the o p e r a t i o n of m u l t i p l i c a ­

tion and is c a l l e d a " m u l t i p l i c a t i v e qroup".

The f o l l o w i n q b a s i c a r i t h m e t i c o p e r a t i o n s are d ef ined

in m o d u l a r a r i t h m e t i c .

1. Addit io n: Ex am pl e, 7 + 1 2 = 2 (mod 17)

2. N eq ation : Example, - 7 = 1 0 (mod 17)

3. S u b t r a c t i o n : Exa mp le , 7 - 1 2 = 7 + ( - 1 2 ) = 7 + 5=12 (mod 17)

4. M u l t i p l i c a t i o n ; Example, 7 x 12 = 1 6 (mod 17)

5. M u l t i p l i c a t i v e I n v er se : M u l t i p l i c a t i v e I n v e r s e of an

i n te q e r b rn Zm e x i s t s if a nd only if b a n d W are r e ­

l a t i v e l y prime. In tnat c a s e b is an i n t e q e r such

t h at bxb' -1 (mod M ) . It oay be ho wever n o t e d that

w h e n M is a n o n - p r i m e inteqer, no t a i l m e m b e r s of the

set nave m u l t i p l i c a t i v e i nverses.

-i

Example : 7 =5 (mod 17)

for 7xb-1 (mod 17)

3 1 =5 (mod 14) as 3x5 = 15=1 (mod 14)

b u t 2 1 (mod 14) d o e s n o t exist.

6. D ivison: x/y e x i s t s if and only if y has an i n v e r s e

a nd x/y is c o n t a i n e d in the rinq. In that c a s e x/y

= x. y~*.

(32)

D E F I N I T I O N - 2.4: It pi is a prime, the e le m e n t s

fO, 1, 2,.. - - pi-1) f o r m a field with a d d i t i o n a nd m u l t i p l i c a ­

tion m o d u lo pi. In any fin it e field the n u m b e r of e l e m e n t s

must be a power of a p ri me ( p i * * r i ) , where ri is a p o s i t i v e

i n te q e r and an e l e m e n t (primitive root) m us t exist, p o w e r s

of whi ch c a n q e n e r a t e all the n o n - z e r o e l e m e n t s of t h e

field. Suc h a n e l d is c o m m o n l y d e n o t e d by the s y m b o l

GF(pi**ri) a nd is c a l l e d a G a l o i s Field r 9 ].

D E F I N I T I O N - 2.5: T he R e s i d u e r e p r e s e n t a t i o n of an i n t e q e r in

the BNS ta kes the r o rm of an L - t u p l e

X = (x 1 , x 2 , ... . xl)

of the le ast p o s i t i v e r e s i d u e s with r e s p e c t to the set of

m odu li

( m 1 , m 2 , - . . . .ml)

Tne r a n q e of n u m b e r s w h i c h can be u n i q u e l y c o d e d in RNS are

L

0 s< X < rr mi = N

A s i q n e d i n t e q e r s y s t e m can be d e v e l o p e d a t t a c h i n q a p o s i ­

tive siqn to n u m b e r s in the r a n q e ( 0 , 1 , N/2-1) for H

e v e n or {0,1,.... (N- 1)/2} for d odd, and a n e q a t i v e siqn to

the n u mb er in the ranqe ( d / 2 , M / 2 + 1 ,... N-1} or

{ ( M + 1 ) / 2 , ... M - 1} r e s p e c t i v e l y . The o p e r a t i o n s in RNS c a n

be c a r r i e d i n d e p e n d e n t l y for e a c u of the moduli. T he c o r r e c t

a n s w e r s would be o b t a i n e d r e q a r d l e s s of i n t e r m e d i a t e o v e r ­

flows of a n a r i t h m e t i c c o m p u t a t i o n if t n e r esu lt is w i t n i n

(33)

As m e n t i o n e d in i n t r o d u c t i o n , f o r the e x i s t e n c e of

t r a n s f o r m s w it h the DPT s t r u c t u r e g i v e n in Sqn. (2-2) and

h a v i n g the C y c l i c C o n v o l u t i o n P r o p e r t y ( C C P ) , it is n e c e s ­

s ar y that an i n t e g e r e x i s t that is an Nth roo t of unity. He

will c o n s i d e r t hi s p r o b l e m usinq m o du l a r a r i t h m e t i c .

F i r s t E u l e r ' s f u n c t i o n a) {M) is d e f i n e d as the n u m be r of

i n t e q e r s in 2m t a a t a r e r e l a t i v e l y pr im e to ti. O b v i o u s l y

then for M a prime n u m b e r <D(H)=M-1. If M is a c o m p o s i t e n u m ­

ber and its prime f a c t o r e d form is d e n o t e d by

r1 r2 rl

tl=(p1) • (P2) (pi)

. i

K

then the q e n e r a l e x p r e s s i o n for i is [9 1

u) (M) =d (1-1/p D . ( 1 - 1 / p 2 ) ----(1- 1/pl) .

= fl (pi-1) (2.5)

tM

I H E O a E N - 2 . 1: E uler's t h eo r e m s t a t e s that for e v e r y S prime

to M

(M)

6 =1 (mod M)

For M p ri me this r e d u c e s to F e r m a t ' s theorem.

T H E O Q E M - 2 . 2: F e r m a t ' s t he orem s t a t e s that for M a p ri m e

number,

( M - U

(34)

w hi c h h o l d s for al l n o n z e r o e l e m e n t s of Zm s i n c e they a re

all r e l a t i v e l y prime to H if M i s a prime.

T h e r e a re c e r t a i n r o o t s of unity t h at a re of p a r t i c u l a r

i n t e r e s t . I f N is t he l e a s t p o s i t i v e i n t e q e r such that

N N 1

& =1 (mod N) ; 3 £1 (mod d); 1 ^ N 1 < N (2.7)

then o is s a i d to oe a root of unity of or de r N, or & is a

p r i m i t i v e Nth r o o t of unity.

It t h e o r d e r of & is e q u a l to u»(M) , t h e n & is c a l l e d a

p r i m i t i v e root. If M is a prime and 8 i s a p r i m i t i v e root,

tne set of i n t e q e r s

k

X = {& (mod a ) , k = 0 , 1 , 2 , . . . , a - 2 ] ( 2 . 8 )

is the t ot a l set or n o n z e r o e l e m e n t s in Zm, and all n o n z e ro

e l e m e n t s in Zm c an i»e q e n e r a t e d by p o w e r s of t h e p r i m i t i v e

r o o t. Tn is , t h u s c n a r a c t e r i z e s the e n t i r e field. T he n o n z e r o

c l a s s e s of Zm f or m a c y c l i c m u l t i p l i c a t i v e q r o u p o f o rd e r

M-1 {1,2, a-1) , with m u l t i p l i c a t i o n m o d u l o M, i s o m o r p h i c

to the a u d i t i o n q r o u p {0,1,... H-2) wrth a d d x t i o n modu lo

a -

1

.

E ul er 's t h e o r e m i m p l i e s that if & is of o rd e r N then N

mu st d x v i d e tf(M), d e n o t e d by N|u)(M). If a is a pr im e it c a n

be sho wn that r o o t s of o r d e r N exist if a nd o nly if N| (M-1)

and the ro ot s are q i v e n ny

(35)

w h e r e So d e n o t e s a p r i m i t i v e root, M o r e g e n e r a l l y if & is a

r oot of o r d e r N then

& ** k is o f or d er N/k if k|H

&***. is of ord er N if N and k are

r e l a t i v e l y prime.

T h is i m p l i e s that the n u m b e r of r o o t s of o r d e r N is

qi ve n by d)(N) and, ther ef or e , the n u m b e r of p r i m i t i v e ro ot s

is d>(d(M)). T h e s e r e l a t i o n s a ll o w one to c a l c u l a t e all of

the coots of all p o s s i b l e o r d e rs f rom one p r i m i t i v e root.

Example:

L e t d=7, Z m = { 0 , 1 ,2 , 3, 4, 5,6:• +

j>(U =1 i) (2) = 1 <h (3) =2

0)(4)=2 a) (5) =4 cfi(6)=2

1) (7) =6

C o n s i d e r r a i s i n g e a c n e l e m e n t of Z7 to p o w e r s f r om 1 to 6

(mod 7) , T ab- (2. 1) .

T a b l e - (2.1)

0 1 2 3 4 6 6

1 I 1 1 1 1 1 1 1

2 I 1 2 4 1 2 4 1

3 1 1 3 2 6 4 5 1

4 I 1 4 2 1 4 2 1

5 I 1 5 4 6 2 3 1

6 I 1 6 1 6 1 6 1

(36)

T a b l e - (2.2) B o o t s of o r d e r N

N r o o t s of order N

1 1

2 6

3 2,4

6 3,5

O n l y those N t ha t d i v i d e <i (tf) - S (7) =6 h a v e ro ot s that b elo nq

to them. Tne nurnoer of roots is qiv en by a) (N) and the n u m ­

ber of p r i m i t i v e r o o t s is 3(td{tt))=2 a n d t h e y a r e 3 and 5.

Note that both of the p r i m i t i v e r o o t s q e n e r a t e all the n o n ­

z e r o elements.

o> (H) - 1

For a n o n p r i m e M, 6 nas an i n v e r s e qiven by & if 5 and

H a re r e l a t i v e l y prime. It c a n be noted t na t for N a c o m p o ­

s i t e r a t h e r t han a prim e number, Zm is not a field s i n c e a ll

e l e m e n t s w i l l not h a v e inverses. There is no p r i m i t i v e root

that will q e n e r a t e the e n t i r e rinq, o n l y s u b s e t s with i(i!)

elements. Let a n a v e tne f o l l o w i n q u n i q ue pr im e f a c t o r i z a ­

tion.

r 1 r2 rl

d = IP 1) - (p2) (pi)

Hhen the a r i t h m e t i c has to be p e r f o r m e d mod M, it can

be p e r f o r m e d m o d u l o e a c n prime p o w e r (pi)**ri s e p a r a t e l y £9 1

a nd the final r e s u l t mod a can be o b t a i n e d u s i n q the C h i n e s e

B e m a i n d e r t h e o r e m £ 3 1. When the a r i t h m e t i c mod (pi**ri) is

(37)

Now we r e t u r n to the d i s c u s s i o n on the d e s i q n of the

NTT processor. He n o t i c e t he f o l l o v i n q r e q u i r e m e n t s for t h e

CCP to e x i s t and t h e NTT to be d e f i n e d o v er the finite

field.

T H E O R E M - 2 . 3 : A l e n q t h N t r a n s f o r m h a v i n g the DFT s t r u c t u r e

will i m p l e me n t c y c l i c c o n v o l u t i o n if a n d o n l y if th er e e x ­

i sts an inverse of N and an e l e m e n t S, a root of unity of

o r d e r N , i . e . , N is t he l e a s t p o s i t i v e i n t e q e r such that

&**N =1

T h i s is a very q e n e c a l r e s u l t a p p l y i n q to both rin qs

a nd rields th at are f i n i t e or i n f i n i t e a nd it h as been d e ­

v e l o p e d from a v a r i e t y of p o i n t s of view [25 1. For M a c o m ­

p o s it e n u mb er as r e p r e s e n t e d in Eqn. (2-5) , we can o b t a i n t he

r e s u l t s of o p e a t i o n mod rt by c o m b i n i n q the r e s u l t s o b t a i n e d

from the o p e r a t i o n m c d u l o e a ch ( p i * * r i ) .

T her ef or e, the l e n qt h N n u m b e r t h e o r e t i c t r a n s f o r m h a v ­

ing the CCP in Zm must a l s o have the C C P in 2fpi**ri} for

i= 1,2,....l. T n i s r e q u i r e s that & (mod pi**ri) be an i nt eq e r

of order N a n d must e x i s t in Z ( pi* *r i) , i . e . , N is the l e a s t

p o s i t i v e i n t e q e r s u c h t h a t

& * * N =1 (mod p i * * r i ) , i = 1 , 2 , . . . . l .

F u r t h e r m o r e , s i n c e the i n v e r s e t r a n s f o r m r e q u i r e s N ; the

i n v e r s e of N s h o u l d e x i s t in Z { p i * * r i } , or, N s h o u l d be r e ­

l a t i v e l y pri me to M. Now we fiad that by E u l e r * s t he orem

N| a) (pi**ri) , i = 1 , 2 , ... 1.

(38)

S in c e N is r e l a t i v e l y pr im e to a (or its factors)

N| (pi-1) i = 1 , 2 , ... 1.

N|q c d ( p 1 - 1 , p 2 — 1, . . . . pl-1)

We d e f i n e 0(M) as the g r e a t e s t c o m m o n d i v i s o r (qcd) of the

( P i - D

0 (H) =qcd ( p1-1,p2- 1, .. ..pl-1)

ther efore, N|0(M)

T h i s q i v e s us

T H E O R E M -2.4: A l e n q t h N t r a n s f o r m h a vi ng the DPT s t r u c t u r e

will i m p l e m e n t c y c l i c c o n v o l u t i o n mod M if a nd o n l y if

NIO (M)

and this e s t a b l i s n e s the ma xi mu m t r a n s f o r m l e n q t h in Zm as

N m a x = 0 (M)

T h i s is a v e r y i m p o r t a n t t h e o r e m that s t a t e s e x a c t l y what

the pos si bl e t r a n s f o r m l e n q t h s for a q iv e n m o d u l u s are.

2.3.1 Afl E x a m p l e of c o n v o l u t i o n using NTT w h e n M is a

p r i m e

C o n s i d e r two s e q u e n c e s

x= (2,-2, 1,0)

h — (1,2,0,0)

wh os e c o n v o l u t i o n is desired. F r o m o v e r f l o w c o n s i d e r a t i o n ,

it is s u f f i c i e n t ir we d e f i n e the t r a n s f o r m s o v er GF(17)

tt= 1 7 N=4

Now si nc e M=17, the i n t e q e r 2 is of o r d e r 8

(39)

or,

1 1 1 1

1 4 4* *2 4**3

T = 1 4**2 4**4 4**6

1 4**3 4**6 4**9

~1 1 1 1

1 4 16 13

T = 1 1b 1 1b (mod 17)

1 13 16 4

=-4 (mod 17) = 13 (mod 17) and

T r a n s f o r m a t i o n H a t r i x is

1 1 1 1

1 13 16 4

= 13 1 16 1 16

1 . 4 16 13

The T r a n s f o r m s of x and h are q iv e n by

1 1 1 1 2

1 4 16 13 15

= 1 16 1 16 1

_1 13 16 4 _ 0

= t 19 10, 3, 9 1 (mod 17]

s i m i l a r l y H = [ 3 , 9 , 1 6 , 1 0 1

and thus Y = X.H

= T 3 , 5 , 1 2 , 5 1 (mod 17)

T a k i n q the i n ve r s e t r a n s f o r m of y,

y = (2,2,14,2) (mod 17)

(40)

A c c ording to our assumption, i nt eg e rs are s u p p o s e d to lie

b e tw e en -8 a nd 8- T he re fo re

y = (2,2,-1,2)

which is the c o r r e c t answer.

2.4 P R A C T I CAL C O N S I D E R A T I ONS IN C H O O SING & , N AND M FOB AN

NTT

Al th o ug h the cla ss of all p o s s i b l e number theoretic

tra ns forms s ee m s very l ar ge at fi rs t c o n s i d e r a t i o n (in fact,

i n f i n i t e ) , c l o s e r e x a m i n a t i o n sh o ws that very few s ee m to be

a t t r a c t i v e for use in s i gn al processing. Agarwa l and Burrus

f 6 ] s um me r is e the c r i t e r i a which would make a p ar ti cu la r NTT

to be a t tr a c t i v e in c o m p a r i s o n to other i m p l e m e n t a t i o n s of

convolution. T h ey list that for NTT to ne c o m p u t a t i o n a l l y

e ff icient three r e g u i r e m e n t s are:

1. (a) N s h o u l d be highly c o m p o s i t e (preferably a power

of 2) for a fast tF T-type a l g o r i t h m to exist and

(b) N s n o u l d be large e n ou gh for pract ic al seg ue n ce

lenths

2. since c om p l e x m u l t i p l i c a t i o n s take most of the c o m p u ­

t a ti on time in c a l c u l a t i n g the FFT, it is i mp or ta nt

that m u l t i p l i c a t i o n by powers of S be a s i m pl e o p e r a ­

tion. For m a c h i n e imp le me ntation, this is p o s si bl e

if the p owers of & have b i n ar y r e p r e s e n t a t i o n s with

very few bits; p r e fe r ab ly also a power of two, where

(41)

i m p l e m e n t a t i o n s , H should have a b inary r e p r e s e n t a ­

tion with a very few bits and s h o u l d be la rge e n o uq h

to prevent ove rflow.

U n f o r t u n a t e l y the c o n d i t i o n s gi ve n by above t h e o r e m s in

s e c - (2.3) do not q iv e a s y s t e m a t i c way of d e t e r m i n i n g the

"best" cnoices. U s u a l l y M nas to be s e l e c t e d f ir st and N

and & are d e te r m i n e d s ui tably. When the m o d u l u s fl is cho sen

to be a Ferm at Num be r as

t

2

M = Ft =2 + 1 (2. 10)

b

= 2 + 1 , b = 2 * * t

then a p r om is i nq c l a s s of NTT's can be o b t a i n e d £8]. Such

t r a n s f o r m s a r e c a l l e d F e rm at N u m b e r T r a n s f o r m (FNT)- A s p e ­

cial c l a s s of such t r a n s f o r m is when the value of S is c h o ­

sen t>=SQHI (2.) . T h e s e t r a n s f o r m s are d e s c r i b e d by Ba de r and

are known as Rader T r a n s f o r m s £9],

2.5 DESIGN C O N S I D E R A T I O N FOR NTJ U S E D IB C O N V O L V E R

As we m e n t i o n e d in section-(2-h) , i t is u s u a l l y but not

a l w a y s the c a se that a value of M is c h o s e n first and s u i t a ­

ble t r a n s fo rm l e n q t h N a n d the g e n e r a t o r & is d e te rm i ne d. We

Figure

TABLE OF C O N T E N T S ........................................ . . . vi
Fig. (3.1)
Fig. (.3-2J
Fig. (3.3)
+7

References

Related documents

A case study was performed in order to evaluate the degree of soil cementation generated by the microbial function, using Trigger and Accelerometer method (TA

To ascertain the role of NT-proBNP as a prognostic marker for in- hospital and 1-year mortality in acute exacerbations of chronic obstructive pulmonary disease (AECOPD) patients,

is controlled. In this paper, we identify and quantify “flex- ibility”. Then, a contractual framework between the utility and the building operator is designed so that the building

Vol 12, Issue 11, 2019 Online 2455 3891 Print 0974 2441 HANAA ABOELKASEM ALAZRAG1*, MERVAT EID ABDELGHAFFAR1, HUDA MAHMOUD KHALIFA2, RASHA MOHAMED ADEL NASSRA3, AMANY ALI KHALIL

Preparations and human resource development prior to the introduction of the technologies were found, in general, not to be carried out at the level expected from the

The evaluation system will implement Dysphonia Severity Index (DSI) that requires the combination of pitch detection algorithm (PDA), an algorithm that can find the voice

Submissions to Research Notes will be reviewed for readability, rationale, clarity, logic, organization, length, and adherence to all Alberta Journal of Educational Research (