23.01.2015 Views

Download - Wolfram Research

Download - Wolfram Research

Download - Wolfram Research

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

62 2. Tutorial<br />

same global symbols to all instances of the corresponding subcircuit element values. This would not<br />

be very convenient as it would require typing something along the line of R$X1 ⩵ R$X2 ⩵ R$X3 ⩵ ⩵<br />

R for every group of identical elements. By explicitly declaring which symbols in a subcircuit denote<br />

parameters and quietly assuming all others to be global quantities, cases like that of the Darlington<br />

amplifier as well as that of the ladder circuit are both dealt with most easily. However, Analog<br />

Insydes provides the command MatchSymbols which applies matching information on a DAEObject.<br />

Thus, you can decide which parameters to match even after setting up the equation system.<br />

Passing Parameter Values to Subcircuit Instances<br />

Though intentional and useful, the automatic instantiation of symbolic subcircuit parameters is only<br />

a side effect of the parameter declaration. The original purpose of the Parameters argument in a<br />

Model definition is to declare the set of local model variables which can be replaced by instancespecific<br />

values given in the value fields of subcircuit references (see Section 3.1.8). In other words,<br />

we can pass parameter values to a subcircuit in a similar way as we can pass arguments to a function<br />

defined in Mathematica. Since we do not have to specify values for model parameters, automatic<br />

instantiation comes into effect whenever a default value is needed for a parameter which has not<br />

been assigned a value.<br />

If we need to pass parameter values to instances of subcircuit objects we must append a sequence<br />

of replacement rules of the form<br />

parameter symbol −> value<br />

to the value field of the corresponding subcircuit references. The full netlist format of a subcircuit<br />

reference is thus<br />

{subcircuit instance name, {port connections},<br />

Model −> subcircuit class name, Selector −> selector,<br />

parameter 1 −> value 1 , parameter 2 −> value 2 , }<br />

To illustrate the possible cases consider the netlist of the Darlington amplifier from Section 2.3.5 (see<br />

Figure 3.3) once again. Let’s assign the symbolic value RB1 and a numerical value of to the<br />

parameters RB and beta of Q1, respectively. In the case of Q2, we assign the symbol beta2 to the<br />

current gain whereas we leave the parameter RB unspecified.

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

Saved successfully!

Ooh no, something went wrong!