通原实验报告labview.docx
《通原实验报告labview.docx》由会员分享,可在线阅读,更多相关《通原实验报告labview.docx(15页珍藏版)》请在冰豆网上搜索。
通原实验报告labview
THECOMMUNICATIONFUNDAMENTALSEXPERIMENT
NAME:
单赟吉
STUDENTID:
11211105
CONTENTS
LEB2digitalcommunication3
1.ExperimentPrinciple3
2.ExperimentPurpose5
3.ExperimentalContent5
4.ExperimentalBlockDiagram6
PART1:
TheUARTcommunicationsystem7
PART2:
AnImageoveranLTIChannelandDealingwithNon-Ideality8
5.ExperimentalResults9
LEB5Altitudemodualtion11
1.ExperimentPrinciple11
2.ExperimentPurpose13
3.ExperimentalContent13
4.ExperimentalBlockDiagram14
PART1:
AMtransmitter14
PART2:
ASingle-/Multi-toneAMTransmitter14
PART3:
A*.wavAMtransmitter15
PART4:
AMreceiver16
5.ExperimentalResults17
LAB2
DIGTIALCOMMUNICATION
1.ExperimentPrinciple
1.1UARTprotocol
Asaforementioned,UARTiswidelyusedfordigitalchip-to-chipcommunicationsonembeddedsystems.Whiletherearemanyconfigurations,acommonUARTpacketstructureis10bits-1STARTbit,8DATAbits(onebyte),and1STOPbit.Thisstructureisshowninfigure1below,andiscommonlyreferredtoas8n1(8databits,noparity,1stopbit).Sometimesanadditionalbitisincludedforparitychecking(asimpleformoferrordetection),butthatisnotcoveredinthislab.
ThedatabyteissentLSB(LeastSignificantBit)first,whichmeansweeffectively
sendthebyte"backwards."Forinstance,ifwewantedtosendthebyte00101001,we
wouldtransmitthefollowing10-bitsequence:
0100101001(onestartbit(0),the8
databitsLSB->MSB(10010100),andthenonestopbit
(1)).
Thesebitsareencodedasvoltages:
aHIGHvoltage(i.e.5volts)torepresenta1,
andaLOWvoltage(i.e.0volts)torepresenta0.TheSTARTbitisalwaysaLOW
state,andtheSTOPbitisalwaysaHIGHstate.Eachbitstateisheldforsome
periodoftime-thesymbolperiod-togeneratea’square-wave’typeofsignal.The
amountoftimeforwhichweholdaLOWorHIGHbitdeterminesthebaudrate
(speed)ofthelink.Inmostsystems,thetransmitterandreceiveragreeuponthis
baud(orbit-clock)rateinadvance.Theresultingpacketsignalissentalongawire
fromthetransmittertothereceiver.
UARTpacketscanbesentfromthetransmitteratanypointintime,andtherecan
beanyamountoftimeinbetweenpackets,hencetheasynchronousnatureofthis
communicationlink.Inordertoachievesynchronizationwithanincomingpacket,
thecommunicationwireidlesintheHIGH
(1)stateinbetweenpackets.Sincethe
STARTbitisalwaysaLOW,weknowapackethasbegunwhenthistransitionoccurs.
Afterwesynchronizetothestartofapacket,weusetheknownbaudratetoestimate
thecenterofeachdatabit,andsamplethevoltageofthesignalatthispoint.In
figure2below,weillustratethestartofapacketandthedata-bitsamplinginterval.
Afterthereceiverdecodestheentiredatapacket,wereversetheresult(togetthe
originalMSB->LSB)byte,andwe’redone!
We’vereceivedoneUARTpacket.The
stopbitsimplyreturnsthecommunicationswiretotheoriginalIDLE(HIGH)state,
andthereceiverbeginswaitingforthenextSTARTbitwhichsignalsthebeginning
ofthenextpacket.
1.2UARTdecoder
Thetransmitterencodes0’sas0Voltsand1’sas5Volts.EachcharacterofthemessageisrepresentedusingASCIIencoding.ASCIIisaone-byte(8bit)representationfor256ofthemostofthecommonlyusedcharactersintheEnglishlanguage.Asaresult,eachUARTpacketyouwillreceiveconsistsofasinglecharacterfromthismessage.Thecharactersofthemessagearesentinorder,sothey
shouldbekeptintheorderthattheyarereceived.Afterdecodingtheentirestream,
youwillhavereceivedaquestion.
1.3EstimatinganLTIchannel
Theadditional’byte’(arrayelement)whichispre-pendedtothepicturearray.Itcontainsdecimal85,whichisequivalenttobinary01010101.YourentirefirstUARTpacket,includingthestartandstopbit,willthenbe0101010101(rememberthedataordergoesLSB->MSB).
We’llcallthispacketthesynchronization&trainingpacket.Thefollowingadditionalpiecesofinformation:
1.BeforethestartofthefirstUARTpacket,thetransmittersends’11111111’.
ThisissimplytoensurethatwebeginwiththecommunicationlineIDLEing
HIGH.
2.Followingthesefirsteight1’s,wesendtheaforementioned"synchronization"
packet.
3.TheLTIchannelimpulseresponseisnomorethan8tapslong(h[i]=08i>
7),andthechannelisnoise-free.
4.Thefirsttapofthechannelimpulseisguaranteedtobenon-zero(h[0]6=0)
5.BeforetheUARTtransmissionstarts,thestateofthecommunicationlineis
unknown(x[i]unknown8i<0)
6.Afterthisfirstpacket,thecommunicationcontinuesasusual:
itsendsthepixels
oftheimage.
1.4Correctingforthechannel
Wewillconsiderasimpleexampletodemonstratehowyouaregoingto’correct’for
thechannel:
Considerthecasewhereyouhaveachannelwhichhasaresponseof
length2,andweknowthefirsttapisnon-zero.Theoutputy[n]atanygiventimeis
then
Now,let’sassumewesuccessfullybuiltachannelestimationblocktodetermineh[0]
andh[1].Let’salsoassumethatweknowx[n-1],sincethatwastheprevioussymbol
weshouldhavealreadydecoded(thinkaboutthisforamoment-it’sarecursive
argument).Sinceweknoweverythingbesidesx[n],wejustre-arrangetheabove
equationtogetanestimateofthecurrentsample:
2.ExperimentPurpose
InLab2,ourgoalistoknowsomeaspectsofdigitalsignaling,includingsimplechannelcodesandtheeffectofsendingthesesignalsovernon-idealcommunicationchannels.
3.ExperimentalContent
3.1Part1:
TheUARTcommunicationsystem
Inthislab,themainmissionisthedecoder.Wecanputitinto3steps.Step1:
BuildtheReceiverStateMachine.Step2:
Decodetheincomingsamplestream.Step3:
Readthequestion!
3.2Part2:
AnImageoveranLTIChannel,andDealingwithNon-Ideality
Thegoalforthispartofthelabistoknowsomethingaboutnon-idealchannelsandthetheoryofdeconvolution.First,Verifythatyourreceiverstillworks.ThenEstimatinganLTIchannel.Finally,Correctingforthechannel.
4.ExperimentalBlockDiagram
PART1:
TheUARTcommunicationsystem
a.Thewholeblockdiagram
TheASCIItransmitterandtheconverterhavealreadyfinished,thusweonlybuildtheUARTreceiversystemtocompletethecommunicationsystem.
b.theUARTreceiver
Thediagramgivenistoosimple,Imustdoalotofworktofinishit.ButthereisthesamereceiverintheLab2whichhasfinished.SoIjustlinkeverymodules.Finally,thewholesystemofthereceiverisasblow.Iwillshowyouhowitworksinthefollowingpaper.
c.Decisionregeneration
Beforeintothestatemachine,thesignalmustbeidentifiedashighelectricallevelorlow.Weneedadecisionregenerationmoduletochoosethestateofthecode.
d.Theadditionof1Darray
IntheREADstatewemustaddthearrayafterdecimating
e.TheRegister
Wealsoneedaregistertosavethedataafterthedecodingandoutputallatlasttogettheresult
f.TheIDLEstate
ThislinkformiswaitingtoseeatransitionfromHIGH->LOW.Ontransition,
gotostateREAD.
PART2:
AnImageoveranLTIChannel,andDealingwithNon-Ideality
TheUARTreceiverhasalreadybuiltup,themissionistocompletethechannelcorrection.
Thewholeblockdiagramofthechannelcorrectionisshownasthisfigure.
5.ExperimentalResults
PART1:
thereceivercanreceivethecode“Howareyou?
”byrecoveringtheASCIIformthetransmitter.
LAB5
AmplitudeModulation
1.ExperimentPrinciple
1.1AmplitudeModulation
AmplitudeModulation(AM)isananalogmodulationschemewheretheamplitude(A)ofafixed-frequencycarriersignaliscontinuouslymodifiedtorepresentdatainamessage.Thecarriersignalisgenerallyahighfrequencysinewaveusedto“carry”theinformationontheenvelopeofthemessage.Theresultisadouble-sidebandsignal,centeredonthecarrierfrequency,withtwicethebandwidthoftheoriginalsignal.Themathematicalexpressionofmodulatedwaveis:
Here,A0representsDCcomponentofthemodulationsignalm(t),f(t)representsACcomponentofthemodulationsignal,thecarrierwaveweusehasunitamplitude,angularfrequencyisafixedvaluewc,theinitialphaseofthecarriersignalc(t)isθ0.
From(1.1),wecanconcludethatAmplitudeModulationistheproductofmodulationsignalm(t)andcarriersignalc(t).Inordertorealizethattheamplitudeofcarriersignalcoordinatedbyf(t)linearly,m(t)shouldconsistofDCcomponenttomakesurem(t)≥0,i.e.,
Therefore,theenvelopofSam(t)iscompletelyabovetimeaxis,asshowninfigure1.
Figure.1TimedomainofanAMsignal
For
wecanobtainitsspectrumby
FouriertransformdirectlyasshowninFigure.2:
TherearethreefundamentalAMmethodsknownasDSB(DoubleSide-Band),SSB(SingleSide-Band),VSB(VestigialSide-Band).
1.2AmplitudeDemodulation
Sincethecoreideaofthesoftwareradioistrytoattachtheanalog-to-digitalconvertertoanantennaandgetthesoftwareasclosetotheantennaasfeasible,theprocessofvariousmodulationanddemodulationtowardsthesourcesignaliscarriedoutindigitaldomain.
PCterminalsendsasourcesignaltothegeneralsoftwareradioplatformUSRP-2920viagigabitEthernetinterface,andthenusetwohighspeedD/Aconvertertoupconvertsourcesignal,finallymanipulatetheorthogonalizationI/Qmodulationafterlowpassfiltering.Amongthem,theI/Qrepresentsthein-phasecomponent(I)andquadraturecomponent(Q),andtheresultingI/QsamplingpointsafterpaeventuallysenttothetransmittingantennaagigabitEthernetinterfaceissenttothePC,thewholeprocessofsignalprocessinginLabVIEW
For