Oops - 2 things. 1) the explantion of ACOUT below was straight from the Hspice manual. I = don't want to plagiarize. 2) Wierd characters got into the explanation. It should read (if THIS = doesn't get garbled): The default value, ACOUT=3D1, selects the Star-Hspice method, which = calculates the difference of the magnitudes of the values. The SPICE = method, ACOUT=3D0, calculates the magnitude of the differences. Jeff Loyer -----Original Message----- From: Loyer, Jeff=20 Sent: Monday, November 04, 2002 9:34 AM To: Signal Integrity Mailing List Cc: Ye, Xiaoning Subject: [SI-LIST] Re: AC Analysis in Hspice Xiaoning was exactly right. Thanks to him, I was able to set ACOUT correctly, and modify the derivation of "s11m". All agrees now. The correction is below. The default value, ACOUT=3D3D1, selects the Star-Hspice method, which calculates the difference of the magnitudes of the values. The SPICE method, ACOUT=3D3D0, calculates the magnitude of the differences. * Experiment to derive S parameters directly .option probe $ reduce unwanted output .option ACOUT=3D3D0 .AC Lin 800 30K 6G=3D20 .PRINT AC S11(m) .NET V(N_nettrm) V_netsrc ROUT=3D3D50 RIN=3D3D50 *.PRINT AC S21(db) S21(p) S11(db) s11(p) V_netsrc N_netvs 0 ac=3D3D1 dc=3D3D0 T_net1 N_netvs 0 N_nettrm 0 td=3D3D100pS Z0=3D3D35 R_nettrm N_nettrm 0 R=3D3D50Meg V_dirsrc N_dirvs 0 ac=3D3D1 dc=3D3D0 R_dirin N_dirvs N_dirsrc r=3D3D50 T_dir1 N_dirsrc 0 N_dirtrm 0 td=3D3D100pS Z0=3D3D35 R_dirtrm N_dirtrm 0 R=3D3D50 V_refsrc N_refvs 0 ac=3D3D1 dc=3D3D0 R_refin N_refvs N_reftrm R=3D3D50 R_reftrm N_reftrm 0 R=3D3D50 .print s11m=3D3Dpar('(vm(N_dirsrc,N_reftrm)/vm(N_reftrm))') *.print news11m=3D3Dpar('(vm(N_dirsrc)-vm(N_reftrm))/vm(N_reftrm)') *.print s21m=3D3Dpar('v(N_dirtrm)/v(N_reftrm)') *.print s11db=3D3Dpar('20*log10((v(N_dirsrc)/v(N_vrefsrc)))') *.print s11p=3D3Dpar('(vp(N_dirsrc)-vp(N_vrefsrc))') *.print s21db=3D3Dpar('20*log10((v(N_dirtrm)/v(N_reftrm)))') *.print s21p=3D3Dpar('(vp(N_dirtrm)-vp(N_vreftrm))') .END Jeff Loyer -----Original Message----- From: Ye, Xiaoning=3D20 Sent: Sunday, November 03, 2002 12:50 PM To: Loyer, Jeff; Signal Integrity Mailing List Subject: RE: [SI-LIST] AC Analysis in Hspice Jeff, I think this line in your deck is the troublemaker: .print s11m=3D3Dpar('(v(N_dirsrc)-v(N_reftrm))/v(N_reftrm)') It uses the magnitude to do the substraction instead of complex number. In other words, mag(A-B) is not equal to mag(A)-mag(B) I use the following calculation: S11=3D3D(zin-50)/(zin+50), where zin is the input impedance (complex number) The results agree very well with the .net analysis. Hope this helps, Xiaoning Ye -----Original Message----- From: Loyer, Jeff [mailto:jeff.loyer@xxxxxxxxx]=3D20 Sent: Friday, November 01, 2002 1:30 PM To: Signal Integrity Mailing List Subject: [SI-LIST] AC Analysis in Hspice > I came upon a problem and wondered if any of you have seen something = =3D =3D3D similar (and hopefully know of a fix). >=3D3D20 > I normally use the ".NET" statement in Hspice to easily extract my S* =3D3D parameters from simulations. As an exercise to further my =3D3D understanding, I decided to do the same thing manually. I was able to = =3D =3D3D do this for S21, but I can't get it to work for S11. I've checked my = =3D =3D3D theory with co-workers, and we can't find anything. I suspect there's = =3D =3D3D some quirk with Hspice's AC analysis (or some option I'm not setting = =3D3D right). >=3D3D20 > In the spice deck below, I set up 3 circuits. =3D3D20 > The first (nodes have "net" in them) uses Hspice's ".NET" statement to =3D3D print the S* parameters. > The second (nodes have "dir" in them) should give me the same results, =3D3D by comparing the resultant voltage to the input voltage. > The third (nodes have "ref" in them) is a reference circuit that I use =3D3D to determine my input voltages for the second circuit. >=3D3D20 > It doesn't work. A plot of S11 magnitude (from the ".PRINT AC S11(m)" =3D3D statement) doesn't agree with a plot of the parameter "s11m" (supposed = =3D =3D3D to be the same thing, derived manually). >=3D3D20 > It does work for S21 magnitude and phase. >=3D3D20 > The spice deck is: >=3D3D20 > * Experiment to derive S parameters directly >=3D3D20 > .AC Lin 800 30K 6G > .PRINT AC S11(m) > .NET V(N_nettrm) V_netsrc ROUT=3D3D3D50 RIN=3D3D3D50 > *.PRINT AC S21(db) S21(p) S11(db) s11(p) >=3D3D20 > V_netsrc N_netvs 0 ac=3D3D3D1 dc=3D3D3D0 > T_net1 N_netvs 0 N_nettrm 0 td=3D3D3D100pS Z0=3D3D3D35 > R_nettrm N_nettrm 0 R=3D3D3D50Meg >=3D3D20 > V_dirsrc N_dirvs 0 ac=3D3D3D1 dc=3D3D3D0 > R_dirin N_dirvs N_dirsrc r=3D3D3D50 > T_dir1 N_dirsrc 0 N_dirtrm 0 td=3D3D3D100pS Z0=3D3D3D35 > R_dirtrm N_dirtrm 0 R=3D3D3D50 >=3D3D20 > V_refsrc N_refvs 0 ac=3D3D3D1 dc=3D3D3D0 > R_refin N_refvs N_reftrm R=3D3D3D50 > R_reftrm N_reftrm 0 R=3D3D3D50 >=3D3D20 > .print s11m=3D3D3Dpar('(v(N_dirsrc)-v(N_reftrm))/v(N_reftrm)') > *.print s21m=3D3D3Dpar('v(N_dirtrm)/v(N_reftrm)') >=3D3D20 > *.print s11db=3D3D3Dpar('20*log10((v(N_dirsrc)/v(N_vrefsrc)))') > *.print s11p=3D3D3Dpar('(vp(N_dirsrc)-vp(N_vrefsrc))') > *.print s21db=3D3D3Dpar('20*log10((v(N_dirtrm)/v(N_reftrm)))') > *.print s21p=3D3D3Dpar('(vp(N_dirtrm)-vp(N_vreftrm))') >=3D3D20 > .END >=3D3D20 > Jeff Loyer >=3D3D20 ------------------------------------------------------------------ To unsubscribe from si-list: si-list-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field or to administer your membership from a web page, go to: //www.freelists.org/webpage/si-list For help: si-list-request@xxxxxxxxxxxxx with 'help' in the Subject field List archives are viewable at: =3D20 //www.freelists.org/archives/si-list or at our remote archives: http://groups.yahoo.com/group/si-list/messages=3D20 Old (prior to June 6, 2001) list archives are viewable at: http://www.qsl.net/wb6tpu =3D20 ------------------------------------------------------------------ To unsubscribe from si-list: si-list-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field or to administer your membership from a web page, go to: //www.freelists.org/webpage/si-list For help: si-list-request@xxxxxxxxxxxxx with 'help' in the Subject field List archives are viewable at: =20 //www.freelists.org/archives/si-list or at our remote archives: http://groups.yahoo.com/group/si-list/messages=20 Old (prior to June 6, 2001) list archives are viewable at: http://www.qsl.net/wb6tpu =20 ------------------------------------------------------------------ To unsubscribe from si-list: si-list-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field or to administer your membership from a web page, go to: //www.freelists.org/webpage/si-list For help: si-list-request@xxxxxxxxxxxxx with 'help' in the Subject field List archives are viewable at: //www.freelists.org/archives/si-list or at our remote archives: http://groups.yahoo.com/group/si-list/messages Old (prior to June 6, 2001) list archives are viewable at: http://www.qsl.net/wb6tpu