SIGNALS AND COMMUNICATION TECHNOLOGY
For further volumes: http://www.springer.com/series/4748 Dayan Adionel Guimaraes˜
Digital Transmission
A Simulation-Aided Introduction with VisSim/Comm
123 Prof. Dayan Adionel Guimaraes˜ Instituto Nacional de Telecomunicac¸oes˜ (Inatel) Santa Rita do Sapuca´ı-MG Brazil [email protected]
ISBN 978-3-642-01358-4 e-ISBN 978-3-642-01359-1 DOI 10.1007/978-3-642-01359-1 Springer Heidelberg Dordrecht London New York
Library of Congress Control Number: 2009940806
c Springer-Verlag Berlin Heidelberg 2009 This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilm or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable to prosecution under the German Copyright Law. The use of general descriptive names, registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
Cover design: WMXDesign GmbH, Heidelberg
Printed on acid-free paper
Springer is part of Springer Science+Business Media (www.springer.com) To my son, Yan Guimaraes˜ Preface
Here it is standing: atoms with consciousness; matter with curiosity. Stands at the sea, wondering: I...a universe of atoms, an atom in the universe. Richard Feynman
While teaching classes on digital transmission and mobile communications for undergraduate and graduate students, I was wondering if it would be possible to write a book capable of giving them some insight about the practical meaning of the concepts, beyond the mathematics; the same insight that experience and repetitive contact with the subject are capable to construct; the insight that is capable of build- ing the bridge between the theory and how the theory manifests itself in practice. I remember those days when I was a graduate student at State University of Campinas (Unicamp), SP, Brazil, and those lectures given with competence by my professors. At that time, for me and for most of the students, some topics were nebulous, except by the fact that a few times we were able to follow the mathemat- ics. Something that could translate mathematics into waveforms, block diagrams, circuits and the like was missing from the student’s point of view. Later, in 1999 I took contact with one of the first versions of VisSim/Comm, a communication’s systems simulation software jointly developed by Visual Solu- tions, Inc. (http://www.vissol.com/) and Eritek, Inc. (http://www.eritek.com/). I started using VisSim/Comm just to help me better understand the subjects I was studying while preparing my lecture materials. Soon I realized that the software could be used in a similar way to help students to understand the concepts that I was teaching them. Then I began to use VisSim/Comm as a teaching tool, show- ing previously prepared simulations to the students just after the mathematical or conceptual explanation about some topic. The students gave me very positive feedback about the idea, but insisted to claim that, unconditionally, “theory is different from practice” in what concerns communi- cation systems. As a reply I always told them that this is an unfair judgment. Theory would produce, and sometimes actually produces the same results as actual sys- tems, as long as the mathematical model of the system under analysis is able to take into account all or most of the relevant system variables. Theory is different from
vii viii Preface practice in cases where it is impossible or mathematically intractable to consider all important system variables. We must live with this difference. Otherwise, we would have nothing to do. Eventually I felt that we have reached to a balance... This book is the result of such experience. Discussing with my students and preparing class notes and simulations throughout these years have given to me the opportunity to resolve my past wonderings. This is not a conventional textbook on Digital Transmission, nor a book on Sim- ulation of Communications Systems. The literature is rich, and it is not difficult to find excellent books about these areas. Furthermore, it would be an act of arrogance to aim at preparing a book to “compete” with those from where I have learned what would be presented in such book. This book addresses basic concepts on digital transmission, mainly pertaining to the physical layer of a digital communication system. However, these basic concepts are also intended to allow the reader to understand more advanced topics and the associated technology. Each topic is addressed in two different and complemen- tary ways: theoretically and by simulation. The theoretical approach encompasses common subjects covering principles of digital transmission, like notions of proba- bility and stochastic processes, signals and systems, baseband and passband signal- ing, signal-space representation, spread spectrum, multi-carrier and ultra wideband transmissions, carrier and symbol-timing recovery, information theory and error- correcting codes. The simulation approach also covers these subjects, but with focus on the capabilities of VisSim/Comm to help the reader fulfill the gap between the theory and its practical meaning. The presentation of the theory is made easier with the help of 357 illustrations. A total of 101 simulation files support the simulation- oriented approach. Although the computer experiments can be considered themselves as exercises to test the reader’s knowledge, some additional problems are proposed inside the simulation work plans and a few more are proposed at the end of each chapter. Most of the proposed problems are simulation-oriented in the sense that the reader is guided to create specific simulations for exploring the practical meaning of concepts not explicitly covered before, for complementing those already covered, or simply for revisiting a given concept with a different perspective. A significant part of the remaining problems deals with the study of specific topics, aiming at complement- ing some theory. All simulation files used throughout the book are supplied in the accompanying CD and run with an evaluation version of VisSim/Comm, which is also available in the CD. This evaluation version allows for users to run all examples included in the CD and construct new diagrams, but not save their work. Nevertheless, if the reader is able to afford a full version of VisSim/Comm, he can benefit from the opportunity of enhancing his knowledge through a deeper interaction with the supplied files, adding the possibility of saving changes and new diagrams. It is not expected that the reader has previous knowledge about VisSim/Comm, neither about simulation of communication systems. However, a previous contact with the VisSim/Comm documentation may help the reader to achieve an easier and faster interaction with the simulation files and, as a consequence, to speed-up Preface ix his learning process. The only previous knowledge that is needed to follow this book refers to notions of communication systems and a solid background in what concerns the mathematics covered in typical Electrical Engineering courses. Both theoretical and simulation parts of the book can be followed independently, though some simulation results will require comparisons with theoretical ones. It is left to the reader’s discretion to go through the entire book sequence or to skip the simulation and go only through the theory and vice-versa. However, for a more complete treatment of each topic, it is recommended that both are followed in the original sequence. The depth and scope of the book is adequate mainly for undergraduate level, though first-level graduate students can also benefit from the simulation approach adopted. The book can be used as a textbook for a two-semester undergraduate course or for a one-semester graduate and introductory course on digital commu- nications. An important consequence of the simulation appeal is that the computer experiments can be explored as laboratory activities, expanding the course possibil- ities. Furthermore, the book can be used as a reference for VisSim/Comm users. In what concern the bibliographical references, I have adopted the approach of providing a huge number of references throughout the text, not only to acknowledge those who have contributed to the field, but also to give the reader the opportunity of complementing his studies or finding details not presented here. Finally, one might be worried about the caducity of the accompanying software version and of the book itself. However, since we are dealing with fundamentals and well-established concepts, and since upgrades of VisSim/Comm will always be backward-compatible, this work promises to be a life-long textbook that will help the readers to improve their knowledge on digital transmission for a long time. At least, this is what I expect. Contents
1 A Review of Probability and Stochastic Processes ...... 1 1.1 Set Theory Basics ...... 1 1.1.1 TheVennDiagramandBasicSetOperations...... 2 1.1.2 Other Set Operations and Properties ...... 3 1.2 Definitions and Axioms of Probability ...... 3 1.3 Counting Methods for Determining Probabilities ...... 5 1.3.1 DistinctOrderedk-Tuples...... 5 1.3.2 Sampling with Replacement and with Ordering ...... 6 1.3.3 Sampling Without Replacement and with Ordering ...... 6 1.3.4 PermutationofDistinctObjects...... 6 1.3.5 Sampling Without Replacement and Without Ordering . . . . . 6 1.3.6 Sampling with Replacement and Without Ordering ...... 7 1.4 Conditional Probability and Bayes Rule ...... 7 Simulation 1.1 – Conditional Probability ...... 9 1.5 Random Variables ...... 10 1.5.1 The Cumulative Distribution Function ...... 10 1.5.2 Types of Random Variables ...... 12 1.6 Conditional Probability Densities and Mass Functions ...... 16 1.6.1 The Bayes Rule Revisited ...... 16 1.6.2 The Total Probability Theorem Revisited ...... 17 1.7 Statistical Averages of Random Variables ...... 17 1.7.1 Mean of Random Variables ...... 17 1.7.2 Moments of Random Variables ...... 19 1.7.3 Joint Moments of Random Variables ...... 20 1.7.4 The Characteristic and the Moment-Generating Functions . . 21 1.7.5 Conditional Expected Value ...... 23 1.8 Some Discrete Random Variables ...... 23 1.8.1 Bernoulli Random Variable ...... 23 1.8.2 Binomial Random Variable ...... 24 1.8.3 Geometric Random Variable ...... 24 1.8.4 Poisson Random Variable ...... 25 Simulation 1.2 – Discrete Random Variables ...... 26
xi xii Contents
1.9 Some Continuous Random Variables ...... 27 1.9.1 Uniform Random Variable ...... 27 1.9.2 Exponential Random Variable ...... 28 1.9.3 Gaussian Random Variable ...... 29 1.9.4 Rayleigh Random Variable ...... 31 Simulation 1.3 – Continuous Random Variables ...... 32 1.9.5 Multivariate Gaussian Random Variables ...... 34 1.10 Sum of Random Variables and the Central Limit Theorem...... 35 1.10.1 Mean and Variance for the Sum of Random Variables ...... 35 1.10.2 Moments of the Sum of Random Variables ...... 36 1.10.3 PDF of the Sum of Random Variables ...... 36 1.10.4 The Central Limit Theorem ...... 37 1.11 Transformations of Random Variables ...... 38 Simulation1.4–ACommunicationSystemAnalysis ...... 46 1.12 ParameterEstimationviaSampleMean...... 47 1.12.1TheSampleMean...... 48 1.12.2 The Confidence Interval on the Sample Mean ...... 50 Simulation 1.5 – Confidence Interval on BER Estimations ...... 53 1.12.3TheLawofLargeNumbers...... 54 1.13 Generation of Random Numbers ...... 55 1.13.1 Congruential Methods ...... 56 1.13.2InverseCDFMethod...... 56 1.13.3 Acceptance/Rejection Methods ...... 57 1.13.4Box-MullerMethod...... 58 Simulation 1.6 – Random Numbers Generation...... 58 1.14 Random Processes ...... 60 Simulation 1.7 – The Concept of Random Process ...... 62 1.14.1 Stationarity Classes for Random Processes ...... 63 1.14.2 Averages of Stationary Random Processes ...... 64 Simulation 1.8 – Estimating Averages of Random Processes ...... 71 1.14.3 Random Processes Through Linear Systems ...... 73 1.14.4 The Gaussian Random Process ...... 76 Simulation 1.9 – Filtered Complex Gaussian Process ...... 77 1.14.5 Thermal Noise Process...... 79 1.15 Summary and Further Reading...... 82 1.16 Additional Problems ...... 83 References ...... 85
2 Signals and Systems ...... 87 2.1 Signals ...... 87 2.1.1 Classification of Signals ...... 87 2.1.2 Typical Deterministic Signals ...... 90 2.2 Fourier Analysis of Signals...... 94 2.2.1 FourierSeries...... 94 Contents xiii
Simulation 2.1 – Gibbs Phenomenon ...... 97 2.2.2 Continuous-Time Fourier Transform ...... 100 2.2.3 Discrete-TimeFourierTransform...... 106 2.2.4 DiscreteFourierTransform...... 108 Simulation2.2–TheFFTviaVisSim/Comm...... 111 2.2.5 LaplaceandZ-Transforms...... 113 2.3 Sampling of Deterministic and Random Signals ...... 115 2.3.1 Ideal Sampling of Deterministic Signals ...... 115 2.3.2 Ideal Sampling of Stochastic Processes ...... 117 2.3.3 PracticalSampling...... 117 Simulation2.3–Sampling...... 120 2.3.4 Analog-to-DigitalConversion...... 122 Simulation2.4–UniformandNon-uniformQuantization...... 127 2.4 Linear Systems ...... 130 2.4.1 Time-Domain Characterization of Linear Systems ...... 130 2.4.2 Frequency-Domain Characterization of Linear Systems . . . . 132 2.4.3 Classifications and Properties of Linear Systems ...... 135 2.4.4 Mapping a Discrete-Time into a Continuous-Time Frequency139 Simulation 2.5 – Moving Average Filter ...... 142 2.5 Complex Representation of Signals and Systems...... 146 Simulation2.6–RealVersusComplexSimulation...... 148 2.6 The Power Spectral Density Revisited ...... 150 2.6.1 The PSD of Passband Signals ...... 150 Simulation 2.7 – Estimating the PSD of Passband Signals ...... 153 2.6.2 Estimation of the PSD via the Periodogram ...... 155 Simulation 2.8 – Periodogram Estimation of the PSD ...... 156 2.6.3 The PSD of Baseband Digital Communication Signals . . . . . 159 2.7 The Bandwidth of Communication Signals ...... 162 2.7.1 Absolute Bandwidth ...... 162 2.7.2 −3 dB (or Half Power) Bandwidth ...... 163 2.7.3 Equivalent Noise Bandwidth ...... 163 2.7.4 Root Mean Square (rms) Bandwidth ...... 163 2.7.5 Null-to-Null or Main Lobe Bandwidth ...... 164 2.7.6 Spectral Mask ...... 165 2.8 Summary and Further Reading...... 166 2.9 Additional Problems ...... 166 References ...... 168
3 Communication Channels ...... 171 3.1 Definitions...... 171 3.1.1 Communication Channel ...... 171 3.1.2 Channel Modeling ...... 174 3.1.3 Channel Sounding ...... 174 3.1.4 Empirical, Deterministic and Stochastic Channel Models . . . 175 xiv Contents
3.2 AWGN Channel Model ...... 175 3.2.1 Vector AWGN Channel ...... 176 Simulation 3.1 – Waveform and Vector Channel Simulation ...... 178 3.3 Discrete Memoryless Channels ...... 180 3.3.1 The Binary Symmetric Channel Revisited ...... 181 Simulation 3.2 – Waveform and BSC Channel Simulation ...... 181 3.4 Discrete Channels with Memory ...... 183 3.5 Wireline Channels ...... 184 3.5.1 TwistedPair...... 184 3.5.2 Coaxial Cable ...... 187 3.5.3 Waveguide...... 189 3.5.4 OpticalFiber...... 190 3.5.5 Low-VoltagePower-Line...... 194 3.6 Wireless Channels ...... 199 3.6.1 Mobile Outdoor Channel ...... 199 Simulation 3.3 – Large-Scale and Small-Scale Propagation ...... 208 Simulation 3.4 – Mobile Channel Simulator ...... 217 Simulation 3.5 – Exploring the Coherence Bandwidth ...... 226 Simulation 3.6 – Exploring the Coherence Time ...... 227 Simulation 3.7 – Flat and Frequency Selective Channel ...... 229 Simulation 3.8 – A Modulated Signal Under Selective Fading . . . . . 231 3.6.2 Mobile Indoor Channel ...... 232 Simulation 3.9 – Saleh-Valenzuela Indoor Channel Model ...... 237 3.6.3 Terrestrial Microwave Channel ...... 239 Simulation 3.10 – Rummler Terrestrial Microwave Channel Model . 247 3.6.4 Spatial Wireless Channel Models ...... 250 3.6.5 Other Wireless Channels ...... 252 3.7 Summary and Further Reading...... 256 3.8 Additional Problems ...... 258 References ...... 260
4 Baseband Digital Transmission ...... 265 4.1 Definitions and Typical Baseband Signals ...... 265 4.1.1 Line Codes ...... 266 Simulation 4.1 – Line Codes ...... 272 4.1.2 M-aryPAMSignaling...... 273 Simulation4.2–M-aryPAMSignaling...... 276 4.2 Detection of Baseband Pulses in Noise ...... 278 4.2.1 ModelingandMotivation ...... 278 Simulation 4.3 – Motivation for Baseband Detection Analysis . . . . . 279 4.2.2 The Matched Filter ...... 284 Simulation 4.4 – Pulse Signal-to-Noise Ratio Measurement ...... 286 4.2.3 Equivalence Between the Matched Filter and the Correlator 289 Simulation 4.5 – Equivalence Matched Filter × Correlator...... 292 Contents xv
4.2.4 Error Probability Analysis ...... 294 Simulation 4.6 – Equivalence Matched Filter × Correlator Revisited 302 4.2.5 MAP and ML Decision Rules for Binary Transmission . . . . . 304 4.3 Intersymbol Interference (ISI) ...... 307 4.3.1 Distortion-Free Channel and ISI Channel ...... 307 Simulation 4.7 – Distortion-Free Channel ...... 310 4.3.2 Nyquist Criterion for ISI-Free Transmission ...... 312 Simulation4.8–VestigialSymmetry...... 315 4.3.3 The Raised Cosine Spectrum...... 317 4.3.4 The Root-Raised Cosine Spectrum ...... 319 Simulation 4.9 – Nyquist Pulses ...... 320 4.3.5 TheEyeDiagramandtheBathtubDiagram...... 323 Simulation 4.10 – Eye Diagram for M-PAMSignaling...... 325 Simulation4.11–BathtubDiagramforBinarySignaling...... 331 4.4 CorrelativeCoding...... 333 Simulation 4.12 – Polybinary and Polybipolar Signal Generation . . . 334 4.4.1 Duobinary and Modified Duobinary Signaling ...... 335 4.4.2 Generalized Partial Response Signaling ...... 340 Simulation 4.13 – Duobinary Signaling Using a Matched Filter . . . . 341 4.5 Notions of Channel Equalization ...... 343 4.5.1 ZeroForcing(ZF)Equalization ...... 344 Simulation4.14–ZFEqualization...... 347 4.5.2 Least Mean Square (LMS) Equalization ...... 349 Simulation4.15–LMSEqualization...... 354 4.6 Summary and Further Reading...... 355 4.7 Additional Problems ...... 356 References ...... 357
5 Signal-Space Analysis ...... 361 5.1 Introduction ...... 361 5.2 Geometric Representation of Signals ...... 363 5.3 Dimensionality of a Signal and of a Signal-Space ...... 366 5.4 Gram-Schmidt Orthogonalization ...... 367 5.5 Signal Constellation with Symbol Transitions ...... 370 5.6 StatisticsoftheCorrelator’sOutputs...... 371 Simulation 5.1 – Signal Space Analysis ...... 376 5.7 The Vector AWGN Channel Revisited ...... 378 Simulation 5.2 – The Vector AWGN Channel Revisited ...... 379 5.8 Generalized Maximum Likelihood Receiver ...... 381 Simulation 5.3 – Generalized ML Receiver ...... 385 5.9 Error Probability Analysis ...... 387 5.9.1 Rotation and Translation Invariance of the Error Probability 387 5.9.2 MinimumEnergyConstellation...... 388 Simulation5.4–ConstellationRotationandTranslation...... 389 xvi Contents
5.9.3 The Union Bound for Symbol Error Probability Estimation . 391 Simulation 5.5 – Verifying the Validity of the Union Bound ...... 394 5.9.4 Symbol Versus Bit Error Probability ...... 396 Simulation5.6–SymbolErrorRateversusBitErrorRate ...... 401 5.10 Symbol-by-Symbol ML Receiver for Channels with ISI...... 402 5.11 Summary and Further Reading...... 405 5.12 Additional Problems ...... 406 References ...... 409
6 Passband Digital Transmission ...... 411 6.1 Definitions and Basic Digital Modulation Schemes ...... 411 6.1.1 Basic Digital Modulations ...... 412 6.1.2 Coherent and Non-coherent Detection ...... 413 6.1.3 Spectral Efficiency and Power Efficiency ...... 413 6.1.4 A Note on a Frequently Used Notation ...... 414 6.2 M-PSK Modulations with Coherent Detection ...... 415 6.2.1 Binary PSK Modulation ...... 415 Simulation 6.1 – BPSK Generation and Coherent Detection ...... 420 6.2.2 M-ary PSK Modulation ...... 422 Simulation 6.2 – M-PSK Generation and Coherent Detection ...... 432 6.3 M-QAM Modulations with Coherent Detection ...... 434 6.3.1 M-QAM Modulated Signal ...... 434 6.3.2 M-QAM Base-Functions ...... 435 6.3.3 Square M-QAM Modulations ...... 435 6.3.4 Non-square M-QAM Modulations ...... 437 6.3.5 M-QAM Generation and Coherent Detection ...... 439 Simulation 6.3 – I&Q Generation of a 32-QAM and a 64-QAM . . . . 441 6.3.6 M-QAM Symbol and Bit Error Probability over the AWGN Channel...... 442 6.3.7 Power Spectral Density of an M-QAM Modulated Signal . . 446 6.3.8 Spectral Efficiency of an M-QAM Modulated Signal ...... 447 Simulation 6.4 – M-QAM Generation and Coherent Detection . . . . . 447 6.3.9 Comparing M-PSK and M-QAM Modulations ...... 449 6.4 M-FSK Modulations with Coherent Detection ...... 450 6.4.1 Tone Separation and Carrier Frequency for Orthogonality . . 450 6.4.2 Binary FSK Modulation ...... 451 Simulation 6.5 – Analysis of Tones Used by an FSK Modulation . . . 456 Simulation 6.6 – BFSK Modulation Methods ...... 461 6.4.3 M-ary FSK Modulation ...... 464 Simulation 6.7 – M-FSK Generation and Coherent Detection ...... 471 6.5 MSK Modulation with Coherent Detection ...... 475 6.5.1 MSK Signal Generation and Detection ...... 476 Simulation 6.8 – BFSK and FFSK Generation via VCO ...... 479 Contents xvii
Simulation 6.9 – MSK Generation via Complex Representation . . . . 483 Simulation 6.10 – MSK Generation via OQPSK Approach ...... 486 Simulation 6.11 – MSK Modem via OQPSK Approach ...... 488 Simulation 6.12 – MSK Modem via Signal-Space Approach ...... 493 6.5.2 MSK Bit Error Probability ...... 495 Simulation 6.13 – MSK Modem Performance ...... 496 6.5.3 MSK with Conventional FSK Detection ...... 497 Simulation 6.14 – MSK with Conventional FSK Detection ...... 502 6.5.4 Power Spectral Density of the MSK Signal ...... 502 Simulation 6.15 – Power Spectral Density of the MSK Signal . . . . . 504 6.5.5 Further Attributes and Uses for the MSK Modulation ...... 505 6.5.6 Answering Some Questions About the MSK Modulation . . . 506 6.6 OQPSK, π/4QPSK and GMSK Modulations ...... 507 Simulation 6.16 – Distortion Caused by Nonlinear Amplification . . . 508 6.6.1 Offset QPSK Modulation ...... 512 Simulation 6.17 – OQPSK Signal Generation ...... 514 6.6.2 π/4DQPSK Modulation ...... 516 Simulation 6.18 – π/4DQPSK Generation and Detection ...... 520 6.6.3 GMSK Modulation ...... 521 Simulation 6.19 – GMSK Generation and Detection ...... 527 6.6.4 Nonlinear Amplification Distortion Revisited ...... 529 Simulation 6.20 – Nonlinear Amplification of Modulated Signals . . 530 6.7 Non-coherent M-FSK and Differentially Coherent BPSK ...... 534 6.7.1 Non-coherent M-FSK Modulations ...... 534 Simulation 6.21 – Non-coherently Detected Binary FSK ...... 538 6.7.2 Differentially-Coherent BPSK Modulation ...... 542 Simulation 6.22 – DBPSK Generation and Detection ...... 545 6.8 CarrierandSymbol-TimingRecovery...... 546 6.8.1 ParameterEstimation...... 548 6.8.2 Carrier Synchronization ...... 551 Simulation 6.23 – PLL Response ...... 555 Simulation 6.24 – BPSK Phase Tracking with Costas Loop...... 557 Simulation 6.25 – M-th Power Loop for QPSK Phase Tracking . . . . 561 6.8.3 Symbol Synchronization ...... 564 Simulation 6.26 – Operation of the Early-Late Synchronizer ...... 565 Simulation 6.27 – Carrier and Symbol Synchronization ...... 568 6.9 Performance of Digital Modulations over Fading Channels ...... 570 6.9.1 Optimum Receiver Structures for Fading Channels ...... 570 6.9.2 The Effect of Fading on the Error Probability ...... 571 6.9.3 Performance of Digital Modulations over Fading Channels . 573 6.10 Summary and Further Reading...... 576 6.11 Additional Problems ...... 578 References ...... 579 xviii Contents
7 Wideband Transmission Techniques ...... 585 7.1 Spread-Spectrum Transmission ...... 585 7.1.1 Definition ...... 585 7.1.2 A Brief History About the Spread-Spectrum ...... 586 7.1.3 Direct-Sequence Spread-Spectrum ...... 587 7.1.4 Attributes of a Spread-Spectrum Signal ...... 588 Simulation 7.1 – DS-SS Signal Under Jamming ...... 591 Simulation 7.2 – Channel Sounding ...... 596 Simulation 7.3 – RAKE Receiver ...... 608 7.1.5 Spreading Sequences ...... 611 Simulation 7.4 – Generation of m-Sequences ...... 617 Simulation 7.5 – White Noise Generation with m-Sequences ...... 618 Simulation 7.6 – Exploring Correlation Properties for Synchronism 620 Simulation 7.7 – Exploring Correlation Properties for CDMA . . . . . 627 7.1.6 Frequency-Hopping Spread-Spectrum ...... 629 Simulation 7.8 – FH-SS Modem ...... 631 7.1.7 Processing Gain and Jamming Margin for DS-SS and FH-SS 633 7.1.8 Acquisition and Tracking of Spread-Spectrum Signals . . . . . 634 Simulation 7.9 – Serial-Search Acquisition ...... 636 7.2 Multi-carrier Transmission ...... 640 7.2.1 Multi-carrier Modulation ...... 641 7.2.2 Multi-carrier CDMA ...... 642 7.2.3 Multi-carrier DS-CDMA ...... 643 7.2.4 Multi-tone CDMA ...... 644 7.2.5 Multi-carrier DS-CDMA using frequency-spread coding . . . 644 7.2.6 Modified Multi-carrier DS-CDMA ...... 645 7.2.7 Implementation Aspects of MC-CDMA Systems ...... 646 Simulation 7.10 – OFDM Modem ...... 653 7.2.8 Comments on the Performance of MC-CDMA Systems . . . . 656 7.2.9 MC-CDMA with Double Spreading Code ...... 657 Simulation 7.11 – DC-DS-CDMA Modem ...... 663 7.3 Ultra Wideband Transmission ...... 665 7.3.1 UWB Signaling Techniques ...... 666 7.3.2 UWB Channel Models ...... 671 7.3.3 Reception of UWB Signals ...... 672 Simulation 7.12 – TH-PPM Ultra Wideband Modem ...... 673 Simulation 7.13 – Exploring the Time Reversal Technique ...... 677 7.4 Summary and Further Reading...... 679 7.5 Additional Problems ...... 680 References ...... 682
8 Notions of Information Theory and Error-Correcting Codes ...... 689 8.1 Notions of Information Theory ...... 689 8.1.1 Uncertainty, Information and Entropy ...... 690 Contents xix
Simulation 8.1 – Estimating the Entropy of a Source ...... 693 8.1.2 Source Coding and the Source-Coding Theorem ...... 694 8.1.3 Discrete Memoryless Channels Revisited ...... 699 8.1.4 Mutual Information and Channel Capacity ...... 700 8.1.5 Channel Coding Theorem ...... 701 8.1.6 Channel Capacity of Some Channels ...... 703 8.1.7 Channel Capacity of Other Important Channels ...... 710 8.2 Notions of Error-Correcting Codes ...... 729 8.2.1 Terminology and Background ...... 729 8.2.2 Hamming and Reed-Muller Codes ...... 739 8.2.3 Syndrome Decoding of Binary Linear Block Codes ...... 744 Simulation 8.2 – Hard-Decision Versus Soft-Decision ML Decoding 746 Simulation 8.3 – Coded and Uncoded System Performance...... 749 8.2.4 Construction of Extension Fields and Polynomial Algebra . . 751 8.2.5 Cyclic Codes ...... 753 Simulation 8.4 – LFSR Encoding of a Hamming (7, 4) Code ...... 762 Simulation 8.5 – Meggitt Decoding of a Hamming (7, 4) Code . . . . . 763 8.2.6 Bose-Chaudhuri-Hocquenghem and Reed-Solomon Codes . . 764 Simulation 8.6 – Reed-Solomon Code Performance ...... 770 8.2.7 Performance of Binary Linear Block Codes ...... 772 8.2.8 Convolutional Codes ...... 776 Simulation 8.7 – Finite Trace-Back Viterbi Decoding ...... 786 Simulation 8.8 – Convolutional Code Performance ...... 794 8.2.9 Trellis-Coded Modulation ...... 795 Simulation 8.9 – Four-State 8PSK Trellis-Coded Modulation ...... 804 8.2.10 Turbo and Low-Density Parity Check Codes...... 806 8.2.11 Remarks on Coding for Fading Channels ...... 828 8.3 Summary and Further Reading...... 830 8.4 Additional Problems ...... 832 References ...... 833
A Mathematical Tables and Algorithms ...... 841 A.1 Trigonometric Relations ...... 841 A.2 Gaussian Error Function and Gaussian Q-Function ...... 842 A.2.1 Some Tabulated Values of the Complementary Error Function ...... 843 A.3 Derivatives...... 844 A.4 DefiniteIntegrals...... 844 A.5 Indefinite Integrals ...... 846 A.6 Linear Matrix Transformations of Two-Dimensional Spaces ...... 847 A.7 Mathcad Routine for Converting Decimal to Binary Numbers ...... 848 A.8 Mathcad Routine for a Binary Counter ...... 848 A.9 Mathcad Routine for a Gray Counter ...... 849 xx Contents
A.10 Mathcad Routine for Generating Walsh-Hadamard Sequences . . . . . 849 A.11 Mathcad Routine for Generating the IOWEM of a Block Code . . . . . 849 A.12 Mathcad Routine for Computing the Euler Function ...... 850 References ...... 851
Abbreviations ...... 853
Index ...... 861 Structure of the Book
Chapter 1 aims at revisiting the mathematical basement on probability, random variables and random processes, since these topics are extensively used through- out the book. In Chap. 2, signals typically encountered in communication systems are studied, aiming the analysis of their deterministic and random characteristics. While writing these first two chapters, I was wondering if I was being repetitive and exaggeratedly concise, trying to condense a material vastly available in all good books on Probability and Stochastic Processes and Signals and Systems. Eventually, I have decided to run into the risk and give a condensed review of some of the main concepts on these two areas. Some topics were in fact covered in a very simplistic way and I did this motivated by my students. During the past few years, I detected several “holes” in their basic knowledge, and this was the main reason for covering such simple and basic topics in Chaps. 1 and 2. By doing this, the students are not forced to resort to other references if some (not heavy) stone shows up in their way when studying the main chapters of the book. Chapter 3 covers the communication channels over which most of the communi- cation systems convey information. The importance of this chapter and its location resides in the fact that it is virtually impossible to design a communication system without knowing the characteristics and behavior of the channel through which the information will flow. In Chap. 4 the study of digital communication systems starts with one of its simplest forms: baseband transmission. The concepts drawn from the discussion about baseband transmission are applied in the study of passband transmission (or digital modulation), a topic covered in Chap. 6. Chapter 5 can be viewed as an interface or preparation for Chap. 6. Some tools are developed so that a smooth transition is made between baseband and passband transmission. Additionally, most of the concepts discussed in Chap. 4 are general- ized in Chap. 6 by applying the tools developed in Chap. 5. Spread spectrum, multicarrier, and ultra wideband are covered in Chap. 7. This chapter can be viewed as an application of fundamental concepts presented in pre- vious chapters. However, several new concepts are presented in this chapter. As a complementary and final part of the book, notions about information theory and error-correcting codes are discussed in Chap. 8.
xxi xxii Structure of the Book
The material presented in this book can be more adequately explored depending on the content of the curriculum of the course where it is intended to be applied. Chapters 1 and 2 can be skipped if there are courses on Probability and Stochastic Processes and on Signals and Systems. Nevertheless, it can be of help to recom- mend to the students a review of such topics before entering into the specifics of digital transmission. In this case the book can be covered in two 4-month terms in an undergraduate course and in one 4-month term in a graduate course. We must not forget that the computer experiments can be explored as laboratory activities to complement the theoretical studies. The majority of details and deeper analysis are concentrated in Chaps. 3, 4, 5, 6, and 7, since these chapters can be considered the most relevant from the perspective of an introductory study about digital transmis- sion. Information theory and error-correcting codes normally are part of graduate courses in communication systems. If this is the case, Chap. 8 can also be skipped and treated as a review. Acknowledgement
I would like to express here my gratitude to several people that, in different ways, have helped me to conclude the preparation of this book. I express my deepest grat- itude to Flavia´ who, with love and patience, has believed in my project sometimes even more than me, and who is the only one that really knows what I had left behind to make this dream come true. I also would like to thank my dear friend Prof. Carlos Nazareth Motta Marins for the constant encouragement and unshakeable friendship. Special thanks also go to Ms. Adriana Maria Abrahao˜ Martins for helping me with the English language. This book would not become a reality without the support of Visual Solutions, Inc., by allowing the book to be accompanied by a version of VisSim/Comm. My special thanks goes to Mr. Jim Webb and Ms. Karen Darnell, Sales Managers, to Mr. Rich DiManno, from costumer support, and to Mr. Peter Darnell, President. Many thanks also go to Dr. Christoph Baumann, Engineering Editor of Springer-Verlag, for his constant support during the preparation of the manuscript. I would like to thank Prof. Carlos Roberto dos Santos, Coordinator of the Elec- trical Engineering course at Inatel (Instituto Nacional de Telecomunicac¸oes˜ ), and to Prof. Jose´ Marcos Camaraˆ Brito, Coordinator of the Master degree course, for reducing my teaching activities during the last term before the end of the prepa- ration of the manuscript. Thanks also to Prof. Geraldo Gil Ramundo Gomes and Prof. Luciano Leonel Mendes for substituting me in the teaching activities of a graduate course during that term, and to Prof. Marcelo Carneiro de Paiva for doing the same in an undergraduate course. I am also indebted to Prof. Geraldo Gil for the rich discussions about error-correcting codes and for the review of Chap. 8, and to Prof. Brito for reviewing Chap. 6. Thanks also to Prof. Estevan Marcelo Lopes for reviewing Chap. 1, to Prof. Rausley Adriano Amaral de Souza for reviewing Chap. 2, to Prof. JoseAnt´ onioˆ Justino Ribeiro for reviewing Chap. 3 and to Prof. Luciano Leonel Mendes for reviewing Chap. 7. At last I would like to express my gratitude to the many contributors in the field of Digital Communications, many of them referenced throughout this book, and from whom I have learned, and I am still learning a lot.
xxiii Notes on the Accompanying CD with Software and Simulation Files
The accompanying CD contains three folders. The folder “VisSimComm” contains the setup file for installing the simulation software VisSim/Comm 7.0 and the setup file for installing the viewer-only version of the software. The folder “DAT” con- tains files that are necessary for some simulations to run. The folder “Simulations” contains all the simulation files used throughout the book. It is further divided into eight sub-folders, each of them associated to one chapter of the book. To use the supplied files, follow the instructions below.
• The simulation software VisSim/Comm 7.0 can be installed by running the file “setupVisSimCommWeb70.exe” inside the “VisSimComm” folder and following the instructions during the installation process. After installation VisSim/Comm will run in demo mode and will not let you save your work. However, you can request license keys to enable a 60-day trial that will let you save your implemen- tations. A trial license can be obtained via e-mail by running the “VisSim license manager”, which is automatically installed when you install VisSim/Comm, and clicking the “Email License Codes...” button. After receiving the reply with the trial license keys, you must run the License Manager once more and insert the trial license keys; your trial will run 60 days before requiring a permanent license. To purchase a permanent license, send an e-mail to [email protected]. For tech- nical questions, use [email protected]. • The simulation files supplied in the accompanying CD were implemented in a way that you do not need a permanent license to run them. In fact, whether in demo mode or running VisSim/Comm Viewer you will not miss any simulation detail explored throughout the book. • After any of the working options of VisSim/Comm is installed and enabled, cre- ate the folder “C:\DAT” in your hard drive “C”. Copy the content of the DAT folder in the CD to the DAT folder you have just created. These DAT files are necessary for some experiments to run and can not be created in another path different from “C:\DAT”, unless you modify all the corresponding file paths in the simulation files. • Before you start running the simulations, it is strongly recommended that you become familiar with the VisSim/Comm user interface. This can be easily
xxv xxvi Notes on the Accompanying CD with Software and Simulation Files
accomplished through the VisSim/Comm documentation installed with the soft- ware in your computer. Now you are ready to run the experiments located in the CD, in the folder “Sim- ulations”, according to the work plans supplied throughout the book. These work plans are identified by the word “Simulation” followed by its identification number according to each chapter. As an example, Simulation 4.3 contains the guidelines of the third simulation related to the fourth chapter. The header of each work plan contains information on which simulation file will be used. This work was prepared with due care, trying to avoid or at least minimize errors. I apologize in advance for any mistake not detected during the reviewing process. However, I count on the reader to report any error found, directly to me or to the Publisher. Good reading, good interaction with the simulation files and good learning.
Dayan Adionel Guimaraes˜ Author Disclaimer
The author and the publisher believe that the content of this book is correct. How- ever, all parties must rely upon their own judgment when making use of it. Neither the author nor the publisher assumes any liability to anyone for any loss or damage caused by any error or omission in this book. The computer simulations in this book have been developed with the greatest of care to be useful to the readers in a broad range of applications. However, they are provided without warranty that they and the associated simulation software are free of errors.
xxvii Chapter 1 A Review of Probability and Stochastic Processes
The seminal studies about probability go back to the 17th century with Blaise Pascal (1623–1662), Pierre de Fermat (1601–1665), Jacques Bernoulli (1654–1705) and Abraham de Moivre (1667–1754). Today, probability and random processes (or stochastic processes) are the basis for the study of many areas, including Electrical Engineering and, particularly, communications theory. That is the reason for includ- ing disciplines on the subject in the regular curriculum of such courses. Moreover, in communication systems, most of the signals are of random nature, demanding the use of probabilistic tools for their characterization and for supporting system design and assessment. In this chapter, mostly inspired in the book by Alberto Leon-Garcia [9], we review basic concepts about probability and random processes. The chapter is intended to allow for the reader to have prompt access to these concepts when studying specific subjects on digital transmission. We start by reviewing some con- cepts and properties of the set theory, aiming at using them to define probability and to help with the solutions of problems. In the sequel, basic combinatorial theory is presented as an additional tool for probability calculations based on counting meth- ods. An important rule of probabilities, known as the Bayes rule is then presented. Random variables and averages of random variables are also discussed, followed by the central limit theorem. Confidence interval analysis is then studied. Its use is related to the analysis of the precision associated to averages obtained from sample data. Random number generation is also discussed as a means for computer sim- ulating random phenomena that frequently appear in digital transmission systems. Random processes are defined and the analysis of averages and filtering of stochas- tic processes are presented. The chapter ends with the investigation of the thermal noise, one of the main random processes encountered in communication systems.
1.1 Set Theory Basics
Before starting the specific topic of this section, let us have a look at some terms that will appear frequently throughout the chapter. We do this by means of an example, where the terms we are interested in are in italics: let the experiment of tossing a coin and observing the event corresponding to the coin face shown. The possible
D.A. Guimaraes,˜ Digital Transmission, Signals and Communication Technology, 1 DOI 10.1007/978-3-642-01359-1 1, C Springer-Verlag Berlin Heidelberg 2009 2 1 A Review of Probability and Stochastic Processes results will be the sample points head (H) and tail (T). These two possible results compose the sample space. Now, using the same experiment let us define another event corresponding to the occurrence of heads in the first two out of three con- secutive tosses. The sample space is now composed by 23 = 8 results: HHH, HHT, HTH, HTT, THH, THT, TTH, and TTT, from where we notice that the defined event occurs two times, corresponding to the sample points HHH and HHT. From this simple example we can conclude that a given experiment can produce different results and have different sample spaces, depending on how the event we are interested in is defined. Other two common terms in the study of probability and stochastic processes are deterministic event and random event. If the occurrence of an event is tem- poral, we say that it is deterministic if we have no doubt about its result in any time. A deterministic event can be described by an expression. For exam- ple, if x(t) = A cos(2π ft) describes the time evolution of a voltage waveform, the precise time when, for example, x(t) = A/2 can be determined. A ran- dom event, instead, can not be described by a closed expression, since always there is some degree of uncertainty about its occurrence. For example, the amount of rain in a given day of the year is a random event that can not be precisely estimated. Fortunately, random events show some sort of regularity that allows for some degree of confidence about them. This is indeed the objective of the study of prob- abilistic models: to analyze the regularities or patterns of random events in order to characterize them and infer about them. Somebody once said: “probability is a toll that permits the greatest possible degree of confidence about events that are inherently uncertain”.
1.1.1 The Venn Diagram and Basic Set Operations
Set theory deals with the pictorial representation, called Venn diagram, of experi- ments, events, sample spaces and results, and with the mathematical tools behind this representation. The main objective is to model real problems in a way that they can be easily solved. We start by reviewing the above-mentioned pictorial representation and some basic set operations. Let the sample space of a given experiment be represented by the letter S, which corresponds to the certain event. Let the events A and B defined as the appearance of some specific set of results in S. In Fig. 1.1 we have the corresponding Venn diagram for S, A, B and for other events defined form operations involving S, A and B. The complement of A,orA, is the set composed by all elements in S, except the elements in A, that is A = S − A. The complement A represents the event that A did not occur. The union of the events A and B is the set A ∪ B or A + B and it is formed by the elements in A plus the elements in B. It represents the event that either A or B or both occurred. The intersection of the events A and B is the set A ∩ B or A · B,orsimplyAB and it is formed by the 1.2 Definitions and Axioms of Probability 3 elements that belongs to both A and B. It represents the event that both A and B occurred. In the rightmost diagram in Fig. 1.1 we have mutually exclusive events for which A ∩ B = Ø, where Ø represents the empty set or the impossible event.
Fig. 1.1 Set representation and basic set operations
1.1.2 Other Set Operations and Properties
We list below the main operations involving sets. Most of them have specific names and proofs or basic explanatory statements. We omit this information, aiming only to review such operations. For a more applied and complete treatment on the subject, see [9–15].
1. A ∪ B = B ∪ A and A ∩ B = B ∩ A 2. A ∪ (B ∪ C) = (A ∪ B) ∪ C and A ∩ (B ∩ C) = (A ∩ B) ∩ C 3. A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) and A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) 4. Ai = Ai and Ai = Ai i i i i 5. If A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C), A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) (1.1) 6. A − B = A ∩ B 7. If A ⊂ B, then A ⊃ B or B ⊂ A 8. A ∪ Ø = A and A ∩ Ø = Ø 9. A ∪ S = S and A ∩ S = A 10. A = (A ∩ B) ∪ (A ∩ B), where A ⊂ B means that B contains A and B ⊃ A means that A contains B.
1.2 Definitions and Axioms of Probability
Generally speaking, probability is a number P[A] associated to the information on how likely an event A can occur, where 0 ≤ P[A] ≤ 1. Three formal definitions of probability are the relative frequency, the axiomatic and the classic. 4 1 A Review of Probability and Stochastic Processes
In the relative frequency approach, the probability of occurrence of an event A is given in the limit by n P[A] = lim A , (1.2) N→∞ N where n A is the number of occurrences of event A and N is the number of trials or, equivalently, is the number of times that the experiment is repeated. It turns out that the greater the value of N, the more the result will approach the true probability of occurrence of A. The axiomatic definition is based on the axioms: 0 ≤ P[A]; P[S] = 1; if A ∩ B ∩ C ∩···=Ø, then P[A ∪ B ∪ C ∪···] = P[A] + P[B] + P[C] +···.From these axioms are derived some important properties, as shown by:
1. P[A] = 1 − P[A] 2. P[A] ≤ 1 3. P[Ø] = 0 (1.3) 4. If A ⊂ B, then P[A] ≤ P[B] n n n n+1 5. P Ak = P[A j ] − P[A j ∩ Ak ] +···(−1) P[A1 ∩···∩ An]. k=1 j=1 j The last property in (1.3) gives rise to an important axiom called union bound.If we do not know aprioriif the events are or are not mutually exclusive, we can state that the probability of occurrence of the union of events will be less than or equal to the sum of the probabilities of occurrence of the individual events: n n P Ak ≤ P[Ak ]. (1.4) k=1 k=1 In its classic definition, the probability of occurrence of an event A is determined without experimentation and is given by n P[A] = A , (1.5) N where n A is the number of favorable occurrences of the event A and N is the total number of possible results. Example 1.1 – A cell in a cellular communication system has 5 channels that can be free or busy. The sample space is composed by 25 = 32 combinations of the possible status for the 5 channels. Representing a free channel by a “0” and a busy channel by a “1”, we shall have the following sample space, where each five-element column is associated to one sample point: 1.3 Counting Methods for Determining Probabilities 5 0000000000000000 0000000011111111 0000111100001111 0011001100110011 0101010101010101 1111111111111111 0000000011111111 0000111100001111 0011001100110011 0101010101010101 Assume that the sample points are equally likely, that is, they have the same proba- bility. Assume also that a conference call needs three free channels to be completed. Let us calculate the probability of a conference call be blocked due to busy channels. From the sample space we obtain that there are 16 favorable occurrences of three or more busy channels. Then, according to the classic definition, the probability of a conference call be blocked is given by 16/32 = 0.5. 1.3 Counting Methods for Determining Probabilities In many situations the sample space has a finite number of sample points and the probability of occurrence of a given event is determined according to the classic definition, i.e., by counting the number of favorable outcomes and dividing the result by the total number of possible outcomes in the sample space. In what follows some counting methods or combinatorial formulas are summarized. We consider equally likely outcomes in which the probability of a given sample point is 1/n, where n is the total number of sample points in the sample space. 1.3.1 Distinct Ordered k-Tuples The number of distinct ordered k-tuples with elements (x1, x2, ..., xk ) obtained from sets having ni distinct elements is given by No = n1n2 ···nk . (1.6) The term “ordered” means that different orderings for the k-tuples form different and valid outcomes. 6 1 A Review of Probability and Stochastic Processes In other words, suppose that a number of choices are to be made and that there are n1 possibilities for the first choice, n2 for the second, ..., and nk for the k-th choice. If these choices can be combined without restriction, the total number of possibilities for the whole set of choices will be n1n2 ···nk . The following counting rules are based on (1.6). 1.3.2 Sampling with Replacement and with Ordering If we choose k distinct objects from a set containing n distinct objects and repeat this procedure replacing the objects previously selected, the number of distinct ordered k-tuples is given by (1.6) with n1 = n2 = ...= nk = n, that is, k NRO = n . (1.7) 1.3.3 Sampling Without Replacement and with Ordering If we choose k distinct objects from a set containing n distinct objects and repeat this procedure without replacing the objects previously selected, the number of distinct ordered k-tuples is given by = − ··· − + . NRO n(n 1) (n k 1) (1.8) 1.3.4 Permutation of Distinct Objects If we select all k = n distinct objects from a set containing n objects, the number of ways the n objects are selected, which is known as the number of permutations,is determined by (1.8) with k = n, yielding NP = n(n − 1) ···(2)(1) = n!. (1.9) When n is large, the Stirling’s formula can be used as an approximation for n!: √ ∼ n+ 1 −n n! = 2πn 2 e . (1.10) 1.3.5 Sampling Without Replacement and Without Ordering If we choose k distinct objects from a set containing n distinct objects and repeat this procedure without replacing the objects previously selected, the number of dis- tinct k-tuples without considering the order, which is also known as the number of combinations, is given by 1.4 Conditional Probability and Bayes Rule 7 n! n N = N = = , (1.11) R O C k!(n − k)! k n 1 where k is the binomial coefficient . 1.3.6 Sampling with Replacement and Without Ordering The number of different ways of choosing k distinct objects from a set with n distinct objects with replacement and without ordering is given by n − 1 + k n − 1 + k N = = . (1.12) RO k n − 1 1.4 Conditional Probability and Bayes Rule Let a combination of two experiments in which the probability of a joint event is given by P[A, B]. According to (1.6), the combined experiment produces a sample space that is formed by all distinct k-tuples from the ni possible results from each experiment. Then, the joint probability P[A, B] refers to the occurrence of one or more sample points out of n1n2, depending on the event under interest. As an exam- ple, if two dies are thrown, the possible outcomes are formed by 36 distinct ordered pairs combining the numbers 1, 2, 3, 4, 5 and 6. Let A and B denote the events of throwing two dies and observing the number of points in each of them. The joint probability P[A = 2, B odd] corresponds to the occurrence of three sample points: (2, 1), (2, 3) and (2, 5). Then P[A = 2, B odd] = 3/36 = 1/12. Now suppose that the event B has occurred and, given this additional data, we are interested in knowing the probability of the event A. We call this probability a conditional probability and denote it as P[A|B]. It is shortly read as the probability of A,givenB. The joint and the conditional probabilities are related through P[A, B] P[A|B] = . (1.13) P[B] Since P[A, B] = P[B, A], using (1.13) we can write P[B, A] = P[B|A]P[A] = P[A, B]. With this result in (1.13) we have P[B|A]P[A] P[A|B] = . (1.14) P[B] 1 An experiment for computing the binomial coefficient using VisSim/Comm is given in the simu- lation file “CD drive:\Simulations\Probability\Bin Coefficient.vsm”. A block for computing the factorial operation is also provided in this experiment. 8 1 A Review of Probability and Stochastic Processes This important relation is a simplified form of the Bayes rule. Now, let the mutu- ally exclusive events Ai , i = 1, 2,...,n. The general Bayes rule is given by P[A , B] P[B|A ]P[A ] P[A |B] = i = i i , (1.15) i P[B] n P[B|A j ]P[A j ] j=1 where