This page intentionally left blank. - BGU bogomole/Books/Labview/LabVIEW Digital...¢  LabVIEW Digital

  • View

  • Download

Embed Size (px)

Text of This page intentionally left blank. - BGU bogomole/Books/Labview/LabVIEW Digital...¢ ...

  • LabVIEW Digital Signal


  • This page intentionally left blank.

  • LabVIEW Digital Signal

    Processing and Digital Communications

    Cory L. Clark Motorola

    McGraw-Hill New York Chicago San Francisco Lisbon London Madrid

    Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto

  • Copyright © 2005 by The McGraw-Hill Companies, Inc. All rights reserved. Manufactured in the United States of America. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. 0-07-146966-4 The material in this eBook also appears in the print version of this title: 0-07-144492-0. All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. For more information, please contact George Hoare, Special Sales, at or (212) 904-4069. TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise. DOI: 10.1036/0071469664

  • ������������

    Want to learn more? We hope you enjoy this McGraw-Hill eBook! If

    you’d like more information about this book, its author, or related books and websites, please click here.

  • To Z, who always shows me what’s important; to my parents, who started me out right; and to my sister Holly, who taught me to read

  • This page intentionally left blank.

  • vii


    Preface xi

    Part 1. Getting Started

    Chapter 1. Digital Communications and LabVIEW 3

    1.1 Conventional Digital Receiver 5 1.2 Subsampling Receiver 6

    Summary 11 References 12

    Chapter 2. Getting a Signal into LabVIEW 13

    2.1 Conventional Digital Receiver 13 2.2 Subsampling Digital Receiver 19

    2.2.1 Choosing a sample rate 21 2.2.2 Subsampling SNR 23 2.2.3 Subsampling signal placement 29

    2.3 Other Sampling Methods 30 2.3.1 Digital oscilloscope 30 2.3.2 RF spectrum analyzer 31 2.3.3 Analog sampling card 31 2.3.4 Soundcard 35 Summary 35 References 36

    Part 2. Building Blocks

    Chapter 3. Spectral Analysis 39

    3.1 Low-Level Frequency Domain Functions 39 3.1.1 Simple FFT 41 3.1.2 Improved FFT 43

    3.2 Analyzing the DFT Results 44 3.2.1 Spectral leakage 46 3.2.2 Sampling window shape 46

    3.3 High-Level Spectral Functions 50

    For more information about this title, click here

  • 3.4 Adding C Routines to LabVIEW 53 3.5 Spectral Measurements Toolset 56

    Summary 59 References 59

    Chapter 4. Digital Filters 61

    4.1 Filter Types 61 4.2 FIR Filters 63

    4.2.1 FIR filter design by windowing 63 4.2.2 Equiripple FIR filters 69

    4.3 IIR Filters 73 4.4 Comparing IIR and FIR Filters 74

    4.4.1 IIR versus FIR magnitude 76 4.4.2 Effects of filter-phase response 76

    4.5 Pulse-Shaping Filter 78 Summary 82 References 82

    Chapter 5. Multirate Signal Processing in LabVIEW 83

    5.1 Upsampling 83 5.2 Downsampling 85 5.3 Resampling Filters 85

    5.3.1 Halfband filters 88 5.3.2 Polyphase filters 90 Summary 93 References 93

    Chapter 6. Generating Signals with LabVIEW 95

    6.1 Basic Functions 95 6.2 Sinusoids 97

    6.2.1 Complex mixer 98 6.2.2 Sinc function 101 6.2.3 Chirp sequence 103

    6.3 Generating Channel Models 103 6.3.1 Rayleigh fading 103 6.3.2 White gaussian noise 107

    6.4 Generating Symbols 107 Summary 112 References 112

    Part 3. Building a Communication System

    Chapter 7. Assembling the Pieces 115

    7.1 Modulator 115 7.2 Demodulator 118 7.3 Channel Impairments 122 7.4 Signal Detection and Recovery 127

    7.4.1 Matched filter detection 129 7.4.2 Threshold decisions 129

    viii Contents

  • 7.5 Synchronization 133 7.5.1 Time synchronization 133 7.5.2 Frequency synchronization 133

    7.6 NI Modulation Toolset 134 Summary 137 References 137

    Chapter 8. System Performance 139

    8.1 Performance Measurements 139 8.1.1 Bit-error rate 139 8.1.2 Error vector magnitude 142

    8.2 Improving System Performance 142 8.2.1 Channel estimation 145 8.2.2 Channel coding 145 8.2.3 Viterbi decoder 151 Summary 154 References 154

    Chapter 9. Optimizing LabVIEW Signal Processing 155

    9.1 General LabVIEW Coding Guidelines 155 9.2 Signal Processing Tips 157

    9.2.1 Linear convolution with the FFT 157 9.2.2 Fast real FFT 159

    9.3 More LabVIEW DSP Applications 159 9.3.1 Roots of difference equations 159 9.3.2 Linear predictive speech coder 163 Summary 167 References 167

    Appendix A. VI Reference 169

    Appendix B. Hardware Resources 201

    Index 203

    Contents ix

  • This page intentionally left blank.

  • Preface

    About This Book

    This is not a book about how to use LabVIEW or even a book on learning digital signal processing (DSP). Instead it is more of a practical guide on how to enable LabVIEW to tackle some real-world DSP and communication problems. This book assumes that the reader has a good grasp of many of the complex issues encountered in DSP and digital communications and also is at least skilled enough in LabVIEW to build a VI. When necessary, the book will dive into the heart of signal processing topics and their implications will be explored. Certain topics will be explained in enough detail so that the reader will know there is no hand waving or mystery involved. This material is meant to bridge the gap between obtaining theoretical knowledge and actually exercising that knowl- edge. LabVIEW provides us with an excellent set of tools for examining all sorts of DSP and digital communication topics. Its graphical nature allows us to quickly and efficiently get to the core of a communication problem without all the overhead that generally accompanies a digital communication system. This book will start out at the beginning of the DSP realm—sampling a signal. The intermediate chapters will cover some basic building blocks and the final chapters will put it all together as a digital communication system.

    A lot of signal processing books start out describing what a discrete time sequence is, the advantages of DSP over analog methods, and the like. This book skips all that and assumes that you already know enough about DSP to get started and you probably have some very good references regarding where to go when you do not understand something. Instead this book focuses on putting that DSP knowledge to work using LabVIEW. Also, at the end of each chapter is a list of references for the specific topics covered in that chapter. Of course the reader is encouraged to look at those references for any concept that is not quite clear. If your DSP is a little rusty, or if you are new to the topic, a good starting place would be to read Understanding Digital Signal Processing by Rick Lyons before moving