Signal Encoding Criteria What determines how successful a receiver will be in interpreting an incoming signal? Signal to noise ratio (or better E b /N 0 ) Data rate Bandwidth An increase in data rate increases bit error rate An increase in SNR decreases bit error rate An increase in bandwidth allows an increase in data rate Importantly, another factor can be utilized to improve performance and that is the encoding scheme Factors Used to Compare Encoding Schemes Signal spectrum With lack of high frequency components, less bandwidth required Clocking Ease of determining beginning and end of each bit position Signal interference and noise immunity Certain codes exhibit superior performance in the presence of noise (usually expressed in terms of a BER) Cost and complexity The higher the signal rate to achieve a given data rate, the greater the cost 1
Basic Encoding Techniques Digital data to analog signal Amplitude shift keying (ASK) Amplitude difference of carrier frequency Frequency shift keying (FSK) Frequency difference near carrier frequency Phase shift keying (PSK) Phase of carrier signal shifted Modulation of Analog Signals for Digital Data 2
Phase Shift Keying (PSK) Two level PSK (BPSK) Uses two phases to represent binary digits s t Acos 2 f c t Acos 2 f c t Acos 2 f t c Acos 2 f c t binary 1 binary 0 binary 1 binary 0 Phase Shift Keying (PSK) Differential PSK (DPSK) Phase shift with reference to previous bit Binary 0 signal burst of same phase as previous signal burst Binary 1 signal burst of opposite phase to previous signal burst 3
Differential Phase Shift Keying Quadrature Phase Shift Keying (PSK) Four level PSK (QPSK) Each element represents more than one bit Acos 2 f c t 4 11 Acos 2 f c t 3 4 01 s(t) Acos 2 f c t 3 00 4 Acos 2 f c t 10 4 4
QPSK Constellation Diagram QPSK and OQPSK Modulators 5
Phase Shift Keying (PSK) Multilevel PSK Using multiple phase angles with each angle having more than one amplitude, multiple signal elements can be achieved D R L R log 2 M D = modulation rate, baud or symbols/sec R = data rate, bps M = number of different signal elements = 2 L L = number of bits per signal element Performance Bandwidth of modulated signal (B T ) ASK, PSK B T = (1+r)R FSK B T = 2Δf+(1+r)R R = bit rate 0 < r < 1; related to how signal is filtered Δf = f 2 f c = f c f 1 6
Performance Bandwidth of modulated signal (B T ) MPSK MFSK B T B T 1 r 1 R L log 2 1 rm R M log 2 r M R L = number of bits encoded per signal element M = number of different signal elements Bit Error rate (BER) Performance must be assessed in the presence of noise Bit error probability is probably a clearer term BER is not a rate in bits/sec, but rather a probability Commonly plotted on a log scale in the y axis and E b /N 0 in db on the x axis As E b /N 0 increases, BER drops Curves to the lower left have better performance 7
Theoretical Bit Error Rate for Various Encoding Schemes Theoretical Bit Error Rate for Multilevel FSK, PSK, and QAM 8
Quadrature Amplitude Modulation QAM is a combination of ASK and PSK Two different signals sent simultaneously on the same carrier frequency st It cos2 f c t Qtsin2 f c t QAM Modulator 9
16 QAM Constellation Diagram Spread Spectrum Input is fed into a channel encoder Produces analog signal with narrow bandwidth Signal is further modulated using sequence of digits Spreading code or spreading sequence Generated by pseudonoise, or pseudo random number generator Effect of modulation is to increase bandwidth of signal to be transmitted 10
General Model of Spread Spectrum Digital Communication System Spread Spectrum On receiving end, digital sequence is used to demodulate the spread spectrum signal Signal is fed into a channel decoder to recover data 11
Spread Spectrum What can be gained from apparent waste of spectrum? Immunity from various kinds of noise and multipath distortion Can be used for hiding and encrypting signals Several users can independently use the same higher bandwidth with very little interference Frequency Hoping Spread Spectrum (FHSS) Signal is broadcast over seemingly random series of radio frequencies A number of channels allocated for the FH signal Width of each channel corresponds to bandwidth of input signal Signal hops from frequency to frequency at fixed intervals Transmitter operates in one channel at a time Bits are transmitted using some encoding scheme At each successive interval, a new carrier frequency is selected 12
Frequency Hopping Example Frequency Hopping Spread Spectrum System 13
Frequency Hoping Spread Spectrum Channel sequence dictated by spreading code Receiver, hopping between frequencies in synchronization with transmitter, picks up message Advantages Eavesdroppers hear only unintelligible blips Attempts to jam signal on one frequency succeed only at knocking out a few bits FHSS Using MFSK MFSK signal is translated to a new frequency every T c seconds by modulating the MFSK signal with the FHSS carrier signal For data rate of R: duration of a bit: T = 1/R seconds duration of signal element: T s = LT seconds T c T s slow frequency hop spread spectrum T c < T s fast frequency hop spread spectrum 14
Slow Frequency Hop Spread Spectrum Using MFSK 1M = 4, k = 22 Frequency Hop Spread Spectrum Using MFSK 1M = 4, k = 22 15
FHSS Performance Considerations Large number of frequencies used Results in a system that is quite resistant to jamming Jammer must jam all frequencies With fixed power, this reduces the jamming power in any one frequency band SPREAD SPECTRUM a little history FYI Spread Spectrum is now usually associated with digital communications using radio. (Note that wireless = radio for this course as we are talking about basic technologies, not commercial offerings.) Spread Spectrum techniques can be employed for analog communications over guided media, although most spread spectrum systems are via radio. 16
SPREAD SPECTRUM The general concept of many communications schemes including SS is simple but profound: we can trade bandwidth for noise reduction. We are familiar with this concept by the use of 200 khz channels for FM broadcasting 15 khz stereo audio and for that matter using digital techniques to require a 64 kbps link for a 3 khz telephone call. The original use of the SS techniques was to make eavesdropping and/or locating military radio communications extremely difficult. But the immunity to other similar signals noise as well as to single frequency (non spread signal) interference was immediately manifest. The original refinement of these techniques was to completely obscured the existence of the communications to conventional narrow band receivers. Three Basic Spread Spectrum Techniques and Purposes SPREAD SPECTRUM TECHNIQUE PRIMARY PRACTICAL ATTRIBUTES 1. Frequency Hopping Unable to be received other than by intended recipients Effectively eliminates single frequency interference and/or jamming Reciprocal from outlook of single channel users Used with analog and digital communications Signals are not completely occult (hidden). 2. Direct Sequence Encrypts digital data at very high level Significant noise reduction from other spectrum users, including discrete channels as well as other DSCC users. Also reciprocal to channelized radio signals 3. Code Division Multiple Access Specific type of DSSS scheme widely used specifically for multiplexing multiple users rather than for encryption or for noise reduction 17
SPREAD SPECTRUM TECHNIQUES Frequency Hopping Spread Spectrum (FHSS) This is a very old technique dating back to the 1940s (WW II) and earlier but said to be invented by movie star Hedy Lamarr*. FHSS is applicable to analog radio communications and groups of bits of digital data, even one bit or less at a time modulating a radio carrier. The transmitter and receiver simply jump (hop) in synchronism between a number of different narrow band frequency conventional AM or FM channels. The channel occupancy of the result can be over many channels or even entire frequency bands, e.g. the 3 30 MHz short wave band. The participating transmitter and receiver need to have the exact correct sequence of frequencies and be synchronized; other receivers tuned to single channels can detect only occasional very small segments of the communications rendering eavesdropping virtually impossible. The existence of the communications may be discerned due to the detection of "blips" of RF energy on any given channel. *A most fascinating story. 1. Frequency Hopping Spread Spectrum was invented during WW II by movie star Hedy Lamarr. Hedy Lamarr, 1913 2000 18
THE INVENTION OF FREQUENCY HOPPING STREAD SPECTRUM The invention of spread spectrum is quite a story involving Nazis, a future Hollywood star, attempted murders, a number of druggings (more than one), a brothel (perhaps more than one), a Hollywood mogul (decidedly one), a player piano, and a piano player (a particular one). Picture: millikansbend.org Original spread spectrum scheme used perforated paper reels similar to those used in player pianos to control secure synchronous transmitter and receiver frequency hopping. Besides preventing eavesdropping, frequency hopping minimized detection by enemy direction finders to locate clandestine transmitters. 19
Two pages of drawings from Lamarr (name on patent is Markey, the name of Hedy s 2 nd of 6 husbands) and Antheil's patent*. Note the player piano like slotted paper on the second sheet at right below. FREQUENCY HOPPING SPREAD SPECTRUM Points to Remember Single frequency jamming and/or multipath distortion that occurs only on a few of the channels used have only minimal effects on the bit error rates. This takes a little explaining. The idea is that only syllables are lost for voice transmission where humans can fill in the missing data, hopefully correctly. For digital transmission, error correcting can apply. Bits do get lost unless retransmissions and/or FEC is used. The hopping sequence must be pseudo random otherwise interference would be periodic and decodable. This is very important for digital transmission employing FHSS. Pseudo Random means complicated enough to have a very long periodicity (if at all) and with statistics that appear to mimic those of true random distributions. The effect of FHSS is to minimize interference or detection of the transmitting location. That a hopper is near by can often be determined. 20
FHSS Continued When used with digital communications, the pseudo random hopping sequence will ensure that the bit errors will occur in what appears to be a random way. This is more easily handled by error correction operating at the data link or higher layers. BERs will be low if enough "good" channels are employed in the sequence: bad if many of the channels are in use. Frequency Hopping is also a multiplex and encryption technique. Background noise (for analog signals) or BER (for digital transmission) increase as the number of users increase. The general result of many users is similar to having a high random noise within the channel. If the occupancy time of any given in use channel is very low a fraction of a second intelligible communications can still occur or BER is tolerable when FEC schemes are used. FHSS is widely used for 2.4 GHz cordless telephones and was part of the original IEEE 802 wireless LAN standard. 21
Direct Sequence Spread Spectrum (DSSS) Each bit in original signal is represented by multiple bits in the transmitted signal Spreading code spreads signal across a wider frequency band Spread is in direct proportion to number of bits used One technique combines digital information stream with the spreading code bit stream using exclusive OR (Figure 9.6) Example of Direct Sequence Spread Spectrum 22
Direct Sequence Spread Spectrum System DSSS Using BPSK Multiply BPSK signal, s d (t) = A d(t) cos( f c t) by c(t)[takes values +1, 1] to get s(t) = A d(t)c(t) cos( f c t) A = amplitude of signal f c = carrier frequency d(t) = discrete function [+1, 1] At receiver, incoming signal multiplied by c(t) Since, c(t) x c(t) = 1, incoming signal is recovered 23
Example of Direct Sequence Spread Spectrum Using BPSK Approximate Spectrum of Direct Sequence Spread Spectrum Signal 24
Code Division Multiple Access (CDMA) Basic Principles of CDMA D = rate of data signal Break each bit into kchips Chips are a user specific fixed pattern Chip data rate of new channel = kd CDMA Example If k=6 and code is a sequence of 1s and 1s For a 1 bit, A sends code as chip pattern <c1, c2, c3, c4, c5, c6> For a 0 bit, A sends complement of code < c1, c2, c3, c4, c5, c6> Receiver knows sender s code and performs electronic decode function S u d d1c1 d2c2d3c3 d4c4d5c5 d6c6 <d1, d2, d3, d4, d5, d6> = received chip pattern <c1, c2, c3, c4, c5, c6> = sender s code 25
CDMA Example CDMA Example User A code = <1, 1, 1, 1, 1, 1> To send a 1 bit = <1, 1, 1, 1, 1, 1> To send a 0 bit = < 1, 1, 1, 1, 1, 1> User B code = <1, 1, 1, 1, 1, 1> To send a 1 bit = <1, 1, 1, 1, 1, 1> Receiver receiving with A s code (A s code) x (received chip pattern) User A 1 bit: 6 > 1 User A 0 bit: 6 > 0 User B 1 bit: 0 > unwanted signal ignored 26
CDMA in a DSSS Environment Rake receiver ( digital multipath ) RAKE receiver Multiple versions of a signal arrive more than one chip interval apart RAKE receiver attempts to recover signals from multiple paths and combine them This method achieves better performance than simply recovering dominant signal and treating remaining signals as noise 27
Principle of RAKE Receiver Categories of Spreading Sequences Spreading Sequence Categories PN sequences Orthogonal codes For FHSS systems PN sequences most common For DSSS systems not employing CDMA PN sequences most common For DSSS CDMA systems PN sequences Orthogonal codes 28
PN Sequences PN generator produces periodic sequence that appears to be random PN Sequences Generated by an algorithm using initial seed Sequence isn t statistically random but will pass many test of randomness Sequences referred to as pseudorandom numbers or pseudonoise sequences Unless algorithm and seed are known, the sequence is impractical to predict Additional reference materials Required Textbook: Antennas and Propagation for Wireless Communication Systems, by Simon R. Saunders and Alejandro Aragon Zavala, ISBN 978 0 470 84879 1; March 2007 (2 nd edition). Optional References: Wireless Communications and Networks, by William Stallings, ISBN 0 13 040864 6, 2002 (1 st edition); Wireless Communication Networks and Systems, by Corey Beard & William Stallings (1 st edition); all material copyright 2016 Wireless Communications Principles and Practice, by Theodore S. Rappaport, ISBN 0 13 042232 0 (2 nd edition) 29
Required Textbook: Antennas and Propagation for Wireless Communication Systems, by Simon R. Saunders and Alejandro Aragon Zavala, ISBN 978 0 470 84879 1; March 2007 (2 nd edition). Optional References: Wireless Communications and Networks, by William Stallings, ISBN 0 13 040864 6, 2002 (1 st edition); Wireless Communication Networks and Systems, by Corey Beard & William Stallings (1 st edition); all material copyright 2016 Wireless Communications Principles and Practice, by Theodore S. Rappaport, ISBN 0 13 042232 0 (2 nd edition) Acknowledgements: Additional reference materials OSI 7 layer model 30
Coping with Data Transmission Errors Error detection codes Detects the presence of an error Automatic repeat request (ARQ) protocols Block of data with error is discarded Transmitter retransmits that block of data Error correction codes, or forward correction codes (FEC) Designed to detect and correct errors Error Detection Probabilities Definitions P b : Probability of single bit error (BER) P 1 : Probability that a frame arrives with no bit errors P 2 : While using error detection, the probability that a frame arrives with one or more undetected errors P 3 : While using error detection, the probability that a frame arrives with one or more detected bit errors but no undetected bit errors 31
Error Detection Probabilities Definitions P b : Probability of single bit error (BER) P 1 : Probability that a frame arrives with no bit errors P 2 : While using error detection, the probability that a frame arrives with one or more undetected errors P 3 : While using error detection, the probability that a frame arrives with one or more detected bit errors but no undetected bit errors Error Detection Process Transmitter For a given frame, an error detecting code (check bits) is calculated from data bits Check bits are appended to data bits Receiver Separates incoming frame into data bits and check bits Calculates check bits from received data bits Compares calculated check bits against received check bits Detected error occurs if mismatch 32
Error Detection Process Transmitter For a given frame, an error detecting code (check bits) is calculated from data bits Check bits are appended to data bits Receiver Separates incoming frame into data bits and check bits Calculates check bits from received data bits Compares calculated check bits against received check bits Detected error occurs if mismatch Parity Check Parity bit appended to a block of data Even parity Added bit ensures an even number of 1s Odd parity Added bit ensures an odd number of 1s Example, 7 bit character [1110001] Even parity [11100010] Odd parity [11100011] 33
Cyclic Redundancy Check (CRC) Transmitter For a k bit block, transmitter generates an (n k) bit frame check sequence (FCS) Resulting frame of n bits is exactly divisible by predetermined number Receiver Divides incoming frame by predetermined number If no remainder, assumes no error Wireless Transmission Errors Error detection requires retransmission Detection inadequate for wireless applications Error rate on wireless link can be high, results in a large number of retransmissions Long propagation delay compared to transmission time 34
Block Error Correction Codes Transmitter Forward error correction (FEC) encoder maps each k bit block into an n bit block codeword Codeword is transmitted; (analog transmission for wireless communications systems) Receiver Incoming signal is demodulated Block passed through an FEC decoder Forward Error Correction Process 35
FEC Decoder Outcomes No errors present Codeword produced by decoder matches original codeword Decoder detects and corrects bit errors Decoder detects but cannot correct bit errors; reports uncorrectable error Decoder incorrectly corrects bit errors Error pattern looks like a different block of data was sent Decoder detects no bit errors, though errors are present Block Code Principles Hamming distance for 2 n bit binary sequences, the number of different bits E.g., v 1 =011011; v 2 =110001; d(v1, v 2 )=3 Redundancy ratio of redundant bits to data bits Code rate ratio of data bits to total bits Coding gain the reduction in the required E b /N 0 to achieve a specified BER of an error correcting coded system 36
10.6 How Coding Improves System Performance Hamming code Designed to correct single bit errors Family of (n, k) block error correcting codes with parameters: Block length: n = 2 m 1 Number of data bits: k = 2 m m 1 Number of check bits: n k = m Minimum distance: d min = 3 Single error correcting (SEC) code SEC double error detecting (SEC DED) code 37
Hamming code Designed to correct single bit errors Family of (n, k) block error correcting codes with parameters: Block length: n = 2 m 1 Number of data bits: k = 2 m m 1 Number of check bits: n k = m Minimum distance: d min = 3 Single error correcting (SEC) code SEC double error detecting (SEC DED) code Hamming Code Process Encoding: k data bits + (n k) check bits Decoding: compares received (n k) bits with calculated (n k) bits using XOR Resulting (n k) bits called syndrome word Syndrome range is between 0 and 2 (n k) 1 Each bit of syndrome indicates a match (0) or conflict (1) in that bit position 38
Cyclic Codes Can be encoded and decoded using linear feedback shift registers (LFSRs) For cyclic codes, a valid codeword (c 0, c 1,, c n 1 ), shifted right one bit, is also a valid codeword (c n 1, c 0,, c n 2 ) Takes fixed length input (k) and produces fixedlength check code (n k) In contrast, CRC error detecting code accepts arbitrary length input for fixed length check code BCH Codes For positive pair of integers m and t, a (n, k) BCH code has parameters: Block length: n = 2 m 1 Number of check bits: n k mt Minimum distance: d min 2t + 1 Correct combinations of t or fewer errors Flexibility in choice of parameters Block length, code rate 39
Table 10.4 BCH Code Parameters Reed Solomon Codes Subclass of nonbinary BCH codes Data processed in chunks of m bits, called symbols An (n, k) RS code has parameters: Symbol length: m bits per symbol Block length: n = 2 m 1 symbols = m(2 m 1) bits Data length: k symbols Size of check code: n k = 2t symbols = m(2t) bits Minimum distance: d min = 2t + 1 symbols 40
Low density parity check (LDPC) codes Approach Shannon s limit Use very long codes Check for errors by using many equations that each add at least three bits together Variable nodescorrespond to bits Constraint nodes implement equations Uses iterative decoding Variable nodes estimate the bits And estimate the probabilities of being those bits Constraint nodes combine the estimates to see if they satisfy the equations Low density parity check (LDPC) codes Approach Shannon s limit Use very long codes Check for errors by using many equations that each add at least three bits together Variable nodescorrespond to bits Constraint nodes implement equations Uses iterative decoding Variable nodes estimate the bits And estimate the probabilities of being those bits Constraint nodes combine the estimates to see if they satisfy the equations 41
Tanner Graph for LDPC Iterative Decoding Block Interleaving Data written to and read from memory in different orders Data bits and corresponding check bits are interspersed with bits from other blocks At receiver, data are deinterleaved to recover original order A burst error that may occur is spread out over a number of blocks, making error correction possible 42
Block Interleaving Data written to and read from memory in different orders Data bits and corresponding check bits are interspersed with bits from other blocks At receiver, data are deinterleaved to recover original order A burst error that may occur is spread out over a number of blocks, making error correction possible Block Interleaving Data written to and read from memory in different orders Data bits and corresponding check bits are interspersed with bits from other blocks At receiver, data are deinterleaved to recover original order A burst error that may occur is spread out over a number of blocks, making error correction possible 43
Convolutional Codes Generates redundant bits continuously Error checking and correcting carried out continuously (n, k, K) code Input processes k bits at a time Output produces n bits for every k input bits K = constraint factor k and n generally very small n bit output of (n, k, K) code depends on: Current block of k input bits Previous k 1 blocks of k input bits Decoding Trellis diagram expanded encoder diagram Viterbi code error correction algorithm Compares received sequence with all possible transmitted sequences Algorithm chooses path through trellis whose coded sequence differs from received sequence in the fewest number of places Once a valid path is selected as the correct path, the decoder can recover the input data bits from the output code bits 44
Example Trellis Diagram for Encoding Trellis Diagrams for Encoder with (n, k, K) = (2, 1, 7) 45
Viterbi Algorithm for w = 10010100101100 with decoding window b = 7 Turbo coding Popular for third and fourth generation cellular systems Perform very close to Shannon limit Three versions of the signal are transmitted, interleaved together Original signal Encoded version of the signal Interleaved version that is then encoded Some of the bits of the interleaved stream are removed 46
10.14 Turbo Encoding and Decoding Turbo coding Popular for third and fourth generation cellular systems Perform very close to Shannon limit Three versions of the signal are transmitted, interleaved together Original signal Encoded version of the signal Interleaved version that is then encoded Some of the bits of the interleaved stream are removed 47
Automatic Repeat Request Mechanism used in data link control and transport protocols Relies on use of an error detection code (such as CRC) Flow Control Error Control Flow Control Assures that transmitting entity does not overwhelm a receiving entity with data Protocols with flow control mechanism allow multiple PDUs in transit at the same time PDUs arrive in same order they re sent Sliding window flow control Transmitter maintains list (window) of sequence numbers allowed to send Receiver maintains list allowed to receive 48
Sliding Window Depiction Source system A Destination system B 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 P0 P1 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 P2 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 RR 3 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 RR 4 P3 P4 P5 P6 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 Example of a Sliding Window Protocol 49
Flow Control Reasons for breaking up a block of data before transmitting: Limited buffer size of receiver Retransmission of PDU due to error requires smaller amounts of data to be retransmitted On shared medium, larger PDUs occupy medium for extended period, causing delays at other sending stations Error Control Mechanisms to detect and correct transmission errors Types of errors: Lost PDU : a PDU fails to arrive Damaged PDU : PDU arrives with errors 50
10.17 Model of PDU Transmission Error Control Requirements Error detection Receiver detects errors and discards PDUs Positive acknowledgement Destination returns acknowledgment of received, errorfree PDUs Retransmission after timeout Source retransmits unacknowledged PDU Negative acknowledgement and retransmission Destination returns negative acknowledgment to PDUs in error 51
Go back N ARQ Acknowledgments RR = receive ready (no errors occur) REJ = reject (error detected) Contingencies Damaged PDU Damaged RR Damaged REJ Go back N ARQ Acknowledgments RR = receive ready (no errors occur) REJ = reject (error detected) Contingencies Damaged PDU Damaged RR Damaged REJ 52
HYBRID ARQ Hybrid Automatic Repeat Request (HARQ) Neither FEC or ARQ is adequate in practical situations FEC may add unnecessary redundancy ARQ may cause excessive delays from retransmissions HARQ is widely used Uses combination of FEC and ARQ Additional reference materials Required Textbook: Antennas and Propagation for Wireless Communication Systems, by Simon R. Saunders and Alejandro Aragon Zavala, ISBN 978 0 470 84879 1; March 2007 (2 nd edition). Optional References: Wireless Communications and Networks, by William Stallings, ISBN 0 13 040864 6, 2002 (1 st edition); Wireless Communication Networks and Systems, by Corey Beard & William Stallings (1 st edition); all material copyright 2016 Wireless Communications Principles and Practice, by Theodore S. Rappaport, ISBN 0 13 042232 0 (2 nd edition) 53