next up previous contents index
Next: Tran Functions Up: Voltage and Current Sources Previous: Device Expressions   Contents   Index


POLY Expressions

In SPICE2, nonlinear polynomial dependencies are specified using a rather cumbersome syntax keyed by the word poly. For compatibility, this syntax is recognized by the dependent sources in WRspice, making possible the use of the large number of behavioral models developed for SPICE2.

There are three polynomial equations which can be specified through the poly(N) parameter.

poly(1) One-dimensional equation
poly(2) Two-dimensional equation
poly(3) Three-dimensional equation
The dimensionality refers to the number of controlling variables; one, two, or three. These parameters must immediately follow the poly(N) token. The inputs must correspond to the type of the source, either pairs of nodes for voltage-controlled sources, or voltage source or inductor names for current-controlled sources. Following the inputs is the list of polynomial coefficients which define the equation. These are constants, and may be in any format recognized by WRspice.

The simplest case is one dimension, where the coefficients c0, c1, ... evaluate to

c0 + c1x + c2x2 + c3x3 + ...

The number of terms is arbitrary. If the number of terms is exactly one, it is assumed to be the linear term (c1) and not the constant term. The following is an example of a voltage-controlled voltage source which utilizes poly(1).
epolysrc 1 0 poly(1) 3 2 0 2 0.25
The source output appears at node 1 to ground (note that WRspice can use arbitrary strings as node specifiers). The input is the voltage difference between nodes 3 and 2. The output voltage is twice the input voltage plus .25 times the square of the input voltage.

In the two dimensional case, the coefficients are interpreted in the following order.

c0 + c1x + c2y + c3x2 + c4xy + c5y2 + c6x3 + c7x2y + c8xy2 + c9y3 + ...

For example, to specify a source which produces 3.5*v(3,4) + 1.29*v(8)*v(3,4), one has
exx 1 0 poly(2) 3 4 8 0 0 3.5 0 0 1.29
Note that any coefficients that are unspecified are taken as zero.

The three dimensional case has a coefficient ordering interpretation given by

c0 + c1x + c2y + c3z + c4x2 + c5xy + c6xz + c7y2 + c8yz + c9z2 + c10x3 + c11x2y + c12x2z +

c13xy2 + c14xyz + c15xz2 + c16y3 + c17y2z + c18yz2 + c19z3 + ...

which is rather complex but careful examination reveals the pattern.


next up previous contents index
Next: Tran Functions Up: Voltage and Current Sources Previous: Device Expressions   Contents   Index
Stephen R. Whiteley 2024-10-26