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

Fundamentals of Digital Signal Processing Using MATLAB 2nd Edition Robert J. Schilling 2025 scribd download

The document promotes the 2nd edition of 'Fundamentals of Digital Signal Processing Using MATLAB' by Robert J. Schilling and Sandra L. Harris, available for download at ebookultra.com. It outlines the book's structure, which includes sections on signal analysis, digital filter design, and advanced signal processing, and emphasizes practical applications and MATLAB programming. Additionally, it mentions supplementary resources and tools for students to enhance their learning experience.

Uploaded by

molineilfroi90
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
22 views

Fundamentals of Digital Signal Processing Using MATLAB 2nd Edition Robert J. Schilling 2025 scribd download

The document promotes the 2nd edition of 'Fundamentals of Digital Signal Processing Using MATLAB' by Robert J. Schilling and Sandra L. Harris, available for download at ebookultra.com. It outlines the book's structure, which includes sections on signal analysis, digital filter design, and advanced signal processing, and emphasizes practical applications and MATLAB programming. Additionally, it mentions supplementary resources and tools for students to enhance their learning experience.

Uploaded by

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

Visit https://ebookultra.

com to download the full version and


explore more ebooks

Fundamentals of Digital Signal Processing Using


MATLAB 2nd Edition Robert J. Schilling

_____ Click the link below to download _____


https://ebookultra.com/download/fundamentals-of-
digital-signal-processing-using-matlab-2nd-edition-
robert-j-schilling/

Explore and download more ebooks at ebookultra.com


Here are some suggested products you might be interested in.
Click the link to download

Digital signal processing with examples in MATLAB Second


Edition Hush

https://ebookultra.com/download/digital-signal-processing-with-
examples-in-matlab-second-edition-hush/

Digital Signal and Image Processing using MATLAB Volume 2


Advances and Applications The Deterministic Case 2nd
Edition Gérard Blanchet
https://ebookultra.com/download/digital-signal-and-image-processing-
using-matlab-volume-2-advances-and-applications-the-deterministic-
case-2nd-edition-gerard-blanchet/

Signal Processing for Digital Communications Artech House


Signal Processing Library George J. Miao

https://ebookultra.com/download/signal-processing-for-digital-
communications-artech-house-signal-processing-library-george-j-miao/

Digital Signal Processing Second Edition Fundamentals and


Applications Li Tan

https://ebookultra.com/download/digital-signal-processing-second-
edition-fundamentals-and-applications-li-tan/
Digital Signal Processing and Applications with the
TMS320C6713 and TMS320C6416 DSK Topics in Digital Signal
Processing 2nd Edition Rulph Chassaing
https://ebookultra.com/download/digital-signal-processing-and-
applications-with-the-tms320c6713-and-tms320c6416-dsk-topics-in-
digital-signal-processing-2nd-edition-rulph-chassaing/

Digital Signal Processing Laboratory 2nd ed Edition B.


Preetham Kumar

https://ebookultra.com/download/digital-signal-processing-
laboratory-2nd-ed-edition-b-preetham-kumar/

Digital Audio Signal Processing 2nd ed Edition Udo Zölzer

https://ebookultra.com/download/digital-audio-signal-processing-2nd-
ed-edition-udo-zolzer/

Digital Signal Processing Laboratory Second Edition Kumar

https://ebookultra.com/download/digital-signal-processing-laboratory-
second-edition-kumar/

Hack Audio An Introduction to Computer Programming and


Digital Signal Processing in MATLAB 2019th Edition Eric
Tarr
https://ebookultra.com/download/hack-audio-an-introduction-to-
computer-programming-and-digital-signal-processing-in-matlab-2019th-
edition-eric-tarr/
Fundamentals of Digital Signal Processing Using
MATLAB 2nd Edition Robert J. Schilling Digital Instant
Download
Author(s): Robert J. Schilling, Sandra L Harris
ISBN(s): 9780840069092, 084006909X
Edition: 2
File Details: PDF, 20.09 MB
Year: 2011
Language: english
SCHILLING
HARRIS

DIGITAL SIGNAL PROCESSING


FUNDAMENTALS OF
MATLAB®
using
SECOND
EDITION

To learn more about Cengage Learning, visit www.cengage.com


For your course and learning solutions, visit www.cengage.com/engineering
Purchase any of our products at your local bookstore or at our preferred
online store www.cengagebrain.com

9780840069092_cvr_use_wkg.indd 1 09/11/10 4:34 PM


Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

Fundamentals of Digital
Signal Processing
Using MATLAB®
Second Edition

Robert J. Schilling and Sandra L. Harris

Clarkson University
Potsdam, NY

Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

i
This is an electronic version of the print textbook. Due to electronic rights
restrictions, some third party content may be suppressed. Editorial
review has deemed that any suppressed content does not materially
affect the overall learning experience. The publisher reserves the
right to remove content from this title at any time if subsequent
rights restrictions require it. For valuable information on pricing, previous
editions, changes to current editions, and alternate formats, please visit
www.cengage.com/highered to search by ISBN#, author, title, or keyword
for materials in your areas of interest.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

Fundamentals of Digital Signal © 2012, 2005 Cengage Learning


Processing Using MATLAB®
ALL RIGHTS RESERVED. No part of this work covered by the copyright
Robert J. Schilling and Sandra L. Harris herein may be reproduced, transmitted, stored, or used in any form or
by any means graphic, electronic, or mechanical, including but not
Publisher, Global Engineering:
limited to photocopying, recording, scanning, digitizing, taping, web
Christopher M. Shortt
distribution, information networks, or information storage and
Acquisitions Editor: Swati Meherishi retrieval systems, except as permitted under Section 107 or 108 of
the 1976 United States Copyright Act, without the prior written
Senior Developmental Editor: Hilda Gowans
permission of the publisher.
Editorial Assistant: Tanya Altieri
Team Assistant: Carly Rizzo For product information and technology assistance, contact us at
Marketing Manager: Lauren Betsos Cengage Learning Customer & Sales Support, 1-800-354-9706.
For permission to use material from this text or product,
Media Editor: Chris Valentine
submit all requests online at www.cengage.com/permissions.
Content Project Manager: Further permissions questions can be e-mailed to
D. Jean Buttrom [email protected].
Production Service:
RPK Editorial Services, Inc.
Library of Congress Control Number: 2010938463
Copyeditor: Shelly Gerger-Knechtl
ISBN-13: 978-0-8400-6909-2
Proofreader: Becky Taylor
ISBN-10: 0-8400-6909-X
Indexer: Shelly Gerger-Knechtl
Compositor: MPS Limited, Cengage Learning
a Macmillan Company 200 First Stamford Place, Suite 400
Stamford, CT06902
Senior Art Director: Michelle Kunkler
USA
Internal Designer: Carmela Periera
Cengage Learning is a leading provider of customized learning solutions
Cover Designer: Andrew Adams
with office locations around the globe, including Singapore, the United
Cover Image: © prudkov/Shutterstock Kingdom, Australia, Mexico, Brazil, and Japan. Locate your local office at:
Rights Acquisitions Specialist: John Hill international.cengage.com/region.

Text and Image Permissions Researcher:


Cengage Learning products are represented in Canada by
Kristiina Paul
Nelson Education, Ltd.
First Print Buyer: Arethea L. Thomas
For your course and learning solutions, visit
www.cengage.com/engineering.

Purchase any of our products at your local college store or at our


preferred online store www.cengagebrain.com.

MATLAB is a registered trademark of The MathWorks,


3 Apple Hill Drive, Natick, MA 01760.

Printed in the United States of America


1 2 3 4 5 6 7 14 13 12 11 10

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

ii
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

In memory of our fathers:

Edgar J. Schilling
and
George W. Harris

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

iii
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

Preface

Digital signal processing, more commonly known as DSP, is a field of study with increasingly
widespread applications in the modern technological world. This book focuses on the fun-
damentals of digital signal processing with an emphasis on practical applications. The text,
Fundamentals of Digital Signal Processing, consists of the three parts pictured in Figure 1.

FIGURE 1: Parts
of Text
I. Signal and System Analysis

1. Signal Processing
2. Discrete-time Systems in the Time Domain
3. Discrete-time Systems in the Frequency Domain
4. Fourier Transforms and Signal Spectra

II. Digital Filter Design

5. Filter Design Specifications


6. FIR Filter Design
7. IIR Filter Design

III. Advanced Signal Processing

8. Multirate Signal Processing


9. Adaptive Signal Processing

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

vi Preface

• • • • • • • • • ••••• ••

Audience and Prerequisites


This book is targeted primarily toward second-semester juniors, seniors, and beginning gradu-
ate students in electrical and computer engineering and related fields that rely on digital signal
processing. It is assumed that the students have taken a circuits course, or a signals and systems
course, or a mathematics course that includes an introduction to the Fourier transform and the
Laplace transform. There is enough material, and sufficient flexibility in the way it can be
covered, to provide for courses of different lengths without adding supplementary material.
Exposure to MATLAB® programming is useful, but it is not essential. Graphical user interface
(GUI) modules are included at the end of each chapter that allow students to interactively
explore signal processing concepts and techniques without any need for programming. MAT-
LAB computation problems are supplied for those users who are familiar with MATLAB, and
are interested in developing their own programs.
This book is written in an informal style that endeavors to provide motivation for each
new topic, and features a careful transition between topics. Significant terms are set apart
for convenient reference using Margin Notes and Definitions. Important results are stated as
Propositions in order to highlight their significance, and Algorithms are included to summarize
the steps used to implement important design procedures. In order to motivate students with
examples that are of direct interest, many of the examples feature the processing of speech and
music. This theme is also a focus of the course software that includes a facility for recording and
playing back speech and sound on a standard PC. This way, students can experience directly
the effects of various signal processing techniques.

• • • • • • • • • ••••• ••

Chapter Structure
Each of the chapters of this book follows the template shown in Figure 2. Chapters start with
motivation sections that introduce one or more examples of practical problems that can be
solved using techniques covered in the chapter. The main body of each chapter is used to

FIGURE 2: Chapter
Structure
Motivation

Concepts,
techniques,
examples

GUI software,
case studies

Problems

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

Preface vii

introduce a series of analysis tools and signal processing techniques. Within these sections,
the analysis methods and processing techniques evolve from the simple to the more complex.
Sections marked with a ∗ near the end of the chapter denote more advanced or specialized
material that can be skipped without loss of continuity. Numerous examples are used throughout
to illustrate the principles involved.
Near the end of each chapter is a GUI software and case studies section that introduces
GUI modules designed to allow the student to interactively explore the chapter concepts and
techniques without any need for programming. The GUI modules feature a standard user
interface that is simple to use and easy to learn. Data files created as output from one module
can be imported as input into other modules. This section also includes case study examples
that present complete solutions to practical problems in the form of MATLAB programs.
The Chapter Summary section concisely reviews important concepts, and it provides a list of
student learning outcomes for each section. The chapter concludes with an extensive set of
homework problems separated into three categories and cross referenced to the sections. The
Analysis and Design problems can be done by hand or with a calculator. They are used to test
student understanding of, and in some cases extend, the chapter material. The GUI Simulation
problems allow the student to interactively explore processing and design techniques using the
chapter GUI modules. No programming is required for these problems. MATLAB Computation
problems are provided that require the user to write programs that apply the signal processing

techniques covered in the chapter. Solutions to selected problems, marked with the symbol,
are available as pdf files using the course software.

• • • • • • • • • ••••• ••

FDSP Toolbox
One of the unique features of this textbook is an integrated software package called the Fun-
damentals of Digital Signal Processing (FDSP) Toolbox that can be downloaded from the
companion web site of the publisher. It is also possible to download the FDSP toolbox from
the following web site maintained by the authors. Questions and comments concerning the
text and the software can be addressed to the authors at: [email protected].
www.clarkson.edu/~rschilli/fdsp

The FDSP toolbox includes the chapter GUI modules, a library of signal processing functions,
all of the MATLAB examples, figures, and tables that appear in the text, solutions to selected
problems, and on-line help . All of the course software can be accessed easily through a simple
menu-based FDSP driver program that is executed with the following command from the
MATLAB command prompt.
>> f_dsp

The FDSP toolbox is self-contained in the sense that only the standard MATLAB interpreter
is required. There is no need to for users to have access to optional MATLAB toolboxes such
as the Signal Processing and Filter Design toolboxes.

• • • • • • • • • ••••• ••

Support Material
To access additional course materials [including CourseMate], please visit www.cengagebrain
.com. At the cengagebrain.com home page, search for the ISBN of your title (from the back

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

viii Preface

cover of your book) using the search box at the top of the page. This will take you to the
product page where these resources can be found.
Supplementary course material is provided for both the student and√the instructor. For the
student, solutions to selected end-of-chapter problems, marked with a , are included as pdf
files with the FDSP toolbox. Students are encouraged to use these problems as a test of their
understanding of the material. For the instructor, an enhanced version of the FDSP toolbox
includes pdf file solutions to all of the problems that appear at the end of each chapter. In
addition, as an instructional aid, every computational example, every figure, every table, and
the solution to every problem in the text can be displayed in the classroom using the instructor’s
version of the driver module, f dsp.

• • • • • • • • • ••••• ••

Acknowledgments
This project has been years in the making and many individuals have contributed to its com-
pletion. The reviewers commissioned by Brooks/Cole and Cengage Learning made numerous
thoughtful and insightful suggestions that were incorporated into the final draft. Thanks to
graduate students Joe Tari, Rui Guo, and Lingyun Bai for helping review the initial FDSP tool-
box software. We would also like to thank a number of individuals at Brooks/Cole who helped
see this project to completion and mold the final product. Special thanks to Bill Stenquist who
worked closely with us throughout, and to Rose Kernan. The second edition from Cengage
Learning was made possible through the efforts and support of the dedicated group at Global
Engineering including Swati Meherishi, Hilda Gowans, Lauren Betsos, Tanya Altieri, and
Chris Shortt.
Robert J. Schilling
Sandra L. Harris
Potsdam, NY

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 21:52

Contents

Margin Contents xvii

PART I Signal and System Analysis 1


•1 •Signal
• • •Processing
• • • • •••••
3
••

1.1 Motivation 3
1.1.1 Digital and Analog Processing 4
1.1.2 Total Harmonic Distortion (THD) 6
1.1.3 A Notch Filter 7
1.1.4 Active Noise Control 7
1.1.5 Video Aliasing 10
1.2 Signals and Systems 11
1.2.1 Signal Classification 11
1.2.2 System Classification 16
1.3 Sampling of Continuous-time Signals 21
1.3.1 Sampling as Modulation 21
1.3.2 Aliasing 23
1.4 Reconstruction of Continuous-time Signals 26
1.4.1 Reconstruction Formula 26
1.4.2 Zero-order Hold 29
1.5 Prefilters and Postfilters 33
1.5.1 Anti-aliasing Filter 33
1.5.2 Anti-imaging Filter 37

1.6 DAC and ADC Circuits 39
1.6.1 Digital-to-analog Converter (DAC) 39
1.6.2 Analog-to-digital Converter (ADC) 41
1.7 The FDSP Toolbox 46
1.7.1 FDSP Driver Module 46
1.7.2 Toolbox Functions 46
1.7.3 GUI Modules 49
1.8 GUI Software and Case Studies 52
1.9 Chapter Summary 60


Sections marked with a ∗ contain more advanced or specialized material that can be skipped without loss of continuity.

ix

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

x Contents

1.10 Problems 62
1.10.1 Analysis and Design 62
1.10.2 GUI Simulation 67
1.10.3 MATLAB Computation 68

•2 •Discrete-time
• • • • • • •Systems
•••••
in the Time Domain
••
70
2.1 Motivation 70
2.1.1 Home Mortgage 71
2.1.2 Range Measurement with Radar 72
2.2 Discrete-time Signals 74
2.2.1 Signal Classification 74
2.2.2 Common Signals 79
2.3 Discrete-time Systems 82
2.4 Difference Equations 86
2.4.1 Zero-input Response 87
2.4.2 Zero-state Response 90
2.5 Block Diagrams 94
2.6 The Impulse Response 96
2.6.1 FIR Systems 97
2.6.2 IIR Systems 98
2.7 Convolution 100
2.7.1 Linear Convolution 100
2.7.2 Circular Convolution 103
2.7.3 Zero Padding 105
2.7.4 Deconvolution 108
2.7.5 Polynomial Arithmetic 109
2.8 Correlation 110
2.8.1 Linear Cross-correlation 110
2.8.2 Circular Cross-correlation 114
2.9 Stability in the Time Domain 117
2.10 GUI Software and Case Studies 119
2.11 Chapter Summary 129
2.12 Problems 132
2.12.1 Analysis and Design 133
2.12.2 GUI Simulation 140
2.12.3 MATLAB Computation 142

•3 •Discrete-time
• • • • • • •Systems
•••••
in the Frequency Domain
••
145
3.1 Motivation 145
3.1.1 Satellite Attitude Control 146
3.1.2 Modeling the Vocal Tract 148
3.2 Z-transform Pairs 149
3.2.1 Region of Convergence 150
3.2.2 Common Z-transform Pairs 153
3.3 Z-transform Properties 157
3.3.1 General Properties 157
3.3.2 Causal Properties 162

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

Contents xi

3.4 Inverse Z-transform 164


3.4.1 Noncausal Signals 164
3.4.2 Synthetic Division 164
3.4.3 Partial Fractions 166
3.4.4 Residue Method 170
3.5 Transfer Functions 174
3.5.1 The Transfer Function 174
3.5.2 Zero-State Response 176
3.5.3 Poles, Zeros, and Modes 177
3.5.4 DC Gain 180
3.6 Signal Flow Graphs 181
3.7 Stability in the Frequency Domain 184
3.7.1 Input-output Representations 184
3.7.2 BIBO Stability 185
3.7.3 The Jury Test 188
3.8 Frequency Response 191
3.8.1 Frequency Response 191
3.8.2 Sinusoidal Inputs 193
3.8.3 Periodic Inputs 196
3.9 System Identification 198
3.9.1 Least-squares Fit 199
3.9.2 Persistently Exciting Inputs 202
3.10 GUI Software and Case Studies 203
3.10.1 g sysfreq: Discrete-time System Analysis
in the Frequency Domain 203
3.11 Chapter Summary 213
3.12 Problems 215
3.12.1 Analysis and Design 215
3.12.2 GUI Simulation 225
3.12.3 MATLAB Computation 226

•4 •Fourier
• • • •Transforms
• • • •••••
and Spectral Analysis
••
228
4.1 Motivation 228
4.1.1 Fourier Series 229
4.1.2 DC Wall Transformer 230
4.1.3 Frequency Response 232
4.2 Discrete-time Fourier Transform (DTFT) 233
4.2.1 DTFT 233
4.2.2 Properties of the DTFT 236
4.3 Discrete Fourier Transform (DFT) 241
4.3.1 DFT 241
4.3.2 Matrix Formulation 243
4.3.3 Fourier Series and Discrete Spectra 245
4.3.4 DFT Properties 248
4.4 Fast Fourier Transform (FFT) 256
4.4.1 Decimation in Time FFT 256
4.4.2 FFT Computational Effort 260
4.4.3 Alternative FFT Implementations 262

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

xii Contents

4.5 Fast Convolution and Correlation 263


4.5.1 Fast Convolution 263

4.5.2 Fast Block Convolution 267
4.5.3 Fast Correlation 270
4.6 White Noise 274
4.6.1 Uniform White Noise 274
4.6.2 Gaussian White Noise 278
4.7 Auto-correlation 282
4.7.1 Auto-correlation of White Noise 282
4.7.2 Power Density Spectrum 284
4.7.3 Extracting Periodic Signals from Noise 286
4.8 Zero Padding and Spectral Resolution 291
4.8.1 Frequency Response Using the DFT 291
4.8.2 Zero Padding 295
4.8.3 Spectral Resolution 296
4.9 Spectrogram 299
4.9.1 Data Windows 299
4.9.2 Spectrogram 301
4.10 Power Density Spectrum Estimation 304
4.10.1 Bartlett’s Method 304
4.10.2 Welch’s Method 308
4.11 GUI Software and Case Studies 311
4.12 Chapter Summary 319
4.13 Problems 323
4.13.1 Analysis and Design 323
4.13.2 GUI Simulation 329
4.13.3 MATLAB Computation 331

PART II Digital Filter Design 335

•5 •Filter
• • •Design
• • • • •••••
Specifications
••
337
5.1 Motivation 337
5.1.1 Filter Design Specifications 338
5.1.2 Filter Realization Structures 339
5.2 Frequency-selective Filters 342
5.2.1 Linear Design Specifications 343
5.2.2 Logarithmic Design Specifications (dB) 348
5.3 Linear-phase and Zero-phase Filters 350
5.3.1 Linear Phase 350
5.3.2 Zero-phase Filters 356
5.4 Minimum-phase and Allpass Filters 358
5.4.1 Minimum-phase Filters 359
5.4.2 Allpass Filters 362
5.4.3 Inverse Systems and Equalization 366
5.5 Quadrature Filters 367
5.5.1 Differentiator 367
5.5.2 Hilbert Transformer 369
5.5.3 Digital Oscillator 372

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

Contents xiii

5.6 Notch Filters and Resonators 374


5.6.1 Notch Filters 374
5.6.2 Resonators 376
5.7 Narrowband Filters and Filter Banks 378
5.7.1 Narrowband Filters 378
5.7.2 Filter Banks 381
5.8 Adaptive Filters 383
5.9 GUI Software and Case Study 386
5.9.1 g filters: Evaluation of Digital Filter Characteristics 386
5.10 Chapter Summary 392
5.11 Problems 395
5.11.1 Analysis and Design 395
5.11.2 GUI Simulation 403
5.11.3 MATLAB Computation 404

•6 •FIR
• •Filter
• • • • • •••••
Design 406
••

6.1 Motivation 406


6.1.1 Numerical Differentiators 407
6.1.2 Signal-to-noise Ratio 409
6.2 Windowing Method 411
6.2.1 Truncated Impulse Response 412
6.2.2 Windowing 416
6.3 Frequency-sampling Method 424
6.3.1 Frequency Sampling 424
6.3.2 Transition-band Optimization 425
6.4 Least-squares Method 430
6.5 Equiripple Filters 434
6.5.1 Minimax Error Criterion 434
6.5.2 Parks-McClellan Algorithm 436
6.6 Differentiators and Hilbert Transformers 442
6.6.1 Differentiators 442
6.6.2 Hilbert Transformers 445
6.7 Quadrature Filters 448
6.7.1 Generation of a Quadrature Pair 448
6.7.2 Quadrature Filter 450
6.7.3 Equalizer Design 453
6.8 Filter Realization Structures 457
6.8.1 Direct Forms 457
6.8.2 Cascade Form 459
6.8.3 Lattice Form 461

6.9 Finite Word Length Effects 464
6.9.1 Binary Number Representation 465
6.9.2 Input Quantization Error 466
6.9.3 Coefficient Quantization Error 470
6.9.4 Roundoff Error, Overflow, and Scaling 473
6.10 GUI Software and Case Study 477
6.11 Chapter Summary 484

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

xiv Contents

6.12 Problems 488


6.12.1 Analysis and Design 488
6.12.2 GUI Simulation 492
6.12.3 MATLAB Computation 494

•7 •IIR• •Filter
• • • • • •••••
Design 499
••

7.1 Motivation 499


7.1.1 Tunable Plucked-string Filter 500
7.1.2 Colored Noise 502
7.2 Filter Design by Pole-zero Placement 504
7.2.1 Resonator 504
7.2.2 Notch Filter 508
7.2.3 Comb Filters 510
7.3 Filter Design Parameters 514
7.4 Classical Analog Filters 517
7.4.1 Butterworth Filters 517
7.4.2 Chebyshev-I Filters 522
7.4.3 Chebyshev-II Filters 525
7.4.4 Elliptic Filters 526
7.5 Bilinear-transformation Method 529
7.6 Frequency Transformations 535
7.6.1 Analog Frequency Transformations 536
7.6.2 Digital Frequency Transformations 539
7.7 Filter Realization Structures 541
7.7.1 Direct Forms 541
7.7.2 Parallel Form 544
7.7.3 Cascade Form 547

7.8 Finite Word Length Effects 550
7.8.1 Coefficient Quantization Error 550
7.8.2 Roundoff Error, Overflow, and Scaling 553
7.8.3 Limit Cycles 557
7.9 GUI Software and Case Study 560
7.10 Chapter Summary 567
7.11 Problems 571
7.11.1 Analysis and Design 571
7.11.2 GUI Simulation 575
7.11.3 MATLAB Computation 578

PART III Advanced Signal Processing 581

•8 •Multirate
• • • • •Signal
• • •••••
Processing
••
583
8.1 Motivation 583
8.1.1 Narrowband Filter Banks 584
8.1.2 Fractional Delay Systems 586
8.2 Integer Sampling Rate Converters 587
8.2.1 Sampling Rate Decimator 587
8.2.2 Sampling Rate Interpolator 588

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

Contents xv

8.3 Rational Sampling Rate Converters 591


8.3.1 Single-stage Converters 591
8.3.2 Multistage Converters 593
8.4 Multirate Filter Realization Structures 596
8.4.1 Polyphase Decimator 596
8.4.2 Polyphase Interpolator 598
8.5 Narrowband Filters and Filter Banks 600
8.5.1 Narrowband Filters 600
8.5.2 Filter Banks 601
8.6 A Two-channel QMF Bank 607
8.6.1 Rate Converters in the Frequency Domain 608
8.6.2 An Alias-free QMF Bank 610
8.7 Oversampling ADC 612
8.7.1 Anti-aliasing Filters 612
8.7.2 Sigma-delta ADC 615
8.8 Oversampling DAC 620
8.8.1 Anti-imaging Filters 620
8.8.2 Passband Equalization 621
8.9 GUI Software and Case Study 623
8.10 Chapter Summary 630
8.11 Problems 633
8.11.1 Analysis and Design 633
8.11.2 GUI Simulation 641
8.11.3 MATLAB Computation 642

•9 •Adaptive
• • • • Signal
• • • •••••
Processing
••
645
9.1 Motivation 645
9.1.1 System Identification 646
9.1.2 Channel Equalization 647
9.1.3 Signal Prediction 648
9.1.4 Noise Cancellation 648
9.2 Mean Square Error 649
9.2.1 Adaptive Transversal Filters 649
9.2.2 Cross-correlation Revisited 650
9.2.3 Mean Square Error 651
9.3 The Least Mean Square (LMS) Method 656
9.4 Performance Analysis of LMS Method 660
9.4.1 Step Size 660
9.4.2 Convergence Rate 663
9.4.3 Excess Mean Square Error 666
9.5 Modified LMS Methods 669
9.5.1 Normalized LMS Method 669
9.5.2 Correlation LMS Method 671
9.5.3 Leaky LMS Method 674
9.6 Adaptive FIR Filter Design 678
9.6.1 Pseudo-filters 678
9.6.2 Linear-phase Pseudo-filters 681

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

xvi Contents

9.7 The Recursive Least Squares (RLS) Method 684


9.7.1 Performance Criterion 684
9.7.2 Recursive Formulation 685
9.8 Active Noise Control 690
9.8.1 The Filtered-x LMS Method 691
9.8.2 Secondary Path Identification 693
9.8.3 Signal-synthesis Method 695
9.9 Nonlinear System Identification 700
9.9.1 Nonlinear Discrete-time Systems 700
9.9.2 Grid Points 701
9.9.3 Radial Basis Functions 703
9.9.4 Adaptive RBF Networks 707
9.10 GUI Software and Case Study 713
9.11 Chapter Summary 718
9.12 Problems 721
9.12.1 Analysis and Design 721
9.12.2 GUI Simulation 726
9.12.3 MATLAB Computation 727

•References
• • • • •and
• • • •••••
Further Reading
••
734

•Appendix
• • • •1• •Transform
• • •••••
Tables
••
738
1.1 Fourier Series 738
1.2 Fourier Transform 739
1.3 Laplace Transform 741
1.4 Z-transform 743
1.5 Discrete-time Fourier Transform 744
1.6 Discrete Fourier Transform (DFT) 745

•Appendix
• • • •2• •Mathematical
• • •••••
Identities
••
747
2.1 Complex Numbers 747
2.2 Euler’s Identity 747
2.3 Trigonometric Identities 748
2.4 Inequalities 748
2.5 Uniform White Noise 749

•Appendix
• • • •3• •FDSP
• • •••••
Toolbox Functions
••
750
3.1 Installation 750
3.2 Driver Module: f dsp 751
3.3 Chapter GUI Modules 751
3.4 FDSP Toolbox Functions 752

•Index
• • •755• • • • • • • • • • ••

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

Margin Contents

TABLE I: Number Term Symbol Page


Definitions
1.1 Causal signal xa (t) 15
1.2 Linear system S 17
1.3 Time-invariant system S 17
1.4 Stable system S 18
1.5 Frequency response Ha ( f) 19
1.6 Impulse response ha (t) 20
1.7 Bandlimited signal xa (t) 24
1.8 Transfer function Ha (s) 29

2.1 Impulse response h(k) 97


2.2 FIR and IIR systems S 97
2.3 Linear convolution h(k)  x(k) 101
2.4 Circular convolution h(k) ◦ x(k) 104
2.5 Linear cross-correlation r yx (k) 111
2.6 Circular cross-correlation c yz(k) 114
2.7 BIBO stable h1 < ∞ 117

3.1 Z-transform X(z) 149


3.2 Transfer function H (z) 174
3.3 Frequency response H (f) 191

4.1 Discrete-time Fourier transform (DTFT) X(f) 233


4.2 Discrete Fourier transform (DFT) X(i) 242
4.3 Expected value E [f(x)] 275
4.4 Circular auto-correlation cxx (k) 282
4.5 Spectrogram G(m, i) 301

5.1 Group delay D(f) 351


5.2 Linear-phase filter H (z) 351
5.3 Minimum-phase filter H (z) 359
5.4 Allpass Filter H (z) 362

6.1 Signal-to-noise ratio SNR(y) 410


6.2 Quantization operator Q N (x) 466

9.1 Random cross-correlation r yx (i) 651

xvii

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 6909X˙00˙FM˙pi-xviii November 12, 2010 8:25

xviii Margin Contents

TABLE II: Number Description Page


Propositions
1.1 Signal Sampling 25
1.2 Signal Reconstruction 28

2.1 BIBO Stability: Time Domain 118

3.1 BIBO Stability: Frequency Domain 186


3.2 Frequency Response 194

4.1 Parseval’s Identity: DTFT 238


4.2 Parseval’s Identity: DFT 254

5.1 Paley-Wiener Theorem 344


5.2 Linear-phase Filter 353
5.3 Minimum-phase Allpass Decomposition 363

6.1 Alternation Theorem 436


6.2 Flow Graph Reversal Theorem 458

9.1 LMS Convergence 661

TABLE III: Number Description Page


Algorithms
1.1 Successive Approximation 43

3.1 Residue Method 172

4.1 Bit Reversal 258


4.2 FFT 260
4.3 Problem Domain 261
4.4 IFFT 262
4.5 Fast Block Convolution 268

5.1 Zero-phase Filter 357


5.2 Minimum-phase Allpass Decomposition 364

6.1 Windowed FIR Filter 421


6.2 Equiripple FIR Filter 438
6.3 Lattice-form Realization 462

7.1 Bilinear Transformation Method 532

9.1 RLS Method 687


9.2 RBF Network Evaluation 708

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
1019763_FM_VOL-I.qxp 9/17/07 4:22 PM Page viii

1
2
3
4
5
6
7
8
9
10
11 This page was intentionally left blank
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
S 50
R 51

1st Pass Pages


Schilling-1120949 book November 12, 2010 9:33

PART I

Signal and System Analysis

1
Signal Processing

2 3
Discrete Systems, Discrete Systems,
Time Domain Frequency Domain

4
Fourier Transforms,
Signal Spectra

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

1
Schilling-1120949 book November 12, 2010 9:33

CHAPTER

1 Signal Processing

•••••
• • • • • •• • • •••••
Chapter Topics
1.1 Motivation
1.2 Signals and Systems
1.3 Sampling of Continuous-time Signals
1.4 Reconstruction of Continuous-time Signals
1.5 Prefilters and Postfilters
1.6 DAC and ADC Circuits
1.7 The FDSP Toolbox
1.8 GUI Software and Case Study
1.9 Chapter Summary
1.10 Problems

• • • • • • • • • ••••• ••

1.1 Motivation
A signal is a physical variable whose value varies with time or space. When the value of
Continuous-time the signal is available over a continuum of time it is referred to as a continuous-time or
signal analog signal. Everyday examples of analog signals include temperature, pressure, liquid level,
chemical concentration, voltage and current, position, velocity, acceleration, force, and torque.
Discrete-time signal If the value of the signal is available only at discrete instants of time, it is called a discrete-
time signal. Although some signals, for example economic data, are inherently discrete-time
signals, a more common way to produce a discrete-time signal, x(k), is to take samples of an
underlying analog signal, xa (t).

x(k) = xa (kT ), |k| = 0, 1, 2, · · ·

Sampling interval Here T denotes the sampling interval or time between samples, and = means equals by
definition. When finite precision is used to represent the value of x(k), the sequence of quantized
Digital signal values is then called a digital signal. A system or algorithm which processes one digital signal
x(k) as its input and produces a second digital signal y(k) as its output is a digital signal
processor. Digital signal processing (DSP) techniques have widespread applications, and they
play an increasingly important role in the modern world. Application areas include speech

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

4 Chapter 1 Signal Processing

recognition, detection of targets with radar and sonar, processing of music and video, seismic
exploration for oil and gas deposits, medical signal processing including EEG, EKG, and
ultrasound, communication channel equalization, and satellite image processing. The focus of
this book is the development, implementation, and application of modern DSP techniques.
We begin this introductory chapter with a comparison of digital and analog signal process-
ing. Next, some practical problems are posed that can be solved using DSP techniques. This
is followed by characterization and classification of signals. The fundamental notion of the
spectrum of a signal is then presented including the concepts of bandlimited and white-noise
signals. This leads naturally to the sampling process which takes a continuous-time signal and
produces a corresponding discrete-time signal. Simple conditions are presented that ensure
that an analog signal can be reconstructed from its samples. When these conditions are not
satisfied, the phenomenon of aliasing occurs. The use of guard filters to reduce the effects of
aliasing is discussed. Next DSP hardware in the form of analog-to-digital converters (ADCs)
and digital-to-analog converters (DACs) is examined. The hardware discussion includes ways
to model the quantization error associated with finite precision converters. A custom MATLAB
toolbox, called FDSP, is then introduced that facilitates the development of simple DSP pro-
GUI modules grams. The FDSP toolbox also includes a number of graphical user interface (GUI) modules
that can be used to browse examples and explore digital signal processing techniques without
any need for programming. The GUI module g sample allows the user to investigate the sig-
nal sampling process, while the companion module g reconstruct allows the user to explore
the signal reconstruction process. The chapter concludes with a case study example, and a
summary of continuous-time and discrete-time signal processing.

1.1.1 Digital and Analog Processing


For many years, almost all signal processing was done with analog circuits as shown in
Figure 1.1. Here, operational amplifiers, resistors, and capacitors are used to realize frequency
selective filters.
With the advent of specialized microprocessors with built-in data conversion circuits
(Papamichalis, 1990), it is now commonplace to perform signal processing digitally as shown
in Figure 1.2. Digital processing of analog signals is more complex because it requires, at a
minimum, the three components shown in Figure 1.2. The analog-to-digital converter or ADC
at the front end converts the analog input xa (t) into an equivalent digital signal x(k). The

FIGURE 1.1: Analog


Signal Processing Analog
xa (t) e - processing e ya (t)
circuit

x(k) Digital y(k)


xa (t) e - ADC - processing - DAC e ya (t)
program

FIGURE 1.2: Digital Signal Processing

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

1.1 Motivation 5

TABLE 1.1: Feature Analog Processing Digital Processing


Comparison of
Analog and Digital Speed Fast Moderate
Cost Low to moderate Moderate
Signal Processing
Flexibility Low High
Performance Moderate High
Self-calibration No Yes
Data-logging capability No Yes
Adaptive capability Limited Yes

processing of x(k) is then achieved with an algorithm that is implemented in software. For
a filtering operation, the DSP algorithm consists of a difference equation, but other types of
processing are also possible and are often used. The digital output signal y(k) is then converted
back to an equivalent analog signal ya (t) by the digital-to-analog converter or DAC.
Although the DSP approach requires more steps than analog signal processing, there are
many important benefits to working with signals in digital form. A comparison of the relative
advantages and disadvantages of the two approaches is summarized in Table 1.1. Although the
DSP approach requires more steps than analog signal processing, there are many important
benefits to working with signals in digital form. A comparison of the relative advantages and
disadvantages of the two approaches is summarized in Table 1.1.
The primary advantages of analog signal processing are speed and cost. Digital signal
processing is not as fast due to the limits on the sampling rates of the converter circuits. In
addition, if substantial computations are to be performed between samples, then the clock rate
Real time of the processor also can be a limiting factor. Speed can be an issue in real-time applications
where the kth output sample y(k) must be computed and sent to the DAC as soon as possible
after the kth input sample x(k) is available from the ADC. However, there are also applications
where the entire input signal is available ahead of time for processing off-line. For this batch
mode type of processing, speed is less critical.
DSP hardware is often somewhat more expensive than analog hardware because analog
hardware can consist of as little as a few discrete components on a stand-alone printed circuit
board. The cost of DSP hardware varies depending on the performance characteristics required.
In some cases, a PC may already be available to perform other functions for a given application,
and in these instances the marginal expense of adding DSP hardware is not large.
In spite of these limitations, there are great benefits to using DSP techniques. Indeed, DSP
is superior to analog processing with respect to virtually all of the remaining features listed
in Table 1.1. One of the most important advantages is the inherent flexibility available with a
software implementation. Whereas an analog circuit might be tuned with a potentiometer to
vary its performance over a limited range, the DSP algorithm can be completely replaced, on
the fly, when circumstances warrant.
DSP also offers considerably higher performance than analog signal processing. For ex-
ample, digital filters with arbitrary magnitude responses and linear phase responses can be
designed easily whereas this is not feasible with analog filters.
A common problem that plagues analog systems is the fact that the component values tend
to drift with age and with changes in environmental conditions such as temperature. This leads
to a need for periodic calibration or tuning. With DSP there is no drift problem and therefore
no need to manually calibrate.
Since data are already available in digital form in a DSP system, with little or no additional
expense, one can log the data associated with the operation of the system so that its performance
can be monitored, either locally of remotely over a network connection. If an unusual operating
condition is detected, its exact time and nature can be determined and a higher-level control

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

6 Chapter 1 Signal Processing

FIGURE 1.3: An
Audio Amplifier
xa (t) e - K e ya (t)

system can be alerted. Although strip chart recorders can be added to an analog system, this
substantially increases the expense thereby negating one of its potential advantages.
The flexibility inherent in software can be exploited by having the parameters of the DSP
algorithm vary with time and adapt as the characteristics of the input signal or the processing
task change. Applications, like system identification and active noise control, exploit adaptive
signal processing, a topic that is addressed in Chapter 9.

1.1.2 Total Harmonic Distortion (THD)


With the widespread use of digital computers, DSP applications are now commonplace. As a
simple initial example, consider the problem of designing an audio amplifier to boost signal
strength without distorting the shape of the input signal. For the amplifier shown in Figure 1.3,
suppose the input signal xa (t) is a pure sinusoidal tone of amplitude a and frequency F0 Hz.

xa (t) = a cos(2π F0 t) (1.1.1)

An ideal amplifier will produce a desired output signal yd (t) that is a scaled and delayed version
of the input signal. For example, if the scale factor or amplifier gain is K and the delay is τ ,
then the desired output is

yd (t) = K xa (t − τ )
= K a cos[2π F0 (t − τ )] (1.1.2)

In a practical amplifier, the relationship between the input and the output is only approximately
linear, so some additional terms are present in the actual output ya .

ya (t) = F[xa (t)]


d0 
M−1
≈ + di cos(2πi F0 t + θi ) (1.1.3)
2 i=1

The presence of the additional harmonics indicates that there is distortion in the amplified
signal due to nonlinearities within the amplifier. For example, if the amplifier is driven with
an input whose amplitude a is too large, then the amplifier will saturate with the result that the
output is a clipped sine wave that sounds distorted when played through a speaker. To quantify
the amount of distortion, the average power contained in the ith harmonic is di2 /2 for i ≥ 1
and di2 /4 for i = 0. Thus the average power of the signal ya (t) is

1 2
M−1
d02
Py = + d (1.1.4)
4 2 i=1 i

Total harmonic The total harmonic distortion or THD of the output signal ya (t) is defined as the power
distortion in the spurious harmonic components, expressed as a percentage of the total power. Thus the

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

1.1 Motivation 7

following can be used to measure the quality of the amplifier output.


 100(Py − d12 /2)
THD = % (1.1.5)
Py
For an ideal amplifier di = 0 for i = 1, and
d1 = K a (1.1.6a)
θ1 = −2π F0 τ (1.1.6b)
Consequently, for a high-quality amplifier, the THD is small, and when no distortion is present
THD = 0. Suppose the amplifier output is sampled to produce the following digital signal of
length N = 2M.
y(k) = ya (kT ), 0 ≤ k < N (1.1.7)
If the sampling interval is set to T = 1/(N F0 ), then this corresponds to one period of ya (t). By
processing the digital signal x(k) with the discrete Fourier transform or DFT, it is possible to
determine di and θi for 0 ≤ i < M. In this way the total harmonic distortion can be measured.
The DFT is a key analytic tool that is introduced in Chapter 4.

1.1.3 A Notch Filter


As a second example of a DSP application, suppose one is performing sensitive acoustic
measurements in a laboratory setting using a microphone. Here, any ambient background
sounds in the range of frequencies of interest have the potential to corrupt the measurements
with unwanted noise. Preliminary measurements reveal that the overhead fluorescent lights are
emitting a 120 Hz hum which corresponds to the second harmonic of the 60 Hz commercial
AC power. The problem then is to remove the 120 Hz frequency component while affecting the
other nearby frequency components as little as possible. Consequently, you want to process the
Notch filter acoustic data samples with a notch filter designed to remove the effects of the fluorescent lights.
After some calculations, you arrive at the following digital filter to process the measurements
x(k) to produce a filtered signal y(k).
y(k) = 1.6466y(k − 1) − .9805y(k − 2) + .9905x(k)
−1.6471x(k − 1) + .9905x(k − 2) (1.1.8)
The filter in (1.1.8) is a notch filter with a bandwidth of 4 Hz, a notch frequency of Fn = 120
Hz, and a sampling frequency of f s = 1280 Hz. A plot of the frequency response of this
filter is shown in Figure 1.4 where a sharp notch at 120 Hz is apparent. Notice that except
for frequencies near Fn , all other frequency components of x(k) are passed through the filter
without attenuation. The design of notch filters is discussed in Chapter 7.

1.1.4 Active Noise Control


An application area of DSP that makes use of adaptive signal processing is active control
of acoustic noise (Kuo and Morgan, 1996). Examples include industrial noise from rotating
machines, propeller and jet engine noise, road noise in an automobile, and noise caused by
air flow in heating, ventilation, and air conditioning systems. As an illustration of the latter,
consider the active noise control system shown in Figure 1.5 which consists of an air duct
with two microphones and a speaker. The basic principle of active noise control is to inject
a secondary sound into the environment so as to cancel the primary sound using destructive
interference.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

8 Chapter 1 Signal Processing

FIGURE 1.4: Magnitude Response


Magnitude 1.4
Response of a
Notch Filter with
1.2
F n = 120 Hz

0.8
A(f)

0.6

0.4

0.2

0
0 100 200 300 400 500 600 700
f (Hz)

FIGURE 1.5: Active


Control of Acoustic
Noise in an Air Duct Blower
Reference Speaker Error
microphone microphone
e @ e
@

y(k)

x(k) e(k)
- Controller 

The purpose of the reference microphone in Figure 1.5 is to detect the primary noise x(k)
generated by the noise source or blower. The primary noise signal is then passed through a
digital filter of the following form.

m
y(k) = wi (k)x(k − i) (1.1.9)
i=0

The output of the filter y(k) drives a speaker that creates the secondary sound sometimes called
Antisound antisound. The error microphone, located downstream of the speaker, detects the sum of the pri-
mary and secondary sounds and produces an error signal e(k). The objective of the adaptive
algorithm is the take x(k) and e(k) as inputs and adjust the filter weights w(k) so as to drive
e2 (k) to zero. If zero error can be achieved, then silence is observed at the error microphone. In
practical systems, the error or residual sound is significantly reduced by active noise control.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

1.1 Motivation 9

To illustrate the operation of this adaptive DSP system, suppose the blower noise is modeled
as a periodic signal with fundamental frequency F0 and r harmonics plus some random white
noise v(k).


r
x(k) = ai cos(2πik F0 T + θi ) + v(k), 0 ≤ k < p (1.1.10)
i=1

For example, suppose F0 = 100 Hz and there are r = 4 harmonics with amplitudes ai = 1/i
and random phase angles. Suppose the random white noise term is distributed uniformly over
the interval [−.5, .5]. Let p = 2048 samples, suppose the sampling interval is T = 1/1600
sec, and the filter order is m = 40. The adaptive algorithm used to adjust the filter weights is
called the FXLMS method, and it is discussed in detail in Chapter 9. The results of applying
this algorithm are shown in Figure 1.6.
Initially the filter weights are set to w(0) = 0 which corresponds to no noise control at all.
The adaptive algorithm is not activated until sample k = 512, so the first quarter of the plot
in Figure 1.6 represents the ambient or primary noise detected at the error microphone. When
adaptation is activated, the error begins to decrease rapidly and after a short transient period
it reaches a steady-state level that is almost two orders of magnitude quieter than the primary
noise itself. We can quantify the noise reduction by using the following measure of overall
noise cancellation.
 p/4−1   p−1 
 
E = 10 log10 e (i) − 10 log10
2
e (i) dB
2
(1.1.11)
i =0 i = 3 p/4

The overall noise cancellation E is the log of the ratio of the average power of the noise during
the first quarter of the samples divided by the average power of the noise during the last quarter
of the samples, expressed in units of decibels. Using this measure, the noise cancellation
observed in Figure 1.6 is E = 37.8 dB.

FIGURE 1.6: Error Squared Error


Signal with Active 100
Noise Control
Activated at 90
k = 512
80

70

60
e2(k)

Noise reduction = 37.8 dB


50

40

30

20

10

0
0 500 1000 1500 2000
k

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

10 Chapter 1 Signal Processing

1.1.5 Video Aliasing


Later in Chapter 1 we focus on the problem of sampling a continuous-time signal xa (t) to
produce the following discrete-time signal where T > 0 is the sampling interval and f s = 1/T
is the sampling frequency.
x(k) = xa (kT ), |k| = 0, 1, 2, . . . (1.1.12)
An important theoretical and practical question that arises in connection with the sampling
process is this: under what conditions do the samples x(k) contain all the information needed
to reconstruct the signal xa (t)? The Shannon sampling theorem (Proposition 1.1), says that if
the signal xa (t) is bandlimited and the sampling rate f s is greater than twice the bandwidth
or highest frequency present, then it is possible to interpolate between the x(k) to precisely
reconstruct xa (t). However, if the sampling frequency is too low, then the samples become
Aliasing corrupted, a process known as aliasing. An easy way to interpret aliasing is to examine a
video signal in the form of an M × N image Ia (t) that varies with time. Here Ia (t) consists of
Pixels an M × N array of picture elements or pixels where the number of rows M and columns N
depends on the video format used. If Ia (t) is sampled with a sampling interval of T then the
resulting M N -dimensional discrete-time signal is
I (k) = Ia (kT ), |k| = 0, 1, 2, . . . (1.1.13)
Here, f s = 1/T is the sampling rate in frames/second. Depending on the content of the image,
the sampling rate f s may or may not be sufficiently high to avoid aliasing.
As a simple illustration, suppose the image consists of a rotating disk with a dark line on
it to indicate orientation as shown in Figure 1.7. A casual look at the sequence of frames in
Figure 1.7 suggests that the disk appears to be rotating counterclockwise at a rate of 45 degrees
per frame. However, this is not the only interpretation possible. For example, an alternative
FIGURE 1.7: Four k = 0 k = 1
Video Frames of a 5 5
Rotating Disk

0 0

−5 −5
−5 0 5 −5 0 5

k = 2 k = 3
5 5

0 0

−5 −5
−5 0 5 −5 0 5

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

1.2 Signals and Systems 11

explanation is that the disk is actually rotating clockwise at a rate of 315 degrees/frame.
Both interpretations are plausible. Is the motion captured by the snapshots a fast clockwise
rotation or a slow counter clockwise rotation? If the disk is in fact rotating clockwise at F0
revolutions/second, but the sampling rate is f s ≤ 2F0 , then aliasing occurs in which case the
disk can appear to turn backwards at a slow rate. Interestingly, this manifestation of aliasing
was quite common in older western films that featured wagon trains heading west. The spokes
on the wagon wheels sometimes appeared to move backwards because of the slow frame rate
used to shoot the film and display it on older TVs.

• • • • • • • • • ••••• ••

1.2 Signals and Systems


1.2.1 Signal Classification
Recall that a signal is a physical variable whose value varies with respect to time or space.
To simplify the notation and terminology, we will assume that, unless noted otherwise, the
independent variable denotes time. If the value of the signal, the dependent variable, is available
Continuous-time over a continuum of times, t ∈ R, then the signal is referred to as a continuous-time signal.
signal An example of a continuous-time signal, xa (t), is shown in Figure 1.8.
In many cases of practical interest, the value of the signal is only available at discrete
Discrete-time signal instants of time in which case it is referred to as a discrete-time signal. That is, signals can be
classified into continuous-time or discrete-time depending on whether the independent variable
is continuous or discrete, respectively. Common everyday examples of discrete-time signals
include economic statistics such as the daily balance in one’s savings account, or the monthly
inflation rate. In DSP applications, a more common way to produce a discrete-time signal,
x(k), is to sample an underlying continuous-time signal, xa (t), as follows.
x(k) = xa (kT ), |k| = 0, 1, 2, · · · (1.2.1)

FIGURE 1.8: A xa(t) = 10t exp(−t)


Continuous-time 4
Signal xa (t)
3.5

2.5
x (t)

2
a

1.5

0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4
t (sec)

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

12 Chapter 1 Signal Processing

Sampling interval Here, T > 0 is the time between samples or sampling interval in seconds. The sample spacing
Sampling frequency also can be specified using the reciprocal of the sampling interval which is called the sampling
frequency, f s .
1 
Hz fs = (1.2.2)
T
Here, the unit of Hz is understood to mean samples/second. Notice that the integer k in (1.2.1)
Discrete-time denotes discrete time or, more specifically, the sample number. The sampling interval T is
left implicit on the left-hand side of (1.2.1) because this simplifies subsequent notation. In
those instances where the value of T is important, it will be stated explicitly. An example of
a discrete-time signal generated by sampling the continuous-time signal in Figure 1.8 using
T = .25 seconds is shown in Figure 1.9.
Just as the independent variable can be continuous or discrete, so can the dependent variable
or amplitude of the signal be continuous or discrete. If the number of bits of precision used to
Quantized signal represent the value of x(k) is finite, then we say that x(k) is a quantized or discrete-amplitude
signal. For example, if N bits are used to represent the value of x(k), then there are 2 N distinct
values that x(k) can assume. Suppose the value of x(k) ranges over the interval [xm , x M ]. Then
Quantization level the quantization level, or spacing between adjacent discrete values of x(k), is
x M − xm
q= (1.2.3)
2N
The quantization process can be thought of as passing a signal through a piecewise-constant
staircase type function. For example, if the quantization is based on rounding to the nearest N
Quantization bits, then the process can be represented with the following quantization operator.
operator  
 x
Q N (x) = q · round (1.2.4)
q
A graph of Q N (x) for x ranging over the interval [−1, 1] using N = 5 bits is shown in
Digital signal Figure 1.10. A quantized discrete-time signal is called a digital signal. That is, a digital signal,

FIGURE 1.9: A x(k) = 10kT exp(−kT)


Discrete-time Signal 4
x(k) with T = .25
3.5

2.5
x(k)

1.5 T = .25

0.5

0
0 .5 1 1.5 2 2.5 3 3.5 4
kT (sec)

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

1.2 Signals and Systems 13

FIGURE 1.10: Quantizer Input−output Characteristic


Quantization over 1
[−1, 1] Using N = 5
Bits 0.8

0.6
q = .0625
0.4

0.2
Q(x)
0

−0.2

−0.4

−0.6

−0.8

−1
−1 −0.5 0 0.5 1
x

xq (k), is discrete in both time and amplitude with


xq (k) = Q N [xa (kT )] (1.2.5)
Analog signal By contrast, a signal that is continuous in both time and amplitude is called an analog signal.
An example of a digital signal obtained by quantizing the amplitude of the discrete-time signal
in Figure 1.9 is shown in Figure 1.11. In this case, the 5-bit quantizer in Figure 1.10 is used to

FIGURE 1.11: A xq(k) = QN[xa(kT)]


Digital Signal xq (k) 4

3.5

2.5
xq(k)

2
T = .25
1.5
q = .1290
N = 5 bits
1

0.5

0
0 .5 1 1.5 2 2.5 3 3.5 4
kT (sec)

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

14 Chapter 1 Signal Processing

produce xq (k). Careful inspection of Figure 1.11 reveals that at some of the samples there are
noticeable differences between xq (k) and xa (kT ). If rounding is used, then the magnitude of
the error is, at most, q/2.
Most of the analysis in this book will be based on discrete-time signals rather than digital
signals. That is, infinite precision is used to represent the value of the dependent variable.
Finite precision, or finite word length effects, are examined in Chapters 6 and 7 in the context
of digital filter design. When digital filter are implemented in MATLAB using the default
double-precision arithmetic, this corresponds to 64 bits of precision (16 decimal digits). In
most instances this is sufficiently high precision to yield insignificant finite word length effects.
Quantization A digital signal xq (k) can be modeled as a discrete-time signal x(k) plus random quanti-
noise zation noise, v(k), as follows.

xq (k) = x(k) + v(k) (1.2.6)

An effective way to measure the size or strength of the quantization noise is to use average
Expected value power defined as the mean, or expected value, of v 2 (k). Typically, v(k) is modeled as a
random variable uniformly distributed over the interval [−q/2, q/2] with probability density
p(x) = 1/q. In this case, the expected value of v 2 (k) is
 q/2
E[v 2 ] = p(x)x 2 dx
−q/2
 q/2
1
= x 2 dx (1.2.7)
q −q/2

Thus, the average power of the quantization noise is proportional to the square of the quanti-
zation level with

q2
E[v 2 ] = (1.2.8)
12

Example 1.1 Quantization Noise


Suppose the value of a discrete-time signal x(k) is constrained to lie in the interval [−10, 10].
Let xq (k) denote a digital version of x(k) using quantization level q, and consider the following
problem. Suppose the average power of the quantization noise, v(k), is to be less than .001.
What is the minimum number of bits that are needed to represent the value of xq (k)? The
constraint on the average power of the quantization noise is

E[v 2 ] < .001

Thus, from (1.2.3) and (1.2.8), we have


(x M − xm )2
< .001
12(2 N )2
Recall that the signal range is xm = −10 and x M = 10. Multiplying both sides by 12, taking
the square root of both sides, and then solving for 2 N yields
20
2N > √
.012

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

1.2 Signals and Systems 15

Finally, taking the natural log of both sides and solving for N we have
ln(182.5742)
= 7.5123
N >
ln(2)
Since N must be an integer, the minimum number of bits needed to ensure that the average
power of the quantization noise is less than .001 is N = 8 bits.

Signals can be further classified depending on whether or not they are nonzero for negative
values of the independent variable.
DEFINITION
A signal xa (t) defined for t ∈ R is causal if and only if it is zero for negative t. Otherwise,
1.1: Causal Signal
the signal is noncausal.
xa (t) = 0 for t < 0

Most of the signals that we work with will be causal signals. A simple, but important,
Unit step example of a causal signal is the unit step which is denoted μa (t) and defined

 0, t < 0
μa (t) = (1.2.9)
1, t ≥ 0
Note that any signal can be made into a causal signal by multiplying by the unit step. For
example, xa (t) = exp(−t/τ )μa (t) is a causal decaying exponential with time constant τ .
Unit impulse Another important example of a causal signal is the unit impulse which is denoted δa (t).
Strictly speaking, the unit impulse is not a function because it is not defined at t = 0. However,
the unit impulse can be defined implicitly by the equation
 t
δa (τ )dτ = μa (t) (1.2.10)
−∞

That is, the unit impulse δa (t) is a signal that, when integrated, produces the unit step μa (t).
Consequently, we can loosely think of the unit impulse as the derivative of the unit step function,
keeping in mind that the derivative of the unit step is not defined at t = 0. The two essential
characteristics of the unit impulse that follow from (1.2.10) are
δa (t) = 0, t = 0 (1.2.11a)
 ∞
δa (t)dt = 1 (1.2.11b)
−∞
A more informal way to view the unit impulse is to consider a narrow pulse of width  and
height 1/ starting at t = 0. The unit impulse can be thought of as the limit of this sequence of
pulses as the pulse width  goes to zero. By convention, we graph the unit impulse as a vertical
arrow with the height of the arrow equal to the strength, or area, of the impulse as shown in
Figure 1.12.
The unit impulse has an important property that is a direct consequence of (1.2.11). If xa (t)
is a continuous function, then
 ∞  ∞
xa (τ )δa (τ − t0 )dτ = xa (t0 )δa (τ − t0 )dτ
−∞ −∞
 ∞
= xa (t0 ) δa (τ − t0 )dτ
−∞∞
= xa (t0 ) δa (α)dα (1.2.12)
−∞

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

16 Chapter 1 Signal Processing

FIGURE 1.12: Unit Elementary Signals


Impulse, δa (t), and 1.5
Unit Step, μa (t)

ua(t )
1

xa(t)

0.5 d a(t )

−0.5
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
t (sec)

FIGURE 1.13: A
System S with Input
x and Output y x e - S e y

Sifting property Since the area under the unit impulse is one, we then have the following sifting property of the
unit impulse

 ∞
xa (t)δa (t − t0 )dt = xa (t0 ) (1.2.13)
−∞

From (1.2.13) we see that when a continuous function of time is multiplied by an impulse
and then integrated, the effect is to sift out or sample the value of the function at the time the
impulse occurs.

1.2.2 System Classification


Just as signals can be classified, so can the systems that process those signals. Consider a
system S with input x and output y as shown in Figure 1.13. In some instances, for example
biomedical systems, the input is referred to as the stimulus, and the output is referred to as the
response. We can think of the system in Figure 1.13 as an operator S that acts on the input
signal x to produce the output signal y.
y = Sx (1.2.14)
Continuous, discrete If the input and output are continuous-time signals, then the system S is called a continuous-
systems time system. A discrete-time system is a system S that processes a discrete-time input x(k)

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

1.2 Signals and Systems 17

to produce a discrete-time output y(k). There are also examples of systems that contain both
continuous-time signals and discrete-time signals. These systems are referred to as sampled-
data systems.
Almost all of the examples of systems in this book belong to an important class of systems
called linear systems.

DEFINITION
Let x1 and x2 be arbitrary inputs and let a and b be arbitrary scalars. A system S is linear
1.2: Linear System
if and only if the following holds, otherwise it is a nonlinear system.
S(ax1 + bx2 ) = aSx1 + bSx2

Thus a linear system has two distinct characteristics. When a = b = 1, we see that the response
to a sum of inputs is just the sum of the responses to the individual inputs. Similarly, when
b = 0, we see that the response to a scaled input is just the scaled response to the original input.
Examples of linear discrete-time systems include the notch filter in (1.1.8) and the adaptive
filter in (1.1.9). On the other hand, if the analog audio amplifier in Figure 1.3 is over driven and
its output saturates to produce harmonics as in (1.1.3), then this is an example of a nonlinear
continuous-time system. Another important class of systems is time-invariant systems.

DEFINITION
A system S with input xa (t) and output ya (t) is time-invariant if and only if whenever the
1.3: Time-invariant
input is translated in time by τ , the output is also translated in time by τ . Otherwise the
System
system is a time-varying system.
Sxa (t − τ ) = ya (t − τ )

For a time-invariant system, delaying or advancing the input delays or advances the output
by the same amount, but it does not otherwise affect the shape of the output. Therefore the results
of an input-output experiment do not depend on when the experiment is performed. Time-
invariant systems described by differential or difference equations have constant coefficients.
More generally, physical time-invariant systems have constant parameters. The notch filter in
(1.1.8) is an example of a discrete-time system that is both linear and time-invariant. On the
other hand, the adaptive digital filter in (1.1.9) is a time-varying system because the weights
w(k) are coefficients that change with time as the system adapts. The following example shows
that the concepts of linearity and time-invariance can sometimes depend on how the system is
characterized.

Example 1.2 System Classification


Consider the operational amplifier circuit shown in Figure 1.14. Here input resistor R1 is fixed,
but feedback resistor R2 represents a sensor or transducer whose resistance changes with
respect to a sensed environmental variable such as temperature or pressure. For this inverting
amplifier configuration, the output voltage ya (t) is
R2 (t)
ya (t) = − x1 (t)
R1
This is an example of a linear continuous-time system that is time-varying because parameter
R2 (t) varies as the temperature or pressure changes. However, another way to model this

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

18 Chapter 1 Signal Processing

FIGURE 1.14: An R2(t)


Inverting Amplifier
with a Feedback
Transducer R1
• −
+

+
x1 +
ya
− −

system is to consider the variable resistance of the sensor as a second input x2 (t) = R2 (t).
Viewing the system in this way, the system output is
x1 (t)x2 (t)
ya (t) = −
R1
This formulation of the model is a nonlinear time-invariant system, but with two inputs. Thus,
by introducing a second input we have converted a single-input time-varying linear system to
a two-input time-invariant nonlinear system.

Another important classification of systems focuses on the question of what happens to


Bounded signal the signals as time increases. We say that a signal xa (t) is bounded if and only if there exists a
Bx > 0 called a bound such that
|xa (t)| ≤ Bx for t ∈ R (1.2.15)
DEFINITION
A system S is with input xa (t) and output ya (t) is stable, in a bounded input bounded
1.4: Stable System
output (BIBO) sense, if and only if every bounded input produces a bounded output.
Otherwise it is an unstable system.

Thus an unstable system is a system for which the magnitude of the output grows arbitrarily
large with time for a least one bounded input.

Example 1.3 Stability


As a simple example of a system that can be stable or unstable depending on its parameter
values, consider the following first-order linear continuous-time system where a = 0.
dya (t)
+ aya (t) = xa (t)
dt
Suppose the input is the unit step xa (t) = μa (t) which is bounded with a bound of Bx = 1.
Direct substitution can be used to verify that for t ≥ 0, the solution is
1
1 − exp(−at)
ya (t) = ya (0) exp(−at) +
a
If a > 0, then the exponential terms grow without bound which means that the bounded input
u a (t) produces an unbounded output ya (t). Thus this system is unstable, in a BIBO sense,
when a > 0.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

1.2 Signals and Systems 19

Just as light can be decomposed into a spectrum of colors, signals also contain energy that
is distributed over a range of frequencies. To decompose a continuous-time signal xa (t) into
Fourier transform its spectral components, we use the Fourier transform.
 ∞

X a ( f ) = F{xa (t)} = xa (t) exp(− j2π f t)dt (1.2.16)
−∞

It is assumed that the reader is familiar with the basics of continuous-time transforms, specifi-
cally the Laplace transform and the Fourier transform. Tables of transform pairs and transform
properties for all of the tranforms used in this text can be found in Appendix 1. Here, f ∈ R
denotes frequency in cycles/sec or Hz. In general the Fourier transform, X a ( f ), is complex.
Polar form As such, it can be expressed in polar form in terms of its magnitude Aa ( f ) = |X a ( f )| and
phase angle φa ( f ) =  X a ( f ) as follows.

X a ( f ) = Aa ( f ) exp[ jφa ( f )] (1.2.17)

Magnitude, phase The real-valued function Aa ( f ) is called the magnitude spectrum of xa (t), while the real-
spectrum valued function φa ( f ) is called the phase spectrum of xa (t). More generally, X a ( f ) itself is
called the spectrum of xa (t). For a real xa (t), the magnitude spectrum is an even function of
f , and the phase spectrum is an odd function of f .
When a signal passes through a linear system, the shape of its spectrum changes. Systems
Filters designed to reshape the spectrum in a particular way are called filters. The effect that a linear
system has on the spectrum of the input signal can be characterized by the frequency response.

DEFINITION
Let S be a stable linear time-invariant continuous-time system with input xa (t) and output
1.5: Frequency Response
ya (t). Then the frequency response of the system S is denoted Ha ( f ) and defined
 Ya ( f )
Ha ( f ) =
Xa( f )

Thus the frequency response of a linear system is just the Fourier transform of the output
divided by the Fourier transform of the input. Since Ha ( f ) is complex, it can be represented
by its magnitude Aa ( f ) = |Ha ( f )| and its phase angle φa ( f ) =  Ha ( f ) as follows

Ha ( f ) = Aa ( f ) exp[ jφa ( f )] (1.2.18)

Magnitude, phase The function Aa ( f ) is called the magnitude response of the system, while φa ( f ) is called the
response phase response of the system. The magnitude response indicates how much each frequency
component of xa (t) is scaled as it passes through the system. That is, Aa ( f ) is the gain of
the system at frequency f . Similarly, the phase response indicates how much each frequency
component of xa (t) gets advanced in phase by the system. That is, φa ( f ) is the phase shift of
the system at frequency f . Therefore, if the input to the stable system is a pure sinusoidal tone
xa (t) = sin(2π F0 t), the steady-state output of the stable system is

ya (t) = Aa (F0 ) sin[2π F0 t + φa (F0 )] (1.2.19)

The magnitude response of a real system is an even function of f , while the phase response
is an odd function of f . This is similar to the magnitude and phase spectra of a real signal.
Indeed, there is a simple relationship between the frequency response of a system and the
spectrum of a signal. To see this, consider the impulse response.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

20 Chapter 1 Signal Processing

DEFINITION Suppose the initial condition of a continuous-time system S is zero. Then the output of the
1.6: Impulse Response system corresponding to the unit impulse input is denoted h a (t) and is called the system
impulse response.
h a (t) = Sδa (t)

From the sifting property of the unit impulse in (1.2.13) one can show that the Fourier
transform of the unit impulse is simply a ( f ) = 1. It then follows from Definition 1.5 that
when the input is the unit impulse, the Fourier transform of the system output is Ya ( f ) = Ha ( f ).
That is, an alternative way to represent the frequency response is as the Fourier transform of
the impulse response.
Ha ( f ) = F{h a (t)} (1.2.20)
In view of (1.2.17), the magnitude response of a system is just the magnitude spectrum of
the impulse response, and the phase response is just the phase spectrum of the impulse response.
It is for this reason that the same symbol, Aa ( f ), is used to denote both the magnitude spectrum
of a signal and the magnitude response of a system. A similar remark holds for φa ( f ) which
is used to denote both the phase spectrum of a signal and the phase response of a system.

Example 1.4 Ideal Lowpass Filter


An important example of a continuous-time system is the ideal lowpass filter. An ideal lowpass
Ideal lowpass filter filter with cutoff frequency B Hz, is a system whose frequency response is the following pulse
of height one and radius B centered at f = 0.

 1, | f | ≤ B
ρB ( f ) =
0, | f | > B
A plot of the ideal lowpass frequency response is shown in Figure 1.15.
Recall from Definition 1.5 that Ya ( f ) = Ha ( f )X a ( f ). Consequently, the filter in Fig-
ure 1.15 passes the frequency components of xa (t) in the range [−B, B] through the filter
without any distortion whatsoever, not even any phase shift. Furthermore, the remaining fre-
quency components of xa (t) outside the range [−B, B] are completely eliminated by the filter.
The idealized nature of the filter becomes apparent when we look at the impulse response of
the filter. To compute the impulse response from the frequency response we must apply the
inverse Fourier transform. Using the table of Fourier transform pairs in Appendix 1, this yields
h a (t) = 2B · sinc(2Bt)

FIGURE 1.15: Ha ( f )
Frequency
Response of Ideal 6
Lowpass Filter
1

- f
−B 0 B

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

1.3 Sampling of Continuous-time Signals 21

FIGURE 1.16: Impulse Impulse Response


Response of Ideal 250
Lowpass Filter
when B = 100 Hz
200

150

h (t)
100
a

50

−50
−0.04 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04
t (sec)

Here the normalized sinc function is defined as follows.


 sin(π x)
sinc(x) =
πx
Sinc function The sinc function is a two-sided decaying sinusoid that is confined to the envelope 1/(π x). Thus
sinc(k) = 0 for k = 0. The value of sinc(x) at x = 0 is determined by applying L’Hospital’s
rule which yields sinc(0) = 1. Some authors define the sinc function as sinc(x) = sin(x)/x.
The impulse response of the ideal lowpass filter is sinc(2BT ) scaled by 2B. A plot of the
impulse response for the case B = 100 Hz is shown in Figure 1.16.

Notice that the sinc function, and therefore the impulse response, is not a causal signal.
But h a (t) is the filter output when a unit impulse input is applied at time t = 0. Consequently,
for the ideal filter we have a causal input producing a noncausal output. This is not possible
for a physical system. Therefore, the frequency response in Figure 1.15 cannot be realized
with physical hardware. In Section 1.4, we examine some lowpass filters that are physically
realizable that can be used to approximate the ideal frequency response characteristic.

• • • • • • • • • ••••• ••

1.3 Sampling of Continuous-time Signals


1.3.1 Sampling as Modulation
Periodic impulse train The process of sampling a continuous-time signal xa (t) to produce a discrete-time signal x(k)
can be viewed as a form of amplitude modulation. To see this, let δT (t) denote a periodic train
of impulses of period T .



δT (t) = δa (t − kT ) (1.3.1)
k=−∞

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

22 Chapter 1 Signal Processing

FIGURE 1.17: δT (t)


Sampling as e
Amplitude
Modulation of an
Impulse Train ?
xa (t) e - × e x̂a (t)

Thus δT (t) consists of unit impulses at integer multiples of the sampling interval T . The
Sampled signal sampled version of signal xa (t) is denoted x̂a (t), and is defined as the following product.

x̂a (t) = xa (t)δT (t) (1.3.2)
Since x̂a (t) is obtained from xa (t) by multiplication by a periodic signal, this process is
Amplitude a form of amplitude modulation of δT (t). In this case δT (t) plays a role similar to the high-
modulation frequency carrier wave in AM radio, and xa (t) represents the low-frequency information signal.
A block diagram of the impulse model of sampling is shown in Figure 1.17.
Using the basic properties of the unit impulse in (1.2.11), the sampled version of xa (t) can
be written as follows.
x̂a (t) = xa (t)δT (t)
∞
= xa (t) δa (t − kT )
k=−∞


= xa (t)δa (t − kT )
k=−∞
∞
= xa (kT )δa (t − kT ) (1.3.3)
k=−∞

Thus the sampled version of xa (t) is the following amplitude modulated impulse train.


x̂a (t) = x(k)δa (t − kT ) (1.3.4)
k=−∞

Whereas δT (t) is a constant-amplitude or uniform train of impulses, x̂a (t) is a nonuniform


impulse train with the area of the kth impulse equal to sample x(k). A graph illustrating
the relationship between δT (t) and x̂a (t) for the case xa (t) = 10t exp(−t)u a (t) is shown in
Figure 1.18.
It is useful to note from (1.3.4) that x̂a (t) is actually a continuous-time signal, rather than
a discrete-time signal. However, it is a very special continuous-time signal in that it is zero
everywhere except at the samples where it has impulses whose areas correspond to the sample
values. Consequently, there is a simple one-to-one relationship between the continuous-time
signal x̂a (t) and the discrete-time signal x(k). If x̂a (t) is a causal continuous-time signal, we
Laplace transform can apply the Laplace transform to it. The Laplace transform of a causal continuous-time
signal xa (t) is denoted X a (s) and is defined
 ∞

X a (s) = L{xa (t)} = xa (t) exp(−st) dt (1.3.5)
0

It is assumed that the reader is familiar with the basics of the Laplace transform. Tables of
common Laplace transform pairs and Laplace transform properties can be found in Appendix 1.
Comparing (1.3.5) with (1.2.16) it is clear that for causal signals, the Fourier transform is just
the Laplace transform, but with the complex variable s replaced by j2π f . Consequently, the

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

1.3 Sampling of Continuous-time Signals 23

FIGURE 1.18: Periodic (a) Periodic Impulse Train


Impulse Train in (a) 2
and Sampled
Version of xa (t) in 1.5
(b) Using Impulse
Sampling 1

dT(t)
0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4
t (sec)
(b) Amplitude Modulated Impulse Train
4

3
xa(t)

0
0 0.5 1 1.5 2 2.5 3 3.5 4
t (sec)

spectrum of a causal signal can be obtained from its Laplace transform as follows.
X a ( f ) = X a (s)|s= j2π f (1.3.6)
At this point a brief comment about notation is in order. Note that the same base symbol, X a , is
being used to denote both the Laplace transform, X a (s), in (1.3.5), and the Fourier transform,
X a ( f ), in (1.2.16). Clearly, an alternative approach would be to introduce distinct symbols for
each. However, the need for additional symbols will arise repeatedly in subsequent chapters,
so using separate symbols in each case quickly leads to a proliferation of symbols that can
be confusing in its own right. Instead, the notational convention adopted here is to rely on
the argument type, a complex s or a real f , to distinguish between the two cases and dictate
the meaning of X a . The subscript a denotes a continuous-time or analog quantity. The less
cumbersome X , without a subscript, is reserved for discrete-time quantities introduced later.
If the periodic impulse train δT (t) is expanded into a complex Fourier series, the result can
be substituted into the definition of x̂a (t) in (1.3.2). Taking the Laplace transform of x̂a (t) and
converting the result using (1.3.6), we then arrive at the following expression for the spectrum
of the sampled version of xa (t).


1 
X̂ a ( f ) = X a ( f − if s ) (1.3.7)
T i=−∞

1.3.2 Aliasing
The representation of the spectrum of the sampled version of xa (t) depicted in (1.3.7) is called
Aliasing formula the aliasing formula. The aliasing formula holds the key to determining conditions under which
the samples x(k) contain all the information necessary to completely reconstruct or recover
xa (t) from the samples. To see this, we first consider the notion of a bandlimited signal.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

24 Chapter 1 Signal Processing

Typically B is chosen to be as small as possible. Thus if xa (t) is bandlimited to B, then the


highest frequency component present in xa (t) is B Hz. It should be noted that some authors
use a slightly different definition of the term bandlimited by replacing the strict inequality in
Definition 1.7 with | f | ≥ B.
DEFINITION
A continuous-time signal xa (t) is bandlimited to bandwidth B if and only if its magnitude
1.7: Bandlimited Signal
spectrum satisfies
|X a ( f )| = 0 for |f| > B

The aliasing formula in (1.3.7) is quite revealing when it is applied to bandlimited signals.
Notice that the aliasing formula says that the spectrum of the sampled version of a signal is
just a sum of scaled and shifted spectra of the original signal with the replicated versions of
X a ( f ) centered at integer multiples of the sampling frequency f s . This is a characteristic of
amplitude modulation in general where the unshifted spectrum (i = 0) is called the base band
Base, side bands and the shifted spectra (i = 0) are called side bands. An illustration comparing the magnitude
spectra of xa (t) and x̂a (t) is shown in Figure 1.19.
Undersampling The case shown in Figure 1.19 corresponds to f s = 3B/2 and is referred to as undersam-
pling because f s ≤ 2B. The details of the shape of the even function |X a ( f )| within [−B, B]
are not important, so for convenience a triangular spectrum is used. Note how the sidebands in
Figure 1.19b overlap with each other and with the baseband. This overlap is an indication of
Aliasing an undesirable phenomenon called aliasing. As a consequence of the overlap, the shape of the
spectrum of x̂a (t) in [−B, B] has been altered and is different from the shape of the spectrum
of xa (t) in Figure 1.19a. The end result is that no amount of signal-independent filtering of
x̂a (t) will allow us to recover the spectrum of xa (t) from the spectrum of x̂a (t). That is, the
overlap or aliasing has caused the samples to be corrupted to the point that the original signal
xa (t) can no longer be recovered from the samples. Since xa (t) is bandlimited, it is evident

FIGURE 1.19: (a) Magnitude Spectrum of xa


Magnitude Spectra 2
of xa (t) in (a) and
x^a (t) in (b) when 1.5
B = 100, fs = 3B/2
|Xa(f)|

0.5

0
−300 −200 −fs −100 0 100 fs 200 300
f (Hz)
(b) Magnitude Spectrum of Sampled Signal

200
fd
150
|Xa(f)|

100

50

0
−300 −200 −fs −100 0 100 fs 200 300
f (Hz)

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Schilling-1120949 book November 12, 2010 9:33

1.3 Sampling of Continuous-time Signals 25

that there will be no aliasing if the sampling rate is sufficiently high. This fundamental result
is summarized in the Shannon sampling theorem.

PROPOSITION
Suppose a continuous-time signal xa (t) is bandlimited to B Hz. Let x̂a (t) denote the
1.1: Signal Sampling
sampled version of xa (t) using impulse sampling with a sampling frequency of f s . Then the
samples x(k) contain all the information necessary to recover the original signal xa (t) if
f s > 2B

In view of the sampling theorem, it should be possible to reconstruct a continuous-time


signal from its samples if the signal is bandlimited and the sampling frequency exceeds twice
the bandwidth. When f s > 2B, the sidebands of X̂ a ( f ) do not overlap with each other
or the baseband. By properly filtering X̂ a ( f ) it should be possible to recover the baseband
and rescale it to produce X a ( f ). Before we consider how to do this, it is of interest to see
what happens in the time domain when aliasing occurs due to an inadequate sampling rate. If
aliasing occurs, it means that there is another lower-frequency signal that will produce identical
samples. Among all signals that generate a given set of samples, there is only one signal that
is bandlimited to less than half the sampling rate. All other signals that generate the same
Impostors samples are high-frequency impostors or aliases. The following example illustrates this point.

Example 1.5 Aliasing


The simplest example of a bandlimited signal is a pure sinusoidal tone that has all its power
concentrated at a single frequency F0 . For example, consider the following signal where
F0 = 90 Hz.
xa (t) = sin(180π t)

From the Fourier transform pair table in Appendix 1, the spectrum of xa (t) is
j[δ( f + 90) − δ( f − 90)]
Xa( f ) =
2
Thus xa (t) is a bandlimited signal with bandwidth B = 90 Hz. From the sampling theorem,
we need f s > 180 Hz to avoid aliasing. Suppose xa (t) is sampled at the rate f s = 100 Hz. In
this case T = .01 seconds, and the samples are

x(k) = xa (kT )
= sin(180π kT )
= sin(1.8π k)
= sin(2π k − .2π k)
= sin(2π k) cos(.2π k) − cos(2π k) sin(.2π k)
= − sin(.2π k)
= − sin(20π kT )

Thus the samples of the 90 Hz signal xa (t) = sin(180π t) are identical to the samples of the
following lower-frequency signal that has its power concentrated at 10 Hz.

xb (t) = − sin(20π t)

A plot comparing the two signals xa (t) and xb (t) and their shared samples is shown in
Figure 1.20.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Another Random Scribd Document
with Unrelated Content
CHAPTER XIX.

Investment of Triana.— Garci Perez and the


Infanzon.

n the day after the breaking of the bridge, the king, the
Prince Alfonso, the Prince Enrique, the various masters of
the orders, and a great part of the army, crossed the
Guadalquivir and commenced an attack on Triana, while
the bold Admiral Bonifaz approached with his ships and assaulted
the place from the water. But the Christian army was unprovided
with ladders or machines for the attack, and fought to great
disadvantage. The Moors, from the safe shelter of their walls and
towers, rained a shower of missiles of all kinds. As they were so high
above the Christians, their arrows, darts, and lances came with the
greater force. They were skillful with the cross-bow, and had engines
of such force that the darts which they discharged would sometimes
pass through a cavalier all armed, and bury themselves in the earth.
[93]

The very women combated from the walls, and hurled down
stones that crushed the warriors beneath.
While the army was closely investing Triana, and fierce
encounters were daily taking place between Moor and Christian,
there arrived at the camp a youthful Infanzon, or noble, of proud
lineage. He brought with him a shining train of vassals, all newly
armed and appointed, and his own armor, all fresh and lustrous,
showed none of the dents and bruises and abuses of the war. As this
gay and gorgeous cavalier was patrolling the camp, with several
cavaliers, he beheld Garci Perez pass by, in armor and
accoutrements all worn and soiled by the hard service he had
performed, and he saw a similar device to his own, of white waves,
emblazoned on the scutcheon of this unknown warrior. Then the
nobleman was highly ruffled and incensed, and he exclaimed, “How
is this? who is this sorry cavalier that dares to bear these devices?
By my faith, he must either give them up or show his reasons for
usurping them.” The other cavaliers exclaimed, “Be cautious how
you speak; this is Garci Perez; a braver cavalier wears not sword in
Spain. For all he goes thus modestly and quietly about, he is a very
lion in the field, nor does he assume anything that he cannot well
maintain. Should he hear this which you have said, trust us he would
not rest quiet until he had terrible satisfaction.”
Now so it happened that certain mischief-makers carried word to
Garci Perez of what the nobleman had said, expecting to see him
burst into fierce indignation, and defy the other to the field. But
Garci Perez remained tranquil, and said not a word.
Within a day or two after, there was a sally from the castle of
Triana and a hot skirmish between the Moors and Christians; and
Garci Perez and the Infanzon, and a number of cavaliers, pursued
the Moors up to the barriers of the castle. Here the enemy rallied
and made a fierce defense, and killed several of the cavaliers. But
Garci Perez put spurs to his horse, and couching his lance, charged
among the thickest of the foes, and followed by a handful of his
companions, drove the Moors to the very gates of Triana. The Moors
seeing how few were their pursuers turned upon them, and dealt
bravely with sword and lance and mace, while stones and darts and
arrows were rained down from the towers above the gates. At length
the Moors took refuge within the walls, leaving the field to the
victorious cavaliers. Garci Perez drew off coolly and calmly amidst a
shower of missiles from the wall. He came out of the battle with his
armor all battered and defaced; his helmet bruised, the crest broken
off, and his buckler so dented and shattered that the device could
scarcely be perceived. On returning to the barrier, he found there
the Infanzon, with his armor all uninjured, and his armorial bearing
as fresh as if just emblazoned, for the vaunting warrior had not
ventured beyond the barrier. Then Garci Perez drew near to the
Infanzon, and eying him from head to foot, “Señor cavalier,” said he,
“you may well dispute my right to wear this honorable device in my
shield, since you see I take so little care of it that it is almost
destroyed. You, on the other hand, are worthy of bearing it. You are
the guardian angel of honor, since you guard it so carefully as to put
it to no risk. I will only observe to you that the sword kept in the
scabbard rusts, and the valor that is never put to the proof becomes
sullied.”[94]
At these words the Infanzon was deeply humiliated, for he saw
that Garci Perez had heard of his empty speeches, and he felt how
unworthily he had spoken of so valiant and magnanimous a cavalier.
“Señor cavalier,” said he, “pardon my ignorance and presumption;
you alone are worthy of bearing those arms, for you derive not
nobility from them, but ennoble them by your glorious deeds.”
Then Garci Perez blushed at the praises he had thus drawn upon
himself, and he regretted the harshness of his words towards the
Infanzon, and he not merely pardoned him all that had passed, but
gave him his hand in pledge of amity, and from that time they were
close friends and companions in arms.[95]
CHAPTER XX.

Capitulation of Seville.— Dispersion of the Moorish


Inhabitants.— Triumphant Entry of King Fernando.

bout this time there arrived in Seville a Moorish alfaqui,


named Orias, with a large company of warriors, who
came to this war as if performing a pilgrimage, for it was
considered a holy war no less by infidels than Christians.
This Orias was of a politic and crafty nature, and he suggested to
the commander of Seville a stratagem by which they might get
Prince Alfonso in their power, and compel King Fernando to raise the
siege by way of ransom. The counsel of Orias was adopted, after a
consultation with the principal cavaliers, and measures taken to
carry it into execution; a Moor was sent, therefore, as if secretly and
by stealth, to Prince Alfonso, and offered to put him in possession of
two towers of the wall, if he would come in person to receive them,
which towers once in his possession, it would be easy to overpower
the city.
Prince Alfonso listened to the envoy with seeming eagerness, but
suspected some deceit, and thought it unwise to put his person in
such jeopardy. Lest, however, there should be truth in his proposals,
a party of chosen cavaliers were sent as if to take possession of the
towers, and with them was Don Pero Nuñez de Guzman, disguised
as the prince.
When they came to the place where the Moors had appointed to
meet them, they beheld a party of infidels, strongly armed, who
advanced with sinister looks, and attempted to surround Don Nuñez,
but he, being on his guard, put spurs to his horse, and, breaking
through the midst of them, escaped. His companions followed his
example, all but one, who was struck from his horse and cut to
pieces by the Moors.[96]
Just after this event there arrived a great reinforcement to the
camp from the city of Cordova, bringing provisions and various
munitions of war. Finding his army thus increased, the king had a
consultation with Admiral Bonifaz, and determined completely to cut
off all communication between Seville and Triana, for the Moors still
crossed the river occasionally by fording. When they were about to
carry their plan into effect, the crafty Alfaqui Orias crossed to Triana,
accompanied by a number of Ganzules. He was charged with
instructions to the garrison, and to concert some mode of reuniting
their forces, or of effecting some blow upon the Christian camp; for
unless they could effect a union and coöperation, it would be
impossible to make much longer resistance.
Scarce had Orias passed, when the Christian sentinels gave
notice. Upon this, a detachment of the Christian army immediately
crossed and took possession of the opposite shore, and Admiral
Bonifaz stationed his fleet in the middle of the river. Thus the return
of Orias was prevented, and all intercourse between the places, even
by messenger, completely interrupted. The city and Triana were now
severally attacked, and unable to render each other assistance. The
Moors were daily diminishing in number; many slain in battle, many
taken captive, and many dying of hunger and disease. The Christian
forces were daily augmenting, and were animated by continual
success, whereas mutiny and sedition began to break out among the
inhabitants of the city. The Moorish commander Axataf, therefore,
seeing all further resistance vain, sent ambassadors to capitulate
with King Fernando. It was a hard and humiliating struggle to resign
this fair city, the queen of Andalusia, the seat of Moorish sway and
splendor, and which had been under Moorish domination ever since
the Conquest.
The valiant Axataf endeavored to make various conditions; that
King Fernando should raise the siege on receiving the tribute which
had hitherto been paid to the miramamolin. This being peremptorily
refused, he offered to give up a third of the city, and then half,
building at his own cost a wall to divide the Moorish part from the
Christian. King Fernando, however, would listen to no such terms. He
demanded the entire surrender of the place, with the exception of
the persons and effects of the inhabitants, and permitting the
commander to retain possession of St. Lucar, Aznal Farache, and
Niebla. The commander of Seville saw the sword suspended over his
head, and had to submit; the capitulations of the surrender were
signed, when Axataf made one last request, that he might be
permitted to demolish the grand mosque and the principal tower (or
Giralda) of the city.[97] He felt that these would remain perpetual
monuments of his disgrace. The Prince Alfonso was present when
this last demand was made, and his father looked at him
significantly, as if he desired the reply to come from his lips. The
prince rose indignantly and exclaimed, that if there should be a
single tile missing from the temple or a single brick from the tower, it
should be paid by so many lives that the streets of Seville should run
with blood. The Moors were silenced by this reply, and prepared with
heavy hearts to fulfill the capitulation. One month was allowed them
for the purpose, the alcazar or citadel of Seville being given up to
the Christians as a security.
On the twenty-third day of November this important fortress was
surrendered, after a siege of eighteen months. A deputation of the
principal Moors came forth and presented King Fernando with the
keys of the city; at the same time the aljamia, or council of the
Jews, presented him with the key of Jewry, the quarter of the city
which they inhabited. This key was notable for its curious
workmanship. It was formed of all kinds of metals. The guards of it
were wrought into letters, bearing the following signification,—“God
will open—the king will enter.” On the ring was inscribed in Hebrew,
—“The King of kings will enter; all the world will behold him.” This
key is still preserved in the cathedral of Seville, in the place where
repose the remains of the sainted King Fernando.[98]
During the month of grace the Moors sold such of their effects as
they could not carry with them, and the king provided vessels for
such as chose to depart for Africa. Upwards of one hundred
thousand, it is said, were thus convoyed by Admiral Bonifaz, while
upwards of two hundred thousand dispersed themselves throughout
such of the territory of Andalusia as still remained in possession of
the Moors.
When the month was expired, and the city was evacuated by its
Moorish inhabitants, King Fernando the Saint entered in solemn
triumph, in a grand religious and military procession. There were all
the captains and cavaliers of the army, in shining armor, with the
prelates, and masters of the religious and military orders, and the
nobility of Castile, Leon, and Aragon, in their richest apparel. The
streets resounded with the swelling notes of martial music and with
the joyous acclamations of the multitude.
In the midst of the procession was the venerable effigy of the
most Holy Mary, on a triumphal car of silver, wrought with admirable
skill; and immediately after followed the pious king, with a drawn
sword in his hand, and on his left was Prince Alfonso and the other
princes.
The procession advanced to the principal mosque, which had
been purified and consecrated as a Christian temple, where the
triumphal car of the Holy Virgin was placed at the grand altar. Here
the pious king knelt and returned thanks to Heaven and the Virgin
for this signal victory, and all present chanted Te Deum Laudamus.
CHAPTER XXI.

Death of King Fernando.

hen King Fernando had regulated everything for the good


government and prosperity of Seville, he sallied forth
with his conquering army to subdue the surrounding
country. He soon brought under subjection Xerez, Medina
Sidonia, Alua, Bepel, and many other places near the sea-coast;
some surrendered voluntarily, others were taken by force; he
maintained a strict peace with his vassal the King of Granada, but
finding not sufficient scope for his arms in Spain, and being inflamed
with a holy zeal in the cause of the faith, he determined to pass over
into Africa, and retaliate upon the Moslems their daring invasion of
his country. For this purpose he ordered a powerful armada to be
prepared in the ports of Cantabria, to be put under the command of
the bold Admiral Bonifaz.
In the midst of his preparations, which spread consternation
throughout Mauritania, the pious king fell dangerously ill at Seville of
a dropsy. When he found his dying hour approaching, he made his
death-bed confession, and requested the holy Sacrament to be
administered to him. A train of bishops and other clergy, among
whom was his son Philip, Archbishop of Seville, brought the
Sacrament into his presence. The king rose from his bed, threw
himself on his knees, with a rope round his neck and a crucifix in his
hand, and poured forth his soul in penitence and prayer. Having
received the viatica and the holy Sacrament, he commanded all
ornaments of royalty to be taken from his chamber. He assembled
his children round his bedside, and blessed his son the Prince
Alfonso, as his first-born and the heir of his throne, giving him
excellent advice for the government of his kingdom, and charging
him to protect the interests of his brethren. The pious king
afterwards fell into an ecstasy or trance, in which he beheld angels
watching round his bed to bear his soul to heaven. He awoke from
this in a state of heavenly rapture, and, asking for a candle, he took
it in his hand and made his ultimate profession of the faith. He then
requested the clergy present to repeat the litanies, and to chant the
Te Deum Laudamus. In chanting the first verse of the hymn, the
king gently inclined his head, with perfect serenity of countenance,
and rendered up his spirit. “The hymn,” says the ancient chronicle,
“which was begun on earth by men, was continued by the voices of
angels, which were heard by all present.” These doubtless were the
angels which the king in his ecstasy had beheld around his couch,
and which now accompanied him, in his glorious ascent to heaven,
with songs of holy triumph. Nor was it in his chamber alone that
these voices were heard, but in all the royal alcazars of Seville, the
sweetest voices were heard in the air and seraphic music, as of
angelic choirs, at the moment that the sainted king expired.[99] He
died on the 30th of May, the vespers of the Holy Trinity, in the year
of the Incarnation one thousand two hundred and forty-two, aged
seventy-three years—having reigned thirty-five years over Castile
and twenty over Leon.
Two days after his death he was interred in his royal chapel in
the Holy Church, in a sepulchre of alabaster, which still remains. It is
asserted by grave authors that at the time of putting his body in the
sepulchre, the choir of angels again was heard chanting his
eulogium, and filling the air with sweet melody in praise of his
virtues.[100]
When Alhamar, the Moorish king of Granada, heard of his death,
he caused great demonstrations of mourning to be made throughout
his dominions. During his life he sent yearly a number of Moors with
one hundred wax tapers, to assist at his exequies, which ceremony
was observed by his successors, until the time of the conquest of
Granada by Fernando the Catholic.[101]
SPANISH ROMANCE.
SPANISH ROMANCE.

To the Editor of “The Knickerbocker”:—


ir,—I have already given you a legend or two, drawn from
ancient Spanish sources, and may occasionally give you a
few more. I love these old Spanish themes, especially when
they have a dash of the Morisco in them, and treat of the
times when the Moslems maintained a foothold in the peninsula.
They have a high, spicy, oriental flavor, not to be found in any other
themes that are merely European. In fact, Spain is a country that
stands alone in the midst of Europe—severed in habits, manners,
and modes of thinking from all its continental neighbors. It is a
romantic country; but its romance has none of the sentimentality of
modern European romance; it is chiefly derived from the brilliant
regions of the East, and from the high-minded school of Saracenic
chivalry.
The Arab invasion and conquest brought a higher civilization, and
a nobler style of thinking into Gothic Spain. The Arabs were a quick-
witted, sagacious, proud-spirited, and poetical people, and were
imbued with oriental science and literature. Wherever they
established a seat of power, it became a rallying-place for the
learned and ingenious; and they softened and refined the people
whom they conquered. By degrees, occupancy seemed to give them
a hereditary right to their foothold in the land; they ceased to be
looked upon as invaders, and were regarded as rival neighbors. The
peninsula, broken up into a variety of states, both Christian and
Moslem, became for centuries a great campaigning ground, where
the art of war seemed to be the principal business of man, and was
carried to the highest pitch of romantic chivalry. The original ground
of hostility, a difference of faith, gradually lost its rancor. Neighboring
states, of opposite creeds, were occasionally linked together in
alliances, offensive and defensive; so that the Cross and Crescent
were to be seen side by side, fighting against some common enemy.
In times of peace, too, the noble youth of either faith resorted to the
same cities, Christian or Moslem, to school themselves in military
science. Even in the temporary truces of sanguinary wars, the
warriors who had recently striven together in the deadly conflicts of
the field, laid aside their animosity, met at tournaments, jousts, and
other military festivities, and exchanged the courtesies of gentle and
generous spirits. Thus the opposite races became frequently mingled
together in peaceful intercourse, or if any rivalry took place, it was in
those high courtesies and nobler acts which bespeak the
accomplished cavalier. Warriors of opposite creeds became ambitious
of transcending each other in magnanimity as well as valor. Indeed,
the chivalric virtues were refined upon to a degree sometimes
fastidious and constrained, but at other times inexpressibly noble
and affecting. The annals of the times teem with illustrious instances
of high-wrought courtesy, romantic generosity, lofty
disinterestedness, and punctilious honor, that warm the very soul to
read them. These have furnished themes for national plays and
poems, or have been celebrated in those all-pervading ballads,
which are as the life-breath of the people, and thus have continued
to exercise an influence on the national character which centuries of
vicissitude and decline have not been able to destroy; so that, with
all their faults, and they are many, the Spaniards, even at the
present day, are, on many points, the most high-minded and proud-
spirited people of Europe. It is true, the romance of feeling derived
from the sources I have mentioned has, like all other romance, its
affectations and extremes. It renders the Spaniard at times pompous
and grandiloquent; prone to carry the “pundonor,” or point of honor,
beyond the bounds of sober sense and sound morality; disposed, in
the midst of poverty, to affect the “grande caballero,” and to look
down with sovereign disdain upon arts “mechanical,” and all the
gainful pursuits of plebeian life; but this very inflation of spirit, while
it fills his brain with vapors, lifts him above a thousand meannesses;
and though it often keeps him in indigence, ever protects him from
vulgarity.
In the present day when popular literature is running into the low
levels of life, and luxuriating on the vices and follies of mankind; and
when the universal pursuit of gain is trampling down the early
growth of poetic feeling, and wearing out the verdure of the soul, I
question whether it would not be of service for the reader
occasionally to turn to these records of prouder times and loftier
modes of thinking, and to steep himself to the very lips in old
Spanish romance.
For my own part, I have a shelf or two of venerable, parchment-
bound tomes, picked up here and there about the peninsula, and
filled with chronicles, plays, and ballads about Moors and Christians,
which I keep by me as mental tonics, in the same way that a
provident house-wife has her cupboard of cordials. Whenever I find
my mind brought below par, by the common-place of every-day life,
or jarred by the sordid collisions of the world, or put out of tune by
the shrewd selfishness of modern utilitarianism, I resort to these
venerable tomes, as did the worthy hero of La Mancha to his books
of chivalry, and refresh and tone up my spirit by a deep draught of
their contents. They have some such effect upon me as Falstaff
ascribes to a good Sherris sack, “warming the blood, and filling the
brain with fiery and delectable shapes.”
I here subjoin, Mr. Editor, a small specimen of the cordials I have
mentioned, just drawn from my Spanish cupboard, which I
recommend to your palate. If you find it to your taste, you may pass
it on to your readers.
Your correspondent and well-wisher,

Geoffrey Crayon.
LEGEND OF DON MUNIO SANCHO DE HINOJOSA.

n the cloisters of the ancient Benedictine convent of San


Domingo, at Silos, in Castile, are the mouldering yet
magnificent monuments of the once powerful and
chivalrous family of Hinojosa. Among these reclines the
marble figure of a knight, in complete armor, with the hands pressed
together, as if in prayer. On one side of his tomb is sculptured, in
relief, a band of Christian cavaliers capturing a cavalcade of male
and female Moors; on the other side, the same cavaliers are
represented kneeling before an altar. The tomb, like most of the
neighboring monuments, is almost in ruins, and the sculpture is
nearly unintelligible, excepting to the keen eye of the antiquary. The
story connected with the sepulchre, however, is still preserved in the
old Spanish chronicles, and is to the following purport:—

In old times, several hundred years ago, there was a noble


Castilian cavalier, named Don Munio Sancho de Hinojosa, lord of a
border castle, which had stood the brunt of many a Moorish foray.
He had seventy horsemen as his household troops, all of the ancient
Castilian proof; stark warriors, hard riders, and men of iron: with
these he scoured the Moorish lands, and made his name terrible
throughout the borders. His castle hall was covered with banners
and scimetars and Moslem helms, the trophies of his prowess. Don
Munio was, moreover, a keen huntsman; and rejoiced in hounds of
all kinds, steeds for the chase, and hawks for the towering sport of
falconry. When not engaged in warfare, his delight was to beat up
the neighboring forests; and scarcely ever did he ride forth without
hound and horn, a boar-spear in his hand, or a hawk upon his fist,
and an attendant train of huntsmen.
His wife, Doña Maria Palacin, was of a gentle and timid nature,
little fitted to be the spouse of so hardy and adventurous a knight;
and many a tear did the poor lady shed when he sallied forth upon
his daring enterprises, and many a prayer did she offer up for his
safety.
As this doughty cavalier was one day hunting, he stationed
himself in a thicket, on the borders of a green glade of the forest,
and dispersed his followers to rouse the game and drive it towards
his stand. He had not been here long when a cavalcade of Moors, of
both sexes, came pranking over the forest lawn. They were
unarmed, and magnificently dressed in robes of tissue and
embroidery, rich shawls of India, bracelets and anklets of gold, and
jewels that sparkled in the sun.
At the head of this gay cavalcade rode a youthful cavalier,
superior to the rest in dignity and loftiness of demeanor, and in
splendor of attire; beside him was a damsel, whose veil, blown aside
by the breeze, displayed a face of surpassing beauty, and eyes cast
down in maiden modesty, yet beaming with tenderness and joy.
Don Munio thanked his stars for sending him such a prize, and
exulted at the thought of bearing home to his wife the glittering
spoils of these infidels. Putting his hunting-horn to his lips, he gave a
blast that rung through the forest. His huntsmen came running from
all quarters, and the astonished Moors were surrounded and made
captives.
The beautiful Moor wrung her hands in despair, and her female
attendants uttered the most piercing cries. The young Moorish
cavalier alone retained self-possession. He inquired the name of the
Christian knight who commanded this troop of horsemen. When told
that it was Don Munio Sancho de Hinojosa, his countenance lighted
up. Approaching that cavalier, and kissing his hand, “Don Munio
Sancho,” said he, “I have heard of your fame as a true and valiant
knight, terrible in arms, but schooled in the noble virtues of chivalry.
Such do I trust to find you. In me you behold Abadil, son of a
Moorish alcaid. I am on the way to celebrate my nuptials with this
lady; chance has thrown us in your power, but I confide in your
magnanimity. Take all our treasure and jewels; demand what ransom
you think proper for our persons, but suffer us not to be insulted or
dishonored.”
When the good knight heard this appeal, and beheld the beauty
of the youthful pair, his heart was touched with tenderness and
courtesy. “God forbid,” said he, “that I should disturb such happy
nuptials. My prisoners in troth shall ye be, for fifteen days, and
immured within my castle, where I claim, as conqueror, the right of
celebrating your espousals.”
So saying, he dispatched one of his fleetest horsemen in
advance, to notify Doña Maria Palacin of the coming of this bridal
party; while he and his huntsmen escorted the cavalcade, not as
captors, but as a guard of honor. As they drew near to the castle,
the banners were hung out, and the trumpets sounded from the
battlements; and on their nearer approach, the drawbridge was
lowered, and Doña Maria came forth to meet them, attended by her
ladies and knights, her pages and her minstrels. She took the young
bride, Allifra, in her arms, kissed her with the tenderness of a sister,
and conducted her into the castle. In the mean time, Don Munio
sent forth missives in every direction, and had viands and dainties of
all kinds collected from the country round; and the wedding of the
Moorish lovers was celebrated with all possible state and festivity.
For fifteen days the castle was given up to joy and revelry. There
were tiltings and jousts at the ring, and bull-fights, and banquets,
and dances to the sound of minstrelsy. When the fifteen days were
at an end, he made the bride and bridegroom magnificent presents,
and conducted them and their attendants safely beyond the borders.
Such, in old times, were the courtesy and generosity of a Spanish
cavalier.
Several years after this event, the king of Castile summoned his
nobles to assist him in a campaign against the Moors. Don Munio
Sancho was among the first to answer to the call, with seventy
horsemen, all stanch and well-tried warriors. His wife, Doña Maria,
hung about his neck. “Alas, my lord!” exclaimed she, “how often wilt
thou tempt thy fate, and when will thy thirst for glory be appeased?”
“One battle more,” replied Don Munio, “one battle more, for the
honor of Castile, and I here make a vow that when this is over, I will
lay by my sword, and repair with my cavaliers in pilgrimage to the
Sepulchre of our Lord at Jerusalem.” The cavaliers all joined with him
in the vow, and Doña Maria felt in some degree soothed in spirit;
still, she saw with a heavy heart the departure of her husband, and
watched his banner with wistful eyes, until it disappeared among the
trees of the forest.
The king of Castile led his army to the plains of Salmanara,
where they encountered the Moorish host, near to Ucles. The battle
was long and bloody; the Christians repeatedly wavered, and were
as often rallied by the energy of their commanders. Don Munio was
covered with wounds, but refused to leave the field. The Christians
at length gave way, and the king was hardly pressed, and in danger
of being captured.
Don Munio called upon his cavaliers to follow him to the rescue.
“Now is the time,” cried he, “to prove your loyalty. Fall to, like brave
men! We fight for the true faith, and if we lose our lives here, we
gain a better life hereafter.”
Rushing with his men between the king and his pursuers, they
checked the latter in their career, and gave time for their monarch to
escape; but they fell victims to their loyalty. They all fought to the
last gasp. Don Munio was singled out by a powerful Moorish knight,
but having been wounded in the right arm, he fought to
disadvantage, and was slain. The battle being over, the Moor paused
to possess himself of the spoils of this redoubtable Christian warrior.
When he unlaced the helmet, however, and beheld the countenance
of Don Munio, he gave a great cry; and smote his breast. “Woe is
me?” cried he, “I have slain my benefactor! the flower of knightly
virtue! the most magnanimous of cavaliers!”
While the battle had been raging on the plain of Salmanara,
Doña Maria Palacin remained in her castle, a prey to the keenest
anxiety. Her eyes were ever fixed on the road that led from the
country of the Moors, and often she asked the watchman of the
tower, “What seest thou?”
One evening, at the shadowy hour of twilight, the warden
sounded his horn. “I see,” cried he, “a numerous train winding up
the valley. There are mingled Moors and Christians. The banner of
my lord is in the advance. Joyful tidings!” exclaimed the old
seneschal; “my lord returns in triumph, and brings captives!” Then
the castle courts rang with shouts of joy; and the standard was
displayed, and the trumpets were sounded, and the drawbridge was
lowered, and Doña Maria went forth with her ladies, and her knights,
and her pages, and her minstrels, to welcome her lord from the
wars. But as the train drew nigh, she beheld a sumptuous bier,
covered with black velvet, and on it lay a warrior, as if taking his
repose; he lay in his armor, with his helmet on his head, and his
sword in his hand, as one who had never been conquered, and
around the bier were the escutcheons of the house of Hinojosa.
A number of Moorish cavaliers attended the bier, with emblems
of mourning and with dejected countenances; and their leader cast
himself at the feet of Doña Maria, and hid his face in his hands. She
beheld in him the gallant Abadil, whom she had once welcomed with
his bride to her castle, but who now came with the body of her lord,
whom he had unknowingly slain in battle!
The sepulchre erected in the cloisters of the Convent of San
Domingo was achieved at the expense of the Moor Abadil, as a
feeble testimony of his grief for the death of the good knight Don
Munio, and his reverence for his memory. The tender and faithful
Doña Maria soon followed her lord to the tomb. On one of the
stones of a small arch, beside his sepulchre, is the following simple
inscription: “Hic jacet Maria Palacin, uxor Munonis Sancij De
Hinojosa:” Here lies Maria Palacin, wife of Munio Sancho de
Hinojosa.
The legend of Don Munio Sancho does not conclude with his
death. On the same day on which the battle took place on the plain
of Salmanara, a chaplain of the Holy Temple at Jerusalem, while
standing at the outer gate, beheld a train of Christian cavaliers
advancing, as if in pilgrimage. The chaplain was a native of Spain,
and as the pilgrims approached, he knew the foremost to be Don
Munio Sancho de Hinojosa, with whom he had been well acquainted
in former times. Hastening to the patriarch, he told him of the
honorable rank of the pilgrims at the gate. The patriarch, therefore,
went forth with a grand procession of priests and monks, and
received the pilgrims with all due honor. There were seventy
cavaliers, beside their leader, all stark and lofty warriors. They
carried their helmets in their hands, and their faces were deadly
pale. They greeted no one, nor looked either to the right or to the
left, but entered the chapel, and kneeling before the Sepulchre of
our Saviour, performed their orisons in silence. When they had
concluded, they rose as if to depart, and the patriarch and his
attendants advanced to speak to them, but they were no more to be
seen. Every one marveled what could be the meaning of this
prodigy. The patriarch carefully noted down the day, and sent to
Castile to learn tidings of Don Munio Sancho de Hinojosa. He
received for reply, that on the very day specified that worthy knight,
with seventy of his followers, had been slain in battle. These,
therefore, must have been the blessed spirits of those Christian
warriors, come to fulfill their vow of a pilgrimage to the Holy
Sepulchre at Jerusalem. Such was Castilian faith in the olden time,
which kept its word, even beyond the grave.
If any one should doubt of the miraculous apparition of these
phantom knights, let him consult the “History of the Kings of Castile
and Leon,” by the learned and pious Fray Prudencio de Sandoval,
Bishop of Pamplona, where he will find it recorded in the History of
the King Don Alonzo VI., on the hundred and second page. It is too
precious a legend to be lightly abandoned to the doubter.

THE END.

FOOTNOTES

[1] Many of the facts in this legend are taken from an old chronicle, written
in quaint and antiquated Spanish, and professing to be a translation from the
Arabian chronicle of the Moor Rasis, by Mohammed, a Moslem writer, and Gil
Perez, a Spanish priest. It is supposed to be a piece of literary mosaic work,
made up from both Spanish and Arabian chronicles; yet, from this work most
of the Spanish historians have drawn their particulars relative to the fortunes
of Don Roderick.
[2] Florain, de Ocampo, lib. 3, c. 12. Justin, Abrev. Trog Pomp., lib. 44.
Bleda, Cronica, lib. 2, c. 3.

[3] Chron. de Luitprando, 709. Abarca, Anales de Aragon (el Mahometismo,


fol. 5).

[4] Mariana, Hist. Esp., lib. 6, c. 21.

[5] Perdida de España, por Abulcasim Tarif Abentarique, lib. 1.

[6] Lope de Vega.

[7] By some she is called Zara.

[8] “Como esta Infanta era muy hermosa, y el Rey [Don Rodrigo] dispuesto
y gentil hombre, entro por medio el amor y aficion, y junto con el regalo con
que la avia mandado hospedar y servir ful causa que el rey persuadio esta
Infanta que si se tornava a su ley de christiano la tomaria por muger, y que
la haria señora de sus Reynos. Con esta persuasion ella fue contenta, y
aviendose vuelto christiana, se caso con ella, y se celebraron sus bodas con
muchas fiestas y regozijos, como era razon.”—Abulcasim, Conq’st de Espan,
cap. 3.

[9] Condes Espatorios; so called from the drawn swords of ample size and
breadth with which they kept guard in the ante-chambers of the Gothic
kings. Comes Spathariorum, custodum corporis Regis Profectus. Hunc et
Propospatharium appellatum existimo.—Patr. Pant. de Offic. Goth.

[10] Perdida de España, por Abulcasim Tarif Abentarique, L. 1, c. 6. Cronica


del Rey Don Rodrigo, por el Moro Rasis, L. 1, c. 1. Bleda, Cron. cap. vii.

[11] From the minute account of the good friar, drawn from the ancient
chronicles, it would appear that the walls of the tower were pictured in
mosaic work.

[12] Bleda, Cronica, cap. 7.

[13] Bleda, Cronica cap. 7.

[14] Bleda, cap. 5.

[15] Bleda, cap. 4.

[16] Beuter, Cron. Gen. de España, L. 1, c. 28. Marmol Descrip. de Africa, L.


2, c. 10.
[17] Bleda, Cron. c. 5.

[18] Conde, Hist. Dom. Arab. part 1, c. 8.

[19] Conde, part 1, c. 8.

[20] Conde, part 1, c. 9.

[21] La Perdida de España, cap. 9. Bleda, L. 2, c. 8.

[22] This name was given to it subsequently by the Arabs. It signifies the
River of Death. Vide Pedraza, Hist. Granad. p. 3, c. 1.

[23] Bleda, Cronica.

[24] Entrand. Chron. an. Chris. 714.

[25] This battle is called indiscriminately by historians the battle of


Guadalete, or of Xeres, from the neighborhood of that city.

[26] Bleda, Cron. L. 2, c. 9. Abulcasim Tarif Abentarique, L. 1, c. 10.

[27] Here lies Roderick,


The last King of the Goths.

[28] Salazar, Hist. Gran. Cardinal. Prologo, vol. i. plan 1.

[29] Mr. D. W—kie.

[30] Lord Mah—n.

[31] In this legend most of the facts respecting the Arab inroads into Spain
are on the authority of Arabian writers, who had the most accurate means of
information. Those relative to the Spaniards are chiefly from old Spanish
chronicles. It is to be remarked that the Arab accounts have most the air of
verity, and the events as they relate them are in the ordinary course of
common life. The Spanish accounts, on the contrary, are full of the
marvelous; for there were no greater romancers than the monkish
chroniclers.

[32] Conde, p. 1, c. 10.

[33] Chronica de España, de Alonzo el Sabio. P. 3, c. 1.

[34] The house shown as the ancient residence of Aben Habuz is called la
Casa del Gallo, or the house of the weathercock; so named, says Pedraza, in
his history of Granada, from a bronze figure of an Arab horseman, armed
with lance and buckler, which once surmounted it, and which varied with
every wind. On this warlike weathercock was inscribed, in Arabic characters,

“Dice el sabio Aben Habuz


Que asi se defiende el Andaluz.”

(In this way, says Aben Habuz the Wise,


The Andalusian his foe defies.)

The Casa del Gallo, even until within twenty years, possessed two great
halls beautifully decorated with morisco reliefs. It then caught fire and was so
damaged as to require to be nearly rebuilt. It is now a manufactory of coarse
canvas, and has nothing of the Moorish character remaining. It commands a
beautiful view of the city and the vega.

[35] Pedraza, Hist. Granad. p. 3, c. 2. Bleda, Cronica, L 2 c. 10.

[36] Conde, Hist. de los Arabes en España, c. 12.

[37] The stratagem of the Jews of Toledo is recorded briefly by Bishop


Lucas de Tuy, in his chronicle, but is related at large in the chronicle of the
Moor Rasis.

[38] According to Arabian legends, this table was a mirror revealing all great
events; insomuch that by looking on it the possessor might behold battles
and sieges and feats of chivalry, and all actions worthy of renown; and might
thus ascertain the truth of all historic transactions. It was a mirror of history
therefore; and had very probably aided King Solomon in acquiring that
prodigious knowledge and wisdom for which he was renowned.

[39] Abulcasim, Perdida de España, L. 1, c. 13.

[40] Cron. gen. de España, por Alonzo el Sabio. P. 3, c. 1.

[41] Bleda, Cronica, L. 2, c. 11.

[42] Conde, p. 1, c. 13. Ambrosio de Morales. N. B.—In the chronicle of


Spain, composed by order of Alonzo the Wise, this anecdote is given as
having happened at the siege of Seville.

[43] Marmol, Descrip. de Africa, T. 1, L. 2.

[44] Abulcasim, Perdida de España, L. 1, c. 13.


Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like