The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> RF Simulators >> Simulation Setup for Varactor C-V and Q-freq curve
https://designers-guide.org/forum/YaBB.pl?num=1133858081

Message started by cheraskid on Dec 6th, 2005, 12:34am

Title: Simulation Setup for Varactor C-V and Q-freq curve
Post by cheraskid on Dec 6th, 2005, 12:34am

I'm trying to simulate the varactor C-V and its QvsFreq curves for different sizes of the AMOS varactor.

I've no problem on ADS since it has some of the readily available functions for extracting the cap value but when it comes to SpectreRF, I'm lost.

Does anyone know how to setup the simulation in SpectreRF?

BR
cheraskid ???


Title: Re: Simulation Setup for Varactor C-V and Q-freq c
Post by pancho_hideboo on Dec 8th, 2005, 3:07am

Hi.

You can do them using Ocean Script.

The following is examples. This is inductor case.
But it is easy also for capacitor case.
Read documents about details of Ocean.

=======================================

awvSetOptionValue('dateStamp t)
awvSetOptionValue('displayGrids t)
awvSetOptionValue("cursorPrecision" 9)
awvSetOptionValue("displayAxesBy125" t)
pi = acos(-1.0)
date = getCurrentTime()

;base_dir = getWorkingDir()
base_dir = "~"
;;
circuit_dir = "sim_ind"
sim_data = "schematic"
result_dir = strcat(base_dir, "/simulation/", circuit_dir, "/spectre/", sim_data)
openResults( strcat(result_dir, "/psf") )
selectResult("sp-sp")

y11 = yp(1 1)
y22 = yp(2 2)

Q1 = imag(1/y11)/real(1/y11)
Q2 = imag(1/y22)/real(1/y22)

L1 = imag(1/y11)/(2*pi*xval(y11))
L2 = imag(1/y22)/(2*pi*xval(y22))

fx = 3.0GHz

printf("Q1@%gGHz=%g\n", fx/1G, value(Q1, fx))
printf("Q2@%gGHz=%g\n", fx/1G, value(Q2, fx))
printf("L1@%gGHz=%g[nH]\n", fx/1G, value(L1, fx)/1n)
printf("L2@%gGHz=%g[nH]\n", fx/1G, value(L2, fx)/1n)

wid = newWindow()
addTitle("Quality Factor of Inductor")

bid = currentSubwindow(1)
addSubwindowTitle( sprintf(nil, "Q1=%g , Q2=%g at %gGHz", value(Q1, fx), value(Q2, fx), fx/1G ))
plot( Q1 ?expr '("Q1") )
plot( Q2 ?expr '("Q2") )
xLimit(list(1G, 10G))
awvSetXAxisLabel(wid "frequency [Hz]"  ?subwindow bid)
awvSetYAxisLabel(wid 1 "Quality Factor of Inductor" ?subwindow bid)

addSubwindow()
bid = currentSubwindow(2)
addSubwindowTitle( sprintf(nil, "L1=%g[nH] , L2=%g[nH] at %gGHz", value(L1, fx)/1n, value(L2, fx)/1n, fx/1G ))
plot( L1 ?expr '("L1") )
plot( L2 ?expr '("L2") )
;xLimit(list(68u, 77u))
awvSetXAxisLabel(wid "frequency [Hz]"  ?subwindow bid)
awvSetYAxisLabel(wid 1 "Inductance [Henry]" ?subwindow bid)

Title: Re: Simulation Setup for Varactor C-V and Q-freq curve
Post by final on Jul 28th, 2013, 11:13pm

Can anyone help me to simulate & calculate capacitance of Varactor in spectre? I want to plot C-V. I am a newbie in cadence simulator :-[ I just know very simple thing. I appreciate any comment.
Thank in advance.

Title: Re: Simulation Setup for Varactor C-V and Q-freq curve
Post by Ken Kundert on Jul 29th, 2013, 12:38pm

Connect a voltage source to the capacitor with its AC magnitude set to 1. Perform an AC analysis where you sweep the DC voltage of the source over the desired range (you are sweeping voltage rather than the frequency). Set the AC analysis frequency to 1/2π. Plot the current.

I = j2πfCV

where f=1/2π and V=1, and so I = C.

-Ken

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.