Chapter 4 Behavioral modeling
Gnucap behavioral modeling is in a state of transition, so this is
subject to change in a future release.
All simple components can have a behavioral description,
with syntax designed as an extension of the Spice time dependent
sources. They are not necessarily physically realizeable. Some only
work on particular types of analysis, or over a small range of
values. Some can be used together, some cannot.
All simple components are considered to have simple
transformations. A function returns one parameter as a function of
one other, as an extension of their linear behavior.
Linear behavior:

Capacitor
 q = C v
 Inductor
 ϕ = L i
 Resistor
 v = I r
 Admittance
 i = Y v
 VCVS
 v_{o} = E v_{i}
 VCCS
 i_{o} = G v_{i}
 CCVS
 v_{o} = E i_{i}
 CCCS
 i_{o} = G i_{i}
Sources are defined as functions of time:

Voltage source
 v = f(t)
 Current source
 i = f(t)
For behavioral modeling / nonlinear values, replace the constant times
input by an arbitrary function:

Capacitor
 q = f(v)
 Inductor
 ϕ = f(i)
 Resistor
 v = f(r)
 Admittance
 i = f(v)
 VCVS
 v_{o} = f(v_{i})
 VCCS
 i_{o} = f(v_{i})
 CCVS
 v_{o} = f(i_{i})
 CCCS
 i_{o} = f(i_{i})
Conditionals
 AC
 AC analysis only.
 DC
 DC (steady state) value.
 OP
 OP analysis.
 TRAN
 Transient analysis.
 FOUR
 Fourier analysis only.
 ELSE
 Anything not listed.
 ALL
 All modes.
Functions
 COMPLEX
 Complex (re, im) value.
 EXP
 Spice Exp source. (time dependent value).
 FIT
 Fit a curve with splines.
 GENERATOR
 Value from Generator command.
 POLY
 Polynomial (Spice style).
 POSY
 Posynomial (Like poly, noninteger powers).
 PULSE
 Spice Pulse source. (time dependent value).
 PWL
 Piecewise linear.
 SFFM
 Spice Frequency Modulation (time dependent value).
 SIN
 Spice Sin source. (time dependent value).
 TANH
 Hyperbolic tangent xfer function.
Model Functions
 TABLE
 Fit a curve with splines.
 Cap
 Spice semiconductor “capacitor” model.
 Res
 Spice semiconductor “resistor” model.