Vous êtes sur la page 1sur 4

EE390

OBJECTIVES

PULSE CODE MODULATION

Lab #5

1. Familiarize with the concept of sampling. 2. Familiarize with Analog to Digital conversion: A. Measure the Input/Output characteristics of the A/D converter, B. Understand PCM compression laws. 3. Familiarize with Pulse Coded Modulation. 4. Observe PCM drawbacks quantization noise evaluation and its impact on the original analog signal recovery.

A. SAMPLING Equipment: PAM/ASK Generator, Dual Function Generator, Oscilloscope. Connections: ensuring proper line terminations where required. 1. 2. 3. 4. 5. Connect a BNC T-connector on the PAM / ASK Generator AUDIO / CARRIER INPUT Connect the Dual Function Generator OUTPUT A to the PAM / ASK Generator AUDIO / CARRIER INPUT. Connect the PAM / ASK Generator AUDIO / CARRIER INPUT to the Oscilloscope CHANNEL 2. Connect the Dual Function Generator B SYNC / TTL OUTPUTS to the PAM / ASK Generator CLOCK / DATA INPUT. Connect the PAM / ASK Generator PAM / ASK OUTPUT to the Oscilloscope CHANNEL 1. Dual Function Generator: - CHANNEL A (the message signal): generate Triangular waveform with frequency 2 kHz, 2 VPP. - CHANNEL B (the sampling signal): generate a 20 kHz signal (waveform is not important). 2. 3. Oscilloscope: set the Trigger to Channel 2. PAM / ASK Generator: select the NAT sampling MODE.

Parameter Settings 1.

Measurements and Observations

Lab #5

Page 1 of 4

Q1. Carefully adjust the sampling rate to obtain a stable display on the oscilloscope. Do this by slowly adjusting the frequency until the display stops travelling across the display. What does this display represent? How many samples are taken of each cycle of the message signal? How does the display change if the FLAT sampling MODE is selected? Which edge of the sampling pulse is the sample taken from (in FLAT mode)? Remove all connections when finished Q1. B. A/D CONVERSION Equipment: Dual Function Generator, PCM Encoder, Logic Analyzer, DC Voltmeter / DC Source, Oscilloscope. Connections: Ensuring proper line terminations where required. 1. 2. 3. 4. 5. The DC Voltmeter / DC Source OUTPUT to the PCM Encoder AUDIO INPUT (direct the connection, no loads at all) The Dual Function Generator SYNC / TTL OUTPUTS to the PCM Encoder CLOCK INPUT and the Oscilloscope CHANNEL 2. The PCM Encoder 8 bit PARALLEL OUTPUT to the Logic Analyzer DATA INPUT The PCM Encoder SERIAL OUTPUT to the Oscilloscope CHANNEL 1. The PCM Encoder EOC (End of Conversion) OUTPUT to the Oscilloscope EXT TRIGGER. Dual Function Generator CHANNEL A: set output frequency 8 kHz. Oscilloscope: set the Trigger to EXT and the Time Ref. to Left (Main/Delayed). PCM Encoder: set the COMPRESSION LAW to 2 (be careful sometime the LEDs dont line up exactly). Logic Analyzer: set the DISPLAY MODE to INPUT DATA. DC Voltmeter / DC Source: set the VOLTAGE DISPLAY to SOURCE.

Parameter Settings 1. 2. 3. 4. 5. Q2. a) Measure the A/D converter transfer characteristics quantization using compression law 2. Record the first and last DC voltage of each segment (see explanation below) as the DC voltage input increases in the range -2V+2V, finding the corresponding code words using the osciloscope. Create a table with the resolution of each segment, along with the breakpoints between segments. The breakpoints can be obtained by taking the midpoint of the voltage change from one segment to another segment. For example: Seg 00, code 111 has X Vdc and Seg 01, code 000 has Y Vdc then: Breakpoint = X+ (Y-X)/2

Measurements and Observations

Lab #5

Page 2 of 4

It can be seen that our quantizer has a resolution of 6-bits (8-bits actually, but last two bits are fixed), hence it can map input signals to one of 64 levels. The figure below shows what each bit at the output of the PCM ENCODER represents.

} Polarity

Segment

}
0 0
Page 3 of 4

b) If the compression law is set to 0, how the resolution of two different segments is related to each other? If you are looking at a particular signal thats really small for almost all the time, what type of compression law would you use: 0, 2, 4, 10? Why?

C. PULSE CODE MODULATION Equipment: Dual Function Generator, PCM Encoder, PCM Decoder, Signal Interrupter/Selector, Oscilloscope. Connections 1. 2. 3. 4. 5. The Dual Function Generator SYNC/TTL OUTPUTS A to the PCM Encoder CLOCK INPUT. The Dual Function Generator CHANNEL B to the PCM Encoder AUDIO INPUT and to the Oscilloscope CHANNEL 2. The PCM Encoder PARALLEL OUTPUT to the Signal Interrupter / Selector INPUTS. The Signal Interrupter OUTPUTS to the PCM Decoder INPUT / OUTPUT. The PCM Decoder AUDIO OUTPUT to the Oscilloscope CHANNEL 1 (look at the load value) Dual Function Generator 2. 3. 4. Channel A: Retain the current settings as for Q3 Channel B: Generate a Triangular waveform with frequency 1 kHz, 1 VPP.

Parameter Settings 1.

Oscilloscope: set the Trigger to CHANNEL 2. PCM Encoder: set the COMPRESSION LAW to DIR. PCM Decoder: set the INPUT CODE to OFFSET.

Lab #5

Bits

5.

Signal Interrupter / Selector: set the SIGNAL INTERRUPTER to O for all interrupters.

Measurements and Observations Q3. To determine the effect of input signal level: observe and record the waveforms of the PCM Decoder AUDIO OUTPUT. Adjust the PCM Encoder AUDIO INPUT level from 1Vpp to 2 VPP, 3 VPP, and 4 VPP and observe/record each waveform. Plot all waveforms obtained. What happens with the signal at the decoder as the peak-to-peak voltage increases? Since the quantizers number of bits is kept constant, what modifications would need to be done to the segments resolutions and maximum detectable input level? Q4. To observe the effect of the sampling rate: reset the PCM Encoder AUDIO INPUT level to 2 VPP. Adjust the sampling rate from 8 kHz to 44.1 kHz. Observe and record the waveform. Compare/explain the results you obtain for different sampling rates. D. QUANTIZATION ERROR Equipment: Dual Function Generator, PCM Encoder, PCM Decoder, Signal Interrupter/Selector, Noise Measurement Filters, FM/PM Receiver, Oscilloscope. Connections - Retain the settings as above and - Connect the PCM Decoder AUDIO OUTPUT to the Oscilloscope CHANNEL 1 and the Dual Audio Amplifier AUDIO INPUT 1. Parameter Settings 1. 2. 3. Dual Function Generator CHANNEL B: Generate a Sine wave, frequency 1 kHz, 2 VPP. PCM Encoder: set the COMPRESSION LAW to DIR. PCM Decoder: set the INPUT CODE to OFFSET.

Measurements and Observations Q5. Disconnect the PCM Decoder AUDIO OUTPUT from the Oscilloscope CHANNEL 1 and connect the cable to the Error Measurement Filters NOTCH FILTER INPUT. Set the CENTER FREQUENCY for this filter f1 =1 kHz. Connect the Measurement Filter NOTCH FILTER OUTPUT to the Oscilloscope CHANNEL 1. Adjust the PCM Encoder AUDIO INPUT level to 2 VPP. Observe the quantization error waveforms. Record these waveforms for both linear and 2-law encoding. How this quantization error waveform relates to the input signal and the quantized signal?

Lab #5

Page 4 of 4