23.01.2015 Views

Download - Wolfram Research

Download - Wolfram Research

Download - Wolfram Research

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.12 Nonlinear Simplification Techniques 407<br />

The simulation function must return a list of the AC solutions in the same format as ACAnalysis<br />

returns the result (with the option setting InterpolateResult −> False).<br />

Similarly, you can define your own AC error function instead of the default error function and<br />

specify it as ErrorFunction in the AC mode settings for NonlinearSetup. During the simplification<br />

routines this function is used to calculate the error with the following arguments:<br />

errfct[newval_List, oldval_List, outputsymbols_List]<br />

Pattern for a user-defined AC error function.<br />

Here, newval and oldval are the numerical solutions of the simplified and the original dae system,<br />

outputsymbols is a list of all output symbols.<br />

The error function must return a list of rules {symb <br />

−> err , † † † } which specifies the numerical error<br />

for each output symbol. The default AC error function calculates the maximum relative error.<br />

Instead of specifying the maximum allowed error for output variables for each call to the nonlinear<br />

simplifications routines separately, you can specify global maximum errors for output variables using<br />

the MaxError argument. These values are used if no error value is given in the call to the nonlinear<br />

simplification routine. The value of this argument has to be a list of rules of the form outvar −> error.<br />

Examples<br />

Load Analog Insydes.<br />

Read PSpice netlist.<br />

Set up DAE system.<br />

Get all valid symbols that<br />

can be used as inputs for<br />

NonlinearSetup.<br />

In[1]:= DC, ElementValues −> Symbolic]<br />

Out[3]= DAEDC, 27 27 <br />

In[4]:= GetParameters[dae]<br />

Out[4]=<br />

AREA$Q1, AREA$Q2, AREA$Q3, AREA$Q4, BF$Q1, BF$Q2,<br />

BF$Q3, BF$Q4, BR$Q1, BR$Q2, BR$Q3, BR$Q4, GMIN, IB, II,<br />

IS$Q1, IS$Q2, IS$Q3, IS$Q4, TEMP, TNOM, VDC, VLOAD, $k, $q<br />

Get all valid symbols that<br />

can be used as outputs for<br />

NonlinearSetup.<br />

In[5]:= GetVariables[dae]<br />

Out[5]=<br />

V$1, V$3, V$4, V$5, V$OUT, I$BS$Q1, I$CS$Q1,<br />

I$ES$Q1, ib$Q1, ic$Q1, I$BS$Q2, I$CS$Q2, I$ES$Q2,<br />

ib$Q2, ic$Q2, I$BS$Q3, I$CS$Q3, I$ES$Q3, ib$Q3, ic$Q3,<br />

I$BS$Q4, I$CS$Q4, I$ES$Q4, ib$Q4, ic$Q4, I$VLOAD, I$VDC<br />

In the following we choose VLOAD and II as inputs and V$5 and I$VLOAD as outputs, treating dae as<br />

a multi-input/multi-output system. We want to control the DC behavior sweeping VLOAD between

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!