100% found this document useful (2 votes)
13 views

DSP for MATLAB and LabVIEW I Fundamentals of Discrete Signal Processing Synthesis Lectures on Signal Processing Isen download

The document is an overview of 'DSP for MATLAB and LabVIEW I: Fundamentals of Discrete Signal Processing' by Forester W. Isen, which is part of a four-volume series on digital signal processing. It covers essential concepts such as discrete signals, conversion between continuous and discrete domains, and principles of signal processing, including filtering and frequency transforms. The book includes practical scripts for MATLAB and LabVIEW to aid in understanding the material.

Uploaded by

lutzeaffant4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
13 views

DSP for MATLAB and LabVIEW I Fundamentals of Discrete Signal Processing Synthesis Lectures on Signal Processing Isen download

The document is an overview of 'DSP for MATLAB and LabVIEW I: Fundamentals of Discrete Signal Processing' by Forester W. Isen, which is part of a four-volume series on digital signal processing. It covers essential concepts such as discrete signals, conversion between continuous and discrete domains, and principles of signal processing, including filtering and frequency transforms. The book includes practical scripts for MATLAB and LabVIEW to aid in understanding the material.

Uploaded by

lutzeaffant4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

DSP for MATLAB and LabVIEW I Fundamentals of

Discrete Signal Processing Synthesis Lectures on


Signal Processing Isen download

https://ebookgate.com/product/dsp-for-matlab-and-labview-i-
fundamentals-of-discrete-signal-processing-synthesis-lectures-on-
signal-processing-isen/

Get Instant Ebook Downloads – Browse at https://ebookgate.com


Get Your Digital Files Instantly: PDF, ePub, MOBI and More
Quick Digital Downloads: PDF, ePub, MOBI and Other Formats

DSP for MATLAB and LabVIEW Fundamentals of discrete


frequency transforms Forester W. Isen

https://ebookgate.com/product/dsp-for-matlab-and-labview-
fundamentals-of-discrete-frequency-transforms-forester-w-isen/

Think DSP Digital Signal Processing in Python 1st


Edition Downey

https://ebookgate.com/product/think-dsp-digital-signal-
processing-in-python-1st-edition-downey/

Prentice Discrete Time Digital Signal Processing 2nd


Edition Oppenheim

https://ebookgate.com/product/prentice-discrete-time-digital-
signal-processing-2nd-edition-oppenheim/

Digital Signal Processing Using Matlab 1st Edition


Andre Quinquis

https://ebookgate.com/product/digital-signal-processing-using-
matlab-1st-edition-andre-quinquis/
Instructor Solution Manual Fundamentals of Digital
Signal Processing Using MATLAB 2nd Edition Robert J.
Schilling

https://ebookgate.com/product/instructor-solution-manual-
fundamentals-of-digital-signal-processing-using-matlab-2nd-
edition-robert-j-schilling/

Multirate filtering for digital signal processing


MATLAB applications 1st Edition Ljiljana Milic

https://ebookgate.com/product/multirate-filtering-for-digital-
signal-processing-matlab-applications-1st-edition-ljiljana-milic/

Digital Signal Processing Using MATLAB 3rd Edition


Vinay K. Ingle

https://ebookgate.com/product/digital-signal-processing-using-
matlab-3rd-edition-vinay-k-ingle/

Discrete Wavelet Transform A Signal Processing Approach


1st Edition D. Sundararajan

https://ebookgate.com/product/discrete-wavelet-transform-a-
signal-processing-approach-1st-edition-d-sundararajan/

Digital Signal Processing fundamentals and application


1st Edition Li Tan

https://ebookgate.com/product/digital-signal-processing-
fundamentals-and-application-1st-edition-li-tan/
DSP for
MATLAB™ and LabVIEW™ I:
Fundamentals of
Discrete Signal Processing
Copyright © 2008 by Morgan & Claypool

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in
any form or by any means—electronic, mechanical, photocopy, recording, or any other except for brief quotations in
printed reviews, without the prior permission of the publisher.

DSP for MATLAB™ and LabVIEW™ I: Fundamentals of Discrete Signal Processing


Forester W. Isen
www.morganclaypool.com

ISBN: 9781598298901 paperback


ISBN: 9781598298918 ebook

DOI 10.2200/S000161ED1V01Y200811SPR004

A Publication in the Morgan & Claypool Publishers series


SYNTHESIS LECTURES ON SIGNAL PROCESSING

Lecture #4
Series Editor: José Moura, Carnegie Mellon University

Series ISSN
Synthesis Lectures on Signal Processing
Print 1932-1236 Electronic 1932-1694
SYNTHESIS LECTURES
ON SIGNAL
PROCESSING
Editor
José Moura, Carnegie Mellon University

DSP for MATLAB™ and LabVIEW™ I: Fundamentals of Discrete Signal Processing


Forester W. Isen
2008

The Theory of Linear Prediction


P. P. Vaidyanathan
2007

Nonlinear Source Separation


Luis B. Almeida
2006

Spectral Analysis of Signals


Yanwei Wang, Jian Li, and Petre Stoica
2006
DSP for
MATLAB™ and LabVIEW™ I:
Fundamentals of
Discrete Signal Processing

Forester W. Isen

SYNTHESIS LECTURES ON SIGNAL PROCESSING #4

M
&C Morgan & cLaypool publishers
ABSTRACT
This book is Volume I of the series DSP for MATLAB ™ and LabVIEW ™ . The entire series consists
of four volumes that collectively cover basic digital signal processing in a practical and accessible man-
ner, but which nonetheless include all essential foundation mathematics. As the series title implies, the
scripts (of which there are more than 200) described in the text and supplied in code form (available
via the internet at http://www.morganclaypool.com/page/isen will run on both MATLAB and
LabVIEW. Volume I consists of four chapters. The first chapter gives a brief overview of the field of dig-
ital signal processing. This is followed by a chapter detailing many useful signals and concepts, including
convolution, recursion, difference equations, LTI systems, etc. The third chapter covers conversion from
the continuous to discrete domain and back (i.e., analog-to-digital and digital-to-analog conversion),
aliasing, the Nyquist rate, normalized frequency, conversion from one sample rate to another, waveform
generation at various sample rates from stored wave data, and Mu-law compression. The fourth and final
chapter of the present volume introduces the reader to many important principles of signal processing,
including correlation, the correlation sequence, the Real DFT, correlation by convolution, matched fil-
tering, simple FIR filters, and simple IIR filters. Chapter 4, in particular, provides an intuitive or “first
principle” understanding of how digital filtering and frequency transforms work, preparing the reader
for Volumes II and III, which provide, respectively, detailed coverage of discrete frequency transforms
(including the Discrete Time Fourier Transform, the Discrete Fourier Transform, and the z-Transform)
and digital filter design (FIR design using Windowing, Frequency Sampling, and Optimum Equirip-
ple techniques, and Classical IIR design). Volume IV, the culmination of the series, is an introductory
treatment of LMS Adaptive Filtering and applications. The text for all volumes contains many examples,
and many useful computational scripts, augmented by demonstration scripts and LabVIEW Virtual In-
struments (VIs) that can be run to illustrate various signal processing concepts graphically on the user’s
computer screen.

KEYWORDS
Higher-Level Terms:
MATLAB, LabVIEW, DSP (Digital Signal Processing), Sampling, LTI Systems, Analog-
to-Digital, Digital-to-Analog, FIR, IIR, DFT,Time Domain, Frequency Domain, Aliasing,
Binary Numbers.
Lower Level Terms:
Correlation, Convolution, Matched Filtering, Orthogonality, Interpolation, Decimation,
Mu-Law, Stability, Causality, Difference Equations, Zero-Order Hold.
This volume is dedicated to the following memorable teachers
of mine: Louise Costa, Cdr. Charles Bradimore Brouillette, Rudd
Crawford, Sheldon Sarnevitz, Dr. C. W. Rector, Dr. Samuel Saul
Saslaw, and Dr. R. D. Shelton.
ix

Contents
SYNTHESIS LECTURES ON SIGNAL PROCESSING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii

Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
0.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
0.2 The Four Volumes of the Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xv
0.3 Origin and Evolution of the Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi

1 An Overview of DSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Signals, Waves, and Digital Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Advantages of Digital Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 DSP Nomenclature and Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3.1 Time Domain Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3.2 Frequency Transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.3 Frequency Domain Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
1.4 Organization of this Volume of the Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Contents of Volume II in the Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.6 Contents of Volume III in the Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.7 Contents of Volume IV in the Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Discrete Signals and Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7


2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Software for Use with this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Discrete Sequence Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
2.4 Useful Signals, Sequences, and Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4.1 Sine and Cosine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4.2 Sequence and Time Position Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.4.3 The Unit Impulse (Delta) Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4.4 The Unit Step Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4.5 Real Exponential Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
x CONTENTS
2.4.6 Periodic Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4.7 Harmonic Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.4.8 Folded Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4.9 Even and Odd Decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4.10 Geometric Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.4.11 Random or Noise Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.4.12 Chirp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.4.13 Complex Power Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4.14 Specific Frequency Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.4.15 Energy of a Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.4.16 Power of a Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.5 Discrete Time Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.5.1 LTI Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
2.5.2 Method of Analysis of LTI Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.5.3 Graphic Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.5.4 A Few Properties of Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.5.5 Stability and Causality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
2.5.6 LTI System as a Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.5.7 Difference Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

3 Sampling and Binary Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57


3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3.2 Software for Use with this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3.3 Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58
3.4 Folding Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3.5 Normalized Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.6 Conversion From Decimal to Binary Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.7 Quantization Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.8 Binary-to-Decimal Via Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.9 Decimal-to-Binary Via Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.10 Offset to Input to Reduce Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.11 Clipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
3.12 Offset and Sign-Plus-Magnitude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
CONTENTS xi
3.13 DAC with Variable LSB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
3.14 ADC with Variable LSB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.15 Zero-Order Hold Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
3.16 Changing Sample Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
3.16.1 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
3.16.2 Decimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
3.16.3 Combining Interpolation with Decimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
3.16.4 Bandlimited Interpolation Using the Sinc Function . . . . . . . . . . . . . . . . . . . . . . . 98
3.16.5 Efficient Methods For Changing Sample Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
3.17 Frequency Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104
3.17.1 Variable SR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.17.2 Constant SR, Integral Decimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105
3.17.3 Constant SR, Non-Integral Decimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108
3.18 Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
3.19 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
3.20 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113

4 Transform and Filtering Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121


4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
4.2 Software for Use with this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121
4.3 Correlation At The Zeroth Lag (CZL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
4.3.1 CZL Equal-Frequency Sine/Cosine Orthogonality . . . . . . . . . . . . . . . . . . . . . . 124
4.3.2 CZL of Sinusoid Pairs, Arbitrary Frequencies . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
4.3.3 Orthogonality of Complex Exponentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
4.3.4 Sum of Samples of Single Complex Exponential . . . . . . . . . . . . . . . . . . . . . . . . . 127
4.3.5 Identifying Specific Sinusoids in a Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
4.3.6 Single Frequency Correlation and Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . 130
4.3.7 Multiple Frequency Correlation and Reconstruction . . . . . . . . . . . . . . . . . . . . . .131
4.4 Using Orthogonality in Signal Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
4.5 The Correlation Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
4.6 Correlation Via Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141
4.7 Matched Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
4.8 Estimating Frequency Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146
4.9 Frequency Selectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147
4.9.1 Single Correlator Filters of Arbitrary Frequency . . . . . . . . . . . . . . . . . . . . . . . . . 149
xii CONTENTS
4.9.2 Multiple Correlator Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149
4.9.3 Deficiencies of Simple Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
4.10 Sinusoidal Fidelity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
4.11 Determination of Time Delay Using Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
4.12 The Single-Pole IIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
4.12.1 Physical Arrangement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
4.12.2 Recursive Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
4.12.3 M-Code Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
4.12.4 Impulse Response, Unit Step Response, and Stability . . . . . . . . . . . . . . . . . . . . . 160
4.12.5 Leaky Integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
4.12.6 Frequency Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
4.12.7 Complex Conjugate Poles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
4.13 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
4.14 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173

A Software for Use with this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182


A.1 File types and Name Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
A.2 Downloading the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
A.3 Using the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
A.4 Learning To Use M-Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
A.5 What You Need with MATLAB and LabVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

B Vector/Matrix Operations in M-Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186


B.1 Row and Column Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
B.2 Vector Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
B.2.1 Inner Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
B.2.2 Outer Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
B.2.3 Product of Corresponding Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
B.3 Matrix Multiplied by a Vector or Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
B.4 Matrix Inverse and Pseudo-Inverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

C Complex Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190


C.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
C.2 Rectangular v. Polar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
C.3 Addition and Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
CONTENTS xiii
C.4 Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
C.4.1 Rectangular Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
C.4.2 Polar Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
C.5 Division and Complex Conjugate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
C.5.1 Using Rectangular Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
C.5.2 Using Polar Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
C.6 Polar Notation Using Cosine and Sine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
C.7 The Complex Exponential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
C.8 Uses for Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195

Biography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
xiv CONTENTS
Preface to Volume I
0.1 INTRODUCTION
The present volume is Volume I of the series DSP for MATLAB ™ and LabVIEW ™ . The entire series
consists of four volumes which collectively form a work of twelve chapters that cover basic digital signal
processing in a practical and accessible manner, but which nonetheless include the necessary foundation
mathematics. The text is well-illustrated with examples involving practical computation using m-code
or MathScript (as m-code is usually referred to in LabVIEW-based literature), and LabVIEW VIs.
There is also an ample supply of exercises, which consist of a mixture of paper-and-pencil exercises for
simple computations, and script-writing projects having various levels of difficulty, from simple, requiring
perhaps ten minutes to accomplish, to challenging, requiring several hours to accomplish.
As the series title implies, the scripts given in the text and supplied in code form (available via the
internet at http://www.morganclaypool.com/page/isen) are suitable for use with both MATLAB (a
product of The Mathworks, Inc.), and LabVIEW (a product of National Instruments, Inc.). Appendix
A in each volume of the series describes the naming convention for the software written for the book as
well as basics for using the software with MATLAB and LabVIEW.

0.2 THE FOUR VOLUMES OF THE SERIES


Volume I consists of four chapters. The first chapter gives a brief overview of the field of digital signal
processing.This is followed by a chapter detailing many useful signals and concepts, including convolution,
recursion, difference equations, etc. The third chapter covers conversion from the continuous to discrete
domain and back (i.e., analog-to-digital and digital-to-analog conversion), aliasing, the Nyquist rate,
normalized frequency, conversion from one sample rate to another, waveform generation at various sample
rates from stored wave data, and Mu-law compression. The fourth and final chapter of the present
volume introduces the reader to many important principles of signal processing, including correlation,
the correlation sequence, the Real DFT, correlation by convolution, matched filtering, simple FIR filters,
and simple IIR filters.
Volume II of the series is devoted to discrete frequency transforms. It begins with an overview
of a number of well-known continuous domain and discrete domain transforms, and covers the DTFT
(Discrete Time Fourier Transform), the DFT (Discrete Fourier Transform), and the z-Transform in
detail. Filter realizations (or topologies) are also covered, including Direct, Cascade, Parallel, and Lattice
forms.
Volume III of the series covers FIR and IIR design, including general principles of FIR design,
the effects of windowing and filter length, characteristics of four types of linear-phase FIR, Comb and
MA filters, Windowed Ideal Lowpass filter design, Frequency Sampling design with optimized transition
band coefficients, Equiripple FIR design, and Classical IIR design.
Volume IV of the series, LMS Adaptive Filtering, begins by explaining cost functions and perfor-
mance surfaces, followed by the use of gradient search techniques using coefficient perturbation, finally
reaching the elegant and computationally efficient Least Mean Square (LMS) coefficient update algo-
rithm. The issues of stability, convergence speed, and narrow-bandwidth signals are covered in a practical
xvi PREFACE
manner, with many illustrative scripts. In the second chapter of the volume, use of LMS adaptive fil-
tering in various filtering applications and topologies is explored, including Active Noise Cancellation
(ANC), system or plant modeling, periodic component elimination, Adaptive Line Enhancement (ADE),
interference cancellation, echo cancellation, and equalization/deconvolution.

0.3 ORIGIN AND EVOLUTION OF THE SERIES


The manuscript from which the present series of four books has been made began with an idea to provide
a basic course for intellectual property specialists and engineers that would provide more explanation and
illustration of the subject matter than that found in conventional academic books. The idea to provide an
accessible basic course in digital signal processing began in the mid-to-late 1990’s when I was introduced
to MATLAB by Dan Hunter, whose graduate school days occurred after the advent of both MATLAB
and LabVIEW (mine did not). About the time I was seriously exploring the use of MATLAB to update
my own knowledge of signal processing, Dr. Jeffrey Gluck began giving an in-house course at the agency
on the topics of convolutional coding, trellis coding, etc., thus inspiring me to do likewise in the basics of
DSP, a topic more in-tune to the needs of the unit I was supervising at the time. Two short courses were
taught at the agency in 1999 and 2000 by myself and several others, including Dr. Hal Zintel, David
Knepper, and Dr. Pinchus Laufer. In these courses we stressed audio and speech topics in addition to basic
signal processing concepts. Some time after this, I decided to develop a complete course in book form, the
previous courses having consisted of an ad hoc pastiche of topics presented in summary form on slides,
augmented with visual presentations generated by custom-written scripts for MATLAB. An early draft
of the book was kindly reviewed by Motorola Patent Attorney Sylvia Y. Chen, which encouraged me to
contact Tom Robbins at Prentice-Hall concerning possible publication. By 2005, Tom was involved in
starting a publishing operation at National Instruments, Inc., and introduced me to LabVIEW with the
idea of possibly crafting the book to be compatible with LabVIEW. After review of an existing draft of
the manuscript by a panel of three in early 2006, it was suggested that all essential foundation mathematics
be included if academic as well as professional appeal was wanted. Fortunately, I had long since retired
from the agency and was able to devote the considerable amount of time needed for such a project.
The result is a book that should have appeal in both academic and professional settings, as it
includes essential mathematical formulas and concepts as well as simple or “first principle” explanations
that help give the reader a gentler entry into the mathematical treatment.
This double-pronged approach to the subject matter has, of course, resulted in a book of consider-
able length. Accordingly, it has been broken into four modules or volumes (described above) that together
form a comprehensive course, but which may be used individually by readers who are not in need of a
complete course.
Many thanks go not only to all those mentioned above, but to Joel Claypool of Morgan & Claypool,
Dr. C. L. Tondo and his troops, and, no doubt, many others behind the scenes whose names I have never
heard, for making possible the publication of this series of books.

Forester W. Isen
November 2008
1

CHAPTER 1

An Overview of DSP
1.1 SIGNALS, WAVES, AND DIGITAL PROCESSING
Two of the human senses, sight and hearing, work via the detection of waves. Useful information from
both light and sound is gained by detection of certain characteristics of these waves, such as frequency and
amplitude. Modern telecommunication depends on transducing sound or light into electrical quantities
such as voltage, and then processing the voltage in many different ways to enable the information to
be reliably stored or conveyed to a distant place and then regenerated to imitate (i.e., reconstruct) the
original sound or light phenomenon.
For example, in the case of sound, a microphone detects rapid pressure variations in air and converts
those variations to an output voltage which varies in a manner proportional to the variation of pressure
on the microphone’s diaphragm. The varying voltage can be used to cut a corresponding wave into a
wax disc, to record corresponding wave-like variations in magnetism onto a ferromagnetic wire or tape,
to vary the opacity of a linear track along the edge of a celluloid film (i.e., the sound-track of a motion
picture film) or perhaps to modulate a carrier wave for radio transmission.
In recent decades, signal processing and storage systems have been developed that use discrete
samples of a signal rather than the entire continuous time domain (or analog) signal. Several useful
definitions are as follows:
• A sample is the amplitude of an analog signal at an instant in time.
• A system that processes a signal in sampled form (i.e., a sequence of samples) is known as a Discrete
Time Signal Processing System.
• In a Digital Signal Processing system, the samples are converted to numerical values, and the
values (numbers) stored (usually in binary form), transmitted, or otherwise processed.
The difference between conventional analog systems and digital systems is illustrated in Fig. 1.1.
At (a), a conventional analog system is shown, in which the signal from a microphone is sent directly to
an analog recording device, such as a tape recorder, recorded at a certain tape speed, and then played back
at the same speed some time later to reproduce the original sound. At (b), samples of the microphone
signal are obtained by an Analog-to-Digital Converter (ADC), which converts instantaneous voltages
of the microphone signal to corresponding numerical values, which are stored in a digital memory, and
can later be sent to a Digital-to-Analog Converter (DAC) to reconstruct the original sound.
In addition to recording and reproducing analog signals, most other kinds of processing which
might be performed on an analog signal can also be performed on a sampled version of the signal by
using numerical algorithms. These can be categorized into two broad types of processing, time domain
and frequency domain, which are discussed in more detail below.

1.2 ADVANTAGES OF DIGITAL PROCESSING


The reduction of continuous signals to sequences of numerical values (samples) that can be used to
process and/or reconstruct the original signal, provides a number of benefits that cannot be achieved with
continuous or analog signal processing. The following are some of the benefits of digital processing:
2 CHAPTER 1. AN OVERVIEW OF DSP

Signal Analog Signal


Memory

(a)

Signal Numbers Digital Numbers Signal


ADC DAC
Memory

Sample at Rate Fs Output Samples


at Rate Fs

(b)

Figure 1.1: (a) Conventional analog recording and playback system; (b) A digital recording and playback
system.

1. Analog hardware, such as amplifiers, filters, comparators, etc., is very susceptible to noise and
deterioration through aging. Digital hardware works with only two signal levels rather than an infinite
number, and hence has a high signal to noise ratio. As a result, there is little if any gradual deterioration
of performance with age (although as with all things, digital hardware can suddenly and totally fail),
and copies of signal files are generally perfect, absent component failure, media degeneration or damage,
etc. This is not true with analog hardware and recording techniques, in which every copy introduces
significant amounts of additional noise and distortion.
2. Analog hardware, for the most part, must be built for each processing function needed. With
digital processing, each additional function needed can be implemented with a software module, using
the same piece of hardware, a digital computer. The computing power available to the average person
has increased enormously in recent years, as evidenced by the incredible variety of inexpensive, high
quality devices and techniques available. Hundreds of millions or billions of operations per second can
be performed on a signal using digital hardware at reasonable expense; no reasonably-priced alternative
exists using analog hardware and processing.
3. Analog signal storage is typically redundant, since wave-related signals (audio, video, etc.) are
themselves typically redundant. For example, by taking into account this redundancy as well as the
physiological limitations of human hearing, storage needs for audio signals can be reduced up to about
95%, using digitally-based compression techniques, such as MP3, AC3, AAC, etc.
4. Digital processing makes possible highly efficient security and error-correction coding. Using
digital coding, it is possible, for example, for many signals to be transmitted at very low power and to
1.3. DSP NOMENCLATURE AND TOPICS 3
share the same bandwidth. Modern cell phone techniques, such as CDMA (Code Division Multiple
Access) rely heavily on advanced, digitally-based signal processing techniques to efficiently achieve both
high quality and high security.

1.3 DSP NOMENCLATURE AND TOPICS


Figure 1.2 shows a broad overview of digital signal processing. Analog signals enter an ADC from the
left, and samples exit the ADC from the right, and may be 1) processed strictly in the discrete time
domain (in which samples represent the original signal at instants in time) or they may be 2) converted
to a frequency domain representation (in which samples represent amplitudes of particular frequency
components of the original signal) by a time-to-frequency transform, processed in the frequency domain,
then converted back to the discrete time domain by a frequency-to-time transform. Discrete time domain
samples are converted back to the continuous time domain by the DAC.
Note that a particular signal processing system might use only time domain processing, only
frequency domain processing, or both time and frequency domain processing, so either or both of the
signal processing paths shown in Fig. 1.2 may be taken in any given system.

Discrete Time Domain

Analog Time Domain Analog


ADC DAC
Input Processing Output

Time to Frequency
Frequency to Time
Transform Transform

Frequency Domain
Processing

Discrete Frequency Domain


Continuous Continuous
Time Domain Time Domain

Figure 1.2: A broad, conceptual overview of digital signal processing.

1.3.1 TIME DOMAIN PROCESSING


Filtering, in general, whether it is done in the continuous domain or discrete domain, is one of the
fundamental signal processing techniques; it can be used to separate signals by selecting or rejecting
certain frequencies, enhance signals (such as with audio equalization, etc.), alter the phase characteristic,
and so forth. Hence a major portion of the study of digital signal processing is devoted to digital filtering.
Filtering in the continuous domain is performed using combinations of components such as inductors,
capacitors, resistors, and in some cases active elements such as op amps, transistors, etc. Filtering in
the discrete or digital domain is performed by mathematically manipulating or processing a sequence
4 CHAPTER 1. AN OVERVIEW OF DSP
of samples of the signal using a discrete time processing system, which typically consists of registers
or memory elements, delay elements, multipliers, and adders. Each of the preceding elements may be
implemented as distinct pieces of hardware in an efficient arrangement designed to function for a particular
purpose (often referred to as a Pipeline Processor), or, the equivalent functions of all elements may be
implemented on a general purpose computer by specifically designed software.

1.3.2 FREQUENCY TRANSFORMS


A time-to-frequency transform operates on a block of time domain samples and evaluates the frequency
content thereof. A set of frequency coefficients is derived which can be used to quantify the amplitudes
(and usually phases) of frequency components of the original signal, or the coefficients can be used to
reconstruct the original time domain samples using an inverse transform (a frequency-to-time transform).
The most well-known and widely-used of these transforms is the Discrete Fourier Transform (DFT),
usually implemented by the FFT (for Fast Fourier Transform), the name of a class of algorithms that
allow efficient computation of the DFT.

1.3.3 FREQUENCY DOMAIN PROCESSING


Most signal processing that can be done in the time domain can be also equivalently done in the frequency
domain. Each domain has certain advantages for a given type of problem.
Time domain filtering, for example, can be performed using frequency transforms such as the
DFT, and in certain cases efficiency can be greatly improved using this technique.
A second use is in digital filter design, in which the desired filter frequency response is specified
in the frequency domain, i.e., as a set of DFT coefficients, for example.
Yet a third and very prevalent use isTransform Coding, in which signals are coded using a frequency
transform (usually eliminating as much redundant information as possible) and then reconstructed from
the transform coefficients. Transform Coding is a powerful tool for compression algorithms, such as those
employed with MP3 (MPEG II, Level 3) for audio signals, JPEG, a common image compression format,
etc. The use of such compression algorithms has revolutionized the audio and video fields, making storage
of audio and video data very economical and deliverable via Internet.

1.4 ORGANIZATION OF THIS VOLUME OF THE SERIES


The present volume provides basic information on digital signal processing and has four chapters as
follows:

• Chapter 1 (the present chapter) gives a brief overview of DSP. It defines sampling, contrasts the
areas of continuous and discrete signal processing, as well as time domain and frequency domain
processing, and introduces very basic signal processing nomenclature.

• Chapter 2 introduces many useful signals and sequences, followed by a basic introduction to Linear,
Time Invariant (LTI) systems, including convolution, stability and causality, basic FIR and IIR
filters, and difference equations.

• Chapter 3 discusses the fundamental concepts of sampling, analog-to-digital conversion, and


digital-to-analog conversion. The topics of aliasing, normalized frequency, binary formats, zero-
order hold conversion, interpolation, decimation, frequency generation, and Mu-law compression
are also covered.
1.5. CONTENTS OF VOLUME II IN THE SERIES 5
• Chapter 4 introduces correlation and the correlation sequence, orthogonality of sinusoids and
complex exponentials, sequence decomposition and reconstruction using correlation (i.e., the real
DFT), correlation via convolution, matched filtering, simple FIR filters, and the basic IIR using a
single pole or complex conjugate pole pairs.

1.5 CONTENTS OF VOLUME II IN THE SERIES


The second book in the series covers standard digital frequency transforms and closely related topics.

• Chapter 1 begins with a short overview of the Fourier and Laplace families of transforms, calling
attention to the uses of each and the differences among them. The remainder of the chapter is
devoted to the Discrete Time Fourier Transform (DTFT), its properties, and its use in evaluation
of the frequency response of an LTI system.

• Chapter 2 introduces the z-transform, its properties, the inverse z-transform, transfer function
and various filter topologies (Direct, Cascade, Parallel, and Lattice Forms), and evaluation of the
frequency response of an LTI system using the z-transform.

• Chapter 3 covers the Discrete Fourier Transform (DFT), including the forward and reverse trans-
forms, properties, the Fast Fourier Transform (FFT), the Goertzel Algorithm, periodic, cyclic, and
linear convolution via the DFT, and DFT leakage. Computation of the IDFT (inverse DFT) via
DFT, computation of the DFT via matrix, and computation of the DTFT via the DFT, are also
discussed.

1.6 CONTENTS OF VOLUME III IN THE SERIES


The third book in the series is devoted to digital filter design.

• Chapter 1 gives an overview of FIR filtering principles in general, and linear phase filter charac-
teristics in particular, and an overview of FIR design techniques.

• Chapter 2 covers FIR design via windowed ideal lowpass filter, frequency sampling with optimized
transition coefficients (as implemented by inverse DFT as well as cosine/sine summation formulas),
and equiripple design. Designs are performed for lowpass, highpass, bandpass, and bandstop filters,
as well as Hilbert transformers and differentiators.

• Chapter 3 is devoted to classical IIR design, including design of digital IIR filters starting from
analog prototype lowpass filters of the Butterworth, Chebyshev (I and II), and Elliptic types,
transformations from lowpass to other passband types in the analog domain, and analog-to-digital
filter transformation. The chapter concludes with a discussion of various filter design functions
provided by MATLAB and LabVIEW.
6 CHAPTER 1. AN OVERVIEW OF DSP

1.7 CONTENTS OF VOLUME IV IN THE SERIES


The fourth book in the series provides an introduction to LMS adaptive filtering:
• Chapter 1 discusses cost functions, performance surfaces, coefficient perturbation to estimate the
gradient in the method of steepest descent, and the LMS algorithm and its performance with
signals of differing frequency content.
• Chapter 2 covers a number of standard uses for the LMS algorithm in adaptive FIR filtering
systems, including active noise cancellation, echo cancellation, interference cancellation, periodic
component enhancement or elimination, and deconvolution.
7

CHAPTER 2

Discrete Signals and Concepts


2.1 OVERVIEW
If the study of digital signal processing is likened to a story, this chapter can be viewed as an introduction
of the main characters in the story–they are the various types of signals (or their sampled versions, called
sequences) and fundamental processes that we will see time and time again. Acquiring a good working
knowledge of these is essential to understanding the rest of the story, just as is knowing the characters in
a novel.
In the first part of the chapter, we introduce discrete sequence notation and many standard test
signals including the unit impulse, the unit step, the exponential sequence (both real and complex), the
chirp, etc., and we learn to add and multiply sequences that are offset in time. Any serious study of digital
signal processing relies heavily on the representation of sinusoids by the complex exponential, and hence
this is covered in detail in the chapter. In the latter part of the chapter, we introduce the concepts of
linear, time-invariant (LTI) systems, convolution, stability and causality, the FIR, the IIR, and difference
equations.
By the end of this chapter, the reader will be prepared for the next chapter in the story of DSP,
namely, the process and requirements for obtaining sequences via sampling, formatting sample values in
binary notation, converting sequences back into continuous domain signals, and changing the sample
rate of a sequence.

2.2 SOFTWARE FOR USE WITH THIS BOOK


The software files needed for use with this book (consisting of m-code (.m) files, VI files (.vi), and related
support files) are available for download from the following website:

http://www.morganclaypool.com/page/isen
The entire software package should be stored in a single folder on the user’s computer, and the full
file name of the folder must be placed on the MATLAB or LabVIEW search path in accordance with the
instructions provided by the respective software vendor (in case you have encountered this notice before,
which is repeated for convenience in each chapter of the book, the software download only needs to be
done once, as files for the entire series of four volumes are all contained in the one downloadable folder).
See Appendix A for more information.

2.3 DISCRETE SEQUENCE NOTATION


Digital Signal Processing must necessarily begin with a signal, and most signals, such as sound, images,
etc., originate as continuous-valued (or analog) signals, and must be converted into a sequence of samples
to be processed using digital techniques.
Figure 2.1 depicts a continuous-domain sine wave, with eight samples marked, sequentially ob-
tained every 0.125 second. The signal values input to the ADC at sample times 0, 0.125, 0.25, 0.375, 0.5,
0.625, 0.75, etc., are 0, 0.707, 1, 0.707, 0, -0.707, -1, etc.
8 CHAPTER 2. DISCRETE SIGNALS AND CONCEPTS

0.5
Amplitude

−0.5

−1

0 0.5 1 1.5 2
Time, sec

Figure 2.1: An analog or continuous-domain sine wave, with eight samples per second marked.

The samples within a given sample sequence are normally indexed by the numbers 0, 1, 2, etc.,
which represent multiples of the sample period T . For example, in Fig. 2.1, we note that the sample
period is 0.125 second, and the actual sampling times are therefore 0 sec., 0.125 sec., 0.25 sec., etc. The
continuous sine function shown has the value

f (t) = sin(2πf t)

where t is time, f is frequency, and in this particular case, f = 1 Hz. Sampling occurs at times nT
where n = 0, 1, 2,...and T = 0.125 second. The sample values of the sequence would therefore be sin(0),
sin(2π(T )), sin(2π(2T )), sin(2π(3T )), etc., and we would then say that s[0] = 0, s[1] = 0.707, s[2] =
1.0, s[3] = 0.707, etc. where s[n] denotes the n-th sequence value, the amplitude of which is equal to the
underlying continuous function at time nT (note that brackets surrounding a function argument mean
that the argument can only assume discrete values, while parentheses surrounding an argument indicate
that the argument’s domain is continuous). We can also say that

s[n] = sin[2π nT ]
2.4. USEFUL SIGNALS, SEQUENCES, AND CONCEPTS 9
This sequence of values, the samples of the sine wave, can be used to completely reconstruct the
original continuous domain sine wave using a DAC. There are, of course, a number of conditions to
ensure that this is possible, and they are taken up in detail in the next chapter.
To compute and plot the sample values of a 2-Hz sine wave sampled every 0.05 second on the
time interval 0 to 1.1 second, make the following MathScript call:

t = [0:0.05:1.1]; figure; stem(t,sin(2*pi*2*t))


where the t vector contains every sample time nT with T = 0.05. Alternatively, we might write

T = 0.05; n = 0:1:22; figure; stem(n*T,sin(2*pi*2*n*T))


both of which result in Fig. 2.2.

1
0.8
0.6
0.4
Amplitude

0.2
0
−0.2
−0.4
−0.6
−0.8
−1

0 0.2 0.4 0.6 0.8 1


Time, seconds

Figure 2.2: A plot of the samples of a sine wave having frequency 2 Hz, sampled every 0.05 second up
to time 1.1 second.

2.4 USEFUL SIGNALS, SEQUENCES, AND CONCEPTS


2.4.1 SINE AND COSINE
We saw above that a sine wave of frequency f periodically sampled at the time period T has the values

s[n] = sin[2πf nT ]
10 CHAPTER 2. DISCRETE SIGNALS AND CONCEPTS
Once we have a sampled sine wave, we can mathematically express it without reference to the
sampling period by defining the sequence length as N . We would then have, in general,

s[n] = sin[2π nk/N ]


where n is the sample index, which runs from 0 to N −1, and k is the number of cycles over the sequence
length N. For the sample sequence marked in Fig. 2.1, we would have

s[n] = sin[2π n2/16]


where we have noted that there are two full cycles of the sine over 16 samples (the 17th sample is the start
of the third cycle). The correctness of this formula can be verified by noting that for the 17th sample, n =
16, and s[16] = 0, as shown. Picking another sample, for n = 2, we get s[2] = sin[2π(2)2/16] = sin[π/2]
= 1, as shown.
A phase angle is sometimes needed, and is denoted θ by in the following expression:

s[n] = sin[2π nk/N + θ ]


Note that if θ = π/2, then

s[n] = cos[2π nk/N ]


We can illustrate this by generating and displaying a sine wave having three cycles over 18 samples,
then the same sine wave, but with a phase angle of π/2 radians, and finally a cosine wave having three
cycles over 18 samples and a zero phase angle. A suitable MathScript call, which results in Fig. 2.3, is
n = 0:1:17; y1 = sin(2*pi*n/18*3); subplot(311); stem(n,y1);
y2 = sin(2*pi*n/18*3 +pi/2); subplot(312); stem(n,y2);
y3 = cos(2*pi*n/18*3); subplot(313); stem(n,y3)

2.4.2 SEQUENCE AND TIME POSITION VECTOR


Certain operations on two sequences, such as addition and multiplication, require that the sequences be
of equal length, and that their proper positions in time be preserved.
Consider the sequence x1 = [1,2,3,4], which was sampled at sample time indices n1 = [-1,0,1,2],
which we would like to add to sequence x2 = [4,3,2,1], which was sampled at time indices n2 = [2,3,4,5].
To make these two sequences equal in length, we’ll prepend and postpend zeros as needed to result in
two sequences of equal length that retain the proper time alignment. We see that the minimum time
index is -1 and the maximum time index is 5. Since x1 starts at the minimum time index, we postpend
zeros to it such that we would have x1 = [1,2,3,4,0,0,0], with corresponding time indices [-1,0,1,2,3,4,5].
Similarly, we prepend zeros so that x2 = [0,0,0,4,3,2,1], with the same total time or sample index range
as the modified version of x1. Figure 2.4 depicts this process.
The sum is then

x1 + x2 = [1,2,3,4,0,0,0] + [0,0,0,4,3,2,1] = [1,2,3,8,3,2,1]

and has time indices [-1,0,1,2,3,4,5].


These two ideas, that sequences to be added or multiplied must be of equal length, but also properly
time-aligned, lead us to write several MathScript functions that will automatically perform the needed
adjustments and perform the arithmetic operation.
2.4. USEFUL SIGNALS, SEQUENCES, AND CONCEPTS 11

1
Amplitude

−1
0 2 4 6 8 10 12 14 16
Sample

1
Amplitude

−1
0 2 4 6 8 10 12 14 16
Sample

1
Amplitude

−1
0 2 4 6 8 10 12 14 16
Sample

Figure 2.3: (a) Three cycles of a sine wave over 18 samples, with phase angle 0 radians; (b) Same as (a),
with a phase angle of π/2 radians; (c) Three cycles of a cosine wave over 18 samples, with a phase angle
of 0 radians.

The following script will perform addition of offset sequences y1 and y2 that have respective time
indices n1 and n2 using the method of prepending and postpending zeros.
function [y, nOut] = LVAddSeqs(y1,n1,y2,n2)
nOut = [min(min(n1),min(n2)):1:max(max(n1),max(n2))];
mnfv = min(nOut); mxfv = max(nOut);
y = [zeros(1,min(n1)-mnfv),y1,zeros(1,mxfv-max(n1))] + ...
[zeros(1,min(n2)-mnfv),y2,zeros(1,mxfv-max(n2))];
The function
[y, nOut] = LV MultSeqs(y1, n1, y2, n2)
works the same way, with the addition operator (+) in the final statement being replaced with the operator
for multiplying two vectors on a sample-by-sample basis, a period following by an asterisk ( .* ).
We can illustrate use of the function LV AddSeqs by using it to add the following sequences:
y1 = [3,-2,2], n1 = [-1,0,1], y2 = [1,0,-1], n2 = [0,1,2]
12 CHAPTER 2. DISCRETE SIGNALS AND CONCEPTS

4
y1

−2 −1 0 1 2 3 4 5 6
(a) Composite Sample Range n
6

4
y2

−2 −1 0 1 2 3 4 5 6
(b) Composite Sample Range n

Figure 2.4: (a) First sequence, with postpended zeros at sample times 3, 4, and 5; (b) Second sequence,
with prepended zeros at sample times -1, 0, and 1.

We make the call


[y, n] = LVAddSeqs( [3,-2,2], [-1,0,1], [1,0,-1], [0,1,2] )
which yields y = [3,-1,2,-1] and n = [-1,0,1,2].
We can illustrate use of the function LV MultSeqs by using it to multiply the same sequences.
We thus make the call
[y, n] = LVMultSeqs( [3,-2,2], [-1,0,1], [1,0,-1], [0,1,2] )
which yields y = [0,-2,0,0] and n = [-1,0,1,2].

2.4.3 THE UNIT IMPULSE (DELTA) FUNCTION


The Unit Impulse or Delta Function is defined as δ[n] = 1 when n = 0 and 0 for all other values of n.
The time of occurrence of the impulse can be shifted by a certain number of samples k using the notation
δ[n − k] since the value of the function will only be 1 when n - k = 0.
The following function will plot a unit impulse at sample index n on the sample interval Nlow to
Nhigh.
function LVPlotUnitImpSeq(n,Nlow,Nhigh)
2.4. USEFUL SIGNALS, SEQUENCES, AND CONCEPTS 13
xIndices = [Nlow:1:Nhigh];
xVals = zeros(1,length(xIndices));
xVals(find(xIndices-n==0))=1;
stem(xIndices,xVals)

An example MathScript call is

LVPlotUnitImpSeq(-2,-10,10)

A version of the script that returns the output sequence and its indices without plotting is

[xVals,xIndices] = LVUnitImpSeq(n,Nlow,Nhigh)

This version is useful for generating composite unit impulse sequences. For example, we can display,
over the sample index interval -5 to 5, the output sequence

y[n] = 3δ[n − 2] − 2δ[n + 3]

by using the following m-code, which computes and displays the desired output sequence using the
function LVUnitImpSeq, as shown in Fig. 2.5.

[y1,y1Ind] = LVUnitImpSeq(2,-5,5),
[y2,y2Ind] = LVUnitImpSeq(-3,-5,5),
y = 3*y1 - 2*y2, stem(y1Ind,y)

2.4.4 THE UNIT STEP FUNCTION


The Unit Step Function is defined as u[n] = 1 when n ≥ 0 and 0 for all other values of n. The time of
occurrence of the step (the value 1) can be shifted by a certain number of samples k using the notation
u[n − k] since the value of the function will only be 1 when n - k ≥ 0.
The following function will plot a unit step at sample index n on the sample interval Nlow to
Nhigh.
14 CHAPTER 2. DISCRETE SIGNALS AND CONCEPTS

2
Amplitude

−1

−2

−3
−5 0 5
Sample Index

Figure 2.5: A graph of the function y[n] = 3[n − 2] − 2[n + 3] for sample indices -5 to +5.

function LVPlotUnitStepSeq(n,Nlow,Nhigh)
xIndices = [Nlow:1:Nhigh];
yVals(1:1:length(xIndices)) = 0;
posZInd = find((xIndices-n)==0)
yVals(posZInd:1:length(xIndices)) = 1;
stem(xIndices,yVals)
An example MathScript call is

LVPlotUnitStepSeq(-2,-10,10)
A version of the script that returns the output sequence and its indices without plotting is

[yV als, xI ndices] = LV U nitStepSeq(n, N low, N high)


This version is useful for generating composite unit step sequences. For example, we can display,
over the sample index interval [-10:10] the sequence y[n], defined as follows,

y[n] = 3u[n − 2] − 2u[n + 3]


with the following m-code, which computes and plots y[n], using the function LVUnitStepSeq:
2.4. USEFUL SIGNALS, SEQUENCES, AND CONCEPTS 15
[y1,y1Ind] = LVUnitStepSeq(2,-10,10);
[y2,y2Ind] = LVUnitStepSeq(-3,-10,10);
y = 3*y1 - 2*y2; stem(y1Ind,y)
As another example, we can express the four-sample sequence [1,1,1,1] having time vector [-
1,0,1,2] as a sum of unit step sequences and verify the answer using MathScript. To start, we generate a
unit step sequence starting at n = -1 and subtract from it a unit step sequence starting at n = 3:

y = u[n + 1] − u[n − 3]
To verify, we can modify the code from the previous example; the results are shown in Fig. 2.6.
[y1,y1Ind] = LVUnitStepSeq(-1,-10,10);
[y2,y2Ind] = LVUnitStepSeq(3,-10,10);
y = y1 - y2; stem(y1Ind,y)

0.5
Amplitude

−0.5

−1
−10 −5 0 5 10
Sample Index

Figure 2.6: A plot over time indices -10 to +10 of the sequence defined as y[n] = u[n + 1] − u[n − 3].

2.4.5 REAL EXPONENTIAL SEQUENCE


A signal generated as

y[n] = a n
16 CHAPTER 2. DISCRETE SIGNALS AND CONCEPTS
where a is a real number and n is real integer, produces a real sequence. In MathScript, to raise a number
to a single power, use the "ˆ" operator; to raise a number to a vector of powers, use the ".ˆ" operator.
To illustrate this, we can generate and plot a real exponential sequence with a = 2 and n = [0:1:6].
A suitable MathScript call is

y = 2.ˆ([0:1:6]); figure; stem(y)


As a second example, we generate and plot the real exponential sequence with a = 2 and n =
[-6:1:0]. A suitable call is

n = [-6:1:0]; y = 2.ˆn; figure; stem(n,y)


the results of which are shown in Fig. 2.7.

0.8
Amplitude

0.6

0.4

0.2

0
−7 −6 −5 −4 −3 −2 −1 0 1
n

Figure 2.7: A real exponential sequence formed by raising the number 2 to the powers [-6:1:0].

2.4.6 PERIODIC SEQUENCES


A sequence that repeats itself exactly is called periodic. A periodic sequence can be generated from a
given sequence S of length M by using the outer vector product of the sequence in column vector form
and a row vector of N ones. This generates an M -by-N matrix each column of which is the sequence S.
The matrix can then be converted to a single column vector using MathScript’s colon operator, and the
resulting column vector is converted to a row vector by the transposition operator, the apostrophe.
2.4. USEFUL SIGNALS, SEQUENCES, AND CONCEPTS 17
The following function will generate n periods of the sequence y:
function nY = LVMakePeriodicSeq(y,N)
% LVMakePeriodicSeq([1 2 3 4],2)
y = y(:); nY = y*([ones(1,N)]); nY = nY(:)’;
To illustrate use of the above, we will generate a sequence having three cycles of a cosine wave
having a period of 11 samples. One period of the desired signal is

cos(2*pi*[0:1:10]/11)
and a suitable call that computes and plots the result is therefore
N = 3; y = [cos(2*pi*[0:1:10]/11)]’;
nY = LVMakePeriodicSeq(y,N); stem(nY )

2.4.7 HARMONIC SEQUENCES


Periodic signals, such as square and sawtoooth waves in a train, etc., are composed of sinusoids forming
a harmonic (or overtone, as used in music) series. A periodic wave, then, is a superposition of sinusoids
having frequencies of 1, 2, 3 ... times a fundamental frequency, with certain specific amplitudes associated
with each overtone or harmonic frequency.
A square wave may be synthesized by summing sine waves having only odd harmonics, the am-
plitudes of which diminish as the reciprocal of the harmonic number. Equation (2.1) will synthesize a
discrete time square wave having f cycles over a sequence length of N and containing odd harmonics
only up to MaxHar. Note that N , the total number of samples in the signal, must be at least equal to twice
the product of the number of cycles (of square wave) in the sequence and the highest harmonic number
to ensure that there are at least two samples per cycle of the highest frequency present in the synthesized
wave y[n].The requirement that there be at least two samples per cycle of the highest frequency contained
in the signal is a general one imposed on all signals by the properties of the sampling process, and will be
studied in detail in the next chapter.


(MaxH ar+1)/2
y[n] = (1/(2k − 1)) sin(2πf (2k − 1)(n/N )) (2.1)
k=1
For a sawtooth wave, all harmonics are included:

 ar
MaxH
y[n] = (1/k) sin(2πf k(n/N ))
k=1
To illustrate the above formulas in terms of m-code, we will synthesize square and sawtooth waves
having 10 cycles, up to the 99th harmonic.
We compute the necessary minimum sequence length as 2(10)(99) = 1980. The following Math-
Script call will synthesize a square wave up to the 99th harmonic; note that only odd harmonics are
included, i.e., k = 1:2:99.
N=1980; n = 0:1:N; y = 0; for k = 1:2:99;
y = y + (1/k)*sin(2*pi*10*k*n/N); end; figure; plot(y)
For a sawtooth wave, the harmonic values are specified as 1:1:99, thus including both odd and
even values:
18 CHAPTER 2. DISCRETE SIGNALS AND CONCEPTS
N=1980; n = 0:1:N; y = 0; for k=1:1:99;
y = y + (1/k)*sin(2*pi*10*k*n/N); end; figure; plot(y)
The script

LV SynthP lotSquareSawtooth(W aveT ype, F undF req, SR)


will synthesize square, sawtooth, and triangle waves one harmonic at a time (press any key for the next
harmonic after making the initial call); specify WaveType as 1 for sawtooth, 2 for square, or 3 for triangle.
The following call results in Fig. 2.8, which shows the synthesis of a 10-cycle square wave up to the first
three harmonics (harmonics 1, 3, and 5).
LVSynthPlotSquareSawtooth(2,10,1000)

0.5
Amplitude

−0.5

−1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
(a) Component Waves (X−axis = time, sec): Press Any Key to Continue

1
0.5
Amplitude

0
−0.5
−1
0 0.2 0.4 0.6 0.8
(b) Sum of All Components to Harmonic 5; X−axis = time, sec

Figure 2.8: (a) The first three weighted harmonics of a square wave; (b) Superposition of the waves
shown in (a).

2.4.8 FOLDED SEQUENCE


From time to time it is necessary to reverse a sequence in time, i.e., assuming that x[n] = [1,2,3,4], the
folded sequence would be x[−n].The operation is essentially to flip the sequence from left to right around
2.4. USEFUL SIGNALS, SEQUENCES, AND CONCEPTS 19
index zero. For example, the sequence [1,2,3,4] that has corresponding sample indices [3,4,5,6], when
folded, results in the sequence [4,3,2,1] and corresponding indices [-6,-5,-4,-3].
To illustrate the above ideas, we can, for example, let x[n] = [1,2,3,4] with corresponding sample
indices n = [3,4,5,6], and compute x[−n] using MathScript. We can write a simple script to accomplish
the folding operation:
function [xFold,nFold] = LVFoldSeq(x,n)
xFold = fliplr(x), nFold = -fliplr(n)
For the problem at hand, we can then make the following call:
n = [3,4,5,6]; x=[1,2,3,4];
[xFold,nFold] = LVFoldSeq(x,n)
figure(6); hold on; stem(n,x,’bo’); stem(nFold,xFold,’r*’)

2.4.9 EVEN AND ODD DECOMPOSITION


Any real sequence can be decomposed into two components that display even and odd symmetry about
the midpoint of the sequence. A sequence that exhibits even symmetry has its first and last samples equal,
its second and penultimate samples equal, and so on. A sequence that exhibits odd symmetry has its first
sample equal to the negative of the last sample, its second sample equal to the negative of its penultimate
sample, etc.
An even decomposition xe of a sequence x can be obtained as

xe = 0.5*(x + fliplr(x))
and the corresponding odd decomposition xo is

xo = 0.5*(x - fliplr(x))
We can write a simple function that generates the even and odd components of an input sequence
x[n] as follows:
function [xe,xo] = LVEvenOdd(x)
xe = (x + fliplr(x))/2; xo = (x - fliplr(x))/2;
We can illustrate use of the above script with a simple example; assuming that x[n] = [1,3,5,7], we’ll
generate an even/odd decomposition and verify its correctness by summing the even and odd components,
and comparing to the original input signal x[n].
x = [1,3,5,7];
[xe,xo] = LVEvenOdd(x)
recon = xe + xo, diff = x - recon
From the above we get xe = [4,4,4,4] and xo = [-3,-1,1,3], the sum of which is [1,3,5,7], i.e., the
original sequence x.
Another useful even/odd decomposition is defined such that

xe[n] = xe[−n]
and

xo[n] = −xo[−n]
20 CHAPTER 2. DISCRETE SIGNALS AND CONCEPTS
In this case, the decompositions exhibit their symmetry about n = 0 rather than about the midpoint
of the original sequence x. For example, if x = [1,2,3,4] with corresponding sample indices n = [3,4,5,6],
a decomposition about n = 0 can be accomplished by padding x with zeros in such a manner to create a
new sequence with time indices symmetrical about zero. In this case, the new sequence is

x = [zeros(1,9),1,2,3,4]
having sample indices [-6:1:6]. The new sequence x is then decomposed as above, i.e.,
x = [zeros(1,9),1,2,3,4];
[xe,xo] = LVEvenOdd(x)
recon = xe + xo, diff = x - recon
A script that performs an even-odd decomposition about zero and returns the even and odd parts
and corresponding indices without plotting is
function [xe,xo,m] = LVEvenOddSymmZero(x,n)
m = -fliplr(n); m1=min([m,n]); m2 = max([m,n]); m = m1:m2;
nm = n(1)-m(1); n1 = 1:1:length(n); x1 = zeros(1,length(m));
x1(n1+nm) = x; xe = 0.5*(x1 + fliplr(x1));
xo = 0.5*(x1 - fliplr(x1));
The call

[xe,xo,m] = LVEvenOddSymmZero([1,2,3],[3,4,5])
for example, yields

xe = [1.5,1,0.5,0,0,0,0,0,0.5,1,1.5]

xo = [-1.5,-1,-0.5,0,0,0,0,0,0.5,1,1.5]

m = [-5:1:5]
The script (see exercises below)

LV xEvenOddAboutZero(x, n)
performs a symmetric-about-zero even-odd decomposition and plots the results. Figure 2.9, which was
generated by making the script call

LVxEvenOddAboutZero([0.9.ˆ([0:1:30])],[0:1:30])
shows the result of this process when applied to the sequence x having sample indices n = [0:1:30], where

x = 0.9.ˆ([0:1:30])
2.4. USEFUL SIGNALS, SEQUENCES, AND CONCEPTS 21

1.5

1
xe

0.5

0
−30 −20 −10 0 10 20 30
(a) Sample Index n

0.5
xo

−0.5
−30 −20 −10 0 10 20 30
(b) Sample Index n
1.5
xe + xo

0.5

0
−30 −20 −10 0 10 20 30
(c) Sample Index n

Figure 2.9: (a) Even component of a decaying exponential sequence; (b) Odd component of same;
(c) Reconstruction of original exponential sequence, obtained by summing the even and odd components
shown in (a) and (b).

2.4.10 GEOMETRIC SEQUENCE


The sum of a decreasing exponential sequence of numbers a n , where |a| < 1, converges to the value 1/(1-
a), i.e.,

 1
an → (2.2)
1−a
n=0

A more general statement of this proposition is that



 aN
an → (2.3)
1−a
n=N

which allows computation of the sum starting from a value of n greater than 0.
Another way of thinking of this is that the sum of a geometric sequence a n (we assume |a| <1) is
its first term divided by one minus the convergence ratio R, where
22 CHAPTER 2. DISCRETE SIGNALS AND CONCEPTS

R = a n /a n−1
For example, we can determine the sum of the following sequence using Eq. (2.3), where N = 0:

1 + 1/2 + 1/4 + 1/8 + ...


Here we see that a = 1/2 since a 0 =1, a 1 =1/2, etc., so the sum is
1 1
= =2
1 − 1/2 1/2
We can determine the sum of the following geometric sequence, for example,

1/3 + 1/9 + 1/27 + ...


using Eq. (2.3) as
1/3
= 1/2
1 − 1/3
We can verify this result with the simple MathScript call

format long; n = 1:1:50; ans = sum((1/3).ˆn)


which yields ans = 0.500000000000000.
Note that it was only necessary to use the first 50 terms of the infinite sequence to obtain a value
close (in this case equal within the limitations of accuracy imposed by the computer) to the theoretical
value. As a approaches unity in value, more terms are needed to obtain a sum close to the theoretical
value.
Sometimes the sum of a finite number of terms of such a sequence is needed. Supposing that the
sum of the first N - 1 terms is needed; we can subtract the sum for terms N to ∞ from the sum for all
terms, i.e.,


N−1 ∞
 ∞
 1 aN 1 − aN
an = an − an = − =
1−a 1−a 1−a
n=0 n=0 n=N

2.4.11 RANDOM OR NOISE SEQUENCES


Noise is an ever-present background signal in communications systems. It is generated by many natural
sources such as the Sun and Jupiter, lightning, many man-made sources, by active devices in electronic
systems, etc. Noise assumes random values over time (rather than predictable values such as those of a sine
wave, for example) which are described using statistics such as the probability density function, mean,
standard deviation, etc.
It is often necessary to simulate noise in signals, and MathScript can be used to generate random
sequence values using the functions

rand(m, n) or randn(m, n)
where m and n are dimensions of the matrix of random numbers to be created.
2.4. USEFUL SIGNALS, SEQUENCES, AND CONCEPTS 23
The first function above generates a random signal having uniform distribution over the interval
from 0 to 1; the second function above generates a signal having a Gaussian (or normal) distribution with
a mean of 0 and standard deviation of 1 .
As an m-code example, we’ll generate a signal containing noise of standard deviation 0.125 and
a cosine of frequency 11 over 128 samples, and plot the result. The result from running the following
m-code is shown in Fig. 2.10.

1
Amp

0
−1
−2
0 20 40 60 80 100 120
(a) Sample

1
Amp

0
−1
−2
0 20 40 60 80 100 120
(b) Sample

1
Amp

0
−1
−2
0 20 40 60 80 100 120
(c) Sample

Figure 2.10: (a) A cosine sequence of amplitude 1.0; (b) Gaussian or white noise having standard
deviation of 0.125; (c) The sum of the sequences at (a) and (b).

n = 0.125*randn(1,128); c = cos(2*pi*11*[0:127]/128);
figure(3); subplot(311); stem(c);
subplot(312); stem(n)
subplot(313); stem(n+c)

2.4.12 CHIRP
A sinusoid, such as a cosine wave, having a frequency that continuously increases with time, is expressed
in the continuous domain as

y = cos(βt 2 )
Since the sampled version would have discrete sample times at nT , we would have
24 CHAPTER 2. DISCRETE SIGNALS AND CONCEPTS

y[n] = cos[βn2 T 2 ]
Figure 2.11 shows a sampled chirp with β = 49, T = 1/256, and n = 0:1:255.

1
0.8

0.6
0.4
cos(49(nT) )

0.2
2

0
−0.2
−0.4
−0.6

−0.8
−1
0 50 100 150 200 250
n

Figure 2.11: A stem plot of a sampled chirp.

The chirp is a useful signal for testing the frequency response of a system such as a filter. A similar
continuous domain technique is the use of a sweep generator to reveal the frequency response of analog
circuits, such as the video intermediate frequency circuits in TV sets.
Other common uses for the chirped sinusoid are radar and ultrasonic imaging In both cases, a chirp
is transmitted toward a target, with the expectation of receiving a reflection at a later time. Since the time
of transmission of any frequency in the chirp is known, and the frequency and time received are known for
any reflection, the difference in time between the transmission and reception times is directly available.
Since the velocity of the transmitted wave is known, the distance between the transmitter/receiver and
the point of reflection on the target object can be readily determined.
MathScript’s chirp function, in its simplest form, is

y = chirp(t, f 0, t1, f 1)
where t is a discrete time vector, f 0 and f 1 are the start and end frequencies, respectively, and t1 is the
time at which frequency f 1 occurs.
2.4. USEFUL SIGNALS, SEQUENCES, AND CONCEPTS 25
As an m-code example, we can generate a chirp that starts at frequency 0 and ends at frequency
50, over 1101 samples:

y = chirp([0:1:1100]/1100,0,1,50); figure; plot(y)

2.4.13 COMPLEX POWER SEQUENCE


While it is assumed that the reader’s background encompasses complex numbers as part of a basic
knowledge of continuous signals and systems, a brief summary of the common complex definitions and
operations is found in the Appendices, which summary should provide a sufficient background for the
following discussion, in which we present discrete signal sequence generation and representation using
complex numbers.
An exponential of the form

y = ej x
where e is the base of the natural logarithm system and j is the square root of negative one, generates a
complex number lying on the unit circle in the complex plane, i.e., the number has a magnitude of 1.0.
Such an exponential is equivalent to

ej x = cos(x) + j sin (x)


As an m-code example, we can generate a complex number having a magnitude of 1.0 and lying
at an angle of 45 degrees relative to the real axis of the complex plane with the following call:

y = exp(j*2*pi*(1/8))
A complex number that is repeatedly multiplied by itself generates a sequence of numbers (or
samples) having real and imaginary parts which respectively define cosine and sine waves. Think of two
complex numbers in polar form: the product has a magnitude equal to the product of the two magnitudes,
and an angle equal to the sum of the angles. From this it can be seen that repeatedly multiplying a complex
number by itself results in a sequence of complex numbers whose angles progress around the origin of
the complex plane by equal increments, and the real and imaginary parts of which form, respectively, a
sampled cosine sequence and a sampled sine sequence. If n represents a vector of powers, such as 0:1:N ,
for example, then the complex power sequence is

(A θ )n = (Aej θ )n = An ej nθ = An (cos nθ + j sin nθ )


The script

LV xComplexP owerSeries(cn, maxP wr)


(see exercises below) generates a complex power sequence of the complex number cn, raised to the powers
0:1:maxPwr.
Figure 2.12, which was created using the script just mentioned with the call

LVxComplexPowerSeries(0.99*exp(j*pi/18),40)
shows the real and imaginary parts of an entire sequence of complex numbers created by raising the
original complex number W (magnitude of 0.99 at an angle of 10 degrees (π /18 radians)) to the powers
0 to 40. Note that the real part, at (c), is a cosine, and the imaginary part, at (d), is a sine wave.
26 CHAPTER 2. DISCRETE SIGNALS AND CONCEPTS

1
1
0.5

Imaginary
Magnitude

0
0.5
−0.5

−1
0
0 10 20 30 40 −1 −0.5 0 0.5 1
(a) n (b) Real

1 1

0.5 0.5

Imaginary
Real

0 0

−0.5 −0.5

−1 −1
0 10 20 30 40 0 10 20 30 40
(c) n (d) n

Figure 2.12: (a) Magnitude of W = (0.99*exp(jπ /18))n where n = 0:1:40; (b) Plot of entire power sequence
in complex plane; (c) Real part of entire power sequence of W for powers 0 to 40; (d) Imaginary part of
entire power sequence of W for powers 0 to 40.

Let’s compute powers 0:1:3 for the complex number [0 + j] and describe or characterize the
resultant real and imaginary parts. The power sequence is [j0 , j1 , j2 , j3 ], which reduces to [1, j, -1, -j],
with the real parts being [1,0,-1,0] and the imaginary parts being [0,1,0,-1]. These may be described as
four-sample, single-cycle cosine and sine waves. Another way to write this would be

y = cos(2*pi*(0:1:3)/4) + j*sin(2*pi*(0:1:3)/4)
which returns the following:

y = [1,(0 +1i),(-1 + 0i),(-0 - 1i)]



Let’s compute the complex power sequence W n where n = 0:1:4 and W = ( 2/2)(1 + j ). Note
initially that W = 1 45. Then W 0:1:4 = [1, 1 45, 1 90, 1 135, 1 180], which reduces to

[1, 0.707(1+j), j, 0.707(-1+j), -1]


To compute the expression using m-code, make the call

n = 0:1:4; W = (sqrt(2)/2)*(1+j); y = W.ˆn


2.4. USEFUL SIGNALS, SEQUENCES, AND CONCEPTS 27
As a final example, we’ll compute the complex sequence values for

e−j 2πnk/N
where n = [0,1,2,3], N = 4, and k = 2. This reduces to

cos(π (0:1:3)) + j sin(π (0:1:3))


which yields zero for all the imaginary components and for the real components we get [1,-1,1,-1]. This
can be verified by making the call

cos(pi*(0:1:3)) + j*sin(pi*(0:1:3))

2.4.14 SPECIFIC FREQUENCY GENERATION


• For a given sequence length N , by choosing

W = M exp(j 2π k/N )
the power sequence

W n = [M exp(j 2π k/N )]n = M n (cos(2π nk/N ) + j sin(2π nk/N )) (2.4)


will define a complex sinusoid having k cycles over N samples after each power n of W from 0 to N -1 has
been evaluated. Note that the complex exponential sequence grows or decays with each succeeding sample
according to the value of the magnitude M. If |M| = 1, the sequence has a constant, unity-amplitude;
if |M| < 1, the sequence decays, and if |M| > 1, the sequence grows in amplitude with each succeeding
sample.
function [seqCos,seqSin] = LVGenFreq(M,k,N)
% [seqCos,seqSin] = LVGenFreq(1,2,8)
n = [0:1:N-1]; arg = 2*pi*k/N;
mags = (M.ˆn); maxmags = max(mags);
W2n = mags.*exp(j*arg).ˆn;
seqCos = real(W2n); seqSin = imag(W2n);
figure(66); subplot(211); stem(seqCos);
subplot(212); stem(seqSin)
To illustrate use of the above script, we’ll generate cosine and sine waves, having peak-to-peak am-
plitudes of 2 (i.e., amplitudes of unity), and having 7.5 cycles over 73 samples. A peak-to-peak amplitude
of 2 means a variation in amplitude from -1 to +1, and hence an amplitude of 1.0, i.e., in the following
call we set M = 1.

[seqCos,seqSin] = LVGenFreq(1,7.5,73);
The result is shown in Fig. 2.13.
To illustrate the generation of a growing complex exponential, we’ll generate a cosine, sine pair
having a frequency of 3 cycles over 240 samples, and which increases in amplitude by a factor of 1.5 per
cycle. Since there are 240/3 samples per cycle, we take the 80th root of 1.5 as M. Code that makes the
computation of M easier and more flexible would be
Other documents randomly have
different content
BROOKLYN VITAL STATISTICS FOR JUNE,
1888.
By J. S. Young, Dep. Commissioner of Health.

Data of comparison:

Population, estimated on July 1st, 1888 793,960


Inhabited houses, about 93,000

Average birth-rate per 1,000 for ten years (returns incomplete).

In the month of June, 1888, there were 1,513 deaths, the rate of mortality being
23.78 in every 1,000 of the population.

The number of births reported was 937


The number of marriages reported was 531
The number of still-births reported was 113
The mortality by classes and by certain of the more important
diseases was as follows:

Causes:

1. Zymotic 434
2. Constitutional 251
3. Local 644
4. Developmental 121
5. Violence 63
Measles 6
Croup 8
Diphtheria 82
Scarlet Fever 45
Typhoid Fever
Whooping Cough 5
Malarial Diseases 4
Diarrhœal Diseases (all ages) 244
Diarrhœal Diseases (under 5 years) 233
Phthisis 137
Bronchitis 45
Pneumonia 80
All Respiratory Diseases 149
Bright’s Diseases 35
Puerperal Diseases 17
Old Age 17
Suicide 10
Reported cases:
Diphtheria 214
Scarlet Fever 255
Measles 128
Typhoid Fever
During the month 13 cases of small-pox were reported, of which
number 13 were confirmed as small-pox. 13 cases of small-pox were
sent to hospital. No deaths from small-pox occurred in the city and 2
in the hospital.
Deaths by sex, color, and social condition were as follows:
Male 846 Female 667
White Colored 21
Native 1102 Foreign 411
Married 328 Single 1006
Widows, Widowers, and not stated 179
Still-births (excluded from list of deaths) were as follows:
Males 60
Females 53
Total 113
Deaths in public institutions 115
Deaths in tenement houses 745
Inquest cases 156
Homicides
Suicides 10

Age Periods:

Deaths under 1 year 496


Deaths under 5 years 253
Total deaths under 5 years 749
Total deaths 5 to 20 126
Total deaths 20 to 40 223
Total deaths 40 to 60 233
Total deaths 60 and upwards 182
Certain foreign and American cities show the following death-rate
for the month of June:
Brooklyn 23.78
New York 26.86
Philadelphia 18.98
Berlin 19.40
Dublin 23.58
Vienna 31.50
Paris 21.68
London 16.10
Glasgow 22.98
NEW INSTRUMENTS.
This is a bulletin of inventions and improvements of interest to the
physician and surgeon, and is published quarterly by Leach and
Greene, Boston, Mass. It is mailed free to any address.
ANTIFEBRINE.
Antifebrine as a proprietary name is controlled by patents, and
when bought under this name it costs about thirty cents per ounce.
The name acetanilide, for exactly the same substance, is not and
cannot be controlled in any way, and under this name it can be
bought for about fifteen cents per ounce. As acetanilide is about one-
eighth the price of antipyrine, and effective in half the dose, it is far
more economical to the patient.—Pittsburgh Medical Review.
ENEMA LESIONS.
“Dr. Achilles Nordmann, of Basle,” says the Lancet, “has published
a description of twenty-five bowel lesions due to the operation of
administering enemata. They include three complete perforations
and ulcers, and wounds of various depths and sizes. The causes of
these lesions seem to have been the use of defective instruments,
ignorance of the direction of the rectum, catching of the transverse
fold on the tube, extreme irritation of the mucous membrane of the
bowel, and obstructions caused by certain conditions of the uterus,
the fœtal head, or an enlarged prostate. As a rule, these lesions are to
be found on the anterior wall of the rectum, from one to seven
centimetres from the anus. They are not always easy to diagnose, as
other foreign bodies or caustics may produce similar appearances.
Tubercular and hæmorrhoidal ulcers may be mistaken for them;
these are, however, generally higher up. A perforating wound gives
rise to paraproctitis, but this is not necessarily fatal, though a
stricture generally results.”—N. Y. Medical Journal.
TRANSCRIBER’S NOTES
1. Silently corrected typographical errors and variations in
spelling.
2. Anachronistic, non-standard, and uncertain spellings
retained as printed.
*** END OF THE PROJECT GUTENBERG EBOOK THE BROOKLYN
MEDICAL JOURNAL. VOL. II. NO. 2. AUG., 1888 ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebookgate.com

You might also like