COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication...

17
COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS WITH LABORATORY EXPERIMENTS FOR THE TMS320C6701 AND TMS320C6711

Transcript of COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication...

Page 1: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

COMMUNICATION SYSTEM DESIGN USING

DSP ALGORITHMS WITH LABORATORY EXPERIMENTS

FOR THE TMS320C6701 AND TMS320C6711

Page 2: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

Information Technology: Transmission, Processing, and Storage

Series Editor: Jack Keil Wolf University of California at San Diego La Jolla, California

Editorial Board: Robert J. McEliece California Institute of Technology Pasadena, California

John Proakis Northeastern University Boston, Massachusetts University of California at San Diego La Jolla, California

William H. Tranter Virginia Polytechnic Institute and State University Blacksburg, Virginia

Coded Modulation Systems John B. Anderson and Arne Svensson

Communication System Design Using DSP Algorithms: With Laboratory Experiments for the TMS320C6701 and TMS320C6711 Steven A. Tretter

A First Course in Information Theory Raymond W. Yeung

Multi-Carrier Digital Communications: Theory and Applications of OFDM Ahmad R. S. Bahai and Burton R. Saltzberg

Nonuniform Sampling: Theory and Practice Edited by Farokh Marvasti

Principles of Digital Transmission: With Wireless Applications Sergio Benedetto and Ezio Biglieri

Simulation of Communication Systems, Second Edition: Methodology, Modeling, and Techniques Michel C. Jeruchim, Philip Balaban, and K. Sam Shanmugan

A Continuation Order Plan is available for this series. A continuation order will bring delivery of each new volume immediately upon publication. Volumes are billed only upon actual shipment. For further information please contact the publisher.

Page 3: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

COMMUNICATION SYSTEM DESIGN USING

DSP ALGORITHMS WITH LABORATORY EXPERIMENTS

FOR THE TMS320C6701 AND TMS320C6711

Steven A. Tretter University of Maryland College Park, Maryland

Kluwer Academic / Plenum Publishers New York, Boston, Dordrecht, London, Moscow

Page 4: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

Library of Congress Cataloging-in-Publication Data

Tretter, Steven A. Communciation system design using DSP algorithms: with laboratory experiments for

the TMS32OC6701 and TMS320C6711. p. cm. - (Information technology: transmission, processing, and storage)

Includes bibliographical references and index. ISBN -13: 978-0-306-47429-3

1. Signal processing-Digital techniques-Data processing. 2. Texas Instruments TMS320 series microprocessors. I. Title. II. Series.

TK5102.9 .T739 2003 621.382-dc21

2002034176

Additional material to this book can be downloaded from http://extras.springer.com.

ISBN -13: 978-0-306-47429-3

DOl: 10.1071978-1-4613-0229-2

e-ISBN -13: 978-1-4613-0229-2

©2003 Kluwer Academic/Plenum Publishers, New York 233 Spring Street, New York, New York 10013

http://www.wkap.nll

10 9 8 7 6 5 4 3 2 1

A CI.P. record for this book is available from the Library of Congress

All rights reserved

No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, microfilming, recording, or otherwise, without written permission from the Publisher, with the exception of any material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work.

Page 5: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

To Teresa, Anne, Jeffrey, Max, and in memory of David

Page 6: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

Preface

The first edition this book began in January 1993 when I was "elected" by Dr. William Destler, who was then Chairman of the Electrical Engineering Department and is now Provost and Vice President for Academic Affairs of the University of Maryland's College Park Campus, to set up and write experiments for a new senior elective laboratory course, ENEE418c Communications Laboratory, scheduled to be given for the first time in the Fall 1993 semester. At that time, we chose to use the state-of-the-art Texas Instruments TMS320C30 EVM (evaluation module) DSP board. In January 2001 we upgraded the lab to use the new state-of-the-art Texas Instruments TMS320C6701 EVM DSP board and their Code Composer Studio software interface. Some discussion of how to use the much cheaper TI TMS320C6711 DSK is included in this book also. Initially, the lab used Intel 486 based host PC's running Windows 3.1. These have been replaced by modern Pentium based PC's running Windows NT which are all connected to the campus network. Each lab group is given a private workspace on the lab server. Students are given only read/execute privileges for the standard utility and development software so they do not inadvertently alter these files.

In 1993, books for hardware based laboratory courses with standard digital signal pro­cessing and filter design experiments existed, but no book focusing on analog and digital communications techniques was available. This is still largely true.

Laboratories in the Department of Electrical and Computer Engineering at the University of Maryland are separate courses. Each week they have a one hour lecture given by a regular faculty member to introduce the theory and explain the experiments followed by a three hour laboratory period run by a graduate teaching assistant. Students in this lab work in pairs. We have found that this works well because both group members actively participate. With groups of three or more, some members just sit and watch. Students are given the combination to the lock on the Communications Lab door and can work whenever they please outside of regular class hours. One section of the lab was first offered in the Fall 1993 semester and two in the Spring 1994 semester. Then five sections a week were offered for several years until about a year ago when a new communications capstone design course was offered in addition. The students have been highly enthusiastic and often spend extra hours working on the experiments because they find them to be very interesting and challenging. They also have realized that this course will help them get jobs and provide them with the skills required to perform well in their future jobs. The lab was designed for seniors, but 1/4 to 1/3 of the class is now graduate students who want to learn some real-world practical skills in addition to the purely theoretical concepts presented in the typical graduate communications and signal processing courses. When asked why they are taking this senior class, the graduate

vii

Page 7: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

viii Preface

students often say they think it will help them get jobs. The goal of this set of experiments is to explore the digital signal processing and com­

munication systems theoretical concepts presented in typical senior elective courses on these subjects by implementing them with actual hardware and in real time. In the process, students will gain experience using equipment commonly used in industry, such as, oscillo­scopes, spectrum analyzers, signal generators, error rate test sets, digital signal processors, and analog-to-digital and digital-to-analog converters. They will also learn about typical software development tools. In addition, they will learn that there is a big step in going from an equation on paper to a real working system.

This book differs from any others on the market in that its primary focus is on communi­cation systems. Fundamental digital signal processing concepts like digital filters and FFT's are included because they are required in communication systems. Approaches that are par­ticularly useful for DSP implementations are presented. While the experiments, particularly the earlier ones, are described for the TMS320C6701 Evaluation Module and TMS320C6711 DSK, they can be easily modified for any PC DSP board with an AID and D / A converter.

There are several books on digital signal processing experiments for stable software pack­ages like MATHCAD and MATLAB. In my view, one of the purposes of a laboratory course is to help prepare students for industrial jobs. Off-line software simulation is no substitute for making actual hardware work in real-time. It does not present students with the strange unexpected and often frustrating things that occur when using actual hardware in real-time which can not be explained by nice equations, nor does it teach them how to use standard lab equipment.

The prerequisites for this course are an understanding of linear systems and transform methods at a level that is often presented in a junior required course on Signals and Systems and a working knowledge of PC's and C programming. Students who have programmed in other languages like BASIC, PASCAL, or FORTRAN can quickly learn enough C to do the experiments if they are willing to make the effort. Corequisite are a senior level elective course in Digital Signal Processing and/or Communication Systems. Ideally, both courses should be taken before the Communications Laboratory. However, this is not usually possible for our seniors. We wanted our students to have the opportunity to take this lab, so we made just one of them a corequisite. With the engineering background of a senior, the presentation of the necessary theory in the text, and the one hour lab lecture to explain the theory, students have quickly learned the signal processing and communication system concepts required for the experiments. In addition, it can be argued that a lab course should help prepare students for the work world where they will have to figure out new things for themselves so the experiments should have some uncertainty and require students to fill in some of the details.

There is a large initial hurdle for the students to get over while learning the details required to use the lab's hardware and software tools. Chapters 1 and 2 gradually introduce them to these tools and the architecture of the TMS320C6701 and TMS320C6711 fioating­point DSP's. An attempt has been made to reduce this hurdle by including some basic programs on the program disk for initializing the EVM and DSK that can be used as a starting point for the experiments.

FIR and IIR filter design and implementation are explored in Chapter 3. Filters are re-

Page 8: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

Preface ix

quired in many communication system signal processing algorithms. Experiments comparing the relative merits of C and assembly language implementations are performed. In particu­lar, TI's linear assembly is briefly discussed. Modern DSP applications in industry are often written primarily in C with only numerically intensive critical functions written in assembly to reduce development time and improve portability to new platforms. TI's optimizing C compiler generates somewhat efficient software pipelined executable code that is adequate for the experiments in this course. Therefore, assembly programming is not emphasized.

Chapter 4 investigates the FFT and power spectrum estimation. A simple spectrum analyzer is made.

Chapters 5 through 8 explore the classical analog communication methods of ampli­tude modulation, double-sideband suppressed-carrier amplitude modulation, single-sideband modulation, and frequency modulation. Transmitters and receivers are built using DSP techniques. Noncoherent receivers using envelope detectors and coherent receivers using phase-locked loops are implemented. The use of Hilbert transforms and complex signal representations in modulation systems are explored.

Chapters 9 through 16 introduce some modern digital communication techniques. These experiments focus on methods used in high-speed wire-line data moderns where DSP's have been extensively used. Topics covered include linear shift register scramblers, the RS232C interface, pulse amplitude modulation (PAM), variable phase interpolation, and quadra­ture amplitude modulation (QAM). The experiments lead up to building almost a complete V.22bis transmitter and receiver. Symbol clock recovery and tracking, carrier tracking, and adaptive equalizer receiver functions are implemented. The echo canceling technique used in V.32, V.34, V.90, and V.92 modems is studied in Chapter 16. Enough details are included so that this set of experiments could form a good practical guide to engineers in indus­try interested in modem design. I learned many of these techniques while consulting since 1970 for companies that build high-speed wire-line moderns and have seen them employed in hundreds of thousands of modems.

Chapter 17 briefly presents some ideas for additional projects related to high-speed wire­line modem design, error-control coding, and speech codecs. These ideas can be expanded to satisfy the capstone design project requirements of the ABET accrediting committee.

Appendix C contains a complete list of the equipment used for this laboratory at the University of Maryland. It has been included as a guide to others setting up a similar lab and is not intended to be an endorsement of any specific manufacturer. Clearly, any equipment with equivalent capabilities can be substituted for items in the list.

There are many more experiments in this book than can be performed in one semester. Based on our experience, an ambitious goal is to have all students do Chapters 1, 2, and 3 followed by a choice of any three additional experiments. In some semesters, we have limited the choice to three of the classical analog modulation chapters and in others to three of the digital communication chapters. It would be nice if students could continue in the lab for a second semester for additional credit and build on their earlier experiments.

Utility programs, software updates, text corrections, lab lecture slides, and supplementary material can be found on my web site www . ee . umd. edurtretter.

Steven A. Tretter

Page 9: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

Acknowledgements

I would like to thank Mark Kohler and Sonjai Gupta for helping to unpack equipment and install and debug hardware and software in the PC's during the Spring 1993 semester when the lab was initially being set up. The students in the original Communications Laboratory section offered in the Fall 1993 semester as well as their Teaching Assistant, Yifeng Cui, deserve a great deal of thanks for being extremely patient and enthusiastic Guinea pigs. They helped correct and significantly improve the first few experiments. In particular, I want to thank Mike Barr who, with his partner Brian Silverman, forged well ahead of the rest of the students and was so enthusiastic by the end of the semester that he asked about helping with the lab in the Spring 1994 semester. The Electrical Engineering Department was able to make an exception and assign Mike as a senior to be the TA for one section and he did an outstanding job. Mrs. Tahereh Fazel was also an excellent Graduate TA for a second lab section in the Spring 1994 semester. I also want to thank those who have been TA's for the lab since that time and have all done excellent jobs as well as Dr. Adrian Papamarcou and Dr. Jerome Gansman who have shared in teaching the lab. I also thank Dr. Gansman for collecting information about the 'C6701 EVM and 'C6701 DSP and generating a set of very detailed and useful lecture slides for a capstone design course. Dr. Brian Evans of the University of Texas at Austin also deserves thanks for reviewing preliminary versions of this manuscript and making good suggestions for improvements.

I would also like to thank my friends from RIXON (which was in Silver Spring, MD, but has long since dissipated in a chain of corporate take-overs), from Penril Datability Networks (which was in Gaithersburg, MD, and was bought by Bay Networks, which was in turn bought by Nortel Networks and is now the Signal Processing Group of Nortel in Germantown, MD), and at Telogy Networks (which is a Texas Instruments company in Germantown, MD) for helping me stay at the state-of-the-art in DSP applications to wire-line moderns by using me as a consultant.

I also want to thank Texas Instruments for designating our lab as one of ten Elite Digital Signal Processing Labs in the country. TI has been very generous in supporting our lab with TI hardware and software tools. In particular, Torrence Robinson with University Programs at TI in Houston deserves many thanks for his constant and cheerful support. Figures in the book with captions marked by t have been reprinted from TI documents with their approval.

xi

Page 10: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

Contents

1 Overview of the Hardware and Software Tools 1.1 Some DSP Chip History and Typical Applications 1.2 The TMS320C6701 and 6711 Floating-Point DSP's

1.2.1 The 'C6000 Central Processing Unit (CPU) 1.2.2 Memory Organization for the TMS320C6701 1.2.3 Memory Organization for the TMS320C6711 1.2.4 Direct Memory Access Controllers. 1.2.5 Serial Ports ................. . 1.2.6 Other Internal Peripherals ......... . 1.2.7 Brief Description of the TMS320C6000 Instruction Set 1.2.8 Parallel Operations and Pipelining ...

1.3 The TMS320C6701 Evaluation Module (EVM) . 1.3.1 The CS4231A Stereo Codec Interface ..

1.4 The TMS320C6711 DSP Starter Kit (DSK) .. 1.4.1 The Audio Interface Onboard the 'C6711 DSK . 1.4.2 The PCM3003 Audio Daughter Card ..... .

1.5 Software Support for the EVM and DSK Boards and 'C6x DSP's 1.5.1 Software Support for the 'C6701 EVM 1.5.2 Software Support for the 'C6711 DSK .

1.6 Code Composer Studio ............ . 1.6.1 Project Files and Building Programs 1.6.2 The Optimizing Compiler and Assembler 1.6.3 The Linker ............... . 1.6.4 Building Programs from Command Line Prompts 1.6.5 The Archiver . . . . . . . . . . . . . . . . . 1.6.6 Additional Code Composer Studio Features

1. 7 Other Software . . . . . . . . . . . . . 1. 7.1 Digital Filter Design Programs 1.7.2 Commercial Software

1.8 Introductory Experiments . . . . . . .

2 Learning to Use the Hardware and Software Tools 2.1 Getting Started with a Simple Audio Loop Through Program

2.1.1 A Beginning C Program and Linker Command File

xiii

1 2 6 6

12 13 13 14 15 15 16 20 22 24 25 26 28 28 30 31 31 31 33 33 34 34 34 35 35 36

37 37 37

Page 11: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

xiv

2.2

2.3 2.4

2.5

2.6

Contents

2.1.2 Creating a CCS Project for evmstart. c .. . 2.1.3 Testing evmstart. out ............ . More Details on the McBSP Serial Ports and Codecs 2.2.1 Basic McBSP Transmitter and Receiver Operation 2.2.2 Useful Functions in the C6x Peripheral Support Library 2.2.3 Example C Code for Reading and Writing the EVM Codec The 'C6000 Timers .................. . Method 1: Generating a Sine Wave by Polling DXR . 2.4.1 Instructions for the Polling Experiment .... Method 2: Generating a Sine Wave Using Interrupts 2.5.1 The CPU Interrupt Priorities and Sources .. 2.5.2 What Happens When an Interrupt Occurs . . 2.5.3 TI Extensions to Standard C Interrupt Service Routines 2.5.4 Using the Peripheral Support Library for Interrupts ... 2.5.5 Instructions for the Experiment of Generating Sine Waves by Using

Interrupts . . . . . . . . . . . . . . . . . . . . . . . Method 3: Generating a Sine Wave by DMA From a Table 2.6.1 The DMA Control Registers ........ . 2.6.2 Major Steps for Setting Up a DMA Transfer 2.6.3 DMA Autoinitialization 2.6.4 Triggering DMA Transfers 2.6.5 Split-Channel Operation 2.6.6 Priorities.......... 2.6.7 Peripheral Support Library Functions for DMA 2.6.8 Instructions for the Experiment of Generating Sine Waves by Using

the DMA Controller .......................... .

44 45 46 47 48 49 51 52 53 54 55 56 59 60

62 64 65 65 67 68 68 70 70

71

3 Digital Filters 75 3.1 Discrete-Time Convolution and Frequency Responses 75 3.2 Finite Duration Impulse Response (FIR) Filters . . . 76

3.2.1 Block Diagram for Most Common Realization 76 3.2.2 Two Methods for Finding the Filter Coefficients to Achieve a Desired

Frequency Response .............. 77 3.3 Using Circular Buffers to Implement FIR Filters in C 80 3.4 Circular Buffers Using the 'C6000 Hardware . . 82

3.4.1 How the Circular Buffer is Implemented 83 3.4.2 Indirect Addressing Through Registers 83

3.5 Interfacing C and Assembly Functions ..... 84 3.5.1 Responsibilities of the Calling and Called Function 84 3.5.2 Using Assembly Functions with C . . . . . . . . . . 86

3.6 Linear Assembly Code and the Assembly Optimizer. . . . 87 3.6.1 A Linear Assembly Convolution Function that Uses a Circular Buffer

and Can be Called from C . . . . . . . . . 88 3.7 Infinite Duration Impulse Response (IIR) Filters. . . . . . . . . . . . . . .. 96

Page 12: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

Contents xv

3.7.1 Realizations for IIR Filters. . . . . . . . . . . . 96 3.7.2 A Program for Designing IIR Filters ...... 100 3.7.3 Two Methods for Measuring a Phase Response. 102

3.8 Laboratory Experiments for Digital Filters . . . . . . . 103 3.8.1 Laboratory Experiments for FIR Filters Entirely in C . 103 3.8.2 Laboratory Experiments for FIR Filters Using C and Assembly 105 3.8.3 Laboratory Experiments for IIR Filters. 105

3.9 Additional References. . . . . . . . . . . . . 106

4 The FFT and Power Spectrum Estimation 4.1 The Discrete-Time Fourier Transform . . . . 4.2 Data Window Functions . . . . . . . . . . . 4.3 The Discrete Fourier Transform and its Inverse . 4.4 The Fast Fourier Transform . . . . . . . . . . 4.5 Using the FFT to Estimate a Power Spectrum 4.6 Laboratory Experiments . . . . . . . . . . . .

4.6.1 FFT Experiments ........... .

109 109 110 III III ll9 120 120

4.6.2 Experiments for Power Spectrum Estimation . 121 4.7 Additional References. . . . . . . . . . . . . . . . . . 124

5 Amplitude Modulation 125 5.1 Theoretical Description of Amplitude Modulation 125

5.1.1 Mathematical Formula for an AM Signal 125 5.1.2 Example for Single Tone Modulation . . . 126 5.1.3 The Spectrum of an AM Signal . . . . . . 127

5.2 Demodulating an AM Signal by Envelope Detection. 127 5.2.1 Square-Law Demodulation of AM Signals. . . 128 5.2.2 Hilbert Transforms and the Complex Envelope . 129

5.3 Laboratory Experiments for AM Modulation and Demodulation 131 5.3.1 Making an AM Modulator . . . . . . . . . . . . . . . . . 132 5.3.2 How to Capture EVM Output Samples with CCS for Plotting 133 5.3.3 Making a Square-Law Envelope Detector. . . . . . . . . . 134 5.3.4 Making an Envelope Detector Using the Hilbert Transform 135

5.4 Additional References. . . . . . . . . . . . . . . . . . . . . . 136

6 DSBSC Amplitude Modulation and Coherent Detection 137 6.1 Mathematical Form for a DSBSC-AM Signal. . . . . . . . . . . . . . 137 6.2 The Ideal Coherent Receiver . . . . . . . . . . . . . . . . . . . . . . . 138 6.3 The Costas Loop as a Practical Approach to Coherent Demodulation 140 6.4 Exercises and Experiments for the Costas Loop 142

6.4.1 Theoretical Design Exercises. 143 6.4.2 Hardware Experiments 144

6.5 Additional References. . . . . . . . . 145

Page 13: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

xvi Contents

7 Single-Sideband Modulation and Frequency Translation 7.1 Single-Sideband Modulators . . . . . .

147 147 149 150 151 152 152 154

7.2 Coherent Demodulation of SSB Signals 7.3 Frequency Translation ...... . 7.4 Laboratory Experiments ... .

7.4.1 Making an SSB Modulator. 7.4.2 Coherent Demodulation of an SSB Signal.

7.5. Additional References.

8 Frequency Modulation 8.1 The FM Signal and Some of its Properties ............ .

8.l.1 Definition of Instantaneous Frequency and the FM Signal. 8.l.2 Single Tone FM Modulation .. . 8.l.3 Narrow Band FM Modulation ...... . 8.1.4 The Bandwidth of an FM Signal .... .

8.2 FM Demodulation by a Frequency Discriminator. 8.2.1 An FM Discriminator Using the Pre-Envelope 8.2.2 A Discriminator Using t.he Complex Envelope

8.3 Using a Phase-Locked Loop for FM Demodulation .. 8.4 Laboratory Experiments for Frequency Modulation .

8.4.1 Experimentally Measuring the Spectrum of an FM Signal. 8.4.2 FM Demodulation Using a Frequency Discriminator. 8.4.3 Using a Phase-Locked Loop for FM Demodulation.

8.5 Additional References ..................... .

9 Pseudo-Random Binary Sequences and Data Scramblers

9.1 Using Shift Registers to Generate Pseudo-Random Binary Sequences 9.l.1 The Linear Feedback Shift Register Sequence Generator 9.l.2 The Connect.ion Polynomial and Sequence Period 9.l.3 Properties of Maximal Length Sequences

9.2 Self Synchronizing Data Scramblers 9.2.1 The Scrambler ....... . 9.2.2 The Descrambler ...... .

9.3 Theoretical and Simulation Exercises

155 155 155 156 157 158 158 159 160 161 164 164 165 165

166

167

168 168 169 170 171 171 172 173

9.3.1 Exercises for a Shift Register Sequence Generator with a Primitive Connection Polynomial . . . . . . . . . . . . . . . . . . . . . . . . .. 173

9.3.2 Exercises for a Shift Register Sequence Generator with an Irreducible but not Primitive Connection Polynomial. . . . . . . . . . . . . . .. 174

9.3.3 Exercises for a Shift. Register Sequence Generator with a Reducible Connection Polynomial . 174

9.4 Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 175

Page 14: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

Contents

10 The RS-232C Protocol and a Bit-Error Rate Tester 10.1 The EIA RS-232C Serial Interface Protocol ...... .

xvii

177 177

10.2 Error Rate for Binary Signaling on the Gaussian Noise Channel 179 10.3 The Navtel Datatest 3 Bit Error Rate Tester. 181 10.4 Bit-Error Rate Test Experiment 181 10.5 Additional References. . . . . . . . . . . . . . 186

11 Digital Data Transmission by Pulse Amplitude Modulation 187 11.1 Description of a Baseband Pulse Amplitude Modulation System 187 11.2 Baseband Shaping and Intersymbol Interference 190

11.2.1 The Nyquist Criterion for No lSI . . . . . . . . . . . . . 190 11.2.2 Raised Cosine Baseband Shaping Filters . . . . . . . . . 191 11.2.3 Splitting the Shaping Between the Transmit and Receive Filters 192 11.2.4 Eye Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . 192

11.3 Implementing the Transmit Filter by an Interpolation Filter Bank 194 11.4 Symbol Error Probability with Additive Gaussian Noise. 194 11.5 Symbol Clock Recovery. . . . . . . . . . . . . . . . . . . . . . 196 11.6 Simulation and Theoretical Exercises for PAM . . . . . . . . . 198

11.6.1 Generating Four-Level Pseudo-Random PAM Symbols 198 11.6.2 Eye Diagram for a PAM Signal Using a Raised Cosine Shaping Filter 199 11.6.3 Eye Diagram for a PAM Signal Using a Square-Root of Raised Cosine

Shaping Filter . . . . . . . . . . . . . . . . . . . . 199 11.6.4 Theoretical Error Probability for a PAM System. 200

11.7 Hardware Exercises for PAM. . . . . . . . . . . . . . . . 200 11.7.1 Generating a PAM Signal and Eye Diagram . . . 200 11.7.2 Testing the Square-Law Symbol Clock Frequency Generator 201 11.7.3 Optional Team Exercise 202

11.8 Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . 203

12 Variable Phase Interpolation 205 12.1 Continuously Variable Phase Interpolation 205

12.1.1 Computing the Least-Squares Fits. 208 12.2 Quantized Variable Phase Interpolation. . 208 12.3 Closing the Tracking Loop . . . . . . . . . 209 12.4 Changing the Sampling Rate by a Rational Factor. 211 12.5 Experiments for Variable Phase Interpolation . 213

12.5.1 Open Loop Phase Shifting Experiments. 213 12.5.2 Making a Symbol Clock Tracking Loop 213

12.6 Additional References. . . . . . . . . . . . . . . 214

13 Fundamentals of Quadrature Amplitude Modulation 215 13.1 A Basic QAM Transmitter. . . . . . . 215 13.2 Two Constellation Examples. . . . . . . . . 218

13.2.1 The 4x4 16-Point Constellation . . . 218 13.2.2 A 4-Point Four Phase Constellation. 221

Page 15: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

xviii Contents

13.3 A Modulator Structure Using Passband Shaping Filters 221 13.4 Ideal QAM Demodulation . . . . . . . . . . . . 223 13.5 QAM Modulator Experiments . . . . . . . . . . 224

13.5.1 Steps to Follow in Making a Transmitter 225 13.5.2 Testing Your Transmitter ........ 226 13.5.3 Optional Exercise - Testing Your Transmitter by Sending to a Com-

mercial Modem 227 13.6 Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 230

14 QAM Receiver I - Clock Recovery and Other Front-End Subsystems 231 14.1 Overview of a QAM Receiver ............ 231 14.2 Details About the Receiver Front-End Subsystems. 233

14.2.1 Automatic Gain Control 233 14.2.2 The Carrier Detect Subsystem. . . . . 234 14.2.3 Symbol Clock Recovery ........ 234

14.3 Experiments for the QAM Receiver Front-End 241 14.4 Additional References. . . . .. ..... 242

15 QAM Receiver II - Equalizer and Carrier Recovery System 243 15.1 The Complex Cross-Coupled Passband Adaptive Equalizer . . . 243

15.1.1 The LMS Method for Adjusting the Equalizer Tap Values 244 15.1.2 Theoretical Behavior of the LMS Algorithm 249 15.1.3 Adding Tap Leakage to the LMS Algorithm 250

15.2 The Phase-Splitting Fractionally Spaced Equalizer. 251 15.3 Decision Directed Carrier Tracking . . . . . . . . . 253 15.4 Blind Equalization . . . . . . . . . . . . . . . . . . 255

15.4.1 Blind Equalization with the Complex Cross-Coupled Equalizer 256 15.4.2 Blind Equalization with the Phase-Splitting Equalizer . . . . . 257

15.5 Complex Cross-Coupled Equalizer and Carrier Tracking Experiments 258 15.5.1 Implementing the Slicer ..... . . . . . . . . . . . . 258 15.5.2 Making a Demodulator and Carrier Tracking Loop .. 260 15.5.3 Making a Complex Cross-Coupled Adaptive Equalizer. 261 15.5.4 Bit-Error Rate Test. . . . . . . . . . . . . . . . . . . . 261 15.5.5 Optional Experiment - Receiving the 16-Point V.22bis Constellation 261 15.5.6 Optional Experiment - Ideal Reference Training. . . 262

15.6 Optional Phase-Splitting Fractionally Spaced Equalizer Experiment 262 15.7 Optional Blind Equalization Experiment 263 15.8 Additional References. . . . . . . . . . . . . 264

16 Echo Cancellation for Full-Duplex Modems 265 16.1 The Echo Sources in a Dialed Telephone Line Circuit 265 16.2 The Data-Driven, Nyquist, In-Band Echo Canceler 267

16.2.1 General Description. . . . . . 267 16.2.2 The Near-End Echo Canceler 269 16.2.3 The Far-End Echo Canceler . 271

Page 16: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

Contents xix

16.2.4 Far-End Frequency Offset Compensation 272 16.3 Echo Canceler Experiments .......... 273

16.3.1 Making a Near-End Echo Canceler . . . 273 16.3.2 Making a Far-End Echo Canceler with Frequency Offset Correction 273

16.4 Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 274

17 Suggestions for Additional Experiments 17.1 Elementary Modem Handshake Sequence . . . . . . . . . . . 17.2 Make an ITU-T V.21 Frequency Shift Keyed (FSK) Modem 17.3 Fast Equalizer Training Using Periodic Sequences 17.4 Trellis Coded Modulation .......... . 17.5 V.34 Constellation Shaping by Shell Mapping .. 17.6 Nonlinear Precoding for V.34 ....... . 17.7 Multi-Tone Modulation for ADSL and Wireless Systems 17.8 Speech Codecs ....................... .

A Generating Gaussian Random Numbers

B A TTLjRS-232C Interface for McBSP1

C Equipment List for Each Station

References I. List of Manuals . II. Selected Reference Books and Papers . . . . . . . .

A. DSP Laboratory Books Using DSP Hardware. B. DSP Laboratory Books Using Software Simulation C. Books and Papers on Digital Signal Processing D. Books and Papers on Communications E. Books and Papers on Error Correcting Codes

III. Interesting Web Sites. . . . . .. .....

Index

275 275 275 276 277 277 278 278 278

279

281

283

285 285 286 286 286 287 288 291 292

293

Page 17: COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS978-1-4613-02… ·  · 2017-08-27Communication System Design Using DSP Algorithms: ... Communciation system design using DSP algorithms:

COMMUNICATION SYSTEM DESIGN USING

DSP ALGORITHMS WITH LABORATORY EXPERIMENTS

FOR THE TMS320C6701 AND TMS320C6711