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.

3.2 Subcircuit and Device Model Definition 209<br />

A differential pair with<br />

emitter degeneration<br />

resistors.<br />

This netlist describes a<br />

differential amplifier on<br />

the basis of the subcircuit<br />

implemented above.<br />

Set up circuit equations.<br />

In[8]:= dpwedr = Subcircuit[<br />

Name −> "DifferentialPair", Selector −> "DeviceLevel",<br />

Ports −> {"H1", "H2", "IN1", "IN2", "L"},<br />

Parameters −> {Area, RED},<br />

Definition −> Circuit[<br />

Netlist[<br />

{"Q1", {"H1" −> "C", "IN1" −> "B", "ED1" −> "E"},<br />

Model −> "BJT", Selector −> Selector["BJT", "Q1"],<br />

Parameters −> "LocalNPN"},<br />

{"RED1", {"ED1", "L"}, RED},<br />

{"Q2", {"H2" −> "C", "IN2" −> "B", "ED2" −> "E"},<br />

Model −> "BJT", Selector −> Selector["BJT", "Q2"],<br />

Parameters −> "LocalNPN"},<br />

{"RED2", {"ED2", "L"}, RED}<br />

],<br />

ModelParameters[Name −> "LocalNPN", Type −> "NPN",<br />

IS −> 2.*^−15, BF −> 200., RC −> 50./Area,<br />

RE −> 2./Area]<br />

]<br />

]<br />

Out[8]=<br />

SubcircuitDifferentialPair, DeviceLevel, 5 <br />

In[9]:= diffamp = Circuit[<br />

Netlist[<br />

{V0, {"VCC", 0}, Value −> {DC −> 9., _ −> 0}},<br />

{V1, {2, 0}, Value −> {DC −> 4.5, AC −> 1}},<br />

{V2, {3, 0}, Value −> {DC −> 4.5, AC −> 0}},<br />

{R1, {"VCC", 4}, 5000.},<br />

{R2, {"VCC", 5}, 5000.},<br />

{DP1, {4 −> "H1", 5 −> "H2", 2 −> "IN1",<br />

3 −> "IN2", 6 −> "L"},<br />

Model −> "DifferentialPair",<br />

Selector −> "DeviceLevel",<br />

RED −> 100., Area −> 2.},<br />

{IBIAS, {6, 0}, Value −> {DC −> 0.001, _ −> 0}}<br />

],<br />

dpwedr<br />

]<br />

Out[9]= Circuit <br />

In[10]:= diffampeqs = CircuitEquations[diffamp,<br />

AnalysisMode −> DC, ElementValues −> Symbolic]<br />

Out[10]= DAEDC, 25 25 <br />

The nominal collector and<br />

emitter resistances have<br />

been divided by the area<br />

factor.<br />

In[11]:= {RC$Q1$DP1, RE$Q1$DP1} /. GetDesignPoint[diffampeqs]<br />

Out[11]= 25., 1.<br />

The following code is a slightly more complex example for a behavioral model definition. The<br />

Model statement implements a nonlinear DC model for a bipolar junction diode, taking into account<br />

junction voltage reduction due to series resistance (Rs) and DC convergence issues (GMIN).

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

Saved successfully!

Ooh no, something went wrong!