Está en la página 1de 8

David Mungai

16158027

PCM ENCODING AND DECODING LAB REPORT


PCM Encoding and Decoding 1

David Mungai

16158027

The aim of this experiment is to introduce the PCM ENCODER module and to illustrate the recovery of the analog message from the digital signal. This module generates a pulse code modulated PCM- output signal from an analog input message.

Introduction
Pulse Code Modulation is a method of converting an analog signal into digital signals. Information in analog form cannot be processed by digital computers so it's necessary to convert them into digital form. PCM is a term which was formed during the development of digital audio transmission standards. Digital data can be transported robustly over long distances unlike the analog data and can be interleaved with other digital data so various combinations of transmission channels can be used. In the text which follows this term will apply to encoding technique which means digitalization of analog information in general. PCM doesn`t mean any specific kind of compression, it only implies PAM (pulse amplitude modulation) - quantization by amplitude and quantization by time which means digitalization of the analog signal. The range of values which the signal can achieve (quantization range) is divided into segments, each segment has a segment representative of the quantization level which lies in the middle of the segment. To every quantization segment (and quantization level) one and unique code word (stream of bits) is assigned. The value that a signal has in certain time is called a sample. The process of taking samples is called quantization by time. After quantization by time, it is necessary to conduct quantization by amplitude. Quantization by amplitude means that according to the amplitude of sample one quantization segment is chosen (every quantization segment contains an interval of amplitudes) and then record segments code word. A PCM encoded signal is nothing more than stream of bits.

PCM ENCODING
The input to the PCM ENCODER module is an analog message and must be constrained to a defined bandwidth and amplitude range, with the Nyquist criterion being observed. The message amplitude was held within the range of the TIMS ANALOG REFERENCE LEVEL of 2 volts peak. Module Operation The module is driven by an external TTL clock. The input analog message is sampled periodically. The sample rate is a sub-multiple of the external clock. The sampling is a sampleand-hold operation. It is internal to the module, and cannot be viewed by the user. What is held is the amplitude of the analog message at the sampling instant. Each sample amplitude is compared with a finite set of amplitude levels. These are distributed (uniformly, for linear sampling) within the TIMS ANALOG REFERENCE LEVEL. These are the system quantizing levels of the signal. Each quantizing level is assigned a number, starting from zero for the lowest (most negative) level, with the highest number being (L-1), where L is the available number of levels. Each sample is assigned a digital (binary) code word representing the number associated with the quantizing level which is closest to the sample amplitude. The number of digits n in the digital code word will depend upon the number of quantizing levels. In fact, n=log2(L). The code word is assembled into a time frame together with other bits as may be required. In the TIMS PCM ENCODER, a single extra bit is added in the least significant bit position, alternately a one or a zero. These bits are subsequent decoders for frame synchronization. The frames are transmitted serially. They are transmitted at the same rate as PCM Encoding and Decoding 2

David Mungai

16158027

the samples are taken. The serial bit stream appears as the output of the module. A synchronizing signal frame synch (FS) signals the end of each data frame.

PCM DECODING
Decoding is recovering the message from the serial stream of binary numbers. It involves identifying each new frame in the data stream, extracting the binary numbers from each frame, and generating a voltage that is proportional to the binary number. Furthemore, it includes holding the voltage on the output until the next frame has been decoded (thereby forming a pulse amplitude modulation (PAM) version of the original message signal, and reconstructing the message by passing the PAM signal through a low-pass filter.

Experiment
The following diagrams were observed. Maximum negative Vin

4 bit PCM for zero amplitude input For task 18 we changed to a periodic message by connecting the SYNC MESSAGE of the PCM ENCODER via a BUFFER AMPLIFIER to its input Vin. An amplitude of 6 Vpp was chosen to slow down the oscilloscope sweep speed to 1ms/cm.

PCM Encoding and Decoding

David Mungai

16158027

Task 18 The coding bit was then changed from 4-bit to 7-bit by changing the front panel toggle switch of both the PCM ENCODER and PCM DECODER from 4-bit to 7-bit.

Task 19 4-bit

PCM Encoding and Decoding

David Mungai

16158027

Task 19 7-bit It was observed that the 7-bit scheme had more steps than the 4-bit scheme

For task 22, we verified the companding algorithm installed in the encoder by using the front panel toggle switches on both modules to select 4-bit companding. Because of the speed limitations of the modules it was not possible to use speech as the message to observe the effects of companding. The effective bandwidth of the system was not wide enough as well.

Task 22 hi

PCM Encoding and Decoding

David Mungai

16158027

Task 22 low

Task 22 mid

Task 22 down maximum negative PCM Encoding and Decoding 6

David Mungai

16158027

Task 22 down maximum positive

Task 22 up up

Conclusion
Pulse code modulation is a digital scheme for transmitting analog data. There are only two possible states in PCM; that is logic 1 (high) and logic 0 (low), so the signals in PCM are binary. Using PCM, it is possible to digitize all forms of analog data, including full-motion video, voices, music, telemetry, and virtual reality (VR). To obtain PCM from an analog waveform at the source (transmitter) end of a communications circuit, the analog signal amplitude is sampled (measured) at regular time intervals. The sampling rate, or number of samples per second, is several times the maximum frequency of the analog waveform in cycles per second or hertz. The instantaneous amplitude of the analog PCM Encoding and Decoding 7

David Mungai

16158027

signal at each sampling is rounded off to the nearest of several specific, predetermined levels. This process is called quantization. The number of levels is always a power of 2. The output of a pulse code modulator is thus a series of binary numbers, each represented by some power of 2 bits. At the destination (receiver end) of the communications circuit, a pulse code demodulator converts the binary numbers back into pulses having the same quantum levels as those in the modulator. These pulses are further processed to restore the original analog waveform.

PCM Encoding and Decoding

También podría gustarte