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.

56 2. Tutorial<br />

In[5]:= flatAmpDyn = ExpandSubcircuits[<br />

commonEmitterAmplifier /.<br />

{supplyVoltage −> 0, inputVoltage −> 1,<br />

BJTModel −> ACdynamic}];<br />

DisplayForm[flatAmpDyn]<br />

Out[6]//DisplayForm=<br />

Netlist Flat, 10 Entries:<br />

V1, 1, 0, 1<br />

VCC, 2, 0, Type VoltageSource, Value 0<br />

R1, 2, 1, R1<br />

R2, 1, 0, R2<br />

RC, 2, 3, RC<br />

RE, 4, 0, RE<br />

RB$Q1, X$Q1, 4, RB<br />

CM$Q1, 1, 3, CM<br />

CC$Q1, 1, X$Q1, 3, 4, beta<br />

RO$Q1, 3, 4, RO<br />

As we can see from the flattened netlists, ExpandSubcircuits has not simply replaced the subcircuit<br />

references by the original netlists from the Model definitions. The function has also generated<br />

unique symbols for all internal reference designators and node identifiers in the subcircuit netlists by<br />

appending a separator character ($) and the subcircuit instance name (Q1) to the original identifiers.<br />

This eliminates possible name conflicts with reference designators from the top-level netlist and<br />

allows for using multiple instances of a subcircuit definition.<br />

Analysis of the Common-Emitter Amplifier<br />

Now we can analyze the circuit by means of the functions CircuitEquations (Section 3.5.1) and<br />

Solve (Section 3.5.4). We start by setting up the modified nodal equations for the simple AC model<br />

from the flattened netlist. Note that we could call CircuitEquations on the Circuit object equally<br />

well. We used ExpandSubcircuits for demonstrating the subcircuit expansion mechanism.

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

Saved successfully!

Ooh no, something went wrong!