You are on page 1of 17

VITERBI DECODER PROCESSING

Viterbi References
Suggestedreferences:
J.G.Proakis andM.Salehi,FundamentalsofCommunication Systems,PrenticeHall,2005.[codingandviterbi] A.J.Viterbi,ErrorBoundsforConvolutionalCodesandan AsymptoticallyOptimumDecodingAlgorithm, IEEETrans. onInformationTheory, April1967. G.D.Forney,MaximumLikelihoodSequenceEstimation ofDigitalSequencesinthePresenceofIntersymbol Interference, IEEETrans.onInformationTheory, May1972. H.L.Lou,ImplementingtheViterbiAlgorithm, IEEE SignalProcessingMagazine, Sept.1995. P.J.Black,AlgorithmsandArchitecturesforHighSpeed ViterbiDecoding, Ph.D.dissertation,March1993.

B.Baas, 2013,EEC281

133

Viterbi Algorithm
Widelyusedincommunicationsystemstodecodea datasequencethathasbeenencodedbyafinite state process
Ex:ethernetreceiver Ex:harddiskreadelectronics

AverycommondemandingDSPtask
Ex:viterbibuildingblocksareineveryseriousDSP benchmarkingsuite Ex:TheTexasInstrumentsC64xDSPprocessorhasa dedicatedonchipviterbidecoder.Theviterbi decoderand aturbodecoder occupyabout8%ofthechipsarea

B.Baas, 2013,EEC281

134

Viterbi Algorithm
Involvescodingdata,addingnoise,anddecoding
Deliberateencoding:convolutionalortrelliscodes Unintentionalencoding:intersymbolinterference

Outputisanestimate oftheoriginaldata Viterbialgorithmisoptimalinthemaximum likelihoodsenseitfindstheinputthatismost likely,giventheobservedchanneloutput


noise data input coding + decoder data estimate

channel
B.Baas, 2013,EEC281
135

Convolutional Coding Example


Encodingisaprocesswhichaddsredundancytodatatoreduce theprobabilityoferrorsorincreasethelevelofacceptablenoise inthechannel Theconstraintlength(commonlycalledk)isameasureofthe complexityofthecode
Ex:k=7 2k1 states=26 states=64states(inWiFi) Ex:k=9 256states(achallengingdesign)

Ex:a4state,Rate= convolutionalencoder
inputdataxn encodedsymbolsy1 andy2 y1,n =xn XOR xn1XOR xn2 y2,n =xnXOR xn2 Twodatabitsoutputbydecoderforeachinputbit(rate=) Doublerate outputbitstypicallysentseriallyintoonechannel

B.Baas, 2013,EEC281

136

Convolutional Coding Example


Presentstate: Nextstate: xn2 xn1
XOR

xn1 xn (input)
y1,n

xn

xn-1
XOR

xn-2 y2,n
137

B.Baas, 2013,EEC281

Convolutional Coding Example


8entrytruthtable
inputs:threexs outputs:twoys

xn,xn1,xn2 000 001 010 011 100 101 110 111

y1,n 0 1 1 0 1 0 0 1

y2,n 0 1 0 1 1 0 1 0
138

B.Baas, 2013,EEC281

Convolutional Coding Example


Eachstatecantransitiontoonly2otherstates
Thesetwostatesarereachedbyeitherxn =0or1

Nextstatefoundby:

xn1

xn (input)

01

xn / y2,n, y1,n xn-2 ,xn-1


0/00

1/11 0/10 00 1/00 0/11 10

1/10

11

1/10

0/01
139

B.Baas, 2013,EEC281

Trellis
Thetrellis isatimeindexed versionofthestatediagram Eachstatetransition(inputbit intotheencoder)corresponds toaforwardstepinthetrellis
State 00 01 10 11 time: n n+1 00 01 10 11

01

01

00

11

00

11

10

10

B.Baas, 2013,EEC281

140

Trellis
Givenastartingstate,everypossibleinputsequence correspondstoauniquepaththroughthetrellis Example:
Inputxn =0,1,1,0 Output ={0,0},{1,1}, {1,0},{1,0} State 00 01 10 11 0/00
B.Baas, 2013,EEC281

1/11

1/10

0/10
141

Viterbi Decoding
Viterbidecodercalculatesasemibruteforceestimateofthe likelihoodforeachpaththroughthetrellis Keypoint:Oncetheestimatesforallstatesinastep/iteration of thetrellishavebeencalculated,theprobabilitiesforall previoussteps/iterationscanbediscarded;onlythemostlikely entrytoastateneedberemembered Fourbasicsteps
1. Calculatethetrellis
a) Weightthetrellisbranchesbycalculatingbranchmetrics b) Computetheminimumweightpathtotimen+1intermsofthe minimumweightpathtotimen.Retainstepdecisions.Usesadd compareselect(ACS) algorithm.

2. Findthelaststateoftheminimumweightpath. 3. Findtheentireminimumweightpath.Alsocalledsurvivorpath decodeortraceback. 4. Reorderbitsintocorrectforwardordering.


B.Baas, 2013,EEC281
142

1. Calculating the Trellis


Eachbranchisassignedaweight,calledabranchmetric Thebranchmetricisameasureofthelikelihoodofthe transitiongiventhenoisyobservations Likelihoodofatransitionisgivenbyanappropriatemeasureof thedistance betweenanidealencoderoutputandtheactual receivedsignal Morelikelytransitionsreceivesmaller weights Example:
Receive:{0.13,0.86} Branchwith{0,0}outputsreceivesalowerprobability(larger weight)thanthe{0,1}branch

Goalistofindtheminimumweightpath(oftencalledshortest path)throughthetrellis

B.Baas, 2013,EEC281

143

1b) ACS
Goalistofindthemostlikelyentrypathintoastate ADDpreviousstatemetrictocurrentbranchmetric
forfirstbranch forsecondbranch

COMPAREwhichincomingbranchproducesthe lowermetric(higherprobability) SELECTtheminimumandsavethebranch FullyparallelviterbidecodersusemanyACS datapathstocalculateanentiretrellisstateupdatein onecycle


B.Baas, 2013,EEC281
144

ACS Hardware
Branch metric Decision bit

Compare

Select (mux)

Previous state metric 0

New state metric

Previous state metric 1

Branch metric
B.Baas, 2013,EEC281
145

2. Finding The Most Likely Path


Afteralldatahavebeenprocessed,wemustfindthe mostlikelypaththroughthetrellis Donebysearchingthroughthefinalcolumn of statesandselectingthemostlikely(lowestweight) Operationdoneinfrequentlycomparedtoother calculations

B.Baas, 2013,EEC281

146

3. Traceback
Thegoalistoreadoutthebestestimateforall decodedbits Theprocessbeginsatthemostlikelystateandit followsthisprocedureforeachstateinthetrellis
1) ReadstoreddecisionbitfromACS 2) Outputthisdecodedbit 3) Usethedecisionbittocalculatethepreviousstateinthe trellis 4) <repeat>

B.Baas, 2013,EEC281

147

4. Reorder Output Bits


Bitsoutputfromthetraceback operationarein reverseorder(lastbitoutcorrespondstofirst received) Needlogicandmemorytobufferandreverseorder Fundamentaltothealgorithm,cannotbeavoided Summary
Viterbiisdataandmemoryintensive
Forward ACS Reverse traceback Forward reordering

B.Baas, 2013,EEC281

148

You might also like