Chuong 1_Ma Hoa Kenh

Embed Size (px)

DESCRIPTION

Tài liệu mã hóa kênh, thông tin quangNguyễn Dương chia sẻ miễn phífacebook.com/yeupeni

Citation preview

  • CHNG 1: M HA KNHng L KhoaEmail: [email protected]

    Facuty of Electronics & Telecommunications, HCMUS*

  • Ni dung trnh by:M ha knh ( Channel coding )M ha khi (Block codes)+ M lp (Repetition Code)+ Hamming codes+ Cyclic codes* Reed-Solomon codesM ha chp (Convolutional codes)+ Encode+ Decodeiu ch m li (Trellis Coded Modulation)

    *

  • S khi DCSFormatSourceencodeFormatSourcedecodeChannelencodePulsemodulateBandpassmodulateChanneldecodeDemod. SampleDetectChannelDigital modulationDigital demodulation*

  • Channel coding l g?Tn hiu truyn qua knh truyn s b nh hng bi nhiu, can nhiu, fading l tn hiu u thu b sai.M ha knh: dng bo v d liu khng b sai bng cch thm vo cc bit d tha (redundancy). tng m ha knh l gi mt chui bit c kh nng sa liM ha knh khng lm gim li bit truyn m ch lm gim li bit d liu (bng tin)C hai loi m ha knh c bn l: Block codes v Convolutional codes

    *

  • Cc loi m ha sa saiM lp (Repetition Code)M khi tuyn tnh (Linear Block Code), e.g. HammingM vng (Cyclic Code), e.g. CRCBCH v RS CodeM chp (Convolutional Code)Truyn thng, gii m ViterbiM TurboM LDPCCoded ModulationTCM BICM*

  • M lpRecovered state*

  • Kim tra chn l (Parity Check)Thm 1 bit xor cc bit c kt qu l 0D liu truyn, sa li, khng th sa li

    Kim tra hng v ctng dng: ASCII, truyn d liu qua cng ni tip*

  • M khi tuyn tnh (Linear block codes)Chui bit thng tin c chia thnh tng khi k bit. Mi khi c encode thnh tng khi ln hn c n bit.Cc bit c m ha v gi trn knh truyn.Qu trnh gii m c thc hin pha thu.

    *

  • Linear block codes contdKhong cch Hamming gia hai vector U v V, l s cc phn t khc nhau.

    Khong cc ti thiu ca m ha khi l

    V d: Tnh khong cch Hamming ca C1: 101101 v C2 :001100Gii: V =>d12=W(1000001)=2 => Ta c th gii m sa sai bng cch chn codewords c dmin

    *

  • Linear block codes contdKh nng pht hin li c cho bi:

    Kh nng sa li t ca m ha c nh ngha l s li ti a c th sa c trn 1 t m (codeword)

    *

  • Linear block codes contdEncoding trong b m ha khi (n,k)

    Cc hng ca G th c lp tuyn tnh.*

  • Linear block codes contdExample: Block code (6,3)

    Message vectorCodeword*

  • Linear block codes contdM ha khi (n,k)k phn t u tin (hoc cui cng) trong t m l cc bit thng tin.*

  • Linear block codes contdi vi bt k m ha khi tuyn tnh, chng ta c mt ma trn . Cc hng ca ma trn ny trc giao vi ma trn :

    H c gi l ma trn kim tra parity v cc hng ca chng c lp tuyn tnh.i vi m ha khi truyn tnh:*

  • Linear block codes contd

    Kim tra c trng:S l c trng ca r, tng ng vi error pattern e.

    *

  • Linear block codes contdMng tiu chunHng c to thnh bng cch cng U vi pattern

    zero codewordcosetcoset leaders*

  • Linear block codes contdMng tiu chun v c trng bng gii mTnhTm coset chnh , tng ng vi .Tnh v tng ng vi .

    Ch :Nu , error c sa.Nu , b gii m khng th pht hin li.*

  • Linear block codes contdV d: Mng chun cho m (6,3)Coset leaderscosetcodewords*

  • Linear block codes contdError patternSyndrome*

  • Hamming codes L trng hp ring ca linear block codesDin t theo hm ca mt s nguyn .

    Hamming codes*

  • Hamming codesExample: Systematic Hamming code (7,4)

    *

  • M ha HammingM ha: H(7,4) Nhiu php kim tra tngMessage=[a b c d]r= (a+b+d) mod 2s= (a+b+c) mod 2t= (b+c+d) mod 2Code=[r s a t b c d]Tc m: 4/7Cng nh, nhiu redundance bit, c bo v tt hn.Khc bit gia pht hin v sa li

    Message=[1 0 1 0] r=(1+0+0) mod 2 =1 s=(1+0+1) mod 2 =0 t=(0+1+0) mod 2 =1Code=[ 1 0 1 1 0 1 0 ]*

  • Hamming codesExample: Systematic Hamming code (7,4)

    *

  • V d m ha HammingH(7,4)Ma trn sinh G: u tin l ma trn n v 4x4D liu truyn l vector pVector truyn x (G=[I/P])

    Vector nhn r v vector li e*

  • Sa liNu khng c li, vector c trng (syndrome) z=zeros

    Nu c 1 li v tr th 2

    Vector c trng z l

    tng vi ct th 2 ca H. Vy, li uc pht hin v tr th 2 v c th sa li cho ng. *

  • li m ha (Coding Gain)Tc m R=k/n, k: s symbol d liu, n tng symbolSNR t v SNR ca bit

    Vi mt s m ha, li m ha ti mt sc xut li bit c nh ngha l s khc bit gia nng lng cn thit cho 1 bit thng tin m ha t c sc xut li cho trc v truyn dn khng m ha*

  • V d li m ha*

  • Example of the block codes8PSKQPSK*

  • Cyclic codeCyclic codes c quan tm v quan trng v Da trn cu trc i s v c th ng dng rng ri. D dng thc hin bng thanh ghi dch (shift register) c ng dng rng ri trong thc nghimTrong thc nghim, cyclic codes c s dng pht hin li (Cyclic redundancy check, CRC) c s dng trong mng chuyn mch giKhi c 1 li c pht hin b nhn, chng s c yu cu truyn li. ARQ (Automatic Repeat-reQuest)*

  • Cyclic block codesMt m tuyn tnh (n,k) c gi l Cyclic code nu khi dch vng 1codeword th cng l codeword.

    V d:*

  • Cyclic block codesCu trc i s ca Cyclic codes, suy ra codewords c sinh ra t

    Mi quan h gia codeword v thanh ghi dch:

    Vy:By extension*

  • Cyclic block codesThut ton m ha Cyclic code (n,k):Nhn thng tin vi chui bngChia kt qu bc 1 vi a thc sinh . Ly l phn dThm vo to thnh codeword *

  • Cyclic block codesExample: For the systematic (7,4) Cyclic code with generator polynomial Find the codeword for the message

    *

  • Cyclic block codesFind the generator and parity check matrices, G and H, respectively.Not in systematic form.We do the following:

    *

  • Cyclic block codesGii m Cyclic code:T m b thu c cho bi

    c trng phn d c c bng cch chia chui nhn cho a thc sinh:

    Vi c trng v mng tiu chun, li s c c lng.

    Received codewordError pattern*

  • V d CRC*

  • Checking for errors*

  • Kh nng ca CRCMt li E(X) khng th pht hin khi chng chia ht cho G(x). Ngc li, th c th pht hin li.C kh nng mnh m trong pht hin li*

  • BCH CodeBose, Ray-Chaudhuri, HocquenghemC kh nng sa c nhiu liD dng thc hin m ha v gii mCc chun trong cng nghip- (511, 493) m ha BCH trong ITU-T. Chun H.261- mt chun m ha video c s dng cho video conferencing v video phone.(40, 32) m ha BCH trong ATM (Asynchronous Transfer Mode)

    *

  • BCH Performance*

  • Reed-Solomon CodesMt trng hp ring ca non-binary BCHc ng dng rng riStorage devices (tape, CD, DVD)Wireless or mobile communicationSatellite communicationDigital television/Digital Video Broadcast(DVB)High-speed modems (ADSL, xDSL)

    *

  • Gii thiu Convolutional CodeConvolutional code to ra t m bng cch nhn chp chui bit thng tin vi chui pht (generator)M ha K bit thng tin thnh t m N bit (N>K) mi bc thi gian (ln dch) *

  • Encoder Convolutional code c yu cu thc hin n gin trong cc ng dng. Chng hot ng thnh cc lung (stream) (not in blocks)Convolution code c nh v c tn dng cc bit trc m ha v cc bit sau gii m (block codes khng dng b nh)Convolutional code c biu din (n,k,L), vi L l m ha (or encoder) Memory depth (number of register stages)Constraint length C=n(L+1) c nh ngha l s cc bit c m ha ca mt bit thng tin c lin quan*

  • ExampleConvolutional encoder, k = 1, n = 2, L=2Convolutional encoder l mt finite state machine (FSM) x l cc bit thng tin thnh 1 chui ni tipM c pht ra nh l mt hm ca ng vo v trng thi ca FSMV d b m ha (n,k,L) = (2,1,2) ca mi bit thng tin bao gm C= n(L+1)=6 bit ng ra lin tc = constraint length CV d, ng ra c n-bit, chng ta cn n thanh ghi dch cho b m ha*

  • Example: Using generator matrix*

  • Example of exhaustive maximal likelihood detection Gi s c 3 bit thng tin c truyn [v m ha theo phng php (2,1,2)]. Hai bit 0 c thm vo cui cng ca chui bit thng tin. Vy 5 bit c m ha v sinh ra m 10 bit. Gi s knh truyn c xc sut li l p = 0.1. D liu sau knh truyn 10,01,10,11,00 (bao gm li). Kho st b gii m:abcdstatesdecoder outputs if this path is selected*

  • Note also the Hamming distances!The largest metric, verifythat you get the same result!*

  • The Viterbi algorithmProblem of optimum decoding is to find the minimum distance path from the initial state back to initial state (below from S0 to S0). The minimum distance is the sum of all path metrics that is maximized by the correct pathExhaustive maximum likelihood method must search all the paths in phase trellis (2k paths emerging/ entering from 2 L+1 states for an (n,k,L) code)The Viterbi algorithm gets its efficiency via concentrating into survivor paths of the trellisReceived codesequenceDecoders output sequencefor the m:th path*

  • The survivor pathAssume for simplicity a convolutional code with k=1, and up to 2k = 2 branches can enter each state in trellis diagramAssume optimal path passes S. Metric comparison is done by adding the metric of S into S1 and S2. At the survivor path the accumulated metric is naturally smaller (otherwise it could not be the optimum path)

    For this reason the non-survived path can be discarded -> all path alternatives need not to be consideredNote that in principle whole transmitted sequence must be received before decision. However, in practice storing of states for input length of 5L is quite adequate*

  • Example of using the Viterbi algorithmAssume the received sequence is and the (n,k,L)=(2,1,2) encoder shown below. Determine the Viterbi decoded output sequence!(Note that for this encoder code rate is 1/2 and memory depth L = 2)*

  • The maximum likelihood pathThe decoded ML code sequence is 11 10 10 11 00 00 00 whose Hamming distance to the received sequence is 4 and the respective decoded sequence is 1 1 0 0 0 0 0 (why?). Note that this is the minimum distance path.(Black circles denote the deleted branches, dashed lines: '1' was applied) Smaller accumulated metric selectedFirst depth with two entries to the nodeAfter register length L+1=3branch pattern begins to repeat(Branch Hamming distancesin parenthesis)*

  • Turbo CodesBackgoundTurbo codes were proposed by Berrou and Glavieux in the 1993 International Conference in Communications.Performance within 0.5 dB of the channel capacity limit for BPSK was demonstrated.Features of turbo codesParallel concatenated coding Recursive convolutional encodersPseudo-random interleavingIterative decoding

    *

  • Motivation: Performance of Turbo CodesComparison:Rate 1/2 Codes.K=5 turbo code.K=14 convolutional code.Plot is from: L. Perez, Turbo Codes, chapter 8 of Trellis Coding by C. Schlegel. IEEE Press, 1997Gain of almost 2 dB!Theoretical Limit!*

  • The Turbo-PrincipleTurbo codes get their name because the decoder uses feedback, like a turbo engine.

    *

  • Performance as a Function of Number of IterationsK=5, r=1/2, L=65,536

    *

  • Turbo Code SummaryTurbo code advantages:Remarkable power efficiency in AWGN and flat-fading channels for moderately low BER.Deign tradeoffs suitable for delivery of multimedia services. Turbo code disadvantages:Long latency.Poor performance at very low BER.Because turbo codes operate at very low SNR, channel estimation and tracking is a critical issue.The principle of iterative or turbo processing can be applied to other problems.Turbo-multiuser detection can improve performance of coded multiple-access systems.

    *

  • Trellis Coded ModulationCombine both encoding and modulation. (using Euclidean distance only)Allow parallel transition in the trellis.Has significant coding gain (3~4dB) without bandwidth compromise.Has the same complexity (same amount of computation, same decoding time and same amount of memory needed).Has great potential for fading channel.Widely used in Modem*

  • Set PartitioningBranches diverging from the same state must have the largest distance.Branches merging into the same state must have the largest distance.Codes should be designed to maximize the length of the shortest error event path for fading channel (equivalent to maximizing diversity).By satisfying the above two criterion, coding gain can be increased.

    *

  • Coding GainAbout 3dB*

  • EE 552/452 Spring 2007Homework7.27.77.97.11*

  • EE 552/452 Spring 2007ReferenceTheodore S.Rappaport, Wireless Communications: Principles and Practice, Prentice Hall P T R, USA, 1996*

  • EE 552/452 Spring 2007Questions?*

    ****Parity chn: s bit 1 l chn***********************************************************