spice internals

F

Fernan Bolando

Guest
Hi

I'm trying to understand how circuit simulators work. I was just reading
the vbic model and was wondering how it is implimented in spice. I tried
reading the source for ng-spice and gnucap, But I am a long way from
understanding it. When you use a bjt in your netlist does that mean
spice will expand the bjt into it's corresponding equivalent circuit and
add it into your netlist? Which means there would be additional nodes
that will be added into the addmitance matrix. Also in the vbic model
what does a charge source do? should i consider that as a voltage
source?

thanks and regards
,Fernan
 
Fernan Bolando wrote:
Hi

I'm trying to understand how circuit simulators work. I was just reading
the vbic model and was wondering how it is implimented in spice. I tried
reading the source for ng-spice and gnucap, But I am a long way from
understanding it. When you use a bjt in your netlist does that mean
spice will expand the bjt into it's corresponding equivalent circuit and
add it into your netlist? Which means there would be additional nodes
that will be added into the addmitance matrix. Also in the vbic model
what does a charge source do? should i consider that as a voltage
source?
It depends. Main part of spice is modified admitance matrix.
See http://web.doe.carleton.ca/~pavan/5506/resources/notes-set1.pdf.
BJT (see bjtload.c) in OP analyse loads values into adm. matrix for
these small timesteps (these are really dynamic admittances). It also
loads RHS with independent sources if needed.
For example charge storage in PN junction is "decoupled" into system
by supplying dynamic admitance C/delta and excitation current Q/delta
and doing numerical solver step.
In AC the matrix is used to find DC OP and then is reloaded by
linearized small signal data (bjtacld.c) which can be used to sweep
omega. Matrix is complex then...

devik
 
In article <c0ee9o$2cg6$1@ns.felk.cvut.cz>, Martin Devera wrote:
Fernan Bolando wrote:
Hi

I'm trying to understand how circuit simulators work. I was just reading
the vbic model and was wondering how it is implimented in spice. I tried
reading the source for ng-spice and gnucap, But I am a long way from
understanding it. When you use a bjt in your netlist does that mean
spice will expand the bjt into it's corresponding equivalent circuit and
add it into your netlist? Which means there would be additional nodes
that will be added into the addmitance matrix. Also in the vbic model
what does a charge source do? should i consider that as a voltage
source?

It depends. Main part of spice is modified admitance matrix.
See http://web.doe.carleton.ca/~pavan/5506/resources/notes-set1.pdf.
BJT (see bjtload.c) in OP analyse loads values into adm. matrix for
these small timesteps (these are really dynamic admittances). It also
loads RHS with independent sources if needed.
So basically when you add a bjt into the netlist, spice expands it
into it's equivalent circuit composed of voltage dependent current
sources and junction capacitors, and then extracts the admittance from
the netlist and adds them into the matrix.

if for example spice uses a simple ebers-mole model to duplicate the bjt
and for example that spice has a basic diode model.

with a netlist like

Q1 1 2 0 qeb-model
R1 1 3 1k
V1 3 0 1V
R2 2 0 1k


spice will exapand it to

D1 1 2a Debmodel <--- 2a internal diode of eber mole
D2 0 2b Debmodel <--- 2b internal diode of ebermole emitter side
R1 1 3 1k
V1 3 0 1v
R2 2 0 1k


and then spice will proceed to get the admittance matrix? is this
correct? and the only difference with using gummel-poon or vbic is
spice expands it into a network of VCC instead of a simple two diode
network.



For example charge storage in PN junction is "decoupled" into system
by supplying dynamic admitance C/delta and excitation current Q/delta
and doing numerical solver step.
In AC the matrix is used to find DC OP and then is reloaded by
linearized small signal data (bjtacld.c) which can be used to sweep
omega. Matrix is complex then...

devik
,Fernan
 

Welcome to EDABoard.com

Sponsor

Back
Top