资源描述:
《直接序列扩频 实验报告》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、WirelessNetwork–Lab2DirectSequenceSpreadFrequencyTechniquesName:XIELingClass:2008215106StudentNumber:08212917AbstractThisexperimentisdesignedtolearnthefundamentalsofthedirectsequencespreadspectrumandcodedivisionmultipleaddresstechniques.Descriptionso
2、fExperiment1.Writeaprogramtogeneratethem-sequencewith.Sinceanm-sequencegeneratorusuallyadoptedasthepseudorandomsequencegenerator,whichisalinearfeedbackshiftregister’s(LFSR)output,theLSFR’simplementationofthegivenpolynomialisasfollow:B14B13B12B9B8B7B6
3、B5B4B0Outputx15+x13+x9+x8+x7+x5+1Figure1LFSRimplementationAsthefigureshows,thenumberofpolynomialcoefficientsis15,thenthenumberofregisterswhichareneededforshiftingis2^15-1(Notice:statefullofzeroisinvalid).Giventhatinitialstateofregister000000000000001
4、.Thenthefirstoutputis0,andthenewdatainregistersB13toB0arethepreviousdatainregistersB14toB1respectivelybylinearshifting.ThenewdatainregisterB14isthemod-2sumofB0,B5,B7,B8,B9andB13.InMATLAB,thisprocessisrealizedasnewRegister(1:lenC-1)=register(2:lenC);n
5、ewRegister(lenC)=mod(sum(coefficient.*register),2);Whenanewregisterstateisgenerated,thesequenceoutputisthefirstbitofthenewstate.InMATLAB,theprocesscanbedonebyaloopwith2^15-1timesasfollows:fori=2:lenR%code...mSeq(i)=register(1);WirelessNetwork–Lab2end
6、;Inthemainfunction,themSeqGenerate(coefficient)functionisinvokedtogeneratetherequiredm-sequence.Asthepolynomialdefined,thecoefficientparameterinthisexperimentis100001011100010.InMATLAB,itisinvokedasthecodebelow:coefficient=[100001011100010];mSequence
7、=mSeqGenerate(coefficient);stairs(mSequence);2.Drawtheautocorrelationofthegeneratedm-sequence.Them-sequencehasgoodperformanceinautocorrelation.Intheory,theautocorrelationisperiodicdefinedasthefollowingequation,whereNisthelengthofthesequence.InMATLAB,
8、theautocorrelationcanbeobtainedthefunction[ACF,Lags,Bounds]=autocorr(Series)whereseriesistheinputsequenceandACFistheautocorrelationofthesequence.Thecodeisasfollowautocorr(mSequence);3.Buildupasimulationsystemwiththedatarate1bit/s,spreadinggain64andth