You are on page 1of 60

INTRODUCTION TO

COMMUNICATION

COURSE no. 3

Assoc. Prof. Luminiţa SCRIPCARIU

10/17/2018 Luminita Scripcariu 1


FROM THE PREVIOUS COURSE

 TRANSMITTER’S COMPONENTS

 RECEIVER’S COMPONENTS

 LOSSLESS COMPRESSION TECHNIQUES

 HUFFMAN CODE

 SHANNON-FANO ALGORITHM
10/17/2018 Luminita Scripcariu 2
1. What do the acronyms below mean?

• TDD
• CDMA
• FSK
• QAM
• OFDM
• DSSS

10/17/2018 Luminita Scripcariu 3


QUESTION 1
Which of the following transmission
techniques are used to separate the
download and upload ways?
 FDD
 TDD
 FDMA
 TDMA

10/17/2018 Luminita Scripcariu 4


QUESTION 1
Which of the following transmission
techniques are used to separate the
download and upload ways?
 FDD
 TDD
 FDMA
 TDMA

10/17/2018 Luminita Scripcariu 5


QUESTION 2
Which of the following blocks are
components of the receiver?
 synchronizing circuit
 equalizer
 modulator
 transceiver

10/17/2018 Luminita Scripcariu 6


QUESTION 2
Which of the following blocks are
components of the receiver?
 synchronizing circuit
 equalizer
 modulator
 transceiver

10/17/2018 Luminita Scripcariu 7


QUESTION 3
Which of the following data encoding
techniques reduce the informational
source redundancy?
 compression
 encryption
 error-correction
 line coding

10/17/2018 Luminita Scripcariu 8


QUESTION 3
Which of the following data encoding
techniques reduce the informational
source redundancy?
 compression
 encryption
 error-correction
 line coding

10/17/2018 Luminita Scripcariu 9


QUESTION 4
What is the purpose of a synchronizing circuit?
 To reduce the signal distortions caused by
the communication channel
 To correct the phase of the carrier signal in
the receiver
 To spread the spectrum of the transmitted
signal
 To reduce the interferences between
channels
10/17/2018 Luminita Scripcariu 10
QUESTION 4
What is the purpose of a synchronizing circuit?
 To reduce the signal distortions caused by
the communication channel
 To correct the phase of the carrier signal in
the receiver
 To spread the spectrum of the transmitted
signal
 To reduce the interferences between
channels
10/17/2018 Luminita Scripcariu 11
QUESTION 5
Which of the following techniques
modulate the amplitude of the carriers?
 AM
 ASK
 FM
 QAM

10/17/2018 Luminita Scripcariu 12


QUESTION 5
Which of the following techniques
modulate the amplitude of the carriers?
 AM
 ASK
 FM
 QAM

10/17/2018 Luminita Scripcariu 13


QUESTION 6
What is the goal of DSSS and FHSS
techniques?
 to compress the signal
 to correct transmission errors
 to equalize the channel
 to spread the transmitted signal spectrum

10/17/2018 Luminita Scripcariu 14


QUESTION 6
What is the goal of DSSS and FHSS
techniques?
 to compress the signal
 to correct transmission errors
 to equalize the channel
 to spread the transmitted signal spectrum

10/17/2018 Luminita Scripcariu 15


PROPOSED EXERCISE
• Design the compression code for a source
with the following probability vector,
applying Shannon - Fano algorithm:

(0.1 0.15 0.2 0.25 0.3)

* View the algorithm on the next slide!

10/17/2018 Luminita Scripcariu 16


Remember: Shannon-Fano Algorithm
1. Sort ascendingly the probability vector: p.
2. Calculate the cumulative probabilities:
q(1)=0; q(i) = q(i-1) + p(i-1)
3. Calculate the length of the code words:
L(i) = - [log2(p(i))]
4. Express the subunitary values q(i) as binary
sequences.
5. Read the first L(i) bits after the decimal
point, in order to find the code words.
10/17/2018 Luminita Scripcariu 17
Another Exercise
• Design the Huffman code for a
memoryless source with the following
vector: (1/4 3/4) working on composed
symbols of 2 characters.
• Write the code table.
• Calculate the average code length, the
code efficiency and the compression rate.
(Entropy = 0.8113 b/s)
10/17/2018 Luminita Scripcariu 18
International Morse Code

10/17/2018 Luminita Scripcariu 19


Proposed Exercise

• Encode your first name using Morse code.

• Write the encoded sequence with 0 ( _ )


and 1 ( . ) with spaces between the
letters.

10/17/2018 Luminita Scripcariu 20


Analog-to-Digital Conversion

• The analog signals are digitized by the


following successive operations: filtering,
sampling, quantizing and decimal-to-
binary (DCB) encoding.
• PCM (Pulse Coded Modulation)
• Loss compression technique.
10/17/2018 LUMINIŢA SCRIPCARIU 21
Signal Sampling
The signal values are read at discrete time
moments.
Nyquist-Shannon Theorem:
“The signal can be uniquely rebuilt from its
samples if the sampling rate is at least twice
the maximum frequency of the signal
spectrum.”
fmin eş  fNyquist  2  fmax (semnal)

10/17/2018 LUMINIŢA SCRIPCARIU 22


Quantization
• The samples of the signal are round to the
nearest quantization level.

• The difference between two successive


quantization levels represents the quantum.

• The quantum can have a constant or a


variable value.
10/17/2018 LUMINIŢA SCRIPCARIU 23
Example

10/17/2018 LUMINIŢA SCRIPCARIU 24


Quantization Performances
Are expressed by:
• The number of the quantization bits (n)
• The number of the quantization levels (N)
• The quantization noise power (Nq)
• The quantization signal-to-noise ratio
(S/Nq [dB]).

10/17/2018 Luminita Scripcariu 25


Formulas
The constant quantum:
B A
q n
2
[A, B] – interval of signal values.

The uniform quantization noise power:


Nq= q2/12 (W)

10/17/2018 LUMINIŢA SCRIPCARIU 26


Proposed Exercise
Calculate the
quantization noise power
Nq(W) and the value in
dB of the quantization
signal-to-noise ratio
S/Nq(dB), if the signal
power value is 0.5 W
and 4 quantization bits
are used.
10/17/2018 Luminita Scripcariu 27
Remark

• If the number of the quantization bits is


increased by one unit, the quantization
signal-to-noise ratio raises with 6 dB.

10/17/2018 LUMINIŢA SCRIPCARIU 28


PCM Bit Rate

Rb = fs * n

Rb > 2*B*n

10/17/2018 LUMINIŢA SCRIPCARIU 29


Remarks
When the quantum has a constant value,
the quantization is called uniform.
If the quantization is uniform, then the
signal-to-noise ratio is variable.
It is important to maintain a constant
quantization SNR.
For a constant SNR, a variable quantum
must be used:
 Small quantum for low signal levels;
 Large quantum for high signal levels.
10/17/2018 LUMINIŢA SCRIPCARIU 30
PROPOSED QUESTION
How many bits are used to encode 64
quantization levels?
 4
 6
 8
 32

10/17/2018 LUMINIŢA SCRIPCARIU 31


DPCM
• Differential PCM
• The difference between consecutive
samples is quantized and encoded.
• The number of the quantization bits is
decreased because this difference
corresponds to a reduced scale of values.
• It is a analog-to-digital loss compression
technique.
• The quantization error represents the loss
of information.
10/17/2018 Luminita Scripcariu 32
DIGITAL LOSS COMPRESSION
TECHNIQUES

10/17/2018 Luminita Scripcariu 33


Features
• The digital loss compression techniques
reduce the redundancy and the entropy of
the informational source.
• The compression rates are high (e.g. 10:1,
50:1)
• They are used in multimedia (audio, video)
digital systems.

10/17/2018 Luminita Scripcariu 34


DCT
Discrete Cosine Transform

• 1-D DCT

• 2-D DCT

• X – NxN image matrix – it is decomposed


into small nxn matrices (tipically, n = 8).

10/17/2018 Luminita Scripcariu 35


X   X uv
u ,v

 
X uv  X iuv, j , i, j  0, n  1; u, v  0, N  1

10/17/2018 Luminita Scripcariu 36


2D-DCT
• The direct DCT is computed with:
 2i  1k   2 j  1l 
n 1
4 (k ) (l )
Qkluv 
nn 
i , j 0
uv
X ij cos 
 2 n 

cos 
 2 n 


1 / 2 , k  0
 (k )  

1 in rest

10/17/2018 Luminita Scripcariu 37


Zig-Zag Scan
• The DCT algorithm reads the transformed
matrix in zig-zag.
• The most significant DCT coefficients are
encoded, starting with the dc coefficient.

10/17/2018 Luminita Scripcariu 38


VLTC
• Variable Length Transform Coding
• The DCT coefficients are quantized.
• Null values from high frequencies (HF) are
removed.
• The significant DCT coefficients are binary
encoded using a variable-length code (e.g.
Huffman).
• Loss compression
• High compression rates
10/17/2018 Luminita Scripcariu 39
Example 1
1 1 1 1 2 0 0 0
1 0 0
1 1 1 Q
0 0
X  0 0 0 0
1 1 1 1
   
1 1 1 1 0 0 0 0

Vector of DCT coefficients: 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0


Encoded as: (d.c., the number of not null HF coefficients
binary values of not null coefficients)
00000010.0000
Compression rate:
16*8:12 = 10:1 or 10 %.
10/17/2018 Luminita Scripcariu 40
Example 2
0 0 0 8
0 0 8 8 
X 
0 8 8 4
 
8 8 4 4

 68.00  23.07  4.00  3.43 


 23.07  28.49 16.95 2 .83 
1 
Q
8   4.00 16.95 20.00  11.35
 
  3.43 2.83  11.35  11 .51

10/17/2018 Luminita Scripcariu 41


Continued …
• DCT coefficients vector:
68;  23,07;  23.07;  4.00;  28.49;  4.00;  3.43;
16.95;16.95;  3.43; 2.83; 20; 2.83;  11.35;  11.35;11.51

• Quantization:
 4  1 0 0
  1  2 1 0
round (8 * Q / 17)   
0 1 1 0
 
0 0 0 0

10/17/2018 Luminita Scripcariu 42


Continued …
• 4, -1, -1, 0, -2, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0

Huffman code:

• 0 / 0, 1/ 10, -1/110, -2/1110

• 0000 0100.1011.110.110.0.1110.0.0.10.10.0.0.10

• 33 bits used instead of 128 => the compression


rate is 4:1 or 25 %.

10/17/2018 Luminita Scripcariu 43


2D-IDCT

• Inverted transform is computed with:


n 1
 2i  1k   2 j  1l 
X uv
ij    (k ) (l )Q cos 
uv
kl  cos  
k l 0  2 n   2 n 

10/17/2018 Luminita Scripcariu 44


Matlab Example
>> x=[-4 -1 0 0; -1 -2 1 0; 0 1 1 0; 0 0 0 0]
x=
-4 -1 0 0
-1 -2 1 0
0 1 1 0
0 0 0 0
>> t=dct2(x)
t=
-1.2500 -2.1744 -1.2500 0.6301
-2.1744 -2.2803 -0.7093 0.1768
-1.2500 -0.7093 -0.2500 -1.0592
0.6301 0.1768 -1.0592 -1.2197
>> d=idct2(t)
d=
-4.0000 -1.0000 0.0000 0.0000
-1.0000 -2.0000 1.0000 0.0000
0.0000 1.0000 1.0000 -0.0000
0.0000 0.0000 -0.0000 -0.0000
10/17/2018 Luminita Scripcariu 45
Performances of Loss
Compression Techniques
• Compression Rate
• NMSE (Normalised Mean Square Error):
2
 ^ 
  X ij  X ij 
i, j  
NMSE
2
 i, j
X
i, j

• SNR (Signal-to-Noise Ratio):


 1 
SNR  10 lg  [dB]
 NMSE 
10/17/2018 Luminita Scripcariu 46
JPEG
Joint Photographic Expert Group
• VLCT compression standard for digital
images

• Large compression rates: 10:1 ... 100:1.

10/17/2018 Luminita Scripcariu 47


JPEG Block-Diagram

10/17/2018 Luminita Scripcariu 48


MPEG

Moving Picture Experts Group

10/17/2018 Luminita Scripcariu 49


MPEG-1
• MPEG-1 represents a group of standards
for audio and video compression.
• MPEG-1 standard (1990) – used for data
storing on VCD (Video Compact Disk), as
being a high quality service
• Based on DCT.

10/17/2018 Luminita Scripcariu 50


Quotation from en.wikipedia.org:

• “The MPEG I-frames stored on DVD discs


were based on JPEG, which carries DCT
information that can be exploited to improve
interpolation for higher resolutions.“

10/17/2018 Luminita Scripcariu 51


Components of MPEG-1 Standard
• Part 1 (ISO/IEC 11172-1): audio-video
synchronization and multiplexing techniques
• Part 2 (ISO/IEC 11172-2): the video compression
techniques, for image resolutions up to 4095x4095.
• Part 3 (ISO/IEC 11172-3): Perceptuel Audio Codec:
– MP1 or MPEG-1 Part 3 Layer 1 (MPEG-1 Audio Layer I)
– MP2 or MPEG-1 Part 3 Layer 2 (MPEG-1 Audio Layer II)
– MP3 or MPEG-1 Part 3 Layer 3 (MPEG-1 Audio Layer III)
• Part 4 (ISO/IEC 11172-4): testing.
• Part 5 (ISO/IEC 11172-5): simulation software
programs.
(IEC - International Electrotechnical Commission)
10/17/2018 Luminita Scripcariu 52
Other Audio Compression
Techniques
• Multi-channel systems (surround sound):
“homecinema” or “home theater” systems

• Dolby Digital format

• Audio Codec (AC-3)

• Advanced Audio Codec (AAC)

• Digital Theater System (DTS).


10/17/2018 Luminita Scripcariu 53
MPEG-2
Standard for video/audio recording system:
• DVB (Digital Video Broadcasting)
• DVB-T, DVB-T2 – terrestrial systems
• DVB-S – satellite systems
• DVB-C – cable systems
• VOB (Video OBject) format
• DVD
• HDTV (High Definition TV): 1920x1080
resolution.
10/17/2018 Luminita Scripcariu 54
MPEG-3
• MPEG-3 – standard developed for HDTV
(High Definition Television),
• 20-40 Mbps
• abandoned in favour of MPEG-2.
• MPEG-3 is not the same as MPEG-1 Part 3
Layer 3, shortly denoted MP3.

10/17/2018 Luminita Scripcariu 55


MPEG-4
• ISO/IEC Standard 14496 (1998)
• Based MPEG-1, MPEG-2
• AV compression
• Web applications, videophone, digital TV
• CD, DVD, Android support etc.
• 3D images compression
• High Efficiency Video Coding (HEVC), known
as H.265 and MPEG-H Part 2
• UltraHD TV(UHDTV): 4K 3840x2160, 5K
5120x2180, 6K 5760x3240, 8K 7680x4320.
10/17/2018 Luminita Scripcariu 56
Parts of MPEG-4
• MPEG-4 part 2 – for DivX, Xvid, Nero Digital,
Quicktime 6 and other codecs.
• MPEG-4 part 3 – perceptual audio codecs AAC
(Advanced Audio Coding).
• MPEG-4 part 10 (MPEG-4 AVC/H.264) – for
HD-DVD (High Density DVD, 15 GB single
layer, 30 GB dual layer), Blu-ray Disc (50 GB).
• MPEG-4 part 14 – mp4 format for multimedia
content, also used by Internet and mobile
devices.
10/17/2018 Luminita Scripcariu 57
MPEG - 7
• “Digital library: Image/video catalogue,
musical dictionary.
• Multimedia directory services, editing
• Broadcasting
• Security services: Traffic control,
production chains, multimedia signature
• E-business, Cultural services, Educational
applications, Biomedical applications.”

10/17/2018 Luminita Scripcariu 58


CONCLUSION

• JPEG and MPEG developed loss


compression techniques with high
compression rates (10:1, 50:1, 100:1).

10/17/2018 Luminita Scripcariu 59


PROPOSED 1 2 4 4
EXERCISE 2 4 4 4
• Consider the matrix: X 
4 4 4 2
 
4 4 2 1
• Calculate the DCT of the matrix using
MATLAB (dct2).
• Quantize the DCT coefficients (round).
• Encode the sequence using a Huffman code.
• Calculate the compression rate.
• Rebuild the matrix using round(idct2) and a
proper scaling value.
• Calculate the NMSE of the rebuilt matrix.
10/17/2018 Luminita Scripcariu 60

You might also like