The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 16th, 2024, 12:38am
Pages: 1
Send Topic Print
sp analysis with one port (Read 22335 times)
wakizashi
New Member
*
Offline



Posts: 6

sp analysis with one port
Nov 30th, 2007, 1:58pm
 
Hello,

I have a question concerning 1 port sp analysis with spectrerf. I would like to use sp analysis to calculate a node capacitance. Therefore I have created a simple circuit first. It is a port component and say 1pF capacitor (ideal). I would like to run sp analysis and calculate c as following:
C=imag(y11)/(2*pi*freq)
At least this is how I could do it in ADS. In spectre however it doesnt work. I get 0 for all the frequency sweep range.
Does anyone know how to prepare test bench and calculate it in spectre?

Thank you for your help.
Regards.
Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: sp analysis with one port
Reply #1 - Nov 30th, 2007, 8:25pm
 
Your question is not design issue but usage of EDA tool.
Please post to "The Designer's Guide Community Forum ≫ Simulators ≫ RF Simulators".

Quote:
C=imag(y11)/(2*pi*freq)
At least this is how I could do it in ADS.

This is because ADS saves frequency as "freq" in dataset.

Quote:
In spectre however it doesnt work. I get 0 for all the frequency sweep range.

Spectre doesn't save frequency as "freq" in PSF data.
So "freq" is not available in PSF. Instead of "freq" you have to use "xval(y11)".
This is true for RFDE(ADSsim) if you convert ADS dataset to PSF.

The following is example.
http://www.designers-guide.org/Forum/YaBB.pl?num=1133858081/1#1
Back to top
 
« Last Edit: Nov 30th, 2007, 11:35pm by Forum Administrator »  
View Profile WWW Top+Secret Top+Secret   IP Logged
wakizashi
New Member
*
Offline



Posts: 6

Re: sp analysis with one port
Reply #2 - Dec 1st, 2007, 2:37am
 
Hi,

Thanks for the answer. I'm not so familiar with ocean but got your script to work somehow. However, I still get strange results from it even for inductor case like in your example. For example:
Q1@1kHz=-1.2833e+09
L1@1kHz=-2.53303e+14[nH]
I use an Rs Ls series connection and Cp (in parallel). Ideal elements. L=1nH.

Could you show your setup for the mentioned ocean script?
Do you configure anything special in sp analysis except for AC magnitude in port = 1V?
Thank you.
Back to top
 
 
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: sp analysis with one port
Reply #3 - Dec 1st, 2007, 2:43am
 
Sorry my example is for floating inductor.

port1 >---Inductor ----< port2

L1 is inductance evaluated with port2=gnd.
L2 is inductance evaluated with port1=gnd.

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

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

Quote:
I use an Rs Ls series connection and Cp (in parallel). Ideal elements. L=1nH.

Your DUT is grounded. So it is natural that L1 = imag(1/y11)/(2*pi*xval(y11)) doesn't match to your Ls=1nH.

Quote:
Do you configure anything special in sp analysis except for AC magnitude in port = 1V?

In sp analysis, AC magnitude in port is meaningless.

The following script for capacitance from grounded Y11.
Code:
awvSetOptionValue('dateStamp t)
awvSetOptionValue('displayGrids t)
awvSetOptionValue("cursorPrecision" 9)
awvSetOptionValue("displayAxesBy125" t)
pi = acos(-1.0)

base_dir = "~"
circuit_dir = "sim_cap"
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)  
Cx = imag(y11)/(2*pi*xval(y11))

wid = newWindow()
bid = currentSubwindow(1)
plot( Cx ?expr '("C") )
awvSetXAxisLabel(wid "frequency [Hz]"  ?subwindow bid)
awvSetYAxisLabel(wid 1 "Capacitance [F]" ?subwindow bid)
 


Back to top
 
« Last Edit: Dec 1st, 2007, 4:27am by pancho_hideboo »  
View Profile WWW Top+Secret Top+Secret   IP Logged
wakizashi
New Member
*
Offline



Posts: 6

Re: sp analysis with one port
Reply #4 - Dec 2nd, 2007, 11:00am
 
Hello,

Thank you for the answer. Ok, now I have used the same setup as yours and I get new problems. In CIW I get:
*Error* ("error" 10 t nil ("*Error* gausex: Equations may be dependent (row 0)\n"))
when trying to plot YP(1 1). Im lost here.

My netlist is like this for reference:

L0 (net5 0) inductor
PORT0 (net5 0) port num=1 dc=0 type=sine
simulatorOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 temp=27 \
   tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 maxnotes=5 maxwarns=5 \
   digits=5 cols=80 pivrel=1e-3 ckptclock=1800 \
   sensfile="../psf/sens.output"
sp sp ports=[PORT0] start=1k stop=10G annotate=status

Its just a port and inductor connected together. Do you see any problem here?
Thank you for the reply.

Regards.
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: sp analysis with one port
Reply #5 - Dec 2nd, 2007, 12:53pm
 
I tried your netlist in my version of Spectre and it ran fine. It computes s11 to be -1 over all frequencies, which is as I expect because you gave no value for the inductance of L0, and the default is 0. So the inductor is simply acting like a short circuit.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
wakizashi
New Member
*
Offline



Posts: 6

Re: sp analysis with one port
Reply #6 - Dec 2nd, 2007, 1:15pm
 
Hello,

Thank you for spotting this. I have manually updated the netlist with an inductance value and now sp computes correctly the same value.
Regards.
Back to top
 
 
View Profile   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.