You are on page 1of 56

Data Communications and Networks Signal Encoding Techniques

Ayaz Keerio, University of Sindh

Signal Encoding Techniques


Digital data, digital signal Analog data, digital signal

Digital data, analog signal


Analog data, analog signal

Ayaz Keerio, University of Sindh

Signal Encoding Techniques


Digital Data, Digital Signal Digital signal

Discrete, discontinuous voltage pulses Each pulse is a signal element Binary data encoded into signal elements

Ayaz Keerio, University of Sindh

Signal Encoding Techniques: Terms


Unipolar All signal elements have same sign Polar One logic state represented by positive voltage the other by negative voltage Data rate Rate of data transmission in bits per second

Ayaz Keerio, University of Sindh

Signal Encoding Techniques: Terms


Duration or length of a bit Time taken for transmitter to emit (produce) the bit Modulation rate

Rate at which the signal level changes Measured in baud = signal elements per second

Mark and Space

Binary 1 (one) and Binary 0 (zero) respectively

Ayaz Keerio, University of Sindh

Signal Encoding Techniques


Interpreting Signals

Need to know

Timing of bits - when they start and end Signal levels

Factors affecting successful interpretation of signals


Signal to noise ratio Data rate Bandwidth Synchronizing transmitter and receiver External clock Sync mechanism based on signal
Ayaz Keerio, University of Sindh 6

Clocking

Signal Encoding Techniques


Comparison of encoding schemes Error detection
Can be built in to signal encoding schemes

Signal interference and noise immunity Some codes are better than others Cost and complexity Higher signal rate (& thus data rate) lead to higher costs Some codes require signal rate greater than data rate

Ayaz Keerio, University of Sindh

Encoding Schemes:
Nonreturn to Zero-Level (NRZ-L) Nonreturn to Zero Inverted (NRZI)

Bipolar
Manchester Differential Manchester B8ZS (Bipolar with 8-zeros substitution) HDB3 (High density bipolar 3-zeros)

Ayaz Keerio, University of Sindh

Nonreturn to Zero-Level (NRZ-L)


Two different voltages for 0 (zero) and 1 (one) bits Voltage constant during bit interval no transition I.e. no return to zero voltage e.g. Absence of voltage for zero, constant positive

voltage for one More often, negative voltage for one value and positive for the other
Zero (0) = high level One ( 1 ) = low level

This is NRZ-L
Ayaz Keerio, University of Sindh 9

Nonreturn to Zero Inverted


Nonreturn to zero inverted on ones (111) Constant voltage pulse for duration of bit

Data encoded as presence or absence of signal

transition at beginning of bit time Transition (low to high or high to low) denotes a binary 1 (one) No transition denotes binary 0 (zero)
An example of differential encoding

Ayaz Keerio, University of Sindh

10

Differential Encoding
Data represented by changes rather than levels More reliable detection of transition rather than level

In complex transmission layouts it is easy to lose sense

of polarity (split)

Ayaz Keerio, University of Sindh

11

Nonreturn to Zero (NRZ)

Ayaz Keerio, University of Sindh

12

Excercise
Assume digital data is: 0011010011110001 Encode digital data using NRZ-L and NRZI encoding schemes

Ayaz Keerio, University of Sindh

13

Answer
Assume digital data is: 00110100111101 By using NRZ-L encoding scheme
0 0

and NRZ-I encoding scheme

1
0 0

0
1

1
1

1 0
1

Ayaz Keerio, University of Sindh

14

NRZ pros and cons


Pros & cons Easy to engineer Make good use of bandwidth Lack of synchronization capability Used for magnetic recording Not often used for signal transmission

Ayaz Keerio, University of Sindh

15

Multilevel Binary encoding


Use more than two levels Bipolar AMI (Alternate Mark Inversion) zero represented by no line signal (lack of pulse) one represented by positive or negative pulse one pulses alternate in polarity Each 1 (bit) introduces a transition that can be used for synchronization. Error detection is possible for a single added or lost pulse. Bandwidth considerable smaller that in the NRZ encodings
Ayaz Keerio, University of Sindh 16

Multilevel Binary encoding


Use more than two levels Bipolar AMI (Alternate Mark Inversion)

Ayaz Keerio, University of Sindh

17

Pseudoternary signal encoding


A multilevel binary encoding: that complements the bipolar-AMI encoding scheme

Binary 1 is represented by a lack of pulse (absence of line signal) Binary 0(zero) is represented by a positive or a negative pulse The binary 0(zero) pulses must alternate in polarity.

No advantage or disadvantage over bipolar-AMI

Ayaz Keerio, University of Sindh

18

Pseudoternary signal encoding


A multilevel binary encoding scheme example.

Ayaz Keerio, University of Sindh

19

Biphase signal Encoding


Manchester
Transition in middle of each bit period

Transition serves as clock and data


Low to high Transition represents one High to low transition represents zero Used by IEEE 802.3 (Ethernet LAN)

Ayaz Keerio, University of Sindh

20

Biphase signal Encoding


Manchester
Allows clocking mechanism for both kinds of bits.

Modulation rate twice than that of NRZ.


Has been specified for the IEEE 802.3 standard for baseband coaxial

cable and twisted-pair CSMA/CD bus LAN's.

Ayaz Keerio, University of Sindh

21

Biphase signal Encoding


Differential Manchester
Midbit transition is clocking only Transition at the start of the bit period represents 0 (zero),

and a lack of transition at the start of the bit represents 1 (one)


Used by IEEE 802.5 (token ring LAN)

Ayaz Keerio, University of Sindh

22

Digital Data, Analog Signal


Public telephone system 300Hz to 3400Hz Use modem (modulator-demodulator) Amplitude shift keying (ASK) Binary Frequency shift keying (FSK) Binary Phase shift keying (PSK)

Ayaz Keerio, University of Sindh

23

Amplitude Shift Keying


Values represented by different amplitudes of carrier Usually, one amplitude is zero i.e. presence and absence of carrier is used Susceptible to sudden gain changes Inefficient Up to 1200bps

Ayaz Keerio, University of Sindh

24

Binary Frequency Shift Keying


Most common form is binary FSK (BFSK) Two binary values represented by two different

frequencies (near carrier) Less susceptible to error than ASK Up to 1200bps Even higher frequency on LANs using coaxial cable

Ayaz Keerio, University of Sindh

25

Multiple Frequency Shift Keying


More than two frequencies used More bandwidth efficient

More prone to error

Ayaz Keerio, University of Sindh

26

Phase Shift Keying


Phase of carrier signal is shifted to represent data Binary PSK Two phases represent two binary digits Differential PSK Phase shifted relative to previous transmission rather than some reference signal

Ayaz Keerio, University of Sindh

27

Digital Data, Analog Signal:

Ayaz Keerio, University of Sindh

28

Differential PSK

Ayaz Keerio, University of Sindh

29

Encoding and Modulation Techniques


Signals transmitted chosen to optimize use of

transmission medium
E.g. conserve (save) bandwidth, & minimize errors

Digital signaling: digital or analog data, g(t), encoded into digital signal, x(t) Analog signaling: digital or analog data transmitted by analog carrier signal using modulation

Ayaz Keerio, University of Sindh

30

Encoding and Modulation Techniques


Modulation: process of encoding source data onto a carrier signal with frequency fc Input signal, m(t), is called baseband signal Result of modulating carrier signal is called modulated

signal, s(t)

Ayaz Keerio, University of Sindh

31

Encoding and Modulation Techniques

Ayaz Keerio, University of Sindh

32

Receiver Interpreting Incoming Signal


Important factors for successful reception: SNR, data

rate, & bandwidth Increase in data rate increases bit error rate (BER) Increase in SNR decreases BER Increase in bandwidth allows increase in data rate

Ayaz Keerio, University of Sindh

33

Receiver Interpreting Incoming Signal

Ayaz Keerio, University of Sindh

34

Technologies using Encoding Schemes


NRZ/NRZI: RS-232, HDLC, & USB Manchester: Ethernet, Token Ring Multilevel Binary: US T-carrier and European E-carrier telecommunication systems

Ayaz Keerio, University of Sindh

35

Technologies using Shift Keying


ASK: Optical fibre, & RFID FSK: HF/shortwave radio, UHF/VHF radio communications, & RFID PSK: mobile phones, Wi-Fi, & DSL

Ayaz Keerio, University of Sindh

36

Digitizing Analog Data

Ayaz Keerio, University of Sindh

37

Analog Data, Digital Signal


Digitization Conversion of analog data into digital data Digital data can then be transmitted using NRZ-L Digital data can then be transmitted using code other than NRZ-L.

Ayaz Keerio, University of Sindh

38

Analog Data, Digital Signal


How to digitize analog data? Codec converts analog to digital data, and recovers

digital data from analog data two techniques used in codecs: Pulse Code Modulation(PCM) and Delta Modulation

Ayaz Keerio, University of Sindh

39

PCM Block Diagram

Ayaz Keerio, University of Sindh

40

Pulse Code Modulation(PCM)


Divide the normalised input magnitude into 2n

different levels, with corresponding code numbers Sample analog input every Ts seconds --> pulse amplitude modulation (PAM) value Map PAM value to nearest code number Convert code number to n-bit binary PCM code

Ayaz Keerio, University of Sindh

41

Pulse Code Modulation(PCM)


If a signal is sampled at regular intervals at a rate

higher than twice the highest signal frequency, the samples contain all the information of the original signal Voice data limited to below 4kHz, Require 8kHz samples per second Analog samples (Pulse Amplitude Modulation, PAM) Each sample assigned digital value

Ayaz Keerio, University of Sindh

42

Pulse Code Modulation(PCM)


4 bit system gives 16 levels Quantized Quantizing error or noise Approximations mean it is impossible to recover original exactly 8 bit sample gives 256 levels

Quality comparable with analog transmission


8k samples per second of 8 bits each gives 64kbps

Ayaz Keerio, University of Sindh

43

Nyquist Theorem
The sampling rate (pam sampling) must be at least 2

times the highest requency.


Sampling rate twice the frequency of xHz means the

signal must be sampled every 1/2x seconds i.e for voice one sample every 1/8000s = 1 / 2(4000)s= 0.000125 s

Ayaz Keerio, University of Sindh

44

Pulse Code Modulation(PCM)

Ayaz Keerio, University of Sindh

45

Sampling Theorem
If a signal f(t) is sampled at regular intervals of time

and at a rate higher than twice the highest signal frequency, then the samples contain all the information of the original signal Example: voice is between 0 and 4000 Hz; sampling at 8000 samples per second is sufficient to reproduce analog voice at receiver Good voice reproduction can be achieved with 128 quantization levels (7-bit coding)

Ayaz Keerio, University of Sindh

46

Improving PCM with Nonlinear Coding


Linear spacing of quantization levels can result in poor

reproduction of weak signals Non-linear encoding: more steps for low amplitude, less steps at high amplitude Can lead to signicant improvement for voice

Ayaz Keerio, University of Sindh

47

Improving PCM with Nonlinear Coding

Ayaz Keerio, University of Sindh

48

Delta Modulation
Popular alternative to PCM Input analog data approximated by staircase function

Moves up/down by one quantization level () each

sampling interval (Ts ) If signal goes up, bit 1(one) is output; otherwise bit 0(zero).

Ayaz Keerio, University of Sindh

49

Example of Delta Modulation

Ayaz Keerio, University of Sindh

50

Modulating Signals
Combine input signal, m(t), and carrier at frequency fc

to produce signal s(t) whose bandwidth is centered on fc Why? If analog transmission systems:
Digital data must be convereted to analog form (e.g.

PSK, FSK) Analog signals may need to be transmitted at higher frequency than analog data Changing frequency of analog data allows for frequency division multiplexing (sending different ananlog data inone analog signal)
Ayaz Keerio, University of Sindh 51

Modulating Signals
Principal techniques are: amplitude modulation (AM), frequency modulation (FM) phase modulation (PM)

Ayaz Keerio, University of Sindh

52

Amplitude modulation (AM)


In AM transmission, the carrier signal is modulated so

that its amplitude varies with the changing amplitudes of the modulating signal. The frequency and phase of carrier remain same. Only amplitude changes to follow the variations in the information.

Ayaz Keerio, University of Sindh

53

Frequency modulation (FM)


In FM transmission, the frequency of the carrier signal

is modulated to follow the changing amplitude of the modulating signal. The peak amplitude and phase of carrier signal remain constant. As the amplitude of information signal changes the frequency of the carrier changes correspondingly.

Ayaz Keerio, University of Sindh

54

Phase modulation (PM)


In PM transmission, the phase of the carrier signal is

modulated to follow the changing amplitude of the modulating signal. The peak amplitude and frequency of carrier signal remain constant. As the amplitude of information signal changes the phase of the carrier changes correspondingly.

Ayaz Keerio, University of Sindh

55

Thanks for your Patience and Interest

Ayaz Keerio, University of Sindh

56

You might also like