FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE...

153
FIXED POINT DIGITAL FILTER SIMULATION. Item Type text; Thesis-Reproduction (electronic) Authors Aziz, Irfan. Publisher The University of Arizona. Rights Copyright © is held by the author. Digital access to this material is made possible by the University Libraries, University of Arizona. Further transmission, reproduction or presentation (such as public display or performance) of protected items is prohibited except with permission of the author. Download date 20/08/2021 04:22:51 Link to Item http://hdl.handle.net/10150/275441

Transcript of FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE...

Page 1: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

FIXED POINT DIGITAL FILTER SIMULATION.

Item Type text; Thesis-Reproduction (electronic)

Authors Aziz, Irfan.

Publisher The University of Arizona.

Rights Copyright © is held by the author. Digital access to this materialis made possible by the University Libraries, University of Arizona.Further transmission, reproduction or presentation (such aspublic display or performance) of protected items is prohibitedexcept with permission of the author.

Download date 20/08/2021 04:22:51

Link to Item http://hdl.handle.net/10150/275441

Page 2: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

INFORMATION TO USERS

This reproduction was made from a copy of a document sent to us for microfilming. While the most advanced technology has been used to photograph and reproduce this document, the quality of the reproduction is heavily dependent upon the quality of the material submitted.

The following explanation of techniques is provided to help clarify markings or notations which may appear on this reproduction.

1. The sign or "target" for pages apparently lacking from the document photographed is "Missing Page(s)". If it was possible to obtain the missing page(s) or section, they are spliced into the film along with adjacent pages. This may have necessitated cutting through an image and duplicating adjacent pages to assure complete continuity.

2. When an image on the film is obliterated with a round black mark, it is an indication of either blurred copy because of movement during exposure, duplicate copy, or copyrighted materials that should not have been filmed. For blurred pages, a good image of the page can be found in the adjacent frame. If copyrighted materials were deleted, a target note will appear listing the pages in the adjacent frame.

3. When a map, drawing or chart, etc., is part of the material being photographed, a definite method of "sectioning" the material has been followed. It is customary to begin filming at the upper left hand corner of a large sheet and to continue from left to right in equal sections with small overlaps. If necessary, sectioning is continued again-beginning below the first row and continuing on until complete.

4. For illustrations that cannot be satisfactorily reproduced by xerographic means, photographic prints can be purchased at additional cost and inserted into your xerographic copy. These prints are available upon request from the Dissertations Customer Services Department.

5. Some pages in any document may have indistinct print. In all cases the best available copy has been filmed.

University; Microfilms

International 300 N. Zeeb Road Ann Arbor, Ml 48106

Page 3: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb
Page 4: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

1319205

AZIZ, IRFAN

FIXED POINT DIGITAL FILTER SIMULATION.

THE UNIVERSITY OF ARIZONA, M.A., 1982

University Microfilms

International 300 N. Zeeb Road, Ann Arbor, MI 48106

Page 5: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb
Page 6: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

PLEASE NOTE:

In all cases this material has been filmed in the best possible way from the available copy. Problems encountered with this document have been identified here with a check mark V

1. Glossy photographs or pages

2. Colored illustrations, paper or print

3. Photographs with dark background

4. Illustrations are poor copy

5. Pages with black marks, not original copy

6. Print shows through as there is text on both sides of page

7. Indistinct, broken or small print on several pages if

8. Print exceeds margin requirements

9. Tightly bound copy with print lost in spine

10. Computer printout pages with indistinct print /

11. Page(s) lacking when material received, and not available from school or author.

12. Page(s)

13. Two pages numbered

seem to be missing in numbering only as text follows.

I . Text follows.

14. Curling and wrinkled pages

15. Other

University Microfilms

International

Page 7: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb
Page 8: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

FIXED POINT DIGITAL FILTER

SIMULATION

by

Irfan Aziz

A Thesis Submitted to the Faculty of the

DEPARTMENT OF ELECTRICAL ENGINEERING

In Partial Fulfillment of the Requirements For the Degree of

MASTER OF SCIENCE

In the Graduate College

THE UNIVERSITY OF ARIZONA

1 9 8 2

Page 9: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

STATEMENT BY AUTHOR

This thesis has been submitted in partial fulfill­ment of requirements for an advanced degree at The University of Arizona and is deposited in the University Library to be made available to borrowers under rules of the Library.

Brief quotations from this thesis are allowable without special permission, provided that accurate acknowl­edgment of source is made. Requests for permission for extended quotation from or reproduction of this manuscript in whole or in part may be granted by the head of the major department or the Dean of the Graduate College when in his judgment the proposed use of the material is in the inter­ests of scholarship. In all other instances, however, permission must be obtained from the author.

SIGNED:

APPROVAL BY THESIS DIRECTOR

This thesis has been approved on the date shown below:

J. V. WAIT Professor of Electrical Engineering

Page 10: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

ACKNOWLEDGMENTS

I wish to acknowledge the help of Dr. John V. Wait,

my advisor, whose insight, encouragement, guidance and many

valuable comments made this investigation possible. I am

also grateful to Dr. L. C. Schooley and Dr. M. K. Sundareshan

for their valuable comments and useful suggestions.

Throughout my academic career my parents have been

a source of strength and unending support. To them I owe

the most.

iii

Page 11: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

TABLE OF CONTENTS

Page

LIST OF ILLUSTRATIONS vi

LIST OF TABLES viii

ABSTRACT ix

CHAPTER

1. INTRODUCTION 1

2. DETAILS ON STRUCTURES IMPLEMENTED 4

Finite Word-Length Considerations 4 The Digital Filter Transfer Function ... 6 Implementation Considerations 6 Structures Implemented 7 Cascade Form 10 Parallel Form 12 Normal Form 14

3. SIMULATION SOFTWARE 20

Parameter Evaluation 20 Cascade (Direct-II) Form 21 Parallel Form 22 Normal Form 25 Filter Implementation 26

Function SHADD 27 Function SMULT 2 7 Implementing the Delay 28

The Register Overflow Problem 32

4. TEST EXAMPLES 38

Summary and Conclusions 88

APPENDIX A: CARD DECK SETUP FOR A TYPICAL RUN ON THE CDC CYBER 175 90

APPENDIX B: SIMULATION SOFTWARE LISTING 95

iv

Page 12: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

V

TABLE OF CONTENTS — Continued

Page

REFERENCES 130

Page 13: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

LIST OF ILLUSTRATIONS

Figure Page

2.1 Three structures implemented 9

2.2 Second-order Cascade realization 11

2.3 Second-order Parallel realization 13

2.4 Parallel connection of second-order 13

2.5 Second-order Normal realization 15

3.1 Symbolic representation of an adder and a multiplier 28

3.2 Simulating a tandem connection of two delays 29

3.3 First-order section 30

3.4 Second-order section in Cascade form based on (3.11) 33

3.5 Second-order section in Cascade form with additional adders to prevent overflow 34

4.1 The second-order, 1.0 dB equal-ripple magnitude low-pass digital filter function (4.2) is subjected to a step input of magnitude 0.5 for a Cascade form 40

4.2 A section of the Cascade form 46

4.3 Response and Error function plots for simulations of the digital filter function (4.2); a Cascade form is used .... 47

4.4 Response and Error function plots for simulations of the digital filter function (4.2); Parallel form is used .... 52

vi

Page 14: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

vii

LIST OF ILLUSTRATIONS — Continued

Figure Page

4.5 Response and Error function plots for simulations of the digital filter function (4.2); a Normal form is used 58

4.6 The sixth-order, low-pass filter function (4.6) is simulated using the Cascade, Parallel, and Normal forms and driven by a step input u(n) =0.5 67

4.7 The second-order, band-pass digital filter function (4.8) is simulated using the Normal, Parallel, and Cascade forms and driven respectively by a sinusoidal input u(n) = 0.5 sin(n), a random broad-band input, and a step input, u(n) =0.5 81

Page 15: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

LIST OF TABLES

Table Page

3.1 Table with maximum allowable values for coefficients in a second-order section

, for the three structures 36

4.1 A comparison of the three structures based upon the maximum percentage relative error, |e(n)max|/ for the low-pass filter of 4.2 65

4.2 A comparison of the three structures based upon the maximum percentage relative error, le(n)maxl' f°r

sixth-order low-pass filter function 4.6 79

4.3 A comparison of the three structures based upon the maximum percentage relative error, |e(n)max|, for the band-pass filter of 4.5 87

viii

Page 16: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

ABSTRACT

Linear digital filtering systems, when implemented

in hardware or on a micro-computer, must use a short word-

length, typically 8-16 bits. Before implementing the

filter, simulation of its behavior on a general purpose

computer can provide insight into the effects of finite

word-length.

Using FORTRAN-based fixed-point simulation tech­

niques, this thesis explores the effects of finite word-

length on the time response of three recursive filter

structures.

ix

Page 17: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

CHAPTER 1

INTRODUCTION

The cost reductions and speed improvements achieved

in the digital signal processing of discrete-time (sampled-

data) signals have been given a great impetus through the

availability of MSI and VLSI integrated-circuit technology.

Indeed, conventional continuous-time (analog) signal proces­

sing or filtering systems have become less advantageous,

since digital systems feature potentially lower costs,

higher accuracy and stability, and often comparable speed.

Of the methods and techniques used in digital signal

processing, linear digital filtering is one of the most

important. High-speed digital filters almost invariably

utilize fixed-point digital (usually two's complement)

operations, and it is desirable to use the shortest word-

length (number of bits) to reduce the complexity of the

required digital filter.

Currently, there is considerable interest in using

available micro-processors, for special-purpose digital

filter design. Commercial micro-processors usually have a

limited set of choices of word lengths, normally multiples

of 4 bits. Obviously, if the digital filter designer can use

1

Page 18: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

2

8 or 12 bits instead of, say, 16 bits, he has reduced cost

and complexity.

The input and output of a digital filter are number

sequences, i.e., the input is x(t) = x(nT) and the output is

y(t) = y(nT), where T is a constant sampling time interval,

i.e., t = nT, n an integer. In implementing a digital

filter on a digital computer, the input-output relation may

be represented by a computational algorithm:

M N y (nT) = T avx(nT-kT) - Y bvy(nT-kT) (1.1)

k=0 k=l

The algorithm for implementing the filter is then

defined by a structure or network consisting of an inter­

connection of such basic operational elements as delays,

adders and multipliers. There exist a number of structures

that will result in the same relationship between the input

x(nT), and the output y(nT). By structures we mean a

choice of state-variables implying a particular circuit

topology or choice of operations.

It must be noted that although we tend to say that

the algorithm (1.1) is 'linear,' the signal processing

when using finite word-lengths (typically 8-16 bits) is no

longer linear. It is the effect of these non-linearities

that we wish to study by simulation. "Precise prediction

of these effects is often difficult and perhaps the best

Page 19: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

3

approach is to simulate the filter behavior on a general

purpose computer and study the effect of shortening the

word-length empirically" (Wait, 1970, p. 270).

Using the approach outlined above, this thesis will

use time-domain digital simulations to explore the effect

of finite word-length on filter performance.

Page 20: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

CHAPTER 2

DETAILS ON STRUCTURES IMPLEMENTED

Initially the parameters of a recursive digital

filter designed for one of the many available structures

(Antoniou, 1979, pp. 70-83) are obtained with high accuracy.

In the implementation of digital filters with finite word-

lengths, however, it is necessary to introduce some finite

precision, not only in the coefficients of the filters, but

also in the input samples and in the results of arithmetic

operations within the filters. The effect of using finite

word-length is to introduce error in the filter performance.

"The problem of error behavior in digital filtering opera­

tions is very involved and is essentially a non-linear

problem, because such quantizers as needed in the above

description are obviously non-linear devices" (Cappellini,

, Constantinides and Emiliani, 1978, p. 161).

Finite Word-Length Considerations

Three major sources of error arise from a finite

word-length implementation of digital filters. These are:

1. Coefficient quantization errors.

2. Input quantization errors.

3. Product quantization errors.

4

Page 21: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

5

Most books on digital signal processing provide details of

these types of error (e.g., Oppenheim and Schafer, 1975).

In digital signal processing, as in most numerical

algorithms, it is necessary to deal with signed numbers.

In the implementation of digital filters, fixed-point two's

complement arithmetic is almost, always used (Oppenheim and

Schafer, 1975, p. 406).

Number representations, especially in micro­

processors, use fixed-point arithmetic. Following addition

or multiplication, words are reduced in word-length, usu­

ally by rounding (Antoniou, 1979, pp. 282-283). Rounding

is a non-linear process and its effect on the realization

of a digital filter is to introduce non-linear elements in

its structure (Cappellini et al., 1978, p. 166).

Yet another undesirable effect stemming from the

use of finite register-length arithmetic is known as zero-

input limit-cycle or the "dead-band" effect. It is a

consequence of the non-linear quantizers in the feed-back

loop of the filter (Antoniou, 1979, pp. 296-303).

The obvious way to avoid finite word-length effects is to use longer word-length, i.e., a large number of bits in the hardware system. This, of course, increases the final implementation cost and, in serial arithmetic implementations, may lower the achievable speed. Thus it is important to use only as many bits as are required (Wait, 1970, p. 269).

There are a number of subtle ramifications of the

round-off error problem, which affect the entire filter

Page 22: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

6

design: for example, increasing filter order or decreasing

the sampling time, T, makes the filter behavior more sensi­

tive to round-off errors (Wait, 19 70).

The Digital Filter Transfer Function

The transfer function of a digital filter, H(z),

may be defined as the ratio of the z-transform of the out­

put, Y(z), to the z-transform of the input, X(z), or:

H(z) = x|i} (2,1)

The exact form of H(z) can be readily derived from

the difference equation characterizing the filter, from the

filter network, or from the state-space characterization.

Taking the z-transform of (1.1) we have:

I a z"kT

H(z) = £uj" = JiTr" <2'2)

i + I ^ - k T

k=l

Implementation Considerations

The implementation of a digital filter based upon

the system transfer function, H(z), can assume a variety of

network configurations or structures.

When implementing a digital filter on a general

purpose floating-point computer, e.g., the CDC Cyber 175,

it is usually not necessary to pay close attention to the

Page 23: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

7

type of structure used. This is not true when the same

filter is to be implemented on a mini- or micro-computer,

or using dedicated hardware. Under such circumstances,

factors like speed, cost and word-length become closely

related to the network structure used.

One consideration in the choice between the differ­

ent realizations is computational speed. That is, networks

with the fewest constant multiplers and the fewest delay

operations are often most desirable, since multiplication

is a time-consuming operation, and each delay element in­

volves the use of a fetch-store operation. A reduction in

the number of constant multipliers means a significant

increase in speed. A reduction in the number of delays also

means a reduction in memory requirements. On the other

hand, the effects of finite register length in the case of

micro-computer realizations of digital filters "depend on

the structure and it is sometimes desirable to use a struc­

ture that does not have the minimum number of multipliers

and delays but is less sensitive to finite register length

effects" (Oppenheim and Schafer, 1975, p. 149).

Structures Implemented

In this thesis three structures will be studied.

These are:

1. Cascade Form (Direct-II realization).

Page 24: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

2 .

3.

8

Parallel Form.

Normal Form.

Figure 2.1 depicts a block diagram representation

of each of the three structures for a second-order filter.

The Cascade and Parallel structures are among the

three well-known forms (the third one being the Direct form)

that provide a useful measure of comparison with other

structures. Also, these three forms require fewer multi­

pliers than any of the other forms. The parameters that

define these forms are obtained directly from the system

transfer function, H(z), and the computational complexity

is minimal.

The Normal realization implementation is described by

Mills, Mullis and Roberts (1981, pp. 893-903). Implemented

also as second-order sections connected in tandem (called

Sectional Optimal Structures), it offers a number of advan­

tages over the Cascade form. Normal structures are also

known as "Coupled Resonators" or "Uniform-grid structures"

(Gold and Rader, 1969, p. 37).

Cascade forms typically suffer from such drawbacks

as large round-off noise, finite register length effects,

e.g., overflow oscillations and large coefficient sensiti­

vities. The use of Normal forms greatly reduces such

effects. The price for these improvements in performance

Page 25: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

HO 01

x (n)

-a 11 11

-a, 21 21

a.

y (n)

x (n )

b.

B1

y (n)

A1 CI

D1

x(n)

c.

Figure 2.1

y (n)

Three structures implemented. — (a) Cascade Form; (b) Parallel Form; (c) Normal Form.

Page 26: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

10

is an increased number of multiplications. A tandem connec­

tion of cascade forms requires 3N multiplications, where N

is the filter order? the Normal form, on the other hand, requires

will contain second-order sections as building blocks. Such

sections can be used to implement any rational function by

connecting them in Cascade or in Parallel. The advantage

of using second-order sections lies in the relatively low-

sensitivity of their transfer properties to element varia­

tions. Also they provide flexibility in the choice of compo­

sition of the sub-systems and in the order in which the

sub-systems are cascaded. This ordering of the second-order

sections in the case of Cascade forms becomes important when

finite word-length effects are a consideration.

Cascade Form

The system transfer function (2.2) can be expressed

as a product of second-order functions of the form:

2 (N+l) multiplications (Mills et al., 1981, p. 893)

We assume that a straight-forward design approach

H (z) = HO tt

k'Jl 1 + alkz + a2k*

(2.3)

where [ (^^) ] means the largest integer contained in (^^) .

In writing H(z) in this form the real poles and

real zeros have been combined in pairs. If there is an odd

Page 27: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

11

number of real zeros, one of the coefficients will be

zero. Likewise, if there are an odd number of real poles,

one of the coefficients a2k will be zero.

For N = 2 and 3 . = 1, we have: UK

H(z) = HO i + s^z-1 f e21z'2

1 + + «21z~2 (2.4a)

or

H(z) = HO z + BllZ + g21

^ + °11Z + 0121

(2.4b)

where the gain factor HO represents the gain at a desired

frequency.

The block diagram for a Cascade section, Figure

2.1a, is repeated below as Figure 2.2

x(n)

b

o y(n)

Figure 2.2. Second-Order Cascade Realization.

Page 28: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

The ease of implementation of this structure is

apparent when the second-order system function is compared

with the overall network itself.

Parallel Form

As an alternative to factoring (2.2) as a product

of second-order sections, the system function H(z) can be

expressed as a partial fraction expansion in the form:

B(s) . + ? 4 V'1 2 (2.5, j=i i + eljZ 1 + e2jZ-

where yQ is obtained by dividing the numerator and denomina­

tor if they are of the same order. Note that (2.5) admits

a real pole, by setting = 0 or =

An alternative form of the system function is a

partial-fraction expansion of subfunctions of the form:

«/ \ N A. z + B.. H' (z) = = Y + I -P5 (2.6)

z ° k=l z + z + Dj^

where it has been assumed that the coefficient of the denom­

inator quadratic term is unity. Note that for a first-order

section with real poles, we have the form:

H'< s> " + F+D^ < 2- 7 )

For a second-order section in parallel form:

Page 29: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

13

x(n) • • y(n)

Figure 2.3. Secor\d-Order Parallel Realization.

* y(n) x(n) >

Figure 2.4. Parallel Connection of Second-Order Sections.

Page 30: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

(2.8a)

(2.8b)

which can be implemented as shown in Figure 2.3.

Higher-order system functions can be implemented by

connecting each second-order section in Parallel, as shown

in Figure 2.4.

based on a specific state-space description. It has been

shown (Mills et al., 1981, pp. 895-896; Barnes, 1980, pp.

154-159) that explicit expressions for the Normal structure

parameters in terms of the coefficients of the system trans­

fer function can be obtained. Note that 9,^ scaling (Jackson,

1970, pp. 176-181) is included as an integral part of the

design procedure for dynamic range control.

second-order digital filter is shown in Figure 2.1c, and is

repeated as Figure 2.5 below. The corresponding state equa­

tions are:

Normal Form

The synthesis procedure for Normal structures is

The block-diagram representation of a general

q(nT + T) = A q(nT) + b u(nT)

(2.9)

y(nT) = C q(nT) + d u (nT)

Page 31: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

The state-vector q(nT) is second-order, y(nT) and

u(nT) are scalars.

The matrix A is 2x2

b is 2x1

c is 1x2

d is lxl

a

x(n) y (n )

a

Figure 2.5. Second-Order Normal Realization.

The design of Normal digital filters shall be

restricted to the case where the filter poles are complex-

conjugates given by X = a + j8, X* = a - jB.

A normal filter with realization {A, b, c, d}

satisfies

Page 32: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

T T AA = A A

16

(2.10)

All Normal second-order filters have the state

matrix A given by:

A = a - 3

b a (2.11a)

The scaling defines b and c.

The design process uses the Normal structure (un­

sealed) as an intermediate step.

The unsealed realization is denoted as:

{A , b , c , d} > o _ o _ o

For complex poles Aq is given by (2.11a) . The

vectors b and c may be arbitrarily chosen as: „o ~o

*o = 0

1 cQ = r[cos<|> sin<|)] (2.11b)

Consider the second-order transfer function:

H<z> = -J q2z + ql2 * qo

2 2 z - 2az + a + 3

(2.12)

If (2.12) is expressed as:

H(z) = d + ~2 q2z + ql

z + p][z + p2 (2.13)

Page 33: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

17

explicit expressions for the «.2-scaled Normal realization

(denoted with the subscript N) can be derived (Mills et al.,

1981, p. 895). For a second-order section with a pair of

complex conjugate poles, X^ ^ = <* ± J3» these expressions

take the form:

*n = a -S

3 a = •

sin

cos

(6+ })

<e+ J)

where

CN = r/> [cos(<|) - 6 - it/4) sin(<|> - 6- tt/4) ]

= [Cx C2]

• = 1/6 / 2(1- * l >

6 = 1/2 arg (1 - X )

+ =

r =

tan-^" [ ~ql ~ aq2

2 . qi + "^2,2

^ 3

> (2.14a)

> (2.14b)

More general expressions for higher-order filter

transfer functions, implemented as cascaded second-order

sections are also available (Mills et al., 1981, p. 900).

Normally the gain constant HO is distributed equally between

each of the second-order sections. 6 is a scaling factor.

A value of 5 is assumed here.

Page 34: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

18

From the above, we conclude that the computational

complexity involved in the evaluation of the respective feed­

forward and feed-back coefficients is relatively straight­

forward in the case of the Cascade form, and fairly complex

for the Normal form. The discussion has been restricted

to the case of second-order structures, for by cascading or

paralleling these second-order sections, we can construct

higher-order designs.

The choice of a particular realization depends on

a number of factors, some of them application-oriented.

Considerable interest has been shown by investigators over

the years to arrive at conclusions concerning the advantages

and disadvantages of the various structures. Considerable

literature exists on the subject (Liu, 1971; Crochiere,

1975). There appears to be consensus among the investiga­

tors that although the Cascade form has the least number of

multipliers of any realization, and its implementation is

straight-forward, it is very sensitive to coefficient word-

length, is extremely prone to overflow oscillations, and

has relatively large round-off noise. The Normal form, on o

the other hand, requires more multipliers ((N+l) compared

to 3N, for the Cascade form, where N is the filter order) ,

but has very low sensitivity to coefficient word-length and

the problem of overflows is almost eliminated. Normal forms

Page 35: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

have been found to be most suitable for narrow-band low-

pass or high-pass filters, whereas Cascade forms are better

suited for wide-band filters (Mills et al., 1981, p. 902).

Page 36: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

CHAPTER 3

SIMULATION SOFTWARE

This chapter describes the software developed for

implementing the three digital filter structures described

in the previous chapter.

Starting with the transfer function H(z), the imple­

mentation process can be divided into two parts:

1. Evaluate the appropriate parameters that relate

directly to the structure under consideration (e.g.,

the feed-forward, feed-back and direct feed-through

coefficients).

2. Implement the filter structure using the parameters

evaluated above.

The evaluation of these filter parameters must neces­

sarily precede the implementation of the filter structure

itself; therefore, algorithms that outline their evaluation

will be treated first.

Parameter Evaluation

The software developed in this work assumes the

system transfer function H(z) is in rational form:

20

Page 37: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

21

1 + F. .z + F . z2 + . . . + FM.ZM

h (z) = ho 1 5 (3.1) 1 + e 1«z + e 2.z + . . . + e n.z

where M £ N.

An algorithm describing the evaluation of parameters

for each of the three different structures is outlined below.

The input data to each of the algorithms are the coeffi­

cients of the numerator and denominator polynomials, i.e.,

the Fi and Ej and the gain constant HO in (3.1).

Cascade (Direct-II) Form

The Cascade (Direct-II) form of Figure 2. la presents

the most straight-forward method for obtaining the filter

parameters. Once the numerator and denominator polynomials

have been factored into second-order terms, the feed-forward

and feed-back coefficients of the filter are the coeffi­

cients of these terms (Oppenheim and Schafer, 1975, p. 152).

The algorithm works as follows:

Step 1: Separately find all roots of the numerator and

denominator polynomials.

Step 2: Form second-order sections, for both the numer­

ator and denominator polynomials using the roots

evaluated in Step 1. Two cases arise:

a. A pair of complex conjugate roots: X^ ^ ~

b. A pair of real roots X^ = and X^

Page 38: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

22

In either case a quadratic of the form

2 z + Pz + Q

can be formed where:

2 2 For case (a): P = 2a and Q = a + B (3.2a)

For case (b)s P = + a2 and Q = a^a2 (3.2b)

Any second-order section in the Cascade (Direct-II)

form is expressed as:

z2 + B,z + H (z) = HO —2 (3.3)

z + a^z + a2

where and ^ are t*16 feed-forward coefficients and and

a.2 are the feed-back coefficients. HO is a constant that

scales the input.

Subroutine DSETUP accomplishes the task outlined in

Steps 1 and 2 above. Two supplementary routines, SETUP! and

SETUP2 are used to separately factor the numerator and

denominator polynomials. Subroutine PROOT (Shapiro, 1965)

finds the roots of the polynomials. Listing of these rou­

tines are available in Appendix B.

Parallel Form

To implement the Parallel form of Figure 2.1b, the

transfer function H(z) must be expressed as a partial

fraction:

Page 39: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

23

N Yz v., H (z) = y + I ^ (3.4)

k=l z + Blkz + B2k

The term yq is obtained by dividing the numerator

and denominator polynomials ofH(z) if M = N in (3.1)

(Peled and Liu, 1974, p. 456).

In (3.4), the numerator terms Yq^ and y-^ are the

feed-forward coefficients, and B2k are the feed-back

coefficients.

The algorithm used is:

Step 1: If the order of the numerator and denominator

is the same (i.e., M = N), divide them out, to

obtain:

o M 1 G, + G 0 . z + G- , . z + . . . G JJ-Z

_ , _1 2 3 M H (z) = Y + 2 N

E1 + E 2 ' Z + E3*Z + * * * + EN+1Z

H(z) = yq + Hx(z) (3.5)

Step 1: Make a partial-fraction expansion of H^z).

Two cases arise:

a. A pair of complex-conjugate roots of the denom­

inator polynomial (X^ 2 = 8 i with a pair

of conjugate residues (R^ 2 = x i •

One such second-order factor would be:

H ( Z ) = N 11 ( Z )

= Az + B 11 D i ;L(Z) z 2 + 2OZ + ( a 2 + p 2 j

(3.6a)

Page 40: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

24

where

A = 2X and B = -2ax - 23Y (3.6b)

b. A pair of real roots of the denominator poly­

nomial (X^ = a^, X2 = 02) with real distinct

residues (R^ = X^, R2 = X2). A second-order

factor would be:

hi2(z> = 1 1z 12 z + (a1 + a2)z +

(3.7a)

where

A = X2 + X2 and B = a2X1 + (3.7b)

Comparing one section of (3.4) with either (3.6) or

(3.7), a direct correspondence between the coefficients is

clear. *

Subroutine PSETUP accomplishes the task of forming

the filter parameters. Subroutine PFEXSD (Huelsman, 1972,

pp. 602-604) is used for making the partial-fraction expan­

sion. Root-finding.routines ROOT (Huelsman, 1972, pp. 870-

871) and PROOT (Shapiro, 1965) are also used. A listing of

these routines is available in Appendix B.

Page 41: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Normal Form

The Normal form, Figure 2.1c, is restricted to the

case of complex-conjugate pole-pairs, with quadratic numer­

ator terms. A general second-order section in Normal form

would have a transfer function:

2 q2z + q z + q

H (z) = —5 (3.8) z - 2az + a +0

where a and B are the real and imaginary parts of the com­

plex conjugate pole-pair (Mills et al., 1981).

This procedure assumes a system transfer function

H(z) is available as a product of second-order sections.

The algorithm for evaluating the parameters is:

Step 1: Find the roots of the numerator and denominator

polynomials.

Step 2: Form quadratic terms of the form shown in (3.8).

Step 3: Divide the numerator and denominator polynomials

of each second-order section to obtain:

q2z + qx H(z) = d + (3.9)

z + pxz + p2

Step 4: Form the coefficients that define the structure,

as contained in the state-space description, A^,

b„ and cM in (2.14). ~N ~N

Page 42: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Subroutine NSETUP accomplishes the task of forming

the parameters in this package. It uses routine PROOT to

find the roots of the numerator and denominator polynomials,

and thus to find the filter parameters. A listing of this

routine is available in Appendix B.

Filter Implementation

Once the filter parameters have been evaluated, the

next step is to implement the appropriate filter structure.

The basic arithmetic operations involved in the

implementation of digital filters are addition, multiplica­

tion, and delay. These operations, therefore, form the

basic building blocks for implementing filter structures.

Explicit routines developed by Dr. J. V. Wait (TAD

Users Manual, in preparation) for simulating fixed-point

arithmetic were used in the simulations. These routines,

called SHADD, SMULT, OVER, QUAN, IQUAN and FRAC are capable

of adding or multiplying two problem variables, checking for

register overflow, and quantizing numbers to a specific

register length, using rounding. They also simulate one's-

and two's-complement and signed-magnitude implementations,

and binary (left-right shift) scaling.

These routines are in the form of function sub­

programs to be directly called by the user.

Page 43: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

27

Function SHADD

SHADD is the summing routine. It has four arguments,

X, Y, NSHIFT and I. X and Y are the two problem variables

to be added, NSHIFT is a right shifting factor (not used in

the simulation process), and I is an index on overflow in

the quantizer. NBA is the number of bits used by the quan­

tizer for rounding. If NBA is positive, the sum of X and Y

is rounded to NBA bits. NBA has been set to NBITS.

For example, to add two problem variables A and B and

return a sum Si, the specific command is:

SI = SHADD (A, B, 0, 1)

Function SMULT

SMULT is the multiplication routine. It has three

arguments: X, Y, and I, where X and Y are the two problem

variables to be multiplied, I is an index on the quantizer

to keep track of overflow. Each problem variable is rounded

to NBM bits before being multiplied together to give a pro­

duct with 2NBM bits. During the quantizing process the

problem variable is checked to insure that its value lies

within the range -1 < X < (1 - —) , otherwise an over­

flow message is printed out. NBM has been set to NBITS.

For example, to multiply two numbers A and B and

return a product Pi, the specific command would be:

PI = SMULT (A, B, I)

Page 44: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

28

Symbolically the operations of addition and multi­

plication can be represented as shown in Figure 3.1.

b. a.

Figure 3.1. Symbolic representation of an Adder and a multiplier. — (a) An Adder? (b) A Multiplier.

Implementing the Delay

Another basic building-block in the implementation

of digital filters is the delay element. A unit delay can

be implemented very easily in FORTRAN. A memory register

whose entire contents are shifted on command (e.g., a time

increment) acts like a delay. Two such shift-registers

connected in tandem and working on a "shift and store"

principle can be used to implement a pair of delays.

The principle of operation of a pair of delays is

demonstrated below in Figure 3.2.

Figure 3.2a shows 2 delays in Cascade with the 2

associated state variables, XI and X2.

In a recursive system, the next state of X2 or

X2(n+1) is a function of the present state X2(n) and/or

XI(n) along with possibly the input. Similarly, the output

of a recursive system depends on at least one or more of

Page 45: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

29

X2(n+1) X2(n) X1(n) —o

a.

SRI

TEMP b.

Figure 3.2. Simulating a tandem connection of two delays. — (a) Symbolic diagram; (b) Flow diagram.

these states. Once these computations have been performed,

the state XI(n) is not needed.

Figure 3.2b shows how two memory registers SRl and

SR2 can be used to simulate delay elements. SR2 contains

the state XI(n) and SRl the state X2(n). TEMP is a tempo­

rary location for retaining X2(n+1).

Prior to incrementing the time index n, the contents

of SRl and SR2 need to be changed. A two-step procedure,

outlined in Figure 3.2b, accomplishes this:

Step 1: Shift the contents of SRl to SR2.

Step 2; Transfer contents of temporary location TEMP to

SRl.

Before incrementing the time index n, the procedure

outlined in Steps 1 and 2 is repeated.

Page 46: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Example

The operation of the addition and multiplication

routines, SHADD and SMULT, and a delay element are shown

below for a first-order filter section.

Suppose the filter has a transfer function H(z)

given by:

H(z) = HO z + a z + e '

HO, a and 3 < 1 (3.10)

A block diagram description of this section is as

shown in Figure 3.3 below:

HO

U X (n+l)

ERR

-6

SHIFT REGISTER

J

FBI X) X (n) SRI

~*~CK) FFI

OUT

Figure 3.3. First-Order Section.

The outputs of the adders, multipliers and delay

are indicated in Figure 3.3, and are defined below:

ul = SMULT(U, HO, 1) [Input scaled by HO]

FBI = SMULT (SRI, -3, 2) [Feed-back coefficient

multiplied by present

system-state]

Page 47: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

FF1 = SMULT (SRl, a, 3) [Feed-forward coefficient

multiplied by present

system-state]

ERR = SHADD (Ul, FBI, 0, 1) [Error term or the next

system-state]

OUT = SHADD (ERR, FFl, 0, 2) [Output based upon present

and next state]

SRl = ERR [Transfer ERR content to

SRI. This effectively

delays the next state to

obtain the present state]

No explicit time dependence has been shown above. A time

index becomes necessary in an actual filter simulation, for

computing the output OUT. If more than one section is

connected together in Cascade or in Parallel, an additional

index is required.

Listings of the simulation routines for the three

structures implemented are available in Appendix B (sub­

routines CASCAD, PARLEL and NORMAL).

In the simulation of the Cascade and Parallel forms

no scaling of the filter parameters is required to prevent

overflows. The input to the first second-order section in

the case of these two realizations is scaled down by the

gain term HO, which forms part of the system transfer

Page 48: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

32

ISHIFT function. An additional scaling factor given by 2" ,

where ISHIFT is a positive integer, is used to further scale

down the input. Note, in typical FORTRAN compilers, multi­

plying by a power of 2.0 is effectively a binary left-shift

and eliminates conversions of variable type from fixed to

floating.

Because the Normal realization has scaling in­

cluded as part of the parameter evaluation process, no input

scaling is used in its implementation.

The Register Overflow Problem

In spite of the precautions listed above, the

numerical values of some of the feed-forward and feed-back

coefficients in all three simulations will occasionally

cause the multipliers to overflow. Since each such coeffi­

cient is the input to a multiplier, and must be less than

one in magnitude, some way to handle such coefficients needs

to be devised. The method adopted here is straight-forward.

Example;

Suppose a filter has a z-domain transfer functions

H(z) = 0.02475 -5 - + 2z * 1 = HO 2 + Alz + A2 tT - 1.887z + 0.986 tT + Biz + B2

(3.11)

If this transfer function were implemented in Cascade

form, it becomes immediately obvious that the coefficients

Page 49: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

33

Al, A2 and B1 may not be directly used as inputs to multi­

pliers .

A block diagram of such a filter would look as shown

in Figure 3.4 below:

IN-

HO =• 0.02475

&-&•

Bl= 1.887

T z Al= 2.0

B2 =-0.986 A2 = 1.0

—4—1—4)—

OUT

Figure 3.4. Second-Order Section in Cascade Form Based on (3.11).

If each of the coefficients with magnitudes greater

than or equal to one are divided by an integer number large

enough to reduce their magnitude to a value less than one,

the filter implementation becomes possible.

If the coefficients A2 and B1 are divided by 2 and

Al by 3 and additional adders provided so that the final

result remains unaffected, the structure would look as shown

in Figure 3.5.

Page 50: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

34 0.02475

IN OUT

1. 887/2. 0,—2.0/3.0

1 . 0 / 2 . 0 -0.986

Figure 3.5. Second-Order Section in Cascade Form with Additional Adders to Prevent Overflow.

Note that the above method suggests:

3X = (1 + 2)X where X is any multiplying factor

or one addition and a shift are needed.

The price paid is a two-fold increase in the number

of adders as compared to the unrealizable structure shown

in Figure 3.4.

In general, if a coefficient a has magnitude in

excess of unity and is divided by an integer I, then 1-1

additional adders will need to be included in the structure

to enable the coefficient a to be accommodated within the

structure and prevent overflows at multiplier inputs.

The operation of addition compared to that of multi­

plication requires a fraction of the time and therefore does

not significantly increase the computational time.

Page 51: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

35

The same technique has been used in the implementa­

tion of the Parallel and Normal forms. It must be pointed

out that the method outlined will prevent overflows only if

the filter coefficients lie within the limits for which the

structure has been designed. Table 3.1 gives the maximum

allowable values for the coefficients of the three struc­

tures. These allowable limits on coefficient values were

obtained during this study by simulating a variety of narrow-

and wide-band digital filter transfer functions of up to

sixth-order.

To investigate the system response, three inputs

will be used. These are:

1. A step input, u(n) = A, of magnitude A to be speci-.

fied by the user.

2. A sinusoidal input, u(n) = A sin(nwT), where A and

wT are under user control.

3. A broad-band random input generated as follows:

A random number generating function RANF (which

returns a real random number between 0 and 1) and a

user supplied argument X, are combined in routine

RANDOM such that:

Random (X) = X if RANF .>0.5

Random (X) = -X if RANF < 0.5

Page 52: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

36

Table 3.1. Table with maximum allowable values for coeffi­cients in a second-order section for the three structures.

Structure Type Coefficients

Magnitude of Maximum Allowable Value

AO 0.9

A1 2.9

Cascade A2 1.9

B1 2.9

B2 0.9

YO 0.9

y01 1.9

Parallel Yll 0.9

311 2.9

821 0.9

SIGMA 0.9

OMEGA 0.9

Normal B1

B2

0.9

0.9

CI 5.9

C2 5.9

Page 53: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

37

The simulation software described here is by no

means unique. Various programs for designing digital filters

that meet frequency and time-domain specifications are avail­

able in the literature (e.g., FAD Users Manual, Version 1,

19 81; Antoniou, 19 79, Appendix B; Programs for Digital Signal

Processing, 1979, Sec. 6.4). Of the three sources cited,

Antoniou lists a time-domain analysis program for which the

system specifications are made in a way similar to those

adopted here. However, the program is implemented specifi­

cally for a 16 bit mini-computer (HP 9825A) using HPL lan­

guage and no control over the word-length is provided to the

user. It implements only the Cascade and Parallel forms.

The simulation software developed in this thesis, on the

other hand, uses standard FORTRAN, making it portable.

Also, it gives control to the user over the word-length used

in the simulations, and includes a third structure, the

Normal form, allowing a more effective comparison between

structures.

In this chapter, details of the various software

components, how they relate to the implementation of a

filter, and a simple method of avoiding overflows at inputs

to multipliers have been presented. In the following chap­

ter the software will be tested using simulated fixed-point

filter transfer functions and the effect of round-off on

the time response will be investigated.

Page 54: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

CHAPTER 4

TEST EXAMPLES

To illustrate the usefulness of the software, three

examples will be considered in this chapter. The first

example is a second-order, equal ripple, low-pass Chebyshev

filter; the second is a sixth-order, low-pass filter; and the

third example is a second-order band-pass filter.

Example 1

A second-order, 1.0 dB, equal-ripple magnitude

(Chebyshev) low-pass filter with a passband of 0 to 1 rad/s

has a s-domain transfer function (Huelsman, 1980, pp. 29-39)

given by:

H (s) = -5 (4.1) s + 1.097734s + 1.102510

Using the Matched-z transformation (Antoniou, 1979,

p. 175), with a sampling time T = 1 sec., the corresponding

z-domain transfer function is:

H ( z ) 0 . 1 5 2 7 8 4 9 1 ( z 2 + 2 z + 1 ) ( 4 > 2 )

z 2 - 0 . 7 2 2 4 8 4 6 9 Z + 0 . 3 3 3 6 2 4 2 2

where the gain term is chosen for a D.C. gain of unity.

Using a Cascade form, Figure 2.1a, the filter

38

Page 55: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

39

response to a step-input of magnitude 0.5 is investigated.

Figure 4.1 shows a typical output.

The first simulation run, which uses a word-length

(NBITS) of 32 bits, will be used as a benchmark. Subsequent

simulations use 24, 16, 12, and 8 bits.

Figure 4.1a shows a listing of the input parameters?

Figure 4.1b shows the feed-forward and feed-back coefficient

for the Cascade form. Note that these coefficients have been

obtained using high precision and no quantization is in­

volved. Figure 4.1c gives a listing of the filter response

to a step-input of magnitude 0.5? Figure 4.Id plots the

response, and Figure 4.1e plots the error-function defined

as:

Error (n) = y(n)32 b±ts - y (n) jqbitg (4.3)

The results show that as the word-length NBITS is

reduced, the response no longer approaches a correct steady-

state. For NBITS = 16 and 12, the final values of the out­

put show errors of 0.036% and 0.879%, respectively. For

NBITS = 8, the final output becomes oscillatory, with a

maximum error of 3.1%. These errors in response can be

explained by noting the effect of rounding on the filter

input. For the Cascade form, the 0.5 step-input is scaled

down by the gain factor HO = 0.15278490. Before 0.5 and

0.15278490 and multiplied by function SMULT, they are

Page 56: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Figure 4.1. The second-order, 1.0 dB equal-ripple magnitude low-pass digital filter function (4.2) is sub­jected to a step-input of magnitude 0.5 for a Cascade form.

a. Simulation parameters.

b. Feed-forward and feed-back coefficients. These have been obtained using high precision.

c. A listing of the response as the word-length is reduced.

d. A plot of the response versus time for the simulations using varying word-length. Note that for NBITS = 8, curve marked 1, the response oscillates about the final value.

e. A plot of the error function (4.3) versus time as the word-length is changed. Graphs marked 1 are for 24 and 16 bits; graph marked 2 is for 12 bits; and graph marked 3 is for 8 bits.

Page 57: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

limtu&ttsuiiisi* TMAX- 50.0 H- 2 N- 2 NBITS-32 ISHIFT- 0

U-1.0 ARG1- .5 ARG2- 1.0 HO- .152784900 GRAF-1.0

COEFFICIENTS OF NUNERATOR POLYNONIAL ************************************

F C I I - 1 . 0 0 0 0 0 0 0 0

fi 2)- 2.00000000

F( 3)- 1.00000000

COEFFICIENTS OF OENONINATOR POLYNONIAL ************************************

E( 1)- .33362420

E( 2)- -.72248460

E( 31- 1.00000000

NUMBER OF SECOND ORDER SECTIONS- 1

STRUCTURE TYPE-DIRECT

NUMBER OF BITS (NBITS) FOR 2ND. RUN- 24 NUMBER OF BITS (NBITS) FOR 3R0. RUN- 16

NUMBER OF BITS (NBITS) FOR 4TH. RUN- 12 NUMBER OF BITS (NBITS) FOR 5TH. RUN- 8

Figure 4.1a.

o

Page 58: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

F E E D-F QRWARD_AND_FEE0-BACK_COEFFICIENTS

AO A1 A2 01

.0000000 2.0000000 1.0000000 -.7224846

Figure 4.1b.

B2

.3336242

Page 59: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

32 bits 24 bits

TIME OUTPUT 1.00 .0763924 .0763924 2.00 .2843697 .2843693 3.00 .4855 362 .4855357 4.00 .5614896 .5614889 5.00 .5492508 .5492499 6.00 .5150685 .5150677 7.00 .4944555 .4944545 8.00 .4909670 .4909661 9.00 .4953236 .4953226

10.00 .4996350 .4996343 11.00 .5012964 .50 1 2 960 12.00 .5010584 .5010582 13.00 .5003322 .5003321 14.00 .4998869 .4998868 15.00 .4998074 .4998070 16.00 .4998986 .4998986 17.00 .4999910 .4999907 18.00 .5000273 .50 0 0 2 6 8 19.00 .5000227 .5000218 20.00 .5000073 .5000064 21.00 .4999977 .4999971 22.00 .4999959 .4999954 23.00 .4999978 .4999971 24.00 .4999998 .4999990 25.00 .5000006 .4999999 26.00 .5000005 .5000001 27.00 .5000002 .5000001 28.00 .5000000 .5000001 29.00 .4999999 .5000001 30.00 •5000000 .5000001 31.00 .5000000 .5000001 32.00 .5000000 •5000001 33.00 .5000000 .5000001 34.00 .5000000 .5000001 35.00 .5000000 .5000001 36.00 .5000000 •5000001 37.00 .5000000 .5000001 38.00 .5000000 .5000001 39.00 .5000000 .5000001 40.00 .5000000 .5000001 41.00 .5000000 .5000001 42.00 .5000000 .5000001 43.00 .5000000 .5000001 44.00 .5000000 .5000001 45.00 .5000000 .5000001 46.00 .5000000 .5000001 47.00 .5000000 .5000001 48.00 .5000000 .5000001 49.00 .5000000 .5000001 50.00 .5000000 .5000001

Figure 4.1c.

16 bits 12 bits 8 bits

0763550 .0761719 .0781250 2843933 .2841797 .2890625 4855042 .4853516 .4765625 5614014 .5610352 •5703125 5491028 .5470516 • 5859375 5149231 .5131836 •5460750 4943542 .4936523 •5234375 4909973 .4897461 •5078125 4952393 . .4921875 •5078125 4994812 .4960938 •5156250 5010986 .4970703 •5078125 5010071 .4960938 •5078125 5003967 .4956055 .5078125 4999390 .4956055 •5156250 4997559 .4956055 •5078125 4998169 .4956055 •5078125 4998169 .4956055 .5078125 4998169 .4956055 .5156250 4998169 .4956055 .5078125 4998169 .4956055 .5076125 4998169 .4956055 .5078125 4998169 .4956055 .5156250 4998169 .4956055 .5076125 4998169 .4956055 .5078125 4998169 .4956055 .5078125 4998169 .4956055 .5156250 4998169 .4956055 .5078125 4998169 .4956055 .5078125 4998169 .4956055 .5078125 4998169 .4956055 .5156250 4998169 .4956055 .5078125 4998169 •4956055 .5078125 4998169 .4956055 .5078125 4998169 .4956055 .9156250 4998169 .4956055 .5076125 4998169 .4956055 .5078125 4998169 .4956055 .5078125 4998169 .4956055 .5156250 4998169 .4956055 .5078125 4998169 .4956055 .5078125 4998169 .4956055 .5078125 4998169 .4956055 .5156250 4998169 .4956055 .5078125 4998169 .4956055 .5078125 4998169 .4956055 .5078X25 4998169 •4956055 .5156250 4998169 .4956055 .5078125 4998169 .4956055 .5076125 4998169 .4956055 .5078125 4998169 .4956055 .5156250

Page 60: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Output

TIME (.sees)

Figure 4.Id.

Page 61: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

-10.

Err_or x lo

-20.

-30.

-40 20 50 40

Figure 4.1e.

Page 62: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

45

quantized to the respective word-length. Figure 4.2 shows

the section of the Cascade form, Figure 2.1a, being referred

to above.

Quantized values of HO for 16, 12, and 8 bits are:

Q[H0:l16 bits = 0.1527709961

Q[Ho]12 blts " 0.1525878906

0[HO]8 bits - 0.15234375

where q[.] is the quantized value of HO for the indicated

number of bits. The step-input of 0.5 is not affected by

quantization.

From the above, it becomes clear that the input to

the filter at the point marked X on Figure 4.2 will be dif­

ferent for each word-length. The values of the product, Px,

at point X for 16, 12, and 8 bits are:

PX 16 bits - 0.076385498

Px 12 bits - 0.076416015

PX 8 bits " 0 .018125

As a result, the filter output, for 16, 12, or 8 bits,

cannot be expected to reach a final value of 0.5? hence the

percentage errors noted earlier are obtained. The oscilla­

tions obtained for 8 bits, Figure 4.Id, are a consequence of

Page 63: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

46

U

H° t I X

•€> 4X

-?11

Figure 4.2. A section of the Cascade form.

using quantization in fixed-point arithmetic. The effect of

such quantizations is to introduce non-linearities in the

filter structure, causing a periodic error at the output.

Such limit-cycle effects arise because quantization forces

the poles of the system to move to the unit circle (Oppenheim

and Schafer, 1975, pp. 418-423) .

The digital filter function (4.2) was driven by two

additional inputs: a sinusoidal input, u(n) = 0.5 sin(n) and

the random broad-band input described in Chapter 4. Figure

4.3 shows the response to these inputs.

The Parallel and Normal forms were also tested for

the same three inputs. Figure 4.4 shows the responses for

the Parallel form, and Figure 4.5 for the Normal form. To

illustrate better the effect of reducing the word-length,

plots of the error function (4.3) are also included.

An analysis of the three structures in terms of the

maximum percentage of relative error, |e(n)__v|, based upon ITLCIX

the three inputs, is made. The relative error function,

|e(n) I, is defined as: 1 max1

Page 64: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Figure 4.3. Response and Error function plots for simula­tions of the digital filter function (4.2); a Cascade form is used. — Each response plot has results of simulations for 32, 24, 16 , 12 , and 8 bits. Each error function plot is ac­cording to (4.3). Driving functions used are a sinusoidal input u(n) = 0.5 sin(n) and a random broad-band input (see text).

a. Response to a sinusoidal input.

b. Error function versus time for the response plotted in Figure 4a above.

c. Broad-band random function used as input.

d. Response to a broad-band random input.

e. Error function versus time for the response plotted in Figure 4c above.

Page 65: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

5

OUTPUT

-s 10 30 40 SO

TIME [secs)

Figure 4.3a.

-j

Page 66: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

-2.

20 40 SO

Figure 4.3b.

Page 67: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

•+0.5 ..

output o

-0.5 _

sftmf' lt'

Figure 4.3c.

•u v£>

Page 68: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

OUTPUT

-4

-8 40 SO 20

Figure 4.3d. cn o

Page 69: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

-3.

SO 40 -s

Figure 4.3e.

Page 70: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Figure 4.4. Response and Error function plots for simula­tions of the digital filter function (4.2); Parallel form is used. — Each response plot has results of simulations for 32, 24, 16, 12, and 8 bits. Each error function plot is according to (4.3).

a. Response to a step-input. Curve marked 1 is for 32, 24, 16, and 12 bits. Curve marked 2 is for 8 bits.

b. Error function versus time for the response plotted in 4.4a above. Dark line (marked 1) is for 32, 24, 16, and 12 bits. Curve marked 2 is for 8 bits.

c. Response to a sinusoidal input.

d. Error function versus time for the response plotted in 4.4c above. Curve marked 1 is for 32, 24, 16, and 12 bits. Curve marked 2 is for 8 bits.

e. Response to a broad-band random input.

f. Error function versus time for the response plotted in 4.4e above. Curve marked 2 is for 3 bits.

Page 71: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

56.

48.

outpot 40.

32.

24 40 50 10 20 30 0

Time

Figure 4.4a. tn

Page 72: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

42

30

is.

-18 20 30 40 SO

Figure 4.4b. u1 u>

Page 73: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

5

OuTPVJT

-i

-3

30 TIME LUTES')

Figure 4.4c.

Page 74: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

-3

-s SO 40 20

Figure 4.4d. in in

Page 75: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

OuTPOT

TIMC.

Figure 4.4e. cn ct>

Page 76: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Error *to*

20 30

time (&et6)

Figure 4.4f.

Page 77: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Figure 4.5. Response and Error function plots for simula­tions of the digital filter function (4.2) ? a Normal form is used. — Each response plot has results of simulations for 32, 24, 16, 12, and 8 bits. Each error function plot is according to (4.3).

a. Response to a step-input. Curve marked 1 is for 8 bits.

b. Error function versus time for the response plotted in 4.5a above. Curve marked 1 is for 8 bits.

c. Response to a sinusoidal input.

d. Error function versus time for the response plotted in 4.5c above. Curve marked 1 is for the word-lengths up to 12 bits. Curve marked 2 is for 8 bits.

e. Response to a random input.

f. Error function versus time for the 4.5e above. Curve marked 1 is for to 12 bits. Curve marked 2 is for

response plotted in the word-lengths up 8 bits.

Page 78: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

66

54

30.

40 50 20 0 10 30 Time. (sete)

Figure 4.5a. u1 00

Page 79: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

ERROR * ID3

-10

"TIME, I&ECS)

Figure 4.5b. u1 <o

Page 80: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Oort>ur

Figure 4.5c.

o> o

Page 81: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

10.

-2

-2.

20 40

Figure 4.5d.

Page 82: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

-i.

-8

50 0 10 20 30 40 time. secs>)

Figure 4.5e. CT> to

Page 83: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

27.

-9.

-27.

-45 id 40 50 0 20 30

time (secs)

Figure 4.5f. CM w

Page 84: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

64

| / \ | 'y(n)32 bits ~ y(n)NBITs' inn ' max' = y(n)32 bits X 100 Percent '

(4.4)

the value of n corresponding to the largest absolute value

of the numerator factor. Table 4.1 summarizes the results

for the three structures.

Results of the analysis show that for the digital

filter function (4.2), the Parallel form gives least error

for up to 8 bits, followed by the Normal form, with the

Cascade form usually showing maximum sensitivity to the

effects of using finite word-length.

Example 2

A sixth-order, low-pass filter will be considered

here. This example will be used to demonstrate how a high-

order digital filter function can be simulated by using

second-oirder sections connected in cascade (for the Cascade

and Normal forms) or in parallel (for the Parallel form).

It will also be used to compare the Cascade, Parallel and

Normal forms in terms of their sensitivity to finite word-

length effects.

A sixth-order, low-pass Butterworth filter has a

s-domain transfer function (Oppenheim and Schafer, 19 75, p.

215) :

H (s) 0'12903 — (s2+0.3640s+0.4945)(s2+0.9945s+0.4945)(s2+l.3585s+0.4945)

(4.5)

Page 85: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

65

Table 4.1. A comparison of the three structures based upon the maximum percentage relative error,|e(n) I

max' for the low-pass filter of 4.2. — Results are based on the effect of changing the word-length (NBITS) as the filter is subjected to three standard inputs.

IY(n)22 bits - Y(N)NRTTSL |e(n) = 32 blts NBITS x 100 %

IUQX / \ y(n)32 bits

Structure Type of Input Structure Type of Input

Number of Bits

Structure Type of Input 24 16 12 8

Cascade

Step

Sine

Random

0.002

0.0002

0.0017

0.042

0.067

0.064

0.99

1. 33

1.10

6.7

13.5

15.2

Parallel

Step

Sine

Random

0.0

0.0002

0.0002

0.028

0.076

0.0004

0.26

0.95

0.61

12.1

10.5

10.0

Normal

Step

Sine

Random

0.0

0.0002

0.0

0.03

0.05

0.053

0.36

1.35

0.537

7.6

45

12. 3

Page 86: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

66

Using the Matched-z transformation (Antoniou, 1979, p. 175),

with a sampling time, T = 1 sec., the corresponding z-domain

transfer is:

HO(z6 + a,z5 + a0z4 + a^z3 + a.z2 + acz + a , ) H(z) = 1 A d 4 2 2_

(z6 + b^z^ + + b^z3 + b^z2 + b^z + bg)

(4.6)

where

HO = 0.000485498

a1 = 6 h1 =-3.3636809

a 2 = 1 5 b 2 = 5 . 0 6 8 8 3 8 7

a3 = 20 b3 =-4.27633882

a „ = 1 5 b „ = 2 . 1 0 6 9 0 5 5 5 4 4

a5 = 6 b5 =-0.57073848

a, = 1 b, = 0.06608585 6 6

Figures 4.6c, 4.6f and 4.6i, respectively, show

second-order sections of the Cascade, Parallel, and Normal

forms connected to implement (4.6).

In this example only the system response to a step-

input will be investigated. Figures 4.6a through 4.6f show

the simulation results for the Cascade, Parallel, and Normal

networks and a 0.5 step-input.

Figures 4.6c and 4.6d show a listing and a plot of

the response. For NBITS = 12 and 8, a zero or "null" re­

sponse is obtained. Using an analysis similar to that of

Page 87: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Figure 4.6. The sixth-order, low-pass filter function (4.6) is simulated using the Cascade, Parallel, and Normal forms and driven by a step input u(n) = 0.5. — Response plots shown in the following pates and described below are for simulations using 32, 24, 16, 12, and 8 bits. Error function plots according to (4.3) are also included.

a. Simulation parameters.

b. Feed-forward and feed-back coefficients for a tandem connection of the Cascade second-order sections.

c. Cascade network.

d. Response plot for the Cascade network. Curves marked 1 are for 32, 24, and 16 bits. "Null" responses, curves marked 2, are obtained for 8 and 12 bits.

e. Error function versus time for the response plotted in 4.6d above. Curves marked 1 are for up to 16 bits. Curves marked 2 are for 12 and 8 bits.

f. Parallel network.

g. Response plot for the Parallel network. Curves marked 1 are for 32, 24, 16, and 12 bits. Curve marked 2 is for 8 bits.

h. Error function versus time for the response plotted in 4.6g above. Curve marked 1 is for 8 bits.

i. Normal network.

j. Response plot for the Normal network. Curves marked 1 are for 32, 24, 16, and 12 bits. Curve marked 2 is for 8 bits.

k. Error function versus time for the response plotted in 4.6j above. Curve marked 1 is for a word-length of up to 12 bits. Curve marked 2 is for 8 bits.

Page 88: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

SINULATIDM PARAMETERS **********************

TMAX- 50.0

U-1.0

M- 6

ARG1- .5

N- 6

ARG2* 1.0

NBITS *32

ho- .000485498

ISHIFT- 0

GRAF-1.0

COEFFICIENTS OF NUMERATOR POLYNOMIAL ************************************

F t 1 ) - 1 . 0 0 0 0 0 0 0 0

f( 2)- 6.00000000

Ft 3)- 15.00000000

Ft 4)- 20.00000000

Ft 51- 15.03000000

Ft 6)- 6.00000000

Ft 7) - 1.00000000

COEFFICIENTS OF DENOMINATOR POLYNOMIAL ************************************

Et l>» .06608585

Et 2)> -.57073848

Et 3) • 2.10690555

Et 4)- -4.27633882

Et 5)* 5.06883873

Et 61- -3.36368040

Et 7i> 1.00000000

NUMBER IF SECOND ORDER SECTIONS- 3

STRUCTURE TYPE-OIRECT

NUMBER OF BITS tNBITS) FOR 2ND. RUN- 24 NUHdER OF BITS tNBITS) FOR 3Ri). RUN- 16

NUMBER OF BITS tNBITS) FOR 4TH. RUN- 12 NUMBER OF BITS tNBITS) FOR 5TH. RUN- 8

Figure 4.6a

Page 89: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

FEED-FORWARD AND FEED-BACK COEFFICIENTS

AO

1.0000000

1.0000000

1.0000000

A1

1.9946698

2.0053086

2.0000216

A2

.994o9d0

1.0053370

.9999933

b1

-.9972958

-1.0691760

-1.2972092

b2

.2570716

.3699456

.6948908

Figure 4.6b.

Page 90: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

cascade network

ii III

4 4 i

& ho = 0.000485498

601 - 1.0 I *02 = 1.0 |

*03 1.0

B11 = 2.0 | *12

= 2.0 | *13 = 2.0

B21 = 1.0 |

1 *22

= 1.0 |

1

ll cn CM ca

1.0

°n = 1

-0.9973 1 a12

1 = -1.0691

1 a13 ~ -1.2972

II (—1 CM 8 0.2571

1 a22

= 0.3699 1

a23 = 0.6948

Figure 4.6c.

Page 91: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

60

36.

24

12.

so 40 20 30 0 10

~t ,mp '.'-ecta

Figure 4.6d.

Page 92: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

63

49.

3S

E-Baoo. •*. \Q

O . 21

O.0 7.

.|-n « n

-7 20 30 40 50

Figure 4.6e.

Page 93: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

72

PARALLEL NETWORK

01

11 11

21

y (n) u(n) 12

II

03

13 13

III

I

y01 = 1.4095

Y = -0.4907

3n = -0.9973

B21 = 0.2571

Figure 4.6f.

0.000485498

II

Y02 = -1.4568

y12 = 0.8376

ei2 = -1.0692

e22 = 0.3699

III

Yq3 = 0.0519

Y13 = -0.2422

313 = -1.2972

023 = 0.6949

Page 94: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

!

£3

O. 49.

_ O - 0 7 0 10 20 30 40 50

IMS C_'. r c'_.)

Figure 4.6g. -j w

Page 95: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

-3.

-9 0 10 40 20 30

t\w»e (.s6c.s)

Figure 4.6h.

Page 96: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

NORMAL NETWORK

II III

k

III

Figure 4.6i.

al = 0.4986 | °2

= 0.53458 1 I °3

= 0.64860

W1 = 0.09177 |

U2 = ' 0.29011 1

1 w3 = 0.52364

bll = 0.18245 |

"12 = 0.18532 1

1 b13 = 0.140749

b21 = 0.16169 | b22

= 0.12673 1 1 b23

= 0.06781

C11 = -3.7189 |

C12 = -0.6675 1

1 c13 = 0.23544

C21 = 5.78111 | c22

= 2.8767 1 1 c23

= 2.97155

d = 0.078595 | d = 0.078595 1 d = 0.078595

Page 97: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

O. BO

O. 36.

O . 24.

O. 12.

o. 0 50 30 40 10 20 0

tiwit ^.- f<

Figure 4.6j. -j o>

Page 98: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

so 40 20

Figure 4.6k.

Page 99: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

78

Example 1, these results will be shown to be a consequence

of using a short word-length in forming the system input.

Referring once again to Figure 4.2, the quantized values of

HO for 12 and 8 bits are:

q[h°]i2 mts = 0.0

Q[H0:18 bits " °-°

As a result, the product Px, which is the input to the system

for these two word-lengths, is zero and therefore a zero sys­

tem response is obtained.

For 16 bits, the quantized value of HO is:

Q [H° ] i6 b i t s = 0 .000473023

which has been rounded down from the high-precision value of

0.000485498. As a result, the steady-state response shows

an error of 1.3%.

For the Parallel and Normal forms, the effects of

finite word-length were less severe. No zero or "null"

responses were obtained. Table 4.2 summarizes the results

in terms of |e(n) | at steady-state. lTlctX

Results of this example have demonstrated the useful­

ness of the simulation software for studying a high-order

digital filter. The Cascade form has once again been shown

to be extremely prone to finite word-length effects, and its

response highly dependent on the value of the gain term, HO.

Page 100: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

79

Table 4.2. A comparison of the three structures based upon the maximum percentage relative error, |e(n) |, for the sixth-order low-pass filter functionmax

4.6. — Results are based on the effect of changing the word-length (NBITS) as the filter is subjected to a step-input of magnitude 0.5. Note the blank entries correspond to zero response.

Structure Type of Input

|e(n) | 1 max1

Structure Type of Input

Number of Bits

Structure Type of Input 24 16 12 8

Cascade Step 0.025 1.32 - -

Parallel Step 0.0003 0.021 0.91 12.5

Normal Step 0.0001 0.059 0.29 5.2

Page 101: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

80

The Parallel and Normal forms perform much better, and in

most cases the latter is less sensitive to the effects of

finite word-length. Also, compared to the second-order

system of Example 1, the sixth-order system is more suscep­

tible to the effects of rounding.

Example 3

A second-order band-pass filter with a Quality Factor

(Q) of 10, a center frequency of u)q of 1 rad/sec has a

s-domain transfer function:

H(s) = ~~2 2 (4.7) s 4- 0. Is + 1

Using the Bilinear transformation (Antoniou, 1979, p. 178)

and a sampling time T = 0.1 sec., the corresponding z-domain

transfer function is:

H ( z ) = 0 .0497509 ( z 2 - 1) ( 4 8 )

z2 - 1 .98010779Z + 0 .9900498

where the constant gain is chosen such that at wT = 0.1, the

overall gain is 10.

The filter function (4. 8) is exposed to the three inputs

discussed earlier in Example 1. Figures 4. 7a and 4. 7b show the

pertinent outputs for the Normal form and a sinusoidal input.

Figures 4. 7c through 4. 7f show plots of the response and the error

function (4.3) for the Parallel form, and a broad-band random

input, and also for the Cascade form and a step input. Table 4.3

Page 102: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Figure 4.7. The second-order, band-pass digital filter func­tion (4.8) is simulated using the Normal, Parallel, and Cascade forms and driven respectively by a sinusoidal input u(n) = 0.5 sin(n), a random broad-band input, and a step input, u(n) = 0.5. — Response plots shown in the following pages and described below are for simulations using 32, 24, 16, 12, and 8 bits. Error function plots accord­ing to (4.3) are also included.

a. Response plot for a Normal form and a sinusoidal input. Curves marked 1 are for 32, 24, 16, and 12 bits. Curve marked 2 is for 8 bits.

b. Error function versus time for the response plotted in 4.7a above. Dark base line is for 24 and 16 bits. Curve marked 1 is for 12 bits. Curve marked 2 is for 8 bits.

c. Response plot for a Parallel form and a broad-band random input. Curves marked 1 are for 32, 24, 16, and 12 bits. A zero or "null" response was obtained for 8 bits (see text).

d. Error function versus time for the response plotted in 4.7c above. Dark base line is for 24 and 16 bits. Curve marked 1 is for 12 bits. Curve marked 2 is for 8 bits.

e. Response plot for a Cascade form and a step input. Curves marked 1 are for 32, 24, 16, and 12 bits. A null response was obtained for 8 bits.

f. Error function versus time for the response plotted in 4.7e above. Dark base line and curve marked 1 are for 24, 16, and 12 bits. Curve marked 2 is for 8 bits.

Page 103: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

OUTPUT *K>~'

-12.

- I B 20 30 SO iO

Samples

Figure 4.7a. oo

Page 104: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

14.

error, kvo

-2 40

Figure 4.7b. 00 nj

Page 105: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

5c

24.

12.

OUTPUT k. \o"

-12.

-24 20 40 SO

Figure 4.7c.

Page 106: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

36

2

0 10 20 30 tO

sft.w\p\_6s

Figure 4.7d.

Page 107: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Output *.\o

-2.

-4 0 10 20 30 SO

Figure 4.7e.

Page 108: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

6

4.

eciturtc x>o

-2.

—4 SO

Figure 4.7f. oo cr>

Page 109: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

87

Table 4.3. A comparison of the three structures based upon the maximum percentage relative error,|e(n) I

1 max1 for the band-pass filter of 4.5. — Results are based on the effect of changing the word-length (NBITS) as the filter is subjected to three standard inputs. Blank entries correspond to responses that suffer from 'dead-band' effects.

le(n)maxl

Type of Input

Number of Bits

Structure Type of Input 24 16 12 8

Step 0.01 1.8 5.8 —

Cascade Sine 0.76 8.3 >100 -

Random 0.011 1.6 >100 -

Step 0.004 1.3 21 -

Parallel Sine 0.048 11.5 >100 -

<>

Random 0.019 17.9 25 -

Step 0.003 0.25 1.9 70

Normal Sine 0.004 0. 83 9.1 >100

Random 0.0009 0.56 7.3 48

Page 110: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

88

summarizes results of the simulations as reflected by the

maximum percentage of relative error, |e(n) |. max

Results show that the Normal form performs satisfac­

torily for a word-length of up to 12 bits, showing an error

of less than 10%. The Cascade and Parallel forms, on the

other hand, become unstable or show errors in excess of 2 0 %

for 12 bits.

For both the Cascade and Parallel forms, the inputs

-3 -7 had to be scaled down by 2 and 2 , respectively, to pre­

vent overflows. This explains the zero or "null" responses

for 8 bits for these two structures. In summary, it can be

said that for narrow-band filter functions the Normal form

should be preferred over the Cascade and Parallel forms.

Appendix A shows the card deck setup for a typical

simulation run on the CDC Cyber 175.

Summary and Conclusions

Results of the simulations tend to support the com­

ments made earlier in Chapter 2 regarding the sensitivity of

the Cascade form to finite word-length effects (Example 3).

These effects become even more pronounced for higher-order

filter functions (Example 2). For wide-band filter func­

tions (Example 1), no significant difference in performance

was observed between the three structures. While the Para­

llel form generally performs better than the Cascade form,

it is also not suitable for narrow-band filter functions.

Page 111: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

89

From the examples studied, it appears that the use

of input scaling for dynamic range control is a primary

cause for deterioration in performance, as the word-length

is reduced, for both the Cascade and Parallel forms. Since

the Normal form has scaling included in its design, it

is least susceptible to dynamic range problems.

Besides the three structures investigated in this

report, other structures such as the Wave Digital filter

(Fettweis, 1971) and the Gray-Markel Lattice filter (Gray

and Markel, 19 73) have also been shown to have low sensi­

tivity to finite word-length effects (Taylor and Marshall,

(1981) .

This report has shown the advantages of the simula­

tion of finite word-length effects, and also the effective­

ness of simulation as a tool in the analysis and design of

fixed-point digital filters.

Page 112: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

appendix a

CARD DECK SETUP FOR A TYPICAL RUN ON THE CDC CYBER 175

90

Page 113: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

91

The user may only specify data in a prescribed

fashion to be outlined below. This data could be on separ­

ate cards or as a DEC-10 file.

Suppose a second-order, low-pass Butterworth filter

with a transfer function of the forms

H(z) _ Nfz) = 0.0023293288 (z2 + 2z + 1) =

D(z) z2 - 1.85880613z + 0.86812344

HO (E3.z2 + E2. Z + El)

(F3.z2 + F2. Z + Fl)

is to be implemented as a Cascade structure and the response

to a step input of magnitude 0.5 is to be investigated.

NBITS is initially set to 32 bits; subsequent runs use 24,

16, 12 and 8 bits, respectively.

The data cards/data file will be of the form:

22

50.0

2 . 0

2.0

32.0

4.0

1.0

0.5

0 . 0

0.0023293288

0 . 0

1.0

2 . 0

1.0

Page 114: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

92

0.8681234454

-0.85880613

1.0

20.0

16.0

12.0

8.0

DIRECT

A couple of things need to be noted:

1. Except for the first and last data cards, all the

other numbers are real.

2.* The information on CARD 1 must be in columns 1 and 2.

Except for the structure type (last card), all the other

data must remain within the first 20 columns.

A breakdown of each card and the information it con­

tains is as shown below:

CARD 1: Total number of cards in data deck/data file.

CARD 2: TMAX. Simulation time for each run. [120 is the

upper limit on TMAX.]

CARD 3: Order of Numerator Polynomial N(z) [Max. = 10]

CARD 4: Order of Denominator Polynomial D(z) [Max. =10]

CARD 5: Number of bits (NBITS) for first run [Cyber 175 is

limited to a maximum of 60 bits].

CARD 6: Shifting factor for input, [used orily for Direct

and Parallel forms.]

Page 115: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

93

CARD 7s Value for type of input:

1.0 = Step; 2.0 = Sine; 3.0 = Random

CARD 8: Magnitude of Max. Value of Input [should remain

less than 1.0].

CARD 9: Angular frequency in radians (Only for Sine input.

Maybe left equal to 0.0 otherwise).

CARD 10: Gain for zero passband loss (HO).

CARD 11: Flag for Calcomp/Printronix Plotter

0.0 = Line Printer Plot

1.0 = Line Printer Plot and Calcomp/Printronix

(TMAX must be set to 80)

The next three cards contain the coefficients of the

Numerator polynomial in ascending order. Maximum number of

coefficients is 11.

CARD 12: Coefficient of z° (or constant term) = El

CARD 13: Coefficient of z = E2

2 CARD 14: Coefficient of Z = E3

The following three cards contain the coefficients

F(.) of the denominator polynomial in ascending order.

[Maximum number of coefficients is 11.]

CARD 15: Coefficient of z° (or constant term) = F1

CARD 16: Coefficient of z = F2

2 CARD 17: Coefficient of z = F3

Page 116: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

94

CARD 18: Number of bits for second run [if set to 0, only

1 simulation run will be made],

CARD 19: Number of bits for third run.

CARD 20: Number of bits for fourth run.

CARD 21: Number of bits for fifth run.

CARD 22: Structure type.

Other possibilities are PARALLEL or NORMAL.

Page 117: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

APPENDIX B

SIMULATION SOFTWARE LISTING

95

Page 118: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

PROGRAM ASSIGN(INPUT*OUTPUT*PLOT*TAPE5"INPUT*TAPE6«0UTPUT* 1 TAPfc99«PL0T)

C THIS PROGRAM READS THE USER PROVIOEO DATA AS AN ARRAY XX* C AND ASSIGNS THE VARIOUS SIMULATION PARAMETERS TO THE ARRAY C ELEMtNTi . IT CONTROLS THE SIMULATION OF THE RELEVANT C SUBROUTINES JEPENDING JM THE PARAMETERS PROVIDED BY THE USER.

c U NUM—TOTAL NUMBER OF CARDS IN THE DATA DECK C XX( . )—ARRAY FORMED r f lTH INPUT DATA C TYPE—TYPE OF F ILTER STRUCTURE C TMAX—SIMULATION RUN TIME C M—ORDER OF NUMERATOR POLYNOMIAL OF TRANSFER FUNCTION C N—ORDER OF DENOMINATOR POLYNOMIAL OF TRANSFER FUNCTION : NBITS—NUMBER OF BITS FUR COEFFICIENT NURDLENGTH C 1SH IF T—SHIFTING PARAMETER(USED UNLY FOR SCALING INPUT C IN DIRECT AND PARALLEL FORMS) C U—TYPE JF INPUT : U«1 FOR STEP INPUT C U«2 FOR SINE INPUT C U-3 FUR RANDOM INPUT C ARG1 AND ARG2—ARGUMENTS USED IN CALLING TYPE UF INPUT C HO—GAIN FOR ZERO PASSBAND LOSS C GRAF—FLAG FOR RASTER/CALCOMP PLOTTER C F(J) - -ARRAY OF NUMERATOR POLYNOMIAL COEFFICIENTS C E(J)—ARRAY OF DENOMINATOR POLYNOMIAL COEFFICIENTS C KK— NUMBER OF SECOND ORDER SECTIONS C JMAX—NUMBER OF POSSIBLE SIMULATION RUNS WITH DIFFERENT C NBITS C NUB1TS ( • )—NUMBER OF BITS FOR NEW RUN : KMAX—COUNTER FOR NUMBER OF RUNS ACTUALLY MADE

C COMMON/SYSVAR/EXIT*RLDONE*IFILE*1RUNNO* T* NTMAX*TNE XT COMMON/SYSVAR/DT *DTMAX*J TMIN*EMAX*EMIN*SY(35) COMMON/SYSVAR/NBITS*NBU*NBM*NBA* NY(40) COMM'JN/CaSCAD/ A0(10)*Al (10)*A2(10)*Bl (10)*B2(10) COMMON/CASCAD/SHIFT1 CUMMJN/PARLLL/F1N0UT1101)* FK1 COMMJN/PARLLL/GAttAO* GAMMA0(10)»GAMMA1(10)*BETA1(10)»8ETA2(10) COMMON/N0RNAL/SIGMA(10)»OMEGA(lO)»BBl( iO)>BB2( lO)»Cl( lO) CUMMJN/N0KMAL/C2(1J)

COMMON/SE TUP/M*N*F(10)*E(10)*U1(10)*U2(10)*V1(10)*V2(10) COMMON/SETUP/D(10)*00(10) CUMMUN/PANODI/HO*ISHIF T

COMMON/UUT/OUTP T T(120* 5 ) * ERROR(120* ) * JMAX* KMAX COMMON/LIST/TMAX*KK CUMMON/PLOT/TO*DOT*NXDIM*MN*NM*XXMIN*XXMAX

Page 119: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

CUNN0N/ INPUT/FINPT1120) REAL IMPUr^NAG COMPLEX P l l lU)»Rl l l0 )#R2l l0) DIMENSION XX (50)*NUf l ITS(10)» JUTPUT (80# 5)» err and(80* 5 )

DATA XX/50*0.0 / OATA QUrPTT*UUTPUT#ERROR>err and/600*0.0» 400»0.0» 600»0. 0» 400*0.0 /

RE AD(5,10)NUM FJK.1ATU2) K'NUM-2 REAd(5»20) (XX(1)» I -1»K) FORMAT(F20.0) READ(5# 30) 1YPE FURMATtA10)

TMA X»XX(1) M* IF IX(XX(2) ) N ' lF IXIXXl i ) ) N B i r S ' lF lX(XX(4M ISHIFT«IF1X(XXI5) ) U-XX16I ARGi* XX17) ARG2-XXI8) HO* XX(9) GRAF'XXt10) L« l l NM'M+1 DO 15 J«l» i1M FU)"XXIL) L-L+l CONTINUE ll-ii+nn NN-rt+1

00 16 J J '1» NN E(JJ)*XX(LL) LL«LL*1 CONTINUE KK*N/2

JMAX»5 KMAX-0 LH-NUH-5 NUiJITS( I ) ' IF IXIXXILM)) LH'LM+1 NU3ITS(2)" IF IX(XX(Lh)) LN«LM*1 NUdITS(3)« IF IX(XX(LH))

Page 120: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

98

<M O <f-l

— *o -*f-40C ^o< 0CQC-*

N N II N —^3 XXXXQ.OJO ««uUZZ

£ CCCCHN< _j -»-»">-»OOuOOC

N H N X OOOOi-H*-X • • • 9333

3(3030. 0. X UJiiiUiUiZZZ h-4 • • • U. »•* U. »•* #MM-HOOO • « * • <r • • •

—t- Mo-iOiaro • ;/> dtsesuuijj

3333 • • • JH ZZZ2333 M SO Z3 M SO Z3 LL.LL.-4-LLU-U.U. -!Z •-H**

s jt ac

s •

•k u. X < O ac

U.-4 o < * • oc ro » « IJMXX •> *oo OS *-*-* X • « % <M£ • • ocxu.-h <0 *ht % Hull

* af-«s o —< « «x S ".s XS * 3 » O «> * othx * •-S *tO *wXX «. • io »-h *m4 «-<-*• * »-< «IL #l/> *s •> *»-«• 8

h »ed «lktm *zt >-iO

•>« Xoc *ZXon< # o«»*s *csl •» # *>t— »x »xe xo * < »3-« #tXH « S t—o

"• «"> *«hm • ms oxn »-*•#•

m. * <M

3 *

i/» S

** •i •» «k s < •M t S •J *+ (M < c H II « *-+ a «S z z r z C *D 9 o >- « QC— QC r -j (/> <M * V a z •H •(VI

a. o O * z*-i o Zt

ae a

t— u

CM «*C •

H- UJ acz ac • o < t/> •3 OZ

z LLQC LU3 < oc ac UJ

r a UJ o — ?/>o c/i •

c z ac O H-aC *•! 3 uj a 4 •-•(*> »-«»— 2: o A <t 0 COi>

QD 00 o Ztf Z U. • u. • z C fSJ— — a f\l a fM a ii a.—• a H

H j UJ JOCO t/)(/>U. 1 «-*lL co •u QLi» > • i | • 1 1 1-4

h» £ h- z * 00 Z Z8 z zt ffiCQhCQCOi/) UJ •k N UI « 19 u. CO

*-4 a UlZUL Zt •-(J MS o • s oc oz *oa 1-4 N4 ^ * n >c •» ac —— Z a U. %cm LL %CNi UJ rooc< 3 a. U. SD owujc^««»uj UJ «-) ik Ui ^ % S 0(/ia»»u>eD • a s o «•< O (/I a u ui«* Zu X 1-

m <\J

X o

s s «ul s s a..AST azs « -It » -*s «>-S 3t IL3! X Am « X «» k X)» »OZ *U-• x—•n^x—x *"3 w »f\>

nnno-tx «nn<ria «inx<o »4)> *<* %S «> S » •»*» •> »** • Ul

n a^liiMli Ml" «!• III* I • •! ' 3 !C tu < ui < ui< >- ~i ui< ui •< ui< jj < lu ua < in < ui< lu < as uj < 3 *s >-tz •-•a£«-i3e-«o£'oqc ••^ocs <x3aea<x:32s<*>9csacqa£ockoa£a£oa£3a£qfyoxa£o * 'xlk'sllsu.S 8 U.XILSU.'SlLXlbXWi.XUiXILXIkinXlLM m

z a o -» z t •>-«— •

<-4 • r-4 3 nx* xi •*«UI •

^ • a. o • >-bxl k-«t— —

ocu. u. q)£m m

' l< III in ,0 (•1

o <m

•h •#• «*

•o td

r-. o m m « o> m

<m o>

l)u (JO ui > u

Page 121: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

IFCTYPE.EQ."PARALLEL " IGU TO 26 IFCTYPE.EQ."NORMAL ")GU TO 27

C 25 CALL OSETUP

CALL CASCAO GO rj 80

C 26 CALL PiETUP

CALL PARLEL GO TO 80

C 27 CALL NSETUP CALL NORHAL

80 CONTINUE C IFCTYPE.EQ."DIRECT " IGO TO 77

IFtTYPE.EQ."PARALLEL »)G0 TO 88 IFCTYPE.Ed."NORMAL ")G0 TO 99

C 77 CALL LISTO

GO TO 66

88 CALL LISTP GO T3 66

C 99 CALL L ISTN 66 CALL LPLOT

ITMAX*IFiX(TMAXI LMAX'JNAX IFtGRAF.EQ. l .OICALL GRAPH(OUTPUT#errand,LMAX,TIMt»1TMAX)

C STOP END

C c**************************************************************** C FUNCTION STEP ~ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

C c

FUNCTION STEP(MAG) C THl i FUNCTION FORMS A STEP INPUT OF MAGNITUOE SPECIFIED BY THE C ARGUMENT MAG. C

CUMMON/LIST/TNAXyKK COMMON/INPUT/FINPT(120) REAL INPUT»MAG

C IFtMAG.fcO.Q.OMAG-O.5 ITMAX*1FIX(TMAX) UU 10 1*1#ITMAX vo

\o

Page 122: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

STEP»MAG LO F INPT( I )«S TEP

RETURN END

C £***************************************************************** Z FUNCTION SINE c**************************************************************** C c

FUNCTION SINE (MAG»W) C THIS FUNCTION FORMS A S INUSOIDAL INPUT OF PEAK VALUE SPECIFIEO C BY HAG AND ANGULAR FREQUENCY W.

COMMON/list/TMAX»KK COMMON/ INPUT/F INPT(120) REAL INPUT* MAG

C IF (MAG.EQ.0 .0»MAG»0.5 IF (W.E4.0 .0 )M*0 .2 ITMAX>IF1X(TMAX) 00 10 l" l» ITMAX r-FLOAT( I ) S INE-MAG*SIN(«*T)

10 F INPTi I ) s SINk RETURN END

q******************************************************************* C FUNCTION RANDOM q******************************************************************* C c

FUNCTION RANDOMCOUMMY) „„ „ C THIS FUNCTION FORMS A BROAD-BAND INPUT BASED ON A NUMBER GENERATED C BY THE RANDOM FUNCTION GENERATOR #RANF• C

COMMON/LIST/TMAX»KK COMMON/ INPUT/F INPT(120 ) REAL INPUT,MAG

C ITNAX- IF IX(TMAX) DO 10 1*1» ITMAX RANL )GM-RANF(A) F INPTI D-RANDOM IF(F INPT(1 I .Gt .O.a IF INPT( l ) -OUMMY IF (F INPT ( I ) .LT.0 .5 )F INPT( I»—DUMMY

10 CONTINUE RETURN END

Page 123: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

£••*******••**••****••*****•**•**•******•****•**•**•**••**•«•+*••** C SUBROUTINE DSETUP c******************************************************************

SUBKJUTINE DSETUP C THIS SUdROUTINt USES A ROOT EXTRACTION ROUTINE TO F IND C THE ROOTS OF THE DENOMINATROR AND NUMERATOR POLYNOMIALS C OF A Z -UOMA1N TRANSt-ER FUNCTION. C IT THEM CALCULATtS THt FEED-FORWARD ANO FEED-BACK C COEFFICIENTS OF 2ND. ORDER SECTIONS FOR A CASCADE (D1RECT-2) C

c c

c c

DIMENS10N HC10)»B( I0 )»C(10) COMMON/CASCAD/AO(10)»A1(10)»A2(10)»B1(10)»B2(10) COMMON/SE TUP/M»N»F(10)»E(10)»U1(10)»U2(10)*V1(1U) COMMON/SETUP/ t f2 (10)»D(10)»D0(10) COMMON/CASCAD/SHIFT I COMMON/PANODi /HO#ISHI FT DATA Ul»U2»V1>V2/10*0 .0#10*0 .0#10*0 .0#10*0 . /

NPLUS2»M*2 CALL PR00T(M»F»Ul* t f l#H»B»C»C0NV>NPLUS2)

CALL SETUP1(M#U1#V1>A0,A1,A2)

NPLUS2»N*2 CALL PR03 T(N#t »U2«V2#H*B»C»CONV»NPLUS2)

CALL S£TUP2(N»U2»V2*B1,B2) RETURN

END

C SUBROUTINE SETUP1 Q*******************************************************************

SUBROUTINE SETUP1(M»U1»V1»A0#A1«A2) C THIS SUBROUTINE FORMS THE FEED-FORWARD COEFFICIENTS FOR THE C CASCADE FORM

DIMENSION F(10)«E(10)»U1(10)»V1(10)»H(10)»C(10)# ABSVALl (10) DIMENSION A011J) ,A1(10) ,A2(10)

C J«0 DO 50 I«1»M IF(V1(1) .NE.0)G0 TO 11

IF (Ul ( I i - l ) .NE.O .AND. VKI+ l ) .Ed. 0 )G0 TO 12 AAl -FLOAT(M) REM*AMOD(AA1» 2 .0 ) IF (REM .Nfc . 0 .AND. U l l l t l l .EQ. 0 )60 TO 13

Page 124: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

GO TO 50 13 J»J* i

A i m — mm A2(J)>0 .0 A0<J) -1 .0 GO ro 50

12 J«J*1 A2(J) *U1( I ) *U1( I+1) A im —luim+uimi ) ) A0(J1*1 .0 GO TU 50

11 IF (1 .Ea .DGO TO 50 ABStfALl ( l - l )«Ul ( i - l ) *Ul ( I - l ) • V l l I - l )»Vl t I - l ) ABSVAL1CI ) *U1( I ) *U1( I ) *V1(1) *V1( I ) IF (ABSVALl ( I ) .NE.ABSt /ALl ( l - l ) )GQ TO 50 J«J + 1 A2 (J ) *Ui (1 > *U1 (1) •VllD^llI) A1U)«-2 .0*U1( I ) AO(J)*1 .0

50 CONTINUE RETURN ENO

SUBROJTINE SETUP2

SUBROUTINE SETUP2(N»U2»V2»dl»B2> THIS SUBROUTINE FORMS THE FbEOBACK CUtFFlCIENTS FOR A CASCADE

FORM. DIMENSION F(10)»E(10)»U2(10) fV2(10)*N(10)*C(10)>ABSVAL2(10) DIMENSION B1(10)> B2(10)

J«0 DO 70 I«1#N IF (V2( I ) .NE.O)SO TO 21

IF (U2( I + l I .NE. 0 . .AND. V2(1+1) .EQ.O. )GO TO 22 A2>FL0AT(N) RtM«AM0Q(A2#2.0) IF (REN.NE. 0 . .AND. U2( I+ l ) . tQ. 0 . )J*J+1 B2(J I -0 .0

B1(J) *U2( I ) GO TO 70

22 J«J*1 B2(J) *U2( I ) *U2( I+1) 81(J) * - (U2 (1 ) +U2(1+1>>

GO TO 70 21 IF ( I .Ed . 1)G0 TO 70 ,

ABSVAL2( I - l )»U2CI - l ) *U2Ci - l ) • V2(1-1) *1 -1 ) ABSVAL2(1>*U2( I ) *U2( I ) • V2( I ) *V2U)

Page 125: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

IF (AdS VAL2 ( I ) .NE. ABSVAL2U-1) )< iO TO 70 J -J + l B1(J)«-2 .0*U2( I ) B2(J)«U2( I ) *U2( l ) + V2( I ) * t f2 ( I )

70 CONTINUE RETURN END

C

C SUBRUUTINE PStTUP CI****************************************************************

SUBROUTINE PSETUP C THIS SUBRUUTINE FORMS THE FEED-FORWARO AND FEED-BACK C COEFFICIENTS FOR A PARALLEL STRUCTURE. C

DIMENSION C(10)»BC(10)*CD(10)»H(10) COMMON/PARLLL/F INOUT( 101) > FK1 COMMON/PARLLL/GAMAO#GAMMAO(10)»GAMMA1(10)#BETA1(10)»BETA2(10) COMMJN/SETUP/M>N#F(10)»E(10)»U1(10)»U2(10)»V1(10) COMMON/SETUP/V2 (13 )# l» ( 10) ,00(10) COMMON/PANOOl /HO#ISHIF T COMPLEX P1(10)»R1(10)»R2(10)

NPLUS2»N+2 J*0

IF (M.NE. N) GO TO 22 DO 33 I«1»M C( I )" (F( I ) -E( I ) ) *HO

33 CONTINUE MM-M-1 G3 TO 77

22 DO 66 L*1# M C(L)* F (L )

66 CONTINUE MM«M

77 CALL PROOT(N»E»U1»V1»H#BC#CD*C0NV*NPLUS2) DO 44 I - l /N P I ( I ) -CHPLX(Ul ( I ) ,V I ( I ) )

44 CONTINUE CALL PFEXS0(MM,C»N#E,P1,R1, *2 )

J "0 DO 55 I -1»N IF(AIMAG(PI (1 ) ) .NE. 0 )G0 TO 11 J»J + 1 GAMHA0(J)«R1(1) GAMMAK J) «AIMAG(R1 ( I ) )

Page 126: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

/

104

\f\ H-4 lA

<-4 a 0£ b* O < (d C

< A • 0 •

• CM 1 <M • •H 1 *

•H **

a. w 0 < & a. c •H -J < < <

UJ uo a: to * < • 111

—ON-M • •

Z • *•» a.« u. A at— »-* AM

t-4 H 4 O— <UJ tll^X a. ujoe Of f-lin

a. c*+ -j a— < 0 •' *OJx LUO • <•»» oc • (M I —I\|UJ at I o h • anl act n n • < —• -»«. « m —•

.lA.TI*- Ul —— «-fl ©-«•<—-*<—:»:Z hn"3 <-*<cc-*«\» <"•>««*

lu-uou-u. r <<» ui-uooluz aJcoL9-«>-i-»,j'j>-~®rau_ij*Lu

<a h-* z z * »o <1 * z-» a » at- & * •*< • * ^HJZQH * (_>< LiiCSujao * <^ae xo * s>-t ae**<-i » I -JZ jju. * o<oa. • * UiUI <«'-9 * uiaeoa.03 * U. LL1 U_< * _jc/> oc * *, * zzauiza. * <ot xat/t » Olrtt-Hlfl * az-* >-< * nc Z< * <Qt >-<~JZ * mO * QtQZioJ * O0£ai*-< • * u.O<^a£ui</> * 1 uoioez * • -4TJ < » oxu.o_i<* * UJH-U.Qi * JJZUJ z * u. DQocui * JuzQtu * uj< <Ziu * xaeai •-< * t-ui'/ll/ia * zaj>-iz * * i/v-ux-xt * Zl9t-_J <A * •* 3lUCK * o<u.z</>uj

a.* u. o o'-it— 3» ae moj K»6.UJ,3ZJZ« UlfrSZIiOj U. t/>» MHU. Z* Ult— V1NZU.J * v»3*-< 0<

ai»Z9ZJ>>OK z* oeuis-nz'-" —•* lutj-4t: 3'j ^»Z3ulK03M 3» -ii>T-<TlJOCQ O* •— u. U.* 0e»3(/*U. UK eo» Ot-numa: o»-t 3* otxaxuj_i-< (•># ast-i_>^-Ot * 3

HOO

U.r-«X\ O «C9ti. % +—ae «

—o<-» O O 0-4 *0 H H 1 <

—so— <M ^ <M<<^«r -O > aJwu. ^ % •vt/ia. •> * »»a»<— ^ O 0<(J0 O ^ -4 +Mr4

—.x— fM — CM -4C>^-ro CM ~4 3 OH OIL (/) 3 CD % •>-»-» •> "D -J ® ^ -0£0- •J a. % O OO-tO Q. z ^ *4 HU.-H z % O «-»— -OK- A H HO VX «N —i > z w r>^ < z 0 < « »r» •> 0 0 0 —0 * jz u •k z ai 0^ -to-00 a «k 0 0 « * wHMfHH z O %(/) 1-4 O w— x—x— V ' % dz H-% UiO «(3a.r JUI ~_J 33 CJ -»(/» » ftUI —0 * 1-4 UJ O u- oo«-> •> aca. X ia -S OOM l£HXOO~ * <MO —ae >UJ O «3 *—»«H t-a > Z CHU.OH xX-»i9eo— <t- •s M O

«kt-4 % <aeo-4J ««o 3< H OQC O MNZ-O c *rta«o -iae 3 «UJ UJ w^O %<MZ h»«HO0 u.-u % ujd </)

SvC>v HO<IH~ ««.z Li. u.-4k-a.wo 33 % ZO<M«

<<0.0.0 »X«H •Z «fSl — ctoan ^a.X-» •»«-• -»4 »H»Q; Z:H-«*»-»-z arjujoK ZZMMO.

i/J )-9«>u MZ»hqJ

farjorso Z^H<NO Cuio^ae—

oaooo Ui )UUl)

a-*aca. uo

uu uuuuouu

zmi-ZSZ «< •.•••On O^HK *4* roisiocu n uj n oai n 9eoc»a.uj_ic •-iXt-iMa.3 !/» 3

« <</» _l—I B2 O—QC3-»a.-IE» ~»a.o.< ugaae D09ZU U.03 3o u.

(j u

Page 127: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

IF (V I (L ) .NE. 0 )60 TO 66 BB(L)* - (U1(N-L)+Ul (N-L+I ) ) CC (L )«U1(N-L)*U1(N-L+1) GO TO 77 BB (L ) * -2 .0*Ul (N-L I :C(L)>U1U-L)*U1(N-L) •VUN- l >*V1(N-L> FORM OENUNINATOR SECOND UROtR SECTIONS 00(L)" -2 .0*U2(N-L> EE (L )«U2(N-L)*U2(N-L)+V2(N-L)*V2(N-L) J«.-l IF (L .E Q.1)J»L IF (L .EQ.a)J>L-2 IF (L .EQ.7)J-L-3 IF (L .EQ.9)J*L-4 Ql (J )»CC(L) - tE(L) Q2(J) *d8(L) -00(L> CONTINUE

OPERATE ON DENOMINATOR POLYNOMIAL.

00 70 I *1>N»2 P( I ) * jQRT(U2( I ) *U2( I ) • V2( I ) *V2( I ) ) P( I+1) *SQRT(J2( I+1) *U2( I+1) +V2( I *1 ) *V2( I+1) ) IF (P ( I ) .NE. P(1+1) )G0 TO 70 S IGNA( I ) *U2( I ) OHEGAd )>AdS (V2( I ) ) RHUl I ) -P( I ) X( I ) *JNEGA( I ) /S IGNA( I ) RA0(1) -ATAN(X( I ) ) P I -22 .0 /7 .0 THETA( I )»r tA0( I>*180.0 /P I RHJSJ( I )>KHU( I ) *RHO(11 RHOFORl I ) *RHOSQ(1)*RHl )SQ( I ) ABSLAMd )«RHO( I ) F1( I ) -1 .0 -ABSLAN( I ) *ABSLAM(I )

»»' «x.o-*Haso« i >*cas <2.0*«*0ti > >i

ZETA-5.0 J«I -1 IF ( I .EQ. l )J« I IF ( I .EQ.d)J- I -2 F3( I )»SQRT(2 .0*F1( I ) ) F4( I I -F3( I ) /ZETA F5d ) * ( (QKJ I *SlaHA( I ) *Q2(J ) )»*2 .0 1 / (OMEG A ( I ) •OMEGA ( i 11

PHI0EG( I ) -PH1RA0( I1*180.0 /P I Pr I I ( I ) "PHIDfcGd ) 4 -180.0 *d>*S3*T(<J2U)*Q2(J) +F 5 ( I ) ) ARGl( I )>THECAP( I )+PI /< t .O

Page 128: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

ARG2( I )» (PHiCI ) *P I /180 .0 - THECAP( I ) -P I /4 .0 )

BB1(1)>F4( I ) *S IN(ARG1( I>) BB211 ) *F4 11 ) *COS( ARG1 ( I I I Cl ( l )> i )0 ( J ) * * ( I ) *C0S(ARG2< I ) ) /F4( I ) C2( I )»00 lJ ) *RCI ) *S IN(ARG2( i ) ) /F4( I»

70 CONTINUE RETURN END

C**************************************************************** C SUBR3UTINE PROOT C****************************************************************

SUBROUTINE PROOT(N#A#U* V«H»B »C »CONV»NPLUS2) C THIS SUBROUTINE FORMS ALL THE ROOTS OF A POLYNOMIAL WITH REAL w COEFFICIENTS OF THE FORM A1 +A2*S * +A(N*1)*S**N«0 C BY MIRIAM SHAPIRO (ADAPTED FROM LOS ALAMOS ROUTINE LA-PROOT C BY T .L VORDfcN) r»

DIMENSION A(NPLUS2)*U(NPLUS2)*V(NPLUS2)» H(NPLUS2)#B(NPLUS2># * C(NPLUS2)

C0NV»I .E-3 i NC»N+1

CSEND COEFFICIENTS TO REDUCED COEFFICIENT STORAGE D01I» i»NC

1 HI I ) *ACI ) C IN IT IALIZE GUESSES AND SET REVERSAL INDICATOR NORMAL

P«0. a«o. R»0. IREV1

CSCAL1HG TO BE DONE AT THIS POINT CREMOVE ALL ZERO ROOTS

3 IF (H(1) )4*2>4 2 NC-NC-1

V(NC)«0. U(NC)-0 . D01002I"1»NC

1002 H( i ) *H(1+1) GOT 03

wTEST FOR VARIOUS DEGREES 4 IF (NC—1)5*100*5 5 IF (NC-2)7»o» 7 6 R — H( l ) /H(2)

G0T050 7 IFCNC-3)9»B#9 8 P*H(2 ) /H (3 )

3*H(1) /H( i ) G0T070

CTEST TU REVERSE COEFFICIENTS AND DO SO IF TEST SUCCEEDS

Page 129: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

107

o H % o

X a »— qc 0 OJ

M oc Of ** O . C* Z U. 0 w CM 0 </> •— •s CD (/) O 0 < ui ir> X 1 H * <

O O (A X

O X a X < UI M

1 X H» I^ u ac + • -*(*! 3

0 H LL Ui 1 m 0 CDUZN -*ac O H UI 3 <M Z «K * H* Od <*<*-» * "-"BO. w» O* < uu • • ox + + «*m oox XUJ X*"« ** ^ H •1 ZZOO H % «-(* l/l>4

• c/» y» UJ 0 O Of a. X

——0 fO^PO NN^- * * * + •'./» cn^no

romr-* * *

00 U< <nenO • •CD OO 1 1 u. ujluuj -»

t i l * 4- • ~ 'J •-li-«(jrO-*(\l-* * ——z •»——•«* * * tflro >»•<»«»—•«!*> &.&.<¥ «*—»—» coo * I I OI<M<M<NJ^ I I'!"» —

30»>" * II *1-^ 1-1-l CO— unII—H^ *

^ '•*—rjco tst-4 >-<-«Z-«f»so®N»

-ii* N >0

o Q>»

*»u

>»#

"0 + I •* "IS —(_» VJ» —(\J <\l— —CO • I —• *

X *> _ . _ TS I <NJ «t ••• _l * U-"H -Tl I « II _l-4 I N • O-'-MHtauN^W/IU-m I < II It *> H3^~X<llJ«»*++unH | II I N • «"*S010 • —x_>—o *3>» •* •;_> •ayuuzo^u~~<u+0 I cof^u——• or X< <<'*•-• 3 I -»q*4-ILUJZ^ «irn-oi-a-4-w nzzzzi«M2MHMMKHot hizhho——<u»a31—0.0 •h* 11 a-1 n —a.mam nu.« «N —-aoa*«••—ttu. iqi<0« ——u.u-u.ukll«»u.n nan * HS3Zu.xXHa(9a.nMecZ'jj«ucauZ0QM«UHHKtf9f oMigo MWHHUo-ia.ooa.<-»

a ui •— i>0 H N m o —1 .tf-fvJ 1*1^0 P-i-o -Hcvjmj- if* <0

H oj rj i\|i\i N<«> mm rnrHrom m m UI Z t-u u (I

Page 130: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

40

51

52 53 5*

71

LINEAR ROOTS

QUADRATIC ANt) S FORE ROOTS

49 CONTINUE E*E*10 • IF (E-CONV)20#20#40 CONV«E GUT 020

CLINEA* . COMPUTE AND STORE 50 NC»NC-1

t f (NC)»0. IF ( IREV)51#52#52 U(NC)»1. /R G0TU53 U(NC>«R 00»41>1#NC H (1 ) >B( I + 1 ) G0T04

C QUADRATIC• SULVE 70 NC»NC-2

IF (1REV)71#72#72 QP- l . /U PP»P/ (Q*2 .0 ) G0T073 Qp.Q PP«P/2 .0 F* (PP M+2-QP IF (F) 74# 75# 75 UF IMAGINARY ROOTS. U lNC+1) — PP UCNCJ—PP \MNC*1)»SQRT(-F) VCNCI—VINC+U G0TU76 OF REAL ROOTS. UCMC4-1 I > -S IGN(ABS(PP)*SQRT(F)#PP) V(NC+1)*0 . U(NC)«QP/U(NC+1) VCNCI-O.

CFORM NEW REDUCED COEFFICIENTS 76 00771*1#NC 77 H(1) *B(1+2)

G0T04 100 RETURN

END

72

73

CCASE 74

CCASE 75

C SUBROUTINE PFEXSO

SUBROUTINE PFEXSD(N#A#N»B»P»R1#R2) C SUBROUTINE FUK F INDING THE COEFFICIENT^ IN THE PARTIAL C FRACTION bXPANSIJ* FOR SIMPLE AND DOUBLE PLUES OF A : RAT1JNAL FUNCTION F(S)*A(S) /B(S) WHERE THE POLYNOMIALS

Page 131: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

C HAVE THE FORM A(1)+AC2)»S*AI3) *$**2 . . . . C M*DEGREE UF NUMERATOR POLYMOHIAL ACS) C A»ARRAY OF COEFFICIENTS UF POLYNOHIAL ACS) C M-OEGREE OF DENOMINATOR POLYNOHIAL BCS) C a»ARRAY OF COEFFICIENTS OF POLYNOHIAL t lCS) C P«ARRAY OF POLES FOR WHICH RESIDUES ARE TO BE FOUNO. C R l 'RESIOUE OF A S IMPLE PULEjCOEFFICIENT OF F IRST C DEGREE TERM FUR A L iUUBLE POLE C K2»RE5>IDUE FOR A DOUBLE POLE (SET TU ZERO FOR A : SIMPLE POLE) c C THE COEFFICIENTS OF THE POLYNOMIALS ACS) AND B IS) ARE C PRESERVED.

C HUELSMAN, "BASIC CIRCUIT THEORY WITH DIGITAL COMPUTATIONS"#^* , C

COHPLEX PCi0) ,PAC10) ,RlClQ)#R2C10)»CV»AV»CDV#CDDV,SA#SB DIMENSION A(10)»BC10)*CC10)»CDC10)»CDJC10)

C C CONSTRUCT THE POLYNOMIAL C(S) EQUAL TO B(S) AND F IND C ITS DERIVATIVE.

NP»N*1 DO 3 l« l#NP

3 C( I )»B( I ) CALL DIFPLCN»C;NM»CD)

C C PERFORM THE PARTIAL FRACTION EXPANSION PROCEDURE N T IMES

DO 49 K*1»N C C TEST TO MAKE CERTAIN THAT S»PCK) IS A ZERO OF CCS)

17 CALL CVALPLCN*C»PCK)#CV) IFCCABSCCV) .GT.0 .001)G0 TO 42 CALL CVALPLCM»A»PCK)#AV)

C C TfcST THE DERIVATIVE OF CCS) TO DETERMINE THE ORDER C OF THE ZERO AT S-PCK)

CALL CVALPLC NM#CD» P CK)»CDV) IFCCABSCCDV) .LT.0 .001)60 TO Zt>

C C IF THE ZERO OF CCS) IS SIMPLE»COMPUTt THE RESIDUE C R1#SET R2 TO ZERO* ArtD RETURN

CK)*AV/CDV R2CK)»C0.0*0 .0 ) GU TO 49

C C TEST TO MAKE CERTAIN THAT THE ZERO OF CCS) IS NOT C OF HIGHER ORDER THAN SECOND

25 CALL UlFPLCttM*CD»NCfCi>d) CALL CVALPLCNC*CDO*PCK)fCDDV) IF CCABSCCDDV) .LT.0 .001)GU TO 45

o vO

Page 132: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

C IF THE ZERO OF C(S) IS DOUBLE #COMPUTE THE THE C COEFFICIENTS R1 ANO R2 FOR THE TERMS IN THE PARTIAL C FRACTION EXPANSION

R2IK)*2 .0*AV/CDt)V PRK«REAL(P(K) ) P1K>AIMAG(P(K) ) SA«(0 .#0 . ) IF (M.EQ.d)GO TO 34 CALL ROOT(M#A#PA) DJ 33 I»1#M

33 SA«SA+C1.#0 . ) / IPU) -PA( I ) ) 34 SB"(J .»0 . )

OU 39 I»1#N IF(ABS(PRK-REAl lP( I ) ) ) .GT.0 .001)GO TO 38 IF (ABS(PIK-AIHAG(P( I ) ) ) .LT .O.001)GU TO 39

38 S8-SB+(1 .0#0 .0 ) / (PtK) -P l I ) ) 3 9 CONTINUE

R1(K)>R2(K)* (SA-SB) GO TU 49

C C PRINT ANY ERROR MESSAGES THAT ARE REQUIRED

42 PRINT 43 43 FORMAT( /40H0FUNCTION F(S> DUES NOT HAVE A POLE AT P / )

GO TO 47 45 PRINT 46 46 FORHAT( /42H0P0LE OF FCS) IS OF GREATER THAN 2ND ORDER/) 47 PRINT 48# P(K) 48 FORMAT (<tH P -#e l l .3»3H + J#E11.3 / ) 49 CONTINUE

RE URN END

C C

C SUBROUTINE ROOT £ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * • • * * * • * * * * • * * * * * * * * * * * * * * * * • * * * C

SUBROUTINE ROOT(N»B#P) . _ , „ C SUBROUTINE TO DETERMINE THE ROOTS OF A POLYNOMIAL OF THE C FORM B( l ) +B(2) *S +B(3) *S**2+. . . .+B(N+l ) *S**N USING C THE L IN-BA1RST0U METHOD.THE POLYNOMIAL B(S IS C PRESERVED. C N- DEGREE OF THE POLYNOMIAL B(S) C B- INPUT ARRAY OF COEFFICIENTS OF B(S) C P-COMPLEX OUTPUT ARRAY OF ROOTS OF B(S) E*

C HUELSMAN#"BAS1C CIRCUIT THEORY WITH DIGITAL COMPUTATIONS"# 1972 .

Page 133: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

Ill

Ui Ml "1

o (MIM m

w H (NIK a -«w»» r» * O ZOLU * H» —»• a o OH-I t- n t— H O + oo MA UJt- i-o>

o HI 1 -»n>ro OUI <o o O a--« m—>— >»o a

% *o I i ii i «*OUf oo A o u* * <-» —H- o o 1 HtE • CM«M <M< <o © 1^ LU (MOO HOrg I a 1 Wi • a m CO'Ji O 1 1 m» a LUIS UI -o iH CL ro — • # 1 ->-» •~O.H» • % • z c <*1» MiM

H- at «r O —NtJIM •*> •a o O ** 'J H- IMI l« >—OLU LLI-44-• *- m, * o~«uu»* »(S4 1 -Jfr- (3 • •~o A UI *r M o s; 1 ~|(\J» •-4-H— •H | -•< •c3

a. -» mm • ac <o 3*» o c «>MMMH09m3iva-ii «•% • ^ 1 C »4S*-40 % ^•a. 1 a. % HCZ031|— ' i CM* a N *Hf\J ^?o. % o <4YC C— 1 1 —»Q Ol 'CI • sO • * ~ H « J — < * > * H M O O ^ J I N Q # MX • —w N —O a -l*— <00—(J •>- «-l • •< I I w-4—^'J-HaQ— IStM UJ.H NO^NH I » I < I O Jl*l —4I-H-I II II • —I O • • !/>"* </VJ "T_l + II <8 II It -H • -fTJ I II «-«- *«-»-. NUN • | (M | !:•>••>« lilt 19——-l!\lffl-H« H lua. E+-<N'«- I CCH£«440f&a.l«'>««£t'<)t I * II H • N • H «934HH4u SCZI HX H«»| WUK aaizrcccrx —(/) MO H o.'3-an—' «u.a.aiLt--iMH-«»«»«»«—ii.roMMM«»wwHN'HHNMiiio3HMu. OU.M oucc04H04aCHC(9HHoaHo0iiiu0ui-4cazzcuam0a(9Ud(90900aH o**m

m«r r» in r-co •rir\ t*. "*fi «h corn >r .*•.»-

Page 134: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

IF IDISC.LT.0)G0 TO 55 , P(M>«CMPLX( l -a2*DISCR) /2 .»0 . ) P (M- l ) *CMPLX(C—Q2—UlSCR) /2 .#0 . ) M-M-2 GO TO 5?

55 DISCR«SJRT(-DISC) PCM) "CMPLX(-<32/2 .» D ISCR/2 . ) PCM-11 'CONJGCP CM))

59 IF?M.EQ.O)RETURN MP*M*1 DO 62 I«1#MP

62 A C1 ) *C C1 + 2 ) IF CM-2)67#64#14

64 Ql -ACM-U/ACM+1) Q2*ACM)/ACM*1) GO TO 46

67 PC1)*CMPLXC-AC1) /AC2)#0 . ) RtTURN

69 PRINT 70 70 FORMAT( / /34H ROOT SUBROUTINE DOES NOT CONVERGE/ / )

RETURN END

C C ^ r > ± ± m • • • • * • * • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • C SUBROUTINE CVALPL £*••**•****•+****••************************•********************* c

SUBROUTINE CVALPL CM# A#P#VALUE) C SUBROUTINE FOR DETERMINING THE VALUE OF A POLYNOMIAL C ACl ) + AC2)*P+AC3)*P**2* . . . - * , ACH*i ) *P*+M C FUR A COMPLEX VALUE OF ITS VARIABLE C M-DbGREE OF POLYNOMIAL C A-ARRAY OF POLYNOMIAL COEFFICIENTS IN C ASCENDING ORDER C P-COMPLEX VALUE OF FREQUENCY VARIABLE C VALUE-OUTPUT COMPLEX VALUE OF THE POLYNOMIAL

C HUELSMAN#"BASIC CIRCUIT THEORY WITH DIGITAL COMPUTATIONS"#i COMPLEX £ (10)#P#VALUE DIMENSION A(10) MC»M*1

Z STOi<fc CJEFFICIENTS AS COMPLEX VARIABLES DO 3 I - i# MC

3 BC1)»CMPLXCAC1)#0. )

: STORE VALUE OF HIGHEST DEGREE COEFFICIENT

Page 135: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

VALUE-ti CMC > IF (M.LE.O)RETURN

C ACCUMULATE EFFECT OF OTHER COEFFICIENTS DO a K-MC- I

8 VALUE*VALUE+P+d(K) RETURN ENO

C C c**************************************************************** C SUBROUTINE DIFPL q***************************************************************** C

SUBROUTINE DIFPL(N»A>M#B) C C HUEISMAM,"BASIC CIRCUIT THEORY WITH DIGITAL COMPUTAT IONS",1972 : SUBROUTINE FOR DIFFERENTIATING A POLYNOMIAL OF THE FORM C A(1) + A(2) '»P»A(3)*P*»2 + . . . . •A(H+1)*P**N C TO OBTAIN fHE RESULTING (DIFFERENTIATED POLYNOMIAL C B(1) *B(2) *P+B(3)*P**2+ . . . . + B(M*1)«P**M C N-DEGREE UF INPUT POLYNOMIAL C A-ARRAY OF COEFFICIENTS OF INPUT POLYNOMIAL C .1 -DfcGREE OF DIFFERENTIATED POLYNOMIAL ( -N-1) C B-OUTPUT ARRAY OF UF COEFFICIENTS OF DIFFERENTIATED C POLYNOMIAL

DIMENSION A(10)» B(10) DO i I" I *N C- I

3 B( I )»A( I+1) *C M«N-1 RETURN END

Q***************************************************************** C SUBROUTINE CASCAO ;******************************************************************

SUBROUTINE CASCAO C THIS SUBROUTINE SIMULATES A CASCADE (DIRECT 2 ) FORM USING Z SECOND ORDER SECTIONS. C C VALUE OF COEFF. B1 MAY NOT EXCEEU 2 .9 IN MAGNITUDE. C VALUE OF COEFF. A I MAY NOT EXCEED 2 .9 IN MAGNITUDE. C VALUE OF COEFF. A2 MAY NOT EXCEED 1 .9 IN MAGNITUDE. C ALL OTHER COEFFS. MAY NOT EXCEED 0 .9 IN MAGNITUDE. w C

DIMENSION SUMI(10)»SUM2(10)» ERR(10)»SR1IN(10)»SR10UT(10) i#SR2QUT( iQ)#F0BAKl(10)»F0BAK2( lQ)#FDFWDl(10)»F0FMD2(10)

Page 136: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

114

X JJ z

X fH <-» — a: xi oi H-ro so z- » »>- «•» *-'/» o •» •> "H laZ""""*

-»Zi-«0-* ozt'ta H3UI- •> ••at »v*" ZHXZo -< <*^ air—liucfif\j t/»n «Z< «u.Z « •>

* % X

lA % O <SI

Of Q at at

O *SCQO —«UJV-ZrH •> —'Zra -» .HO «0-H t—ir>-» iKOXd< u. «0 OC-KZ » MOIM UJKZ •>«"-*X<M«-« « •*!—1/IOf—

OI— OH hhwh *»•& « »UJQZ4'/)ia.H4

it z sx9faeaaH3%f-

n C\|~ »«> o % »•» • 3 *» O H ro • at >»f» «<MO

^•»»'JU3N 3»»

ot/tcnoou&aHj —zzzzzzzzz naoooooago sccnttzcc strzzttctz M?009000?0 »U> JOUUUIIUU (M

X est •x z * a

z * — a o oo *-W • X • • < t- <VI tfOOOOO -I < >. 3 rsl ovimhmmOOO C »-• X*-*- • *•*•* • * • — _ l I I M - ' X — < / > < odea's »>^HH-»-zi033— i-

»- u. • • hoo^*«I ae -* -««z hmcci < Z Z(BSOK«333 t-•-t l/)ZZ9V>l/IMMM (/>

mo fw x —odo—n-oo® *oo—

•> *~> « ^ • «0 OHM M«^3ryjw00*"0 • 5 H %

CD^SHMIM «0.<M % *-» «t(M nOX I < | <^hzo«"»<»«»S«» «A * « « • > < O l . U U - J O « «.»o<»aCHIL<«wQw«)w|LX •71TJOUJ *OHHX-«<«NCs <Mwwiu.~iiQaiiCOziii «

« •>-» 333D~'>—«u.u.u.in *1/1 «r» ooio^iHiao •> »«•» *-» • -H-H(\|f\J—»—5C—'U.U. 1/1 "»"•»-»-»0-» a:aia:QC'H-H<-« « o.*—«»->«—«-» vcAM^sfesam^ca.aeMHtL"

qc-40c t—t—co-au-u.* JCk-3ujQeaex3->

u-JjjQ'dM'Quj^iMSwatiDiMaM Zt——"->:*303 Oil. U.OU.H* ta-LU—-* at »—4hfl-^C£ZC»<'0»<'»00Jw00Qt9f w •ko.-jo. «MV)ui)'/)0Q<00n<a3QaH'/)ui XHZ3ZHI N H lOOIQlQI<ta< AN * WIHtH H «•»-»—<<</»<<<l/>Xt/»<XX— U.ZU-"llL~»~»->-»-»XX » XXX N M XOOX>-»-»UJ H n ii ii a »»i/i N «*«—o H » « "» * • II "»—~» » < ho. a. a. pj< :*< •* a. a. -«a. a. a. a. a. za z zzt- su.eou.i;xcz£ccae«xi-«(MHZ t-o«H33Q3Qoujjj3uJii ursat;* jj^oaeoco -4r>^-tL.r3tsu.a.u.ii.t—t—k-<>nujuuk-nttL^ooo

3 a. z

-•X H X<—X <ZZi/»

( too o —<t >'-»o

o o N

»

Page 137: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

SHIFT2«2.0** ISHIFT FISPUT"SHIFT 2*UJTPTJ OUTPTT(N,KMAX)«FINPUT

100 CUNTINUE RETURN END

C C****************************************************************** C SUBROUTINE PAkLEL ~ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

SUBROUTINE PARLEL C THIS SUB-ROUTINE SIMULATES A PARALLEL STRUCTURE AND CONNECTS C KK UF THEN IN PARALLEL. C VALUE OF COEFF. BETA1 NAY NOT EXCEED 2 .9 IN MAGNITUDE. : VALUE OF COEFF. GAMMAO MAY NOT EXCEED 1 .9 IN MAGNITUDE. C ALL OTHER COEFFS. MAY NOT EXCEED 0 .9 IN MAGNITUDE. C

D IMENSION SUMl(10) fSUM2(10) ;ERR(10)»SR13UT(10)» SR20UT(10)» lFOBAKl( lO)» FUt tAK2(10)»FDFWD1(10)»FWD1(10)#QUT1(10)

CUMMUN/SYSVAR/EXIT»RLDUNE»IF ILE#1RUNN0*T»NTMAX»TNEXT COMNON/SYSVAR/DT» DTNAXjDTMIN*EMAX> EN 1N» SY(35 ) COMMON/SYSVAR/NBI IS»NBU#NBH»NBA # NY(*0)

C O M M O N / P A R L L L / F I N O U T ( 1 0 1 ) * F K 1 . . . . . . . COMMON/PARLLL/GAMAO>GAMMAO(10)*GAMMA1(10)>BETA1(10)»BETA2(10) C0MM0N/PAN0D1/H0* ISHIFT

C OMMON/OUT/OUTPTT(120>5)»ERR0t (120,5 ) ,JMAX,KMAX COMMON/1NPUT/FINPT(120) COMMUN/LI iT /TMAX«KK

INIT IALIZATION FK1«1.0 /2 .0** ISHIFT DOUT-O.O

NBA'NBITS NBM*Nr i IT S

DO 10 I"1#KK SR10UT(1)*0 .0 GAMAO-HO SR20UT( I ) *0 .0 SUM1( I ) *0 .0 SUN2( I )"0 .0 F1X0UT( I )»U.O

10 CONTINUE

START SIMULATION 1TMAX»IF IX(TMAX) DO 100 N*l»1TMAX 0UTPT*0 .0 F INPTJ"SMULT(FK1#FINPT(N)*1) DOUT"SMULT(FINP TJ*GAMAO*7) 00 203 J»1#K<

Page 138: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

116

CM

roro-r 1A

ft "• o*» ———O <M HHN *<» «<>N * <<<—^>o<n>.o •—zt— •* * ft"~ •> -o<rco%j *>a. •>«•»-> I O I *-tr—a~ •> % *<o.IU-»<>H

tQ ">n3UJ ft""**-* — - « C < U . »—h-t— ft 030 ft

•>— ooonn •>—•-» acae oc <-> «ww«azofs Jjjaa-n-o 330U.U.0—' »-U. TN—QOJ-t/)i/)i/>a!a« 33a N N (OOKSO «*-»«» -»-»^XX IMII N »(/»

« M -»-•-» » acoj(:-«(M—m 43<a.o.H»^a. oSlkOBZCCKaS ooaojiusaesuj itit it •—>—</) aiuLt—

vO ft © *

tA * o*H f-a. a— oz

LL. t-t-ft 0.3 ro -» -» »—O n. -» -» 3Z Z «• w OH U i t — — U .

3-»»- a • o«*

o—*t*o <x o<Macac + x< <3Ci/t-Ut- «/>Z S3 M N a. N (/>(/>•«<«»— ft'-U • • mauizzs »-«-33—Z

» Zl— «»»33H-Ol> •— « <M^03«t*-3a.ie3 33a£r*!30-«3UaiZ oai/t</>ouu.o acui

o O (M

* * *

* *

<_» 3 oc

• <

ae •JJ O <K a

* *

» *

z IM < (S)

Ui za

* «>c * <UI * -IX * 3t-* c * -<u.

_i# «>»o <* -i S*<UI* 9(*SZ^ 0» OC-H Z»0»—</t

«Z3ii uj* ao Z#ai*<t «-<• ZK'J |.»H3 | a# 3 u 9£*0'» m-» ac«-ia 3*axz (/»» 3*-< * 01

0>«-« •z il>(9 <

OC UJ LUZ (J~« X Uio •

•-o o z a

>-mj <UI ru x (MUI

U »— oa zz

uc • • Mt/) u.u. U.U. 'jjuj ao

U.3C Oju

X no 3

tr> o M

* O ec ae

"ix —' -4

OL-X (_> •.•^3-U ft —OZ ~ ON •>- O —

•> -< O x «<OX - H 4

(NJ — C cewzm « -« si 3u.t»>~<n a > •> M «.3Z<« « ft X •>-»a *>•--« < —O •>>-!/» o o z OH* ft ft -« -4 -1 H-OOZ-»-•«HHZHO<H H^«zc«a E4m3ii-m 3A^ae »>• •» Vt04HXZo •TLTD *4 %O — ftOUJ*:<H 0~ i.-joj'ij— —to »z< "•H ltz *J>

> 11 3NHftZSC OZ«UlhZO IM«MZO ft « ac3a(Q ft3-» UJO^IA — i/izacoxrao «HIL « o ftU.tU_|<Z^4 ««HO <M

ft ftaez •«-•—oax<M f* 0»«« »)>M40 FTTFLRT^W HOOI-OKZH-««M-

ft"^l!>"»ll»0 ftl— ft^ i — — ' — x t — m o h x z 3-<HUIOZW)L>S,'I0t4H oz(*nv>vs «msi-zi1z -»»-<a£^QCQe_l_jZ*^3>-^0 B£3LU44444N>IOO,»'- V)Z ft»>SZ&eiOvH3i. it-^H"»«03Zt-wi4 ^>00

Z »OV>-)'GD>-t-«HZN t-t— QaiH|/)l/)WlZZUJIU^a>JHH >-<—» HO""X>S SX^WNNXS J COS -«^ZZZZZ>xtZZZ4 zz z-^orjoonzrouosM N * u><04«tccoo«ccz)- <r: zcazzccccczrztH as® HSOOOOOOCZOOOOZ 3^u.(Juuu'joauuO'j-4

uo -^-4

M 3

HO =>-»

ft*»

—o oa H ft

(JUUL) <_>(_>< lO-JU O U

Page 139: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

117

-ItM —— • •— <<

St » » —-J V-D JJ —»-^x: »«•• i\j_j -Jim

(\l< x i • n - o c o — » n

a, »OOW't«— k « « »kN©

1^«n»nOO ft » -j-j « »oa

HiMi-ngK—«»«-.-» • • ~ a. oaasfl'finoj- J-— •—k-nCD rsjo^ in-»•——•«•» cj-«rvjrOf-m Q.CLQi(* >«ma>'5tss-»_»o •»© •>

-»ZZOOI/1 »H03<<-"' *>oooooooo »o • »•» atitu.'flishnim ft ft ft ft ft ft ft «n %

ft U.U.-»•»->—• ft «OQUU>-»«'4'H^^MMNI-IM H» ft f t ~ » - > « • » " » - » » • • L I . L L f t f t O . ^ - 1 — t — » — O L t — 3-.-»«*— <-»-»-> ft Q.O.CLQ.0.0.0.0.1—O. a.-»«0.«—«»«"»—-»-»3t-»-3«-Z»"t£UUHNl-)>«»03333333303 •-•'H<\j(.9c'>*:ujzz--—>-*- «aaooooao «o U.Baiwi-tOtHH^)M33^ «*•>*««« »0 « ft«tfii/V/> I a33St!33t-HMM^ift«S»0.0

z x ZZ33HNi.a.a.a.a.o.<io.\rH 3 <«•• •>•—»-•-»—*"»— u.u.(/tvtaeaeH>ccscs;cc9riuo-—» £ je —_J_I _i-J _j-JI/>T3ujuj'.UUJ tu-Uujujt-ac h- M-^0333^3303l3--nt-l-|.kl.i-l-i—U)

^ • • < Hb^oecctzzosQa^xo^MOMOxaK yIOOOO —I ftO- «o|/IV)'')l/)i/ll/)««.JJ0aQ3QQCIQ00« til •• 3X-HZHH I a a « a «tIIIM5QQ3030Q0<0 >i«»09 e< » « • j*«>—'»'»nt^Miflrr««««4t3 IIHmI n iu^acstu.-»3-»-^-»*^"»^« a "

oo

^9al R w—— MM l/>(/t</>(/></tl/tt/t</>(/t H X ujuj-»— h a —»z • 0>—of>—• a a a a a a a * o'o

in • \J»««^033—a ZZ)<1i\£^—h a • * £ • * : £ j> » — - ho •r)-«a. (mh-i-h(m-«»m a. o. 0.0.0-0.0.0.0-0. qlo.->

w —r-)f\J~—lSJJZ him££z4c z 333goa<accoi«H»>ztscrcr»ci-•a.u.eo«>4(NjH4SC309Cf«330^-H>o>-«aazz90ao33W33'aiuiuiuiLuujuJujvuaj3

o ft 3 a Q

o->-> —

aacic a oc<x <JJ-U X a a

a -»-»uj 3»-t--Z a.33-« Z33H mhMZ U.WO

tn o o f*J

Page 140: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

118

» »

» * *

* •

00 LU •a <

K— CI

x <— ca t—rr» z— •»>•

X •"!/» x % * x or-x z«o X > zx«

O X^» 3Ui-ui xi— at •>>-O XH >4XZ 3 0£<fl •,< a, 4 UI UiZ<

•>!< _IJj« 0j -lea m kz to *-Z U.Z % «Z HMZ

r»4 UJ(/> nCd * •>

#u. *-4 * I * uo »z * •»

Q»X o# — < » Q x»o l/l» < »x z»ir> o* -<#z (-*3 «_>»"•* Z»l-3»<_> U.#Z *3 *u. *

-IZ ro* o*

UIH-Z UO KZO«

(/)< O'JiO *3 affM aia.Ztu»oxca a. _i hqoj<z • >• so z •> nam <Z33JJ CO "X HHOOZ)*Qh> o>—jj a£t—-JaCO-* *** —< o <Li.u. oxi-b •o-« »«Hac:c_iujoz <no> u*t— %«<*<* u. a •M s »—<<•<

»—LU • • IZIX^/I LU LUt— 3^aJ>-V^

U l/> !•»(/! MOiH<ZZZ

>- O OOOO l-ZQHttt

>Qc3UJQU.>-«0(£CSC -»i*""<0iZ>"« 4001Q tfiOCLLKXlOX-JLJOO 3 X to-Hon MOSXZ

*3

>31

m

•» m

oo <©iu aoi z-«o * *>-i Q <OU. <LU'il x»-» h- «/»»«a

U. —OS — -* zn X l/» 3»h Z Ol/> % * • i # o as •>

ll.inj x *3 •-««« 1/tOQ X'V -»Q«

• «/>q ©<t >/> za »x-./> •->•» «* LUlrtX 3+»x -9— a a.xcMc> iX" Z • • <LU>-Z «OVO fl»4Sf OflQuiZ3C3

3< 3XaiX>Hu.u.auiZ •—t/>O^^<-(-«U.0£ JJ

< o o o o o

yy < ae LU z UI t9

at ui a hi Z

>-< in h- h--I <-4 dk33 • tz z MtQ

i-OS-i za-zt-

•< •aaN a.uii— -» I X H-£3»*>-Z IL>U. < X 03 HZZH </> q£

»- o •<»->x>-« •"* O 3 33 <_> aoiuas./t < Ok- Ot uu

X J*3Z •-— «3xa» 3 i— rax;» at<\j a. -I z 3 U-l/l-i»-X -• Z •. 3«-«»-•1 l-ot •>-< LU ee Z < • < m •zlutscj >-»- »3 o it-<ra o z ->30C09CDUJZ 3 OLuzac«< u. kz o.lu

nauju. xx

< lOOLK > <)!>< IUO <_>f iu u

IA UUUI it I DDI >U>< >UUL>

Page 141: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

119

* * * * * *

* *

* *

(/> ae 3 (J (J O

ne IU

H UJ z

uj

x acz * UJ UJ a zt-a»-z o-* •»>-« -t oxi-a

t— JIDQZ oae 3ui ^aexae Q>H QJ **»»:» r*a. x /%-stiA Q.« LU>>^V t-

toj J<*X^

X Zif% I—ro

•» oz» Z»iO ZC*-3UJ'— oc •>>-HXZ •»< * utc< -J-LIOJ ~ %z U.Z •> «ca ZQ •> a *3 axa o

o

a -»«-» »— H4«-l

LO * •KZC Oi-ma "SZZ o * •»>-

JZ—X • zzx ra<<a z <a»-33*-ae

Z 0303X>.Z 0»J3 t- Mm£CCM"OM3HQ Jl^Ot UZCCX^ILZM VCUlZ 3H3D333x^M3XVWa£UJ Z UJUU'J o

• c_» ae o o

o

* *

* *

*

* »

* * *

<x < >

Ul ae*-

* * aui * » UJC •» »— IMUJ * * aa * »z * * * or — * * x £3 E » » — oeo * * »ae a * * *UJ Z(/t (M * *» e -» * »o u.3 H> * * a* < * »z h. q » *o x • »ae*>-«oa</» ul

»» O •

* o#z-m*eo *ui * # 3 UJ -*<s> *X*tLS0>U. <—_l *o» ut30 i< * -H* -ILL Oil »•-#< »h • • * <_>*•_> »--T3 I -I • » z*H-4u.za> • *3*o< zaui «u.*Qx^Mia> * »-J »u"^zt—a * • »-u •» * >xo » * -»t *z

UJ • 3UJ ac3 t-a: •k-H • ae • tuae •»LU o» —a o-» • Ok 11-

_I^>Z • »ae XX3 wwl-o ulu.ujz I

* * *

» «

* *

• * *

(juu UUtJ! lO Of to

» » • * • «-»o * »>-ia> * * *o» » *eo-4 * »z »z»xa »3»ZX * 3* < * *3 * »Z» -»•— #o» ** •«-»*z< »'_>•_« • * Z»*-» »3*lJ • «-U.*Z-^ * # 3 * *u. * * * * * * * * * *

oooooo oo

X Ui z

x-» <r» rm z>-•>LO »z ZZ3 — ZUJ*> (A 3 •>— z oe «xv «•« ui •^<^5 Q Kl •iZ « Z ta4 UJUK 3 t— —I *o CI z -tZZ * < U.** •> — 3 Htc O •>H"0 ne UlOZ Ul x Z «k * >M o 3X3 hV)4 o<o f-»— ui -IZZ Z-4

•> <eaae ui «Zi/t 3 a zh9i-iau.u. O1-" •>• -1 3 OXI-Bu.1- •-< -juiaz»i • oe^*»^.Oeoa»— *tt«9C oZZZ t-<«ae «uu

z'jj oiv^VOM it

1/tVfl/t UJ'- tU. JNVXJKJJ'H <T?Z<<f3 00300j3 HtCSN3W< Ottt'JZifl 030004<UI -jojujon '/»

3

I too

Page 142: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

H-NB—1 FACT-FLOAT(2**H) 1NTEG»IQUAN(FACT*X) STO*E»FRACCINTEG»NBI QVFLr i -OVER(STORE*Nd) lF (OVFLM)MRITE(6f lOO) I fT>X

100 FORMAT I /»11H tJUANTIZER* 13# 18H OVtRFLOHED AT T* »E15.<»» lE15 . t ,8H INPUT > *E15.<t l

TOP»1.0-<1 .0 /FACT) IF (STJ*E .LT. -1 .0 IST0RE —1.0 IF iSTORE.GT. TJP)STORE-TOP

200 QUAN-STURE RETURN END

C

C******************************************************************** L FUNCTION FRAC £**************************************************»*****************

FUNCTION FRAC( I>NB) C J .V .WAIT FEB. 1*80 C CONVERTi INTEGER TO FRACTION C N» IS NO. OF B ITS

FAC T-FLOA T12** C NB-11) FRAC-FLOAT(1) /FAC T RETURN END

C FUNCTION IQUAN j*******************************************************************

FUNCTION IQUAN(X) C IQUAN IS NEAREST INTEGER TO X C J .V . I t A IT t MARCH 1900

IX- IF IX(X) XA-ABS(X) INTEG- IF lX(XA) DLO-XA-F LOAT( INTEG) l )H I *1>0-010 1FCDrt I .LT.DLQ) lNTEG«INTEG*l 1QUAN«1SIGN(1NTEG*1X) RETURN ENO

-*•••*••••••*••*••*•*•*****•*••*******•**•********•*****•***••••**•••

Q********************************************************************

C S U TH1S I SUBROUTINE IS USED TO L IST THE FEED-BACK AND FtED-FORKARD

Page 143: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

COEFFICIENTS AND OUTPUT ALL THE ARRAYS OF OUTPUT VALUES. CUMMUN/CASCAD/AO (10)»A1C10)»A2C10) ,81(10)»B2110) COHNON/CASCAD/SHIFT1 COMMON/OUT/OUTPT T (120,5 ) , ERROR(120,5)»JMAX,KMAX COMMON/LIST/TMAX,KK

PRINT THE F EED-FORWARO AND FEED-BACK COEFFICIENT VALUES

WRITE(6 ,18) 18 FURNAT( "1" , <f0X, "FEED-FORWARO AND F tEU-BACK COEFFICIENTS")

WRITE(6 ,17) 17 F0RMAT(<»0X»4Q("—") )

WRI TE (6 ,19) 19 FORMAT( / /» l t>X,"AO"f 12X,"Al" ,12X,"A2" ,12X,"Bl" , i2X,"B2" I

DO 50 J>1,KK WRITE(bf60)A0(J)>AlU ) ,A2(J) ,B1(J) ,B2(J)

60 FO*MA r ( / ,10X,3(F12.7) ,5X,2(F12.7) ) 50 CONTINUE

1TMAX*1FIX(TMAX) WR1TE(6,70)

70 FORMAT ("1"#2X#"TIME",10X, "OUTPUT") DO 22 N s l»1TMAX WRITE(6 ,10)FL0AT(N)»(OUTPTT(N,JJ) ,JJ* l»JMAX)

10 F0*MAT(2X,F:> .2 , :>X,F12.7 ,5X,F12.7 , :>X,F12.7»5X,F12.7»5X» 1 F12.7)

22 CONTINUE WRITE(6» 71)

71 FORMAT("1" ,2X,"T IME",10X,"ERROR") DO 20 J I *1 , ITMAX DO 30 JK"2» JMAX ERROR(JI ,JK)"OUTPTT(J I ,1 ) -0UTPTT(J I ,JK)

30 CONTINUE 20 CONTINUE

00 23 NK*1, ITMAX WRITE(6»11)FLOAT(NK», (ERROR(NK,NJ) ,NJ»2,JMAX)

11 FORMAT(2X,F5.2»5X;F12.7 ,5X,F12.7 , iX ,F12.7 ,5X,F12.7) 23 CONTINUE

RETURN ENO

***************************************************************** SUBROUTINE L ISTP

****************************************************************

SUBROUTINE L ISTP THIS SU3R0UTINE L ISTS THE FEED-FORWARD AND FEEd-BACK COEFFICIENTS OF A PARALLEL STRUCTUKE. IT ALSU PRINTS THE ARRAY OF OUTPUT VALUES.

Page 144: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

COMMdN/LIST/TMAX»KK COMMON/PARLLL/F INOUT(101)>FK1 COMMON/PARLLL/GAMAO»GAMMAO(10 ) , GAMMA1(10) »BETA1( 10) ,BETA2 (101 CQNMON/UUT/OUTPTT(12U#5)#£RROR(120*S)#JMAX#KMAX

WRITE!6#14) 14 FORMAT (" l"»40X»"FtED-BACK ANU FEtO-FORWARO COEFFICIENTS")

WRITE(6» lb) 15 FQRi lAT 140X»40("—") )

WR1TE( bt 18) 18 FORMAT( / /»12X»"GAMMAO"* 25X» "GAMMA1"#20X#"BETAl"» iOX#"BETA2")

WR1T£(6»1?) ( GAMMAO (N )» GAHMA1(N )»BfcTAl (N)#BETA2(N)*N* l»KK) 19 FUi (MAT( / / f4 (10XfF12.9» l lX) / )

ITMAX'TMAX WRITE(6*21)

21 FORMAT ("1"»2X#"TIME"» 10X»"0UT PUT") 00 22 J»1#ITMAX WRITE(6*10)FLOAT(J)>(OUTPTTt4»JJ)»JJ«1»J MAX)

10 F0RMATI2X»F>.2*5X»F12.7;5X»F12.7*»X#F12.7»5X#F12.7»5X» 1 F12.7)

22 CONTINUE WRITE(6# 71)

71 FURMAI( H 1"»2X#"T1ME"»10X»"ERROR") 00 20 J I - l f ITMAX 00 30 JK*2#JMAX ERROR(J I#JK) -JUTPTT(J I ,1 ) -0UTPIT{J I ,JK)

30 CONTINUE 20 CONTINUE

JO 23 Nf t * l» lTMAX WRITE(6» i l )FLUAT(NK) , (ERROR(NK*NJ)» NJ*2» JMAX)

11 F0RMAT(2X»F5.2oX»F12.7>5X>F12.7»5X»F12.7;5X*F12.7) 23 CONTINUE

RETURN ENO

c ******************************************************************* C SUBROUTINE L ISTN C******************************************************************* C

SUBROUTINE L ISTN C THIS SUBROUTINE L ISTS THE FEED-FORWARD AND FEEO-BACK C COEFFICIENTS OF A NORMAL STRUCTURE. IT ALSO PRINTS THE ARRAY OF C OUTPUT VALUES. C

COMMON/LIST/TMAX»KK COMMUN/SETUP/MfN»F(10)»EC10)»U1110)#U2C10)»r f l (10) COMMON/SETUP/V2(10)*D(10)»D0(10)

Page 145: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

123

o •h x —' « <\» £ eo * « a * X — < O E

ta in rfi a a o -» <M O -< rH -» — ae <r a o ae iu ae Z IK a * •> • •* IA o a -I o — (m 40 H Z-* — tfl—H->—t tvjt— t/toa.

<<•3 £tN aeae^ OOT) zzo zzz "53D cct crt qoo

s oo

o

o ' J

* 0 < as 1 <3 LU UJ

Q ae < x ae a u. I a

* * * H n *4

% •k

N* % X -*x «n

* (MO t (M * * • CD CM C H • H * "N LL X A «k o 'JU. XX •H % * <IA

% -»X ac ^ t no ->r^

% • 0 <M * P4(\J « <fiN» N

SO • -»u. X *CM -» % o «x <M m * % »— -» «s t •HX < cdo a. % •

»-• Ui * * 3 H z AN a o H • c •— « t -»<\| % &.X * <-4 X X OIL o 3 uj * fH Of^

CX % • * ao s *<M t Ui < A * c ->u-

%

C3« • —• h- »—X u. r

I x o

i/vjz-*^ s c s idu. • •• a a-» a<m 9 xxcaxH J- sOO^OU-—• A»» A

30S f^X>> A kO AX HH^OHvt «M^O «t »XH >0—'>0«—-0-»0 0>— A lu<iu<oj« ajj< • ^£KCKCXf>C(M ^oc-«oe-«(*oo-<£>£-• aeoae oaeo-«aeG>u. xa-xuL-xa. SUL

t ae a ae ae

x 9

<\l

"" a xx <>o z A • • M r-« -»li. z k *x OIA —> a z^ A • teiM

3 a

s w

x x x«*tr» < »<Q * s: xsjn i" (ml-u. i «-«» A«*«J> x>hc «oil —«(\J—«—«-H A il *t ii ax

•—X s 4x3 AZ<r> x»— z a (NJ

—«S -H(\l~> —«—« A UJ|»>4N « A • —<X

At *-4>£-4UJllj^ AfS|LU

ae a ox aetrt ae a turw w « aoj *u. z a — X

XI— •<* «. a ZI3A1 »--l • —4LLT*

n -i— —- zo-mssZ'O'Oz xuionj-u*——,»^«««>— »zz w»—asoe <»—z n oae*—'^ <*nw •«'-< 3 cmh t-»z h>«saae«viMa-4ae aezz ~««zuiz Mxxoso^'jaeoaaaeoaaaeaa *UJ

U.O. XU.004JIJU03U.U

O N » O rsl

IM O <\J ^ ft «M f»

Otrt «*lfM «*(M

* « * « • • * * • * » * » # » * • • * » (3 # • Z * * *H # » H" « • * « a « « # * a. » • X « * Of < * # Ui z « * t- X * * z X * # * » z # * & •»H # » z * » Ui X * » Z X * » 1-4 * * -J z * • z * » 9C % * * a z * * UL z « * % * » » z * * ui —• « » o o * * X • « *> z * » o * « QC * # a. o •.

ox #a*ouu *<

oz « Ob# CL*^

ifr-* » 3 III" « ai«aio Of/1 4Z«ZQ( JM

A.J •

zz * n*o + tt«Q£</) zz

zz • D*DI 33 * uu • * • * * * * * • • • «

uu t-J uu

Page 146: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

124

• * ' * *

• • * • * * Ul • # X * * 1-# * X • • o < • • z z

X 0m » # H -J < X • * (A %

X z «c * • -»o xo < X z * • X <90 r X X * • <* z~» z % X * • CO ^o % rr * • •iZ X -4 z • • HI x< < z M4 * • %(/> z X z * *14J_| Ztt -1 X X • #Z-I -»ui * % X # ^ %

z * * • in z z • • % lAX * * z * • x>-o z A # • <0* oz M z z * *r< <M^

% z • HH w «« * * • OC 8 H z # • *OuU acui a OJO M • • CO OZ Of i/* X o • • C8UJ a^NH 4£ zz X » * wz •th-Ul 9 * z • * «- ii ^ -J * O.H- A * * a>uj A oc * # %x • -*x %

m uiq. —o • tf>< * OC*- s <* • • 3 OC %Z o 3 * • a.</tuj O^ «M a.o ouj * • >-UJK (VI •» >-*•4 ul % a* « * * OZt- HO

' • • o<o -•co a. •- COO ujo * »~Z-J i—w >-*•» C O t o • X # X CL xo CL % * «k * • filuj Q.O x<o

3 3 X

<

xo o«-xo 01-

3 O l-OO • N «• • • •*. ohkxm Z O • N <-4» * 3 >HCCazx t -• II H-»-«_i< z *rs 3 ooxrsxy (_> KQTCZXX

-» *»•» •h: xtsi: »< IM-HV— rMH»» •»s a »r o

_l

ui< UJ< oc

atn<v34uiz •*u.<_>*u.oacuj

*<• * 9C* »o* • * * vu* » z » »H» *3* » 3» • at* • <o» »3» *(/»*

af)-tS (Af-a 30

UIO-I zoc< HIDU 1.3s 3^9£ o ul ae/»t— 'Ohi/) 3X< i^H-K

3»-33 ^3 t— 3Z 33 Z</> oz

Oh UO

* •>*: I-4H « » »>-• **—33

t-ZZ HN3H^

03330 flQOUu

3 3 • X 3}

X 43 X 4

3 30 I

-» a. «n i— I 3 % 3 O » • ~'_U (MSE * *H oo>-

•k «-i NH« « _i—O_J_I * » -> H-» a.t— M-9-JLUl.U N II JJt3U^a JJ-33M~3<J<32 OZZ HZZ&Kui

otzz rT NI«!•• * i B3K003HO<<<<< OOIUUUOHU J'JUUU

oc a ae

xae X<'JJ

^ N

<M oj *

*

<\J-< «K>

O UUUUUU t |UL>

Page 147: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

/T/ITT VIVO / HT* HT4 HT* HT * HT' HT' HT« HT' HT'THT/ Z

<0?>3NnT'(6THNni '<<m3NnT'eZT>3Nni«(9T»3NI"II 2 MST)3Nni*CM)3NTU*CfT) 3NT1T ' < ZT ) 3NT1I ' (TT ) 3NT "IT VIVO

/-HT«-MT'-HI«-HTHT«-HT«-HT «-HT«-HT «*HT/ € COTI3NnT4C6)3NnT' (8)3NI1T '{Z)3NI"IT'C9) 3NI1I 2

MS)3NnT«l^)3NniM€)3Nni'<Z)3Nni'(T)3NnT VIVP /6HT'PHT*ZHT'9HT"IHT'^HT'EHT'?HT'THT'OHT/1TPTOT'OJI3ZI VIVO

3 S108WAS 1NVIXVANI OVOI 3

3 (TTH3»X'(Z0T)3NI1 // N0WW03

HH3 /S9V"»d/ N0WW03 *M3 1V3I901

C6)lTf>Taj*C02)3NTlTMW«HT0XN)X N0ISN3WT0

#V3ddV 11TH 3NO ISV1 3 3H1 A1NO HdVU9 3H1 NO 133SM31NT SNMlSNfld 3MOM *0 0"! "BION 3

XVWXX ONV NTUXX N33N138 lOld 3*T*M3H10 3 31V3S0jnv XVWXX-KIWXX dl 3

N0T13N0J N3d SINIOd dfl V38WPN — N 3 031101d 38 01 SN0T13Nftd dO X38WPN — U 3

X dO N0TSN3WT0 ISMId — WIOXN 3 (K'0?T)X «AV»HV S3T8VTXVA lN30N3d30 — X 3

318VTHVA lN30N3d30NT 3H1 dO 1N3W3M3NI 1NVJ9N03 3H1 — 10 3 318VIHVA lN30N3d30NT dO 301VA 9NI1»V1S — 01 C

SlNBMflSHV 3 3

PZfeT 'HUdV 3 1IVA 'A'r A8 *00H '(39V*3Vd HBltlldJ 3*>IVT3 #0 A8 N311IW 3

•?1N3M3»3NI 318V1»VA 3 lN30N?d30NT dO X38WnN 3H1 A8 0?NTH*3130 SI HdV*9 3H1 dO H19N3T 3H1 3

•318VI8VA lN30N3d30NI SnMNIlNm V SflS»3A S318VIMVA Z 01 dO lOld 3

(XVHXX'NIWXX'N'W'WTOXN'X '10 '01)IXIPId 3K'IinOM8nS 3

******************************************************************3 ixinid 3Minoxans 3

3 3

0N3 N*ni3»

lldPN? TIV3 Ua0il33*HZ'*3WIl*H9'XVW"l-'08-«0NV*a3'3WTimdinV HV3

(P*0)*0l3Vd 11V3 (F—'0*2'0*0)101d "I1V3

lldWVN T1V3

Page 148: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

XMIN»XXMIN XMAX-XXMAX E*«« . FALSE. CALL F IXUP(X* NXDIM* N*M* XMAX* XMIN*XSCALE) IF (ERR) RE TURN

C : DETERMINE IF AND WHERE ALONG THE X AXIS X«0* AND SET A REGISTER C

JZER0-102 C CORRECTION TO CALCULATION OF ZERO L INE# JVM* JUNE*1977

XRIGHT«XMIN*100.»XSCALfc IF ( (XMIN»XRIGHT) .LE.O) JZERO- A8S(XMIN) /XSCALE+1.5 IF (JEi iO .GT. 102 ) JZER0«102

C C GENERATE X-REFERENCE VALUES AND PRINT A BORDER C

DO 14 1 -1*11 XREF( I ) •XM1N+10.0*FL0AT(1-1) *XSCALE 1F(ABS(XREF(1) ) .LE.XSCALE*0.1) XREF( I )«0 .0

14 CUNTINUE PRINT 15* I1 I *XSCALE*DT*(XREF( I ) *1*1*11)

15 FORMAT (5X*30HPL0TX—T ROUTINE — PLOT NUMBER*12*21X*21HSCALE FACTO IRS . . . X • * E9.2*5X*5H T - * E9 .2 / / /22X*11( E9.2* IX) /25X*1H**10 2(9X*1H+M

C C INCREMfcNT GRAPH NUMBER COUNTER. C

C C START GRAPH C

00 22 L INES«1*N C C DETERMINE THE VALUE OF THE INDEPENDENT VARIABLE FOR THIS L INE C OF THE GRAPH C

T«T0*FL0AT(LINES-1)*DT C C TEST IF GRID IS TO BE PRINTED* IF SO* LOAD GRID INTO GRAPH L INE C BUFFER* IF NUT LOAD BLANKS. C

IS -10 IF(MUD(LINES»10) .EQ. l ) IS 'O DO 16 K- l *10 I»K+1S DO 16 J«K*101*10

16 L INE(J)" IL INE(1) C C SET ZERO IN POSITION FOR THE X AXIS C

NJ o>

Page 149: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

LINEtJZEROI- IZERO C C START SEARCH THRU X ARRAY FUNCTIONS AND DETERMINE FOR EACH WHERE C THE GRAPH MARKER SHOULD BE, AND LOAD IT INTO THE GRAPH L INE BUFFER C

DO 20 I» l»M IJMXlLINES* I ) -XMIN) /XSCALE* l . :> IF ( IJ .LE.O) IJ -1 IFCIJ .GT. iOl l IJ - lOl

20 L iNEI IJ ) *1D1G1T( I ) C C PRINT ONE L INE OF THE GRAPH. C

PRINT 21* T* (L INE( I )» I *1»101)»LINES 21 FORMAT(2X* E20.8*3X»101A1,3X»13) C C IF GRAPH NUT COMPLETE* RETURN AND START A NEW L INE C 22 CONTINUE C C PRINT LOWER BORDER FUR GRAPH C

PRINT 23* (XREFt l ) ,1 -1 ,11) 23 F0RHATI25X»101ClH«)# /25X, lH+f l0 (9X»lH* ) /22X, l l ( E9 .2*1X) / / )

RETURN ENO

C/ L IST*NONE SUBROUTINE SCALE(X,NXDIM»N*M*XMAX,XMIN»

C C SCALE F INDS THE MAXIMUM AND MINIMUM VALUES OF THE ARRAY XCN*M) C

DIMENSION X(NXDIM*M) LUGICAL ERR COMMON /FLAGS/ ERR

C TEST FOR AUTOSCALING IF (XMIN.NE.XMAX) GO TO 2 XMAX«X(1*1) XMIN-XMAX DU 1 I«1#N 00 1 J«1*M Xt iAX* Art AX1 ( XMAX*X ( I * J ) )

1 XMIN«AMIN1(XMIN*X( I *J ) ) 2 IFUMAX-XMIN.GT.ANAX1CABS(XMAX)*ABSCXM1N)) /10000. ) RETURN

PRINT 3 3 FORMAT(45H • * * 8AD PLOT/GRAPH DATA . . . MAX .LE. NIN • * • )

ERR* . TRUE. RETURN END

C / L IST,NONE M SUBROUTINE F IXUPCX»NXDIM,LEN»NFUNC»XMAX»XMIN»FiCALE) ^

-o

Page 150: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

C F1XUP USES SCALE TO DETERMINE EXTREMES OF THE ARRAY X(LENjNFUNC)• C THEN* F IXUP CALCULATES AH OPTIMAL SCALE FACTOR ANO ADJUSTS AMAX AND C XM1N. THE SCALE RETURNED IS .01*CXMAX-XMIN) ROUNDEO UP C UNTIL IT CAN dE EXPRESSED BY ONE S IGNIFICANT DIGIT . C

DIMENSION X«NXUIr t#NFUNCI LOGICAL ERR COMMON /FLAGS/ ERR

C C 1 . F IND LARGEST ANO SMALLEST X C

CALL SCALE<X#NXOIM#LEN#NFUNC#XMAX#XHIN) IF (ERR) RETURN SPAN*XMAX-XMIN

C 2 . ROUND SPAN UP TO ONE S IGNIFICANT DIGIT C 2A. F IND LARGEST POWER OF 10 . LESS THAN OR EQUAL TO SPAN C C CODE TO CALCULATE THE HIGHEST POME* OF TEN WHICH IS LESS THAN C SPAN. THE EXPONENT IS LEFT IN 1# AND TEN TO THE C ITH IS THE VALUE OF POWER

P0WER-1.0

IF (PatO.GT.SPAN) GO TO Z 1 IFCPOWER*10. .GT.SPAN) GU TO 3

P0W«-PQWc*«10. I« I *1 GO TO I

2 PUWER»PQWER/10. I-I-l IF (POrfER.GT.SPAN) GO TO 2

C 2d . Od TAIN DIFFER USING AINT (TRUNCATION FUNCTION) C 3 DIFFER"AINT(SPAN/P0WER+.995)*P0WER 4 IF (DIFFER/POWER.GT.9 .5 ) P0WER»P0WER*10. C C USE TENTH-P0WER/10. FOR MAXIMUM RESULUTION C USE TENTH-DIFFtR/10 . FOR ZERO AXES ALIGMcD ON T IC MARK C

TENTH*P0WER/10. C C 3 . FMAX IS THE NEAREST MULTIPLE OF TENTH C HALF THE DIFFERENCE GRtATER THAN XMAX

FMAX* AINT ( ( XNAX + (OI FFER-SPAN) / 2 . ) / TENTH+. !> ) *TENTH IF(FMAX.LT.XMAX) FMAX«FMAX+IENTH

C C 4 . SET FMIN AND SCALE# CHECK FOR PRUdLEMS# AND RETU4N C NJ

CO

Page 151: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

FHiN-FHAX-DlFFER FSCAIE«DIFFER/10Q. IF IFHIN.LE.XM1N) RETURN

C 5 . DIFFER TOU SHALL# ENLARGE AND REPEAT

DIFFE R* DIFF ER •POWER GU TO <t END

NJ VO

Page 152: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

REFERENCES

Antoniou, A., "Digital Filters: Analysis and Design," McGraw-Hill, 1979.

Barnes, C. W., "Roundoff Noise and Overflow in Normal Digital Filters," IEEE Trans. Circuits Syst., Vol. CAS-26, No. 3, pp. 154-159, March 1979.

Cappellini, V., A. G. Constantinides and P. Emiliani, "Digital Filters and Their Applications," Academic Press, 1978.

Crochiere, R. E., "Comparison of Digital Filter Structures on the Basis of Coefficient Wordlength," Mass. Inst, of Tech., Research Report PR115, 1975.

Fettweis, A., "Digital Filter Structures Related to Classi­cal Filter Networks," Arch. Elektron. Vebertrag., Vol. 25, pp. 79-89, Feb. 1971.

Gold, B. and C. Rader, "Digital Processing of Signals," McGraw-Hill, 1969.

Gray, A. H. and J. D. Markel, "Digital Lattice and Ladder Filter Synthesis," IEEE Trans. Audio Electroacoust., AU-21, pp. 491-500, Dec. 1973.

Huelsman, L. P., "Basic Circuit Theory with Digital Computa­tions," Prentice-Hall, 1972.

Huelsman, L. P., "Introduction to the Theory and Design of Active Filters," McGraw-Hill, 1980.

Jackson, L. B., "On the Interaction of Roundoff Noise and Dynamic Range in Digital Filters," The Bell System Technical Journal," Vol. 49, No. 2, pp. 159-184, February 1970.

Liu, B., "Effect of Finite Wordlength on the Accuracy of Digital Filters—A Review," IEEE Trans. Circuit Theory, Vol. CT-18, pp. 670-677, Nov. 1971.

130

Page 153: FIXED POINT DIGITAL FILTER SIMULATION.1319205 AZIZ, IRFAN FIXED POINT DIGITAL FILTER SIMULATION. THE UNIVERSITY OF ARIZONA, M.A., 1982 University Microfilms International 300 N. Zeeb

131

Mills, W. L., C. T. Mullis and R. A. Roberts, "Low Roundoff Noise and Normal Realizations of Fixed Point IIR Digital Filters," IEEE Trans. Acoust., Speech, Signal Processing, Vol. ASSP-29, No. 4, pp. 893-903, Aug. 1981.

Oppenheim, A. V. and R. L. Schafer, "Digital Signal Process­ing, " Prentice-Hall, 1975.

Peled, A. and B. Liu, "Digital Signal Processing," Wiley, 1976.

Shapiro, M., "PROOT—Polynomial Solver," 1965, University of Arizona, Computer Center, CDC Cyber Program Library.

Steiglitz, K., and B. Ladendorf, "A Program for Designing Finite Word-Length IIR Digital Filters," in "Programs for Digital Signal Processing," IEEE Press, 19 79.

Taylor, F. J. and J. Marshall, "Computer Aided Design and Analysis of Standard IRR Architectures," IEEE Circuits and Systems Magazine, Vol. 3, No. 4, 1981.

Wait, J. V., "Digital Filters," in "Active Filters: Lumped, Distributed, Integrated, Digital and Parametric," ed. L. P. Huelsman, McGraw-Hill, pp. 200-279, 1970.

Wait, J. V., "FAD—(Frequency Analysis—Discrete), Users Manual, CSRL, Department of Electrical Engineering, University of Arizona, 19 81.

Wait, J. V., "TAD—(Time Analysis—Discrete), Users Manual, Unpublished Manuscript, 1982.