Sei sulla pagina 1di 508

K.S. Thyagarajan

Introduction to Digital Signal Processing Using MATLAB with Application to Digital Communications

K.S. Thyagarajan Introduction to Digital Signal Processing Using MATLAB with Application to Digital Communications

K.S. Thyagarajan Extension Program University of California, San Diego San Diego, CA, USA

ISBN 978-3-319-76028-5

ISBN 978-3-319-76029-2 (eBook)

Library of Congress Control Number: 2018935280

© Springer International Publishing AG, part of Springer Nature 2019 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microlms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specic statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional af liations.

Printed on acid-free paper

This Springer imprint is published by the registered company Springer International Publishing AG part of Springer Nature. The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland

Preface

The eld of digital signal processing is well matured and has found applications in most commercial as well as household items. It started in the 1960s when computers were used only in the academic institutions. Moreover, these computers were built around vacuum tubes with limited memory and slow processing power. This situa- tion was not conducive to rapid advancements in digital signal processing theory. As the computer technology advanced due to the invention of microprocessors and semiconductor memories, the eld of digital signal processing also simultaneously progressed. Today, digital signal processing is used in a myriad of elds such as communications, medicine, forensics, imaging, and music, to name a few. It is, therefore, necessary for an aspirant to learn the basics of digital signal processing so as to be able to apply his or her knowledge in this eld to career advancement. There are many excellent textbooks on digital signal processing in the market. This book, though, is meant to serve working professionals who are looking for online courses to complete certi cate programs in areas such as electrical engineer- ing, systems engineering, communications, and embedded systems. Since these professional engineers are time-constrained, it is important that the textbook they are supposed to follow should be easy to understand, brief, and up to the point, and should contain the necessary supplements as aids to understanding the materials. With these factors in mind, this book is based on my online course in digital signal processing at the University of California Extension Program, San Diego. This book uses MATLAB tools to make understanding of the materials easier. In my experi- ence in teaching this online course, I found that students come from different elds, but mostly from digital communications hardware and software. Therefore, I nd it appropriate to include applications of digital signal processing in digital communications. The students are required to have a college-level math background to fully understand the topics discussed in this book. After a brief introduction to areas such as audio/speech processing, digital communications, and digital image processing, Chap. 2 starts with the discussion

vi

Preface

on discrete-time signals and systems. It characterizes the various discrete-time signals and systems in mathematical terms followed by examples to clarify the subject matter. Chapter 2 also describes the process of converting continuous-time signals to discrete-time sequences. The Z-transform is introduced in Chap. 3 . Since Z-transform is very useful in both analysis and design of discrete-time systems, its properties are elaborated with several examples. Next the representation of discrete- time signals and systems in the frequency domain is discussed in Chap. 4 . Here, the connection between the Z-transform and discrete-time Fourier transform is explained. Several examples are worked out to make the subject matter clearer. Since digital signal processing implies computational methods, Chapt. 5 introduces the concept of discrete Fourier transform. It also deals with the relationship between discrete-time Fourier transform and discrete Fourier transform. Again, MATLAB- based examples are included. Once the signals and systems are described in the time and frequency domains, Chap. 6 then deals with the design of in nite impulse response (IIR) digital lters. It treats the design of IIR digital lters based on analytical methods as well as on computer-based techniques. In addition, real-life systems are simulated using MATLAB/Simulink tool. Continuing further, Chap. 7 discusses the design of nite impulse response (FIR) digital lters using both the analytical and computer-based methods. Many examples are included to aid the students in understanding the

material better. It is not enough just to learn the design of IIR and FIR digital lters.

A professional engineer must know how to implement these lters in various real-

time applications. Therefore, Chap. 8 is included, which deals with the signal ow

graphs of digital lters. It describes both canonical and noncanonical structures to implement IIR and FIR digital lters. Knowing how to draw the signal ow graphs

of digital lters makes one to implement them either in software or hardware. Even

though discrete Fourier transform (DFT) is introduced in Chap. 5 , it does not deal with the ef cient implementation of the DFTs. Chapter 9 describes ef cient com- putational methods to calculate the DFT of a sequence. It further deals with short- time Fourier transform, zoom FFT, etc. So far these chapters describe discrete-time signals and systems and various

design techniques. In Chap. 10 , the application of digital signal processing methods

in wireless communications in general and digital communications in particular is

discussed. The chapter deals with reducing the intersymbol interference, pulse shaping, detection of binary data using matched lters, channel equalization, phase-locked loop, orthogonal frequency division multiplexing, and software-

de ned radio, all using digital signal processing. Examples based on MATLAB

are presented along with SIMULINK-based digital communications system. Codes for all MATLAB and SIMULINK. I thank Tony Babaian for giving me the opportunity to teach the online courses titled DSP I and DSP for wireless communications . My sincere thanks to Sveteslav Maric for editing the book draft. I also thank the students for their feedback on the contents of the application of DSP in wireless communications. I am indebted to

Preface

vii

Mathworks for their continued support in providing MATLAB license, which enabled me to develop this and my other books. My thanks go to Springer Publishing Company and their staff for publishing my book. I am extremely grateful to my wife Vasú, for suggesting to write this book. Without her kind and gentle encouragement, I would not have been able to even think of writing this book, let alone completing it.

San Diego, CA, USA

K.S. Thyagarajan

Contents

1 Introduction

1

1.1 What Is Digital Signal Processing

 

1

1.2 A Few Applications of Digital Signal Processing

 

5

1.3 A Typical Digital Signal Processing System

 

10

1.4 Continuous-Time Signals and Systems

 

11

1.5 Summary

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

19

1.6 Problems

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

19

References

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

19

2 Discrete-Time Signals and Systems

 

21

2.1 Introduction

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

21

2.2 Typical Discrete-Time Signals

 

22

2.3 Discrete-Time Systems

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

23

2.4 Convolution Sum

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

25

2.5 Linear Difference Equation

 

30

2.6 Sampling a Continuous-Time Signal

 

39

2.7 Conversion of Continuous-Time Signals to Digital Signals

 

44

2.8 Performance of A/D Converters

 

51

2.9 Summary

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

59

2.10 Problems

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

62

References

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

63

3 Z-Transform

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

65

3.1 Z-Transform De nition .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

65

3.2 Properties of Z-Transform

 

69

3.3 Z-Transform and Difference Equation

 

74

3.4 Poles and Zeros

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

76

3.5 Inverse Z-Transform

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

77

3.6 MATLAB Examples

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

83

x

Contents

3.7 Summary

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

101

3.8 Problems

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

104

References

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

105

4 Frequency Domain Representation of Discrete-Time

 

Signals and Systems

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

107

4.1 Introduction

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

107

4.2 Discrete-Time Fourier Transform

 

110

4.3 Inverse Discrete-Time Fourier Transform

 

113

4.4 Properties of DTFT

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

113

4.5 Frequency Domain Representation of LTI Discrete-Time Systems

 

118

4.6 Summary

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

147

4.7 Problems

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

148

References

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

149

5 Discrete Fourier Transform

 

151

5.1

Introduction

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

151

5.2 De nition of DFT

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

151

5.3 Relationship Between DTFT and DFT

 

152

5.4

Inverse DFT

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

153

5.5

Effect of Sampling the DTFT on the Reconstructed

 

Sequence

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

155

5.6 Circular Convolution

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

158

5.7 Properties of the DFT

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

161

5.8 Linear Convolution Using Circular Convolution

 

166

5.9 Linear Convolution of a Finite-Length Sequence with an In nite-Length Sequence

168

5.10 Discrete Transforms

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

176

5.11 Summary

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

184

5.12 Problems

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

186

References

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

187

6 IIR Digital Filters

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

189

6.1 Introduction

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

189

6.2 Impulse Invariance Technique

 

190

6.3 Design of IIR Digital Filters in the Frequency Domain

 

194

6.4 Design of IIR Digital Filters Using Frequency

 

Transformation

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

211

6.5 Computer-Aided Design of IIR Digital Filters

 

220

6.6 Group Delay .

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

224

6.7 Simulation Using Simulink

 

231

6.8 Summary

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

238

6.9 Problems

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

242

References

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

243

Contents

xi

7

FIR Digital Filters

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

245

7.1 Types of Linear-Phase FIR Filters

 

245

7.2 Linear-Phase FIR Filter Design

 

247

7.3 Computer-Aided Design of Linear-Phase FIR Filters

 

276

7.4 Discrete-Time Hilbert Transformer

 

299

7.5 Summary

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

308

7.6 Problems .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

310

References

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

311

8

Digital Filter Structures .

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

313

8.1 Signal Flow Graph

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

313

8.2 IIR Digital Filter Structures

 

315

8.3 FIR Filter Structures

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

325

8.4 Finite Word Length Effect

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

332

8.5 FIR Lattice Structure

 

.

.

.

.

.

.

.

.

.

.

.

.

365

8.6 Summary

 

.

.

.

.