1 Lecture 2 Fundamentals of Data and Signals. 2 Objectives In this lecture, we explore the following...

89
1 Lecture 2 Fundamentals of Data and Signals

Transcript of 1 Lecture 2 Fundamentals of Data and Signals. 2 Objectives In this lecture, we explore the following...

1

Lecture 2

Fundamentals of Data and Signals

2

Objectives

• In this lecture, we explore the following telecommunications concepts:

1. Different between data and signal

2. Four combination of analog and digital applications

3. Signals

(to p4)

(to p8)

(to p3)

3

Signals

• Properties– Analog– Digital

• 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 p10)

(to p56)

(to p35)

(to p34)

(to p48)

(to p32)

(to p27)

4

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)

5

Analog vs. Digital

• Analog – is a continuous waveform, with examples such as (naturally

occurring) music and voice– 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– 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 p7)

(to p6)

(to p4)

6

Analog signal

(to p5)

7

Digital Signal

(to p5)

8Types of each application

Four combinations

(to p9)

9

Table 2-1 Four combinations of data and signals

We will talk about each of thesein today’s lecture

(to p2)

10

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)

11

Frequency

• 1. Frequency youtube1, youtube2 ,

– the electronic signal is commonly diagram as 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

» other feq ranges see Figures 5-13 to 5-15

(to p12)

(to p13)

12

FIGURE 5-12 Sine waves of differing frequencies.

(to p11)

13

FIGURE 5-13 The frequency ranges of some common sounds.

(to p14)

Other applications of frequency ranges

14

FIGURE 5-14 The frequency spectrum showing the common names applied to certain frequency ranges.

(to p15)More details= views

15

FIGURE 5-15 A more detailed view of the frequency spectrum relevant to telecommunications.

(to p10)

16

FIGURE 5-18 Analog wave with constant frequency and varying amplitude.

(to p19)

17

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)

18

FIGURE 5-17 Bandwidth of a voice channel.

(to p10)

19

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)

20

FIGURE 5-19 The relative power of a signal measured in decibels.

(to p19)

21

FIGURE 5-20 A signal loses strength as the distance it travels increases. This loss of strength is called attenuation.

(to p22)Alternative example

22

Note: textbook shows the calculation but we will not pick up in this subject

(to p19)

23

Signal phase

• 4. Signal phase– measure the shift of sine ware– Phase changes often occur on common

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 p24)

(to p10)

(to p25)

24

FIGURE 5-21 Example of a phase shift.

(to p23)

25(to p23)

26

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)

27

• 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)

28

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)

29

FIGURE 8-5 Digital signals.

(to p28)

explanations

(to p30)

30

• 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

(to p29)

31

Representation of digital signals(cont).

• Usages:

– 1) Not popular adopted– 2) & 3) a distinction useful in trouble shooting

when problems occur

(to p3)

32

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 very common examples of this (to p33)

33(to p3)

34

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)

35

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)

36

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)

37

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

refer to Figures 8-10 and 8-11

Bandwidth Frequencies

(to p39)(to p38)

(to p35)

38

FIGURE 8-10 Frequencies used by a Bell Type 103 modem.

(to p37)

39

FIGURE 8-11 Frequency modulation in a Bell Type 103 modem.

(to p37)

40

B) Amplitude modulation

• One amplitude encodes a 0 while another amplitude encodes a 1 (a form of amplitude modulation)

(to p35)

41

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

– 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 p42)

(to p46)

42

FIGURE 8-13 Phase shifts.

(to p43)Or

43

(to p41)

44

FIGURE 8-14 Phase shift keying (PSK).

(to p41)

Alternate when hit the different digital code, say from 1 to 0

45

FIGURE 8-15 Differential phase shift keying (DPSK).

(to p41)Alternate when there is a same code in a sequence

46

Phase modulation

– Depend upon number of possible shifts, a binary signal could be represented by a dibits, tribits or quadbits

Example: Phase Shift Dibits

0 degree 00

90 degree 01

180 degree 10

270 degree 11

(to p47)

47

Phase modulation

(to p35)

Quadrature amplitude modulation

48

Analog data transmitted using digital signals

• To convert analog data into a digital signal, there are two techniques:– Pulse code modulation (the more common)– Delta modulation

(to p3)

(to p49)

(to p55)

49

Pulse code modulation

• The analog waveform is sampled at specific intervals and the “snapshots” are converted to binary values

• The more snapshots taken in the same 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

(to p50)

(to p51)

50

(to p49)

51

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”– Example 1, Figure 8.6– Example 2, Figure 8.7

• note

(to p52)

(to p53)

(to p54) (to p48)

52

FIGURE 8-6 Quantization of an analog voice signal.

(to p51)

53

FIGURE 8-7 ADPCM codes the difference in signal strength in bits each time a sample is taken.

(to p51)

54

• 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)

55

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)

56

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)

57

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)

58

Data Coding (cont.)

– these symbols, which have specific meaning, is termed as code.

– Examples: • Morse code• Machine code

(to p59)

(to p60)

59

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• see Figure 7.1• Morse translator program

(to p78)

(to p58)

60

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-to-machine when they converted into electronic signals; by presenting 0 bits and 1 bits into on or off current flow

(to p61)

61

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:

code points

Different coding systems

(to p62)

(to p66)

62

Code points

– Example:– if a coding system is consists of 5 series of

digits, then the coding point is

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 p79)

(to p63)

(to p64)

(to p65)(to p61)

63

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)

64

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)

65

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

– eg: generate “Bip” sound when paper is out from the fax machine

(to p62)

66

Types of coding system in telecom.

• In this section, we discuss the following types:– 1. Baudot code– 2. American Standard Code for Information

Interchange (ASCII)– 3. Extended Binary Coded Decimal

Interchange Code (EBCDIC)– 4. Binary Coded Decimal (BCD)– 5. N-out-of-M Code

• How to convert them from one to another

(to p67)

(to p69)

(to p73)

(to p71)

(to p72)

(to p74)(to p77)

67

Baudot code

• 1.Baudot code– uses 5 bits to represent information– mostly paper tape or punch cards– 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)

(to p88)

68

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)

69

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)

70

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)

71

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)

72

BCD

• 4. Binary Coded Decimal (BCD)– 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)

(to p89)

73

N/M code

• 5. N-out-of-M code– 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)

(to p87)

74

Question:

• How do we evaluate which code system is more effective? (to p75)

75

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)

76

End

77

• 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-bit code

– example – may encounter some difficulty when

converting EDCDIC to ASCII (why?)– (how to rectify this problem?)

(to p84)

(to p66)

78

FIGURE 7-1 The Morse code.

(to p59)

79

FIGURE 7-2 Powers of 2.

(to p62)

80

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)

81

FIGURE 7-4 Baudot code.

(to p68)

82

FIGURE 7-5 ASCII code.

(to p70)

83

FIGURE 7-6 EBCDIC code.

(to p71)

84

FIGURE 7-7 A method for converting a 3-bit code to a 4-bit code.

(to p77)

85

86

Code efficiency

• Example:

– If an 8-bit code that includes one parity check– Then

• Code efficiency = 7/8 = 87.5%

87

(to p73)

88

(to p67)

89

(to p72)