R. E. Newman-Wolfe, University of Florida
Last modified 9/8/95.
Data Encoding
This outlines basics of encoding analog or digital data using analog or
digital signals. The
previous page
considered signal transmission.
- Encoding signals
- Basics -
Fourrier analysis of periodic signal into harmonic components
- Three parameters to sinusoid function:
- amplitude
- frequency
- phase
- frequency and phase are "angle" parameters
- varying these parameters over time allows encoding of a signal
- Encoding signals -
- analog/analog encoding (modulation)
- rationales :
- 1. necessity (may require high frequencies
to transmit over medium)
- 2. ability to use FDM
- AM - Amplitude modulation
- value of amplitude encodes modulating signal
- increased amplitude of modulating signal increases power of
output power, but not bandwidth
- DSBTC - double sideband transmitted carrier
- Waveform:
- s(t) = [1+n_a x(t)]cos(2 pi f_c t) where
- s(t) = output signal
- x(t) = input signal (normalized)
- f_c = carrier frequency
- cos(2 pi f_c t) = carrier signal (normalized)
- n_a = modulation index, ratio of amplitude of input
signal to carrier (so that the modulating
signal, n_a x(t) has amplitude < 1)
- 1 = dc component to avoid loss of information
(otherwise the peak negative amplitudes would
cause the output signal to cross the axis)
- multiply carrier signal by modulating signal plus a dc
component to obtain output
- output has redundancy in that the output is the sum of
the carrier signal plus symmetric components spaced
at f_m from the carrier frequency (where f_m is the
modulating signal's frequency)
- spectrum of AM signal is f_c +- spectrum of modulating signal:
the upper sideband (above f_c) is the mirror image of
the lower sideband (spectrum below f_c). Both are
1/2 power replicas of the original spectrum, with the
lower sideband frequency-reversed.
- Power transmitted = P_t = P_c(1+n_a^2/2), where
P_c is the carrier power. Hence, n_a should be as
large as possible, so that most of the signal power
carries information, but remaining < 1 so no
information is lost.
- Bandwidth needed B_t = 2B_m, where B_m is original bandwidth
- SSB - Single Sideband
- Since the spectrum of the AM signal has redundant
information in the two sideband, and no information
in the carrier signal, less power and less bandwidth
can be used to transmit the same information by
sending only one sideband.
Half the bandwidth of DSBTC is used, and less power.
Synchronization in the carrier signal is lost.
- DSBSC - Double Sideband Supressed Carrier
- Less power is used since carrier is not sent,
but the same bandwidth is used and carrier sync lost.
- VSB - Vestigial Sideband
- One sideband is transmitted, and a reduced-power
carrier.
- FM - Frequency modulation (a form of angle modulation)
- time derivative of phase angle encodes modulating signal
- Waveform:
- s(t) = A_c cos[2 pi f_c + phi(t)],
- where phi'(t) = n_f m(t) is the derivative of the phase, and
- A_c, f_c = carrier amplitude, frequency
- m(t) = input modulating signal
- Increased amplitude of input signal does not increase output
power, but does increase bandwidth required.
- Bandwidth required is, in theory, infinite, since the spectrum
will contain components at f_c + K f_m for K=0,1,...
- In practice, Carson's rule for FM says that
B_t = 2[(n_f A_m)/(1 pi B_m) + 1]B_m
- PM - Phase modulation (a form of angle modulation)
- value of phase angle encodes modulating signal
- Waveform:
- s(t) = A_c cos[2 pi f_c + n_p m(t)],
- where n_p = the phase modulation index (to normalize
- n_p m(t) to the range 0..2 pi)
- A_c, f_c = carrier amplitude, frequency
- m(t) = input modulating signal
- Bandwidth required is, in theory, infinite, since the spectrum
will contain components at f_c + K f_m for K=0,1,...
- In practice, Carson's rule for PM says that
B_t = 2(n_p A_m + 1)B_m
- PAM - pulse amplitude modulation
- Thm: analog samples taken at more than twice the highest
significant signal frequency will contain all the information
of the original signal. The original signal may be
reconstructed from the samples by use of a low-pass filter.
- Bell's Dimension PBX products use this -
analog samples are taken at twice the frequency of the signal,
and only very short pulses reflecting these samples is
transmitted.
- analog/digital encoding (pulse code modulation, PCM)
- PCM - pulses of PAM are quantized into discrete levels, then
these levels are encoded in log (# levels) bits and sent.
Two choices : sampling rate and number of levels
- Noise -
- quantizing noise - the original signal cannot be recovered
since the pulses have been quantized.
- SNR = 6n + 1.8 dB, where n = #bits/sample
- Non-linear encoding - reduces quantizing distortion of weak
signals by having finer gradations of discrete levels at
the lower signal power levels, and coarser at higher power.
- Companding function - same effect as n-l encoding may be had
by compressing the analog signal before digitizing and
expanding it after decoding. The companding function will
giver greater gain to the weaker signals and less gain to
strong signals.
- Differential Encoding - only encode difference in signal rather
than its absolute value
- Delta Modulation (DM) - binary staircase function used to
approximate the signal - on each time interval, either
the staircase function goes up a quantum or down a quantum,
(encoded as a 1 or a 0).
- note: there is no limit on the amplitude of the signal encoded
- note: similar to chain coding for contours in discrete 2-D.
- Two choices : sampling rate and quantum size
- Noise - two types: quantizing and slope overload
- Large delta increases quantizing noise
- Small delta increases slope overload noise
- Predictive encoding - like DM only use an extrapolated value for
point from which the difference is calculated. This is a
generalized version of DM, with DM the special case where
the predicted value is the same as the previous value, ie,
a zero-order (constant) extrapolation function is used. DM
has problems with rapid changes in the first derivative; in
general, PDM using an nth order predictive encoding will have
problems with rapid changes in the (n+1)th derivative.
- digital/analog encoding (shift keying)
- ASK -
V amplitude levels can encode lg V bits per signal unit
- FSK -
V frequency levels can encode lg V bits per signal unit
- PSK/QPSK -
V phases can encode lg V bits per signal unit. QPSK uses
four phases offset 90 degrees.
- QAM -
Mixed PSK and ASK, use pairs (p,a) to describe signal
units, where p is the phase and a is the amplitude. This
can keep power requirements lower and discrimination better
than either technique alone.
- PPM - pulse position modulation
May be used with either analog or digital transmission to
encode digital signals
Signal is divided into frames, each frame has N slots
(plus some synchronization overhead every so often)
In each frame, exactly one slot has a pulse in it, A<>0;
the other slots have A = 0 (no pulse).
This allows lg N bits/frame to be encoded.
It is useful when power requirements must be kept low and
the transmission medium may be pulsed easily (e.g., lasers
in deep-space communication)
- digital/digital encoding
- Needs - synch, no dc component
- Evaluation
- spectrum - max frequency (increased bandwidth requirement)
- dc component (drift, direct coupling required)
- synchronization
- signal-based error-detection
- susceptibility to interference (expressed as bit error rate)
- cost/complexity
- Methods
- Level (L) - use same form to represent same bit value
(1's always look the same, 0's always look the same)
- Differential - use a change in signal element form to
indicate a 1 (Mark or M), or a 0 (Space or S)
- Examples -
- NRZ-L: 1 = high, 0 = low
- NRZ-M: 1 = transition at start of bit, 0 = no transition
- NRZ-S: 1 = no transition, 0 = transition at start of bit
- RZ: 1 = pulse to high, dropping back to low, 0 = low
- bipolar: like NRZ except marks (1's) alternate polarity +1-1+1
(aka Bipolar AMI - alternate mark inversion)
(sometime RZ technique used)
(note: this will be shown below using _ for 0, + for
a positive pulse, and - for a negative pulse)
- pseudoternary - like bipolar only spaces (0's)
- biphase-L (Manchester): always transition in middle of bit,
1 = high/low, 0 = low/high
- differential Manchester: always transition in middle of bit,
1 = no transition, 0 = transition at start of bit
- biphase-M: always transition at start of bit,
1 = transition in middle of bit, 0 = no transition
- biphase-S: always transition at start of bit,
1 = no transition, 0 = transition in middle of bit
- delay (Miller): 1 = transition in middle of bit,
0 = no transition if followed by a 1,
transition at end of bit if followed by a 0
- PPM - (see above under digital/analog encodings)
- Method Waveform Comments
- data: 0 1 1 0 1 0 0 0 1
- NRZ-L __----__--______-- dc component
- NRZ-M __--____--------__ dc component
- NRZ-S ------____--__---- dc component
- RZ __-_-___-_______-_ dc component, twice B/W
- bipolar __++--__++______-- three levels, e.d.
- Manch. _--_-__--__-_-_--_ synch, twice BW, e.d.
- D.Man. -__--_-__-_-_-_--_ synch, twice BW, e.d.
- Bip.-M --_-_-__-_--__--_- synch, twice BW, e.d.
- Bip.-S -_--__-_--_-_-_-__ synch, twice BW, e.d.
- Miller ___--____---__---_ synch, 3/2 BW, e.d., complex
- Scrambling
- To add synchronization capabilities to bipolar-AMI, which
looses synchronization when a long string of 0's is sent,
a run of 0's may be encoded by one of two fixed strings of
0's and 1's of the same length. These are distinguished
from normal data by having one (or more) code violations
(having two pulses of the same polarity in a row) in short
succession, so that the receiver may detect these substituted
patterns and decode them as a run of 0's.
- Examples -
- Bipolar with 8 Zero Substitution (B8ZS) - whenever 8
consecutive 0's are encountered in the data, then
the 8 0's are replaced with the pattern 000VB0VB,
where {V,B} = {+,-} with V the polarity of the
last mark (causing a code violation) and B a pulse
of the opposite polarity of the preceeding one.
Popular in the USA. Requires only
memory of polarity of last pulse and number of
consecutive 0's seen, buffering the last 5 bits.
- EX:
- data = 011001000000000000100
- ^^^^^^^^ - run of 8 0's
- encoded = 0+-00+000+-0-+0000-00
- ^---^^-^ - code violations
- |||||||| - special pattern
- High-density Bipolar - 3 Zeros (HDB3) -
Popular in Europe and Japan.
Starts with Bipolar-AMI, and substitutes
4 consecutive 0's with one of four patterns, according
to both the polarity of the preceding pulse and the
number of pulses since the last substitution (so that
no dc component is introduced). Requires memory of
polarity of last pulse, parity of number of pulses
seen since last substitution, and number of consecutive
0's seen. Must buffer 4 bits.
- Pulses since last substitution
- Preceding Polarity Odd Even
- - 000- +00+
- + 000+ -00-
- IN GENERAL 000V BOOV
- EX:
- data = 011001000000100000100
- ^^^^ ^^^^ - runs of 4 zeros each
- HDB3 = 0+-00+-00-00+000+0-00
- ^--^ ^---^ - code violations
- |||| |||| - special patterns
- Note: since repeating a pulse of the same polarity to cause
a code violation will introduce dc bias, this must be
remedied - B8ZS does this by balancing the number of
positive and negative pulses in its substitution
pattern, but the pattern is long, so 7 0's in the data
can go through unsubstituted. HDB3 compensates for
imbalance its shorter pattern could introduce by a
more complex method for choosing the pattern used, so
that the net imbalance is never bad. It does this by
insuring that the unbalanced substitution patterns are
always of alternating polarity.
Once a coding form is chosen, then a sending unit may transmit data to
a receiving unit using the same coding and conventions.
The sender usually wishes to distinguish between control and data bits,
and indicate the byte or word boundaries of the data bits.
Synchronization and framing are the topic of the
next page
.
This document is
copyright 1995
by Richard E. Newman-Wolfe.
Send comments to nemo@cis.ufl.edu