Upload
le-dac-nhuong-dac-nhuong-le
View
214
Download
0
Embed Size (px)
Citation preview
8/8/2019 Chap5 dB Framing
1/11
ECE-4074Web Site ht t p:/ / www.csc.gat ech.edu/ ~copeland/ 40 74
Prof . John A. Copeland
[email protected] ech.edu
404 894 - 5177
Of f ice: GCATT 5 7 9
For of f ice visit , email or call me
or drop by during of fice hours post ed on t he Web Sit e
Appendices 3 A-3C, pp 11 5-1 2 0
Framing
Rat ios as Decibels
Charact erist ic Impedance
Scrambling
EE40 74 .03 v8
8/8/2019 Chap5 dB Framing
2/11
Charact erist ic Impedance
A unifor m t ransmission line will conduct an elect rical pulse
in one direction at a constant speed ( usually ~ 2 E8 m/ s)
without reflect ion i f t he end is t erminat ed wit h R = Zo
+
-
R
Voltage
Dist ance
TransmitterTransmission Line, Zo = R
8/8/2019 Chap5 dB Framing
3/11
Decibels = 1 0 * log (Rat io)
Loss
facto r
= .05
-13 dB
Gain
facto r
= 4 0
=16 dB
Gain
facto r
= 100
= 20 dB
Loss
facto r
= .01
= -20 dB
Loss
facto r
= .02
= -17 dB
Circuit Gain =
.0 5
x 100
x .02x 4 0
x .01
0.04
Circuit Gain =
-13 dB
+20 dB
-17 dB+16 dB
-20 dB
-14 dB
.0 5 = 1 0 * * -1 .3
10 0 = 1 0 * * +2 .0
.0 2 = 1 0 * * -1 .7 4 0 = 1 0 * * +1 .6
.0 1 = 1 0 * * -2 .0
8/8/2019 Chap5 dB Framing
4/11
Decibel Relat ionships
Rat io dB Quick Calculat ion
1 0 1 = 10 * * 0
1 .2 5 1 1 .2 5 = 5 / 4 = 7 -6 dB
2 3 ( 5 / 4 ) * * 3 = 1 2 5 / 6 4
4 6 2 * 2 = 3 +3 dB
5 7 1 0 / 2 = 1 0 -3 dB
8 9 2 * 2 * 2 = 3 +3 +3 dB1 0 1 0 1 0* * 1
10 0 2 0 1 0* * 2
1 0 00 3 0 1 0* * 3
1 / R -D where R -> D log(1 / x) = -log( x)
1 +0 .2 5* f f f < 1 ( f ract ion)
Memorize t he rat ios corresponding t o 1 , 3, and 10 dB, and you can
quickly calculat e t he rat io for any dB.
8/8/2019 Chap5 dB Framing
5/11
Bit -Orient Framing
1 0 0 1 0 1 1 1 1 1 1 0 0 1 1 0 1 0 0 0 0 1 1 0 0 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1 0 0 0 1 1 0 1 1 1 1 1 0 0 1 1
1 0 0 1 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 1 1 0 0 1 1
S t a r t H E L L O
One technique is t o use a special 8-bit " f lag" code (byt e or oct et) t hat
cont ains six "1" s in a row (01 111 110 ) .
A st ream of 0 's and 1's are received. We know it is t ext data
(characters encoded as 8-bit codes). Where are t he f irst bit s of a
code?
FlagFlag Dat a
The " f lags" " frame" t he " dat a". This ty pe of st ructure is cal led a
" packet" , " cell" or " frame" depending on the prot ocol.
8/8/2019 Chap5 dB Framing
6/11
Bit Stuff ing
To prevent a f lag-like sequence appearing in t he dat a, t he following rule is
applied when t he frame is f ormed:
Aft er f ive "1 " s in a row, an extra zero is "st uff ed" int o the bit stream
(whet her the next bit is a " 1" or a " zero") .
When data is t aken out of a frame at t he receiving end, t he following rulerestores the data:
whenever five " 1" s in a row appear, t he next bit is discarded.
Da t a : 0 1 1 0 1 1 1 1 1 0 1 1 0 0 0 1 0 1 1 1 1 1 1 0 0 1 0 1 0 0 0 0 0 0
F r a me d Da t a :
0 1 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 0 0 1 1 0 0 0 1 0 1 1 1 1 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0
8/8/2019 Chap5 dB Framing
7/11
Encoding Rule Violat ion Framing
0 x 1 1 0 1
Man-
chester
Encoding
Bit st ream
In some systems, t he t ransmit t er will send a signal t hat violat es an
encoding rule t o signal t he st art of a f rame. Examples:
0 1 X 1 0 1
Alternate
Mark-
Inversion
AMI
Bit st ream
8/8/2019 Chap5 dB Framing
8/11
Charact er-Orient ed Framing
Some charact er-orient ed prot ocols need t o divide a st ream ofcharact ers (oct et s, byt es) int o frames. Three codes are used to
build fr ames which are designat ed:
" Dat a Link Escape" or DLE
" St art Transmission" or STX
" End Transmission" or ETX
The rules are: Frames are st arted wit h the t wo-oct et s: DLE STX
Frames are ended wit h t he t wo oct et s: DLE ETX
Since all 25 6 po ssible 8- bit codes can appear in t he dat a,
whenever a DLE oct et appears, a second DLE is st uff ed int o t he
charact er stream aft er i t .
Da t a : A B DL E C D S T X F E T X G H
F r a me d Da t a :
D L E S T X A B DLE DL E C D S T X F E T X G H D L E E T X
8/8/2019 Chap5 dB Framing
9/11
Charact er-Orient ed Frame Decode
F r a me d Da t a :
D L E S T X A B DLE DL E S T X D E F E T X G H D L E E T X
Da t a : A B DL E S T X D E F E T X G H
Decoding r ule: whenever a DLE charact er appears in t he incoming
charact er st ream, it is int erpreted in combinat ion wit h t he next charact er
according t o t his t able:
DLE STX = Sta rt o f Fr am e ( d iscar d, st a rt sav ing data )
DLE DLE = Replace wit h single DLE
DLE ETX = End of Frame (d iscard, pass data to higher level)
DLE [ anyt hing else] = coding error.
8/8/2019 Chap5 dB Framing
10/11
Scramblers
There are problems when long st rings of only " 0 " s or
only " 1 " s are t ransmit t ed. To prevent t his a scrambler
can be used at t he t ransmit t er, and a mat ching
descrambler at t he receiver.
Scrambler: B( m) = A( m) B(m-3) B(m-5)
where in t he " exclusive or"
A(m) is t he m' t h bit input
B(m) is t he m' t h b it out put .
Descrambler: C( m) = B( m) B(m-3) B(m-5)
B(m) is the m' t h b it input
C(m) is t he m' t h b it out put .p. 147-149
8/8/2019 Chap5 dB Framing
11/11
Shif t Regist er Scramblers
Scrambler: B( m) = A( m) B(m-3) B(m-5)
Descrambler: C( m) = B( m) B(m-3) B(m-5)
A(m) B ( m )C(m)
C(m) = B(m) B(m-3) B(m-5)
C(m) = {A( m) B(m-3) B(m-5)} B(m-3) B(m-5)
C(m) = A(m) since X X = 0 , Y 0 = Y
B(m-3)
B(m-5)
B(m-1)
B(m-2)
B(m-4)