next up previous contents index
Next: Voltage-Controlled Voltage Sources Up: Dependent Sources Previous: Dependent Sources   Contents   Index


Voltage-Controlled Current Sources

This is a special case of the general source specification included for backward compatibility.

General Form:
gname n+ n- nc+ nc- [expr] srcargs
gname n+ n- function | cur [=] expr srcargs
gname n+ n- poly poly_spec srcargs
where srcargs = [ac table(name)]
Examples:
g1 2 0 5 0 0.1mmho
g2 2 0 5 0 log10(x)
g3 2 0 function log10(v(5))

The n+ and n- are the positive and negative nodes, respectively. Current flow is from the positive node, through the source, to the negative node. The parameters nc+ and nc- are the positive and negative controlling nodes, respectively.

In the first form, if the expr is a constant, it represents the transconductance in siemens. If no expression is given, a unit constant value is assumed. Otherwise, the expr computes the source current, where the variable ``x'' if used in the expr is taken to be the controlling voltage (v(nc+,nc-)). In this case only, the pwl construct if used in the expr takes as its input variable the value of ``x'' rather than time, thus a piecewise linear transfer function can be implemented using a pwl statement. The second form is similar, but ``x'' is not defined. The keywords ``function'' and ``cur'' are equivalent. The third form allows use of the SPICE2 poly construct.

More information on the function specification can be found in 2.15, and the poly specification is described in 2.15.2.

If the ac parameter is given and the table keyword follows, then the named table is taken to contain complex transfer coefficient data, which will be used in ac analysis (and possibly elsewhere, see below). For each frequency, the source output will be the interpolated transfer coefficient from the table multiplied by the input. The table must be specified with a .table line, and must have the ac keyword given.

If an ac table is specified, and no dc/transient transfer function or coefficient is given, then in transient analysis, the source transfer will be obtained through Fourier analysis of the table data. This is somewhat experimental, and may be prone to numerical errors.

In ac analysis, the transfer coefficient can be real or complex. If complex, the imaginary value follows the real value. Only constants or constant expressions are valid in this case. If the source function is specified in this way, the real component is used in dc and transient analysis. This will also override a table, if given.


next up previous contents index
Next: Voltage-Controlled Voltage Sources Up: Dependent Sources Previous: Dependent Sources   Contents   Index
Stephen R. Whiteley 2022-09-18