Documentation /  Analog Insydes /  Tutorial /  Setting up and Solving Circuit Equations /

ContentsCircuit Equations

2.4.1 Naming Conventions

Automatically Generated Voltage and Current Identifiers

From the small circuit analysis examples already presented in the previous chapters you will have noticed that Analog Insydes automatically creates variables for voltages and currents when setting up circuit equations from a netlist. In order to interpret the equations correctly you need to know everything about the identifier naming scheme employed by Analog Insydes.

By default, identifiers for branch voltages and currents associated with two-terminal elements are generated by attaching the prefixes V$ and I$ to the reference designator (Section 3.1.3) of the corresponding circuit element, respectively. For instance, the branch voltage across and branch current through a resistor R1 would be named V$R1 and I$R1.

Similarly, identifiers for node voltages are generated by prefixing the node names with the tag V$, so the node voltage at node 1 would be named V$1. Although the prefix is used for branch voltages you will not experience any name clashes among branch and node voltage identifiers, provided that your netlists do not contain any symbolic node identifiers (Section 3.1.3) which are identical to some reference designators. However, if you would rather like different prefixes to be used for branch and node voltages then read the following sections to learn how to change the standard settings.

In the case of a controlled source we need to distinguish between the voltages and currents at the controlling and at the controlled branch. While the latter quantities are given names according to the same convention as applied to two-terminal elements, controlling voltages and currents are marked with the prefixes VC$ and IC$. For example, the voltage across and current through the controlled branch of a controlled source VC1 would be called V$VC1 and I$VC1 whereas the corresponding quantities at the controlling branch would be called VC$VC1 and IC$VC1.

Changing the Default Identifier Prefixes

All identifier prefix settings can be customized by changing the corresponding option. The current option settings can be displayed using the command Options[CircuitEquations] and can be changed using the Mathematica command SetOptions. For instance, the command

SetOptions[CircuitEquations, BranchVoltagePrefix -> "E$"]

would change the prefix used for branch voltages from V$ to E$. The names of the prefix options and their default settings are listed below.

NodeVoltagePrefix -> "V$"

BranchVoltagePrefix -> "V$"

BranchCurrentPrefix -> "I$"

ControllingVoltagePrefix -> "VC$"

ControllingCurrentPrefix -> "IC$"

The values of all these options must be strings which can be converted to a single symbol by means of the command ToExpression. Strings such as "V_" or "@I" cannot be converted to valid symbols and may therefore not be used for this purpose.

Changing the Instance Name Separator for Reference Designators

Related to the identifier prefix options is the option InstanceNameSeparator. This option determines the character (or string) which Analog Insydes uses to separate name components of reference designators generated for instantiated subcircuit elements. With the default setting

InstanceNameSeparator -> "$"

a resistor RB in a subcircuit instance Q1 would be named RB$Q1. Using SetOptions you can change the separator character to (almost) anything you like, with the same restrictions that apply to the choice of the prefix options.

ContentsCircuit Equations