Signals and Systems Using MATLAB Luis F. Chaparro Department of Electrical and Computer Engineering University of Pittsburgh AMSTERDAM • BOSTON • HEIDELBERG • LONDON NEW YORK • OXFORD • PARIS • SAN DIEGO SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Academic Press is an imprint of Elsevier Academic Press is an imprint of Elsevier 30 Corporate Drive, Suite 400, Burlington, MA 01803, USA Elsevier, The Boulevard, Langford Lane, Kidlington, Oxford, OX5 1GB, UK Copyright c 2011 Elsevier Inc. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or any information storage and retrieval system, without permission in writing from the publisher.
Details on how to seek permission, further information about the Publisher’s permissions policies and our arrangements with organizations such as the Copyright Clearance Center and the Copyright Licensing Agency, can be found at our website: www. This book and the individual contributions contained in it are protected under copyright by the Publisher (other than as may be noted herein). MATLAB R is a trademark of The MathWorks, Inc. and is used with permission.
The MathWorks does not warrant the accuracy of the text or exercises in this book. This books use or discussion of MATLAB R software or related products does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular use of the MATLAB R software. Notices Knowledge and best practice in this field are constantly changing. As new research and experience broaden our understanding, changes in research methods, professional practices, or medical treatment may become necessary.
Practitioners and researchers must always rely on their own experience and knowledge in evaluating and using any information, methods, compounds, or experiments described herein. In using such information or methods they should be mindful of their own safety and the safety of others, including parties for whom they have a professional responsibility. To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume any liability for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas contained in the material herein. Library of Congress Cataloging-in-Publication Data Chaparro, Luis F.
Signals and systems using MATLAB R / Luis F. Signal processing–Digital techniques.382’2–dc22 2010023436 British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library. For information on all Academic Press publications visit our Web site at www.com Printed in the United States of America 10 11 12 13 9 8 7 6 5 4 3 2 1 To my family, with much love. xvi Part 1 Introduction 1 CHAPTER 0 From the Ground Up! .1 Signals and Systems and Digital Technologies .2 Examples of Signal Processing Applications .1 Compact-Disc Player .2 Software-Defined Radio and Cognitive Radio.3 Computer-Controlled Systems .3 Analog or Discrete? .1 Continuous-Time and Discrete-Time Representations .2 Derivatives and Finite Differences .3 Integrals and Summations.4 Differential and Difference Equations .4 Complex or Real? .1 Complex Numbers and Vectors.2 Functions of a Complex Variable .3 Phasors and Sinusoidal Steady State .5 Soft Introduction to MATLAB.
53 Part 2 Theory and Application of Continuous-Time Signals and Systems 63 CHAPTER 1 Continuous-Time Signals .2 Classification of Time-Dependent Signals.3 Continuous-Time Signals .1 Basic Signal Operations—Time Shifting and Reversal .2 Even and Odd Signals .3 Periodic and Aperiodic Signals .4 Finite-Energy and Finite Power Signals .4 Representation Using Basic Signals.2 Unit-Step, Unit-Impulse, and Ramp Signals .3 Special Signals—the Sampling Signal and the Sinc .4 Basic Signal Operations—Time Scaling, Frequency Shifting, and Windowing .5 Generic Representation of Signals.5 What Have We Accomplished? Where Do We Go from Here?. 108 CHAPTER 2 Continuous-Time Systems .3 LTI Continuous-Time Systems .3 Representation of Systems by Differential Equations .4 Application of Superposition and Time Invariance .7 Graphical Computation of Convolution Integral .8 Interconnection of Systems—Block Diagrams .9 Bounded-Input Bounded-Output Stability .4 What Have We Accomplished? Where Do We Go from Here?. 157 CHAPTER 3 The Laplace Transform .2 The Two-Sided Laplace Transform .1 Eigenfunctions of LTI Systems.2 Poles and Zeros and Region of Convergence .3 The One-Sided Laplace Transform .4 Inverse Laplace Transform .1 Inverse of One-Sided Laplace Transforms .2 Inverse of Functions Containing e−ρs Terms .3 Inverse of Two-Sided Laplace Transforms .5 Analysis of LTI Systems .1 LTI Systems Represented by Ordinary Differential Equations .2 Computation of the Convolution Integral .6 What Have We Accomplished? Where Do We Go from Here?. 226 CHAPTER 4 Frequency Analysis: The Fourier Series .3 Complex Exponential Fourier Series .1 Parseval’s Theorem—Power Distribution over Frequency .2 Symmetry of Line Spectra .5 Trigonometric Fourier Series .6 Fourier Coefficients from Laplace .7 Convergence of the Fourier Series.8 Time and Frequency Shifting.9 Response of LTI Systems to Periodic Signals.1 Sinusoidal Steady State.2 Filtering of Periodic Signals .10 Other Properties of the Fourier Series .1 Reflection and Even and Odd Periodic Signals .2 Linearity of Fourier Series—Addition of Periodic Signals .3 Multiplication of Periodic Signals .4 Derivatives and Integrals of Periodic Signals .11 What Have We Accomplished? Where Do We Go from Here?.
290 CHAPTER 5 Frequency Analysis: The Fourier Transform .2 From the Fourier Series to the Fourier Transform .3 Existence of the Fourier Transform .4 Fourier Transforms from the Laplace Transform .5 Linearity, Inverse Proportionality, and Duality .2 Inverse Proportionality of Time and Frequency .2 Fourier Transform of Periodic Signals .3 Parseval’s Energy Conservation.4 Symmetry of Spectral Representations.7 Convolution and Filtering.1 Basics of Filtering .3 Frequency Response from Poles and Zeros.2 Differentiation and Integration .9 What Have We Accomplished? What Is Next?. 350 CHAPTER 6 Application to Control and Communications .2 System Connections and Block Diagrams .3 Application to Classic Control.1 Stability and Stabilization .2 Transient Analysis of First- and Second-Order Control Systems .4 Application to Communications .1 AM with Suppressed Carrier .3 AM Single Sideband .4 Quadrature AM and Frequency-Division Multiplexing .2 Butterworth Low-Pass Filter Design.3 Chebyshev Low-Pass Filter Design .5 Filter Design with MATLAB .6 What Have We Accomplished? What Is Next?. 409 Part 3 Theory and Application of Discrete-Time Signals and Systems 417 CHAPTER 7 Sampling Theory .1 Pulse Amplitude Modulation .2 Ideal Impulse Sampling .3 Reconstruction of the Original Continuous-Time Signal .4 Signal Reconstruction from Sinc Interpolation.5 Sampling Simulation with MATLAB .3 The Nyquist-Shannon Sampling Theorem .1 Sampling of Modulated Signals .4 Practical Aspects of Sampling .1 Sample-and-Hold Sampling .2 Quantization and Coding .3 Sampling, Quantizing, and Coding with MATLAB .5 What Have We Accomplished? Where Do We Go from Here?. 447 CHAPTER 8 Discrete-Time Signals and Systems .2 Discrete-Time Signals .1 Periodic and Aperiodic Signals .2 Finite-Energy and Finite-Power Discrete-Time Signals .3 Even and Odd Signals .4 Basic Discrete-Time Signals .3 Discrete-Time Systems .1 Recursive and Nonrecursive Discrete-Time Systems.2 Discrete-Time Systems Represented by Difference Equations .3 The Convolution Sum .4 Linear and Nonlinear Filtering with MATLAB.5 Causality and Stability of Discrete-Time Systems .4 What Have We Accomplished? Where Do We Go from Here?.
502 CHAPTER 9 The Z-Transform .2 Laplace Transform of Sampled Signals.3 Two-Sided Z-Transform .1 Region of Convergence .4 One-Sided Z-Transform.1 Computing the Z-Transform with Symbolic MATLAB .2 Signal Behavior and Poles .3 Convolution Sum and Transfer Function .4 Interconnection of Discrete-Time Systems.5 Initial and Final Value Properties .5 One-Sided Z-Transform Inverse .1 Long-Division Method .2 Partial Fraction Expansion .3 Inverse Z-Transform with MATLAB.4 Solution of Difference Equations .5 Inverse of Two-Sided Z-Transforms .6 What Have We Accomplished? Where Do We Go from Here?. 564 CHAPTER 10 Fourier Analysis of Discrete-Time Signals and Systems .2 Discrete-Time Fourier Transform .1 Sampling, Z-Transform, Eigenfunctions, and the DTFT .2 Duality in Time and Frequency .3 Computation of the DTFT Using MATLAB .4 Time and Frequency Supports .5 Parseval’s Energy Result.6 Time and Frequency Shifts.3 Fourier Series of Discrete-Time Periodic Signals.1 Complex Exponential Discrete Fourier Series .2 Connection with the Z-Transform .3 DTFT of Periodic Signals .4 Response of LTI Systems to Periodic Signals .5 Circular Shifting and Periodic Convolution .4 Discrete Fourier Transform .1 DFT of Periodic Discrete-Time Signals .2 DFT of Aperiodic Discrete-Time Signals .3 Computation of the DFT via the FFT .4 Linear and Circular Convolution Sums .5 What Have We Accomplished? Where Do We Go from Here?. 629 CHAPTER 11 Introduction to the Design of Discrete Filters .2 Frequency-Selective Discrete Filters .2 IIR and FIR Discrete Filters .1 Frequency-Domain Specifications .2 Time-Domain Specifications .4 IIR Filter Design.1 Transformation Design of IIR Discrete Filters .2 Design of Butterworth Low-Pass Discrete Filters .3 Design of Chebyshev Low-Pass Discrete Filters .4 Rational Frequency Transformations .5 General IIR Filter Design with MATLAB .5 FIR Filter Design .1 Window Design Method .6 Realization of Discrete Filters .1 Realization of IIR Filters .2 Realization of FIR Filters .7 What Have We Accomplished? Where Do We Go from Here?. 701 CHAPTER 12 Applications of Discrete-Time Signals and Systems .2 Application to Digital Signal Processing .1 Fast Fourier Transform .2 Computation of the Inverse DFT .3 General Approach of FFT Algorithms .3 Application to Sampled-Data and Digital Control Systems .1 Open-Loop Sampled-Data System .2 Closed-Loop Sampled-Data System .4 Application to Digital Communications .1 Pulse Code Modulation .2 Time-Division Multiplexing .3 Spread Spectrum and Orthogonal Frequency-Division Multiplexing.5 What Have We Accomplished? Where Do We Go from Here?.
742 APPENDIX Useful Formulas. 749 Preface In this book I have only made up a bunch of other men’s flowers, providing of my own only the string that ties them together. de Montaigne (1533–1592) French essayist Although it is hardly possible to keep up with advances in technology, it is reassuring to know that in science and engineering, development and innovation are possible through a solid understanding of basic principles. The theory of signals and systems is one of those fundamentals, and it will be the foundation of much research and development in engineering for years to come.
Not only engineers will need to know about signals and systems—to some degree everybody will. The pervasiveness of computers, cell phones, digital recording, and digital communications will require it. Learning as well as teaching signals and systems is complicated by the combination of mathematical abstraction and concrete engineering applications. Mathematical sophistication and maturity in engineering are needed.
Thus, a course in signals and systems needs to be designed to nurture the students’ interest in applications, but also to make them appreciate the significance of the mathematical tools. In writing this textbook, as in teaching this material for many years, the author has found it practical to follow Einstein’s recommendation that “Everything should be made as simple as possible, but not simpler,” and Melzak’s [47] dictum that “It is downright sinful to teach the abstract before the concrete.” The aim of this textbook is to serve the students’ needs in learning signals and systems theory as well as to facilitate the teaching of the material for faculty by proposing an approach that the author has found effective in his own teaching. We consider the use of MATLAB, an essential tool in the practice of engineering, of great significance in the learn- ing process. It not only helps to illustrate the theoretical results but makes students aware of the computational issues that engineers face in implementing them.
Some familiarity with MATLAB is beneficial but not required. LEVEL The material in this textbook is intended for courses in signals and systems at the junior level in electrical and computer engineering, but it could also be used in teaching this material to mechanical engineering and bioengi- neering students and it might be of interest to students in applied mathematics. The “student-friendly” nature of the text also makes it useful to practicing engineers interested in learning or reviewing the basic principles of signals and systems on their own. The material is organized so that students not only get a solid understand- ing of the theory—through analytic examples as well as software examples using MATLAB—and learn about applications, but also develop confidence and proficiency in the material by working on problems.