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.

54 2. Tutorial<br />

In[2]:= commonEmitterAmplifier=<br />

Circuit[<br />

Netlist[<br />

{V1, {1, 0}, inputVoltage},<br />

{VCC, {2, 0}, Type −> VoltageSource,<br />

Value −> supplyVoltage},<br />

{R1, {2, 1}, R1},<br />

{R2, {1, 0}, R2},<br />

{RC, {2, 3}, RC},<br />

{RE, {4, 0}, RE},<br />

{Q1, {1 −> "B", 3 −> "C", 4 −> "E"},<br />

Model −> NPNTransistor, Selector −> BJTModel}<br />

],<br />

Model[<br />

Name −> NPNTransistor,<br />

Selector −> ACsimple,<br />

Ports −> {"B", "C", "E"},<br />

Definition −><br />

Netlist[<br />

{RB, {"X", "E"}, RB},<br />

{CC, {"B", "X", "C", "E"}, beta}<br />

]<br />

],<br />

Model[<br />

Name −> NPNTransistor,<br />

Selector −> ACdynamic,<br />

Ports −> {"B", "C", "E"},<br />

Definition −><br />

Netlist[<br />

{RB, {"X", "E"}, RB},<br />

{CM, {"B", "C"}, CM},<br />

{CC, {"B", "X", "C", "E"}, beta},<br />

{RO, {"C", "E"}, RO}<br />

]<br />

]<br />

]<br />

Out[2]= Circuit <br />

Note that in the top-level netlist of this circuit description we used a generic subcircuit selector<br />

BJTModel and not ACsimple or ACdynamic. This allows us to select the model at run time by<br />

replacing BJTModel with ACsimple or ACdynamic just before the subcircuit hierarchy is expanded.<br />

In addition, for reasons which will become apparent in the next section, we have used the variables<br />

inputVoltage and supplyVoltage to denote the values of the voltage sources V1 and VCC.<br />

Remember that the Type directive in the value field of VCC prevents Analog Insydes from falsely interpreting<br />

the netlist entry as belonging to a voltage-controlled current source.

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

Saved successfully!

Ooh no, something went wrong!