Documentation /  Analog Insydes /  Reference Manual /  Linear Simplification Techniques /

IntroductionApproximateTransferFunction

3.11.1 ComplexityEstimate

Command structure of ComplexityEstimate.

Before you try to solve a system of circuit equations symbolically with Solve, you should use the function ComplexityEstimate to check whether the computation is feasible at all. ComplexityEstimate computes an estimate of the number of product terms in a transfer function computed from a symbolic matrix equation . More precisely, the function computes a lower bound for the number of product terms in the determinant of .

As a rule of thumb, solving a system of circuit equations symbolically is technically feasible if the number returned by ComplexityEstimate is less than . If you expect a symbolic expression to be interpretable, its complexity should be in the range from to .

See also: Statistics.

Examples

Load Analog Insydes.

In[1]:= <<AnalogInsydes`

Define an AC model for BJTs.

In[2]:= Circuit[
Model[
Name -> BJT,
Selector -> AC,
Scope -> Global,
Ports -> {B, C, E},
Parameters -> {Rbe, Cbc, Cbe, beta, Ro,
RBE, CBC, CBE, BETA, RO},
Definition -> Netlist[
{CBE, {B, E}, Symbolic -> Cbe, Value -> CBE},
{RBE, {X, E}, Symbolic -> Rbe, Value -> RBE},
{CBC, {B, C}, Symbolic -> Cbc, Value -> CBC},
{CC, {B, X, C, E},
Symbolic -> beta, Value -> BETA},
{RO, {C, E}, Symbolic -> Ro, Value -> RO}
]
]
] // ExpandSubcircuits;

This netlist describes a common-emitter amplifier.

In[3]:= ceamplifier =
Circuit[
Netlist[
{V1, {1, 0}, 1},
{V0, {6, 0}, 0},
{C1, {1, 2}, Symbolic -> C1, Value -> 1.0*^-7},
{R1, {2, 6}, Symbolic -> R1, Value -> 1.0*^5},
{R2, {2, 0}, Symbolic -> R2, Value -> 47000.},
{RC, {6, 3}, Symbolic -> RC, Value -> 2200.},
{RE, {4, 0}, Symbolic -> RE, Value -> 1000.},
{C2, {3, 5}, Symbolic -> C2, Value -> 1.0*^-6},
{RL, {5, 0}, Symbolic -> RL, Value -> 47000.},
{Q1, {2 -> B, 3 -> C, 4 -> E},
Model -> BJT, Selector -> AC,
CBE -> 30.*^-12, CBC -> 5.*^-12, RBE -> 1000.,
RO -> 10000., BETA -> 200.}
]
]

Out[3]=

Set up a system of symbolic AC equations.

In[4]:= eqs = CircuitEquations[ceamplifier,
ElementValues -> Symbolic]

Out[4]=

Compute the complexity estimate.

In[5]:= ComplexityEstimate[eqs]

Out[5]=

The number returned by ComplexityEstimate indicates that solving the equations for any transfer function is feasible, but the result cannot be expected to yield much insight into circuit behavior.

Compute the voltage transfer function symbolically and expand the result.

In[6]:= solution = Solve[eqs, V$5];
v5 = Together[V$5 /. First[solution]]

Out[7]=

Here, the complexity estimate is identical to the true number of terms in the denominator of the symbolic transfer function. In the general case, the estimate yields a lower bound for this number.

Determine number of terms in the denominator of the transfer function.

In[7]:= Length[Denominator[v5]]

Out[8]=

IntroductionApproximateTransferFunction