17
ADS Fundamentals - 2009 LAB 8: Circuit Envelope Simulation Overview ‐ This chapter covers the basics of Circuit Envelope simulation to simulate time and frequency of an output signal when the input is a pulsed or modulated source such as GSM, CDMA, etc. OBJECTIVES Set up Circuit Envelope simulations using a behavioral amp Experiment with simulation parameters Test for distortion Use demodulation components and equations Simulate the 1900 MHz amp with a GSM signal Plot carrier and baseband data Operate on datasets in the frequency and time domain © Copyright Agilent Technologies

LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

ADS Fundamentals - 2009

LAB 8: Circuit Envelope Simulation

Overview‐ThischaptercoversthebasicsofCircuitEnvelopesimulationtosimulatetimeandfrequencyofanoutputsignalwhentheinputisapulsedormodulatedsourcesuchasGSM,CDMA,etc.

OBJECTIVES • SetupCircuitEnvelopesimulationsusingabehavioralamp

• Experimentwithsimulationparameters

• Testfordistortion

• Usedemodulationcomponentsandequations

• Simulatethe1900MHzampwithaGSMsignal

• Plotcarrierandbasebanddata

• Operateondatasetsinthefrequencyandtimedomain

©CopyrightAgilentTechnologies2009

Page 2: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

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

Page 3: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

Lab 8: Circuit Envelope Simulation

8‐3©CopyrightAgilentTechnologies2009

PROCEDURE1. SetupaPtRFsourceandbehavioralamp.

a. Intheamp_1900project,createanewschematicandnameit:ckt_env_basic.Buildthecircuitshownhereusingthefollowingsteps:

b. InsertabehavioralAmplifierfromtheSystem­Amps&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.

Page 4: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

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.

Page 5: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

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:setX­axisfrom0.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.

Page 6: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

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.

Page 7: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

Lab 8: Circuit Envelope Simulation

8‐7©CopyrightAgilentTechnologies2009

5. SetupdemodulatorsandaGSMsource.

NoteonGSMmodulation:Thisisaphasemodulationofthecarrier(typically900MHz)wherethephasevariationrepresents1or0.

a. FromtheSources­Modulatedpalette,inserttheGSMsourceandputapinlabel(nodename)attheBoutputasshown:bits_out.Itlookslikeanon‐connectedpinbutitisOK.Also,setthesourceFO=1GHzandPower=dbmtow(10).Also,removetheamplifiercompression(previouslysetto5)sothat:GainCompPower=(blank)asshown.

b. GototheSystem­Mod/Demodpaletteandinserttwodemodulators:FM_DemodTunedasshown.SetthevalueofFnomonthetwodemodulatorsasshown:1GHz.Also,insertlabelnamesateachoutput:fm_demod_inandfm_demod_outasshown.ThesewillbeusedtolookatthedemodulatedGSMsignal(baseband).

NoteonDemodulators–Youcouldusephase‐demodulatorsbuttheFMdemodulatorsareeasiertouseforthisexample.Ifyoudesigndemodulators,youcouldusethistypeofsetuptotestyourcircuits.Inaddition,refertotheExampledirectoryformodulator/demodulatorsimulationexamples.

Page 8: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

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.

Page 9: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

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

Page 10: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

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

Page 11: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

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.

NoteonCEformixers­TheKaiserwindowisusedbydefaultforspectraldatausingthedialog.Itassumesthatthecarrierisindexvalue[1].However,foramixer,youmayneedtoeditthetraceandreplace[1]withthecorrectindexvaluefromtheMixtableforyourIForRFfrequency.

NOTE:UseTraceOptions>TraceTypeandselecttracetype:Linear.

Page 12: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

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.

Page 13: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

Lab 8: Circuit Envelope Simulation

8‐13

©CopyrightAgilentTechnologies2009

Page 14: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

Lab8:CircuitEnvelopeSimulation

8‐14©CopyrightAgilentTechnologies2009

f. Anequationcandemodulatethedata.Inthebasebandequationshownhere,theunwrapfunctionremovesthe+/‐180degreetransitionformatfromtheabsolutephase.Thedifffunctionwilldifferentiatetheunwrappedslope.Dividingby360willgivethevalueinHz.Thisisessentiallythedemodulatedoutput.Writeandplottheequationshown:

g. Editthebasebandequationplotandaddatraceofbits_out(baseband)inthetimedomain.Itwillbenearzerountilyoueditthetrace.GotothePlotAxestabandselectRightY­axisforthistrace.

h. Next,inPlotOptions,removeautoscaleandresettherightY‐axisfrom­1.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.

Page 15: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

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:

Page 16: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

Lab8:CircuitEnvelopeSimulation

8‐16©CopyrightAgilentTechnologies2009

EXTRA EXERCISES:

1. SweepRFpowerintheschematicandwatchthechangeintheoutput.

2. UsetheFMdemodulatorontheoutputandre‐runthesimulations.Comparethebitsinandthebitsoutfortheamp_1900.

3. Gototheexamplefile:examples\Tutorial\ModSources_prj\Pi4DQPSKandcopythesourceanddatadisplayintoyourdirectoryandtrythatsourceontheamplifier,usingthedatadisplayasareferencetoguideyou.

Page 17: LAB 8: Circuit Envelope Simulationrmh072000/Site/Software_and_Links_files/8B_lab.pdfenvelope magnitude, due to the compression. To prove this, insert a List of Vout and Suppress Table

Lab 8: Circuit Envelope Simulation

8‐17

©CopyrightAgilentTechnologies2009