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)