ADS Fundamentals - 2009
LAB 8: Circuit Envelope Simulation
Overview‐ThischaptercoversthebasicsofCircuitEnvelopesimulationtosimulatetimeandfrequencyofanoutputsignalwhentheinputisapulsedormodulatedsourcesuchasGSM,CDMA,etc.
OBJECTIVES • SetupCircuitEnvelopesimulationsusingabehavioralamp
• Experimentwithsimulationparameters
• Testfordistortion
• Usedemodulationcomponentsandequations
• Simulatethe1900MHzampwithaGSMsignal
• Plotcarrierandbasebanddata
• Operateondatasetsinthefrequencyandtimedomain
©CopyrightAgilentTechnologies2009
Lab8:CircuitEnvelopeSimulation
8‐2©CopyrightAgilentTechnologies2009
TABLE OF CONTENTS
1. Set up a PtRF source and behavioral amp. .........................................................3
2. Set up the Envelope Simulation controller. .........................................................4
3. Simulate and plot the time domain response. ......................................................4
4. Add distortion to the behavioral amplifier. ............................................................6
5. Set up demodulators and a GSM source.............................................................7
6. Set up the Envelope Simulation with variables. ...................................................8
7. Simulate and plot the demodulated results..........................................................8
8. Use a filter to simulate phase distortion. .............................................................9
9. Simulate and plot input and output modulation. ..................................................9
10. Simulate amp_1900 with a GSM source .........................................................10
11. Plot the GSM data and spectrum.....................................................................11
12. OPTIONAL – Channel power calculations........................................................15
Lab 8: Circuit Envelope Simulation
8‐3©CopyrightAgilentTechnologies2009
PROCEDURE1. SetupaPtRFsourceandbehavioralamp.
a. Intheamp_1900project,createanewschematicandnameit:ckt_env_basic.Buildthecircuitshownhereusingthefollowingsteps:
b. InsertabehavioralAmplifierfromtheSystemAmps&Mixerspalette:Amplifier2.SettheS‐parametersasshownwhereS21=10dBofgainwith0phase(dBandphaseareseparatedbyacomma).S11andS22are–50(dBreturnloss),and0phase.Finally,S12canremainsetto0toindicatenoreverseleakage.BesuretousedbpolarforS21,S11,andS22asshownhere.
c. InsertaPtRF_Pulsesource(Sources‐Modulated)andsetthepowerasP=dbmtow(0)andFreq=1GHz.Also,editthefollowingsettingsandbesuretocheckthedisplayboxforeachsetting:OffRatio=0,Delay=0ns,Risetime=5ns,Falltime=10ns,PulseWidth=30ns,andthePeriod=100ns.
d. Inserta50ohmresistor,nodenames,grounds,andwireasshown.
SETTHES‐paramstodbpolarasshownhere,exceptforS12.
Lab8:CircuitEnvelopeSimulation
8‐4©CopyrightAgilentTechnologies2009
2. SetuptheEnvelopeSimulationcontroller.
a. Insertthecontrollerandsetthecalculationfrequencyto1frequencyto1GHzandOrder=1.Lateron,youwilladdwilladddistortionandincreasetheorder.
b. Setstop=50nsec.Thisisenoughtimetoseetheentireentirepulsewidth,includingtherise,fall,anddelay.delay.
c. Setthestep=1nsec.Thismeansthesignalwillbesampledevery1nsresultingin51pointsoftimesampleddata.
3. Simulateandplotthetimedomainresponse.
a. Simulateandviewthestatuswindow.Youwillseeseeeachtimestepcalculateduntilthefinalresultof50resultof50ns.Afterthedatadisplayopens,plotVinplotVinandVoutinarectangularplotastheMagnitudeoftheCarrierinthetimedomain.
b. Also,addathirdtraceusingtheAdvancedbuttonandbuttonandtypeintheexpression:ts(Vout)whichwhichgivesthecompositewaveform.Theindex[1]in[1]intheothertwotracesgivesyouthemagnitudeofmagnitudeofthe1GHzcarrier.
c. Puttwomarkersontheontheplottoverifytheverifytherisetimeof5timeof5ns.
Lab 8: Circuit Envelope Simulation
8‐5©CopyrightAgilentTechnologies2009
d. Inaseparateplot,insertthemagnitudeofVout(timedomain)again.Now,edittheplot,selectthetrace,anduseTraceOptions>TraceExpressionstoremovetheindex[1]sothattheexpressionis:mag(Vout)andclickOK.NowusethePlotOptionstabandturnofftheX‐axisAutoScale:setXaxisfrom0.5GHzto1.5GHzasshownheretocenterthetrace.Byremovingtheindexvalue,yougetthemagnitudeofthefundamental(1GHz)inthefrequencydomain.Theincreasingarrowsrepresenttheincreasingmagnitudeofthepulsecarrierasitrisesduringthetime(5ns).
e. Next,insertaList.Whenthedialogboxappears,usetheAdvancedbuttonandtypeintheexpression:what(Vout).ClickOKandyouwillseewhatdependenciesthereareforVout.Thepurposeofthisistoshowthatbothtimeandfrequencyexistinthecircuitenvelopedata.Thereare51timepointsofthetwofrequencies:0(dc)and900MHz.TheMatrixSizereferstothe1x1matrix(ADScallsitscalar)andthedataiscomplex(magandphaseofthe900MHz).Also,themixtablecontainsalldata.Tryinsertingthemixtableandsurpressingthetableformattoseethis!
f. Gobackandsetthetimestepto10nsandsimulate.Now,watchwhathappenstoyourplotwhenyouunder‐sampletheenvelope.Withthetimestepgreaterthantherise‐time,youstillgetthecarrierbutnotthecorrectenvelope.Ontheplot,theX‐axishasincreasedandthemarkersareonthefirsttwotimepoints:0and10nsec.
Lab8:CircuitEnvelopeSimulation
8‐6©CopyrightAgilentTechnologies2009
4. Adddistortiontothebehavioralamplifier.
a. EdittheAmplifierbysetting:GainCompressionPower=5(dBmisthedefault)andGainCompression=1dB.Thesevaluesareonlyusedtoshowhowthesettingswork.Besuretodisplaythesesettings.
b. SettheCEcontrollerOrder=5andkeepthetimestepat10ns.Also,setthesourceinputpowerto10dBm:dbmtow(10).
c. Simulateandviewthedata.Thetimedomainplotwilladjustifautoscaleison.Onthefrequencydomainplot,settheX‐axisbacktoAutoScaleandplacethemarkersasshown,wherestrongoddharmonicsresultfromtheamplifierdistortion(summingout‐of‐phase).ThisresultsintheenvelopeamplitudebeingsmallerthanthemagnitudeoftheVinorVoutmagnitude.Also,theenvelopeshapeisnotaccuratebecausethesamplingrateistoocoarse.
d. Setthetimestepto1nsandSimulateagain.Afterupdating,theplotshowsthecorrectenvelope.ButVinandVoutarestillgreaterthantheenvelopemagnitude,duetothecompression.Toprovethis,insertaListofVoutandSuppressTableFormat.Thenscrolldowntothe5nanoseconddata.Now,youcanseethatthelargethirdharmonicis180degreesout‐of‐phase,makingtheenvelopesmallerthanthemagnitudeofthefundamental.
Lab 8: Circuit Envelope Simulation
8‐7©CopyrightAgilentTechnologies2009
5. SetupdemodulatorsandaGSMsource.
NoteonGSMmodulation:Thisisaphasemodulationofthecarrier(typically900MHz)wherethephasevariationrepresents1or0.
a. FromtheSourcesModulatedpalette,inserttheGSMsourceandputapinlabel(nodename)attheBoutputasshown:bits_out.Itlookslikeanon‐connectedpinbutitisOK.Also,setthesourceFO=1GHzandPower=dbmtow(10).Also,removetheamplifiercompression(previouslysetto5)sothat:GainCompPower=(blank)asshown.
b. GototheSystemMod/Demodpaletteandinserttwodemodulators:FM_DemodTunedasshown.SetthevalueofFnomonthetwodemodulatorsasshown:1GHz.Also,insertlabelnamesateachoutput:fm_demod_inandfm_demod_outasshown.ThesewillbeusedtolookatthedemodulatedGSMsignal(baseband).
NoteonDemodulators–Youcouldusephase‐demodulatorsbuttheFMdemodulatorsareeasiertouseforthisexample.Ifyoudesigndemodulators,youcouldusethistypeofsetuptotestyourcircuits.Inaddition,refertotheExampledirectoryformodulator/demodulatorsimulationexamples.
Lab8:CircuitEnvelopeSimulation
8‐8©CopyrightAgilentTechnologies2009
6. SetuptheEnvelopeSimulationwithvariables.
a. InsertavariableequationVARandsetupthestopandsteptimesforapproximate270kHzmodulationBWasshown.Thevariable:t_stopissettocoverapproximately100us.ItisconvenienttousetheBWvalueasthedenominatorbutnotnecessary.Thesampleratet_stepis10timestheBW.Also,notethatthedefaultADSEnvelopetimeunits(seconds)doesnothavetobespecified.
7. Simulateandplotthedemodulatedresultsasdescribedbelow
a. Simulatewiththedatasetname:ckt_env_demod.
b. Openadatadisplaywindow.PlotthetwoFMnodesastheBasebandsignalinthetimedomain.Thesetraceswillbetherealpart,indexedto[0].Thedemodulatoronlyoutputsasignalatbaseband(similartothedccomponent).Noticetheyarethesamebecausethereisnodistortionatthistime.
c. Inaseparategraph,plottherealpartofbits_out.Exceptforsomedelay,youshouldseethe001101010010pattern.
Lab 8: Circuit Envelope Simulation
8‐9©CopyrightAgilentTechnologies2009
8. Useafiltertosimulatephasedistortion.
a. Ontheamplifier,settheGainCompPowerontheamplifierto5(thisis5dBmattheampoutput)andsettheGainComp=1dB.
b. BesuretheGSMsourcepowerissetto10dBm.
c. InsertaButterworthfilter(Filters‐Bandpass)betweentheamplifierandthesourceandsetitasshown.Thiswillcreatesomedistortionasonlythenarrowerbandwidthpassestotheamplifierandthefullsignalgoestothefirstdemodulator.
d. Besurethat:t_step=1/(10*270e3).
e. Changethet_stopnumeratorto50(200us):t_stop=50/(270e3)
9. Simulateandplotinputandoutputmodulation.
Yourplotshouldshowthedistortionanddelayfromtheinputtotheoutputsimilartotheoneshownhere.
Inputfrequencymodulation
Output:frequencymodulation
Lab8:CircuitEnvelopeSimulation
8‐10©CopyrightAgilentTechnologies2009
10. Simulateamp_1900withaGSMsource
a. Openthepreviousschematicdesign,hb_2Tone,andsaveitwithanewname:ckt_env_gsm.
b. Deleteanyprevioussimulationcontrollers,variables,etc.Thenmodifytheschematicbyinserting:1)anEnvelopecontroller,2)aPtRF_GSMsource,3)andsetuptheVARasshownhere.ThesimulationcomponentsandvariablesaresimilartothelastEnvelopesetup.Therefore,youcanusetheEdit>Copy/Pastecommandsinschematic.Also,besuretolabelthebits_outnodeontheGSMsource.
NOTEonCEsetupvalues:Inthissimulation,t_stopof200us(twiceaslongastheprevioussimulation)willgiveyoubetterspectralresolution.Thet_stepissetusinganexactmultiplefortheBW(270.833KHz).Generally,thisisnotnecessarybutitcanbedoneifyouwantamoreexactfrequencycalculationforphase.Also,thedefaultstarttimeforCEisalwayszerosecondsanditisnotrecommendedtochangeit.
c. CheckyoursetupandthenSimulateandwatchthestatuswindow.
Nodelabel:bits_out
Lab 8: Circuit Envelope Simulation
8‐11
©CopyrightAgilentTechnologies2009
11. PlottheGSMdataandspectrum.
a. Inthedatadisplay,insertalistofVoutandandusethePlotOptionstosettheformatforformatforEngineeringandselecttheTransposeDatafeatureasshownhere.Now,here.Now,youcanseethatCEcalculatescalculateseachtone(freqandorder)ateacheachtimestep.Scrolltotheendandyouwillyouwillseethatthelastpointisattheendofthet_stoptime.
b. PlottheVoutdataas:SpectrumofthecarrierindBmwithaKaiserwindow.TheninserttwomarkersacrosstheGSMbandwidth(about270kHz)tomeasuretheBW.Thisistheoutputspectrumaroundthefundamentalfrequency(0Hzontheplot).TheKaiserwindowhelpsensurethatthefirstandlasttimedatapointsequalzero;thisimprovesthedynamicrangeofthecomputedspectrum.Also,withwindowing,thenoisefloorislowered.
NoteonCEformixersTheKaiserwindowisusedbydefaultforspectraldatausingthedialog.Itassumesthatthecarrierisindexvalue[1].However,foramixer,youmayneedtoeditthetraceandreplace[1]withthecorrectindexvaluefromtheMixtableforyourIForRFfrequency.
NOTE:UseTraceOptions>TraceTypeandselecttracetype:Linear.
Lab8:CircuitEnvelopeSimulation
8‐12©CopyrightAgilentTechnologies2009
c. OntheVoutplot,insertVin(samedataformattype)andusemarkerstoverifythatthegainisabout35dB.Thiscorrespondstoprevioussimulationsforamp_1900usingtheidealGummel‐Poonmodel.
d. Inserttwomoreplots:apolarplotofVout[1]atalltimepointsandarectangularplotofVoutmagnitudeinthetimedomainasshownhere.Asyoucansee,themagnitudeonbothplotsshowslittlevariationinamplitude.ForGSM,thismeansthattheamplifierisaddinglittleornodistortiontothebasebandbecauseGSMisaphasemodulation.
e. Inserttwomoreplots:thephaseofVouttoseethephasevariationduring200us.NoticethephaseplotY‐axisis+/‐180fromzero(similartoanetworkanalyzer).Also,insertaplotofthebits_outdata.Thesearetherawbitsfromthesource.Inthenextstep,youwilloperateonthisdatatoseetherelationshipbetweenthem.
Lab 8: Circuit Envelope Simulation
8‐13
©CopyrightAgilentTechnologies2009
Lab8:CircuitEnvelopeSimulation
8‐14©CopyrightAgilentTechnologies2009
f. Anequationcandemodulatethedata.Inthebasebandequationshownhere,theunwrapfunctionremovesthe+/‐180degreetransitionformatfromtheabsolutephase.Thedifffunctionwilldifferentiatetheunwrappedslope.Dividingby360willgivethevalueinHz.Thisisessentiallythedemodulatedoutput.Writeandplottheequationshown:
g. Editthebasebandequationplotandaddatraceofbits_out(baseband)inthetimedomain.Itwillbenearzerountilyoueditthetrace.GotothePlotAxestabandselectRightYaxisforthistrace.
h. Next,inPlotOptions,removeautoscaleandresettherightY‐axisfrom1.25to1.25.
i. Toremovetheeffectsofthesourcedelay,andandshiftthetime+10usec,editthebits_outtrace,bits_outtrace,usingTraceExpressionasshownshownhere:plot_vs(real(bits_out[0]),time+10u)
Now,youhaveacomparisonofinputtooutputbasebandintegrity.
Afterabout20usofdelayinthesource,themarkershowsabout65kHzdeviationfromthecarrierat38microseconds=Xaxis.
.
GSMresults:UnwrappedanddifferentiatedphasedataresultsarethesameasusingFM_DemodTuneddemodulatorcomponentonthebehavioralamp.
Lab 8: Circuit Envelope Simulation
8‐15
©CopyrightAgilentTechnologies2009
NOTEondata:Youcandrawlinestoshowthepossiblestatesofthebasebandsignalandlabelthestates(00,01,10,11)directlyontheplotasshownhere.
j. Saveallyourwork.Atthispointinthecourse,youhavecoveredallthefundamentalprocessesinADS.Thefinallabexerciseyouwillputallthecircuitstogetherforfinaltesting.
12. OPTIONAL–Channelpowercalculations
a. Createanewpageinthedata,Page>NewPage,andnameitnameitchannel_pwrasshownhere.
b. WritetwoequationstocalculatethepowerinthespectrumspectrumusingtheADSchannel_powerfunction.Thefirstequation,limits,definesthemodulationbandwidth.Thesecondequation,channel_pwr,usestheADSchannel_power_vrfunctionwherevrmeansthatitusesvoltageinsteadofcurrentinthecalculation.Vout[1]isthe1900MHztoneintheequation.Also,50isthesystemimpedance,the“Kaiser”argumentisawindowthatlowersthenoisefloor,and+30convertsthefinalvalueintodBm(where0dBm=0.001W).
c. Listthechannel_pwrequationandyouwillseethepowerintheGSMsignalbandwidth.ThiscalculationcanbeappliedtoothermodulationschemesusingCircuitEnvelopesimulation.
Channelpowerforamp_1900foraGSMsignal:
Lab8:CircuitEnvelopeSimulation
8‐16©CopyrightAgilentTechnologies2009
EXTRA EXERCISES:
1. SweepRFpowerintheschematicandwatchthechangeintheoutput.
2. UsetheFMdemodulatorontheoutputandre‐runthesimulations.Comparethebitsinandthebitsoutfortheamp_1900.
3. Gototheexamplefile:examples\Tutorial\ModSources_prj\Pi4DQPSKandcopythesourceanddatadisplayintoyourdirectoryandtrythatsourceontheamplifier,usingthedatadisplayasareferencetoguideyou.
Lab 8: Circuit Envelope Simulation
8‐17
©CopyrightAgilentTechnologies2009