+ All Categories
Home > Documents > LAB 7: Harmonic Balance Simulations · Lab 7: Harmonic Balance and mix Vout.

LAB 7: Harmonic Balance Simulations · Lab 7: Harmonic Balance and mix Vout.

Date post: 30-May-2020
Category:
Upload: others
View: 31 times
Download: 3 times
Share this document with a friend
18
ADS Fundamentals – 2009 LAB 7: Harmonic Balance Simulations Overview ‐ This exercise continues the amp_1900 design and shows the fundamentals of using the Harmonic Balance simulator to look at the spectrum, analyze compression, calculate TOI, and perform other non‐linear measurements. OBJECTIVES Set up and perform a 1 tone HB simulation. Set up and perform a 2 tone HB simulation. Use variables for simulation and source control. Test Gain, Compression, Available Power, Noise Figure, IP3, and other specifications. Use the ts transform on HB data. Work with equations, plots, and the Mix table. © Copyright Agilent Technologies
Transcript

ADS Fundamentals – 2009

LAB 7: Harmonic Balance Simulations

Overview‐Thisexercisecontinuestheamp_1900designandshowsthefundamentalsofusingtheHarmonicBalancesimulatortolookatthespectrum,analyzecompression,calculateTOI,andperformothernon‐linearmeasurements.

OBJECTIVES • Setupandperforma1toneHBsimulation.

• Setupandperforma2toneHBsimulation.

• Usevariablesforsimulationandsourcecontrol.

• TestGain,Compression,AvailablePower,NoiseFigure,IP3,andotherspecifications.

• UsethetstransformonHBdata.

• Workwithequations,plots,andtheMixtable.

©CopyrightAgilentTechnologies2009

Lab 7: Harmonic Balance

7‐2©CopyrightAgilentTechnologies2009

TABLE OF CONTENTS

1. Set up the circuit with a P_1Tone source.............................................................3

2. Set up a one-tone Harmonic Balance simulation. ................................................4

3. Write a measurement equation for dBm of Vout and simulate.............................4

4. Plot the spectrum, equation, and ts of the node voltages. ...................................5

5. Operate on Vout and Mix using functions and indexing.......................................6

6. Calculate Delivered Power and Zin using Pin Current .........................................7

7. Test for Gain Compression using the XDB simulator...........................................9

8. Simulate compression with a power sweep. ......................................................10

9. Plot various gain, power, and line equations......................................................11

10. Two-tone HB simulation with variables. ..........................................................12

11. Use equations to access and control HB data. ...............................................13

12. Simulate IP3 or TOI (Third Order Intercept)....................................................13

13. OPTIONAL - Sweep RF power against the TOI measurement ......................16

Lab 7: Harmonic Balance

7‐3©CopyrightAgilentTechnologies2009

PROCEDURE

1. SetupthecircuitwithaP_1Tonesource.

a. Closethesystem_prjifitisstillopened.Thenopentheamp_1900projectandschematic:s_final.

b. Savethes_finalschematicwithanewname:hb_basic.ThendeleteallthesimulationandmeasurementcomponentsandtheinputTerm.Beginbuildingthesetupshownhere.

c. InsertaP_1Tone(Sources‐FreqDomainpalette)fortheRFinput.

d. Insert4pinlabels(nodenames)Vin,Vout.VCandVBasshownsothatthevoltageswillbeavailableinthedataset.

e. SettheRFsourceasshown:Freq=1900MH.Also,removeremovethepolarfunctionsothatonlythedbm‐to‐wattswattsfunctionremains:P=dbmtow(­40).Also,renamerenamethesourceRF_source.TheportnumberisdefineddefinedbyNum=1.

VC

P_1TonesourceisusedwithHarmonicBalance.Notethedefaultpowersettingisinpolarform.

Lab 7: Harmonic Balance

7‐4©CopyrightAgilentTechnologies2009

2. Setupaone­toneHarmonicBalancesimulation.

a. GototheSimulation_HBpaletteandinsertaHarmonicBalancesimulationcontrollerasshownhere.

b. EdittheFreqsettingonthescreen:changeittoFreq[1]=1900MHzsothatitmatchestheFreqsettingintheP_1Tonesource.

3. WriteameasurementequationfordBmofVoutandsimulate.

a. Fromthesimulationpalette,insertameasurementequation.

b. WriteanequationtocalculatetheoutputpoweratVoutindBm:dbm_outdbm_out=dBm(Vout[1]).Thenumberinbraces[1]referstotheindexvalueofthecalculatedfrequenciesintheanalysis.WithOrder=3,theindexvaluesare:index[0]istheDCcomponent,index[1]is1900MHz,index[2]isthesecondharmonicor3800MHz,andindex[3]isthethirdharmonic.Therefore,theequationshouldproducetheoutputpowerindBmfor1900MHzonly.

c. Simulate–youshouldhavenowarningsorerrormessages.

d. ChangetheHBcontrollerto:Freq[1]=1800MHz.Now,simulateagainandreadtheerrormessage‐thesourceis100MHzawayfromtheHBfrequencyof1800MHz.Thisisacommonerrorwhenthesourceandcontrollerdonotagree.

Freq[1]mustbesettomatchthesourcefrequency.

Orderisthenumberofharmonics.

Lab 7: Harmonic Balance

7‐5©CopyrightAgilentTechnologies2009

e. ResettheHBcontrollerFreq[1]=1900MHzandsimulateagain.

4. Plotthespectrum,equation,andtsofthenodevoltages.

a. Inthedatadisplay,plotdBmofVout.Also,insertalistofdbm_out.Wheneveryouwriteameasurementequation,itwillappearinthedataset.Thetwovaluesshouldbethesameasshownhere.

b. Putamarkeronthefundamentalandverifythatyouramplifierhasabout35dBofGainwithoutputpowerindBm=‐4.876at1900MHz.

NOTEonresults:WithOrdersetto3inthesimulationcontroller,youget3tones:fundamentalplustwoharmonics.TheDCcomponentalsoshowsupontheplotbecauseHarmonicBalancealwayscomputesDCforconvergence.

c. Insertastackedrectangularplotandinserttwodatatracesastimedomainsignals:VinandVout.Thets(timeseries)functionoperatesonHBandtransformsitintothetimedomain.Inthiscase,youcanseethattheamplifierdoesnotinvertthesignalasyoumightexpect.Thesewillbetwoseparateplotsinoneframe.Putmarkersonthesametimepointasshown.

d. EdittheY‐axislabelonthetracebychangingVouttoVCandchangingVintoVBasshownhere.Nowyoucanseetheinversion.Thismeansthatthematchingnetworkprobablyhasagreateffectonthephase.

Changethesearguments.

Lab 7: Harmonic Balance

7‐6©CopyrightAgilentTechnologies2009

5. OperateonVoutandMixusingfunctionsandindexing.

a. InsertalistofMixandVoutasshownhere.WheneveraHBsimulationisperformed,aMixtable(indexvalues)iscreatedinthedataset.NoticethatVoutisalwayscomplex(magandangle),unlessyouoperateonitusingdB,dBm,etc.Inthenextsteps,youwilllearnhowtowriteequationstodisplayoroperateonspecifictonesintheMixtable.Thisisespeciallyusefulformultipletonesormixers.

b. EditthefirstlistandaddVin.ThenselectTraceOptionsandandeditVinbytypinginthedBmfunction:dBm(Vin)andclickandclickOK.NoticethatwheneveryoueditatraceorinsertaninsertanequationthebuttonsappearforVariableInfo(dependencies)orFunctionHelp(manuals).

c. Yourlistshouldnowcontaintheschematicequationdbm_outandtheexpressiondBm(Vin)forallfrequencies.frequencies.Now,editthedBm(Vin)databyinsertingtheinsertingtheindexvalue[1]intheVinargumentasshown–shown–nowyougetthevalueofVinattheindexvalueorvalueor1900MHz.

d. Insertthe[1]inthedbm_outequation‐itbecomesinvalidbecauseitwasindexedas{1}ontheschematic.

e. Remove[1]fromtheinvaliddbm_outequationtomakeitvalidagain.

Adding[1]totheVindatareturnsthe2ndindexvalue=1900MHz.

Adding[1]tothemeasurementequationmakesitinvalid.

Indexvalueof1900MHz=1.TheDCindex=0..HB.

Lab 7: Harmonic Balance

7‐7©CopyrightAgilentTechnologies2009

InsertZin:50asthe2ndargumentseparatedbyacomma.

f. InsertthecursorinthedBm(Vin[1])expressionandaddacommaand50asshownhere.ThesecondargumentinthedBmfunctionisZin.Ifnoargumentisgiven,thedefaultis50ohms.Therefore,nochangeshouldoccur.Undothecommafifty(,50)sothatitreadsdBm(Vin[1]again.

NOTEondBmfunctionandZinofyourdesigns‐ThedBmfunctionconvertsavoltageintodBmassuminganexact50ohmimpedance.However,ifZinisnotexactly50ohms+/‐j0,thenthepoweratVinmaybeincorrect.Therefore,youmaywanttousethecorrectvalueofZinasyouwillseeinthenextstep.

6. CalculateDeliveredPowerandZinusingPinCurrent

a. EdittheHarmonicBalancecontrollerandselecttheselecttheOutputtabandchecktheboxforPinPinCurrents(shownhere)andclickOK.ThiswillThiswilladdallthevaluesofcurrenttothedatasetdataset–youwillbeusingtheinputpincurrentinsteadofacurrentprobe.

b. Simulateagain.Whenfinished,gotothesameDataDisplayandwriteanequationfortheinputcurrentwhichusesthetotalcurrentthroughtheinputinductor.Todothis,usetheeditor:writeI_in=andtheninserttheinductorcurrentasshownhere:

Thenaddthebracketed[1]sothatit’sthecurrentat1900MHz.Theresultequationshouldbeasshownhere–youwillusethistocalculateimpedanceandpower.

Lab 7: Harmonic Balance

7‐8©CopyrightAgilentTechnologies2009

c. WriteanotherequationtocalculateZinusingVinVinandI_inat1900MHzasshownhere.TheninsertinsertalistoftheZ_inequation.Noticethecomplexcompleximpedanceisnot50ohms!

d. WriteanequationtocalculateaveragedeliveredpowerusingthenodevoltageVinandtheinputcurrentequationI_in:

Notethat0.5givestheaverageofthepeakvalue,theconjfunctionconvertsthecomplexcurrenttoitsconjugatebecauseV&Imustbeinphasetodissipatepowerand+30convertsthevaluetodBm(sameasdividingby0.001).

e. EdityourearlierlistofdBm(Vin[1])anddeletedbm_outandaddtheequationP_del_dBm.Also,addanotherVintraceandeditthetraceexpressiontoread:dBm(Vin[1],Z_in).Nowyouhavethreewaysofcomputinginputpowertocompare.Noticethattwoofthevaluesarethesame:

NOTEonpincurrentsvscurrentprobes:Youcouldhaveusedacurrentprobeattheinputinsteadofthepincurrentthroughtheinductor.EitherwayisOK.However,thepincurrentscanmakethedatasetslargeifthecircuitisalsolarge.

dBmusingdefaultsdBmusingVandIdBmusingZ_ineqn

Lab 7: Harmonic Balance

7‐9©CopyrightAgilentTechnologies2009

7. TestforGainCompressionusingtheXDBsimulator.

TheXDBsimulationcontrollerisaspecialuseHarmonicBalancesimulationforgaincompression.

a. Saveallyoucurrentwork:schematicanddatadisplay.Thensavetheschematicwithanewname:hb_compression.Afterward,closethehb_basicdatadisplay.

b. Inthenewschematic,deactivatetheHB1controller.

c. GototheSimulation­XDBpaletteandinserttheXDBcontroller.EditthecontrolleronscreensothatFreq[1]andGCinputandoutputfrequenciesareall1.9GHzasshown.TheparameterGC_XdB=1meansthatthetestwillbefor1dBcompression.Later,ifyouwanted3or6dBcompression,simplychangethevalue.

d. IntheSimulationSetup,changetheDatasetnametohb_xdbandthenSimulate.

e. Whenthedatadisplayopens,insertalistofofinpwrandoutpwr.Theneditdirectlyontheonthelistbyinsertingabracketedone[1]after[1]aftereachdataitemasshownhere.IfIfdesired,titletheplotasshown.Youjustjustperformeda1dBgaincompressiontestintestinonlyafewseconds!Becausethisamplifierisbiasedquitehigh,the1dBcompressionpointoccurswhentheinputinputpowerisabout–30dBmasshownhere.here.Inthenextsteps,youwillmodifythetheschematicandsetupapowersweepwithwithharmonicbalance–anotherwaytotesttestcompression!

1.9 GHz

Lab 7: Harmonic Balance

7‐10©CopyrightAgilentTechnologies2009

8. Simulatecompressionwithapowersweep.

a. DeactivatetheXDBandactivatetheHBcontroller.

b. InsertavariableequationVARforRF_pwr=­40.

c. SettheRFsourcepowertothevariable:P=dbmtow(RF_pwr).

d. EdittheHBcontroller.Inthesweeptab,settheRF_pwrsweepasshownfrom–50to–20,step1.

e. GototheDisplaytabandsettheSweepVaranditsvaluestobedisplayedontheHBcontrollercomponentasshownhere.

f. Changethedatasetnameto:hb_compandsimulate.Whenthedatadisplaywindowopens,answerNotochangingthedataset‐thiswillkeeptheXDBdatavalidasthedefaultdataset.Now,youwillhavetoexplicitlyplotthehb_compdata–thisiscommonpractice.

g. Insertaplotandselectthehb_compdataset.Thenplottheschematicmeasurementequationdbm_out.InsertamarkeronthetracewherethevalueofRF_pwrisneartheXDBinpwrvalue:‐31.Asyoucansee,thetwovaluesareclosebuttheydifferbecausethesweepresolutionsresolutionsaredifferent–theXDBsimulation(differentDDSDDSanddataset)usedmanycloselyspacedsweepvalues.

1dBcompressionpointfromXDB

Lab 7: Harmonic Balance

7‐11

©CopyrightAgilentTechnologies2009

values.

9. Plotvariousgain,power,andlineequations.

a. Writeanequation,dB_gainthatusesthedbm_outmeasurementequation.BysubtractingthelinearinputRF_pwrfromdbm_out,theresultisthegainatallvaluesofRFinputpower:

b. Edittheplotofdbm_outandaddthedB_gainequation‐theYaxisscalewillautomaticallyadjust.YoucanaddmarkerstoseebothvaluesatoneRFpowerlevelasshown.

c. ToplotdB_gainagainstoutputpower,insertanewplot,addthedB_gainequationandthenclickAddVs.Next,selectthehb_compdatasetandtheindependentvariablefortheXaxis:dbm_out.ClickOKandthesharpfallofgainwillbeplottedasshown.Usemarkerstoreadthevalues.

d. Writeonemoreequation,line,tocreatealinearline(extrapolateddata)

thatrepresentstheidealoutputpowerwithnocompression.Byaddingtheuncompressedgainatthefirstdatapoint[0]totheRFpowerateverypoint,yougettheidealgainorline.

e. Insertanewplotofdbm_out(usinghb_compdata)andaddlinealso.Thisvisuallyshowstheamplifier’sdeviationfromlinearoutputpower.

f. Saveallyourwork.

Lab 7: Harmonic Balance

7‐12©CopyrightAgilentTechnologies2009

10. Two­toneHBsimulationwithvariables.

Thenextfewstepsshowmoreuseofvariablesinsimulationcontrol.Thisisimportantformorecomplexcircuitrefinement,calculationsintheremaininglabs,andworkingwithADSexampleswhichusethismethodofsimulationcontrol.

a. Savethelastschematicdesignwithanewname:hb_2Tone.

b. EdittheVARandaddvariablesforRF_freqandspacingasshownhere.Vbiasisnotrequired‐youmayormaynothaveVbiasifyoudidanoptionalstepearlier.

NOTEonunitsinVARs–Ifyousetunitsheredonotsetthemanywhereelseortheymaymultiplyinthesimulation.

c. ChangethesourcetoaP_nTone.Editthesourcesothatithastwotones:Freq[1]and[2]withRF_pwrforeachasshownhere.

d. EdittheHarmonicBalancecontrollerasshownherebyaddinganotherfrequency,Freq[2],andthevaluesasshown,usingthespacingvariable/2.Also,setOrder=4forbothandsetMaxOrder=8.Inthiscase,thetwoRFtonesarespaced5MHzapart(channelspacing).

e. RemovetheRF_pwrsweepfromthecontrollerbyerasingiton‐screenorinthedialoganddisplay.Also,removeanyothercontrollersorunwantedcomponentsandsavethedesignagain.

MaxOrder=numberofmixingproducts.

Freq[1]isavariableoranumber.Order[1]=4meansFreq[1]willbecalculatedwith4harmonics.

Lab 7: Harmonic Balance

7‐13

©CopyrightAgilentTechnologies2009

f. SimulateandplotthespectrumofVoutindBm.Putamarkeronatonenear1900MHz.Noticethatyoucannotclearlyseetheadjacenttones.Toseetheinter‐modulationtones,youcaneitherzoominontheplotortrychangingtheXaxisscaling.Trybothofthesemethodsquicklybecausethenextstepshowsatechniqueusingequations.

11. UseequationstoaccessandcontrolHBdata.

a. Createamatrixwithvectors(indexvalues)tothedesiredtones.Todothis,writethetonesequationshownhere.Thisequationcreatesamatrixusingthesquarebrackets.Withinthebracketsarecurlybraceswithindexvaluesforthemixtable.Inthiscase,thenumber1representstheRFtonewithspacing.Zeromeansthatnoothertoneisdesired(sameasDC),and2representstwotimestheRFsimulationtone.

b. InsertarectangularplotofVout–spectrumindBm.ThenuseTrace

OptionstoedittheTraceExpressionasshownhere,usingparenthesis–typein:dBm(mix(Vout,tones)).Also,settheTraceTraceTypetoSpectral.

c. Theplotshouldnowshowonlythefourtonestonesyouspecified(10MHzapart).Toverifyverifythis,insertalistofMix(Mixtable).TheTheindexvaluesfromtheMixtablearethetonesthetonesthatyouspecifiedwiththetonesequation.ThisishowHarmonicBalancedatacanbeaccessedandcontrolledusingequations.

12. SimulateIP3orTOI(ThirdOrderIntercept)

Usecurlybraceswithinbrackets.

Lab 7: Harmonic Balance

7‐14©CopyrightAgilentTechnologies2009

a. Onthehb_2Toneschematic,inserttwoHarmonicBalanceIP3outmeasurementequations:onefortheupperandoneforthelowerspacedtone.Manymeasurementsrequiretwo‐tonessonametheinstancesupperandlowerasshownhere.

b. Notethedefaultnodelabel(vout),vectors{1,0},andimpedance50.Tomatchthesevaluestoyourcircuit,changevouttoVout(uppercaseV).ThensettheindexvaluestocorrespondtoyourMixtableshownherefromthelastsimulation(onlylower_toineedstochange).

c. ChecktheequationstobesuretheyarecorrectandthenSimulate.

d. IntheDataDisplay,listthetwomeasurementequationvaluesasshownhere.RemovetheindependentvariableusingPlotOptions.HeretheamplifierTOIvaluesappearreasonableandalmostsymmetrical.

e. AsanexerciseincontrollingdatawithADSfunctions,writeanequationintheDataDisplayforthesamemeasurementasshownhere.Thenlistit(my_toi)asshownhere.Yougetthesameresultsbecauseyouusethesamefunction:ip3_out.Theonlydifferenceisthatthisisafterthesimulation.Also,thisequationisusedintheoptionalstepattheendofthislab.

2‐toneMixHBdata

Lab 7: Harmonic Balance

7‐15

©CopyrightAgilentTechnologies2009

f. PlotthespectrumofVoutindBmandthenzoominontheplottoseethetwotonesyoujustsimulated.Putmarkersontheupperfundamentalandthe3rdordertone–theseshouldmatchthefrequencyvaluesintheMixtable.

NOTE–Youcouldeasilygobacktotheschematic,changethespacingVARvalueandsimulateagain.Alltheequations,plotsandtableswouldsimplyfillupwiththenewdata.Thisisthevalueofusingvariablesforsimulationanddatadisplays.

g. Savetheschematicanddatadisplay.

NOTEforMixermeasurements–Ifyoudesignmixers,theLOshouldbeFreq[1]inthesimulationcontrollerbecauseithasthemostpower.Also,inmeasurementequations,youwillhavetotreat2‐tonedataasifitwere3‐tone:LO,RF1andRF2forupperandlowertones.Forexample,theupperIP3equationsforadown‐converterwouldhavethefollowingindexvalues:{‐1,1,0},{‐1,2,1}where–1inthefirstrepresentstheLOtone.

Mixingproducts:MaxOrder

Lab 7: Harmonic Balance

7‐16©CopyrightAgilentTechnologies2009

13. OPTIONAL­SweepRFpoweragainsttheTOImeasurement

ThisstepshowstheeffectsonTOIwhentheinputpowerbeginstodrivethedevicetowardcompression.Ingeneral,manymeasurementscanberefinedtogetabettermeasureofcircuitperformance,beyondtherequiredspecifications.Todothis,youmusthaveapowerfulnon‐linearsimulatoranddatadisplaytoolsuchasADS.

a. Usingthesamehb_2Tonedesign,setuptheHBsimulationcontrollertosweeptheRFpowerasshownherefrom–45to–30dBm.Youalreadytested1dBcompression(about–31dBmRFinputpower)andyoujustfinishedmeasuringTOIwhich(about15dBm).

b. Simulateandwatchthechangesinthedatadisplay.

c. Editthemy_toilisttoincludetheindependentdata(RF_pwr).Thenincreasethelistsizesothatallthevaluesappear.Asyoucansee,TOIbeginstochangegreatlyasRF_pwrmoveshigher.However,thechangeisnotlinear.Thenextstepwillshowthiswithmorerefinement.

d. Changethelistofmy_toitoarectangularplot(PlotOptions‐clicktheplottypeicon).Then,onthesameplot,insertVoutindBmandeditthetraceexpressiontoreturntheupperRFtoneasshownhere.NowyoucanseehowtheTOImeasurementtrackswiththattone:

dBm(mix(Vout,{1,0}))

NOTEonVoutdata–YoumustusethemixfunctionbecauseVoutcontains41totalfrequencytones:2spacedfundamentalswith4harmonics(thismeans8tones),with8max_order(thismeans32moreintermodtones),plusthedccomponent.These41tonesarepresentateachofthe16valuesofRFpower.

2traces:my_toianddBmofupperRFtone.

Lab 7: Harmonic Balance

7‐17

©CopyrightAgilentTechnologies2009

e. AddonemoreVouttracetotheplot.Again,editthetrace(TraceExpression)sothatisbecomestheupper3rdorderproduct:

dBm(mix(Vout,{2,­1}))

f. Yourplotshouldnowlookliketheoneshownhere.ItshouldcontaintheupperRF_freq,theupper3rdorderproduct,andtheequationmy_toi(uppertoi).Now,editthemy_toitraceandselectPlotAxesasshownhere.ThenselectRightYaxisforthistraceandwatchthechange.

g. YourplotshouldnowhavetheTOIvaluefromyourequationontheRightYaxisandthetwotonesusedtocalculateTOIontheleft.Now,usePlotOptions,selectYAxis,andremovetheAutoScale(uncheckthebox).ThenincreasetheMaxto10andclickOK.Finally,placeamarkeronthepointwheretheslopeofthetwotonesisnolonger3:1.Asyoucansee,IP3wascalculatedinthecorrectregion.However,afterthemarker,the3rdorderproductbeginstoriseatasharperrate.ThisisagoodexampleofusingADStolearnmoreabouttheperformanceofyourdesign,beyondthespecification.

Clickhere:

MakeyourplotlooksimilarusingtheDataDisplaytextanddrawingfeatures.

Lab 7: Harmonic Balance

7‐18©CopyrightAgilentTechnologies2009

EXTRA EXERCISES:

1. SweptRFfrequency‐CopytheschematicandthenchangethesweptvariablefromRFpowertoonetoneRFfreq.Todothis,setuptheVARforRF_freqinboththecontrollerandthesource.SweepRF_freqfrom100MHzto3GHzin100MHzsteps.Besuretochangethedatasetname,thensimulateandplottheoutputpowerequationagainstthesweptfrequencyasshown.Also,notethatthedatasetwillcontainalistoftheharmonicindexasshown.

2. Trywritinganequationtopassallthe5thorderproductstoaspectralplot.

3. Usethepspecfunctiontocalculatepowergaintotheload.Todothis,firstlookattheHelpforpspec.TheninsertacurrentprobeattheVoutnode.


Recommended