Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
6 views

digital 3

Uploaded by

a7madsala7ussain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

digital 3

Uploaded by

a7madsala7ussain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Sulaimani Polytechnic University

Engineering Technical College


Communication Department

Digital Communication Lab

Prepared By:
✍️Adil Abdullah
✍️Miran Ari
✍️Tre Mohammad
✍️Honya Abdulrahman
rd
3 stage
✍️Anya Salar

1
Theory:
Modulation is the process of varying one or more parameters of a carrier signal
in accordance with the instantaneous values of the message signal. The message
signal is the signal which is being transmitted for communication and the carrier
signal is a high frequency signal which has no data, but is used for long distance
transmission. There are many modulation techniques, which are classified
according to the type of modulation employed. Of them all, the digital
modulation technique used is Pulse Code Modulation PCM
A signal is pulse code modulated to convert its analog information into a binary
sequence, i.e., 1s and 0s. The output of a PCM will resemble a binary sequence.
The following figure shows an example of PCM output with respect to
instantaneous values of a given sine wave. Instead of a pulse train, PCM
produces a series of numbers or digits, and hence this process is called as digital.
Each one of these digits, though in binary code, represent the approximate
amplitude of the signal sample at that instant. In Pulse Code Modulation, the
message signal is represented by a sequence of coded pulses. This message
signal is achieved by representing the signal in discrete form in both time and
amplitude.
Basic Elements of PCM
The transmitter section of a Pulse Code Modulator circuit consists of Sampling,
Quantizing and Encoding, which are performed in the analog-to-digital
converter section. The low pass filter prior to sampling prevents aliasing of the
message signal. The basic operations in the receiver section are regeneration of
impaired signals, decoding, and reconstruction of the quantized pulse train.
Following is the block diagram of PCM which represents the basic elements of
both the transmitter and the receiver sections.

Figure (1)

2
Sample
This is the technique which helps to collect the sample data at instantaneous
values of message signal, so as to reconstruct the original signal. The sampling
rate must be greater than twice the highest frequency component W of the
message signal, in accordance with the sampling theorem.
Quantizer
Quantizing is a process of reducing the excessive bits and confining the data. The
sampled output when given to Quantizer, reduces the redundant bits and
compresses the value.
Encoder
The digitization of analog signal is done by the encoder. It designates each
quantized level by a binary code. The sampling done here is the sample-and-
hold process. These three sections LPF ,Sampler, and Quantizer will act as an
analog to digital converter. Encoding minimizes the bandwidth used.
Regenerative Repeater
This section increases the signal strength. The output of the channel also has
one regenerative repeater circuit, to compensate the signal loss and reconstruct
the signal, and also to increase its strength.
Decoder
The decoder circuit decodes the pulse coded waveform to reproduce the
original signal. This circuit acts as the demodulator.
Low Pass Filter
This filter eliminates the high frequency components present in the input analog
signal which is greater than the highest frequency of the message signal, to avoid
aliasing of the message signal.
Hence, the Pulse Code Modulator circuit digitizes the given analog signal, codes
it and samples it, and then transmits it in an analog form. This whole process is
repeated in a reverse pattern to obtain the original signal.

3
Advantages and Disadvantages of Pulse Code Modulation
Advantages:
1. It has a good noise-to-signal ratio.
2. It is an efficient method.
3. The efficiency of the transmitter is high.
4. 4Pulse Code Modulation is used in long-distance communication.
Disadvantages:
1. The bandwidth required is high and it is costly.
2. It is a complex process as it requires a lot of steps like sampling,
quantizing, encoding and decoding.
Pulse Code Modulations Applications
1. Digital Audio Transmission: PCM is the standard method for encoding and
transmitting digital audio signals. It's used in CDs, DVDs, and digital audio
broadcasting.
2. Telecommunications: PCM is employed in voice communication systems,
converting analog voice signals into digital for efficient transmission over
communication networks.
3. Medical Imaging: PCM is used in medical imaging techniques like CT scans
and MRI, where precise representation of analog signals (such as radio
frequency pulses) is crucial for diagnostic purposes.
4. Digital Telephony: PCM is fundamental in modern digital telephony
systems, converting analog voice signals into digital for transmission over
digital networks.
5. Data Storage: PCM is utilized in digital data storage systems, such as on
hard drives and solid-state drives, where it helps convert analog signals
(like magnetic fields) into digital data for storage and retrieval.
6. Video Compression: In some video compression techniques, PCM is
involved in the encoding process to represent the audio component of the
video signal.

4
Test 1 (Determining the characteristics of uniform quantizers and
uniform encoders):
Procedure:
For this test we need 4 blocks:
• Constant block from sources in simulink.
• Quantization and uniform encoder block in quantizers in DSP system toolbox.
• Display from sinks in simulink.
then We set constant blocks to the following values (1.3 , 3.6 , 2.3 , 0.7 , -0.7 , -
1.2 , -2.4 , -3.4) .
For quantization block we set quantization interval at (1), as shown in figure (2)
blow:

Figure (2)

For uniform encoder block we set peak at the (4) and bit at the (3), as shown in
figure (3) blow:

Figure (3)

5
Then we connected the blocks as shown in figure (4) blow:

Figure (4)

After connection we run the simulation and we take result in the display as
following and set in to table as shown in table (1) blow:
Input DC voltage Quantized sample PCM code-word
Quantizer error
(sample values) values binary code word
1.3 1 5 -----> 101 -0.3
3.6 4 7 -----> 111 0.4
2.3 2 6 -----> 110 -0.3
0.7 1 5 -----> 101 0.3
-0.7 -1 3 -----> 011 -0.3
-1.2 -1 3 -----> 011 0.2
-2.4 -2 2 -----> 010 0.4
-3.4 -3 1 -----> 001 0.4
Table (1)

Discussion:
In this test we can see the quantzaer work as midtread and we know
midtread have more error then midrise, if we want midrise quantzaer
we use scalar quantizer encorder block, this block can work as
midtread and midrise, if we use this block we donot need uniform
encoder because this block make encoder too. Now we use this block
in our experment, we remove both quantzaer and uniform encoder
block and we set scalar quantizer from quantizers in DSP system
toolbox, and we set in boundery points at the ([-4:4]), we check output
codeword to get encoder and we check output quantizer error and
when we check output quantizer error open part name codebook, we

6
set ([-3.5:3.5]) at the codebook to work as midrise quntizer, as shown
in figuer (5) blow:

Figure (5)

Then we connected the blocks as shown in figure (6) blow:

Figure (6)

After connection we run the simulation and we take result in the display as
following and set in to table as shown in table (2) blow:
Input DC voltage Quantized sample PCM code-word
Quantizer error
(sample values) values binary code word
1.3 1.5 5 -----> 101 -0.2
3.6 3.5 7 -----> 111 0.1
2.3 2.5 6 -----> 110 -0.2
0.7 0.5 4 -----> 101 0.2
-0.7 -0.5 3 -----> 011 -0.2
-1.2 -1.5 2 -----> 010 0.3
-2.4 -2.5 1 -----> 001 0.1
-3.4 -3.5 0 -----> 000 0.1
Table (2)

7
Mid-tread and mid-rise quantization are two types of analog-to-digital
converter (ADC) quantization techniques. The main difference between these
two techniques lies in the way the quantization levels are distributed.
In mid-tread quantization, the zero level is placed exactly in the middle of the
quantization range, and the positive and negative levels are distributed
symmetrically around it. In contrast, in mid-rise quantization, the zero level is
not included in the quantization levels, and the positive and negative levels are
distributed asymmetrically around it.
The following table summarizes the key differences between mid-tread and mid-
rise quantization.
Feature Mid-tread quantization Mid-rise quantization
Placed in the middle of Not included in the
Zero level
the quantization range quantization levels
Distributed
Distributed asymmetrically around
Positive levels symmetrically around the midpoint the lowest
the zero level positive level and the
zero level
Distributed
Distributed asymmetrically around
Negative levels symmetrically around the midpoint the
the zero level highest negative level
and the zero level
Total number of
quantization levels 2n 2n-1

Here, "n" represents the number of bits used in the ADC.


Mid-tread and mid-rise quantization are two commonly used quantization
methods in signal processing. These methods differ in how they assign numerical
In summary, the choice between mid-tread and mid-rise quantization depends
on the specific requirements of the application. Mid-tread quantization is
commonly used in telephony and digital audio, while mid-rise quantization is
used in general-purpose applications such as data acquisition systems.
For example: Mid-rise the step size (Δ) is equal 1 but mid-tread the step size (Δ)
is equal 0.5.

8
values to the analog signal levels.
2𝑚𝑝
Therefore step size = Δ = : where mp=peak voltage, L=level
𝐿

Quantization can be of a uniform or non-uniform type. In a uniform


quantization, the representation levels are uniformly spaced; otherwise, the
quantization is non-uniform.
The uniform quantization characteristic can also be of midtread or midrise type,
as illustrated below.
For the midtread
type, the origin lies in
the middle of a tread
of the staircase like
graph.
For the midrise type,
the origin lies in the
middle of a rising part
of the staircase like
graph.
Despite their
different appearances, both the midtread and midrise types of uniform
quantizers are symmetric about the origin.
If level=8 and Δ=1, for mid-rise the code number is equal to 8 but the mid-tread
the code number is equal to 7 means number 0 cancel or 7 is cancel.
And therefore mid-rise is better than the mid-tread because it has lots of levels.
And mid-tread quantization error is high than mid-rise.

9
Test 2 (Design of PCM modulator and demodulator):

Procedure:
First, we need to find and connect the essential blocks for this experiment:

• Sine-wave and pulse generator block from sources in simulink.


• Sample and hold block from signal opertion in DSP system toolbox HLD
support.
• Scope from sinks in simulink.
• Quantizer, unform encoder and uniform decoder from the quantizers in DSP
system toolbox.
• Low Pass filter, which can be found under DSP systems toolbox under the
name “Analog Filter design”.
Then we set both source blocks to the following values: (4 Sin (2π1000)t) and
the pulse generator with amplitude (1), (pulse width = 10) and frequency 8kHz,
which will be the sampling frquency, as shown in figure (7) blow:

Figure (7)

10
For quantization block we set quantization interval at (1), as shown in figure (8)
blow:

Figure (8)

For uniform encoder block we set peak at the (4) and bit at the (3), as shown in
figure (9) blow:

Figure (9)

11
For uniform decoder block we set peak at the (4) and bit at the (3), as shown in
figure (10) blow

Figure (10)

For low pass filter (LPF) block we set filter order at the (3) and set passband
edge frequency at the (2*pi*1500), as shown in figure (11) blow:

Figure (11)

12
Then we connected the blocks as shown in figure (12) blow:

Figure (12)

After setting the simulation time to 4/1000, we can run the simulation and see
the following result in the scope, as shown in figure (13) blow:

Figure (13)

13
Discussion:
In this test we set sample and hold signal by multiplying sin and pulse
generator and this sample and hold block make both sample and zero hold, as
shown in figure (14) blow:

Figure (14)

And for the quantizer block separated levels by midtread way, as shown in
figure (15) blow:

Figure (15)

For uniform encoder block designates each quantized level by a binary code,
as shown in figure (16) blow:

Figure (16)
For uniform decoder block decodes the pulse coded waveform to reproduce
the original signal, as shown in figure (17) blow:

Figure (17)

14
Final block is low pass filter (LPF) block to get same approximated original
message signal but when we increase the order the message signal get delay
but high quality, as shown in figure (18) blow:

Figure (18)
We can use product block instead sample and hold block but after product
block we need zero order hold block to work as sample and hold block, we set
1
sample time at the (8000 𝑠) , as shown in figure (19) blow:

Figure (19)
Then we connected the blocks as shown in figure (20) blow:

Figure (20)

15
fter setting the simulation time to 4/1000, we can run the simulation and see
the following result in the scope, as shown in figure (21) blow:

Figure (21)

As you can see its same result test 2 but we have one more measuring, its
sample signal this create by predict block.
And for this experiment when we set the frequency message signal is equal to
1000Hz, the setting sine wave we written in frequency (rad/s) is (2*pi*1000)
and the output message signal may be little shifted, so we set the setting low
pass filter (LPF) we written in passband edge frequency (rad/s) is (2*pi*1500),
as shown in figure (22) below:

Figure (22)

Why we set cutoff frequency of low pass filter at the 1500Hz because in
frequency domain we have replayed same message signal we just need original
message because that we use low pass filter to cut other signal for that we

16
should cutoff frequency greater than message signal and lower of sample
frequency, for our experiments we set cutoff frequency at the 1500 Hz because
the message signal equal to (1000Hz) and sample frequency is equal to (8000Hz),
as you can see 1500Hz is greater than message frequency and lower than sample
frequency.

-Fs<-Fc<-Fm Fm<Fc<Fs

Figure (23)

17

You might also like