on numerical approximation in synthesis for … h3.pdf · on numerical approximation in synthesis...

55
ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR PRESCRIBED AMPLITUDE RESPONSE by WALTER JAMES HENRI HARRIS B.A.Sc,, U.B.C., 1962 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF Master of Applied Science in the Department of Electrical Engineering We accept this thesis as conforming to the required standard Members of the Department of Electrical Engineering THE UNIVERSITY OF BRITISH COLUMBIA NOVEMBER, 1964

Upload: lamthuan

Post on 19-Feb-2019

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

ON NUMERICAL APPROXIMATION IN SYNTHESIS

FOR PRESCRIBED AMPLITUDE RESPONSE

by

WALTER JAMES HENRI HARRIS

B.A.Sc,, U.B.C., 1962

A THESIS SUBMITTED IN PARTIAL FULFILMENT OF

THE REQUIREMENTS FOR THE DEGREE OF

Master of A p p l i e d S c i e n c e

i n the Department of

E l e c t r i c a l E n g i n e e r i n g

We ac c e p t t h i s t h e s i s as conforming t o the

r e q u i r e d s t a n d a r d

Members of the Department

of E l e c t r i c a l E n g i n e e r i n g

THE UNIVERSITY OF BRITISH COLUMBIA

NOVEMBER, 1964

Page 2: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

In p r e s e n t i n g t h i s t h e s i s i n p a r t i a l f u l f i l m e n t of

the requirements f o r an advanced degree at the U n i v e r s i t y of

B r i t i s h Columbia, I agree that the L i b r a r y s h a l l make i t f r e e l y

a v a i l a b l e f o r reference and study* I f u r t h e r agree that per­

m i s s i o n f o r extensive copying of t h i s t h e s i s f o r s c h o l a r l y

purposes may be granted by the Head of my Department or by

h i s r e p r e s e n t a t i v e s . I t i s understood that, copying or p u b l i ­

c a t i o n of t h i s t h e s i s f o r f i n a n c i a l gain s h a l l not be allowed

without my w r i t t e n permission*

Department

The U n i v e r s i t y of B r i t i s h Columbia, Vancouver 8 5 Canada

Page 3: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

ABSTRACT

T h i s t h e s i s d e s c r i b e s a new method of o b t a i n i n g s u i t a b l e

e q u a l - r i p p l e r a t i o n a l f u n c t i o n s f o r use i n the s y n t h e s i s of

networks. I t has two p r i n c i p a l advantages over o t h e r methods

used f o r t h i s purpose* F i r s t l y , i t i s capable of f i n d i n g the

b e s t a p p r o x i m a t i o n to a g i v e n magnitude f u n c t i o n , phase f u n c t i o n

or b o t h s i m u l t a n e o u s l y . The e r r o r of a p p r o x i m a t i o n may be

weighted as d e s i r e d a t any f r e q u e n c y i n the range of a p p r o x i ­

m a t i o n . Secondly* i t i s e a s i l y adapted f o r use on anautomatic

computer* T h i s e n a b l e s q u i c k comparison of the a p p r o x i m a t i o n s

produced by u s i n g r a t i o n a l f u n c t i o n s of d i f f e r e n t o r d e r s of

c o m p l e x i t y *

i v

Page 4: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

ACKNOWLEDGEMENT

The author would l i k e t o thank Dr. A. D. Moore f o r h i s

s u p e r v i s i o n and guidance throughout t h i s r e s e a r c h p r o j e c t and

the s t a f f of the computing c e n t r e f o r t h e i r generous a s s i s t a n c e *

The p r i n c i p a l p a r t of t h i s r e s e a r c h was c a r r i e d out w i t h the

support of the N a t i o n a l R esearch C o u n c i l w i t h a d d i t i o n a l

a s s i s t a n c e from a B» C* Telephone Co. S c h o l a r s h i p .

i

Page 5: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

TABLE OF CONTENTS

Page

L i s t of I l l u s t r a t i o n s ••»•»....»..... * ........ » i i i

Acknowledgement ..•••.••••••.........»...»**»•. i v

1. I n t r o d u c t i o n .»••••»....».» ..... 1

1-1. P r o p e r t i e s of Impedances ...... ...... 2

1- 2« Types of F u n c t i o n s t o be A p p r o x i ­

mated ...••••«•••..........*.... 5

2. M a t h e m a t i c a l Background 7

2- 1. N o t a t i o n 7

2-2. Statement of the A p p r o x i m a t i o n

Problem 9

2-3. E x i s t e n c e and Uniqueness ............ 9

3. Methods of R a t i o n a l A p p r o x i m a t i o n ......... 12

4. A New Method 19

4-1. D e s c r i p t i o n 19

4-2. S o l u t i o n of a S u b s i d i a r y Problem .... 21

4-3. The Computer' Program ................ 23

5. Examples 27

6. C o n c l u s i o n .....»..••••........ 33

7. Appendix ......... 34

References 48

i i

Page 6: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

LIST OF ILLUSTRATIONS

F i g u r e Page

1. A p p r o x i m a t i o n to I l l u s t r a t e d Response .. 28

2. A p p r o x i m a t i o n to G a u s s i a n Response ..... 29

3. E r r o r i n A p p r o x i m a t i o n to G a u s s i a n Response ................. ........ 30

4. Comparison of Weighted E r r o r i n A p p r o x i m a t i o n to G a u s s i a n Response ..... 31

5. A p p r o x i m a t i o n to I l l u s t r a t e d Response .» 32

i i i

Page 7: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

1. INTRODUCTION

H i s t o r i c a l l y , s u i t a b l e r a t i o n a l f u n c t i o n s f o r the

s y n t h e s i s of networks have been o b t a i n e d by two g e n e r a l

c l a s s e s of methods: one has been the use of an analogue of

the network which a l l o w e d e a s i e r m a n i p u l a t i o n of p o l e s and

zeroes than the a c t u a l network, and the o t h e r has been the

use of v a r i o u s a n a l y t i c f u n c t i o n s and t r u n c a t e d s e r i e s .

P r o b a b l y the b e s t example of the former i s the p o t e n t i a l

a n a l o g y . F o r the l a t t e r , the B u t t e r w o r t h and B e s s e l a p p r o x i ­

mations to the low-pass f i l t e r c h a r a c t e r i s t i c are among the

b e t t e r known. F o r many a p p l i c a t i o n s these methods produce

s u f f i c i e n t l y good r e s u l t s . However, when f i l t e r s are r e q u i r e d

to have p r e c i s e l y s p e c i f i e d magnitude and phase r e s p o n s e s , as

f o r example i n l o n g telephone networks, i t i s o f t e n d e s i r a b l e

to be ab l e t o s p e c i f y the maximum d e v i a t i o n from the d e s i r e d

f u n c t i o n and to make t h i s v a l u e as s m a l l as p o s s i b l e f o r a g i v e n

degree of network c o m p l e x i t y . To b e g i n the s y n t h e s i s , i t i s

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

and zeroes o r , e q u i v a l e n t l y , the c o e f f i c i e n t s of the r a t i o n a l

f u n c t i o n . A p p r o x i m a t i o n s o b t a i n e d by u s i n g the p o t e n t i a l

analogy i n the form of an e l e c t r o l y t i c tank g i v e the p o l e and

zero p o s i t i o n s d i r e c t l y w h i l e c l a s s i c a l a n a l y t i c approaches

u s u a l l y r e s u l t i n one of these s e t s of q u a n t i t i e s e x p r e s s e d

by an e x p l i c i t f o r m u l a i n terms of t a b u l a t e d f u n c t i o n s . However,

i n the case of a p p r o x i m a t i o n s o b t a i n e d by d i r e c t l y r e d u c i n g the

maximum e r r o r , the amount of c a l c u l a t i o n i s , g e n e r a l l y ,

c o n s i d e r a b l y g r e a t e r .

Page 8: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

The p o t e n t i a l analogue has the advantage of p e r m i t t i n g

a b e t t e r i n t u i t i v e f e e l i n g f o r the s e n s i t i v i t y of the f i n a l

response t o s m a l l d e v i a t i o n s i n p o l e and zero p o s i t i o n s ,

but the di s a d v a n t a g e of b e i n g capable of o n l y l i m i t e d a c c u r a c y

A n a l y t i c a p p r o x i m a t i o n s may r e s u l t i n an e a s i l y c h a r a c t e r i z e d

r esponse; f o r example, w i t h the Ghebyshev a p p r o x i m a t i o n s to

a c o n s t a n t , the maximum passband r i p p l e i s d i r e c t l y a v a i l a b l e .

A d i s a d v a n t a g e i s t h a t these methods have o n l y been developed

f o r s imple forms of responses* The n u m e r i c a l methods to be

c o n s i d e r e d i n t h i s paper e x p l o i t the c a p a b i l i t i e s of modern

high-speed automatic computers? t h i s a l l o w s d i r e c t r e d u c t i o n

of the maximum e r r o r of response w i t h r e s p e c t t o p r a c t i c a l l y

any a r b i t r a r y f u n c t i o n , w i t h a c c u r a c y l i m i t e d o n l y by the

number of s i g n i f i c a n t f i g u r e s r e t a i n e d d u r i n g c a l c u l a t i o n s .

A l t h o u g h q u e s t i o n s of the e x i s t e n c e and uniqueness of a

" b e s t " r a t i o n a l f u n c t i o n a p p r o x i m a t i n g a d e s i r e d f u n c t i o n w i l l

be d e a l t w i t h l a t e r , i t i s n e c e s s a r y f i r s t t o c o n s i d e r the

l i m i t a t i o n s imposed f o r the sake of p h y s i c a l r e a l i z a b i l i t y .

1—1» P r o p e r t i e s of Impedances

The network f u n c t i o n s t o be approximated can be

r e p r e s e n t e d as e i t h e r t r a n s f e r impedances or d r i v i n g - p o i n t

impedances. The f o l l o w i n g r e q u i r e m e n t s must be met by a

p h y s i c a l l y - r e a l i z a b l e d r i v i n g - p o i n t impedance (or adm i t t a n c e )

produced by a network of lumped j. l i n e a r , p a s s i v e , t i m e -

i n v a r i a n t elements?

1. Z ( s ) i s a r a t i o n a l f u n c t i o n of the complex f r e q u e n c y

s, and can be w r i t t e n i n the two e q u i v a l e n t forms;

Page 9: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

3

n n 7 a . s 1 ( s - s . ) /_ l | | V i 7

«<•) = - i # =K. ^ m : n+m

X v 1 (s - s.)

i=0 i = 1+n

2. P o l e s and zeroes of Z ( s ) are e i t h e r r e a l or occur i n

complex conjugate p a i r s o r , e q u i v a l e n t l y , a l l the

c o e f f i c i e n t s a^ and are r e a l .

3. The r e a l p a r t s of a l l p o l e s and zeroes of Z ( s ) must

be n o n - p o s i t i v e .

4. P o l e s and zeroes of Z ( s ) must be simple w i t h r e a l ,

p o s i t i v e r e s i d u e s i f the r e a l p a r t i s z e r o ,

5. The c o n s t a n t m u l t i p l i e r K must be r e a l and p o s i t i v e .

6. | m — n| must be e i t h e r 0 or 1.

The req u i r e m e n t s f o r an open c i r c u i t t r a n s f e r impedance are the

same except t h a t the r e a l p a r t s of the zeroes of Z ( s ) are not

r e s t r i c t e d and m — n ^ - 1.

U s u a l l y s p e c i f i c a t i o n s f o r response are g i v e n f o r r e a l

f r e q u e n c i e s , i . e . , f o r s'= jtt,. I n some c a s e s , the impedance i s

s e p a r a t e d i n t o r e a l and i m a g i n a r y components. I f the impedance

i s w r i t t e n i n the form

m, + n,

where the m's and n's denote r e s p e c t i v e l y the even and odd

p a r t s of the p o l y n o m i a l s , t h e n , f o r s = jw, the even p a r t s

are r e a l and the odd p a r t s are i m a g i n a r y , and

Page 10: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

Re Z( s ) m l m 2 ~ n l n 2

(m 2) - ( n 2 ) '

Im Z(s ) m 2 n l ~ m l n 2

(m 2) - ( n 2 )

Assuming t h a t Z ( s ) i s a n a l y t i c i n the r i g h t h a l f - p l a n e f t h a t

i s , f o r a l l s e Re(s) > 0, then e i t h e r the r e a l p a r t or the

im a g i n a r y p a r t can be o b t a i n e d from the o t h e r , t o w i t h i n an

added r e s i s t a n c e or r e a c t a n c e r e s p e c t i v e l y .

F o r some purposes i t i s p r e f e r a b l e t o use p o l a r

c o - o r d i n a t e s and d e s c r i b e the impedance i n terms of i t s magni­

tude and phase a n g l e . F o r t h e o r e t i c a l purposes, i t i s more

common to use the squared magnitude or the l o g a r i t h m of the

magnitude r a t h e r than the magnitude i t s e l f . The "squared-

magnitude" f u n c t i o n i s non-negative f o r a l l to, and may be

o b t a i n e d from

Z ( s ) . Z ( - s ) = ( m i ) 2 - ( n 2 ) 2

( m 2 ) 2 - ( n 2 ) 2

by s e t t i n g s = jw, so t h a t

Z(j«.)|2 = Z(j«) . Z(-j».)

The phase angle i s an odd f u n c t i o n h a v i n g the p r i n c i p a l

v a l u e ,

Q(<p) = tan' -1 m 2 n l m l n 2 j ( m 1 m 2 - n x n 2 )

s = J«

Page 11: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

T h i s f u n c t i o n i s c o n t i n u o u s except a t f r e q u e n c i e s c o r r e s ­

ponding to p o l e s or zeroes l y i n g on the j<o a x i s , a t which

p o i n t s the phase changes d i s c o n t i n u o u s l y by an i n t e g e r

m u l t i p l e + 71. * A g a i n assuming no r i g h t - h a l f - p l a n e p o l e s or

z e r o e s are p r e s e n t , the magnitude or the phase may be o b t a i n e d

from each o t h e r . By f a c t o r i n g the numerator and denominator

of Z ( s ) . Z ( - s ) and r e t a i n i n g o n l y the l e f t - h a l f - p l a n e p o l e s

and z e r o e s , Z ( s ) can be o b t a i n e d . Thus, knowing any one of

Z ( s ) , Re [z(s)]|, Im [ z(s)], 0(«), Z ( s ) , Z ( - s ) , or Z(jft>)| 2 , airy one

of the o t h e r s c a n , i n t h e o r y , be o b t a i n e d , s u b j e c t to the s t a t e d

a s s umptions.

I n t h i s t h e s i s * o n l y a p p r o x i m a t i o n s to s p e c i f i e d

magnitude f u n c t i o n s w i l l be t r e a t e d i n d e t a i l , a l t h o u g h the

a l g o r i t h m to be developed can be r e a d i l y extended f o r a p p r o x i ­

mating o t h e r f u n c t i o n s d e r i v e d from Z ( s ) .

1-2. Types of F u n c t i o n s to be Approximated

Network f u n c t i o n s to be approximated may be s e p a r a t e d

b r o a d l y i n t o two c a t e g o r i e s : those a p p r o p r i a t e f o r d e s c r i b i n g

band f i l t e r s and those a p p r o p r i a t e f o r e q u a l i z e r s * O f t e n the

s p e c i f i c a t i o n s f o r t r a n s m i s s i o n through such networks are

g i v e n i n terms of the a t t e n u a t i o n . T h i s q u a n t i t y i s

p r o p o r t i o n a l to the l o g a r i t h m of the magnitude of the t r a n s f e r

impedance, i . e . *

A = -k • l o g | Z | , where k i s r e a l and p o s i t i v e *

Band f i l t e r s are c h a r a c t e r i z e d by d i s t i n c t passbands

( i n t e r v a l s of ft) over which the a t t e n u a t i o n i s s m a l l ) and s t o p -

bands / ( i n t e r v a l s of ft) over which the a t t e n u a t i o n i s l a r g e )

Page 12: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

6 a l t e r n a t i n g a l o n g the w - a x i s . S p e c i f i c a t i o n s f o r t h i s type

of f i l t e r are o f t e n g i v e n i n terms o f :

( i ) p e r m i s s i b l e passband r i p p l e , i . e . , the r a t i o of

maximum to minimum t r a n s m i s s i o n w i t h i n a passband;

( i i ) minimum a t t e n u a t i o n i n the stop-bands;

and ( i i i ) w i d t h of t r a n s i t i o n - or guard-bands.

E q u a l i z e r s g e n e r a l l y do not r e q u i r e sharp t r a n s i t i o n s ,

but o f t e n r e q u i r e c a r e f u l c o n t r o l of e i t h e r magnitude or

phase, o r b o t h . Examples are networks used to shape the

fr e q u e n c y c h a r a c t e r i s t i c of the feedback l o o p of an a m p l i f i e r ,

t o e q u a l i z e the frequency-dependent l o s s i n a t r a n s m i s s i o n

l i n e , or t o s i m u l a t e t r a n s m i s s i o n - l i n e impedances.

F o l l o w i n g a d i s c u s s i o n of some methods which have been

used f o r f i n d i n g r a t i o n a l - f u n c t i o n a p p r o x i m a t i o n s , a new

method w i l l be shown which seems more s u i t a b l e f o r e q u a l i z e r

a p p l i c a t i o n s .

Page 13: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

2. MATHEMATICAL BACKGROUND 7

2-1• N o t a t i o n

For convenience, the independent v a r i a b l e w i l l be

denoted by x i n p l a c e o f tt or . L e t f ( x ) be a s p e c i f i e d

squared-magnitude f u n c t i o n and l e t the r a t i o n a l f u n c t i o n

a p p r o x i m a t i o n t o f ( x ) on the i n t e r v a l x ^ b be g i v e n by n

Yl p i x

p ( x ) = E M = i^J2 . v 7 • • m ± Q(x)

m

0

m Z ^ - x

i = 0

The e r r o r of a p p r o x i m a t i o n w i l l be d e f i n e d by

e.(x) = f ( x ) - F ( x ) .

Si n c e the number of c o e f f i c i e n t s of the r a t i o n a l f u n c t i o n

o c c u r s r a t h e r o f t e n , l e t i t be r e p r e s e n t e d by

n = n + m + 2 . c

When i t i s c o n v e n i e n t t o r e f e r t o the f u l l s e t of numerator and denominator c o e f f i c i e n t s , t h i s p o i n t i n n c ~ d i m e n s i o n a l space w i l l be c a l l e d R»

I n o r d e r t o p r o v i d e an e x a c t mathematical statement of

the problem t o be s o l v e d , i t i s n e c e s s a r y t o d e f i n e a p r e c i s e

Page 14: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

. 8 measure of the c l o s e n e s s of the a p p r o x i m a t i o n to the d e s i r e d

f u n c t i o n . T h i s w i l l be done i n terms of the norm of the

" e r r o r " f u n c t i o n . A norm i s a r e a l s c a l a r q u a n t i t y d e f i n e d

on a f u n c t i o n space. I t i s denoted by | and must s a t i s f y

the f o l l o w i n g t h r e e c o n d i t i o n s :

! • I gU) I ^ ° J A N D 1 gU) || = 0 i f and o n l y i f g(x) = 0

2, |j c g ( x ) || = |c | * |g(x) I f o r any r e a l c o n s t a n t c 3. I h ( x ) + g(x) I ^ ||g(x) I + || h ( x ) I

f o r a l l g (x) and h ( x ) i n the f u n c t i o n space. The two l i n e a r

spaces and t h e i r norms which w i l l be of i n t e r e s t a r e :

1. The Space L p (v C l)

The space lP c o n s i s t s of the t o t a l i t y of a l l

f u n c t i o n s measurable i n the i n t e r v a l (a,b) whose

a b s o l u t e v a l u e t o the p - t h power i s i n t e g r a b l e i n

the sense of Lebesgue. The- norm i n L P , c a l l e d the

l e a s t p ^ t h norm, i s d e f i n e d by

|g(t)|~ d t J b P > 1 !/P

2. The Space C

The space C c o n s i s t s of the t o t a l i t y of a l l con­

t i n u o u s f u n c t i o n s of the p o i n t s P of a bounded,

c l o s e d s e t S i n E u c l i d e a n space of any d i m e n s i o n a l i t y ,

The norm i n C, c a l l e d the Chebyshev norm, i s d e f i n e d

by g || = max | g(P)

P € S

Page 15: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

e (R*) || C ||e(R)

9 S e t t i n g g = e ( x ) = f ( x ) - F ( x ) , the norm of the e r r o r

f u n c t i o n , | e || , i s a s u i t a b l e measure of the c l o s e n e s s of

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

2-2» Statement of the A p p r o x i m a t i o n Problem

G i v e n f ( x ) , a r e a l - v a l u e d c o n t i n u o u s f u n c t i o n d e f i n e d

on a s e t S, f i n d a r a t i o n a l f u n c t i o n F(R ,x) w i t h R EP» a

bounded s e t , such t h a t

M f o r a l l R e P

Such a r a t i o n a l f u n c t i o n w i l l be c a l l e d a b e s t a p p r o x i m a t i o n ,

2-3, E x i s t e n c e and Uniqueness

F o r the Chebyshev norm, e x i s t e n c e and uniqueness f o r

the case of a p p r o x i m a t i o n of a c o n t i n u o u s f u n c t i o n over a s e t

c o n t a i n i n g no i s o l a t e d p o i n t s are a s s u r e d by the f o l l o w i n g

theorem a t t r i b u t e d t o Chebyshev:

Theorem: Gi v e n a c l o s e d ( f i n i t e or i n f i n i t e ) i n t e r v a l [a , V ]

on the real-number a x i s and a r e a l , s i n g l e - v a l u e d

f u n c t i o n , f ( x ) , c o n t i n u o u s i n [ a , b ] , t h e r e t h e n e x i s t s

a t l e a s t one f u n c t i o n

P (x) F (x) = TTV-T n,mv Q m ( x )

such t h a t IUI = max | f ( x ) - F (x) |

xrc[a,bj '

f o r t h i s f u n c t i o n i s not g r e a t e r than f o r any o t h e r

r a t i o n a l f u n c t i o n of the same o r d e r . Moreover, t h i s

f u n c t i o n F n j m ( x ) = F n m ( x ) l s u n i q u e , i f we c o n s i d e r

Page 16: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

two r a t i o n a l f u n c t i o n s as i d e n t i c a l when th e y ^

c o i n c i d e a f t e r b e i n g reduced t o t h e i r l o w e s t

terms. The f u n c t i o n e t a k e s on i t s maximum

a b s o l u t e v a l u e f o r a t l e a s t n c - min(jj,,D) p o i n t s

i n [ a f b j , where n-^ and m-a) are the h i g h e s t

powers of x w i t h non-zero c o e f f i c i e n t s o c c u r r i n g # #• i n P (x) and Q (x) r e s p e c t i v e l y a f t e r r e d u c t i o n n ** m r u

to l o w e s t terms. P r o o f s of the above may be found

i n books of A c h i e s e r [ l ] or R i c e \j-5^\ •

F o r the l e a s t p - t h norm, the p r o o f of e x i s t e n c e of

a b e s t r a t i o n a l f u n c t i o n a p p r o x i m a t i o n to a f u n c t i o n on an

i n t e r v a l can be e s t a b l i s h e d as f o l l o w s . I n [V],-pp, 1 0 - 1 1 ,

i t i s shown t h a t the l e a s t p - t h norm s a t i s f i e s the C o n d i t i o n

E of Young f o r a p o l y n o m i a l a p p r o x i m a t i n g f u n c t i o n . Thus

Theorem 1-4 of R i c e \l5~[ proves e x i s t e n c e f o r the p o l y n o m i a l

c a s e . Then from an argument p a r a l l e l to t h a t of Lemma 3 - 5

of R i c e [ 1 5 ] , the r e s u l t can be extended to r a t i o n a l

f u n c t i o n s . Moreover, A c h i e s e r £l^ proves t h a t the b e s t a p p r o x i ­

m a t i o n i s unique f o r any s t r i c t l y n o r m a l i z e d f u n c t i o n space

which e s t a b l i s h e s uniqueness f o r iP i f 1 <^ p <̂ oo*

F o r p o l y n o m i a l a p p r o x i m a t i n g f u n c t i o n s a well-known

theorem of P o l y a and J a c k s o n (see [ l 5 ~ ] , p. 8 ) shows t h a t the

sequence of b e s t l e a s t p - t h a p p r o x i m a t i o n s as p —*-00 con­

t a i n s a convergent subsequence. F u r t h e r the l i m i t of t h i s

subsequence i s a b e s t a p p r o x i m a t i o n u s i n g the Chebyshev norm.

U n f o r t u n a t e l y , t h e r e i s l i t t l e p u b l i s h e d m a t e r i a l c o n c e r n i n g

r a t i o n a l f u n c t i o n a p p r o x i m a t i o n u s i n g the l e a s t p - t h norm,

p a r t i c u l a r l y the p o s s i b i l i t y of convergence f o r i n c r e a s i n g p.

Page 17: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

However, e x i s t e n c e cannot be a s s u r e d i n the case of

a r a t i o n a l - f u n c t i o n a p p r o x i m a t i o n to a f u n c t i o n d e f i n e d on a

d i s c r e t e s e t f o r e i t h e r the Chebyshev or the l e a s t p - t h norm.

Moreover, even i f the r a t i o n a l f u n c t i o n does e x i s t , i t may have

p o l e s w i t h i n the range of approximation,. Examples of these

c o n d i t i o n s may be found i n | 3I ,

Page 18: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

3. METHODS OF RATIONAL APPROXIMATION

The statement of the problem i m m e d i a t e l y suggests one

type of approach to a s o l u t i o n ; namely, to c o n s i d e r || e |j as a

f u n c t i o n of i t s c o e f f i c i e n t s * R, and to attempt to f i n d a

minimum of t h i s f u n c t i o n * For the l e a s t p - t h norm, the space

d e f i n e d by

INI ^ k 5 e * < k < ~

i s s t r i c t l y convex, a f a c t w hich g r e a t l y s i m p l i f i e s the t a s k

o f f i n d i n g such a minimum* F o r the Chebyshev norm, the space

as d e f i n e d above i s a p o l y t o p e ; thus the methods of convex

programming can be used t o o b t a i n a b e s t a p p r o x i m a t i o n . M i n i ­

m i z a t i o n of a f u n c t i o n can be a c c o m p l i s h e d on a d i g i t a l

computer by t e s t i n g the v a l u e of t h i s f u n c t i o n on a d i s c r e t e

s e t of p o i n t s to p r o v i d e i n f o r m a t i o n about the l o c a t i o n of a

g l o b a l minimum or l o c a l minima. These procedures may be

c l a s s i f i e d by t h e i r method of c h o o s i n g t e s t p o i n t s as e i t h e r

s e q u e n t i a l or n o n s e q u e n t i a l *

Most s e q u e n t i a l methods f o r convex f u n c t i o n s use the

g r a d i e n t of the f u n c t i o n as an i n d i c a t i o n of the d i r e c t i o n t o ­te)

ward the minimum. L e t r be the v a l u e s of the c o e f f i c i e n t s (k)

e x c l u d i n g q Q , e v a l u a t e d a t the k - t h i t e r a t i o n , h be the s t e p (k) s i z e of the k - t h s t e p and D be an n -1 d i m e n s i o n a l d i r e c t i o n r c v e c t o r p r o v i d i n g the d i r e c t i o n of the change of R. The g r a d i e n t

methods t o be d e s c r i b e d a l l use the i t e r a t i v e e q u a t i o n

r ( k + l ) = r ( k ) + h ( k ) # D ( k )

Page 19: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

13 but d i f f e r i n t h e i r c h o i s e of h and D.

( i ) U n i v a r i a t e or R e l a x a t i o n Method

As the name su g g e s t s , o n l y one c o e f f i c i e n t i s

changed d u r i n g each s t e p ; hence D

v e c t o r of the form

0 0

00 i s a column

D 00 • t h 3 row

0 1 0 *

0

The i n d e x j i d e n t i f y i n g the c o e f f i c i e n t to be 3 f

changed a t each s t e p i s the one f o r which —— or d f

f =

2 < a 2 f 2 ^ i s the l a r g e s t i n magnitude, where

The s t e p s i z e i s

OO r ( k ) <52f 5 r . 2

0

( i i ) S t e e p e s t Descent, Newton's and Optimum G r a d i e n t

Methods

These methods change a l l the independent (k)

v a r i a b l e s a t each i t e r a t i o n . D ' can be w r i t t e n

i n the form

•>(K) —LB-1! A 0 0] where B i s a p o s i t i v e - d e f i n i t e w e i g h t i n g m a t r i x and

Page 20: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

14

00 <? ri .00 ,00

d f ' c3 rn -1 ,00

F o r the Method of S t e e p e s t Descent, B i s the u n i t

m a t r i x of o r d e r n - 1 . Newton's Method uses the c

H e s s i a n m a t r i x f o r B. I t i s d e f i n e d by

b. *2t

The s t e p s i z e may be chosen i n a number of ways.

One of these i s to s a t i s f y the i n e q u a l i t y

e || ( k + 1 ' < ||e||( k' f o r each s t e p . Another i s t o (k)

choose h so t h a t the new p o i n t i s a t the i n t e r - ? s e c t i o n of the c o - o r d i n a t e axes and the tangent

(k) hyperplane t o the f u n c t i o n a t R , From a n a l y t i c

(k) geometry, the v a l u e of h v ' t o a c h i e v e t h i s can be

c a l c u l a t e d from the f o r m u l a

,00 GO

( B - 1 A ^ ) t . ( B - 1 A< k>)

The s t e p s i z e f o r the optimum g r a d i e n t method i s

chosen t o mi n i m i z e || e || (k+l) a i o n g -th e l i n e B-^" A ^ k ^ ,

An a p p r o x i m a t i o n i s u s u a l l y used f o r t h i s s t e p s i z e

[5J s i n c e i t s c a l c u l a t i o n i s o f t e n l e n g t h y .

An example of a n o n s e q u e n t i a l method of m i n i m i z i n g a

f u n c t i o n i s the method of d i r e c t l y t e s t i n g - t h e v a l u e of the

f u n c t i o n a t ev e r y p o i n t o f an n - d i m e n s i o n a l g r i d . The l o c a t i o n

of the minimum i s t a k e n t o be the p o i n t f o r which the s m a l l e s t

Page 21: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

15 v a l u e of the f u n c t i o n i s observed.

U s i n g the p u r e l y random method, a c e r t a i n number of t e s t

p o i n t s are chosen from a volume c o n t a i n i n g the minimum, w i t h

t h e i r l o c a t i o n s determined by an ( n c ~ l ) - d i m e n s i o n a l p r o b a b i l i t y -

d e n s i t y f u n c t i o n . The s m a l l e s t v a l u e a c h i e v e d i n t h i s sample

i s c o n s i d e r e d to be a t the l o c a t i o n of the minimum. I f S i s

the c o n f i d e n c e l e v e l t h a t a p o i n t of the random d i s t r i b u t i o n

f a l l s w i t h i n a hypercube of s i d e d^ and the s e a r c h volume i s

a hypercube of s i d e then d e f i n e

n -1 a = °

The number of p o i n t s , p, which s h o u l d be t e s t e d to ensure the

minimum found to be w i t h i n d^ of the p o s i t i o n of the t r u e

minimum w i t h c o n f i d e n c e l e v e l S, assuming a u n i f o r m d e n s i t y

f u n c t i o n , i s

_ log (1 - S) p - l o g tl - a)

More complex methods have been proposed which reduce the c a l c u l a t i o n

time by s t a r t i n g the s e a r c h on a coarse g r i d over a l a r g e

volume (or randomly w i t h i n t h i s volume), t h e n s y s t e m a t i c a l l y

reduce the volume of the s e a r c h . Such methods attempt to

combine the b e s t f e a t u r e s of s e q u e n t i a l and n o n s e q u e n t i a l

methods. The amount of c a l c u l a t i o n r e q u i r e d u s i n g n o n s e q u e n t i a l

methods i n c r e a s e s e x p o n e n t i a l l y w i t h the number of independent

v a r i a b l e s and the p r e c i s i o n of l o c a t i o n of the minimum* I n

r e t u r n f o r t h i s i n c r e a s e of c a l c u l a t i o n t i m e , the f u n c t i o n t o be

m i n i m i z e d by these methods i s not r e q u i r e d to be d i f f e r e n t i a b l e

or even c o n t i n u o u s throughout the volume.

Page 22: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

16 F o r the Chebyshev norm, the above methods cannot be used

s i n c e the r e q u i r e d d e r i v a t i v e s are not a v a i l a b l e . I n s t e a d , one

of the a l g o r i t h m s based on convex programming may be used,

1, The f i r s t a l g o r i t h m t o be d e s c r i b e d was proposed

by Loeb, To s t a r t t h i s i t e r a t i v e p r o c e d u r e , choose

an a r b i t r a r y r a t i o n a l f u n c t i o n F ( R ^ } , x ) ; then a t

the k - t h s t e p s e l e c t c o e f f i c i e n t s R

mize

(k) which m i n i -

max x e [ a , b ]

Q TkZIT (x) f ( x ) Q ( k ) ( x ) - P ( k ) ( x )

The t r i v i a l s o l u t i o n , R = 0, i s a v o i d e d by f i x i n g

one c o e f f i c i e n t ,

2. A s i m i l a r a l g o r i t h m d e s c r i b e d by Cheney and Loeb £4]

d i f f e r s o n l y i n t h a t the f u n c t i o n t o be m i n i m i z e d i s

under the r e s t r i c t i o n t h a t R (k)| I 1 < 1 ^ V

3. The t h i r d method of t h i s type was proposed by Loeb

[133 and i n a s l i g h t l y m o d i f i e d form by G o l d s t e i n £7])

C o n s i d e r the system of i n e q u a l i t i e s

P ( x ) - ( f ( x ) + M)Q(x) < 0 a l l x € [a,b] - P ( x ) + ( f ( x ) - M)Q(x) < 0 > I'(M)

R = 1

T h i s system i s i n c o n s i s t e n t i f M ^ M , where M i s

the v a l u e of M a s s o c i a t e d w i t h the b e s t a p p r o x i m a t i o n .

Choose b (0) m so t h a t z : (0) x 1 4 0, x e [ a , b ] ;

Page 23: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

= 0; H* 0) = f ( x ) ; and a,± = 0, i = 0, 1, ... f n.

At the k - t h s t e p

M ( k ) = L ( k - D + H ( k - 1 ) 2

I f the system I ' ( M ^ ) ) i s i n c o n s i s t e n t , t h e n = M^^, „(k) r r ( k - l ) , „(k) D ( k - l ) y A i i , . H v ' = H ' and R v ' - R v . I f the system i s

(k) c o n s i s t e n t * t h e n choose R t o s a t i s f y i t ;

I > > = L ( k - X > and H<k> =M ( k>.

Th i s a l g o r i t h m p r o v i d e s upper and lower bounds f o r

the e r r o r of the a p p r o x i m a t i o n and these converge

m o n o t o n i c a l l y t o the v a l u e of the b e s t a p p r o x i m a t i o n .

To conclude t h i s s e c t i o n , two d i r e c t approaches t o o b t a i n i n g

a b e s t r a t i o n a l f u n c t i o n a p p r o x i m a t i o n w i l l be p r e s e n t e d .

1. I t e r a t i o n u s i n g the z e r o e s of the e r r o r

T h i s method* developed by Maehly [ l 4 ^ , i s s t a r t e d by

cho o s i n g n c—1 p o i n t s , x^, such t h a t a ^ x i x 2 x , S b. Prom t h i s s e t of p o i n t s , the c o e f f i c i e n t s n —± ^ c of the r a t i o n a l f u n c t i o n which i s equal t o f ( x ) a t

the p o i n t s x^ are found by s o l v i n g the system of l i n e a r

e q u a t i o n s

f ( x A ) * Q(x.) - P ( X i ) = 0 1 < i ̂ n c - l

Next, modify the x^ so t h a t the maxima of | e ( x )

w i l l be more n e a r l y e q u a l . One method of a d j u s t i n g

these z e r o e s i s based upon the assumption t h a t the

maximum d e v i a t i o n between two a d j a c e n t zeroes i s

a p p r o x i m a t e l y p r o p o r t i o n a l t o the d i s t a n c e between

these z e r o e s . Hence, the zeroes s h o u l d be moved

c l o s e r t o the p o i n t s which have the l a r g e s t d e v i a t i o n .

Page 24: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

I t e r a t i o n u s i n g the maxima of the e r r o r

Choose an a r b i t r a r y s e t of n c i n i t i a l p o i n t s f o r the

extrema of the e r r o r curve such t h a t a ^ x ^ <^ x 2 <̂ • •

x , <Tb* and a v a l u e of E ^ ^ f o r the d e v i a t i o n a t n -1 \ ' c these p o i n t s * An example of an a l g o r i t h m of t h i s t y p

i s Bemes Second A l g o r i t h m . A t the k - t h s t e p , attempt (k)

t o f i n d a r a t i o n a l f u n c t i o n which d e v i a t e s by E from f ( x ) w i t h a l t e r n a t i n g s i g n a t the p o i n t s x^.

(k) The v a l u e o f EK ' f o r each s u c c e e d i n g s t e p i s found

by s o l v i n g an i t e r a t i v e e q u a t i o n . The e r r o r curve

i s t h e n examined f o r the l o c a t i o n of the l a r g e s t

d e v i a t i o n between a d j a c e n t p o i n t s x^. These are

then t a k e n as the s e t of p o i n t s f o r the next s t e p of

the i t e r a t i o n *

Page 25: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

4. A NEW METHOD 19

4-1. D e s c r i p t i o n

The methods which have been d e s c r i b e d f o r o b t a i n i n g

b e s t r a t i o n a l f u n c t i o n a p p r o x i m a t i o n s have s e v e r a l l i m i t a t i o n s

f o r use i n f i l t e r s y n t h e s i s . F i r s t l y , they cannot be used to

approximate a g i v e n phase response s i n c e t h i s i s a t r a n s c e n ­

d e n t a l func-tion of the c o e f f i c i e n t s of F ( s ) . S e c o n d l y , they

cannot be used f o r the s i m u l t a n e o u s a p p r o x i m a t i o n of two or more

f u n c t i o n s , f o r example i n m i n i m i z i n g the e r r o r i n a p p r o x i m a t i o n

f o r g i v e n magnitude and phase r e s p o n s e s . F i n a l l y , t h e r e i s no

c o n v e n i e n t way t o i n t r o d u c e the r e q u i r e m e n t s of p h y s i c a l

r e a l i z a b i l i t y i n t o the a l g o r i t h m .

I n an attempt t o overcome these l i m i t a t i o n s , a new

a l g o r i t h m was developed which s u c c e s s f u l l y c i r c u m v e n t s the

f i r s t two o b j e c t i o n s but s t i l l does not handle the r e a l i z a b i l i t y

c o n s t r a i n t s . A s i m i l a r method d e v i s e d by L i n v i l l [ l l ] has the

advantage of e x p o s i n g r e a l i z a b i l i t y c o n d i t i o n s f o r simple c o n t r o l

but does not l e n d i t s e l f e a s i l y to a u t o m a t i c computation, a s e r i o u s

d i s a d v a n t a g e because the r e q u i r e d c a l c u l a t i o n can e a s i l y be

e x c e s s i v e i f done m a n u a l l y .

A t each s t e p of the procedure a s e t of " c o r r e c t i o n

f u n c t i o n s " , C(ft>), i s o b t a i n e d . The c o r r e c t i o n f u n c t i o n s used

are the l i n e a r terms of a T a y l o r s e r i e s e x p a n s i o n of the

f u n c t i o n of F ( s ) of i n t e r e s t w i t h r e s p e c t t o a l l the c o e f f i c i e n t s

of F ( s ) except the c o n s t a n t term i n the denominator. For

s i m p l i c i t y i n t e s t i n g t h i s on o n l y the squared-magnitude

Page 26: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

f u n c t i o n , the d e r i v a t i v e s used are t a k e n w i t h r e s p e c t t o the

c o e f f i c i e n t s of |F(J»)|2, and P ( s ) i s l a t e r o b t a i n e d by-

f a c t o r i n g . That l i n e a r c o m b i n a t i o n of c o r r e c t i o n s i s found

which m i n i m i z e s the norm of the d i f f e r e n c e between the l i n e a r

c o m b i n a t i o n and the e r r o r f u n c t i o n . To a v o i d s i n g u l a r

e q u a t i o n s , the c o r r e c t i o n f u n c t i o n w i t h r e s p e c t t o the term

b i s not used. The l i n e a r c o m b i n a t i o n i s found most con-o v e n i e n t l y by c o n s i d e r i n g th$ g i v e n f u n c t i o n and the c o r r e c t i o n

f u n c t i o n s a t a d i s c r e t e s e t of f r e q u e n c i e s . I n t h i s case i t

i s n e c e s s a r y t o f i n d a " b e s t " s o l u t i o n t o the overdetermined s e t

of l i n e a r e q u a t i o n s

n - 1 c ^ C

d ( " i ) A j = f - F K ) + P±; l < i < m

= e((o i) + p i

where m i s the number o f d i s c r e t e f r e q u e n c i e s chosen, g i s the

v e c t o r of r e s i d u a l s and A i s the v e c t o r of c o r r e c t i o n s t o the

r a t i o n a l f u n c t i o n c o e f f i c i e n t s . I f the importance of e r r o r s of

a p p r o x i m a t i o n i s g r e a t e r a t some f r e q u e n c i e s than a t o t h e r s ,

a w e i g h t i n g f u n c t i o n , W(<o), may be i n t r o d u c e d so t h a t the system

of e q u a t i o n s becomes

C

V(<o.) \ Ci'oj.jA. = ¥(».).e (».) + 0±; 1 <. i ̂ m P r o o f of the e x i s t e n c e and uniqueness of a " b e s t " s o l u t i o n

of the s e t of e q u a t i o n s which m i n i m i z e s || P || f o r the Chebyshev

norm may be found i n \_8~\ w h i l e i t i s s t a t e d i n [ 9 ] t h a t the

s o l u t i o n a l s o e x i s t s f o r the l e a s t p - t h norm and t h a t the

Page 27: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

s e r i e s of s o l u t i o n s f o r i n c r e a s i n g p have a convergent sub­

sequence whose l i m i t i s the s o l u t i o n f o r the Chebyshev norm.

A f t e r d e t e r m i n i n g the c o r r e c t i o n s A ^, these are t h e n

added t o the o r i g i n a l c o e f f i c i e n t s R^. I f the c o r r e c t i o n s are

s m a l l enough the p r o c e s s i s c o n s i d e r e d to have converged;

o t h e r w i s e the m a t r i c e s [ c j and [E~\ are r e c a l c u l a t e d w i t h the

new c o e f f i c i e n t s , R^, and the p r o c e s s i s r e p e a t e d .

4-2. S o l u t i o n of a S u b s i d i a r y Problem

The method j u s t d e s c r i b e d r e q u i r e s t h a t a " b e s t "

s o l u t i o n t o a s e t of o v e r d e t e r m i n e d l i n e a r e q u a t i o n s be f o u n d ,

t h a t i s , a s e t of v a l u e s , A . , which w i l l m i n imize || P || .

I f the norm i s the l e a s t - s q u a r e s norm, the s o l u t i o n i s e a s i l y

c a l c u l a t e d by an e x p l i c i t f o r m u l a which may be d e r i v e d i n the m̂ ^

f o l l o w i n g way. I f S = >̂ (P^) i s a minimum, then the

p a r t i a l d e r i v a t i v e s a>s 1,2, . , n - 1 ' c

must be z e r o . E v a l u a t i n g these c o n d i t i o n s e x p l i c i t l y g i v e s

the s e t of l i n e a r e q u a t i o n s

m

E i = l

1,2, n - 1 c

w hich may be expanded to

m

T. i = l

n - 1 c

k = l C.(a.)A . 3 i J

0 0 — 1,2,

hence

Page 28: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

m _ n - 1 c

i 4 L k = l

22

= 0 j = l , 2 , . . . f n c - l

m r n - 1 - i m

i = l L k=l J i = l

which may be r e w r i t t e n i n m a t r i x n o t a t i o n as

[ C * . C ] [ A ] - [ c * . . ]

The method which i s used f o r m i n i m i z i n g M = max pV l < i ^ m

i s an exhange p r o c e s s proposed by S t i e f e l [ l 7 J . I t i s based on

a theorem o r i g i n a l l y proved by de l a V a l l e e P o u s s i n which s t a t e s

t h a t the b e s t Chebyshev s o l u t i o n of a system of m l i n e a r

e q u a t i o n s i n n unknowns i s the b e s t s o l u t i o n of the subset of

n+1 of the m e q u a t i o n s which maximizes the d e v i a t i o n ||s|| , The

exchange p r o c e s s i s s t a r t e d by p i c k i n g an a r b i t r a r y subset of

n+1 e q u a t i o n s . A f t e r f i n d i n g the b e s t s o l u t i o n f o r t h i s subset

a s e a r c h i s made f o r a r e s i d u a l 8^ whose magnitude i s g r e a t e r

than the d e v i a t i o n of the s o l u t i o n f o r the s u b s e t . I f none i s

found, the s o l u t i o n to the subset must be the s o l u t i o n f o r the

e n t i r e s e t of m e q u a t i o n s . I f one i s found, the c o r r e s p o n d i n g

e q u a t i o n i s s y s t e m a t i c a l l y s u b s t i t u t e d f o r one of the n+1

e q u a t i o n s of the o r i g i n a l s u b s e t . The s u b s t i t u t i o n i s done so

t h a t a t e v e r y s t e p the d e v i a t i o n of the b e s t s o l u t i o n i n c r e a s e s .

The p r o c e s s t h e n s t a r t s a g a i n w i t h the new s u b s e t . S i n c e the

maximum d e v i a t i o n i s bounded above, and the number of com­

b i n a t i o n s of e q u a t i o n s i s l i m i t e d , the a l g o r i t h m must converge

i n a f i n i t e number of s t e p s t o the b e s t Chebyshev s o l u t i o n .

Page 29: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

23 4-3. The Computer Program

For ease of w r i t i n g , t h i s program has been w r i t t e n i n

a number of independent segments. The m a i n l i n e program, c a l l e d

MASTER, was w r i t t e n to p r o v i d e proper l o g i c a l f l o w and

communication between t h r e e s u b r o u t i n e s which perform f o u r

d i s t i n c t t a s k s . The f i r s t two, p r o v i d i n g an i n i t i a l a p p r o x i ­

m a tion by matching the r a t i o n a l f u n c t i o n to the d e s i r e d f u n c t i o n

a t a r b i t r a r y p o i n t s , and e v a l u a t i n g the response of a g i v e n

r a t i o n a l f u n c t i o n on a p r e d e t e r m i n e d s e t of p o i n t s , are performed

by the s u b r o u t i n e PMEV, S u b r o u t i n e MAIN a d j u s t s the c o e f f i c i e n t s

of the i n i t i a l r a t i o n a l f u n c t i o n so as to reduce the norm ( e i t h e r

l e a s t - s q u a r e s or Chebyshev) of the d e v i a t i o n from the g i v e n

f u n c t i o n w i t h the d e s i r e d w e i g h t i n g . F i n a l l y s u b r o u t i n e POLES

f i n d s the p o s i t i o n s of the p o l e s and zeroes of the r e s u l t i n g

r a t i o n a l f u n c t i o n and d e c i d e s upon i t s p h y s i c a l r e a l i z a b i l i t y .

F i n a l l y the m a i n l i n e program c o n t r o l s some p r i n t i n g so t h a t

the output w i l l appear more r e a d a b l e and i n l o g i c a l o r d e r .

i ) PMEV

The p o i n t matching s e c t i o n of t h i s s u b r o u t i n e i s

d e veloped as f o l l o w s . C a l l i n g the o r d e r of the numerator of the

r a t i o n a l f u n c t i o n NO and the o r d e r of the denominator N l , the

number of f r e e c o e f f i c i e n t s i s N0+N1+1 -- N8 s i n c e one

c o e f f i c i e n t can be assumed to be s p e c i f i e d i n advance f o r s c a l i n g .

T h e r e f o r e i f the r a t i o n a l f u n c t i o n i s equated to the d e s i r e d

f u n c t i o n a t t h i s number of p o i n t s the c o e f f i c i e n t s may be

u n i q u e l y d e t e r m i n e d . The e q u a t i o n s are d e r i v e d as f o l l o w s s

Page 30: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

24 n

2^ _ i^o. T a.<o.2J 3 i m E b . (0.

2j i — X p 2 y « « » ^ . N 8

Now assume b Q = 1 and m u l t i p l y by the denominator of the

r a t i o n a l " f u n c t i o n , w h i c h g i v e s

n m V a.«. 2 j = f ( « . 2 ) . Y b.«. 2 j; i = 1, 2, .. . , p 3=0 3=0

T h i s may be w r i t t e n i n m a t r i x form as

A =

6) (I)

[>]•

2n - f ( u 1

2n - f ( « 2

2n - f ( J p

*

2 ) « 2 . P

ao f(<V' a l •

f (* 22)

a

b i *

b m

f(« 2 ) p

r, / 2 \ 2m . . - f ( « J 1 ) « > 1

2<* 2m p p

The p a r t s o f the program which perform output e d i t i n g

Page 31: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

and e v a l u a t i o n of a g i v e n r a t i o n a l f u n c t i o n are s t r a i g h t f o r w a r d

and s h o u l d r e q u i r e no f u r t h e r e x p l a n a t i o n .

( i i ) MAIN

T h i s s u b r o u t i n e i s used to min i m i z e the norm of the

d e v i a t i o n of the r a t i o n a l f u n c t i o n from the d e s i r e d f u n c t i o n .

The method used has been d e s c r i b e d p r e v i o u s l y . The f i r s t step

i s t o c a l c u l a t e the p a r t i a l d e r i v a t i v e s

F(j«) 2

2

j = 0,1, NO

j = 1 , 2 , N l \ i = 1,2, ,,,, NOPB

where NOPB i s the number of p o i n t s of the d i s c r e t e s e t of

f r e q u e n c i e s . The l i n e a r e q u a t i o n s are formed by e q u a t i n g the

t o t a l d i f f e r e n t i a l s t o the d e v i a t i o n s . B o t h s i d e s of the

e q u a t i o n are the n m u l t i p l i e d by the w e i g h t i n g f a c t o r (a f u n c t i o n

of f r e q u e n c y ) . I n the program the a r r a y of r a t i o n a l f u n c t i o n

c o e f f i c i e n t s i s c a l l e d X and the a r r a y of the c o r r e c t i o n s t o

these c o e f f i c i e n t s i s c a l l e d DX.

The t a s k of f i n d i n g the b e s t s o l u t i o n to the above s e t

of e q u a t i o n s o c c u p i e s most of the remainder of s u b r o u t i n e MAIN.

When the s o l u t i o n has been found, the ' c o r r e c t i o n s are added to

the r a t i o n a l - f u n c t i o n c o e f f i c i e n t s . The new r a t i o n a l f u n c t i o n i s

used t o c a l c u l a t e a new s e t of e q u a t i o n s and the p r o c e s s i s

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

O p t i o n a l l y , i f a r e c o r d of the r a t e of convergence i s d e s i r e d ,

the r a t i o n a l - f u n c t i o n c o e f f i c i e n t s may be p r i n t e d out at, each

s t e p b e f o r e the new p a r t i a l d e r i v a t i v e s are c a l c u l a t e d .

Page 32: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

( i i i ) POLES 26

S u b r o u t i n e POLES c a l c u l a t e s the l o c a t i o n of the p o l e s and

zeroes of a r a t i o n a l f u n c t i o n and s t o r e s these i n the common

ar e a f o r l a t e r p r i n t i n g . The work i s d i v i d e d among t h r e e 2

s u b r o u t i n e s . The f i r s t * c a l l e d ROOT, f i n d s the zeroes i n w of f i r s t the denominator and then the numerator of the r a t i o n a l

2

f u n c t i o n , b o t h of which are p o l y n o m i a l s i n (0 . The second

s u b r o u t i n e , c a l l e d ACCEPT, d e c i d e s i f the zeroes found c o r r e s p o n d

to a p h y s i c a l l y r e a l i z a b l e impedance. T h i s i n f o r m a t i o n i s a l s o

s t o r e d i n the common s t o r a g e a r e a f o r l o g i c a l r o u t i n g i n the

m a i n l i n e program. F i n a l l y , t o o b t a i n the a c t u a l p o l e and zero

l o c a t i o n s , i t i s n e c e s s a r y t o take the square r o o t of the

complex numbers f o u n d . T h i s i s done by s u b r o u t i n e SQROOT* ( i v ) A u x i l i a r y Programs

APPROX c a l c u l a t e s the squared magnitude f u n c t i o n

WEIGHT c a l c u l a t e s the w e i g h t i n g f u n c t i o n

DSOLTN s o l v e s a s e t of l i n e a r e q u a t i o n s i n double p r e c i s i o n

Page 33: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

5» EXAMPLES 27

To t e s t the a l g o r i t h m d e v e l o p e d , i t has been programmed

i n F o r t r a n IV f o r an IBM 7040 computer. The e s s e n t i a l p a r t s

of t h i s program are i n c l u d e d i n the Appendix f o r r e f e r e n c e .

The r e s u l t s of a p p l y i n g t h i s program to t h r e e d i f f e r e n t magni­

tude f u n c t i o n s and f o r v a r y i n g o r d e r s of r a t i o n a l f u n c t i o n

c o m p l e x i t y are shown i n the accompanying diagrams. With the

e x c e p t i o n of the one i l l u s t r a t i n g l e a s t - s q u a r e s f i t , the e r r o r

c u r v e s show the a l t e r n a t i o n of equal p o s i t i v e and n e g a t i v e

d e v i a t i o n s c h a r a c t e r i s t i c of the Chebyshev f i t .

Two f e a t u r e s of the r e s u l t i n g a p p r o x i m a t i o n s u s i n g the

Chebyshev norm are apparent when comparing a p p r o x i m a t i o n s t o

ampl i t u d e f u n c t i o n s w i t h sharp breaks i n response w i t h a p p r o x i ­

mations to smooth f u n c t i o n s . F i r s t l y , f o r the same degree o f

c o m p l e x i t y , the maximum e r r o r of a p p r o x i m a t i o n i s u s u a l l y

g r e a t e r f o r those f u n c t i o n s w i t h abrupt changes of s l o p e t h a n f o r

smooth amp l i t u d e f u n c t i o n s . S e c o n d l y , the r e d u c t i o n of the

e r r o r of a p p r o x i m a t i o n w i t h i n c r e a s i n g o r d e r of c o m p l e x i t y of the

r a t i o n a l f u n c t i o n i s much slowe r i f the f u n c t i o n has abrupt

changes of sl o p e t h a n o t h e r w i s e .

Page 34: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

f(« 2) jF(j«>)| ! 2

R e l a t i v e w e i g h t i n g o f e r r o r

0.0 ^ t o £ 1.0 1

0.8

0.6

0,4

0.2

0.0

f u n c t i o n t o be approximated

| F ( » | 2 = 1.1176470

1.0 + 0. 5010014856s'

|F(j«o)r =

|F(j6>)l

0.97921836 - 1-.3413799© + 0.50357208a 4

1.0 - 1.3669154tt 2+ 0.43 263364654

+ 0.078848972a

0.85236581 1.0 - 1.2856817«2+ 1.8589182co 4- 0.63662153co 6

+ 0.0649470776)'

0.0 0.5 1.0 1.5 2.0

F i g u r e 1. A p p r o x i m a t i o n to I l l u s t r a t e d Response t o CO

Page 35: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

F i g u r e 2» A p p r o x i m a t i o n to G a u s s i a n Response

Page 36: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

.-4

E r r o r i n A p p r o x i m a t i o n to Gaussian Response w i t h minimum percentage e r r o r f o r 0 ^ 0) ̂ 2

F i g u r e 3.

Page 37: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

(|F(j«)! 2 - f(l» 2)} :¥T(« 2) f(« 2) = exp (-o 2)

f VTtto 2)= exp (to 2)

F i g u r e 4. Comparison of Weighted E r r o r i n : A p p r o x i m a t i o n to Gaussian Response

Page 38: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

F i g u r e 5. A p p r o x i m a t i o n t o I l l u s t r a t e d Response

t o

Page 39: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

6. CONCLUSION

The new a l g o r i t h m f o r f i n d i n g " b e s t " r a t i o n a l f u n c t i o n

a p p r o x i m a t i o n s has been t e s t e d on s e v e r a l d i f f e r e n t magnitude

f u n c t i o n s and found t o be e n t i r e l y p r a c t i c a l f o r use on a

computer such as the IBM 7040, t a k i n g about h a l f a minute t o

f i n d a b e s t r a t i o n a l f u n c t i o n of g i v e n degree of c o m p l e x i t y and

t e s t t h i s f o r p h y s i c a l r e a l i z a b i l i t y . Because of d i f f i c u l t y of

programming, the a b i l i t y of the a l g o r i t h m to f i n d b e s t

s i m u l t a n e o u s a p p r o x i m a t i o n s to g i v e n magnitude and phase

responses has not y e t been t e s t e d .

S i n c e t h i s a l g o r i t h m produces a b e s t f i t to a g i v e n

f u n c t i o n on a g i v e n s e t of f r e q u e n c i e s , i t f r e q u e n t l y happens

t h a t the r e s u l t a n t i s not p h y s i c a l l y r e a l i z a b l e . P r o b a b l y the

most i n t e r e s t i n g e x t e n s i o n of t h i s work would be to r e f o r m u l a t e

the r e a l i z a b i l i t y c o n d i t i o n s i n such a form t h a t they c o u l d be

i n t r o d u c e d as c o n s t r a i n t s , a l l o w i n g c a l c u l a t i o n of the b e s t

r e a l i z a b l e a p p r o x i m a t i o n w i t h a r a t i o n a l f u n c t i o n of s p e c i f i e d

degree.

Page 40: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

34

APPENDIX

COPY OP FORTRAN IV COMPUTER PROGRAM FORTRAN SOURCE LIST MASTER

SOURCE STATEMENT C LOAD SUBROUTINES PMEV,MAIN,POLES,ACCEPT,ROOT,SQROOT,APPROX, C WEIGHT.OSOLTN

DOUBLE PRECISION X I lh) ,RR I 30 ) ,R I (30) .RTR (1 SI ,RTIt 1 *>) , 1 WR1,WR2,WA1,WA2,WA3,WA4,WA5 LOGICAL I SHI,ISW2tYES,ERROR,SW2,SW5«SWNUM,SWDEN COMMON N0,N1,UR1,WR2,WA1,WA2,WA3,WA4,WA5,NOPR,ISW1,ISW2,YES,X,RR, 1 RI,RTR,RTI,ERR0R,N3,N4,N5,N6,N7,N8,N9,SWNUM,SWDEN

C NO IS THE ORDER OF THE NUMERATOR, Nl IS THE ORDER OF THE DENOM-C INATOR. WR1 AND WR2 ARE THE ENDS OF THE R ANfiF DF APPROXIMATION, C WA1 AND WA2 ARE THE ENDS OF THE RANGE OF INITIAL POINT MATCHING. C WA3 AND WA4 ARE THE ENDS OF THE RANGE OF EVALUATION OF THE RESULT C AND WA5 IS THE INTERVAL OF THIS EVALUATION. NOPR IS THE NUMBER OF C POINTS FOR BEST FIT. IF ISW1=.TRUE. THEN LEAST SQUARES FIT, ELSE C MINMAX FIT. ISW2=.FALSE. FOR SUPPRESSION OF INTERMEDIATE PRINT. £ I F = . T B t l F . 1 M T T 1 A I PH I S F U A I I I A T F n . IF SWS = . TRUF. THEN C POLES AND FINAL EVALUATION PRINTED. IF SW5 = .FALSE. THESE ARE C PRINTED ONLY FOR A PHYSICALLY REALIZABLE FUNCTION. C EVALUATE FINAL RATIONAL FUNCTION IF SW5=.TRUE. OR YES=.TRUE.

100 START = CLOCMO.) READ!5,1) N0,NI,WR1,WR2,WA1,WA2,WA3,WA4,WA5,N0PR,ISW1,ISW2,SW2,SW5 C.AH SKIP TO I I ) '. : WRITE(6,3)N0,N1,WR1,WR2,WA1,WA2,WA3,WA4,WA5,N0PR,ISW1,ISW2,SW2,SW5 YES=.FALSE.

C N3 IS THE NUMBER OF NUMERATOR COEFFICIENTS JOF RATIONAL FUNCTION. N3=N0+l

C N5 IS THE POSITION OF THE FIRST DENOMINATOR COEFFICIENT N5=N3-n ;

C N6 IS THE POSITION OF THE SECOND DENOMINATOR COEFFICIENT N6=N5+1

C N7 IS THE NUMBER OF DENOMINATOR COEFFICIENTS OF RATIONAL FUNCTION. N7=N1*1 N8=N0+N1 N9=N8»1 ,

C NA IS THE TOTAL NUMBER OF COEFFICIENTS IN THE RATIONAL FUNCTION. N4=N9+1 SWNUM=NO.EQ.O SWDEN=N1.EQ.0

C INITIAL APPROXIMATION BY POINT MATCHING. : CALL PMFV 1.TRIIE..SW?)

IF (ERROR) GO TO 104 C REDUCE NORM OF ERROR.

CALL MAIN IF (ERROR) GO TO 104 IF(X(N3)»XU).LT.O.) GO TO 101 I F i » i M t ) . i T.n. \ r.n Tn m i

C FIND THE LOCATION OF POLES AND ZEROS AND CHECK FOR PHYSICAL C REALIZABILITY. IF THE RATIONAL FUNCTION IS REALIZABLE, YES*.TRUE.

103 CALL POLES GO TO 102

101 IF (SW5) GO TO 103 i n ? «;w?=<;MS.nR.VFS

C EVALUATE FINAL RATIONAL FUNCTION IF SW5=.TRUE. OR YES-.TRUE. CALL PMEV (.FALSE.,SW2)

C OUTPUT REALIZABILITY. DECISION. IF (.NOT.YES) WRITE 16,2)

Page 41: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

35

FORTRAN SOURCE LIST MASTER SOURCE STATEMENT IF (YES) WRITE (6,11) IF (.NOT.SW2) GO TO 104 LsO :

C BEGIN PRINTING POLES AND ZEROS. IF (SWNUM) GO TO 105 WRITE (6,9) WRITE (6,7) L=2«N0 WRITE (6,8) ( R I ( I l . R R I I ) . 1 = 1 ,1 )

105 IF (SWDEN) GO TO 104 WRITE (6,6) WRITE (6,7) M=L+2»N1 L = L*1 WRITE (6,8) (RIII).RR(H,I=I ,H)

104 TOTAL=CLOCK(STARTJ/60. WRITE (6,10) TOTAL

C CHECK FOR MORE INPUT DATA. GO TO 100

1 FORMAT (2I3,7F5.2,14,4L3) 7 F O R M A T ( 4 4 H A T H P T M P F n A N T . F I S NfIT P H V S I f . A I I Y R F A I I 7 A R L F . / / 1 3 FORMAT (80H NO Nl WR1 WR2 WA1 WA2 WA3 WA4 WAS NOP 1R ISW1 ISW2 SW3 SW5//1X,13,I4,7F6.3,I5.4L6//)

6 FORMAT (/39X,5HP0LES) 7 FORMAT ( 18X,5HSIGMA,3*>X,5H0MEGA/) 8 FORMAT (D33.16,040.16) Q F f l P M A T I/*<>ytsn7FRn<;)

10 FORMAT (17H0ELAPSEO TIME WAS,F7.2,8H SECONDS) 11 FORMAT (40H0THE IMPEDANCE IS PHYSICALLY REALIZABLE.//)

END

Page 42: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

36

FORTRAN SOURCE LIST PMEV SOURCE STATEMENT SUBROUTINE PMEV (SW1,SW2) DOUBLE PRECISION X<16),RR<30),RI<30),KTR(15),RT1(15),WR11WR21WAI,

1 WA2.Wft3.WA4.MA5,A(IS,IS),HI151,WSQt 15 1.YI 15).WT(1 ),FIINC(11 . 2 XN, NUM,DENtF,DEViWTDEV LOGICAL I SWl,ISri2tVEStERR0R,SWNUM,SWDEN, SW1,SW2»INDEX COMMON N0,N1,WK1, WR2, WA1, WA2, WA3, WA4, WA5,IMOPR,ISW1,ISW2,YES,X,RR,

1 Rl,RTR,RTI.ERROR,N3,N4,N5,N6,N7,N8,N9,SWNUM,SWDEN C IF SW1=.TRUE. PROGRAM DOES POINT MATCHING, OTHERWISE BYPASSES THIS •C PART OF THE PROGRAM. IF SW2=.TRUE. PRIJGRAH OflFS EVALUATION flF C RATIONAL FUNCTION.

IF (.NOT.SWl) GO TO 200 C THIS SECTION FINDS A RATIONAL FUNCTION WHICH IS EQUAL TO A GIVEN C FUNCTION (APPROX) AT (N0*N1*1> POINTS. EQUATING THE TWO AT THIS C NUMBER OF POINTS AND ASSUMING A VALUE (1.) FOR THE CONSTANT TERM X l.M THE DFMnMT N ATfltt Pftri\/ir»FS A SFT f lF I T NF Aft EQUATIONS WHflSF C SOLUTION GIVES THE DESIRED RATIONAL FUNCTION COEFFICIENTS.

XN = N8 XN=(WA2-WA1)/XN W(l)=WAl WSQ(1)=WA1»*2 DO ISO T = ?,N9 :

W(I)=W(I-1) «• XN 150 WSO(I)=WI1)»»2

CALL APPROX (N9,W,X) WRITE (6,3) (W(I),1=1,N9) DO 152 1=1,N9 A ( i , i) = i . no : IF (SWNUM) GO TO 101 DO 153 J=2,N3

153 A I I . J ) = A(I,J-l)»WSQ(I) 101 IF (SWDEN) GO TO 152

A(I,N5) = -XI I)»WSQ(I) IF (Nl .FO.l I GO TD 15? : : DO 154 J=N6,N9

154 A ( I , J ) = All,J-l)«WSQ(I) 152 CONTINUE

CALL DSOLTN (A,X,N9,15,XN) IF (XN .ECO. ) GO TO 300

X i f TUP n R n p g nr THE nFMOMjMATnR i s r .Rr-ATFa THAN 7 F x n f S H I F T THF C COEFFICIENTS FOUND AND INSERT tTHE ASSUMED VALUE OF I. FOR X(N5).

IF (SWDEN) GO TO 103 I=N4

155 X(I)=X(1-1) 1 = 1-1 I F n . r . F . N M an TO IS5

103 X(N5)=1.D0 C BEGIN EDITING FOR OUTPUT.

200 IF (N0.GT.N1) GO TO 201 LESS=N3 1NDEX=.TRUE.

: GO TO ?0? 201 LESS=N7

INDEX=.FALSE. 202 DO 250 1=1,N7

J=I+N3

Page 43: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

37

FORTRAN SOURCE LIST PMEV SOURCE STATEMENT

250 Y ( I ) = X ( J ) WRITE (6,4) <X< I ) , Y ( I ) , 1 = 1,LESS) LESS=XESS+1 IF (.NOT.INDEX) WRITE (6,6) (X(I),I=LESS,N3) IF (NO.NE.N1.AND.INDEX) WRITE (6,5) (Y(I),I=LESS,N7) IF (.N0T.SW2) RETURN

C BEGIN EVALUATION OF RATIONAL FUNCTION. NOP=(WA4-WA3)/WA5 + 1.D0 WRITE (6.8) , DO 251 1=1,NOP XN=I-1 W(1)=WA3+XN»WA5

C APPROX GIVES DESIRED VALUE IN ORDER TO CALCULATE DEVIATION. CALL APPROX (i.W.FUNCJ CALL WEIGHT ll.W.WT) : XN=W(1)*»2 NUM=X(N3) IF (SWNUM) GO TO 203 DO 252 J=2,N3 K=N3*l-J

252 NUM=NUM»XN+X(K) 203 DEN=Y(N7)

IF (SWDEN) GO TO 204 DO 253 J=2,N7 K=N7*1-J

253 DEN=DEN»XN+Y(K) 204 F^NUM/DFN '. :

DEV=F-FUNC(1) WTDEV=DEV»WT(I)

251 WRITE (6,9) W( I).F,DEV,WTDEV RETURN

300 WRITE (6,10) ERRQR=. TRI.IF. RETURN

3 FORMAT (18X.43HP0INT MATCHING AT THE FOLLOWING FREQUENCIES/ I (D53.16))

4 FORMAT (//14X,22HNUMERAT0R COEFFICIENTS,12X,24HDEN0MINAT0R COEFFIC 1IENTS/(2036.16))

<i F O R M A T - < n 7 7 . 1 * ) : 6 FORMAT (D36.16) 8 FORMAT (/5X,5H0MEGA,14X,8HRESP0NSE,18X,9HDEVI AT I ON,9X, 1 18HWEIGHTED DEVIATION/)

9 FORMAT (IX,F9.3,3D27.161 10 FORMAT (14H0ERR0R IN PMEV)

END :

Page 44: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

FORTRAN SOURCE L I ST MAIN SOURCE STATEMENT

SUBROUTINE MAIN REAL S IGMA(16) DOUBLE PRECIS ION X (16 ) , RR (30 F, R I f 3 0 ) , R T R ( 1 5 ) , R T I ( 1 5 i ) i W R I , W R 2 , WAI,

1 K A 2 , W A 3 , W A 4 , W A 5 , A ( 2 0 1 , 1 5 ) , B ( 2 0 1 ) , O X ( 1 6 ) , W ( 2 4 0 ) , F U N C ( 2 4 0 ) , 2 W T ( 2 4 0 ) , R ( 1 6 , 1 6 ) , W R 3 , N U M , D E N , 0 , B I G , S I G , F I , F 2 , S M , B I , D E T , E ( 2 0 1 ) 3 » L A M B D A ( 1 6 ) , M U ( 1 6 )

DOUBLE PRECIS ION DABS INTEGER IA (16 ) LOGICAL ISW1, ISW2,YES,ERROR, JY,SWNUM,SWDEN COMMON N0 ,N1 ,WR1 ,WR2 ,WA1 ,wA2 ,WA3 ,WA4 ,WA5 .N0PR , I SW l , I SW2 ,YES ,X ,RR ,

1 R I , R T R . R T I . E R R O R , N 3 , N 4 , N 5 , N 6 , N 7 , N 8 , N 9 , S W N U M , S W D E N E *ROR=.FALSE .

C IRUN1 COUNTS THE NUMBER OF LINEAR EQUATION ADJUSTMENTS IRUN1=0 NNP=N4 WR3=N0PR-l WR3=(WA2-WR1)/WR3 N1=N1-1 N4=N4-1 W(1)=WR1 PU 450 I=2,N0PR

450 W( I )=W( I-D+WR3 C GENERATE SQUARED MAGNITUDE FUNCTION AND WEIGHTING FUNCTION

CALL APPRDX (NOPR,W,FUNC) CALL WEIGHT (iMOPR , W , W T )

600 IRUN1=IRUNI+1 Z 1RUN2 COUNTS THE! NUMBER -OF EXCHANGES REQUIRED TO FIND CHEBYSHEV C SULUTION TO OVEROETERMINEO EQUATIONS.

1RUN2=0 NUP=0

C BEGIN ITERATIVE PROCEDURE. DO LOOP 650 CALCULATES THE EQUIVALENT C OVERJETERMI Nb0 LINEAR I ZED EQUATIONS

DO 650 1=1,NOPR C IF WtlGHTING IS ZERO DO NOT FORM THE ASSOCIATED TR IV IAL EQUATION.

IF (WT( I ) .EQ.O.) GO TO 650 C RESTURt N l AND N4 TO THEIR ORIGINAL VALUES FOR THIS SECT ION .

N1=N1+1 N4=N4+ 1 • uOP=NOP+l WSO=W( I ) « *2 NUK, = X(N3) IF (SWNUM) GO TO 601 DO 651 J=1 ,N0 K=N3-J

— 6 5 1 NUMNUM»wSQ+X(K) : 601 DEN=X(N4)

IF (SWDEN) GO TO 602 DO 652 J = l . N l K=N4-J

652 OEN=OEN»WSQ+X(K) ' Z THE MATRIX A ( I , J ) CONSISTS OF THE PARTIAL DERIVATIVES OF THE C RATIONAL FUNCTION AT FREQUENCY W(I) WITH RESPECT TO THE C COEFF IC I ENTS X t J ) ALL MULTIPL IED BY WEIGHT WT(I) EXCEPT THAT C OER IVAT IVcS WITH RESPECT TO X(N5) ARE OMITTED

602 A (NOP ,1 )=WT( I ) /DEN

Page 45: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

SOURCE STATEMENT FORTRAN SOURCE LIST MAIN

N l = N l - l N4=N4-l IF I SWNUM) GO TO 603 '. DO 653 J=2,N3

653 A(NOP,J)=A(NOP,J-1)»WSQ 603 IT (SWDEN) GO TO 604

A(N0P,N5)=-WTII)»WSQ*NUM/DEN»»2 IF (Nl.EQ.O) GO TO 604 00 654 J=N6,N4

654 A(NOP,J)=A(NOP,J-l)«WSQ C THE MATRIX B ( I ) CONSISTS OF THE DIFFERENCE BETWEEN THE DESIRED C RESPONSE AND THE RESPONSE OF THE CURRENT RATIONAL FUNCTION C AT OMEGA = W(I) ALL MULTIPLIED BY THE WEIGHTING FUNCTION.

604 B(NOP)=WT(I)»(FUNC(I)-NUM/DEN) 650 CONTINUE '.

C ON THE FIRST PASS, FIND LEAST SQUARES F I T TO EQUATIONS AND C CORRESPONDING LARGEST RESIDUALS. ON SUBSEQUENT PASSES, USE THE C VALUES OF IA( ) FROM THE PREVIOUS PASS.

IF ( IRUN1.NE. L A N D . .NOT. ISW1) GO TO 200 IF (N0P.GT.N4) GO TO 606 nn ASS t = l f N 4

D X ( I ) = B ( I ) DO 655 J=1,N4

655 R ( I , J ) = A ( I ,J) CALL OSOLTN (R,DX,N4,16.0ET) IF (DET .EQ. 0.) GO TO 820 Gfl TO BOO

606 DO 656 I-1,N4 DO 656 J-1.N4 IF ( I . G T . J ) GO TO 607 R ( I , J ) = 0 . 00 657 K=1,N0P H I I T .11 =R I I T .1 I • A I K f I 1 « A I K f .11

GO TO 656 607 R ( I , J ) = R ( J , I ) 656 CONTINUE

DO 658 1=1,N4 D X ( I ) = 0 . 00 fttfl .1*1 ,N(1P

658 OX(I) 3DX(I)+A(J,I)»B(J) CALL DSOLTN (R,OX,N4,16,DET) IF (DET.EQ.O.) GO TO 820 IF (.N0T.ISW1) GO TO 608 IRUN2=-1 GO Tf) BOO

608 DO 659 1*1,NOP E ( I )«—B( I ) 00 660 J=1,N4

660 E( I)=E( I)«-A(I.J)»DX(J) IF (I.GT.NNP) GO TO 610 IF ( i - r . T . i > r.n m f,ciQ : I A ( 1 ) = 1 GO TO 659

609 K=I-1 GO TO 611

Page 46: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

40

FORTRAN SOURCE L I ST MAIN SOURCE STATEMENT

610 K=NNP 611 00 661 L=1,K

LD=IA (L ) IF ( 0 A B S ( E ( L D ) ) . L E . D A B S ( E ( I ) ) ) GO TO 612

661 CONTINUE IF ( I . L E . N N P ) IA ( I )= I

659 CONTINUE GO TO 200

612 M=K+1 IF I I . G T . N N P ) M=M-1

613 IA(M)=IA(M-1) M=M-1 IF ( M . G T . L ) GO TO 613 IA ( L )= I GO TO 659

C SECTION CALCULATES bEST F I T TO NNP GIVEN EQUATIONS. LOCATION OF C EQUATIONS IS GIVEN BY THE VECTOR IA( ) , SIGN OF DEVIATIONS GIVEN C BY VECTOR SIGMA( ) , THE COEFF IC I ENTS OF THE LINEAR COMBINATION OF C ROWS ARE LAMBDA( ) . THIS SECTION FOLLOWS R I C E , PG . 1 7 4 . C F IRST CALCULATE REFERENCE DEV IAT ION , D.

200 ID=IA(NNP) DO 250 J=1 ,N4 JD=IA ( J ) L A M B D A ! J ) = - A ( I D . J ) DO 250 1=1,N4

250 R( It J )=A( JO , I ) CALL OSOLTN ( R , L A M B D A , N 4 , 1 6 , D £ T ) :

IF ( D E T . E Q . O . ) GO TO 820 LAMBDA(NNP)=1.

201 IRUN2=IRUN2*l NUM=0. PEN=0. DO 251 1=1,NNP S I G M A ( I ) = 1 . IF ( L A M B D A ! I ) . L T . O . ) S IGMA( I )=-1 . ID=IA ( I ) NUM=NUM-B(ID)*LAMBDA(I)

251 DEN=OEN»DABS( LAMBDA! I ) ) , D=NUM/DEN

C USING THIS VALUE FOR THE REFERENCE DEV IAT ION , CALCULATE THE C CORRESPONDING SOLUTION, OX( ) , GIVING THE BEST CHEBYSHEV F I T TO C THE NNP EQUATIONS OF IA( ) .

00 252 1=1,N4 ID=IA ( I )

—Dxin=B( iD»*s tGMA ( n»D : — DO 252 J=1 ,N4

252 R ( I , J ) = A ( I D , J ) CALL DSOLTN ( R , D X , N 4 , 1 6 , D E T ) IF ( D E T . E Q . O . » GO TO 820

C CALCULATE VECTOR E = A . DX - B AND FIND VALUE AND POSIT ION OF ~£ ELEMENT OF LARGEST MAGNITUDE.

B IG=0. DO 253 1=1,NOP E U ) = - 8 ( I ) DO 254 J=1 ,N4

Page 47: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

FORTRAN SOURCE LIST MAIN SOURCE STATEMENT

254 E U ) = E ( I ) * A ( I , J ) « D X ( J ) IF (DABS(EU) ).LE.BIG) GO TO 253 B1G=DABS( E( I > ) MAX = I

253 CONTINUE C CHECK IF THIS LARGEST ELEMENT IS CONTAINED IN THE SET IA( ).

DO 255 1=1,NNP IF (MAX.EQ.IAII)) GO TO 800

— 2 5 5 CONTINUE C IF THE LARGEST ELEMENT IS NOT IN THE SUBSET IA( ), THIS MAY HAVE C OCCURRED BECAUSE OF ROUNDING ERRORS. THEREFORE, IF DEVIATION IS C CLOSE TO D, THEN ACCEPT THIS AS A SOLUTION.

IF (BIG.LE.1.000001D0«D) GO TO 800 C IF NOT A SOLUTION, IT WILL BE NECESSARY TO TRY A NEW SET OF X- F Q I I A T y n N S , T A I 1 . T U T S I S W I N F B Y F X f . H A N f c I hlCl O N F IIP T H P O R I I N A l

C SET BY THE LARGEST CURRENT OEVIATION. FOLLOWING RICE, EQUATION C (6-8.12) OF PG. 174. FIND COEFFICIENTS MU( ).

SIG=1. IF (E(MAX).LT.O.) SIG=-1. ID-.I A( NNP) DO 256 .J=),N4 J D - I A ( J ) MU<J)=-SIG»A(MAX,J)-A( ID,J) DO 256 1=1,N4

256 R( I , J ) = A ( J D , I ) CALL OSOLTN (R,MU,N4,16,DET) IF (DET.EQ.O. ) GO. TD 820 MUINNP)=1. F1=-SIG»B(MAX) F2=0. DO 257 1=1,NNP ID=IA(I) F1=F1-MU(I)»RIin) :

257 F2=F2+LAMBDA!I)*B(ID) C NOW EVALUATE THE ABSOLUTE VALUE OF THE DEVIATIONS THAT WOULD C RESULT FOR THE NEXT STEP WITH EACH POSSIBLE EXCHANGE AND SELECT C THE LARGEST OF THESE.

BIG=0. ; DO 258 J=I.NNP :

SM=MU(J)/LAMBDA!J) DEN=1. DO 259 1=1,NNP IF (I.NE.J) DEN=DEN+DABS!MU!I)-LAMBDA11 I*SM)

259 CONTINUE R I = n A R S M F l ^ F 7 « S M ) / 0 F N ) IF (BI.LE.BIG) GO TO 258 BIG=BI MIN=J

258 CONTINUE IA!MIN)=MAX

C T N OBTATM I A M R r > A < > F O R nTHFR T H A N T H F FIRST STFP IT IS NOT C NECESSARY TO SOLVE A SET OF LINEAR EQUATIONS, BUT INSTEAD USE C EQUATION !6-8.15> WITH J = MIN.

NUM=MU(MIN)/LAMBDA(MIN) DO 260 1=1,NNP

Page 48: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

42

FORTRAN SOURCE LIST MAIN SOURCE STATEMENT

IF(I .NE.MIN) LAMBDA( I )=LAMBDA( I )»LAMBDA(MIN) • (MU( I ) /LAMBDA! I ) -NUM) 260 CONTINUE

LAMBDA ("MIN)=SIG«LAMBDA( MIN) C NORMALIZE COEFFICIENTS LAMBDA! ) TO PREVENT FLOATING POINT TRAPS.

BIG=0. DO 261 1=1,NNP Bl=0A8S(LAMBDA( I) )

261 IF (BI .GT.BIG) BIG = BJ DO 262 1=1,NNP

262 LAMBDA(I)=LAMBDA(I)/BIG GO TO 201

C OUTPUT SECTION. 800 J=:<I4+1 850 OX!J)=DX(J-1)

J = J _ 1

IF (J.GE..M6) GO TO 850 N4 = '>I4+1 DX(N5)=0. JY=.FAL S t .

C CHECK IF THE ABSOLUTE VALUES OF THE CORRECTIONS TO THE RATIONAL X" FUNCTION COEFFICIENTS ARE CONVERGING. IF NOT, REVISE THE SET OF C LINEAR EQUATIONS.

DO 851 1=1,N4 IF (DABS(DX( I ) ) ,GT. I .D-6*DABS(X( I ) ) ) JY=.TRUE.

851 X ( I ) - X(I)+DX(I) . IF ( .NOT. JY) GO TO 802

IF (.NOT.ISW2) GO TO 801 WRITE (6,1) IRUN2 WRITE (6,5) <X(I),I=1,N3) WRITE (6,2) WRITE (6,5) ( X ( I ) , I=N5 »N4)

801 N4=N4-1- GO TO 600'

302 N1=N1+1 D = 1 0 0 . » 0 WRITE (to,3) D.IRUN1 IF <ISW2) WRITE <7,4) NO,Nl , (X( I ) , I=1 ,N4) RETURN . •

820 ERROR=.TRUE. RETURN

1 FORMAT (23H-NUMERATOR COEFFICIENTS,8X,8HIRUN2 = » I 4 / ) 2 FORMAT (25H-OENOMINATOR COEFFICIENTS/) 3 FORMAT (22H0WEIGHTED DEVIATION IS ,F8 .3 / / / 20X ,14HFINAL SOLUTION,

1 16X,8HIRUiMl = ,14) 4 FORMAT (2137(6012) > 5 FORMAT (D24.lt>)

FND

Page 49: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

43

FORTRAN SOURCE L IST POLES

SOURCE STATEMENT

SUBROUTINE POLES DOUBLE PRECIS ION X ( 1 6 ) , R R ( 3 0 ) , R l ( 3 0 ) , R T R ( 1 5 ) , R T I ( 1 5 ) . W R 1 , W R 2 , M A I ,

1 HA2 .Wft3.HAA. MAS, A( 1 6 ) , B ( 1 6 ) . S M 6 ) LOGICAL ISWl, ISW2,YES,ERROR,SWNUM,SWOEN COMMON N0,N1,WR1,WR2,WA1,WA2 * W A 3 * W A 4 , W A 5 » N O P R , I S W 1 , I S W 2 , Y E S , X , R R ,

1 R I , R T R , R T I , E R R O R , N 3 , N 4 , N 5 , N 6 , N 7 , N 8 , N 9 , S W N U M , S W D E N IDD=2«N1

0 PLACE COEFF IC I ENTS IN TEMPORARY LOCAT ION. oo 150 1=1.NA :

150 S ( I ) = X ( I ) C PLACE NUMERATOR COEFF IC I ENTS IN REVERSE ORDER IN A( ) .

DO 151 1=1,N3 J=N5-I

151 A ( J ) * S ( I ) X PLACE DENOMINATOR P.nFFFIC IFNTS TN RFVFRSF DROFR IN RI ) .

DO 152 1=1,N7 J=N7+l-I K=I+N3

152 B ( J )=S (K ) IF (SWDEN) GO TO 100

_C SUBROUTINE ROOT FINOS ZEROS OF OMFGA SQUARED OF DENOMINATOR C POLYNOMIAL.

CALL ROOT (N1 ,B ) C CHECK PHYSICAL R E A L I Z A B I L I T Y .

CALL ACCEPT ( N l ) C FIND ZEROS OF OMEGA BY TAKING COMPLEX SQUARE ROOT OF ZEROS ABOVE.

CALL SQROOT ( N l ) C CHECK IF NECESSARY TO FIND ZEROS OF RATIONAL FUNCTION.

100 IF (SWNUM) GO TO 101 C IF SO , SHIFT POLE POSITIONS TO ALLOW ROOM FOR ZERO POS IT IONS .

J = I D D + 2 » N 0 I = IDD

102 RR1 J )=RR ( I ) R I ( J ) = R I ( I ) J = J-1 1 = 1-1 IF ( I . G T . O ) GO TO 102

C BEGIN ZERO LOCATION AND REAL I ZAB I L I TY TEST OF NUMERATOR. CALL ROOT (NO, A) '. CALL ACCEPT (NO) CALL SQROOT (NO)

101 RETURN END

Page 50: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

44

FORTRAN SOURCt L I ST ROOT SOURCE STATEMENT

SUBROUTINE ROOT (M,B) DOUBLE PRECIS ION D (16 ) , RR t 3 0 ) , R I ( 3 0 ) , R T R ( 1 5 ) , R T I 1 1 5 ) ,WR1,WR2,WA1,

1 WA2,WA3,WA4,WA5, A( 16 , 2 > , B ( 1 6 ) , CI 16 ) , 0 (16) , TOL ( 2) , R . S , R 1 , S 1 , T , 2 X , Z , D R , D S

DOUBLE PRECIS ION DABS ,DSQRT LOGICAL ISWl , ISW2,YES,ERROR,SWNUM,SWDEN, IM, I NO COMMON N0 ,N l ,WR l ,WR2 iWA I ,WA2 .WA31WA4 ,WA5 ,NOPR , I SW l , I SW2 ,YES ,D ,RR ,

, 1 RI ,R T R , R T I , E R R O R , N 3 , N 4 , N 5 , N 6 , N 7 , N 8 , N ' 9 , SWNUM, SWDEN C M IS THE ORDER OF THE POLYNOMIAL, N IS THE NUMBER OF TERMS IN C THE REDUCED POLYNOMIAL.

N = M+1 DO 150 I = 1,N A I 1,1)=B( I )

150 At I ,2 )=b ( I) C T O L ( l ) IS THE TOLERANCE USED WITH THE REDUCED POLYNOMIAL AND C TOL ( ? ) FOR FULL POLYNOMIAL.

T 0 L ( l ) = l . D - 6 T 0 L ( 2 ) = 1 . D - 1 2 I =0

C TLi FIND ROOTS APPROXIMATELY IN ORDER OF INCREASING MOOULUS, START C WITH IN IT IAL APPROXIMATION FOR F IRST ROOT OF ZERO.

R l = 0 . S1=0. IM= .FALSE .

C THE VALUE OF IN DETERMINES IF THE ROOT IS TO BE EXTRACTED FROM C THE ORIGINAL POLYNOMIAL OR THE REDUCED POLYNOMIAL, IN = 1 FOR

Z REDUCED POLYNOMIAL. IM = . T R U E . WHEN THE LAST ROOTS ARE BEING C FOUND.

10U IF ( N . L T . 4 ) GU TO 112 C BEGIN 8AIRST0W*S METHOD WHICH FINDS QUADRATIC FACTORS, X » » 2 + R»X C + S, OF A POLYNOMIAL.

IN=1 115 KM)

I 'MO=IN.EO.l C B tG IN SYNTHETIC DIV IS ION OF TRIAL FACTOR INTO POLYNOMIAL. C BEGIN SYNTHETIC DIV IS ION OF TRIAL FACTOR INTO POLYNOMIAL.

R = R1 S=S1 Q ( i ) = A I l , I N ) C (1 )=0<1)

101 Q ( 2 J = A ( 2 , I N ) - R » Q ( 1 ) C ( 2 ) = Q ( 2 ) - R « C ( I )

C RftNGfc OF LOOP DEPENDS UPON VALUE OF IN . II- UND> NQ=N

— IF ( . N O T . I NO) N0=M+1 DC 151 1=3,NQ Q( I ) = A ( I » I N ) - R * U ( I - 1 ) - S » Q ( 1 - 2 )

151 C ( I ) = Q ( I ) - R » C ( 1 - 1 ) - S * C ( 1 - 2 ) C BEGIN CALCULATION OF CORRECTIONS TO ROOT POS IT ION.

X = R » C ( N Q - 2 ) + S*C(NQ-3) Z = C ( N 0 - 2 ) « « 2 + X * C ( N Q - 3 )

C CHECK FOR ZERO DENOMINATOR. IF I Z . E Q . O . ) GO TO 107 D R = ( C ( N Q - 2 ) » Q ( N Q - 1 ) - C ( N Q - 3 ) » Q ( N Q ) ) / Z D S = ( X » Q ( N Q - l ) + C ( N Q - 2 ) » Q ( N Q ) ) / Z

Page 51: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

SOURCE STATEMENT FORTRAN SOURCE LIST ROOT

IF (R . N E . O . ) GO TO 102 IF ( S . E Q . O . ) GO TO 103

C CHECK FOR WILD CORRECTION. 102 IF(((R+0R)«»2+(S+0S)»«2I.GT.9.»(R»»2+S»»2I) GO TO 106 103 R=R+OR

S=S+DS 104 K = K+1

C TEST FOR EXCESS IVE ITERAT IONS . IF (K .GE.50) GO TO 105

C TEST FOR CONVERGENCE. IF ( PABS IDR ) .GT .DABS tR *TOLI IN ) ) ) GO TO 101 IF .<DABS(DS).GT.DABS<S*TULUN>> ) GO TO 101

C USE THE QUADRATIC FACTOR JUST FOUND AS THE IN IT IAL APPROXIMATION C FOR THE NEXT QUADRAT IC FACTOR.

105 R1=R S1 = S IF ( .NOT . IND ) GO.TO 109 IN = 2 GO TO 115

106 R=3.D0»R S=3.00»S GO TO 104

107 R=l.D-5 S=l.D-5 GO TO 104

C NOW THAT A QUADRATIC FACTOR HAS BEEN REMOVED FROM THE POLYNOMIAL X ITS ROOTS ARE FOUND AND ADDED TO THE OUTPUT ARRAY.

109 R=-.5U0*R S=R**2»S IF (S .GT.O.) GO TO 110 S=DSQRT(-S) DO 152 1 = 1,2 L = L + 1 RTRIL1=R RT I(L)=S

152 S=-S GO TO 111

110 S = 0S(JRT(S) L = L + 1 RTR(L)=R+S RTKL).=0. L=L + 1 RTRU)=R-S RT1(L)=0.

I l l IF <IM) RETURN C RtOUCE N AND SET UP NEW REDUCED POLYNOMIAL.

N = N - 2 DO 153 1 = 1.N

153 A «I,1 ) = Q (I) GO TO 100

C APPROACHING END OF JOB. POLYNOMIAL HAS BEEN REDUCED TO DEGREE C TWO OR L E S S .

112 IF IN .LT.2) RETURN IF- IN.GT.2) GO TO 113

C LINEAR FACTOR TERMINATION.

Page 52: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

46

FORTRAN SOURCE L I ST ROOT

SOURCE STATEMENT

L = L + l R T R I L ) = - A ( 2 , 1 ) / A < 1 , 1 ) R T I ( L ) = Q . RETURN

C QUADRATIC FACTOR TERMINATION. 113 IM=.TRUE .

R = A ( 2 , 1 ) / A ( l , l ) S = A ( 3 , 1 ) / A ( 1 , I ) IF I M . L T . 3 ) GO TO 109 IN=2 GO TO 101 END

Page 53: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

47

FORTRAN SOURCt L IST ACCEPT SOURCE STATEMENT

SUBROUTINE ACCEPT (Ml ) C SUBROUTINE ACCEPT TESTS IF THE POLES AND ZEROS OF THE BEST £ RATIONAL FUNCTION CORRESPOND TO. A P H V i i r A ^ I v R F A I I / A R I F F l l N i r T T H M .

DOUBLE PRECIS ION X 1 1 6 ) , R R ( 3 0 ) , R I ( 3 0 ) , R T R ( 1 5 ) , R T I ( 1 5 > , W R 1 , W R 2 , W A 1 , 1 WA2 ,WA3,WA4,WA5,F I LE l15 )

DOUBLE PRECIS ION DABS LOGICAL ISWl, ISW2,YES,ERROR,SWNUM,SWDEN COMMON N0,N1,WR1,WR2,WA1,WA2,WA3,WA4,WA5,N0PR, I SW1, I SW2,YES .X .RR ,

1 R I , RTR, RT I , ERROR,N3 ,N4 ,N5 ,N6 ,N7 ,NB ,N9 ,SWNUM,SWDEN INTEGER FILMRK FILMRK=0 Y E S = . T R U E . DO 150 1=1,Ml

C IF THE IMAGINARY PART OF THE ROOT OF OMEGA SQUARED IS NOT ZERO X (A TOLFRANf.F IIF I . F- l f i IS ftl I flWFD FOR RflUNO O F F ) , THFN THFRF WILL C BE A SET OF FOUR ROOTS OF OMEGA IN QUADRANTAL SYMMETRY. HENCE C SUCH A ROOT IS REAL IZABLE WITHOUT FURTHER EXAMINATION.

IF ( D A B S ( R T I ( I ) J . G E . l . D - 1 0 ) GO TO 150 C IF THE REAL PART IS LESS THAN ZERO, THERE WILL BE A PAIR OF ROOTS C ON THE SIGMA AX I S , HENCE NO FURTHER EXAMINATION NEEDED.

IF (RTR ( I ) . L . T . O . ) GO TO 150 : IF ( F I L M R K . E Q . O ) GO TO 103

C ALL OTHER ROOTS WILL BE IN PAIRS ON THE OMEGA AX I S . THESE WILL BE C REAL IZABLE ONLY IF THEY ARE OF EVEN ORDER. F I L E l ) CONTAINS A C STACK OF SUCH UNPAIRED ROOTS. FILMRK COUNTS THE NUMBER CURRENTLY C STORED IN THE STACK.

X F X A M T N F T H F F I I F T P S F F TF T H E M F H RDrtT I S SUFF1C. I F iMTI V f.l D S F C TO A PREVIOUS MEMBER.

DO 151 J= l , F I LMRK IF ( D A B S ( R T R ( I ) - F I L E ( J ) ) . L E . 1 . D - 5 * D A B S ( F I L E ( J ) ) ) CO TO 104

151 CONTINUE GO TO 103

X T H F NFV J pnnT MATr.HFn a P R F v r n n s M F M R F H . THF PRFVItlUS MEMBER IS C REMOVED FROM THE STACK AND THE STACK COUNTER DECREMENTED.

104 FILMRK=FILMRK-1 102 IF ( J . EQ . F I LMRK+1 ) GO TO 150

F I L E l J ) = F I L E ( J + l ) J = J*1 GO TO 102

103 FILMRK=FILMRK+1 F I L E ( F I LMRK )=RTR ( I )

150 CONTINUE C IF THE F I L E CONTENT IS NOT ZERO, THE RATIONAL FUNCTION IS NOT C PHYS ICALLY R E A L I Z A B L E .

f F I F r i M R K . i M F . n l V F S = . F A I S F . RETURN END

Page 54: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

REFERENCES 48

1. A c h i e s e r , N. I , Theory of A p p r o x i m a t i o n . Trans. G. J . Hyman. New Y o r k , Ungar, [1956.3

2. Cheney, E. ¥. and G o l d s t e i n , A* A. "Newton's Method f o r Convex Programming and Tchebycheff A p p r o x i m a t i o n * " Numerische Mathematik^ v o l . 1 (1959), pp. 253-268,

3. Cheney, E. ¥, and Loeb^ H. L. "On R a t i o n a l Chebyshev A p p r o x i m a t i o n , " Numerische Mathematik, v o l . 4 (1962), pp. 124-127.

4. Cheney, E. ¥, and Sout h a r d , T. H„ "A Survey of Methods f o r R a t i o n a l A p p r o x i m a t i o n w i t h P a r t i c u l a r Reference to a new method based on a f o r m u l a of Darboux," S.I,A.M. Review, v o l , 5 (1963), pp. 219-231.

5. C r o c k e t t , J . B„ and C h e r n o f f , H. " G r a d i e n t Methods o f M a x i m i z a t i o n , " P a c i f i c J . Math., v o l . 5 (1955), pp. 33-50,

6. C u r r y , H„ B. "The Method of S t e e p e s t Descent f o r Non— L i n e a r M i n i m i z a t i o n Problems." Quar. A p p l * Math.» v o l . 2 (1944)* pp, 258-260.

7» G o l d s t e i n , A. A, "On the S t a b i l i t y of R a t i o n a l Approx-i m a t i o n e " Numerische Mathematik, v o l . 5 (1963), pp. 431-438,

8. G o l d s t e i n , A* A, and Cheney, ¥. ¥. "A F i n i t e A l g o r i t h m f o r the S o l u t i o n of C o n s i s t e n t L i n e a r E q u a t i o n s and I n e q u a l i t i e s and f o r Tchebycheff A p p r o x i m a t i o n of I n c o n s i s t e n t L i n e a r E q u a t i o n s . " P a c i f i c J . Math,, v o l . 8 (1958), pp. 415-427.

9. G o l d s t e i n , A. A., H e r r e s h o f f ., J . B. , and L e v i n e , N. "On the " b e s t " and " l e a s t q - t h " a p p r o x i m a t i o n of an ove r d e t e r m i n e d system of l i n e a r e q u a t i o n s . " J . Assoc. Comput. Mach., v o l . 4 (1957), pp. 341-347*

10. G u i l l e m i n , E. A* S y n t h e s i s of P a s s i v e Networks. New York, ¥iley,[1957.]

11. L i n v i l l , J . G, "The A p p r o x i m a t i o n w i t h R a t i o n a l F u n c t i o n s of P r e s c r i b e d Magnitude and Phase C h a r a c t e r i s t i c s * " P r o c . I.R.E, »• v o l * 40 (1952), pp. 711-721.

12. Loeb, H. L, On R a t i o n a l F r a c t i o n A p p r o x i m a t i o n s a t D i s c r e t e P o i n t s * San Diego, C a l i f . , C o n v a i r A s t r o n a u t i c s ^ 1957* (Mat h e m a t i c a l P r e - P r i n t S e r i e s No. 9 ) .

Page 55: ON NUMERICAL APPROXIMATION IN SYNTHESIS FOR … H3.pdf · on numerical approximation in synthesis for prescribed amplitude response by walter james henri harris b.a.sc,, u.b.c., 1962

13. Loeb, H. L. " A l g o r i t h m s f o r Chebyshev A p p r o x i m a t i o n u s i n g the r a t i o of L i n e a r Forms." J o u r . Soc. I n d u s t , Math., v o l . 8 (1960), pp. 458-465.

14. Maehly, H. J . R a t i o n a l A p p r o x i m a t i o n fteg.^BJi^^ F u n c t i o n s . Yorktown H e i g h t s , New York",' i.B.M. Corp., 1959. (Research Report RC-86).

15. R i c e , J . R. The A p p r o x i m a t i o n of F u n c t i o n s , v o l . 1. Reading, Mass., Addison-Wesley,[1964.]

16. Spang, E, A. "A Review of M i n i m i z a t i o n Techniques f o r N o n l i n e a r F u n c t i o n s . " S.I.A.M. Review, v o l . 4 (1962), pp. 343-365.

17. S t i e f e l , E. L. "Uber D i s k r e t e und l i n e a r e T c h e b y c h e f f -Approximationen»" Numerische Mathematik, v o l . 1 (1959), pp. 1-24.

49