communication system design using dsp algorithms - …978-1-4757-97… ·  ·...

15
Communication System Design Using DSP Algorithms With Laboratory Experiments for the TMS320C30

Upload: doanhuong

Post on 28-May-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

Communication System Design Using DSP Algorithms With Laboratory Experiments for the TMS320C30

Applications of Communications Theory Series Editor: R. W. Lucky, Bel/core

Editorial Board:

Anthony S. Acampora, Columbia University Larry Greenstein, AT&T Bell Laboratories Tingye Li, AT&T Bell Laboratories William H. Tranter, University of Missouri. Rolla

Recent volumes in the series:

BASIC CONCEPTS IN INFORMATION THEORY AND CODING: The Adventures of Secret Agent 00 III Solomon W. Golomb, Robert E. Peile, and Robert A. Scholtz

COMMUNICATION SYSTEM DESIGN USING DSP ALGORITHMS: With Laboratory Experiments for the TMS320C30 Steven A. Tretter

COMPUTER COMMUNICATIONS AND NETWORKS John R. Freer

COMPUTER NETWORK ARCHITECTURES AND PROTOCOLS Second Edition. Edited by Carl A. Sunshine

DATA COMMUNICATIONS PRINCIPLES Richard D. Gitlin, Jeremiah F. Hayes, and Stephen B. Weinstein

DATA TRANSPORTATION AND PROTECTION John E. Hershey and R. K. Rao Yarlagadda

DIGITAL PICTURES: Representation and Compression Arun N. Netravali and Barry G. Haskell

FUNDAMENTALS OF DIGITAL SWITCHING Second Edition. Edited by John C. McDonald

AN INTRODUCTION TO BROADBAND NETWORKS: LANs, MANs, ATM, B-ISDN, and Optical Networks for Integrated Multimedia Telecommunications Anthony S. Acampora

AN INTRODUCTION TO PHOTONIC SWITCHING FABRICS H. Scott Hinton

OPTICAL CHANNELS: Fibers, Clouds, Water, and the Atmosphere Sherman Karp, Robert M. Gagliardi, Steven E. Moran, and Larry B. Stotts

PRACTICAL COMPUTER DATA COMMUNICATIONS William J. Barksdale

SIMULATION OF COMMUNICATIONS SYSTEMS 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.

Communication System Design Using DSP Algorithms With Laboratory Experiments for the TMS320C30

Steven A. Tretter University of Maryland College Park, Maryland

SPRINGER SCIENCE+BUSINESS MEDIA, LLC

Library of Congress Cataloging-in-Publication Data

Tretter, Steven A. Communication system design using DSP algorithms.: with laboratory

experiments for the TMS320C30 I Steven A. Tretter. p. em. -- (Applications of communications theory)

Includes bibliographical references and index. ISBN 978-0-306-45032-7 ISBN 978-1-4757-9763-3 (eBook) DOI 10.1007/978-1-4757-9763-3 1. Signal processing--Digital techniques. 2. Digital

communications--Equipment and supplies--Design--Data processing. 3. Texas Instruments TMS320 series microprocessors. 4. Real-time data processing. I. Title. II. Series. TK5102.9.T74 1995 621.382·2·078--dc20 95-36860

CIP

If your diskette is defective in manufacture or has been damaged in transit, it will be replaced at no charge if returned within 30 days of receipt to Managing Editor, Springer Science+Business Media, LLC.

The publisher makes no warranty of any kind, expressed or implied, with regard to the software reproduced on the diskette or the accompanying documentation. The publisher shall not be liable in any event for incidental or consequential damages or loss in connection with, or arising out of. the furnishing, performance, or use of the software.

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

ISBN 978-0-306-45032-7

© 1995 Springer Science+Business Media New York Originally published by Plenum Press, New York in 1995

1098765432

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

To Terry, Anne, and in memory of David

Preface

This book began in January 1993 when I was "elected" by Dr. William Destler, who was then Chainnan of the Electrical Engineering Department and is now Dean of the College of Engineering, 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. Books with standard digital signal processing and filter design experiments existed, but no book focusing on analog and digital communications techniques was available. My enthusiasm for the project gradually grew until I became almost totally immersed in it.

Labs in the Electrical Engineering Department at the University of Maryland are separate courses. Occurring on a weekly basis, these labs include a I-hour lecture by a regular faculty member, who introduces the theory and explains the experiments, and a 3-hour laboratory period run by a graduate teaching assistant. Students can get keys for the Communications Lab room and work whenever they please. One section of the lab was frrst offered in the Fall 1993 semester and two in the Spring 1994 semester. The students were highly enthusiastic and often spent extra hours working on the experiments because they found them to be very interesting and challenging. They also had the feeling that this was something that would directly help them with their future jobs. In fact, several graduate students and one faculty member sat in on the lab to learn some real-world practical skills.

The goal of this book is to explore the digital signal processing and communication systems theoretical concepts presented in typical Senior elective courses on these subjects by implementing them on actual hardware in real time. In the process, students will gain experience using equipment commonly used in industry, including oscilloscopes, spectrum analyzers, signal generators, error rate test sets, digital signal processors, and analog-to-digital and digital­to-analog converters.

This book differs from any others on the market in that its primary focus is on communication systems. Fun­damental digital signal processing concepts like digital filters and FFTs are included because they are required in communication systems. Approaches that are particularly useful for DSP implementations are presented. While the experiments, particularly the earlier ones, are described for the TMS320C30 Evaluation Module, 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 packages like MATHCAD and MATLAB. In my view, one of the purposes of a laboratory course is to help prepare students for industrial jobs. Oflline 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-things that cannot 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 transfonn methods at a level that is often presented in a Junior required course on Signals and Systems, and a working know ledge of PCs and C programming. Students who have programmed in other languages, such as BASIC 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

vii

viii Preface

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 I-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 inital hurdle for the students to get over while learning the details required to use the lab's hardware and software tools. The experiments in Chapters 1 and 2 gradually introduce them to these tools and the architecture of the TMS320C30 floating-point DSP. The tools include the TMS320C30 Evaluation Module (EVM), C compilers for the PC and TMS320C30, and an assembler and linker for the TMS320C30. An attempt has been made to reduce this hurdle by including some basic programs on the program disk for initializing the EVM that can be used as a starting point for the experiments.

FIR and I1R filter design and implementation are explored in Chapter 3. Experiments comparing the relative merits of C and assembly language implementations are performed. Filters are required in most of the following experiments.

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

Chapters 5-8 explore the classical analog communication methods of amplitude 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-15 introduce some modem digital communication techniques. These experiments focus on methods used in high-speed wire-line data modems where DSPs have been used extensively. Topics covered include linear shift register scramblers, the RS232C interface, pulse amplitude modulation (PAM), and quadrature amplitude modulation (QAM). The experiments lead up to building almost a complete V.22bis transmitter and receiver. Symbol clock recovery, carrier tracking, and adaptive equalizer receiver functions are implemented. The echo cancelling technique used in V.32 modems is studied in Chapter IS. Enough details are included so that this set of experiments could form a good practical guide to engineers in industry interested in modem design. I learned many of these techniques while consulting since 1970 for companies that build high-speed wire-line modems, and have seen them employed in hundreds of thousands of modems.

Chapter 16 briefly presents some ideas for additional projects related to current high-speed wire-line modem design. These ideas can be expanded to satisy the capstone design project requirements of the ABET accrediting committee.

Appendix A discusses how to transfer data back and forth between the TMS320C30 Evaluation Module and Pc. The transfers are used in some of the experiments to display signals processed by the DSP. We wanted the students to concentrate on learning communication system concepts rather than getting bogged down with involved hardware details. Therefore, complete working programs for transferring data from the EVM to the PC are included on the program disk.

Appendix D 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.

A detailed listing of the directory structure on the PC hard disk is shown in Appendix E as a guide to others setting up a communications lab.

There are many more experiments in this book than can be performed in one semester. Based on two semesters of experience, an ambitious goal is to have all students complete Chapters 1-3 followed by a choice of any three additional 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.

Preface ix

Acknowledgments

I would like to thank Mark Kohler and Sonjai Gupta for helping to unpack equipment and install and debug hardware and software in the PCs 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 would also like to thank my friends from RIXON - which was in Silver Spring, Maryland, but has long since dissipated in a chain of corporate take-overs - and at Penril Datability Networks in Gaithersburg, Maryland, for helping me stay at the state-of-the-art in DSP applications to wire-line modems by using me as a consultant.

I also want to thank Texas Instruments for granting us permission to include on our program disk the C callable utility functions developed by Gerry Shoults and included with TI's TMS320C3x DSP Design Workshop. These functions provide a convenient interface to the various registers and peripherals in the TMS320C30. Any questions about these functions should be addressed to me, and not to TI.

And last but not least, I want to thank Dr. William Destler for "electing" me to this task.

College Park, Maryland Steven A. Tretter

Contents

1. Brief Overview of the Hardware and Software Tools .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1. Some DSP Chip History and Typical Applications ........................................... 1 1.2. Introduction to the TMS320C30 Floating-Point DSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2.1. The Central Processing Unit (CPU) ................................................. 5 1.2.2. Memory Organization ............................................................. 5 1.2.3. The Internal Bus ................................................................ 6 1.2.4. The External Buses and Interrupts .................................................. 6 1.2.5. Peripherals ..................................................................... 6 1.2.6. The Direct Memory Access (DMA) Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.7. Brief Description of the Instruction Set .............................................. 6

1.3. The TMS320C30 Evaluation Module ..................................................... 7 1.4. Software Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.4.1. Software Supplied by Texas Instruments ...... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.4.2. Digital Filter Design Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4.3. Other Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

1.5. Introductory Experiments ............................................................... 11

2. Learning to Use the Hardware and Software Tools by Generating a Sine Wave .................... 13

2.1. Some Basic Utility Files, Programs, and Environment Variables Required by the TMS320C30 Assembler, C S:ompiler, and Linker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.2. Method 1 for Generating a Sine Wave ............ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.3. Method 2 for Generating a Sine Wave--Using Interrupts ..................................... 24 2.4. Method 3-DMA from a Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 26

xi

xii Contents

3. Digital Filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3.1. Discrete-Time Convolution and Frequency Responses ....................................... 29 3.2. Finite Duration Impulse Response (FIR) Filters ............................................. 30

3.2.1. Block Diagram for Most Common Realization. .. ... ... ... .. . . .. . ... . ... . . . . . . . . .. . . .. 30 3.2.2. Two Methods for Finding the Filter Coefficients to Achieve a Desired Frequency Response. .. 30 3.2.3. Using Circular Buffers to Implement FIR Filters ...................................... 32 3.2.4. How to Make an Assembly Language Convolution Function that Is Called from and Returns

to C ........................................................................... 36 3.3. Infinite Duration Impulse Response (IIR) Filters ............................................ 40

3.3.1. Realizations for IIR Filters... .. .. . .. .. . .. ..... .. . .. ... . .. . ... . .. . . . . . . . . . . . . . . . . .. 40 3.3.2. A Program for Designing IIR Filters ................................................ 41 3.3.3. Two Methods for Measuring a Phase Response ....................................... 42

3.4. Hardware Details and Laboratory Experiments for FIR and IIR Digital Filters. . . . . . . . . . . . . . . . . . .. 44 3.4.1. Some Hardware and Software Details for the EVM .................................... 44 3.4.2. Measuring the Time to Execute a Program Segment by Using the Benchmarking Capability

ofEVM30...................................................................... 46 3.4.3. Laboratory Experiments for FIR Filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 47 3.4.4. Laboratory Experiments for IIR Filters .............................................. 49

3.5. Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 49

4. The FFT and Power Spectrum Estimation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

4.1. The Discrete-Time Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 51 4.2. Data Window Functions ................................................................ 51 4.3. The Discrete Fourier Transform and Its Inverse ............................................. 52 4.4. The Fast Fourier Transform ............................................................. 53 4.5. Using the FFT to Estimate a Power Spectrum. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 54 4.6. Laboratory Experiments ................................................................ 60

4.6.1. FFT Experiments ................................................................ 60 4.6.2. Experiments for Power Spectrum Estimation ......................................... 60

4.7. Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 63

5. Amplitude Modulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

5.1. Theoretical Description of Amplitude Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 65 5.1.1. Mathematical Formula for an AM Signal ............................................ 65 5.1.2. Example for Single Tone Modulation ............................................... 65 5.1.3. The Spectrum of an AM Signal .................................................... 66

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

5.3. Laboratory Experiments for AM Modulation and Demodulation ............................... 69 5.3.1. Making an AM Modulator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 69 5.3.2. Making a Square-Law Envelope Detector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 69 5.3.3. Making an Envelope Detector Using the Hilbert Transform ............................. 70

5.4. Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 71

Contents xiii

6. Double-Sideband Suppressed-Carrier Amplitude Modulation and Coherent Detection 73

6.1. Mathematical Description of the DSBSC-AM Signal ........................................ 73 6.2. The Ideal Coherent Receiver ............................................................ 73 6.3. The Costas Loop as a Practical Approach to Coherent Demodulation ........................... 74 6.4. Laboratory Exercises and Experiments for the Costas Loop ................................... 76

6.4.1. Theoretical Design Exercises ...................................................... 77 6.4.2. Hardware Experiments ........................................................... 78

6.5. Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 78

7. Single-Sideband Modulation and Frequency Translation ...•.••.•..•.....••....•.....•.•....••• 79

7.1. Single-Sideband Modulators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 79 7.2. Coherent Demodulation of SSB Signals ................................................... 80 7.3. Frequency Translation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 81 7.4. Laboratory Experiments ................................................................ 82

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

7.5. Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 83

8. Frequency Modulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

8.1. The FM Signal and Some ofIts Properties ................................................. 85 8.1.1. Definition ofInstantaneous Frequency and the FM Signal .............................. 85 8.1.2. Single Tone FM Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 8.1.3. Narrow Band FM Modulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 8.1.4. The Bandwidth of an FM Signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

8.2. FM Demodulation by a Frequency Discriminator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 8.3. Using a Phase-Locked Loop for FM Demodulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 8.4. Laboratory Experiments for Frequency Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 89

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

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

9. Pseudo-Random Binary Sequences and Data Scramblers. . • . . • . • . . • . . . . . . • . . . . • • . . . . . • • • • • . . . • . 91

9.1. Using Linear Feedback Shift Registers to Generate Pseudo-Random Binary Sequences ............ 91 9.1.1. The Linear Feedback Shift Register Sequence Generator ............................... 92 9.1.2. The Connection Polynomial and Sequence Period ..................................... 92 9.1.3. Properties of Maximal Length Sequences ............................................ 93

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

9.3. Theoretical and Simulation Exercises for Shift Register Sequence Generators and Scramblers. . . . . .. 94 9.3.1. Exercises for a Shift Register Sequence Generator with a Primitive Connection Polynomial . .. 95 9.3.2. Exercises for a Shift Register Sequence Generator with an Irreducible but not Primitive

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

9.4. Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

xiv Contents

10. Introduction to the RS-232C Protocol and a Bit-Error Rate Tester. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

10.1. The EIA RS-232C Serial Interface Protocol ............................................... 97 10.2. Bit-Error Probability for Binary Signaling on the Additive, White, Gaussian Noise Channel ....... 99 10.3. The Navtel Datatest 3 Bit-Error Rate Tester ............................................... 99 10.4. Bit-Error Rate Test Experiment ......................................................... 100 10.5. Additional References ................................................................. 102

11. Digital Data Transmission by Baseband Pulse Amplitude Modulation (PAM) • . . .. . . . . . . . . . . . . . . . .. 103

11.1. General Description of a Baseband Pulse Amplitude Modulation System ....................... 103 11.2. Baseband Shaping and Intersymbol Interference ........................................... 105

11.2.1. The Nyquist Criterion for No lSI ...... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 105 11.2.2. Raised Cosine Baseband Shaping Filters .......................................... 106 11.2.3. Splitting the Shaping between the Transmit and Receive Filters . . . . . . . . . . . . . . . . . . . . . . .. 106 11.2.4. Eye Diagrams ................................................................ 107

11.3. Implementing the Transmit Filter by an Interpolation Filter Bank ............................. 107 11.4. Symbol Error Probability for a Channel with a Perfect Frequency Response and Additive Gaussian

Noise .............................................................................. 108 11.5. Symbol Clock Recovery ............................................................... 109 11.6. Simulation and Theoretical Exercises for PAM ............................................ 110

11.6.1. Generating Four-Level Pseudo-Random PAM Symbols .............................. 110 11.6.2. Eye Diagram for a PAM Signal Using a Raised Cosine Shaping Filter .................. III 11.6.3. Eye Diagram for a PAM Signal Using a Square-Root of Raised Cosine Shaping Filter ..... III 11.6.4. Theoretical Error Probability for a PAM System .................................... III

11. 7. Hardware Exercises for PAM ........................................................... 111 1 1.7.1. Generating a PAM Signal and Eye Diagram .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 111 11.7.2. Testing the Square-Law Symbol Clock Frequency Generator. . . . . . . . . . . . . . . . . . . . . . . . .. 112 11.7.3. Optional Team Exercise ........................................................ 113

11.8. Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 113

12. Fundamentals of Quadrature Amplitude Modulation .......................................... 115

12.1. A Basic QAM Transmitter ............................................................. lIS 12.2. Two Constellation Examples ........................................................... 116

12.2.1. The 4 x 4 16-Point Constellation ................................................. II 6 12.2.2. A4-Point Four-Phase Constellation ............................................... 1I9

12.3. A Modulator Structure Using Passband Shaping Filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 1I9 12.4. Ideal QAM Demodulation ............................................................. 120 12.5. QAM Modulator Experiments .......................................................... 120

12.5.1. Steps to Follow in Making a Transmitter .......................................... 121 12.5.2. Testing Your Transmitter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 123 12.5.3. Optional Exercise--Testing Your Transmitter by Sending to a Commercial Modem ....... 123

12.6. Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 125

13. QAM Receiver I. General Description of Complete Receiver Block Diagram and Details of the Symbol Clock Recovery and Other Front-End Subsytems ...................................... 127

13.1. Overview ofa QAM Receiver .......................................................... 127 13.2. Details about the Receiver Front-End Subsystems .......................................... 129

Contents xv

13.2.1. Automatic Gain Control ...................................... , ................. 129 13.2.2. The Carrier Detect Subsystem ................................................... 129 13.2.3. Symbol Clock Recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 129

13.3. Experiments for the QAM Receiver Front-End. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 134 13.4. Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 135

14. QAM Receiver II. The Passband Adaptive Equalizer and Carrier Recovery System... . . . . .• . . . .• .• 137

14.1. The Complex Cross-Coupled Passband Adaptive Equalizer .................................. 137 14.1.1. The LMS Method for Adjusting the Equalizer Tap Values . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 138 14.1.2. Theoretical Behavior of the LMS Algorithm ....................................... 140 14.1.3. Adding Tap Leakage to the LMS Algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 142

14.2. The Phase-Splitting Fractionally Spaced Equalizer ......................................... 142 14.3. Decision Directed Carrier Tracking ...................................................... 144 14.4. Blind Equalization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 146

14.4.1. Blind Equalization with the Complex Cross-Coupled Equalizer . . . . . . . . . . . . . . . . . . . . . . .. 146 14.4.2. Blind Equalization with the Phase-Splitting Equalizer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 147

14.5. Complex Cross-Coupled Equalizer and Carrier Tracking Loop Experiments .................... 147 14.5.1. Implementing the Slicer ........................................................ 148 14.5.2. Making a Demodulator and Carrier Tracking Loop .................................. 148 14.5.3. Making a Complex Cross-Coupled Adaptive Equalizer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 149 14.5.4. Bit-Error Rate Test ............................................................ 149 14.5.5. Optional Experiment-Receiving the 16-Point V.22bis Constellation ................... ISO 14.5.6. Optional Experiment-Ideal Reference Training. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 150

14.6. Optional Experiment-Phase-Splitting Fractionally Spaced Equalizer ......................... 150 14.7. Optional Experiment-Blind Equalization ................................................ 151 14.8. Additional References ............ " ................................................... 151

15. Echo Cancellation for Full-Duplex Modems .........•........................................ 153

15.1. The Echo Sources in a Dialed Telephone Line Circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 153 15.2. The Data-Driven, Nyquist, In-Band Echo Canceller ........................................ 154

15.2.1. General Description ........................................................... 154 15.2.2. The Near-End Echo Canceller ................................................... 155 15.2.3. The Far-End Echo Canceller .................................................... 157 15.2.4. Far-End Frequency Offset Compensation .......................................... 158

15.3. Echo Canceller Experiments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 158 15.3.1. Making a Near-End Echo Canceller .............................................. 158 15.3.2. Making a Far-End Echo Canceller with Frequency Offset Correction ................... 159

15.4. Additional References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 159

16. Suggestions for Additional Experiments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 161

16.1. Elementary Modem Handshake Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 161 16.2. Fast Equalizer Training Using Periodic Sequences ........................................ " 161 16.3. Trellis Coded Modulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 161 16.4. V.34 Constellation Shaping by Shell Mapping ............................................. 162 16.5. Nonlinear Precoding for V.34 ........................................................... 162

xvi Contents

Appendix A. Communicating between the PC and EVM 163

AI. Overview of the PC/EVM Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 163 AI.I. The Data Transfer Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 163 A.I.2. EVM Interrupts to the TMS320C30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 165 A.1.3. Flags that Indicate to the PC when the TMS320C30 has Read or Written the Transfer

Register ..................................................................... 165 Al.4. Resetting the EVM ............................................................ 166

A2. A Command Passing Protocol .......................................................... 166 A.3. Using DMA for Data Transfers .......................................................... 167

A.3.1. TMS320C30 to PC Data Transfers ................................................ 167 A.3.2. PC to TMS320C30 Data Transfers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 168 A3.3. Turning off the DMA .......................................................... 168

A4. Laboratory Experiments on Transferring Data between the TMS320C30 and PC ................. 168 A.4.l. Functions the TMS320C30 Program Must Perform ............................... . .. 168 A4.2. Functions the PC Program Must Perform .......................................... 171 A.4.3. Testing Your PC and TMS320C30 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 173

Appendix B. Generating Gaussian Random Numbers ............................................. 175

Appendix C. A TTL/RS-232C Interface for Serial Port 1 ........................................... 177

Appendix D. Equipment List for Each Station .................................................... 179

Appendix E. Software and Directory Structure ................................................... 181

References ................................................................................... 183

I. List of Manuals ....................................................................... 183 A Manuals for the TMS320C30 Tools ................................................. 183 B. Manuals for Borland C++ ......................................................... 183 C. Assorted Manuals for Lab Test Equipment ........................................... 184

II. Selected Reference Books and Papers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 184 A DSP Laboratory Books Using DSP Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ] 84 B. DSP Laboratory Books Using Software Simulation .................................... 184 C. Books on Digital Signal Processing ................................................. 184 D. Books and Papers on Communications .............................................. 184 E. Books and Papers on Error-Correcting Codes .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 186

Index ....................................................................................... 187

Communication System Design Using DSP Algorithms With Laboratory Experiments for the TMS320C30