Electronics Computer-Aided Design Questions about Modified Nodal Analysis

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Questions about Modified Nodal Analysis Dilips 11-23-06
Posted by Dilips on November 23, 2006, 12:43 am
Please log in for more thread options


Hello Everybody,

Can you please help me out with a few answers about modified nodal
analysis.
I have read the book by Kishore Singhal and Vlach.
1. Does MNA(modified nodal analysis) solve non-linear circuits too?
inlcuding a transistor?
2. Where can I get a Code C++ or matlab for the MNA procedure.(where i
can input a circuit netlist and get the matrix)
3. will the matrix formed by MNA be in symbolic form or will it be in
the form of numbers?

Any help will be greatly appreciated.
Thanks,

Dilip


Posted by Andrew Tweddle on November 23, 2006, 9:37 pm
Please log in for more thread options


Dilips wrote:

> Hello Everybody,
>
> Can you please help me out with a few answers about modified nodal
> analysis.
> I have read the book by Kishore Singhal and Vlach.
> 1. Does MNA(modified nodal analysis) solve non-linear circuits too?
> inlcuding a transistor?
> 2. Where can I get a Code C++ or matlab for the MNA procedure.(where i
> can input a circuit netlist and get the matrix)
> 3. will the matrix formed by MNA be in symbolic form or will it be in
> the form of numbers?
>
> Any help will be greatly appreciated.
> Thanks,
>
> Dilip
>
The public domain SPICE source code was originally written in Fortran.
If you look say, in the ASME website you can find the different
versions. Later code is C generated from passing this code with
additions through a Fortran to C preprocessor. It is almost entirely
un-readable IMHO. From this you should be able to answer your various
questions. IMHO the stuff should be rewritten (that is the core code) in
a more readable format and then made into an open source project. I
could suggest using regular expressions to make the parser work a bit
better. The matrix solver could be reworked for more performance. Doing
this sort of stuff could benefit the whole SPICE community. As it is all
modifications seem to be hidden inside commercial software. Improvements
like better dealing with RF modelling would then trickle down to the
users of the cheap packages. As it is a good RF package runs a bare
minimum of $1000US ex. Microwave Office, Eagleware Genesys, Agilent ADS.
As it is SPICE class modifications which can do 2D EM modelling would be
really cool to add IMHO. This stuff in Microwave Office for IC design
runs up to big dollars.

Good Luck in your Endeavours!
Andrew

Posted by Dilips on November 23, 2006, 11:19 pm
Please log in for more thread options


Thanks for the comment Andrew.
Yes, I am actually trying to write the MNA in C++ myself.
I am writing it as part of a tool I am creating which can predict about
simulation.
Though it is not a great tool, its just part of my research.

Thank you for your reply,
Dilip

Andrew Tweddle wrote:
> Dilips wrote:
>
> > Hello Everybody,
> >
> > Can you please help me out with a few answers about modified nodal
> > analysis.
> > I have read the book by Kishore Singhal and Vlach.
> > 1. Does MNA(modified nodal analysis) solve non-linear circuits too?
> > inlcuding a transistor?
> > 2. Where can I get a Code C++ or matlab for the MNA procedure.(where i
> > can input a circuit netlist and get the matrix)
> > 3. will the matrix formed by MNA be in symbolic form or will it be in
> > the form of numbers?
> >
> > Any help will be greatly appreciated.
> > Thanks,
> >
> > Dilip
> >
> The public domain SPICE source code was originally written in Fortran.
> If you look say, in the ASME website you can find the different
> versions. Later code is C generated from passing this code with
> additions through a Fortran to C preprocessor. It is almost entirely
> un-readable IMHO. From this you should be able to answer your various
> questions. IMHO the stuff should be rewritten (that is the core code) in
> a more readable format and then made into an open source project. I
> could suggest using regular expressions to make the parser work a bit
> better. The matrix solver could be reworked for more performance. Doing
> this sort of stuff could benefit the whole SPICE community. As it is all
> modifications seem to be hidden inside commercial software. Improvements
> like better dealing with RF modelling would then trickle down to the
> users of the cheap packages. As it is a good RF package runs a bare
> minimum of $1000US ex. Microwave Office, Eagleware Genesys, Agilent ADS.
> As it is SPICE class modifications which can do 2D EM modelling would be
> really cool to add IMHO. This stuff in Microwave Office for IC design
> runs up to big dollars.
>
> Good Luck in your Endeavours!
> Andrew


Posted by Joel Kolstad on November 28, 2006, 8:14 pm
Please log in for more thread options


> I have read the book by Kishore Singhal and Vlach.
> 1. Does MNA(modified nodal analysis) solve non-linear circuits too?
> inlcuding a transistor?

It's part of the solution: Solving an MNA matrix becomes the inner part of a
loop that attempts to figure out the correct bias point of all your non-linear
devices. From that bias point, you generate an MNA matrix using the
linearized equations describing your non-linear device. The "loop" is just
Newton-Raphson iteration... applied to the MNA matrix (recall that "regular"
Newton-Raphson is a method for solving an arbitrary equation f(x)=y -- which
is often non-linear -- using only linear methods).

> 2. Where can I get a Code C++ or matlab for the MNA procedure.(where i
> can input a circuit netlist and get the matrix)

Hmm... I'm not sure, although I can tell you that in the class I took on
circuit simulators, we all wrote our own and it didn't take too long to do so
(it was something like... week 1... write the parser for the netlist, week 2
get it to work with DC sources and RLCs, week 3 get it to work with dependent
sources and AC, week 4 add a diode and a transistor, week 5 add transient
analysis, etc.). You were allowed to use your programming language of choice,
and since at the time almost everyone was using C I decided to be different
and used "legitimate" object-oriented C++ for mine, although I was sorely
tempted to use Matlab instead (the main reason I didn't is because we used the
a public-domain sparse matrix package written in C that not only handled all
the memory management for you but solved Ax=b as well... nice! ...although
Matlab has sparse matrix support built-in, it still would have been a bit more
work.)

The class was taught by Dr. Karti Mayaram, who definitely knew what he was
talking about (not to mention being a nice guy). Hmm... looks like he's
teaching it this quarter as well, here's the web page:
http://web.engr.oregonstate.edu/~karti/ece521.html . Some of the student
projects were quite impressive... I just did some lame circuit modelling
stuff, but others implemented fancy things like harmonic balance simulators.

> 3. will the matrix formed by MNA be in symbolic form or will it be in
> the form of numbers?

Numbers. Conceptually you can use the symbolic form, but even with a powerful
computer algebra system such as the one in Maple or Mathematica, in most cases
you won't be able to derive a closed-form solution for anything but trivial
circuits.

---Joel



Posted by Robert on November 29, 2006, 2:29 am
Please log in for more thread options



>> I have read the book by Kishore Singhal and Vlach.
>> 1. Does MNA(modified nodal analysis) solve non-linear circuits too?
>> inlcuding a transistor?
>
> It's part of the solution: Solving an MNA matrix becomes the inner part of
> a loop that attempts to figure out the correct bias point of all your
> non-linear devices. From that bias point, you generate an MNA matrix
> using the linearized equations describing your non-linear device. The
> "loop" is just Newton-Raphson iteration... applied to the MNA matrix
> (recall that "regular" Newton-Raphson is a method for solving an arbitrary
> equation f(x)=y -- which is often non-linear -- using only linear
> methods).
>
>> 2. Where can I get a Code C++ or matlab for the MNA procedure.(where i
>> can input a circuit netlist and get the matrix)
>
> Hmm... I'm not sure, although I can tell you that in the class I took on
> circuit simulators, we all wrote our own and it didn't take too long to do
> so (it was something like... week 1... write the parser for the netlist,
> week 2 get it to work with DC sources and RLCs, week 3 get it to work with
> dependent sources and AC, week 4 add a diode and a transistor, week 5 add
> transient analysis, etc.). You were allowed to use your programming
> language of choice, and since at the time almost everyone was using C I
> decided to be different and used "legitimate" object-oriented C++ for
> mine, although I was sorely tempted to use Matlab instead (the main reason
> I didn't is because we used the a public-domain sparse matrix package
> written in C that not only handled all the memory management for you but
> solved Ax=b as well... nice! ...although Matlab has sparse matrix support
> built-in, it still would have been a bit more work.)
>
> The class was taught by Dr. Karti Mayaram, who definitely knew what he was
> talking about (not to mention being a nice guy). Hmm... looks like he's
> teaching it this quarter as well, here's the web page:
> http://web.engr.oregonstate.edu/~karti/ece521.html . Some of the student
> projects were quite impressive... I just did some lame circuit modelling
> stuff, but others implemented fancy things like harmonic balance
> simulators.
>
>> 3. will the matrix formed by MNA be in symbolic form or will it be in
>> the form of numbers?
>
> Numbers. Conceptually you can use the symbolic form, but even with a
> powerful computer algebra system such as the one in Maple or Mathematica,
> in most cases you won't be able to derive a closed-form solution for
> anything but trivial circuits.
>
> ---Joel

As I vaguely remember from the class I took, there were other, more recent,
algorithms for Non-Linear Equations as well as the standard Newton-Raphson.
But it was hard to beat Newton-Raphson for speed and robustness. Though as I
understand it has connections to Dynamical Systems and Chaos.

Robert



Similar ThreadsPosted
Questions about Modified Nodal Analysis November 23, 2006, 12:43 am
LT SPICE Questions July 31, 2004, 12:05 am
Eagle Cad questions January 29, 2005, 3:46 pm
New CAD design questions. July 1, 2007, 12:36 pm
Drawing questions April 3, 2008, 7:29 pm
Newbie Easytrax Questions March 9, 2005, 11:00 pm
SwitcherCAD III questions & tutorial September 16, 2005, 4:19 pm
Hspice "multijob" questions.... September 18, 2005, 5:41 pm
Hspice "multijob" questions.... September 18, 2005, 5:42 pm
Schematic capture and digital circuit simulation questions June 7, 2005, 2:23 pm
PCB Thermal Analysis January 31, 2008, 12:27 pm
hspice parametric analysis January 2, 2006, 3:36 pm
Trouble with PSPice MC analysis August 1, 2006, 6:59 am
BSIM3 to hand analysis link July 11, 2004, 3:46 pm
speed of tran analysis in SPICE3 September 20, 2005, 11:48 am