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.

44 2. Tutorial<br />

the Symbolic option is given. This allows for assigning both a numerical as well as a symbolic value<br />

to a circuit element. You will be able to assess the value of this feature better once you have learned<br />

more about the topics described in Chapter 2.3 and Chapter 2.8.<br />

Type<br />

The value field option Type (see Section 3.1.4) allows you to specify the type of an element explicitly,<br />

thus overriding the automatic type detection from an element’s reference designator. The argument<br />

to the Type option must be the full name of a circuit element type supported by Analog Insydes<br />

(see Chapter 4.2). The available types are listed in the global variable ElementTypes. Using the<br />

Type option we could write a netlist entry for a resistor in the following way even though the name<br />

Shunt does not begin with the type tag R.<br />

{Shunt, {1, 2}, Type −> Resistor, Value −> R1}<br />

Moreover, as Analog Insydes generates voltage and current identifiers (see Section 2.4.1) by adding<br />

the prefixes "V$" and "I$" to the reference designators, the Type option gives us some more influence<br />

on the names of voltages and currents. In this example, the resistor current would be named<br />

I$Shunt, whereas it would be named I$R1 for the netlist entries from the previous two subsections.<br />

The example below shows a more convincing application of the Type option. Assume that you have<br />

an amplifier circuit with an output load connected between nodes out and ground, and that you<br />

wish to calculate the amplifier’s frequency responses for both resistive and capacitive loads. You<br />

could, of course, write two separate netlists for this purpose. On the other hand, the Type option<br />

offers you the alternative to set up only one single netlist but with a variable load type:<br />

amplifier =<br />

Netlist[<br />

<br />

{Load, {out, 0}, Type −> loadtype, Value −> loadval},<br />

<br />

]<br />

Then, by replacing the type variable with a concrete type name, you can set up circuit equations for<br />

a particular type of load, e.g. for a capacitor:<br />

CircuitEquations[<br />

amplifier /. {loadtype −> Capacitor, loadval −> CL}]<br />

Note that in both cases the identifier for the load current will be I$Load, regardless of the load<br />

element type eventually selected.<br />

Finally, the Type option helps us to correct a frequently made mistake, which usually occurs<br />

when a netlist contains a supply voltage source named VCC. If we relied on automatic type<br />

detection from the reference designator VCC, Analog Insydes would give us the error message<br />

"Netlist::numnode: Expected 4 nodes but received 2 for VCCSource VCC". The reason for this<br />

error is that VC is the type tag for voltage-controlled current sources, so Analog Insydes interprets<br />

VCC as (VC)C and not as a voltage source V(CC). This problem can be easily solved by means of the<br />

Type directive:

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

Saved successfully!

Ooh no, something went wrong!