0% found this document useful (0 votes)
5 views

DSP for MATLAB and LabVIEW I Fundamentals of Discrete Signal Processing Synthesis Lectures on Signal Processing Isen - Download the ebook and explore the most detailed content

The document promotes instant access to various digital signal processing (DSP) ebooks available for download at ebookgate.com. It highlights a specific book, 'DSP for MATLAB and LabVIEW I: Fundamentals of Discrete Signal Processing' by Forester W. Isen, which is part of a four-volume series covering essential DSP concepts and mathematics. The book includes practical scripts for MATLAB and LabVIEW, making it suitable for both beginners and advanced users in the field of digital signal processing.

Uploaded by

rositekhok
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

DSP for MATLAB and LabVIEW I Fundamentals of Discrete Signal Processing Synthesis Lectures on Signal Processing Isen - Download the ebook and explore the most detailed content

The document promotes instant access to various digital signal processing (DSP) ebooks available for download at ebookgate.com. It highlights a specific book, 'DSP for MATLAB and LabVIEW I: Fundamentals of Discrete Signal Processing' by Forester W. Isen, which is part of a four-volume series covering essential DSP concepts and mathematics. The book includes practical scripts for MATLAB and LabVIEW, making it suitable for both beginners and advanced users in the field of digital signal processing.

Uploaded by

rositekhok
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 84

Instant Ebook Access, One Click Away – Begin at ebookgate.

com

DSP for MATLAB and LabVIEW I Fundamentals of


Discrete Signal Processing Synthesis Lectures on
Signal Processing Isen

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

OR CLICK BUTTON

DOWLOAD EBOOK

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


Click here to visit ebookgate.com and download ebook now
Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

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/

ebookgate.com

Think DSP Digital Signal Processing in Python 1st Edition


Downey

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

ebookgate.com

Prentice Discrete Time Digital Signal Processing 2nd


Edition Oppenheim

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

ebookgate.com

Digital Signal Processing Using Matlab 1st Edition Andre


Quinquis

https://ebookgate.com/product/digital-signal-processing-using-
matlab-1st-edition-andre-quinquis/

ebookgate.com
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/
ebookgate.com

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/

ebookgate.com

Digital Signal Processing Using MATLAB 3rd Edition Vinay


K. Ingle

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

ebookgate.com

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/

ebookgate.com

Digital Signal Processing fundamentals and application 1st


Edition Li Tan

https://ebookgate.com/product/digital-signal-processing-fundamentals-
and-application-1st-edition-li-tan/

ebookgate.com
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
Exploring the Variety of Random
Documents with Different Content
Bouillon or water
1 tbsp. of butter
2 yolks of eggs
½ pt. gravy or broth from the meat

Preparation: The kidneys are sliced ½ inch thick. Butter,


onions and sliced champignons are cooked; flour, gravy, salt and
pepper are added. The sliced kidneys are put in and cooked slowly
15 minutes. Add lemon juice.
The ½ cup of rice is boiled until soft in bouillon or water to a
thick mush, then the butter and finally the 2 yolks of eggs are stirred
into it. A pudding mold is buttered and strewn with roll crumbs, then
put in a layer of rice and a layer of meat, alternately, until all is in;
the last layer should be rice. Cover and cook in a steamer over a
kettle of boiling water for 2 hours. After it is done, dump it on a hot
platter and serve with Dutch gravy.

No. 21—MUTTON RAGOUT.


Quantity for 6 Persons.

2 lbs. of mutton, lean, without bones


1 large onion
⅛ lb. of butter
Salt, pepper
2 tbsps. of flour
¾ qt. bouillon or water
1 wineglass red wine

Preparation: The meat is cut into 1½ inch pieces. Butter


stewed with onion and the pieces of meat are put in to cook 10
minutes. Add the flour and cook another few minutes, then add
bouillon or water, salt and pepper and cook until well done. During
the last 15 minutes, pour in the red wine and serve with a wreath of
boiled rice. (Boil 1 cupful of rice in salt water until tender but
retaining its firmness and add a piece of butter).

No. 22—MUTTON WITH POTATOES.


Quantity for 6 Persons.

1½ lbs. left over mutton roast


1 onion, sliced
1½ lbs. sliced raw potatoes
Salt, pepper
Left over gravy
1 small piece of butter

Preparation: The meat is cut into small thin slices, also the
peeled potatoes. A casserole is buttered and filled with 1 layer of
raw potatoes, 1 layer of meat, salt, pepper and sliced onion. Repeat
twice, with potatoes for the last layer. Pour the gravy over, (if it is
too thick, dilute with cream or milk) put a few small pieces of butter
on top, bake in oven for 1½ hours.
If you have no left over gravy, make one of 1 tablespoonful of
browned butter, flour, water or bouillon, cream, pepper and salt.
Pour over the contents of the casserole and bake it.

No. 23—MUTTON WITH PICKLES.


Quantity for 6 Persons.

1½–2 lbs. of mutton roast or boiled mutton remnants


Scant ⅛ lb. of butter
2 tbsps. of flour
¼ small onion, sliced
1 pt. thin gravy or bouillon
½ tsp. of meat extract
Salt, pepper
1 clove
½ bay-leaf
1 tbsp. of wine vinegar
3 sweet-sour pickles
3 tbsps. of pickled pearl onions
1 tsp. of sugar

Preparation: The cold, fried or boiled mutton is cut into small


pieces. The butter and onions are browned, then flour stirred in. Add
salt, pepper, cloves, bay-leaf, vinegar, sugar and bouillon or thin
gravy and boil until quite thick. The pickles, cut into small cubes, and
onions, are now put in, stewed a little while; add the pieces of meat,
heat, but do not boil, then serve. If the gravy is too light, add some
meat extract or sugar coloring. Fresh boiled, peeled potatoes go well
with this dish.

No. 24—MUTTON ROAST SALAD.


Quantity for 6 Persons.

1 lb. mutton roast


2 yolks of eggs
Salt, pepper
Some wine vinegar
1 tsp. of mustard
½ pt. cream
4 mustard pickles
1 vinegar pickle
2 tbsps. of pearl onions
2 tbsps. of oil

Preparation: Meat, pickles, onions, all this cut into small pieces
and mixed well with the other ingredients, then garnished with hard-
boiled eggs.

No. 25—MUTTON PIE.


Quantity for 6 Persons.

3–4 lbs. of mutton from the leg


1 qt. water
⅙ part of a small celery root
2 small onions
Some salt
2½ tbsps. of flour
Juice of one lemon
1 pinch of white pepper
3 doz. oysters
½ pt. can of champignons
2 tbsps. of chopped parsley
2 tbsps. of butter

The Paste.

½ lb. fresh butter


¼ lb. lard
¾ lb. of flour
2 tbsps. of brandy
1½ glasses water

Preparation: The meat is cut into pieces the size of cutlets,


boiled until tender in 1 qt. of water, celery root, 2 small onions, salt.
Cook 2 tablespoonfuls of butter and flour and add veal bouillon; then
add lemon juice, salt and pepper, if necessary, boil a few minutes,
but do not let the gravy get thick.
The Paste: Butter and lard must be very cold. You may omit the
lard and use more butter instead if you wish. Both are cut into the
flour, the very cold water and brandy poured in and then stirred to a
light paste and rolled out on a well-floured board. The butter must
be visible all through the paste. Do not knead much. Roll out, line a
baking dish with half of the paste, then put in layers of meat,
oysters, then sliced champignons, chopped parsley, the gravy poured
over the whole and then covered up with the other half of the paste
in which make a few cuts, finish off the edge and bake in medium
hot oven 1 to 1½ hours.
Remarks: Leave some of the gravy, mix with oyster liquor and
the juice of ½ lemon and serve with the pie.

No. 26—MUTTON PIE PREPARED SIMPLY.


The preparation of this pie is just the same as in No. 25, but
instead of oysters and champignons, take raw, very thinly sliced
potatoes.

No. 27—LAMB ROAST.


Quantity for 6–8 Persons.

6 lbs. of lamb quarter


Salt, pepper
½ lb. of butter
½ pt. sour or sweet cream
2 tbsps. of lemon juice
1 cup of water
1 tbsp. of flour

Preparation: The lamb meat must be two days old. It is


pounded, salted, peppered and put into the oven with the cup of
water. After 10 minutes the browned butter is poured hot over the
meat. Baste frequently, gradually adding the cream and lemon juice,
and roast for 1½ to 2 hours.
For the gravy, stir into the butter some flour and a little water
and cook (if necessary) a while longer. Serve the gravy with the
roast after straining.

No. 28—BREADED LAMB ROAST.


Quantity for 6 Persons.

4 lbs. of lamb quarter


Salt, pepper
2 eggs
Finely sifted roll crumbs
1½ cups of sour cream
1 tbsp. of flour
1 tbsp. of lemon juice
1 cup of water
½ lb. of butter

Preparation: The meat is pounded, rubbed with salt and


pepper, then rolled in beaten egg and bread crumbs. Heat the butter
and fry the meat quickly on top of the stove, then put it into the
oven, basting it often and adding the cream in spoonfuls, also a little
water, if the butter should get too brown. Cook in slow heat 1½
hours until the roast looks golden yellow; then serve.
For the gravy, stir 1 tablespoonful of flour into the butter, add
water, cook and strain. You can also add chopped champignons.

No. 29—MUTTON OR LAMB RAGOUT.


Quantity for 6 Persons.

3 lbs. of mutton or lamb


⅛ lb. of butter
Salt
6 pepper-corns
2 cloves
1 bay-leaf
¼ carrot
1½ qts. of water
3 tbsps. of flour
Juice of ½ lemon
1 wineglass red wine
½ pt. can champignons
5 truffles, chopped and peeled
½ tsp. of sugar
½ onion

Preparation: The mutton or lamb, which should be from the


breast, is cut into equal sized pieces, stewed a little in 2
tablespoonfuls of butter, then add 1½ qts. of water, carrot, onion,
salt, pepper, cloves, bay-leaf and cook the meat until tender.
For the gravy, take the rest of the butter, brown it with flour, add
the strained mutton bouillon, the red wine, lemon juice, some of the
champignon juice and boil slowly ½ hour. The gravy should be quite
thick. Now put in the meat, champignons, truffles and spices and
boil 15 minutes longer. Taste it for salt and spices. Serve on a hot
platter, and garnish the rim with crescents of puff paste and small
fried meat dumplings. The dumplings are prepared the same way as
the Ox-tongue Ragout in No. 35, Chapter 2.

No. 30—LAMB STEW.


Quantity for 6–8 Persons.

Head, liver, lungs and heart


Salt
8 whole pepper-corns
1 onion
1 bay-leaf
⅛ lb. of butter
1 egg
Roll crumbs
2 tbsps. of flour
Some herb vinegar
2 cloves

Preparation: The head is split in two, brain and tongue taken


out and soaked in water. The tongue is boiled until tender in water
with salt, pepper, bay-leaf, cloves and onion. In the same water,
cook the brain and also the heart, liver, lungs and head until tender.
When the tongue, heart and lungs are well done, cut them into
cubes. All the meat is put into a pot. Season with salt, pepper and a
piece of butter, pour in some bouillon and stew. Cut the meat off the
head, season with salt and pepper, dip in egg and roll crumbs and
fry in butter to a golden yellow. The same is done with the brains.
The liver is cut into slices, salted, peppered, dipped in flour and also
fried.
The hash of tongue, lung and heart is placed in the middle of a
hot platter, the liver slices placed in a wreath around it, the meat
from the head, which has been cut into neat pieces, and the brains
placed on top of the hash.
The gravy should be prepared before dishing out the hash. For
the gravy, take one tablespoonful of flour, stir it in the butter in
which the meat, brains and liver have been fried, add some of the
bouillon and a little vinegar, lemon juice or white wine. Serve the
gravy with the meat.

No. 31—PLAIN RAGOUT OF MUTTON OR


LAMB.
The preparation is the same as in No. 29. Instead of wine, take
wine vinegar or herb vinegar and leave off the champignons and
truffles.

No. 32—LAMB CROWN ROAST.


Contents and preparation are the same as No. 42 of previous
chapter, Veal Crown Roast.
CHAPTER 5.
PORK.

1. Ham.
2. Pork Loin.
3. Pork Chops.
4. Pork Shoulder
5. Belly
6. Head
7. Snout
8. Shanks
9. Feet

Boiled, Fried and Salted Pork.


Also recipes for utilizing left over pork.
Good pork from well fed yearlings is tender, light and not too fat.
The fat or lard must be white, the hide light. Inferior pork has a
yellow hide, smeary lard and very fat, dark meat.
Suckling pig is considered a delicacy in the kitchen. It is usually
2 or 3 weeks old.
Best Pieces for Roasts.
The leg, the pork loin, the slightly smoked rib piece, the fillets.
Small Pieces for Frying.
The cutlets, the fillets and ham slices.
Best Pieces for Stew.
The pork shoulder and fillets.
Best Pieces for Boiling.
The belly, the hip-bone, (head, shoulder and marbled pieces.
Best Pieces for Smoking and Salting.
The hams, pork loins, smoked tenderloin, (called lachsschinken),
the belly for lean bacon, the pork loin as fat bacon, tenderloin and
shoulder.
For Gelatines.
The hide or skin and bones.

No. 1—PORK ROAST.


Quantity for 6–8 Persons.

4 lbs. rib roast


Salt
6 pepper-corns
2 cloves.
1 onion
1½ tbsps. of flour
1 cup of cream
1½ cups of water
1 bay-leaf

Preparation: The meat is washed and pounded, some fat


trimmed off and salted. The roast is put into the oven with 1 cup of
boiling water, all spices and onion and roasted 1½ to 2 hours,
basting it frequently. The roast must be crisp outside. When it is
done, put it on a platter and prepare the gravy. If there is too much
fat, skim it off, put the flour into it, stew a little while, add the cream
and some water if necessary, cook, strain and serve with the roast.

No. 2—FRESH YOUNG LEG OF PORK FOR


ROAST.
Quantity for 10–15 Persons.

8–10 lbs. of leg of pork


Salt
6 pepper-corns
3 cloves
1 onion
2 tbsps. of flour
1 pt. of water
½ wineglass red wine or Madeira
2 by-leaves

Preparation: The meat is pounded, skinned, some of the fat


cut off, rubbed with salt and put in oven with 1 pt. boiling water, all
spices and onion and roasted 2½ to 3 hours, basting it frequently.
For the gravy, skim off the fat, stir in the flour, stew a little while,
then add some water, the wine or cream, and cook it well, strain and
serve with the meat.

No. 3—BREADED LEG OF PORK.


Quantity for 10–15 Persons.
The meat is prepared the same way as described in No: 2, but
¾ hours before done, 8 cloves are stuck into it, ½ teaspoonful of
sugar and 1 cup of rye bread crumbs roasted in butter are strewn
over it. Cover it well with the bread crumbs by pressing it down with
a knife, baste with drippings and roast ½ to ¾ hour longer.
For the gravy, stir in 1½ tablespoonfuls of flour, 1 glass red
wine, 1½ cups of water; cook, strain and serve.

No. 4—BRAISED PORK ROAST.


Quantity for 6 Persons.

4 lbs. of pork
Salt, pepper
3 cloves
1 bay-leaf
1 small onion
2 tbsps. of flour
1½ pts. of water
2 tbsps. of white wine

Preparation: The meat is fried quickly to a light brown in 1


tablespoonful of lard and onion on the open fire, the flour is stirred
in and browned a little. Now the water is poured on, salt and spices
and wine added and then roasted in oven 2 to 2½ hours, turning
and basting frequently.
For the gravy, skim off the fat, strain it and serve with the roast
which must be a light brown.

No. 5—SOUR PORK ROAST.


Quantity for 6 Persons.

4 lbs. of pork shoulder


1 qt. vinegar
2 onions
6 pepper-corns
3 cloves
2 bay-leaves
1 handful of salt for pickling
1½ tbsps. of flour
2 cups of water
Salt
1 pinch of pepper
1 wineglass of red wine if you wish

Preparation: The meat is pounded and put into a jar or


earthen dish with 1 qt. of vinegar, sliced onion, salt, cloves, peppers
and bay-leaves and left in it for 2 days, turning it once or twice.
When taken out to roast, put it into the oven with 1 cup of water,
salt and pepper, also ½ of the onions that are in the vinegar, then
roast 1¼ hours, basting frequently.
For the gravy, stir in the flour, stew a few minutes, add some
water, the wine or ½ cup of cream, cook, pour over the roast. When
this is done, strain the gravy and serve with the roast.

No. 6—PORK STEW.


Quantity for 6 Persons.
3 lbs. of pork
Salt
4 pepper-corns
2 cloves
1 bay-leaf
2½ qts. of water
½ onion

Preparation: The meat is washed and put on with 2½ qts. of


cold water, onion, salt, spices and cooked slowly 2 to 2½ hours,
covered. Skim the bouillon several times. Cut the meat in slices and
arrange the vegetables around it. The bouillon may be used for
boiling all kinds of vegetables, beans, peas and lentils.

No. 7—SALT PORK OR HIP-BONE FOR


STEW.
Quantity for 6 Persons.

4 lbs. of salt pork or hip-bone


6 pepper-corns
2 cloves
1 bay-leaf
1 onion
3 qts. of water

Preparation: The salt pork or hip-bone is put on with 3 qts. of


cold water, spices and onion, and cooked slowly for 3 hours. The pot
must be well covered and ought to be an earthen dish. The broth
will be jellied when cold and can be utilized for all kinds of
headcheese.

No. 8—SMOKED HAM FOR COOKING.


Quantity for 15–20 Persons.

10 lbs. of ham
2 onions
6 cloves
2 bay-leaves
10 pepper-corns
Sufficient water

Preparation: The ham is soaked in water over night, then put it


on the fire with cold water enough to cover it, onions and spices
added. Cook it slowly in a large kettle for about 4 to 5 hours. Serve
it warm with a Madeira gravy, or cold in slices.

No. 9—SMOKED HAM BOILED, BREADED


WITH RYE BREAD CRUMBS.
Quantity for 15–20 Persons.

10 lbs. of ham
Sufficient water
Rye bread crumbs
1 tsp. of brown sugar
Cloves for larding

Preparation: The ham is soaked in water over night, then put


on the fire with sufficient cold water to cover it, boil slowly for 4
hours. It will be quite done by this time. Put it on a platter, skin it
and lard it where the skin has been removed with 30 to 40 cloves,
sprinkle side with the sugar and thickly with the rye bread crumbs,
then lay the ham into a pan and bake it in the oven for 1 hour. Serve
with a Madeira gravy. This is a fine dish.
No. 10—HAM IN BURGUNDY WINE.
Quantity for 15–20 Persons.

10 lbs. of ham
2 bottles of Burgundy wine
2 small sliced onions
A leek
1 piece of thyme
1 piece of marjoram
¼ lb. of truffles
1 very large pig’s bladder
2 tbsps. of butter
2½ tbsps. of flour
¼ pt. of Madeira
½ cup of bouillon
A cloth to tie up the ham
Water to boil in
¼ lb. of champignons

Preparation: The skin is cut off and the bones are taken out as
well as possible. To the wine add the onion, the chopped leek,
thyme and marjoram, then leave the ham in it for 24 hours, turning
it over often. After that take it out, make a stuffing of truffles,
champignons, 1 tablespoonful of butter, salt, pepper and ½ cup of
bouillon mixed well and stuff the cavity left after removing the bone
with it and sew it up. Clean the bladder well inside and outside,
make a cut into it and put the stuffed ham inside, then pour in the
wine with all its contents in which the ham has been lying for 24
hours, sew it up carefully. Then tie the whole into a white cloth and
put it on the fire in cold water to boil for 4 to 5 hours slowly. After
this, take the cloth off, open the suture, pour the fluid into a pot and
put the ham into a pan.
Brown the butter and flour, add some of the ham fluid and
Madeira, cook it well and add perhaps ½ teaspoonful of sugar,
(better taste the gravy first). Fill some of this gravy over the ham
and put it into the oven, roast for ¼ hour, then serve it with the
gravy. Ham prepared in this way is very fine. If wine cannot be had,
use Ginger Ale.

No. 11—FRIED HAM WITH EGGS.


Quantity for 6 Persons.

1 lb. raw ham sliced very thin


1½ pts. milk
12 eggs
1 pinch of salt and white pepper
⅛ lb. butter

Preparation: The ham is put in milk for 6 hours, then dry off
the ham slices and fry them quickly in butter, put them on a platter
and pour the butter over. In the meantime the eggs have been fried
in butter with salt and pepper and now they are carefully placed on
the ham.
Remarks: You need not put the ham into the milk and instead
of ham you may take breakfast bacon. (Bacon and Eggs).

No. 12—BOILED HAM WITH NOODLES.


Quantity for 6 Persons.

1 lb. of boiled ham


Noodles made from 2 eggs
1 pt. milk
1 pinch of pepper
2–3 eggs
Some butter
Salt
Preparation: The ham is chopped fine. The noodles are cooked
in salt water for ten minutes, then poured into a colander. Butter a
casserole and put in a layer of noodles, then a layer of ham and
repeat 2 or 3 times until all is in. The top layer must be noodles. The
milk is well mixed with 2 or 3 eggs and very little salt and pepper
and poured over the whole mass, a few pieces of butter on top and
baked in oven slowly for 1 hour.

No. 13—BOILED HAM WITH MACARONI.


Quantity for 6 Persons.

1 lb. of boiled ham


½ lb. of macaroni
1 pt. of milk
Very little salt and pepper
Juice of 1 lemon
2 tbsps. of Parmesan cheese or Swiss cheese
2–3 eggs

Preparation: The ham is chopped fine and the macaroni


broken in 2 inch pieces, boiled in salt water for ½ hour, then drain.
Butter a casserole, put in a layer of macaroni and one of ham,
repeat 2 or 3 times, with macaroni for the last layer. The milk is
stirred well with eggs, salt, pepper, lemon juice and grated cheese
and poured over the mass, then baked in the oven for one hour,
after putting a few small pieces of butter on top. Serve in the
casserole in which it was baked.

No. 14—BREADED HAM.


Quantity for 6 Persons.

1 lb. raw ham


⅛ lb. of butter or lard, good measure
2 cups of roll crumbs
1 pinch of salt
1½ pts. of milk
3 whites of eggs

Preparation: The ham is cut into ¼ inch thick slices and put
into milk for 5 hours, then taken out, dried, salted, dipped into white
of egg and then into roll crumbs mixed with the flour. Then it is fried
in hot butter on both sides. These ham slices are nice to serve with
vegetables.

No. 15—ROASTED PORK-FILLET.


Quantity for 6 Persons.

2–2½ lbs. of pork-fillet


⅛ lb. bacon for larding
Salt, pepper
1 tbsp. of flour
½ cup of sweet or sour cream
1 cup of water
2 tbsps. of butter or drippings

Preparation: The pork-fillets are pounded, the skin and most of


the fat removed, then larded with bacon, salted and peppered. Put
the fat which you cut off into a flat baking tin with some butter; into
this heated lard and butter, put your fillets, baste often and let it
roast in the oven 45 minutes to 1 hour. This depends on the size of
the meat. 15 minutes before done, pour off some of the lard, stir in
the flour to brown, then the water and gradually the cream, basting
frequently. Strain the gravy and serve with the fillet.
No. 16—STUFFED PORK-FILLET CALLED
MOCK DUCK.
Quantity for 6 Persons.

2 large fillets of 2½ lbs. or 4 small ones


⅛ lb. bacon for larding
Salt, pepper

For Stuffing.

½ lb. chopped pork


½ lb. chopped veal
2 eggs
2 tbsps. of butter for frying
½ tbsp. of butter
½ tbsp. of lemon juice
1 tbsp. of capers
Salt
1 pinch of pepper
½ tbsp. of flour
¼ cup of sweet or sour cream
1 cup of water

Preparation: The skin and fat are removed from the fillets and
these pounded flat. Chopped pork and veal, eggs, ½ tablespoonful
of butter, lemon juice, capers, salt and pepper are mixed well. This
stuffing is placed between two fillets and these are then tied
together with string or fastened together with toothpicks. If there
are four fillets, put ½ of the stuffing on two and place the other two
on top, then put bacon strips on top and fry them like No. 15, 1 to
1½ hours. Strain the gravy and serve with the fillets. This makes a
very fine dish.
No. 17—ROASTED PORK CUTLETS.
Quantity for 6 Persons.

3 lbs. of pork cutlets


Salt, pepper
1 egg
1½ cups grated rolls
1 tbsp. of flour
1 clove
½ bay-leaf
¼ small onion
⅛ lb. of butter or lard
1 cup of water

Preparation: The pork cutlets are pounded, salted and


peppered. The egg is beaten with a tablespoonful of milk and the
cutlets dipped into this and then into the bread crumbs, then fried
until light brown in hot butter or lard. This will require 15 minutes if
they are ½ inch thick; if they are thicker, fry them for 20 minutes
and place them on a hot platter.
If there is much fat in the pan, take some of it out and brown
onion slices and flour in the remaining fat; add water, clove and bay-
leaf, also salt and pepper, if necessary, and cook for 5 minutes.
Strain the gravy and pour over cutlets or serve it separately.

No. 18—CHOPPED PORK CUTLETS.


Quantity for 6 Persons.
Preparation and ingredients are the same as in No. 17. The
cutlets are chopped, carefully breaded and fried in butter about 8 to
10 minutes if the cutlets are ½ to ¾ inch thick.
No. 19—STEWED PORK CUTLETS.
Quantity for 6 Persons.

3 lbs. pork cutlets


Salt, pepper
½ cup of flour for dipping
1½ pts. of bouillon or water mixed with ½ tsp. of meat
extract
2 cloves
1 bay-leaf
4 pepper-corns
½ sliced onion
1½–2 tbsps. of flour
1 wineglass Madeira or red wine
Juice of ¼ lemon
Butter

Preparation: The fat is cut off and the cutlets salted and
peppered and dipped in flour, then fried quickly in hot butter on both
sides. They are then taken out and put on a hot platter. The sliced
onion and flour are browned in the drippings, bouillon, wine, spices,
lemon juice, salt, 4 pepper-corns added, and cooked a while. The
cutlets are then put into this gravy, covered and placed into the oven
to stew one hour. When done, strain the gravy and serve with cutlets
on the same platter.

No. 20—PORK KIDNEYS.


Quantity for 6 Persons.

1¾ lbs. pork kidneys


Salt, pepper
1½ tbsps. of flour
⅛ lb. of butter
1 pt. of bouillon
1½ tbsps. of vinegar

Preparation: The kidneys are cut crosswise into ¼ inch slices


and fried in the hot butter 1 minute. Salt and pepper, stir in the flour,
cook another minute and pour in bouillon and vinegar and cook 1 to
2 minutes more, stirring constantly. Have a good hot fire. The
kidneys are tender when they do not look red any longer. If they
cook too long, they get hard. Serve at once.

No. 21—PORK RAGOUT OR PORK PEPPER.


Quantity for 6 Persons.

2 lbs. of lean pork


1½ tbsps. of butter or lard
Salt, pepper
½ onion
2 cloves
1 bay-leaf
1½ tbsps. of vinegar or 1 wineglassful of red wine
3 tbsps. of flour
Some water or bouillon
½ cup of pig’s blood if you can get it

Preparation: The meat is cut into 2½ inch squares. The butter


and flour is browned, then bouillon or water, onion slices, spices and
salt added and cooked a few minutes. Put in the meat and cook
slowly ½ hour. Add the vinegar or red wine and continue to cook
slowly until done, which will require ½ to 1 hour. Put the ragout in a
warm dish and stir the blood into the gravy, strain and pour over the
meat.
Remarks: You may omit the blood.
No. 22—MOCK RABBIT.
Quantity for 6 Persons.

1 lb. chopped pork


1 lb. chopped veal
1 lb. chopped beef
2 tbsps. of butter
3 eggs
2 soaked rolls
Juice of ½ lemon
1 tbsp. of capers
Salt
1 pinch of pepper
⅛ lb. of butter or lard for frying
½ tbsp. of flour
1 cup of water
1 cup of roll crumbs

Preparation: All the meat must be chopped very fine and


mixed well with the roll from which the water has been well drained,
eggs, 2 tablespoonfuls of butter, lemon juice, capers, salt, pepper,
and 1 teaspoonful of grated onion. It is shaped into an oblong loaf
and strewn with roll crumbs. The butter or lard is heated, the loaf of
meat put in and baked in the oven one hour, basting frequently. Take
out the mock rabbit carefully and put it on a platter. For the gravy,
brown ½ tablespoonful of flour in the drippings, add the water, boil,
and when done, strain and serve with the mock rabbit. You may also
add ¼ cup of cream and some lemon juice to the gravy.
Remarks: You may also put 2 to 3 peeled, hard-boiled eggs
into the loaf of meat, whole, before baking it. It is fine for slicing
cold.

No. 23—STUFFED HOG’S HEAD.


Quantity for 10 Persons.

1 hog’s head with ears


Salt
6 whole peppers
7 qts. of water for cooking
1 carrot
2 small onions
⅛ of a celery root
½ pt. of wine vinegar
4 cloves
2 bay-leaves

The Stuffing.

1 lb. chopped lean pork


1 lb. chopped lean veal
Salt, pepper
¼ lb. butter
3 eggs
Juice of ½ lemon
1 tsp. of grated onion
1 pinch of nutmeg.
2 soaked rolls

Extra.

1 lb. boiled beef tongue


½ lb. of boiled veal
½ lb. cooked pork
⅛ lb. truffles, cut in small pieces
½ lb. bacon
1 white cloth to tie up

Preparation: The head is cleaned well and split open


lengthwise without cutting the skin. The bones are all taken out and
the inside of the head is salted and peppered. The bones are split
and put over the fire with the 7 qts. of water, the carrot, onion,
celery, vinegar, cloves, and bay-leaf.
For the stuffing, mix well the chopped veal, salt, pepper, soaked
rolls, ¼ lb. of butter, 3 eggs, grated onion, lemon juice, nutmeg and
put the stuffing into the head, 1 inch thick, then make a layer of
boiled tongue (½ inch slices), pork and veal. Then a thin layer of
truffles. Repeat this, putting in stuffing, sliced meat and truffles
alternately until both sides of the head are filled, sew it up, lay a
piece of pork skin before the throat opening and sew it on. Tie up
the whole head in the white cloth or sew it into the cloth and cook it
4 hours in the same water in which you have boiled the bones. After
it is done, leave it in the bouillon and cool it off; when it is nearly
cold, place it on a board and weight it down. When it is cold, cut off
the cloth and pick out all threads. Cut off a slice from the head so
you can see the stuffing. Garnish by pinning a lemon slice into each
eye with a toothpick, into the mouth place a bunch of parsley and
around the head, green lettuce. This will make a fine cold supper or
lunch. Serve a cold mustard gravy with it.
Remarks: The bouillon, after being boiled down considerably,
may be used for aspic or head cheese.

No. 24—PORK RIBS AND SAUERKRAUT.


Quantity for 6 Persons.

3 lbs. salted pork ribs


1 lb. sauerkraut
¼ lb. butter
1 pinch of sugar
6 large, peeled and sliced apples
½ bottle of white wine

For Meat Dumplings.


¼ lb. chopped pork
¼ lb. chopped veal
1 egg
Salt, pepper
1 tbsp. of butter
¼ tbsp. of grated onion

Preparation: The pork ribs which have been salted for several
days are cut into pieces, washed, dried and fried on both sides in
hot butter, then put into a pot, the sauerkraut on top. (If the
sauerkraut is too sour, soak it in water and drain). Add ¼ lb. of
butter, apples, white wine and sugar, cover and cook slowly for 2
hours. When it gets too dry, pour in some water.
The Meat Dumplings: The chopped pork and veal, soaked roll,
egg, 1 tablespoonful of butter and onion are mixed well. Shape into
dumplings and fry well done in the butter in which you fried the ribs.
Arrange the sauerkraut in the middle of the platter, the ribs
around it and the dumplings piled on top in a heap. Then serve. If
you cannot get wine, omit it.

No. 25—SAUSAGE.
Quantity for 6 Persons.

2½ lbs. marbled pork


Salt
½ tsp. of cloves
½ tsp. of thyme
½ tsp. of white pepper

Preparation: The meat is ground three times or chopped very


fine, then mixed well with the spices, filled into casings made from
hog intestines and fried while fresh.
No. 26—FRIED SAUSAGE.
2½ lbs. of sausage
2 tbsps. of lard
1 small onion
Salt, pepper
1 cup of bouillon or water
½ tsp. of meat extract
1 tbsp. of flour

Preparation: The sausage is fried slowly in the hot lard until


brown, then take it out and put the sliced onion into the same lard,
add the flour, brown it, add water or bouillon, meat extract, if you
have it, salt and pepper and cook. Pour this strained gravy over the
sausage and serve.

No. 27—SAUSAGES.
Quantity for 6 Persons.

½ lb. lean pork


½ lb. fat pork from the loin
1 pinch of white pepper
2 casings of sheep intestines
Salt

Preparation: Meat and fat are chopped fine or ground 3 times,


salted and peppered, filled into the casings and formed into lengths
of sausages. You can improve the sausage by adding chopped
truffles.

No. 28—FRIED SAUSAGES.


Quantity for 6 Persons.

1 lb. of sausages
2 whites of eggs
1 cup of grated rolls
Salt, drippings or butter
½ cup of flour

Preparation: The sausages are salted, dipped into white of


egg, flour and bread crumbs and fried in hot drippings or butter to a
nice brown color. They are nice with vegetables.
Remarks: You can prepare them like No. 26 and omit the bread
crumbs.

No. 29—WHITE CABBAGE PIE WITH PORK.


Quantity for 6–8 Persons.

1 head of white cabbage


¾ lb. chopped pork
¾ lb. chopped beef
Salt
1 pinch of pepper
2 tbsps. of butter or drippings
2 eggs

Preparation: Remove the outer leaves and the core of the


cabbage and boil until tender in salt water. Mix well the chopped
pork and beef, butter, eggs, salt and pepper. Butter a pudding mold,
drain the salt water from the cabbage and put in layers of cabbage
and meat; repeat 3 times until all is in, the cabbage being on top,
then close the mold, put it in a steamer over a kettle of boiling water
and boil for 2 hours. Dump on a dish or platter after draining off the
broth.
For the Gravy: Stir 5 rolled crackers with 1 tablespoonful of
butter, salt, pepper, add the broth and boil. If it gets too thick, add
some bouillon or water; stir in 2 yolks of eggs and serve with the
pie.
Remarks: For the filling you may take pork only and for gravy
thickening use flour instead of crackers.

No. 30—CABBAGE SAUSAGES.


Quantity for 6 Persons.

1 head of white cabbage


¾ lb. chopped pork
Salt, pepper
1 onion
Left over gravy or 1 pt. of false gravy
⅛ lb. of bacon

Preparation: The whole head of cabbage is boiled until half


done in salt water. The outer leaves are then carefully taken off and
some of the mixture of chopped pork, salt and pepper put on each
leaf and the leaf is rolled or wrapped around it and tied with string.
The bacon and onions are cut into small pieces and fried, then these
little cabbage sausages are fried in it to a nice brown color. The
gravy is poured over them, the pan is covered and the sausages
stewed for 1½ to 2 hours, the string removed and served.
Remarks: If you have no gravy, make one by browning 1
tablespoonful of butter and 2 tablespoonfuls of flour and adding
water or bouillon. Put in 3 tablespoonfuls of cream if you have it;
salt, pepper and boil. If you have no bouillon, stir ½ teaspoonful of
meat extract with water.
No. 31—SPANFERKEL OR ROAST LITTLE
PIG.
Quantity for 8–10 Persons.

1 suckling pig
Salt
½ lb. of butter
¾ pt. of water
1 pinch of pepper

Preparation: The well washed and dressed pig is soaked in


water for a few hours. The eyes are taken out and it is salted inside
and outside. The fore and hind legs are bent under the pig and in
this way it is placed into a pan with a tray on which it rests. Pour in
some water and let it roast for 10 minutes. The butter is melted and
the pig is brushed with it every 5 to 10 minutes. Gradually add water
and cook it 1½ hours. Prick the skin several times so it will not
blister; the butter will make the pig crisp. The drippings will be
served as gravy or you can also serve a truffle, caper or tomato
gravy with it.

No. 32—STUFFED SPANFERKEL OR ROAST


LITTLE PIG.
Quantity for 8–10 Persons.

1 suckling pig
2 lbs. of sweet-sour apples
1 cup of dried currants
1 tbsp. of sugar
Salt
½ lb. of butter
½ cup seedless raisins
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