Lecture 2 - Hong Kong Baptist University

Download Report

Transcript Lecture 2 - Hong Kong Baptist University

Lecture 2
Fundamentals of Data and
Signals
1
Objectives
•
In this lecture, we explore the following
telecommunications concepts:
1. Different between data and signal
2. Four combination of analog and digital
(to p8)
applications
(to p3)
3. Signals
(to p4)
2
Signals
• Properties
– Analog
– Digital
(to p10)
(to p27)
• Conversion between Analog and Digital
– Analog data transmitted using analog signals
– Digital data transmitted using digital signals
– Digital data transmitted using analog signals
– Analog data transmitted using digital signals
• Where are digital data came from? (to p56)
(to p32)
(to p34)
(to p35)
(to p48)
3
Data and signal
• Data
– are entities that convey meaning
• Examples: computer files, music on CD, results from a blood
gas analysis machine)
• Signals
– are the electric or electromagnetic encoding of data
(telephone conversation, web page download)
• Examples: Computer networks and data/voice
communication systems transmit signals
• Data and signals can be analog or digital
– Analog Vs Digital
(to p5)
(to p2)
4
Analog vs. Digital
• Analog
– is a continuous waveform, with examples such as (naturally
occurring) music and voice
(to p6)
– It is harder to separate noise from an analog signal than it is to
separate noise from a digital signal (imagine the following
waveform is a symphony with noise embedded)
• Digital
– is a discrete or non-continuous waveform with examples such as
computer 1s and 0s
(to p7)
– Noise in digital signal
• You can still discern a high voltage from a low voltage
• Too much noise – you cannot discern a high voltage from a low
voltage
(to p4)
5
Analog signal
(to p5)
6
Digital Signal
(to p5)
7
Four combinations
Types of each application
(to p9)
8
Table 2-1 Four combinations of data and
signals
We will talk about each of these
in today’s lecture
(to p2)
9
Properties of analog signals
• Four main properties:
– 1. Frequency
– 2. Bandwidth
– 3. Amplitude
– 4. Signal phase
(to p11)
(to p17)
(to p19)
(to p24)
(to p3)
10
Frequency
• 1. Frequency
youtube1, youtube2 ,
– the electronic signal is commonly diagram as
(to p12)
a sine wave (see Figure 5-12)
– unit of measurement is the Hertz, hz
– human ear can hear between 20 hz to 15,000
hz
– telephone voice ranges 300 to 3,000 hz
(to p13)
» other feq ranges see Figures 5-13 to 5-15
11
FIGURE 5-12
Sine waves of differing frequencies.
(to p11)
12
FIGURE 5-13
The frequency ranges of some common sounds.
(to p14)
Other applications of frequency ranges
13
FIGURE 5-14
The frequency spectrum showing the common names applied to certain frequency ranges.
More details= views
(to p15)
14
FIGURE 5-15
A more detailed view of the frequency spectrum relevant to telecommunications.
(to p10)
15
FIGURE 5-18
Analog wave with constant frequency and varying amplitude.
(to p19)
16
Bandwidth
• 2. Bandwidth
YouTube
– different between upper ad lower frequency
range
– for tel signal is 2700 hg (ie. 3000-300 hz)
– voice circuits in tel design for 0 to 4000 hz
– 0 to 300 hz, and 3000 to 4000 hz are referred
to guard channel/band, which use as a buffer
so that no interface between different signals
» see Figure 5-17
(to p18)
(to p10)
17
FIGURE 5-17
Bandwidth of a voice channel.
(to p10)
18
Amplitude
• 3. Amplitude
YouTube
– signal for measure loudness of signal
– measurement unit is decibel (dB)
– if dB is too strong for one line, caused
crossed talk
– if dB is too weak, caused attenuation.
(to p16)
(to p20)
(to p21)
(to p10)
19
FIGURE 5-19
The relative power of a signal measured in decibels.
(to p19)
20
FIGURE 5-20
A signal loses strength as the distance it travels increases. This loss of strength is called attenuation.
Alternative example
(to p22)
21
Note: textbook shows the calculation but we will not pick up in this subject
(to p19)
22
Signal phase
• 4. Signal phase
(to p24)
– measure the shift of sine ware
– Phase changes often occur on common
(to p25)
angles, such as 45, 90, 135, etc.
– only important to data comm, and not
detected by voice comm. (why?)
– will discuss more in later chapter
(to p10)
23
FIGURE 5-21
Example of a phase shift.
(to p23)
24
(to p23
25
Digitization
A series of bits, which representing
characters,
can be presented as a form or positive or
negative
phases in a comm system
eg.
“1” represent by a positive pulse
“0” represent by a negative pulse
(to p27)
26
•
This alternative representation of data
through pulse is called digital signal
• Question:
– How could we detect signal and represent
them in digital format?
(to p28)
27
Representation of digital signals
• 3 most common forms of digital signals:
– 1. Unipolar
• “1” bit is represented by positive voltage and “0”
bit by no voltage
– 2. Bipolar Non-return-to-zero (NRZ)
• “1” bit representing by a positive voltage and
“0” bit by a negative voltage
– 3. Bipolar Return-to-zero
• similar to NRZ except pulses between two
different bits are shorter
– (see Figure 8-5)
(to p29)
(to p31)
28
FIGURE 8-5
Digital signals.
(to p30)
explanations
(to p28)
29
• Nonreturn to zero-level (NRZ-L) transmits 1s as zero
voltages and 0s as positive voltages
• Nonreturn to zero inverted (NRZI) has a voltage change
at the beginning of a 1 and no voltage change at the
beginning of a 0
• Fundamental difference exists between NRZ-L and NRZI
– With NRZ-L, the receiver has to check the voltage level for each
bit to determine whether the bit is a 0 or a 1,
– With NRZI, the receiver has to check whether there is a change
at the beginning of the bit to determine if it is a 0 or a 1
30
(to p29
Representation of digital
signals(cont).
• Usages:
– 1) Not popular adopted
– 2) & 3) a distinction useful in trouble shooting
when problems occur
(to p3)
31
Analog data transmitted using analog
signals
• In order to transmit analog data, you can
modulate the data onto a set of analog
signals
• Broadcast radio and television are two
(to p33)
very common examples of this
32
(to p3)
33
Digital data transmitted using digital
signals
• This is same as the way we described the
digital properties, ie:
– Polar, non-polar, return/none-return-zeor, etc
(to p3)
34
Digital data transmitted using analog
signals
• Analog has four properties, and we convert the
following three important ones:
– Three Functional roles:
• a) Frequency modulation
• b) Amplitude modulation
• c) Phase modulation
(to p36)
(to p40)
(to p41)
(to p3)
35
Frequency modulation
• a) Frequency modulation
• When a 1 bit is sent, it represents a different or
certain attributes (amplitude, frequency and
phase), and 0 bit represents the change of
different attributes
• At the end, modem/device will sense the different
and generate oscillator (that is wave)
• These waves are converted to a digital signal at
the end of a modem
• special type of freq mod is know as frequency shift
key (FSK)
(to p37)
36
An example of modem
– Example:
Bell type 103 modem
• The original modem transmits 0 bits (or spaces)
at 1070 Hz and 1 bits at 1270 Hz. The answer
modem uses 2025 Hz for spaces and 2225 Hz
for marks
(to p38)
(to p39)
refer to Figures 8-10 and 8-11
Bandwidth
Frequencies
(to p35)
37
FIGURE 8-10
Frequencies used by a Bell Type 103 modem.
(to p37)
38
FIGURE 8-11
Frequency modulation in a Bell Type 103 modem.
(to p37)
39
B) Amplitude modulation
• One amplitude encodes a 0 while another
amplitude encodes a 1 (a form of
amplitude modulation)
(to p35)
40
C) Phase modulation
– is performed by shifting a sine wave 180
degree whenever a digit bit stream changes
from 0 to 1
– see Figure 8-13
(to p42)
– generally, it’s known as phase shift keying
(PSK)
– another type is called differential phase shift
keying (DPSK), taken place when the phase
is shifted each time an one bit is transmitted;
otherwise the phase remains as the same
– see Figures 8-14 and 8-15
(to p44)
(to p45)
(to p46)
41
FIGURE 8-13
Phase shifts.
(to p43)
Or
42
(to p41)
43
FIGURE 8-14
Phase shift keying (PSK).
Alternate when hit the different digital code, say from 1 to 0
(to p41)
44
FIGURE 8-15
Differential phase shift keying (DPSK).
Alternate when there is a same code in a sequence
(to p41)
45
Phase modulation
– Depend upon number of possible shifts, a
binary signal could be represented by a dibits,
tribits or quadbits
Example:
Phase Shift
0 degree
90 degree
180 degree
270 degree
Dibits
00
01
10
11
(to p47)
46
Phase modulation
Quadrature amplitude modulation
(to p35)
47
Analog data transmitted using digital
signals
• To convert analog data into a digital
signal, there are two techniques:
(to p49)
– Pulse code modulation (the more common)
– Delta modulation
(to p55)
(to p3)
48
Pulse code modulation
• The analog waveform is sampled at
specific intervals and the “snapshots” are
(to p50)
converted to binary values
• The more snapshots taken in the same (to p51)
amount of time, or the more quantization
levels, the better the resolution
• When the binary values are later
converted to an analog signal, a waveform
similar to the original results
49
(to p49)
50
Quantization
• The transformation is to
– first measure the height (voltage) of the
analog signal at a particular point of time, and
– then represent those voltage corresponding to
the “turning” point
– this method of measurement of integer value
is known as “Quantization”
(to p52)
– Example 1, Figure 8.6
(to p53)
– Example 2, Figure 8.7
• note
(to p54)
(to p48
51
FIGURE 8-6
Quantization of an analog voice signal.
(to p51)
52
FIGURE 8-7
ADPCM codes the difference in signal strength in bits each time a sample is taken.
(to p51)
53
• Since telephone systems digitize human
voice, and since the human voice has a
fairly narrow bandwidth, telephone
systems can digitize voice into either 128
or 256 levels
– These are called quantization levels
• If 128 levels, then each sample is 7 bits (2 ^ 7 =
128)
• If 256 levels, then each sample is 8 bits (2 ^ 8 =
256)
(to p51)
54
Delta Modulation
• An analog waveform is tracked, using a binary 1
to represent a rise in voltage, and a 0 to
represent a drop
(to p48)
55
Digital data
• They are from all textual characters or symbols
that corresponding to binary patterns of a code
system, also called a data code
• There are three common data code sets:
– EBCDIC
– ASCII
– Unicode
• Before reviewing those above, we first review
what is data coding in digital world next!
(to p57)
56
Data Coding
• Digitized world of data
– The data set is referred by binary status, ie.
using binary digits 1 and/or 2 to represent all
information
– abbreviation of binary digit is bit
– a series of bits, is used to represent a symbol
(eg. A, B, ….) and is predetermined by
different information system
(to p58)
57
Data Coding (cont.)
– these symbols, which have specific meaning,
is termed as code.
– Examples:
• Morse code
• Machine code
(to p59)
(to p60)
58
Morse code
– Example: Morse code YouTube
• Morse code uses two code elements, that is a doe
and a dash - to represent each character
• Morse code is designed for human use, and is
done by human operator sending one end to
another for decoding so that messages could be
understood.
• It is used for telegraph purpose
• official standard length of dots and dashes are in
the ratio of 1:3
(to p78)
• see Figure 7.1
(to p58)
59
• Morse translator program
Machine Code
• Machine Code
– Morse code is only good for person-to-person
comm. For machine-to-machine, another
perfect form of code is needed
– Binary code works well in machine-tomachine when they converted into electronic
signals; by presenting 0 bits and 1 bits into on
or off current flow
(to p61)
60
Machine Code(cont.)
–
–
–
–
Again, a series of bits is grouped to represent a
symbol
depend on total number of bits required, the
unique combination of bits can be expressed as:
2n
where n is number of bits being used
The number of possible combination or
characters in a coding system is called:
(to p62)
code points
Different coding systems
(to p66)
61
Code points
– Example:
– if a coding system is consists of 5 series of
digits, then the coding point is
(to p79)
25 = 32
– These unique sequence of bits are referred
as character assignments, which
generates the following three different
types of characters:
• 1. Alphanumeric characters
• 2. Format effector characters
• 3. Control characters
(to p63)
(to p64)
(to p61)
(to p65)
62
Alphanumeric Characters
– 1. Alphanumeric Characters
• are used to present characters such as letters,
numerals, and symbols
•
letters: A, B, C ….
•
numerals: a, 2, …., 9
•
symbols: +, - /, *, &, %, #
• it should note that these characters may also
refer as graphic characters because they can
be displayed on a terminal screen and also on
hard copies
(to p62)
63
Format effector characters
– 2. Format effector characters
• uses to control the position of information that
is displayed on the screen/printer
• Some of the examples in the group are:
•
tab, backspace
•
carriage return
•
line feeds
(to p62)
64
Control characters
– 3. Control characters
• divided into two subgroups
• i) device control
– uses to control connection of hardware
– eg: skip to the top of new page or
–
eject paper 1/4 of page when stop
printing
• ii) transmission control
– uses to signify if transmission of data is
ended or is correctly received from the other
end
(to p62)
– eg: generate “Bip” sound when paper is out 65
from the fax machine
Types of coding system in telecom.
• In this section, we discuss the following
types:
(to p67)
– 1. Baudot code
– 2. American Standard Code for Information
(to p69)
Interchange (ASCII)
– 3. Extended Binary Coded Decimal
(to p71)
Interchange Code (EBCDIC)
– 4. Binary Coded Decimal (BCD) (to p72)
(to p73)
– 5. N-out-of-M Code
• How to convert them from one to another
(to p77)
(to p74)
66
Baudot code
• 1.Baudot code
– uses 5 bits to represent information
– mostly paper tape or punch cards
(to p88)
– has no parity bit
– two characters of unique functions:
• 1. Letter shift -change one type of letters
to another type
• 2. Figure shift - a shift results all letters
are treated as upper cases
(to p68)
67
Baudot code (cont.)
– it has only 58 characters
– Disadv: it has no unique representation
code of all symbol (why?)
– still commonly used technique in
• telegraph, teletypwriter & telex
• Refer to Figure 7.4
(to p81)
(to p66)
68
ASCII
• 2. ASCII
– a code system developed by American
National Standard Institute (ANSI)
– uses 7 bits (ie 128 unique code points)
– has unique representation of upper/lower
cases, digits, punctuation, and a set of
control characters
– easy to read and clarify as the different
between upper and lower case is just by 1
bit only
(to p70)
69
ASCII (cont.)
– the new version of ASCII has 8 bits
• for parity BUT is not widely applied in industy
– the ASCII code is the most widely used
code in computer & telecom network today,
thus makes more system become
compatible
– sequence of representation is 7654321
– ASCII code is referred as CCITT
International code No. 5
–
International Telegraph and Telephone Consultative Committee (CCITT, fromFrench:
• See Figure 7.5
(to p82)
(to p66)
70
EBCDIC
• 3. Extended Binary Coded Decimal
Interchange Code (EBCDIC)
– developed by IBM
– uses 8 bits (ie 256 code)
– commonly applied in the IBM host
machines
– sequence bits are arranged as 01234567
• refer to Figure 7.6
(to p83)
(to p66)
71
BCD
• 4. Binary Coded Decimal (BCD)
(to p89)
– Usually represent 4 bits
– Other bit combinations are sometimes used
for a sign or for other indications (e.g., error or
overflow)
– has no standard form, thus code
representation varies from one manufacturing
to another
(to p66)
72
N/M code
• 5. N-out-of-M code
(to p87)
– represented by (M,N)
– where M represents bits are used for data
transmission, N represent bits are in “1”
– uses to detect the lost of bit setting for
small number of bits
– claimed as an effective method to detect
errors than parity bit check
• will discuss more of this later
(to p66)
73
Question:
• How do we evaluate which code system is
(to p75)
more effective?
74
Code Efficiency
• Code Efficiency
– a technique uses to measure how few bits
are used to convey the meaning of a
character accurately
– measurement:
# of information bits
= ---------------------------# of bits in characters
• where information bit is the code point in a
code
– How it works?
(to p86)
75
End
76
• Code conversion
– it is a concept made available to a
computer, which is readily perform when
encounters
– such as converting three-bit code to four(to p84)
bit code
– example
– may encounter some difficulty when
converting EDCDIC to ASCII (why?)
– (how to rectify this problem?)
(to p66)
77
FIGURE 7-1
The Morse code.
(to p59)
78
FIGURE 7-2
Powers of 2.
(to p62)
79
FIGURE 7-3 If even parity is being used, the parity bit is set to 1 when necessary to make the total number of 1 bits in the character an even number. If
odd parity is used, the parity bit is set to 1 when necessary to make the total number of 1 bits an odd number.
(to p71)
80
FIGURE 7-4
Baudot code.
(to p68)
81
FIGURE 7-5
ASCII code.
(to p70)
82
FIGURE 7-6
EBCDIC code.
(to p71)
83
FIGURE 7-7
A method for converting a 3-bit code to a 4-bit code.
(to p77)
84
85
Code efficiency
• Example:
– If an 8-bit code that includes one parity check
– Then
• Code efficiency = 7/8 = 87.5%
86
(to p73)
87
(to p67)
88
(to p72)
89