Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Data and Computer Communications
Lecture 4 – Signal Encoding Lecture 4 – Signal Encoding Techniques Techniques
3.3 Transmission Modes
� For various reasons, data streams are often considered to be composed of various elements:z Bits – 0 or 1z Characters – eight bit sequencesz Blocks or frames – potentially variable numbers of bits
� It is necessary to determine the start and end of these elements. The technique for doing this is synchronization.
� There are two transmission modes: z asynchronousand synchronous.
�We will examine bit synchronization for both synchronous and asynchronous transmissions
3.3.1 Asynchronous Transmission
�Used primarily when the data to be transmitted is generatedat random intervals. E.g.: a user typing at a keyboard communicating with a computer.
�Generally used in applications where the data to be transferred consists of characters, each character being encoded using 7 or 8 binary bits, common coding schemesbeing ASCII and EBCDIC.
�As data is transferred randomly there may be long intervalsduring which no data signal is present on the line. The receiver must be able to resynchroniseat the start of each new character received.
Bit Synchronisation For Asynchronous Transmission
� Each received bit is sampled as near to its centreas possible, to ensure that the correct value is read.
� To do this the receiver clock runs at N times the transmitted bit rate, N=16 is typical, ensuring that the received bit will always be sampled close to its centre.z A start bit is required to start clock count.
Start 0 1 0
8 clockperiods
16 clockperiods
16 clockperiods
16 clockperiods
bit stream
clock
Disadvantage of Asynchronous Transmission
� The use of the start and stop bits for each byte transferred means the method is inefficient in its use of transmission capacity.
� The bit synchronisation method becomes less reliable as the bit rate increases.
� So we look at some of the synchronous transmission schemes.
3.3.2 Synchronous Transmission
� Used for large blocks of data at higher bit rates. A frame of data is transmitted as a contiguous bit stream with no delay between each 8-bit element.
� The receiver clock operates in synchronism with the received signal.� There are two methods of achieving this:
z Embeddingthe clock information into the transmitted signal and having the receiver extract it.Î Requires either return to zero or transition orientated scheme.
z The receiver keeps a local clock, which is kept synchronizedwith the receivedsignal using a Digital Phase Lock Loop (DPLL)Î May be used for NRZ schemesÎ Requires sufficient transitions to keep synchronization
• Uses bit stuffing (more later)
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
Some Terms
unipolar polar data rate duration or length of a bit modulation rate mark and space
Interpreting Signals
need to know timing of bits - when they start and end signal levels
factors affecting signal interpretation signal to noise ratio data rate bandwidth encoding scheme
Comparison of Encoding Schemes
signal spectrum clocking error detection signal interference and noise immunity cost and complexity
EE210 Data Communications and Computer Networks 7
3.2 Converting Bits to Signals� There are two fundamentally different ways to produce digital signals
z DC or lowpasswhere bits are represented using square waves.
Common encoding schemes include:Î Non-return-to-zero (NRZ)Î BipolarÎ Manchester
z Bandpassor modulatedwhere bits are represented using fixed frequency sinusoids. This is used when the channel does not pass low frequency signals.
Common modulation techniques include:Î Amplitude shift keying (ASK)Î Frequency shift keying (FSK)Î Phase shift keying (PSK)
EE210 Data Communications and Computer Networks 8
3.2.1 Encoding schemes: Polar Schemes3.2.1 Encoding schemes: Polar Schemes�Polar encoding schemes rely on the voltage level to make a
determination of whether a binary 1 or a 0 was sent.�Common Schemes:
z Unipolar NRZ: binary 1: +A volts, binary 0: 0 volts.z Polar NRZ: binary 1: +A/2 volts, binary 0: –A/2 volts.
Î Half the power requirement of unipolar NRZz Bipolar: Consecutive binary 1s: +/-A/2 volts, binary 0: 0 volts
Î Produces a frequency spectrum with less low frequency components.
�Drawbacks to polar encoding schemes are:z Long strings of either 1s or 0s can cause loss of timing informationz Systematic errors in polarity can cause all 1s to be read as 0s and vice versa
EE210 Data Communications and Computer Networks 9
Encoding schemes: Transition OrientatedEncoding schemes: Transition Orientated
� Manchester encoding: binary 1: transition from A/2 to –A/2 in middle of bit time interval, binary 0: transition from –A/2 to +A/2 in middle of bit time interval.
� Differential Manchester encoding: There is a transition at the centre of each bit, but there is only a transition at the startof a 0 bit.
� NRZ inverted (NZRI): starting at a fixed signal level, binary 1: denoted by a transition and binary 0: by no transition. z The maximum frequency of a NZRI signal is half that of Bipolar
and Manchester encoded signals so it only requires half the transmission bandwidth
z Use NRZI in Wide Area Networks (WANs) while the other methods are generally used in LANs.
Encoding Schemes
Nonreturn to Zero-Level(NRZ-L)
two different voltages for 0 and 1 bits voltage constant during bit interval
no transition I.e. no return to zero voltage such as absence of voltage for zero, constant
positive voltage for one more often, negative voltage for one value and
positive for the other
Nonreturn to Zero Inverted
nonreturn to zero inverted on ones 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 binary 1 no transition denotes binary 0
example of differential encoding since have data represented by changes rather than levels more reliable detection of transition rather than level easy to lose sense of polarity
NRZ Pros & Cons
Pros easy to engineer make good use of bandwidth
Cons dc component lack of synchronization capability
used for magnetic recording not often used for signal transmission
Multilevel BinaryBipolar-AMI
Use more than two levels Bipolar-AMI
zero represented by no line signal one represented by positive or negative pulse one pulses alternate in polarity no loss of sync if a long string of ones long runs of zeros still a problem no net dc component lower bandwidth easy error detection
Multilevel BinaryPseudoternary
one represented by absence of line signal zero represented by alternating positive and negative no advantage or disadvantage over bipolar-AMI each used in some applications
Multilevel Binary Issues
synchronization with long runs of 0’s or 1’s can insert additional bits, cf ISDN scramble data (later)
not as efficient as NRZ each signal element only represents one bit
receiver distinguishes between three levels: +A, -A, 0
a 3 level system could represent log23 = 1.58 bits requires approx. 3dB more signal power for same
probability of bit error
Manchester Encoding
has transition in middle of each bit period transition serves as clock and data low to high represents one high to low represents zero used by IEEE 802.
Differential Manchester Encoding
midbit transition is clocking only transition at start of bit period representing 0 no transition at start of bit period representing 1
this is a differential encoding scheme used by IEEE 802.5
Biphase Pros and Cons
Con at least one transition per bit time and possibly two maximum modulation rate is twice NRZ requires more bandwidth
Pros synchronization on mid bit transition (self clocking) has no dc component has error detection
Modulation Rate
Scrambling
use scrambling to replace sequences that would produce constant voltage
these filling sequences must produce enough transitions to sync be recognized by receiver & replaced with original be same length as original
design goals have no dc component have no long sequences of zero level line signal have no reduction in data rate give error detection capability
Digital Data, Analog Signal
main use is public telephone system has freq range of 300Hz to 3400Hz use modem (modulator-demodulator)
encoding techniques Amplitude shift keying (ASK) Frequency shift keying (FSK) Phase shift keying (PK)
EE210 Data Communications and Computer Networks 11
3.2.2 Modulation Schemes3.2.2 Modulation Schemes� A single frequency signal, known as the Carrier, is selected to lie within
acceptable range of frequencies. � Amplitude, Frequency or Phase is then varied, or keyed, in accordance with
the data signal to be transmitted.
z Amplitude shift keying(ASK or AM) is rarely used because of attenuation problems.
z Frequency shift keying(FSK or FM), is used with lower bit rate modems. Relatively simple demodulation circuitry.
� The Signalling Rateor Baud Rateis the number of times per second the amplitude, frequency or phase of the transmitted signal changes.
amplitude
frequency
phase
EE210 Data Communications and Computer Networks 12
Phase Modulation Schemes
�Phase shift keying (PSK): Uses two fixed signals with a 180 phase difference to each other to indicate a 0 or a 1 respectively. z Complex demodulation circuitry needed to recover the
reference phase.
�Differential PSK (DPSK): Uses a phase shift of 90 relative to the current signal to indicate a binary 0, and a 270 phase shift for binary 1. z This has simpler demodulation equipment.
EE210 Data Communications and Computer Networks 14
Multilevel Modulation Techniques
�So far we have had Bit rate = Baud Rate, where each signal element corresponded to just one bit of data, but more bits per signal element can be encoded.
�Common Techniques include: z Quadraturephase shift keying (QPSK)or 4 PSK which allows 4
phase changesz QuadratureAmplitude Modulation (QAM)which changes
phase and amplitude
� The more bits per signal element the higher the throughput is, but the more complex the scheme is.
Modulation Techniques
Amplitude Shift Keying
encode 0/1 by different carrier amplitudes usually have one amplitude zero
susceptible to sudden gain changes inefficient used for
up to 1200bps on voice grade lines very high speeds over optical fiber
Binary Frequency Shift Keying
most common is binary FSK (BFSK) two binary values represented by two different
frequencies (near carrier) less susceptible to error than ASK used for
up to 1200bps on voice grade lines high frequency radio even higher frequency on LANs using co-ax
Multiple FSK
each signalling element represents more than one bit more than two frequencies used more bandwidth efficient more prone to error
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
Quadrature PSK
get more efficient use if each signal element represents more than one bit eg. shifts of /2 (90o) each element represents two bits split input data stream in two & modulate onto carrier
& phase shifted carrier can use 8 phase angles & more than one amplitude
9600bps modem uses 12 angles, four of which have two amplitudes
Performance of Digital to Analog Modulation Schemes
bandwidth ASK/PSK bandwidth directly relates to bit rate multilevel PSK gives significant improvements
in presence of noise: bit error rate of PSK and QPSK are about 3dB
superior to ASK and FSK for MFSK & MPSK have tradeoff between bandwidth
efficiency and error performance
Quadrature Amplitude Modulation
QAM used on asymmetric digital subscriber line (ADSL) and some wireless
combination of ASK and PSK logical extension of QPSK send two different signals simultaneously on
same carrier frequency use two copies of carrier, one shifted 90°
each carrier is ASK modulated two independent signals over same medium demodulate and combine for original binary output
QAM Variants
two level ASK each of two streams in one of two states four state system essentially QPSK
four level ASK combined stream in one of 16 states
have 64 and 256 state systems improved data rate for given bandwidth
but increased potential error rate
Analog Data, Digital Signal
digitization is conversion of analog data into digital data which can then: be transmitted using NRZ-L be transmitted using code other than NRZ-L be converted to analog signal
analog to digital conversion done using a codec pulse code modulation delta modulation
Digitizing Analog Data
Pulse Code Modulation (PCM)
sampling theorem: “If a signal is sampled at regular intervals at a rate
higher than twice the highest signal frequency, the samples contain all information in original signal”
eg. 4000Hz voice data, requires 8000 sample per sec
strictly have analog samples Pulse Amplitude Modulation (PAM)
so assign each a digital value
PCM Example
PCM Block Diagram
Delta Modulation
analog input is approximated by a staircase function can move up or down one level () at each sample
interval has binary behavior
since function only moves up or down at each sample interval
hence can encode each sample as single bit 1 for up or 0 for down
Delta Modulation Example
Delta Modulation Operation
PCM verses Delta Modulation
DM has simplicity compared to PCM but has worse SNR issue of bandwidth used
eg. for good voice reproduction with PCM want 128 levels (7 bit) & voice bandwidth 4khz need 8000 x 7 = 56kbps
data compression can improve on this still growing demand for digital signals
use of repeaters, TDM, efficient switching PCM preferred to DM for analog signals
Analog Data, Analog Signals
modulate carrier frequency with analog data why modulate analog signals?
higher frequency can give more efficient transmission
permits frequency division multiplexing (chapter 8) types of modulation
Amplitude Frequency Phase
Analog ModulationTechniques
Amplitude Modulation Frequency Modulation Phase Modulation
Summary
looked at signal encoding techniques digital data, digital signal analog data, digital signal digital data, analog signal analog data, analog signal