Digital Communication Systems Lecture2 1 Formatting 2 Example

  • Slides: 73
Download presentation
Digital Communication Systems Lecture-2 1

Digital Communication Systems Lecture-2 1

Formatting 2

Formatting 2

Example 1: n In ASCII alphabets, numbers, and symbols are encoded using a 7

Example 1: n In ASCII alphabets, numbers, and symbols are encoded using a 7 bit code A total of 27 = 128 different characters can be represented using a 7 -bit unique ASCII code (see ASCII Table, Fig. 2. 3) n 3

Formatting n Transmit and Receive Formatting q Transition from information source digital symbols information

Formatting n Transmit and Receive Formatting q Transition from information source digital symbols information sink 4

n Character Coding (Textual Information) q A textual information is a sequence of alphanumeric

n Character Coding (Textual Information) q A textual information is a sequence of alphanumeric characters q Alphanumeric and symbolic information are encoded into digital bits using one of several standard formats, e. g, ASCII, EBCDIC 5

Transmission of Analog Signals n n Structure of Digital Communication Transmitter Analog to Digital

Transmission of Analog Signals n n Structure of Digital Communication Transmitter Analog to Digital Conversion 6

Sampling n n n Sampling is the processes of converting continuous-time analog signal, xa(t),

Sampling n n n Sampling is the processes of converting continuous-time analog signal, xa(t), into a discrete-time signal by taking the “samples” at discrete-time intervals q Sampling analog signals makes them discrete in time but still continuous valued q If done properly (Nyquist theorem is satisfied), sampling does not introduce distortion Sampled values: q The value of the function at the sampling points Sampling interval: q The time that separates sampling points (interval b/w samples), Ts q If the signal is slowly varying, then fewer samples per second will be required than if the waveform is rapidly varying q So, the optimum sampling rate depends on the maximum frequency component present in the signal 7

n Analog-to-digital conversion is (basically) a 2 step process: q Sampling n Convert from

n Analog-to-digital conversion is (basically) a 2 step process: q Sampling n Convert from continuous-time analog signal xa(t) to discretetime continuous value signal x(n) q Is obtained by taking the “samples” of xa(t) at discrete-time intervals, Ts n Quantization q Convert from discrete-time continuous valued signal to discrete time discrete valued signal 8

Sampling n Sampling Rate (or sampling frequency fs): q The rate at which the

Sampling n Sampling Rate (or sampling frequency fs): q The rate at which the signal is sampled, expressed as the number of samples per second (reciprocal of the sampling interval), 1/Ts = fs n Nyquist Sampling Theorem (or Nyquist Criterion): q If the sampling is performed at a proper rate, no info is lost about the original signal and it can be properly reconstructed later on q Statement: “If a signal is sampled at a rate at least, but not exactly equal to twice the max frequency component of the waveform, then the waveform can be exactly reconstructed from the samples without any distortion” 9

Ideal Sampling ( or Impulse Sampling) n Therefore, we have: n Take Fourier Transform

Ideal Sampling ( or Impulse Sampling) n Therefore, we have: n Take Fourier Transform (frequency convolution) 10

Sampling If Rs < 2 B, aliasing (overlapping of the spectra) results q If

Sampling If Rs < 2 B, aliasing (overlapping of the spectra) results q If signal is not strictly bandlimited, then it must be passed through Low Pass Filter (LPF) before sampling Fundamental Rule of Sampling (Nyquist Criterion) q The value of the sampling frequency fs must be greater than twice the highest signal frequency fmax of the signal Types of sampling q Ideal Sampling q Natural Sampling q Flat-Top Sampling q n n 11

Ideal Sampling ( or Impulse Sampling) n n Is accomplished by the multiplication of

Ideal Sampling ( or Impulse Sampling) n n Is accomplished by the multiplication of the signal x(t) by the uniform train of impulses (comb function) Consider the instantaneous sampling of the analog signal x(t) n Train of impulse functions select sample values at regular intervals n Fourier Series representation: 12

Ideal Sampling ( or Impulse Sampling) n. This shows that the Fourier Transform of

Ideal Sampling ( or Impulse Sampling) n. This shows that the Fourier Transform of the sampled signal is the Fourier Transform of the original signal at rate of 1/Ts 13

Ideal Sampling ( or Impulse Sampling) n n As long as fs> 2 fm,

Ideal Sampling ( or Impulse Sampling) n n As long as fs> 2 fm, no overlap of repeated replicas X(f - n/Ts) will occur in Xs(f) Minimum Sampling Condition: Sampling Theorem: A finite energy function x(t) can be completely reconstructed from its sampled value x(n. Ts) with n provided that => 14

Ideal Sampling ( or Impulse Sampling) n. This means that the output is simply

Ideal Sampling ( or Impulse Sampling) n. This means that the output is simply the replication of the original signal at discrete intervals, e. g 15

n Ts is called the Nyquist interval: It is the longest time interval that

n Ts is called the Nyquist interval: It is the longest time interval that can be used for sampling a bandlimited signal and still allow reconstruction of the signal at the receiver without distortion 16

Practical Sampling In practice we cannot perform ideal sampling n q It is practically

Practical Sampling In practice we cannot perform ideal sampling n q It is practically difficult to create a train of impulses Thus a non-ideal approach to sampling must be used We can approximate a train of impulses using a train of very thin rectangular pulses: n n Note: n Fourier Transform of impulse train is another impulse train n Convolution with an impulse train is a shifting operation 17

Natural Sampling If we multiply x(t) by a train of rectangular pulses xp(t), we

Natural Sampling If we multiply x(t) by a train of rectangular pulses xp(t), we obtain a gated waveform that approximates the ideal sampled waveform, known as natural sampling or gating (see Figure 2. 8) 18

n n n n Each pulse in xp(t) has width Ts and amplitude 1/Ts

n n n n Each pulse in xp(t) has width Ts and amplitude 1/Ts The top of each pulse follows the variation of the signal being sampled Xs (f) is the replication of X(f) periodically every fs Hz Xs (f) is weighted by Cn Fourier Series Coeffiecient The problem with a natural sampled waveform is that the tops of the sample pulses are not flat It is not compatible with a digital system since the amplitude of each sample has infinite number of possible values Another technique known as flat top sampling is used to alleviate this problem 19

Flat-Top Sampling n n Here, the pulse is held to a constant height for

Flat-Top Sampling n n Here, the pulse is held to a constant height for the whole sample period Flat top sampling is obtained by the convolution of the signal obtained after ideal sampling with a unity amplitude rectangular pulse, p(t) This technique is used to realize Sample-and-Hold (S/H) operation In S/H, input signal is continuously sampled and then the value is held for as long as it takes to for the A/D to acquire its value 20

Flat top sampling (Time Domain) 21

Flat top sampling (Time Domain) 21

n Taking the Fourier Transform will result to where P(f) is a sinc function

n Taking the Fourier Transform will result to where P(f) is a sinc function 22

Flat top sampling (Frequency Domain) n. Flat top sampling becomes identical to ideal sampling

Flat top sampling (Frequency Domain) n. Flat top sampling becomes identical to ideal sampling as the width of the pulses become shorter 23

Recovering the Analog Signal n One way of recovering the original signal from sampled

Recovering the Analog Signal n One way of recovering the original signal from sampled signal Xs(f) is to pass it through a Low Pass Filter (LPF) as shown below n If fs > 2 B then we recover x(t) exactly n Else we run into some problems and signal is not fully recovered 24

n Undersampling and Aliasing q If the waveform is undersampled (i. e. fs <

n Undersampling and Aliasing q If the waveform is undersampled (i. e. fs < 2 B) then there will be spectral overlap in the sampled signal n. The signal at the output of the filter will be different from the original signal spectrum This is the outcome of aliasing! n. This implies that whenever the sampling condition is not met, an irreversible overlap of the spectral replicas is produced 25

n This could be due to: 1. x(t) containing higher frequency than were expected

n This could be due to: 1. x(t) containing higher frequency than were expected 2. An error in calculating the sampling rate n Under normal conditions, undersampling of signals causing aliasing is not recommended 26

n Solution 1: Anti-Aliasing Analog Filter q q All physically realizable signals are not

n Solution 1: Anti-Aliasing Analog Filter q q All physically realizable signals are not completely bandlimited If there is a significant amount of energy in frequencies above half the sampling frequency (fs/2), aliasing will occur Aliasing can be prevented by first passing the analog signal through an anti-aliasing filter (also called a prefilter) before sampling is performed The anti-aliasing filter is simply a LPF with cutoff frequency equal to half the sample rate 27

n Aliasing is prevented by forcing the bandwidth of the sampled signal to satisfy

n Aliasing is prevented by forcing the bandwidth of the sampled signal to satisfy the requirement of the Sampling Theorem 28

n Solution 2: Over Sampling and Filtering in the Digital Domain q The signal

n Solution 2: Over Sampling and Filtering in the Digital Domain q The signal is passed through a low performance (less costly) analog low-pass filter to limit the bandwidth. q Sample the resulting signal at a high sampling frequency. q The digital samples are then processed by a high performance digital filter and down sample the resulting signal. 29

Summary Of Sampling n Ideal Sampling (or Impulse Sampling) n Natural Sampling (or Gating)

Summary Of Sampling n Ideal Sampling (or Impulse Sampling) n Natural Sampling (or Gating) n Flat-Top Sampling n For all sampling techniques q If fs > 2 B then we can recover x(t) exactly q If fs < 2 B) spectral overlapping known as aliasing will occur 30

Example 1: n Consider the analog signal x(t) given by n What is the

Example 1: n Consider the analog signal x(t) given by n What is the Nyquist rate for this signal? Example 2: n Consider the analog signal xa(t) given by n What is the Nyquist rate for this signal? What is the discrete time signal obtained after sampling, if fs=5000 samples/s. What is the analog signal x(t) that can be reconstructed from the sampled values? n n 31

Practical Sampling Rates n n n Speech - Telephone quality speech has a bandwidth

Practical Sampling Rates n n n Speech - Telephone quality speech has a bandwidth of 4 k. Hz (actually 300 to 3300 Hz) - Most digital telephone systems are sampled at 8000 samples/sec Audio: - The highest frequency the human ear can hear is approximately 15 k. Hz - CD quality audio are sampled at rate of 44, 000 samples/sec Video - The human eye requires samples at a rate of at least 20 frames/sec to achieve smooth motion 32

Pulse Code Modulation (PCM) n n Pulse Code Modulation refers to a digital baseband

Pulse Code Modulation (PCM) n n Pulse Code Modulation refers to a digital baseband signal that is generated directly from the quantizer output Sometimes the term PCM is used interchangeably with quantization 33

See Figure 2. 16 (Page 80) 34

See Figure 2. 16 (Page 80) 34

35

35

Advantages of PCM: n Relatively inexpensive n Easily multiplexed: PCM waveforms from different sources

Advantages of PCM: n Relatively inexpensive n Easily multiplexed: PCM waveforms from different sources can be transmitted over a common digital channel (TDM) n Easily regenerated: useful for long-distance communication, e. g. telephone n Better noise performance than analog system n Signals may be stored and time-scaled efficiently (e. g. , satellite communication) n Efficient codes are readily available Disadvantage: n Requires wider bandwidth than analog signals 36

2. 5 Sources of Corruption in the sampled, quantized and transmitted pulses n n

2. 5 Sources of Corruption in the sampled, quantized and transmitted pulses n n Sampling and Quantization Effects q Quantization (Granularity) Noise: Results when quantization levels are not finely spaced apart enough to accurately approximate input signal resulting in truncation or rounding error. q Quantizer Saturation or Overload Noise: Results when input signal is larger in magnitude than highest quantization level resulting in clipping of the signal. q Timing Jitter: Error caused by a shift in the sampler position. Can be isolated with stable clock reference. Channel Effects q Channel Noise q Intersymbol Interference (ISI) 37

Signal to Quantization Noise Ratio The level of quantization noise is dependent on how

Signal to Quantization Noise Ratio The level of quantization noise is dependent on how close any particular sample is to one of the L levels in the converter n For a speech input, this quantization error resembles a noiselike disturbance at the output of a DAC converter n 38

Uniform Quantization n A quantizer with equal quantization level is a Uniform Quantizer Each

Uniform Quantization n A quantizer with equal quantization level is a Uniform Quantizer Each sample is approximated within a quantile interval Uniform quantizers are optimal when the input distribution is uniform q n n i. e. when all values within the range are equally likely Most ADC’s are implemented using uniform quantizers Error of a uniform quantizer is bounded by 39

Signal to Quantization Noise Ratio n The mean-squared value (noise variance) of the quantization

Signal to Quantization Noise Ratio n The mean-squared value (noise variance) of the quantization error is given by: 40

n The peak power of the analog signal (normalized to 1 Ohms )can be

n The peak power of the analog signal (normalized to 1 Ohms )can be expressed as: n Therefore the Signal to Quatization Noise Ratio is given by: 41

If q is the step size, then the maximum quantization error that can occur

If q is the step size, then the maximum quantization error that can occur in the sampled output of an A/D converter is q n where L = 2 n is the number of quantization levels for the converter. (n is the number of bits). n Since L = 2 n, SNR = 22 n or in decibels 42

Nonuniform Quantization n n Nonuniform quantizers have unequally spaced levels q The spacing can

Nonuniform Quantization n n Nonuniform quantizers have unequally spaced levels q The spacing can be chosen to optimize the Signal-to-Noise Ratio for a particular type of signal It is characterized by: q Variable step size q Quantizer size depend on signal size 43

n Many signals such as speech have a nonuniform distribution q See Figure on

n Many signals such as speech have a nonuniform distribution q See Figure on next page (Fig. 2. 17) Basic principle is to use more levels at regions with large probability density function (pdf) n q Concentrate quantization levels in areas of largest pdf Or use fine quantization (small step size) for weak signals and coarse quantization (large step size) for strong signals q 44

Statistics of speech Signal Amplitudes Figure 2. 17: Statistical distribution of single talker speech

Statistics of speech Signal Amplitudes Figure 2. 17: Statistical distribution of single talker speech signal magnitudes (Page 81) 45

Nonuniform quantization using companding n n Companding is a method of reducing the number

Nonuniform quantization using companding n n Companding is a method of reducing the number of bits required in ADC while achieving an equivalent dynamic range or SQNR In order to improve the resolution of weak signals within a converter, and hence enhance the SQNR, the weak signals need to be enlarged, or the quantization step size decreased, but only for the weak signals But strong signals can potentially be reduced without significantly degrading the SQNR or alternatively increasing quantization step size The compression process at the transmitter must be matched with an equivalent expansion process at the receiver 46

n n The signal below shows the effect of compression, where the amplitude of

n n The signal below shows the effect of compression, where the amplitude of one of the signals is compressed After compression, input to the quantizer will have a more uniform distribution after sampling At the receiver, the signal is expanded by an inverse operation n The process of COMpressing and ex. PANDING the signal is called companding n Companding is a technique used to reduce the number of bits required in ADC or DAC while achieving comparable SQNR n 47

n Basically, companding introduces a nonlinearity into the signal q This maps a nonuniform

n Basically, companding introduces a nonlinearity into the signal q This maps a nonuniform distribution into something that more closely resembles a uniform distribution q A standard ADC with uniform spacing between levels can be used after the compandor (or compander) q The companding operation is inverted at the receiver n There are in fact two standard logarithm based companding techniques q US standard called µ-law companding q European standard called A-law companding 48

Input/Output Relationship of Compander n n Logarithmic expression Y = log X is the

Input/Output Relationship of Compander n n Logarithmic expression Y = log X is the most commonly used compander This reduces the dynamic range of Y 49

Types of Companding -Law Companding Standard (North & South America, and Japan) where n

Types of Companding -Law Companding Standard (North & South America, and Japan) where n x and y represent the input and output voltages n is a constant number determined by experiment n In the U. S. , telephone lines uses companding with = 255 q q q n Samples 4 k. Hz speech waveform at 8, 000 sample/sec Encodes each sample with 8 bits, L = 256 quantizer levels Hence data rate R = 64 kbit/sec = 0 corresponds to uniform quantization 50

A-Law Companding Standard (Europe, China, Russia, Africa) where q x and y represent the

A-Law Companding Standard (Europe, China, Russia, Africa) where q x and y represent the input and output voltages q A = 87. 6 q A is a constant number determined by experiment 51

Pulse Modulation n Recall that analog signals can be represented by a sequence of

Pulse Modulation n Recall that analog signals can be represented by a sequence of discrete samples (output of sampler) Pulse Modulation results when some characteristic of the pulse (amplitude, width or position) is varied in correspondence with the data signal Two Types: q Pulse Amplitude Modulation (PAM) n q The amplitude of the periodic pulse train is varied in proportion to the sample values of the analog signal Pulse Time Modulation n Encodes the sample values into the time axis of the digital signal Pulse Width Modulation (PWM) q Constant amplitude, width varied in proportion to the signal Pulse Duration Modulation (PDM) q sample values of the analog waveform are used in determining the width of the pulse signal 52

53

53

PCM Waveform Types n n n n The output of the A/D converter is

PCM Waveform Types n n n n The output of the A/D converter is a set of binary bits But binary bits are just abstract entities that have no physical definition We use pulses to convey a bit of information, e. g. , In order to transmit the bits over a physical channel they must be transformed into a physical waveform A line coder or baseband binary transmitter transforms a stream of bits into a physical waveform suitable for transmission over a channel Line coders use the terminology mark for “ 1” and space to mean “ 0” In baseband systems, binary data can be transmitted using many kinds of pulses 54

n n n There are many types of waveforms. Why? performance criteria! Each line

n n n There are many types of waveforms. Why? performance criteria! Each line code type have merits and demerits The choice of waveform depends on operating characteristics of a system such as: q Modulation-demodulation requirements q Bandwidth requirement q Synchronization requirement q Receiver complexity, etc. , 55

Goals of Line Coding (qualities to look for) n A line code is designed

Goals of Line Coding (qualities to look for) n A line code is designed to meet one or more of the following goals: q Self-synchronization n The ability to recover timing from the signal itself q That is, self-clocking (self-synchronization) - ease of clock or signal recovery for symbol synchronization n Long series of ones and zeros could cause a problem q Low probability of bit error n Receiver needs to be able to distinguish the waveform associated with a mark from the waveform associated with a space n BER performance q relative immunity to noise n Error detection capability q enhances low probability of error 56

q q Spectrum Suitable for the channel n Spectrum matching of the channel q

q q Spectrum Suitable for the channel n Spectrum matching of the channel q e. g. presence or absence of DC level n In some cases DC components should be avoided n The transmission bandwidth should be minimized Power Spectral Density n Particularly its value at zero q PSD of code should be negligible at the frequency near zero Transmission Bandwidth n Should be as small as possible Transparency n The property that any arbitrary symbol or bit pattern can be transmitted and received, i. e. , all possible data sequence should be faithfully reproducible 57

Line Coder n n The input to the line encoder is the output of

Line Coder n n The input to the line encoder is the output of the A/D converter or a sequence of values an that is a function of the data bit The output of the line encoder is a waveform: where f(t) is the pulse shape and Tb is the bit period (Tb=Ts/n for n bit quantizer) n This means that each line code is described by a symbol mapping function an and pulse shape f(t) n Details of this operation are set by the type of line code that is being used 58

Summary of Major Line Codes n n Categories of Line Codes q Polar -

Summary of Major Line Codes n n Categories of Line Codes q Polar - Send pulse or negative of pulse q Unipolar - Send pulse or a 0 q Bipolar (a. k. a. alternate mark inversion, pseudoternary) n Represent 1 by alternating signed pulses Generalized Pulse Shapes q NRZ -Pulse lasts entire bit period n Polar NRZ n Bipolar NRZ q RZ - Return to Zero - pulse lasts just half of bit period n Polar RZ n Bipolar RZ q Manchester Line Code n Send a 2 - pulse for either 1 (high low) or 0 (low high) n Includes rising and falling edge in each pulse n No DC component 59

q q When the category and the generalized shapes are combined, we have the

q q When the category and the generalized shapes are combined, we have the following: Polar NRZ: n Wireless, radio, and satellite applications primarily use Polar NRZ because bandwidth is precious Unipolar NRZ n Turn the pulse ON for a ‘ 1’, leave the pulse OFF for a ‘ 0’ n Useful for noncoherent communication where receiver can’t decide the sign of a pulse q fiber optic communication often use this signaling format Unipolar RZ n RZ signaling has both a rising and falling edge of the pulse n This can be useful for timing and synchronization purposes 60

Bipolar RZ n A unipolar line code, except now we alternate between positive and

Bipolar RZ n A unipolar line code, except now we alternate between positive and negative pulses to send a ‘ 1’ n Alternating like this eliminates the DC component q This is desirable for many channels that cannot transmit the DC components Generalized Grouping q Non-Return-to-Zero: NRZ-L, NRZ-M NRZ-S q Return-to-Zero: Unipolar, Bipolar, AMI q Phase-Coded: bi-f-L, bi-f-M, bi-f-S, Miller, Delay Modulation q Multilevel Binary: dicode, doubinary q n Note: There are many other variations of line codes (see Fig. 2. 22, page 80 for more) 61

Commonly Used Line Codes n Polar line codes use the antipodal mapping q q

Commonly Used Line Codes n Polar line codes use the antipodal mapping q q Polar NRZ uses NRZ pulse shape Polar RZ uses RZ pulse shape 62

Unipolar NRZ Line Code n Unipolar non-return-to-zero (NRZ) line code is defined by unipolar

Unipolar NRZ Line Code n Unipolar non-return-to-zero (NRZ) line code is defined by unipolar mapping Where Xn is the nth data bit n In addition, the pulse shape for unipolar NRZ is: where Tb is the bit period 63

Bipolar Line Codes n With bipolar line codes a space is mapped to zero

Bipolar Line Codes n With bipolar line codes a space is mapped to zero and a mark is alternately mapped to -A and +A n. It is also called pseudoternary signaling or alternate mark inversion (AMI) n. Either RZ or NRZ pulse shape can be used 64

Manchester Line Codes n Manchester line codes use the antipodal mapping and the following

Manchester Line Codes n Manchester line codes use the antipodal mapping and the following split-phase pulse shape: 65

Summary of Line Codes 66

Summary of Line Codes 66

67

67

Comparison of Line Codes n n n Self-synchronization q Manchester codes have built in

Comparison of Line Codes n n n Self-synchronization q Manchester codes have built in timing information because they always have a zero crossing in the center of the pulse q Polar RZ codes tend to be good because the signal level always goes to zero for the second half of the pulse q NRZ signals are not good for self-synchronization Error probability q Polar codes perform better (are more energy efficient) than Unipolar or Bipolar codes Channel characteristics q We need to find the power spectral density (PSD) of the line codes to compare the line codes in terms of the channel characteristics 68

Comparisons of Line Codes Different pulse shapes are used q to control the spectrum

Comparisons of Line Codes Different pulse shapes are used q to control the spectrum of the transmitted signal (no DC value, bandwidth, etc. ) q guarantee transitions every symbol interval to assist in symbol timing recovery 1. Power Spectral Density of Line Codes (see Fig. 2. 23, Page 90) n After line coding, the pulses may be filtered or shaped to further improve there properties such as q Spectral efficiency q Immunity to Intersymbol Interference n Distinction between Line Coding and Pulse Shaping is not easy 2. DC Component and Bandwidth n DC Components q Unipolar NRZ, and unipolar RZ all have DC components q Bipolar RZ and Manchester NRZ do not have DC components n 69

n First Null Bandwidth q q q Unipolar NRZ, and bipolar all have 1

n First Null Bandwidth q q q Unipolar NRZ, and bipolar all have 1 st null bandwidths of Rb = 1/Tb Unipolar RZ has 1 st null BW of 2 Rb Manchester NRZ also has 1 st null BW of 2 Rb, although the spectrum becomes very low at 1. 6 Rb 70

Generation of Line Codes n n The FIR filter realizes the different pulse shapes

Generation of Line Codes n n The FIR filter realizes the different pulse shapes Baseband modulation with arbitrary pulse shapes can be detected by q correlation detector q matched filter detector (this is the most common detector) 71

Bits per PCM word and M-ary Modulation n Section 2. 8. 4: Bits per

Bits per PCM word and M-ary Modulation n Section 2. 8. 4: Bits per PCM Word and Bits per Symbol § n Section 2. 8. 5: M-ary Pulse Modulation Waveforms § n L=2 l M = 2 k Problem 2. 14: The information in an analog waveform, whose maximum frequency fm=4000 Hz, is to be transmitted using a 16 -level PAM system. The quantization must not exceed ± 1% of the peak-topeak analog signal. (a) What is the minimum number of bits per sample or bits per PCM word that should be used in this system? (b) What is the minimum required sampling rate, and what is the resulting bit rate? (c) What is the 16 -ary PAM symbol Transmission rate? 72

Solution to Problem 2. 14 73

Solution to Problem 2. 14 73