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.
The simplest case is one dimension, where the coefficients c0, c1, ... evaluate to
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.25The 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.
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.29Note that any coefficients that are unspecified are taken as zero.
The three dimensional case has a coefficient ordering interpretation given by
which is rather complex but careful examination reveals the pattern.