Manuals >Netlist Translator for SPICE & Spectre >Chapter 7: Translating a Device
Print version of this Book (PDF file)
prevnext

Using a Symbolically Defined Device

The symbolically-defined device (SDD) enables you to create equation based, user-defined, nonlinear components in ADS. The SDD is a multi-port device which is defined by specifying algebraic relationships that relate the port voltages, currents, and their derivatives, plus currents from certain other devices.

Controlled sources from SPICE are modeled in ADS using the symbolically-defined device. The SDD allows a voltage or current source to be constructed whose output can be described as an arbitrary combination of a number of controlling voltages or currents.

; e voltage controlled voltage source
SDD:name nc1p nc1n nc2p nc2n outp outn \
I[1,0]=0 I[2,0]=0 F[3,0]=_v3-(output_voltage(_v1, _v2))

; g voltage controlled current source
SDD:name nc1p nc1n nc2p nc2n outp outn \
I[1,0]=0 I[2,0]=0 I[3,0]=(output_current(_v1, _v2))

; h current controlled voltage source
SDD:name outp outn C[1]=current1 C[2]=current2 \
F[1,0]=_v1-(output_voltage(_c1, _c2))

; f current controlled current source
SDD:name outp outn C[1]=current1 C[2]=current2 \
I[1,0]=(output_current(_c1, _c2))

The voltage controlled sources have 2(n+1) nodes, where n is the number of controls. The controlling voltage nodes are listed first in pairs (nc1p nc1n) at ports 1 through n, then the output node pair (outp outn) at port n+1. The controlling voltages have symbolic names like _v1. Each controlling voltage must have a current equation written for it (I[1,0]=0) so that no current flows between the controlling nodes through the SDD.

The current controlled sources have only 2 output nodes at port 1, while the name of the sources used to measure the controlling currents are specified using C[1]="ivs1". The controlling currents have symbolic names like _c1.

Current sources are written as a simple expression for the current at the output port. This expression is in SI units and is written in terms of the controls:

I[3,0]=_v1*1e-3+_v2*2e-3

A voltage source must have an implicit expression for the voltage at the output port such that F[3,0]=_v3-vout, where vout is the desired output voltage:

F[3,0]=_v3-(_v1*2+_v1*v2)

Controlled sources in SPICE may be linear or nonlinear and there may be one or more controlling voltages or currents. The general form of a controlled source is:

?id node1 node2 [poly(dim)] [sourcename | nodecp nodecn]*
+ value [value]*

The source has two nodes with the same polarity convention as the dependent sources. The method of specifying controls depends on whether the source is voltage controlled or current controlled. Current-controlled sources give the name of a source through which the current is measured; voltage-controlled sources provide two nodes with which to measure a differential voltage. The simple linear form for all four types:

eid n+ n- nc+ nc- value ; vout = value * vcon
fid n+ n- vname value ; iout = value * icon
gid n+ n- nc+ nc- value ; iout = value * vcon
hid n+ n- vname value ; vout = value * icon

A nonlinear source may be created whose output is a polynomial function of its control:

eid n+ n- nc+ nc- v0 v1 v2 v3 ... [ic=]

The polynomial is interpreted as:

vout=v0+v1*vcon+v2*v2con+...

unless only a single value is given, in which case it reverts to a linear behavior:

vout=v0*vcon

SPICE allows controlled sources with more than one control. When there is more than one control. the poly keyword must be used to identify the number of controls. The dimension refers to the number of controlling sources, not the order of the polynomial.

eid n+ n- poly(dim) [ nc+ nc- ]* values ... [ic=]

Coefficients for a polynomial of dimension two are interpreted as:

vout=v0

+v1*vcon1+v2*vcon2
+v3*v2con1+v4*vcon1*vcon2+v5*v2con2
+v6*v3con1+v7*v2con1*vcon2+v8*vcon1*v2con2+v9*v3con2
+...

Coefficients for a polynomial of dimension three are interpreted as:

vout=v0

+v1*vcon1+v2*vcon2+v3*vcon3
+v4*v2con1+v5*vcon1*vcon2+v6*vcon1*vcon3+v7*v2con2+v8*vcon2*vcon3+v9*v2con3
+v10*v3con1+v11*v2con1*vcon2+v12*v2con1*vcon3+v13*vcon1*v2con2+v14*vcon1*vcon2*vcon3
+v15*vcon1*v2con3+v16*v3con2+v17*v2con2*vcon3+v18*vcon2*v2con3+v19*v3con3*
+v20*v4con1+...

The SPICE syntax provides no simple way to specify just a couple of the individual terms. If only the v14 term is needed, v0 through v13 must still be specified with zeros.

Initial conditions here are used to provide a guess at what the controlling values will be so the output of the dependent source can be evaluated; the initial values do not actually influence the controlling values. Enough initial conditions must be provided to match the dimensionality of the source.

Several translation examples for SPICE are presented below.

Example1
SPICE Netlist:

* linear vcvs
e01 vout 0 vc1p vc1n 0.05

ADS Netlist:

SDD:e01 vc1p vc1n vout 0 I[1,0]=0 F[2,0]=_v2-(0.05*_v1)

Example 2
SPICE Netlist:

* linear cccs
f01 vout 0 vname 0.05

ADS Netlist:

SDD:f01 vout 0 C[1]=vname I[1,0]=0.05*_c1

Example 3
SPICE Netlist:

* linear vccs
g01 vout 0 vc1p vc1n 0.05

ADS Netlist:

SDD:g01 vc1p vc1n vout 0 I[1,0]=0 I[2,0]=0.05*_v1

Example 4
SPICE Netlist:

* linear ccvs
h01 vout 0 vname 0.05

ADS Netlist:

SDD:h01 vout 0 C[1]=vname I[1,0]=0 F[1,0]=_v1-(0.05*_c1)

Example 5
SPICE Netlist:

* one input polynomial vcvs
* vout=0.5+0.1*vc1+0.01*vc1^2+0.001*vc1^3
e02 vout 0 nc1p nc1n 0.5 0.1 0.01 0.001

ADS Netlist:

SDD:e02 nc1p nc1n vout 0 I[1,0]=0 \
F[2,0]=_v2-(0.5+0.1*_v1+0.01*_v1^2+0.001*_v1^3)

Example 6
SPICE Netlist:

* two input polynomial cccs
* iout=0.0+0.2*i1+0.3*i2+0.01*i1^2+0.02*i1*i2+0.03*i2^2
f02 vout 0 poly(2) vname1 vname2 0.0 0.2 0.3 0.01 0.02 0.03

ADS Netlist:

SDD:f02 vout 0 C[1]=vname1 C[2]=vname2 \
I[1,0]=0.0+0.2*_c1+0.3*_c2+0.01*_c1^2+0.02*_c1*_c2+0.03*_c2^2

Example 7
SPICE Netlist:

* three input polynomial vccs
* iout=0.1*vc1+0.2*vc2+0.3*vc3
g02 vout 0 poly(3) vc1p vc1n vc2p vc2n vc3p vc3n
+ 0 0.1 0.2 0.3

ADS Netlist:

SDD:g02 vc1p vc1n vc2p vc2n vc3p vc3n vout 0 \
I[1,0]=0 I[2,0]=0 I[3,0]=0 \
F[4,0]=_v4-(0+0.1*_v1+0.2*_v2+0.3*_v3)

For more information, refer to the section on the "Symbolically Defined Device" in the ADS Circuit Components manual.


prevnext