You are on page 1of 32

Sampling

First step in digitizing speech Establish a set of discrete times at which the input waveform is sampled Sampling Intervals
Regular Irregular

Minimum sampling frequency is given by Nyquist theorem. To reconstruct the original waveform from the sampled sequence the sampling frequency must be at least twice the maximum frequency of the original waveform.

Fs 2H
Fs=Sampling frequency or Nyquist rate H=maximum frequency component in the analog waveform

Sampling
H is the bandwidth of the input waveform In this case the waveform is reconstructed by passing the sampled values through a low pass filter which smoothens out or interpolates the signal between sampled values
vi(t) (t) V i time (i) Input Signal Waveform

1
vi(t)

vo(t) time
T T T

(ii) Sampling

(iii) Sampled Signal Waveform

Samples are coded for transmission (iv)

Analogue-to-digital Converter ...011101010011010011...

Sampled signal is recovered (v)

Digital-to-analogue Converter

PAM System
Sampling is a process of multiplying a constant amplitude impulse train with the input signal Like an Amplitude modulation system where pulse train acts as the carrier Called Pulse Amplitude Modulation (PAM)

Foldover Distortion
For a sine carrier Frequency range is Fc-H to Fc+H (Fc is carrier frequency) For PAM, the output spectrum contains the fundamental as well as the harmonics of the fundamentals. If the pulse train is square wave with 50% duty cycle, only the fundamental and odd harmonics are present. The low pass filter at the receiver end allows only the baseband component 0-H to pass. If Fs is less than twice H, portions of PAM spectrum overlaps This overlapping of the sidebands produces beat frequencies that interfere with the desired signal and such an interference is referred as aliasing or foldover distortion. The filter used for band limiting the input speech waveform is known as antialiasing filter..

Foldover Distortion
In digital speech system speech is sampled as 8KHz. 8KHz sampling results in oversampling. This oversampling provides for the nonideal filter characteristics such as lack of sharp cutoff. The sampled signal is sufficiently attenuated at the overlap frequency of 4 KHz. To adequately reduce the energy level of the foldover spectrum

Quantization and Binary Coding


Pulse amplitude modulation systems are not useful over long distance, for the vulnerability of individual pulse amplitudes to noise, distortion and crosstalk. The susceptibility of amplitude may be eliminated by converting the PAM samples into a digital format. (Using regenerative repeaters) A finite number of bits are used for coding PAM samples. n bit number can represent 2n samples. PAM samples amplitude can take on an infinite range of values. The PAM sample amplitude is quantized to the nearest of a range of discrete amplitude levels.

Quantization Process
Signal V is confined to a range of VL and VH. This range is divided into M (M=8) equal steps. The step size S is given by

S=

(VH VL )
M

The center of each steps locate the quantization levels V0, V1V8. Quantized signal Vq takes any of the quantized level value A signal V is quantized to its nearest quantization level. The convention followed to quantize the signal is

Vq =V3 (if (V3-S/2) V< (V3+S/2) Vq =V4 (if (V4-S/2) V< (V4+S/2)
Thus, the signal Vq makes quantum jump of step size S and at any instant of time the quantization error (V-Vq) has magnitude which is equal or less than S/2 The quantization in which the step size is uniform is called linear or uniform quantization.

Quantization
Quantization brings about a certain amount of noise in immunity to the signal. Repeaters with quantizers are used after certain distance to control the variation in instantaneous amplitude for attenuation and channel noise within S/2. If instantaneous noise level is larger than S/2, error occurs in the quantization level. The quantized signal is an approximate of the original signal. Quality can be increased by increasing the number of quantization levels Sometimes increased levels introduces noise in the repeaters. The susceptibility to noise can be greatly minimized by resorting the digital coding of the PAM sample amplitude Each quantized level is represented by a code number and transmitted instead of the level value. If binary arithmetic is used the number will be transmitted as a series of pulses. Such a system is called PCM System.

Binary PCM
The analog signal is limited in its excursions to the range -4 V to + 4V. The step size is 1 volt. Eight quantization levels are used and are located at 3.5V, -2.5V ., +3.5V. Code number 000 is assigned to 3.5V and so on. If the analog samples are transmitted the 1.3, 2.7, 0.5 etc will be transmitted. If the quantized values are transmitted voltages 1.5, 2.5, 0.5 etc will be transmitted In binary PCM the binary code patterns 101, 110,100 are transmitted.

PCM System
The functional diagram for PCM is shown in the next figure The analog input V is bandlimited to 3.4 KHz to prevent aliasing and sampled at 8 KHZ. Samples are quantized to produce PAM signals, and applied to encoder. Encoder generates a unique pulse pattern for each quantized sample level. The quantizer and encoder together work as Analog to Digital Converter (ADC) Receiver first separates the noise from the signals. A qunatizer does it by determining the two voltage levels of the pulse. Then it regenerates the appropriate pulse depending on the decision. The regenerated pulse train is now fed to a decoder which assembles the pulse pattern and generates a corresponding quantised voltage level. Qunatizer and decoder work together as a Digital to Analog converter (DAC) The quantized PAM is now passed through a filter which rejects the frequency components lying outside the baseband signal.

PCM System

Digital Data, Digital Signal Digital signal


Discrete, discontinuous voltage pulses Each pulse is a signal element Binary data encoded into signal elements

Terms Unipolar
All signal elements have same sign

Polar
One logic state represented by positive voltage the other by negative voltage

Data rate
Rate of data transmission in bits per second

Duration or length of a bit


Time taken for transmitter to emit the bit

Terms Modulation rate


Rate at which the signal level changes Measured in baud = signal elements per second

Mark and Space


Binary 1 and Binary 0 respectively

Interpreting Signals Need to know


Timing of bits - when they start and end Signal levels

Factors affecting successful interpreting of signals


Signal to noise ratio Data rate Bandwidth

Analogue to Digital
After sampling, the analogue amplitude value of each sampled (PAM) signal is quantized into one of a number of L discrete levels. The result is a quantized PAM signal. A codeword can then be used to designate each level at each sample time. This procedure is referred to as Pulse Code Modulation.
Quantized PAM signal Continuoustime message signal Low-pass Filter Sampler Quantizer Encoder; Pulse modulate PCM wave

Encoding
After quantization, a digit is assigned to each of the quantized signal levels in such a way that each level has a one-to-one correspondence with the set of real integers. This is called digitization of the waveform. Each integer is then expressed as an n-bit binary number, called codeword, or PCM word. The number of codewords, M , is related to n by: 2n = M

Quantized digitization PCM A real To binary PAM codeword integer signal (bit stream)

Codeword
Quantization followed by digitization maps input amplitudes into PCM words. A cell is the set of input amplitudes mapped to a codeword. There are M integers, PCM words, or codewords to correspond to the M allowed output amplitudes of the quantizer. Codebook is the set of all these M codewords.

Analogue to Digital
2. Quantize into discrete levels 1. Sample analogue waveform at discrete times
Sign bit 7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7 1111 1101 1011 1001 0111 0101 0011 0000 0010 0100 0110 1000 1010 1100 1110

voltage Analogue waveform time

3. Digitize into real integers


-7 -4 -2 -1 0 1 2 5 1110 1000 0100 0010 0000 0011 0101 1011
11101000010000100000001101011011 1 0

4. To binary

PCM Codeword Bit stream

Encoder Attributes RZ (return to zero), NRZ (non-return to zero) Unipolar, Polar, Bipolar Biphase

NRZ coding may be unipolar or polar

Unipolar NRZ-L

Polar NRZ-L

NRZ-L Coding NRZ-L (level):


1 higher level; 0 lower level

Used in SONET XOR bit sequence, and in early magnetic tape recording Long sequence of same bit causes difficulty in clock recovery; also in detecting the average DC level

NRZ pros and cons Pros


Easy to engineer Make good use of bandwidth

Cons
dc component Lack of synchronization capability

Used for magnetic recording Not often used for signal transmission

RZ Coding may be unipolar or bipolar


1 1 0 1 1 1 0 0 0 1

Unipolar RZ Bipolar RZ

RZ Coding may be unipolar or bipolar


Unipolar-RZ:
1 is represented by positive for the first half of T and zero for the second half. 0 is represented by 0

Bipolar-RZ:
1 is represented by positive for the first half of T and zero for the second half. 0 is represented by negative for the first half of T and zero for the second half.

Used in baseband data transmission, magnetic recording. The transitions at T/2 may be used for synchronization.

Quantization Noise
The quantized signal is an approximation to the original signal and some error. The instantaneous error e= V-Vq is randomly distributed within the range S/2 and is called quantization error or noise. The mean square quantization error is S2. For linear quantization the probability distribution of the error is constant within the (S/2).

Quantization Noise
The average qunatization noise output power is given by the variance

2 =

2 ( e ) p (e) de

1 = (e 0) de S S / 2
2 2

S /2

Where =mean, which is zero for qunatization noise. The range of qunatization error (S/2) determines the limits of integration.

1 = e2 S S / 2 1e = S 3 S / 2
3 S /2

S /2

S2 = 12

Quantization Noise
Signal to quantization noise ratio (SQR) is a good measure of performance of a PCM system transmitting speech. If Vr is the r.m.s. value of the input signal and the resistance level is 1 ohm, then SQR is given by

2 Vr SQR = 10 log

dB S2 12 Vr = 10 log(12) + 20 log S dB Vr = 10.8 + 20 log dB S

( )

Quantization Noise
If the input signal is a sinusoidal wave and Vm as the maximum amplitude, SQR may be calculated from the full range sine wave as

2 Vm 2 SQR = 10 log S 12 dB 2 = 10 log(6) + 20 log (Vm S ) dB

= 7.78 + 20 log (Vm S ) dB

Quantization Noise Expressing S in terms of Vm and the number of steps, M, we have

SQR = 10 log

( 4V

(V 2 )
2 m 2 m

12 M

dB

=10 log(1.5M 2 ) dB = 20 log(1.225M )dB

Quantization Noise
Quantity 1.225M represents the signal to quantization noise voltage ratio for a full range sinusoidal input voltage. M=2n, where n is the number of bits used to code a quantization level. Therefore

SQR = 20 log(1.225) + 20n log(2) dB = 1.76 + 6.02n dB

Quantization Noise
The table is showing the values of SQR for different binary code word sizes for sinusoidal input systems Every additional code bits gives an increment of 6 dB in SQR

You might also like