Lê Đắc Nhường - Ky Thuat Truyen So Lieu

  • Published on
    24-Jun-2015

  • View
    503

  • Download
    1

Embed Size (px)

DESCRIPTION

Uploaded from Google Docs

Transcript

<p>TRNG I HC HNG HI KHOA CNG NGH THNG TIN B MN K THUT MY TNH</p> <p>BI GING MN HC</p> <p>K THUT TRUYN S LIU</p> <p>Hi Phng 2009-1-</p> <p>MC LC</p> <p>Chng I: TNG QUAN .......................................................................................................................... 1. Mt s khi nim.................................................................................................................................. 2. M ha d liu ..................................................................................................................................... 3. Cch truyn thng tin trn ng dy ................................................................................................. 4. Nhng vn c bn trong truyn thng ............................................................................................ Chng II: H THNG TRUYN THNG ............................................................................................. 1. H thng truyn thng ......................................................................................................................... 2. Phng tin truyn tin. ........................................................................................................................ 3. Cc chun giao tip trong truyn thng ............................................................................................... 4. Mch iu khin truyn s liu ............................................................................................................ 5. Mng truyn thng ............................................................................................................................... Chng III: K THUT TRUYN S LIU ............................................................................................ 1. Khi qut ............................................................................................................................................. 2. Cc k thut truyn s liu ................................................................................................................... Chng IV: CC VN C BN TRONG TRUYN THNG............................................................. 1. M ho pht hin sai, sa sai .............................................................................................................. 2. Kim sot ng truyn ...................................................................................................................... Chng 5: MNG TRUYN S LIU ..................................................................................................... I. Tng quan ............................................................................................................................................ 1. Mng truyn s liu ............................................................................................................................. 2. Kin trc phn tng v m hnh OSI .................................................................................................... II. Mng truyn s liu ............................................................................................................................. 1. Phn loi mng theo k thut chuyn mch ......................................................................................... 2. K thut LAN ....................................................................................................................................... TI LIU THAM KHO ............................................................................................................................</p> <p>-2-</p> <p>Mc ch mn hc: Hin nay vic truyn ti thng tin qua my tnh v ang c p dng rng ri. My tnh khng ch dng tnh ton, qun l, m phng, m cn c s dng truyn ti thng tin cng nh iu iu khin cc thit b thc trong thc t. Mn hc cung cp cc khi nim tng qut v k thut truyn s liu, mng truyn thng (Kh nng truyn ti, chn mng truyn, kim sot lung d liu, m ho)</p> <p>Ni dung: (5 chng) 1. Tng quan 2. H thng truyn thng 3. K thut truyn s liu 4. Cc vn c bn trong truyn thng 5. Mng truyn s liu.</p> <p>Yu cu 1. Tham d y cc tit hc 2. Thi hc tp tt trn lp 3. Thc hin cc bi kim tra gia k 4. Thi kt thc hc phn Z= 0,2X + 0,8Y</p> <p>-3-</p> <p>Chng I: TNG QUAN</p> <p>I. MT S KHI NIM: 1. Thng tin, tn hiu: - Thng tin: S cm hiu con ngi v th gii xung quanh - Nhu cu trao i thng tin: Rt ln - D liu: Dng biu din thng tin (ch vit, hnh nh, c ch, li ni...). c bit trn my tnh d liu c s ho c kh nng lu tr, x l, bin i, truyn gi... (Ch : Phn bit gia d liu v thng tin). - Thng tin khi truyn: Theo cc dng nng lng khc nhau: m, in, sng quang, sng in t... - Vt mang: Mi trng dng mang thng tin (L dng nng lng - C kh nng lu tr, truyn gi...) - Tn hiu: Vt mang cha thng tin trong n, L mt hm n tr bin thin theo thi gian hay tn s. - Tn hiu lin tc: L tn hiu bin thin lin tc theo thi gian v c bin bin thin lin tc (Nu v d) - Tn hiu ri rc: Tn hiu c bin c lp ri rc, ta c th thu tn hiu ri rc bng cch ly mu ri rc t tn hiu lin tc (tn hiu ly mu). - Tn hiu lng t: Tn hiu c bin ri rc theo cc mc lng t. - Tn hiu s: Tn hiu ri rc ho c v bin , tn s ln thi gian.</p> <p>S(t)</p> <p>S(t)</p> <p>2. Tn s, ph, bng thng:</p> <p>t</p> <p>t</p> <p>- Tn s: Tn s (f) ca tn hiu l s dao ng ca tn hiu trong mt n v thi gian (thng tnh bng giy) - Chu k: Chu k (T) ca tn hiu l khong thi gian tn hiu lp li mt ln. - Pha: L n v o v tr tng i ti mt thi im trong mt chu k n ca tn hiu, n c trng cho tnh tr. - Ph: Ph ca tn hiu l dy cc tn s m n c th cha. - Bng thng: Bng thng ca tn hiu l rng ca ph. - Tng quan gia tc truyn v bng thng: Do biu din tn hiu di dng sng theo tn s: s(t ) =</p> <p> k sin 2kft nn khng c gii hn v tn s, dn n khng c gii hn v bng thng.k =1</p> <p>1</p> <p>-4-</p> <p>Bin cc xung thnh phn th k l 1/k, do vy nng lng ch tp trung mt s thnh phn ban u =&gt; tc truyn w (b/s) =&gt; bng thng yu cu 2w (Hz) II. M HO D LIU: Trong qu trnh lu tr v truyn gi, d liu lun phi c bin i, m ho sao cho ph hp vi vt mang, c kh nng truyn ti trn ng truyn, c kh nng bo v, trnh cc li c th sy ra, khi d liu thng m ho di dng tn hiu s hoc tng t tu thuc vo yu cu, mc ch. M ho: Lut nhn bit thng tin cn phi biu din vi dng tn ti nh phn. di m: ph thuc vo gi tr s ct nh phn ca k t mun biu din. Thng tin cn truyn: c m ha, trn thc t l tp cc gi tr phn t ca n. Biu din nh phn cc k t di1...din, thuc [0,1] ca k t Ci gi l t m.</p> <p>Nguyn tc m ha: Tn dng mi kh nng biu din; Biu din trong h thp phn n gin; Thun tin, d sp xp; Cho php bo v hoc sa sai.</p> <p>1. D liu s, tn hiu s: D liu s: D liu c bin ri rc ho v thi gian. Dng m ho n gin nht ca d liu s l t mt mc in p cho gi tr 1 nh phn v mt mc in p khc cho gi tr 0 nh phn. D liu nh phn c truyn bng cch m ho mi bt d liu bi xung tn hiu. Qu trnh nhn tn hiu bn thu ph thuc vo cc yu t: Ni nhn phi bit khong thi gian ca tng bt, ngha l phi bit chnh xc thi im bt u v kt thc Phi pht hin ra mc ca tn hiu Do nhiu v cc nguyn nhn khc, s c li xy ra.</p> <p>Ba yu t chnh nh gi s thnh cng ca vic nhn tn hiu l: mc nhiu, tc truyn, kh nng ng truyn. Ngoi ra mt yu t khc dng nng cao hiu qu trong qu trnh truyn l m ho d liu, ngha l chuyn cc bt d liu thnh cc thnh phn ca tn hiu. Cc kiu m ho: a. M NRZ (None Return to Zero): + M NRZ-L (Level): y l phng php n gin nht, s dng hai mc in p khc nhau cho hai gi tr nh phn: Mc in p cao tng ng gi tr 0 nh phn Mc in p thp tng ng gi tr 1 nh phn Phng php ny s dng to v biu din d liu s bng cc thit b u cui v mt s thit b khc</p> <p>+ M NRZ-I (Inverted) Phng php ny duy tr xung in p khng i trong sut thi gian tn ti bt. Bn thn d liu c m ho di dng c hay khng s thay i trng thi ti thi im u tin ca mt bt 1.-5-</p> <p>+ u / nhc im: C tin cy cao trong vic pht hin ra s thay i trng thi trong iu kin c nhiu. Tn ti thnh phn 1 chiu, thiu kh nng ng b ho, Nu c s sai lch trong thi gian ng b gia hai bn s lm mt s ng b Do tnh n gin v c im c tn s tng i thp nn thng c s dng trong lu tr tn hiu s dng t</p> <p>Chui bt</p> <p>M NRZ-L</p> <p>M NRZ-I</p> <p>AMI</p> <p>M 3 mc</p> <p>M Manchester</p> <p>b. M nh phn nhiu mc: Phng php ny s dng hn hai mc tn hiu + M lng cc AMI (Alternate Mark Invertion): Bt 0 c biu din bi tn hiu mc 0 Bt 1 c biu din bng xung c in p m hoc dng</p> <p>+ M ba bc: Bt 1 c biu din bi tn hiu mc 0 Bt 0 c biu din bng xung c in p m hoc dng</p> <p>+ u / nhc im: Khng lm mt s ng b nu c mt dy di m trong tt c l bit 1 (do da vo kh nng o pha trng thi bit 1). Tuy nhin nu c mt dy cc bit 0 lin tip vn c th to ra li Tn hiu khng c thnh phn 1 chiu C kh nng pht hin li n gin</p> <p>c. M hai pha: M Manchester: S o trng thi gia khong thi gian bit: T thp ln cao biu din bt 1, t cao xung thp biu din bt 0.</p> <p>-6-</p> <p>M Differential Manchester: S o trng thi gia khong thi gian bt dng ng b ho tn hiu bn nhn.</p> <p>2. D liu s, tn hiu tng t: Ph bin nht l d liu truyn qua mng in thoi cng cng, mng chuyn mch v truyn tn hiu tng t trong tn s m thanh (khong t 300Hz n 3400Hz) Phng php m ho: Theo c trng v bin , tn s, gc pha. a. Phng php ASK (Amplitude Shift Keying) Hai gi tr nh phn i din cho 2 bin khc nhau:S (t ) = A . cos (2 f c t )S (t ) = 0</p> <p>vi nh phn 1 vi nh phn 0</p> <p>b. Phng php FSK (Frequency Shift Keying) Hai gi tr nh phn i din cho 2 tn s khc nhau ca tn s mang:S (t ) = A . cos (2 f 1 t )S (t ) = A . cos (2 f 2 t )</p> <p>vi nh phn 1 vi nh phn 0</p> <p>c. Phng php PSK (Phase Shift Keying) Hai gi tr nh phn i din cho 2 gc pha khc nhau ca tn s mang:S (t ) = A . cos (2 f c t + </p> <p>)</p> <p>vi nh phn 1 vi nh phn 0</p> <p>S (t ) = A . cos (2 f c t )</p> <p>Chui bit</p> <p>ASK</p> <p>FSK</p> <p>PSK</p> <p>3. D liu tng t, tn hiu s Phng php chuyn i d liu t tng t sang tn hiu s (s ho d liu) thng qua iu bin m xung a. Phng php PCM (Pulse Code Modulation):-7-</p> <p>Da trn c s nh l ly mu Shannon: Nu mt tn hiu tng t f(t) c ly mu ti nhng khong thi gian bt k v fs&gt;2fmax th nhng mu ny cha ton b thng tin ca tn hiu ban u. Hm f(t) c th c xy dng t nhng mu ny thng qua b lc thng thp. Cch thc: Ly mu d liu tng t vi t l thch hp. Mi mu c gn bng mt m nh phn (hay cn gi l lng t ho) nhng mc khc nhau</p> <p>b. Phng php DM (Delta Modulation) Phng php ny ci tin qu trnh thc hin v gim phc tp ca PCM D liu u vo c xp x bng hm bc thang, p ng xung nh phn ti mi khong thi gian ly mu. u ra ca DM s l cc s nh phn tng ng vi cc mu, mc 1 khi hm bc thang i ln trong khong k tip, ngc li s to ra mc 0</p> <p>DM Output</p> <p>4. D liu tng t, tn hiu tng t Thc t truyn tn hiu tng t d hn so vi tn hiu s Tn hiu truyn i xa, dng anten thu, mun c hiu qu cao cn c tn s cao, v cho php vi nhiu tn s khc nhau. Cc phng php m ho a. iu bin AM (Amplitude Modulation) Tn hiu sau khi iu ch c tn s, gc pha khng thay i so vi ban u nhng bin c bin i theo tn s fm ca sng mang v hai pha ca trc thi gianS (t ) = [ + m a x ( t ) ] cos (2 f c t + ) ) 1 .</p> <p>(hnh v) b. iu tn FM (Frequency Modulation)</p> <p>-8-</p> <p>Tn hiu sau khi iu ch c bin , gc pha khng thay i so vi ban u, c tn s bin i, cc i ti thi im c bin sng iu ch bng A v ngc li.S (t ) = A . cos (2 f c t + ' ( t ) + </p> <p>)</p> <p>(t) = ntm(t) : lch pha tn (hnh v)</p> <p>c. iu pha PM (Phase Modulation) Tn hiu sau khi iu ch c tn s, bin khng thay i so vi ban u, c gc pha ngc pha vi tn hiu sng mang.S (t ) = A . cos (2 f c t + a ( t ) + </p> <p>)</p> <p>a(t): lch pha S(t) so vi sng mang (hnh v)</p> <p>III. CCH TRUYN THNG TIN TRN NG DY: Khi truyn thng tin trn ng dy: Cc bit phi c truyn lin tip theo th t tng dn t b1 n bn Bt kim tra phi c truyn sau cng.</p> <p>1. Phng thc truyn: Vic truyn mt dy bit d liu t mt thit b ny n mt thit b khc qua ng truyn lin quan n nhiu vn hot ng v s tng thch nhau gia cc thit b tham gia. Mt trong nhng vn c bn cn thit nht l s ng b. Khi hai bn thc hin vic trao i d liu th bn nhn phi bit c tc ca cc bt trn ng truyn, t xc nh gi tr chnh xc cc bit. C hai cng ngh c s dng: V thi gian: Truyn ng b hay khng ng b (d b) V s dng ng truyn: Truyn song cng hay bn song cng</p> <p>a. Truyn ng b: D liu c chia thnh cc khung (Frame) gm hu hn cc bt. Mi khung bao gm cc bt d liu, cc bit c nh du bt u, kt thc khng sy ra li, hai bn truyn nhn phi c ng b vi nhau. Gii php: To thm mt ng truyn ring lm nhim v truyn xung ng b gia hai bn. Bn truyn s truyn theo ng truyn ny mt xung in ngn tng ng vi 1 bit trn ng truyn tin, bn nhn s dng cc xung ny lm ng h m nhp xc nh cc bit trn ng truyn. - Nhng thng tin ng b vo tn hiu d liu, khi khun dng d liu: Flag Control Data Control Flag</p> <p>Vi phng thc truyn ng b, khi d liu hon chnh c truyn nh mt lung bit lin tc khng c tr hon gia mi phn t 8 bit. cho php thit b thu t c cc mc ng b khc nhau, cn c cc c trng: Lung bit truyn c m ho mt cch thch hp my thu c th duy tr trong c cu ng b bit. Tt c cc Frame c dn u bi mt hay nhiu byte iu khin nhm m bo my thu c th dch lung bit n theo cc ranh gii byte hay k t mt cch chnh xc.-9-</p> <p>Ni dung ca mi Frame c ng gi gia mt cp k t iu khin ng b Frame.</p> <p>b. Truyn khng ng b: D liu c chia thnh cc on c di hu hn gi l k t. Mi k t c x l c lp nhau, bt u bng bt Start (K hiu 0) cho php bn nhn xc nh c bit bt u ca on d liu c truyn n. Bn nhn ly mu cc bt trong on d liu v xc nh v tr bt u ca on d liu tip theo. Bt kt thc Stop (K hiu 1) nh du v tr kt thc k t. ch ny hiu theo bn cht truyn tn hiu s th my pht v my thu c lp nhau trong vic s dng ng h ( b pht xung) nh vy khng cn knh truyn tn hiu ng h gia hai u thu pht. 0 b1 b2 b3 b4 b5 b6 b7 b8 p 1</p> <p>Phng php ny thng c dng khi truyn dng d liu pht sinh theo nhng khong thi gian ngu nhin (vd: truyn k t bn phm, truyn khi k t gia hai my tnh..). c. Truyn bn song cng: Ti mt thi im ch c mt trong hai trm c kh nng truyn Ch ny thng dng trong kt ni gia Terminal Compter d. Truyn song cng: Hai trm ng thi gi v nhn d liu ti mt thi im. Nu l tn hiu s th cn phi c hai ng truyn vt l ring Nu l tn hiu tng t th ph thuc vo tn s tn hiu.</p> <p>IV. NHNG VN C BN TRONG TRUYN THNG Hiu sut truyn tin ( tc truyn): lng thng tin h thng cho php hay c th truyn i trong mt n v thi gian chnh xc truyn tin: kh nng chng nhiu ca h thng Li truyn tin: nhng thng tin truyn trn ng truyn thng b sai do cc nguyn nhn: ng truyn Loi m, iu ch Thit b</p> <p>Li ng truyn: hiu qu lin lc gia hai trm ph thuc s bt u v kt thc Frame: Cu hnh ng truyn Cc phng php m ho Kim sot lung d liu Vn tc nghn Qu trnh nh a ch trm</p> <p>S suy yu ca tn hiu truyn: tn hiu khi nhn c c s sai khc so vi tn hiu khi pht nh hng: Tn hiu lin tc: gim cht lng tn hiu Tn hiu s: sai s v bit truyn</p> <p>Nguyn nhn:- 10 -</p> <p>S suy gim v mo dng Tn hiu b lm chm Tn hiu b nhiu</p> <p>S suy gim v mo dng: Suy gim: suy gim v cng sut tn hiu Vi mi trng nh hng: gi tr c nh theo khong cch truyn Vi mi trng khng nh hng: ph thuc khong cch v p sut khng kh</p> <p>nh hng: Tn hiu thu c khng mnh khi phc li tn hiu ban u b phn thu Tn hiu thu c khng ln m bo t s S/N sinh ra sai s</p> <p>Khc phc: dng b khuch i hoc b lp S lm tr tn hiu: Tn hiu truyn lan trong mi trng bao gi cng b lm tr do tn s khc nhau, khi n b thu s c thi gian khc nhau ( lm chm) Nhiu: tn hiu khng mong mun m bn thu nhn c Nhiu nhit : to ra do s vn chuyn in t trong vt liu. Tn ti trong tt c cc tn hiu in t, trong mi trng truyn v l hm ca nhit : nhiu trng Nhiu do tp m: do cc tn hiu truyn vi tn s khc nhau: li phch tn s Nhiu xuyn m: sinh ra do s ghp in t gia cc cp dy dn song hnh hay cp ng trc khi truyn nhiu knh ng thi Nhiu xung: sinh ra do t bin in t trng, nh sng.</p> <p>- 11 -</p> <p>Chng II: H THNG TRUYN THNG</p> <p>n dng m hnh truyn thng trong thc t: m...</p>