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

NonlinearSetupCancelTerms

3.12.2 CompressNonlinearEquations

Command structure of CompressNonlinearEquations.

This function contains a compression algorithm which allows for identification and elimination of irrelevant equations and variables and the removal of decoupled clusters of equations and variables in a system of symbolic nonlinear differential and algebraic circuit equations. The return value is again a DAEObject.

Note that the argument outvars also supports string patterns. Additionally, CompressNonlinearEquations automatically retrieves the settings made by NonlinearSetup, so there is no need to specify the variables of interest as a second argument.

Note that CompressNonlinearEquations also supports the data format from Release 1, where equations are given as {eqns, vars}, instead of a DAEObject:

Additional patterns of CompressNonlinearEquations.

CompressNonlinearEquations has the following options:

Options for CompressNonlinearEquations.

See also: CompressMatrixEquation.

Options Description

EliminateVariables

EliminateVariables allows for eliminating variables from a set of equations. Settings are Automatic for eliminating variables occuring linear everywhere, All for eliminating variables occuring linear somewhere, and None for no variable elimination, respectively. The default setting is EliminateVariables -> Automatic.

StripIndependentBlocks

With StripIndependentBlocks -> True irrelevant independent subsystems of equations will be searched for and removed. The default setting is StripIndependentBlocks -> True.

Examples

Load Analog Insydes.

In[1]:= <<AnalogInsydes`

Define netlist description of a simple diode rectifier circuit.

In[2]:= rectifier =
Circuit[
Netlist[
{V0, {1, 0}, Symbolic -> V0,
Value -> 2. Sin[10^6 Time]},
{R1, {2, 0}, Symbolic -> R1, Value -> 100.},
{C1, {2, 0}, Symbolic -> C1, Value -> 1.*^-7},
{D1, {1 -> A, 2 -> C},
Model -> "Diode", Selector -> "Spice"}
]
]

Out[2]=

Set up the system of symbolic time-domain equations.

In[3]:= rectifiereqs = CircuitEquations[rectifier,
AnalysisMode -> Transient,
ElementValues -> Symbolic] // UpdateDesignPoint

Out[3]=

Show equation system.

In[4]:= DisplayForm[rectifiereqs]

Out[4]//DisplayForm=

Eliminate variables which occur linear everywhere.

In[5]:= rectifiercomp = CompressNonlinearEquations[rectifiereqs,
V$2[t], EliminateVariables -> Automatic]

Out[5]=

Show compressed equation system.

In[6]:= DisplayForm[rectifiercomp]

Out[6]//DisplayForm=

Eliminate variables which occur linear somewhere.

In[7]:= rectifiercomp = CompressNonlinearEquations[rectifiereqs,
V$2[t], EliminateVariables -> All]

Out[7]=

Show compressed equation system.

In[8]:= DisplayForm[rectifiercomp]

Out[8]//DisplayForm=

Perform numerical transient analyses with NDAESolve.

In[9]:= orig = NDAESolve[rectifiereqs, {t, 0., 2.*^-5}];
comp = NDAESolve[rectifiercomp, {t, 0., 2.*^-5}];

Compare the simulation results with TransientPlot.

In[10]:= V$2Orig := V$2 /. First[orig];
TransientPlot[comp, {V$2[t], V$2Orig[t]},
{t, 0., 2.*^-5}]

Out[12]=

NonlinearSetupCancelTerms