The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 24th, 2024, 3:40am
Pages: 1
Send Topic Print
Simulation Setup for Varactor C-V and Q-freq curve (Read 13073 times)
cheraskid
New Member
*
Offline



Posts: 1

Simulation Setup for Varactor C-V and Q-freq curve
Dec 06th, 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 ???

Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: Simulation Setup for Varactor C-V and Q-freq c
Reply #1 - 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)
Back to top
 
 
View Profile WWW Top+Secret Top+Secret   IP Logged
final
New Member
*
Offline



Posts: 2
Korea
Re: Simulation Setup for Varactor C-V and Q-freq curve
Reply #2 - 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 Embarrassed I just know very simple thing. I appreciate any comment.
Thank in advance.
Back to top
 
« Last Edit: Jul 29th, 2013, 6:52am by final »  
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Simulation Setup for Varactor C-V and Q-freq curve
Reply #3 - 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
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.