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.

96 2. Tutorial<br />

2.6.3 Referencing Behavioral Models<br />

Behavioral models are referenced exactly like subcircuits. Since we have already learned in Chapter 2.3<br />

how to write hierarchical netlists we can start immediately with an example. Let’s write a netlist for<br />

the diode circuit in Figure 6.3 using the diode model developed above.<br />

1<br />

R1<br />

V0<br />

2<br />

D1<br />

Figure 6.3: Diode circuit<br />

In[4]:= diodeNetwork =<br />

Circuit[<br />

Netlist[<br />

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

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

{D1, {2 −> A, 0 −> C},<br />

Model −> Diode,<br />

Selector −> DC}<br />

],<br />

Model[<br />

Name −> Diode,<br />

Selector −> DC,<br />

Ports −> {A, C},<br />

Parameters −> {Is, Global[Vt]},<br />

Variables −> {Current[A, C], Voltage[A, C]},<br />

Definition −><br />

Equations[<br />

Current[A, C] == Is (Exp[Voltage[A, C]/Vt] − 1)<br />

]<br />

]<br />

]<br />

Out[4]= Circuit <br />

2.6.4 Nonlinear Circuit Equations<br />

Setting up Nonlinear Equations<br />

Using the command CircuitEquations you can set up modified nodal or sparse tableau equations<br />

for nonlinear circuits just as for linear circuits. The only restriction is that nonlinear systems of

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

Saved successfully!

Ooh no, something went wrong!