Lab 02 - Pulse Code Modulation (PCM) - Simulink Lab Report
Lab 02 - Pulse Code Modulation (PCM) - Simulink Lab Report
Name-Surname-Number:
Name-Surname-Number:
Name-Surname-Number:
In digital communication system, input of the modulator must be digital signal. If the signal source
generates an analog signal, it should be converted digital form via analog-to-digital converter (ADC).
ADC includes three steps:
1. Sampling
2. Quantization
3. Pulse Code Modulation (PCM).
x s and x c denote sampled signal output and quantization level, respectively. The quantization error (e)
is calculated as follows:
e=x s −x c
All required blocks and parameters for the PCM Block experiment are given in Figures 1 and Table 1.
Based on these, build the below diagram in Simulink and answer the following questions in detail.
Q1) Set signal frequency as 1 Hz and phase pi/2, sampling frequency as 10 Hz. Run the code for 1
seconds and fill the table. What is the maximum quantization error?
Time (S) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Output of the
sampled signal
Output of the
quantization
Quantization
error (look at
“Scope 2”)
PCM value
(“Symbol”
signal that is
connected to
“Scope”)
Q2) How many bits are used in Q1?
Q3) If 3 bits are used in quantization, write quantization levels and PCM code for each quantization
level (in binary numbers) in the table below (use zero level for output).
1 2 3 4 5 6 7 8
Quantization
levels
PCM Code
(binary)
Q4) What is the interval of the quantization level for 3 bits case (quantization step)?
Q5) Calculate the quantization error power for 2 bits and 3 bits. Make comment.