2.10.1 Introduction to Nonlinear Approximation
As opposed to the linear case, for nonlinear approximation techniques there is no distinction between simplification-before-generation and simplification-after-generation methods. All nonlinear simplification commands expect a symbolic DAEObject as input and return an approximated symbolic DAEObject. This simplified system can then be approximated further until the desired complexity reduction is reached. During simplification, the error is measured by numerical simulations and the simplification is stopped as soon as the error exceeds a user-given error bound. Different user-defined numerical analyses can be performed for error calculation.
Before the nonlinear simplification techniques can be applied, the equation system has to be prepared using the command NonlinearSetup. The command syntax is as follows:
NonlinearSetup[dae, inputs, outputs, -> , ]
The first argument of NonlinearSetup is the DAEObject to be simplified. It has to be set up in symbolic formulation for DC or transient analysis mode. See the command CircuitEquations, especially the options ElementValues and AnalysisMode, for setting up an appropriate equation system.
Then you have to specify the input and output symbols of the equation system. During simplification, the input symbols are swept in a user-given range, whereas the value of the output symbols is used to calculate the numerical error. All parameters of the DAEObject can be used as input symbols. To get a list of all valid input symbols, use the command GetParameters. On the other hand, all variables of the DAEObject can be used as output symbols. To get a list of all valid output symbols, use the command GetVariables. Both arguments inputs and outputs can either be a single symbol or a list of symbols. Since several input and output symbols can be specified, the nonlinear simplification techniques are able to approximate multi-input/multi-output (MIMO) systems.
Finally, the analysis modes used for error calculation have to be given as rules of the form -> {}, where is either DT (for DC-transfer analysis) or AC (for AC analysis). The argument is a sequence of rules for specifying the sweep range (using the symbol Range), the simulation function (using the symbol SimulationFunction), and the error function (using the symbol ErrorFunction). The sweep range is a required argument and determines for each input symbol (as specified by inputs) the numerical range in which to sweep the symbol during numerical simulation. The sweep range is given by a standard Analog Insydes parameter sweep specification as described in Section 3.7.2. Both the simulation function and error function arguments are optional and for advanced usage only. For usual applications you do not need to specify them.
For example, the argument
DT -> {Range -> {VIN, {0., 5., 1.}}}
specifies that a DC-transfer analysis has to be performed for error calculation. For this, the input symbol VIN has to be swept from 0. to 5. in steps of 1. and the default simulation and error functions have to be used.
NonlinearSetup returns a new DAEObject which is prepared for nonlinear approximation. All data given as arguments to NonlinearSetup are stored in the returned DAEObject and automatically extracted by subsequent commands, such that there is no need to specify them again. Additionally, NonlinearSetup performs numerical simulations and stores the result as reference values used for error calculations. You can use the command NonlinearSettings to inspect which data has been added to the DAEObject for nonlinear simplifications.
Once the DAEObject is prepared, there are two major commands for nonlinear simplifications: CompressNonlinearEquations and CancelTerms.
CompressNonlinearEquations
CompressNonlinearEquations removes equations and eliminates variables from the DAEObject which are irrelevant for solving for the output variables. The general syntax is as follows:
CompressNonlinearEquations[dae, vars]
If the given DAEObject is prepared via NonlinearSetup, the output variables specified in the call to NonlinearSetup are added to the given list vars of variables to hold in the equation system. Note that compressing equations is a mathematically exact operation, there is no need to perform numerical error calculations.
Since CompressNonlinearEquations reduces the number of equations in a DAEObject, it is recommended as the first step in a nonlinear simplification procedure.
CancelTerms
CancelTerms simplifies a DAEObject by successive removal of terms in the equation system. The general syntax is as follows:
CancelTerms[dae, maxerrors]
After each each term removal, CancelTerms performs a numeric simulation (as set by NonlinearSetup), calculates the error, and compares it to the user-given error bound maxerrors. If the error caused by a simplification exceeds this error bound, the simplification is undone.
CancelTerms returns the simplified DAEObject. All nonlinear options which are stored in dae are copied to the new system. Thus, the returned system can be used as input for subsequent simplifications.
By default, CancelTerms removes terms in top-level sums of the equation system. Using the option Level, removal of terms can be performed in deeper levels, too. The value of this option is either a non-negative integer, a list of non-negative integers, or the symbol All. For the latter, removal of terms is performed in all levels, starting on top level.
|