The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 25th, 2024, 2:53pm
Pages: 1 2 
Send Topic Print
usage  of "port" from analogLib (Read 339 times)
Dipankar
Community Member
***
Offline



Posts: 59

usage  of "port" from analogLib
Jan 04th, 2009, 5:41am
 
Hi All,

        HNY 2009. Smiley

       I was using port from analogLib. As long as I use port reactance=0 there seems no problem. But I face problem when I use non-zero port reactance. Say for the simplest case if the port (resistance=50, reactance=50) voltage at open circuit configuration is 4 times of "Vpk" (source is sine); whereas it should have been twice of "Vpk".

Looking for your inputs.

BR
Dipankar.
Back to top
 
 

With Thanks and Regards,
Dipankar.
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: usage  of "port" from analogLib
Reply #1 - Jan 4th, 2009, 9:21am
 
Note that reactance (parameter x on the port) is only supported in non-time domain analyses. So what you're seeing is presumably the time domain or DC result (that's what I see).

I believe (I've not done the maths to check) this is a consequence of the fact that (according to the "spectre -h port" help),

Quote:
In frequency-domain, a port can have complex reference impedance. The value of AC signal of the port specifies the voltage across the port when it is terminated in its complex conjugate reference impedance.  The reactance part of the impedance is ignored when the port is used in time-domain analyses.


As a result, the internal source is adjusted to ensure this is correct. What then happens if that if there is no load, and the reactive part is ignored, you end up with this quadrupling.

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Dipankar
Community Member
***
Offline



Posts: 59

Re: usage  of "port" from analogLib
Reply #2 - Jan 4th, 2009, 10:12am
 
Dear Andrew,

                   So can I infer that - I should avoid using "PORT" with non-zero reactance when running a time-domain simulation ?

(The pdf on spectreRF also told that port-reactance is used only in harmonic balance .)
Back to top
 
 

With Thanks and Regards,
Dipankar.
View Profile   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: usage  of "port" from analogLib
Reply #3 - Jan 5th, 2009, 10:39pm
 
I checked a reactance implementation of analogLib/port using @(#)$CDS: spectre  version 6.2.0 09/19/2007 13:58 (usimlx112) $.

Amplitudes of nodes, x1 and y1 have to be sqrt(2)Volts.
Amplitudes of nodes, x2 and y2 have to be 1.0Volts.

But HB analysis of Cadence Spectre can't give correct values.

Of course, if I set Xs=0, amplitudes of all nodes will be 1.0Volts even in Cadence Spectre.

Netlist is following
Quote:
simulator lang=spectre
global 0
// Generated for: spectre
// Generated on: Jan  6 15:00:20 2009
// Design library name: My_RFDE_Test
// Design cell name: test_port
// Design view name: schematic

parameters Rs=50 // [Ohm]
parameters Xs=50 // [Ohm]

parameters Va=1.0 // [Vp]
parameters Pa_Watts=(Va/sqrt(2))**2/Rs // Available Power [Watts]
parameters Pa_dBm=10*log10(Pa_Watts)+30 // [dBm]

PORT1 (x1 0) port r=Rs x=Xs type=sine freq=1G dbm=Pa_dBm fundname="F1"
PORT2 (x1 0) port r=Rs x=-Xs type=dc

PORT3 (x2 0) port r=Rs x=Xs type=sine freq=1G dbm=Pa_dBm fundname="F1"
PORT4 (x2 0) port r=Rs x=Xs type=dc

PORT5 (y1 0) port r=Rs x=Xs type=sine freq=1G ampl=Va fundname="F1"
PORT6 (y1 0) port r=Rs x=-Xs type=dc

PORT7 (y2 0) port r=Rs x=Xs type=sine freq=1G ampl=Va fundname="F1"
PORT8 (y2 0) port r=Rs x=Xs type=dc

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 sensfile="../psf/sens.output" \
   checklimitdest=psf

pss  pss  flexbalance=yes  fund=1G  harms=7  errpreset=moderate
+    tstab=0 maxperiods=200 annotate=status  maxiters=15  restart=no

saveOptions options save=allpub

Back to top
 
« Last Edit: Jan 6th, 2009, 1:50am by pancho_hideboo »  
View Profile WWW Top+Secret Top+Secret   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: usage  of "port" from analogLib
Reply #4 - Jan 5th, 2009, 11:51pm
 
On the other hand, Agilent ADSsim can give correct results.
But reactance of analogLib/port is ignored in RFDE.
Instead we have to use adsLib/P_1Tone.

Netlist of ADSsim is followings.
Quote:
simulator lang=spectre
global 0
// Generated for: spectre
// Generated on: Jan  6 15:00:20 2009
// Design library name: My_RFDE_Test
// Design cell name: test_port
// Design view name: schematic

parameters Rs=50 // [Ohm]
parameters Xs=50 // [Ohm]

parameters Va=1.0 // [Vp]
parameters Pa_Watts=(Va/sqrt(2))**2/Rs // Available Power [Watts]
parameters Pa_dBm=10*log10(Pa_Watts)+30 // [dBm]

simulator lang=ads
Options ResourceUsage=yes UseNutmegFormat=no \
TopDesignName="./data/test_port.ds"

Zs=Rs+j*Xs

Port:PORT1  x1 0 Num=1 Z=Zs Ohm P[1]=polar(Pa_Watts, 0) Freq[1]=1 GHz \
   Noise=yes Pac=polar(dbmtow(0),0)
Port:PORT2  x1 0 Num=2 Z=conj(Zs) Pac=polar(dbmtow(0),0) Freq=freq Noise=yes

Port:PORT3  x2 0 Num=3 Z=Zs Ohm P[1]=polar(Pa_Watts, 0) Freq[1]=1 GHz \
   Noise=yes Pac=polar(dbmtow(0),0)
Port:PORT4  x2 0 Num=4 Z=Zs Pac=polar(dbmtow(0),0) Freq=freq Noise=yes

HB:HB1 MaxOrder=4 Freq[1]=1.0 GHz Order[1]=7 StatusLevel=2 \
  OutputPlan="HB1_Output"

OutputPlan:HB1_Output \
     Type="Output" \
     UseNodeNestLevel=yes \
     NodeNestLevel=2 \
     UseEquationNestLevel=yes \
     EquationNestLevel=2 \
     UseSavedEquationNestLevel=yes \
     SavedEquationNestLevel=2

Tran:HB1_tran HB_Sol=1 SteadyState=1 StatusLevel=3 \
Freq[1]=1.0 GHz Order[1]=7 \
OutputPlan="HB1_Output"

Component:tahb_HB1 Module="ATAHB" Type="ModelExtractor" \
Tran_Analysis="HB1_tran" HB_Analysis="HB1"


Here power delivered to conjugate matched load is 10dBm, while voltage is sqrt(2) Volts.

So "spectre -h port" is also wrong.
Back to top
« Last Edit: Jan 6th, 2009, 6:16pm by pancho_hideboo »  

hebo_cadence.jpg
View Profile WWW Top+Secret Top+Secret   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: usage  of "port" from analogLib
Reply #5 - Jan 6th, 2009, 1:41am
 
Although a port with fixed resistance and reactance is completely non-physical of course...

The fact that reactance has not been fully implemented yet on a port does NOT make spectre unreliable for RF in general. Of course, if people are using loads with fixed resistance and reactance over all frequencies all the time, I am completely wrong  ;)

There is an existing CCR 383288 to get port reactance to work in HB analyses - it was only added to support small-signal analyses and the work has not yet been done to get it to work in HB.

I don't believe we have plans to implement this in time domain simulation. It's rather tricky converting a non-physical port into something that makes sense and will converge in the time domain.

Regards,

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



Posts: 1424
Real Homeless
Re: usage  of "port" from analogLib
Reply #6 - Jan 6th, 2009, 1:50am
 
Sorry. Spectre's results might be Shooting Newton, since as far as my understanding "pss-td" data is not generated for HB analysis.
Due to some reason, results of shooting newton might remain.

Tomorrow I will re-run Spectre.

But explanation of "spectre -h port" is wrong.

Back to top
 
 
View Profile WWW Top+Secret Top+Secret   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: usage  of "port" from analogLib
Reply #7 - Jan 6th, 2009, 1:58am
 
pss-td is also generated for HB analyses. However, reactance is not implemented for HB analysis, as I mentioned before.

You need to check it in sp analysis, since that's what it was really implemented for. I would imagine that "ac" is OK too. I've not checked - sorry...

Regards,

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



Posts: 1424
Real Homeless
Re: usage  of "port" from analogLib
Reply #8 - Jan 6th, 2009, 2:05am
 
Dipankar wrote on Jan 4th, 2009, 10:12am:
So can I infer that - I should avoid using "PORT" with non-zero reactance when running a time-domain simulation ?

For physical system impedance which satisfy causality, R(omega) and X(omega) are not independent.
R(omega) and X(omega) have to satisfy Cauchy-Riemann differential equations regarding omega each other.
If R(omega) is constant such as 50Ohm, X(omega) can not be constant. So Zs=50+j*50 is not physical.

You must not set such non-physical impedance for time-domain analysis. For example, Agilent simulator support reactance even in time-domain analysis.

Dipankar wrote on Jan 4th, 2009, 10:12am:
(The pdf on spectreRF also told that port-reactance is used only in harmonic balance .)

But Cadence Spectre seems not to support reactance of analogLib/port even in HB analysis which is frequency domain analysis.
Back to top
 
« Last Edit: Jan 6th, 2009, 4:06pm by pancho_hideboo »  
View Profile WWW Top+Secret Top+Secret   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: usage  of "port" from analogLib
Reply #9 - Jan 6th, 2009, 2:31am
 
Andrew Beckett wrote on Jan 6th, 2009, 1:41am:
Although a port with fixed resistance and reactance is completely non-physical of course...
There is an existing CCR 383288 to get port reactance to work in HB analyses

If Spectre ignore reactance in HB and Tran analysis, amplitudes of all nodes must be 1.0Volt.
But Spectre gives 2.0Volt.

Many people use such non-physical load impedances in HB analysis.
For example, we often use constant complex impedance when we design blocks separately, e.g. mixer, vco, lna, etc.
In such cases, if I design mixer and other people design vco, I inform complex input impedance of mixer to vco designer
But I don't use constant complex impedance even in AC, SP and HB analysis. I use NPORT.
Back to top
 
« Last Edit: Jan 6th, 2009, 6:34am by pancho_hideboo »  
View Profile WWW Top+Secret Top+Secret   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: usage  of "port" from analogLib
Reply #10 - Jan 6th, 2009, 2:35am
 
I do understand that it is useful to have this in HB analyses - and the fact that support was not added for HB was an oversight - the work was done on the port component, but it also needed some additional work to enable it in certain analyses - hence the CCR.

Regards,

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



Posts: 1424
Real Homeless
Re: usage  of "port" from analogLib
Reply #11 - Jan 6th, 2009, 5:20pm
 
Andrew Beckett wrote on Jan 6th, 2009, 1:58am:
You need to check it in SP Analysis

I can't confirm whether reactance is implemented correctly or not regarding amplitude with sp-analysis.
I have to run AC Analysis.
Following is netlist

Quote:
simulator lang=spectre
global 0
// Generated for: spectre
// Generated on: Jan  7 09:43:33 2009
// Design library name: My_RFDE_Test
// Design cell name: test_port
// Design view name: schematic

parameters Rs=50 // [Ohm]
parameters Xs=50 // [Ohm]

parameters Va=1.0 // [Vp]
parameters Pa_Watts=(Va/sqrt(2))**2/Rs // Available Power [Watts]
parameters Pa_dBm=10*log10(Pa_Watts)+30 // [dBm]

PORT1 (x1 0) port r=Rs x=Xs type=sine freq=1G dbm=Pa_dBm mag=Va fundname="F1"
PORT2 (x1 0) port r=Rs x=-Xs type=dc

PORT3 (x2 0) port r=Rs x=Xs type=sine freq=1G dbm=Pa_dBm mag=Va fundname="F1"
PORT4 (x2 0) port r=Rs x=Xs type=dc

PORT5 (y1 0) port r=Rs x=Xs type=sine freq=1G ampl=Va mag=Va fundname="F1"
PORT6 (y1 0) port r=Rs x=-Xs type=dc

PORT7 (y2 0) port r=Rs x=Xs type=sine freq=1G ampl=Va mag=Va fundname="F1"
PORT8 (y2 0) port r=Rs x=Xs type=dc

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 sensfile="../psf/sens.output" \
   checklimitdest=psf

ac ac start=1G stop=10G dec=11 annotate=status

pss  pss  flexbalance=yes  fund=1G  harms=7  errpreset=moderate
+    tstab=0 maxperiods=200 annotate=status  maxiters=15  restart=no

saveOptions options save=allpub
save PORT2:p PORT4:p PORT6:p PORT8:p


Attached figure is for Xs=0. Power_dBm is calculated like followings.

Power_x1_dBm
  =dbm( 0.5*real( conjugate(i("/PORT2/PLUS" ?result "ac"))*v("/x1" ?result "ac") ) )

Power_x2_dBm
  =dbm( 0.5*real( conjugate(i("/PORT4/PLUS" ?result "ac"))*v("/x2" ?result "ac") ) )
                                                     


Back to top
« Last Edit: Jan 7th, 2009, 8:31am by pancho_hideboo »  

Xs_0.jpg
View Profile WWW Top+Secret Top+Secret   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: usage  of "port" from analogLib
Reply #12 - Jan 6th, 2009, 5:22pm
 
The use of complex port impedance got its start in single-frequency (linear, AC-type) analysis. This is a perfectly valid thing to do in a single-frequency analysis. However, having a constant-valued complex port impedance over a range of frequencies is non-physical, as Pancho-Hidaboo pointed out. So its use in nonlinear analysis such as transient or harmonic balance where more than one frequency is present simultaneously is dubious at best. The computed result will be non-physical and so misleading in some way. In fact, this is an important issue with harmonic balance in general. There are several relatively common situations where it will happily produce incorrect result with no warning. I always like to run transient or shooting methods in addition to harmonic balance just to make sure that I am not being fooled.

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



Posts: 1424
Real Homeless
Re: usage  of "port" from analogLib
Reply #13 - Jan 6th, 2009, 5:30pm
 
Attached figure is for Xs=50.
This result that amplitude of node x1 is 1.0V is matched to the "spectre -h port".
Quote:
In frequency-domain, a port can have complex reference impedance.
The value of AC signal of the port specifies the voltage across the port when it is terminated in its complex conjugate reference impedance.

But this result is not appropriate although it is matched to "spectre -h port".
See figure for Xs=0 again. For Xs=0, power delivered to conjugate matched load is 10dBm.
Even for Xs=50, power delivered to conjugate matched load have to be 10dBm.
But Spectre results is not 10dBm.

And Amplitude of node x1 have to be sqrt(2) Volt.

On the other hand, AC Analysis of Agilent ADSsim gives correct values as well as HB analysis.

Back to top
« Last Edit: Jan 7th, 2009, 5:09am by pancho_hideboo »  

Xs_50.jpg
View Profile WWW Top+Secret Top+Secret   IP Logged
pancho_hideboo
Senior Fellow
******
Offline



Posts: 1424
Real Homeless
Re: usage  of "port" from analogLib
Reply #14 - Jan 6th, 2009, 5:42pm
 
If we see "spectre -h port", we can see followings.
Quote:
The reactance part of the impedance is ignored when the port is used in time-domain analyses.

56      x=0 Ohm           Reference reactance, ignored for time domain analyses.


If Spectre ignore reactance in HB and Tran analysis, amplitudes of all nodes must be 1.0Volt.
But Spectre gives 2.0Volt.

This is the reason why starter of this thread, Dipankar observed 4 times voltage when port is open loaded.

I think at least there are three issues about reactance implementation of analogLib/port in Cadence Spectre.

(1) Generated amplitude is not appropriate even in AC analysis.
(2) Reactance is not ignored for HB and time domain analyses. And generated amplitude is not appropriate.
(3) Unless "freq" variable is not available, there is no valuable application for complex impedance even in AC analysis.
Quote:


I know there are many people who use complex impedance in Agilent ADSsim.
But I doubt whether there is any people who use reactance of analogLib/port in Cadence Spectre actually since it is not implemented appropriately and its applications are very limited.
Back to top
« Last Edit: Jan 7th, 2009, 5:34pm by pancho_hideboo »  

aho_cadence.jpg
View Profile WWW Top+Secret Top+Secret   IP Logged
Pages: 1 2 
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.