Skip to content

Jackieee/cardoon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction
------------

Cardoon is an electronic circuit simulator library/program written in
Python. The initial design was inspired from several ideas in fREEDA
(http://www.freeda.org/) and carrot
(http://vision.lakeheadu.ca/research.html), plus some improvements
that take advantage of the flexibility in Python.

One of the main goals of this project is to obtain a library to
experiment new simulation algorithms/models in interactive mode or in
other python applications. The possibilities for expansion are
endless. Sample session (using ipyhton)::

    In [1]: import cardoon.simulator as cs
    
    In [2]: cs.run_netlist('bias_npn.net')
    ******************************************************
                 Operating point analysis
    ******************************************************
    
     # Test of a transistor device 
    
    Using dense matrices
    
    Number of iterations =  17
    Residual =  5.72923228467e-06
    
     Node      |  Value               | Unit 
    ----------------------------------------
    1          |        3.49950994522 | V
    10         |        11.9158367321 | V
    ...

Following good software engineering practices, the program and the
documentation are being developed at the same time. Thus all
implemented features are documented. Complete documentation for this
project is included with the source and can also be found at:

  http://vision.lakeheadu.ca/cardoon/

A secondary objective is to add features and make the program
efficient enough to be useful for general use, if possible. The
program has already enough functionality to be useful for some
tasks. Currently basic DC/AC/Transient analyses have been
implemented. DC and Transient can use sparse or dense matrices. It can
currently simulate circuits with a few thousand nodes in reasonable
times. As of June 2012, Cardoon is probably the fastest available
Python-based circuit simulator. The program takes approximately 1.7
times the ngspice time to run a transient analysis of the soliton line
circuit (3022 nodes), which is quite good considering it is running on
an interpreter.

The device library includes basic components and several non-trivial
nonlinear models such as Gummel-Poon model for BJTs, EKV 2.6 and
BSIM3v3 for MOSFETs (there is also a memristor model).  Most of the
device models interface should be reasonably stable by now, but some
changes may happen for frequency-defined devices as they become better
supported by the analyses. The noise interface is not being used yet
and may change significantly.

It is likely easier to implement a new device model in Cardoon than it
is on most other simulators. Perhaps the main reason for this is due
to the Python language: the code tends to be more compact and it is
easier to debug and test modifications.  As with other simulators,
nonlinear models can use automatic differentiation for Jacobian
calculation, thus there is no need to write code for the
derivatives. In cardoon, the automatic differentiation library is also
used to speed up the evaluation of nonlinear equations.  Due to the
dynamic nature of the Python language automatic differentiation could
also be used to calculate sensitivities without any modification in
the device model code.  Another design feature is that electro-thermal
models (*i.e.*, with an additional thermal port) can be automatically
generated from temperature-dependent electrical models.

Cardoon is being developed on Debian GNU/Linux, but it is known to
work on MS Windows (using WinPython) and should also work on other
operating systems / distributions.

Comments are welcome!

Carlos Christoffersen <c.christoffersen@ieee.org>


License
-------

Cardoon is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 or later:

  http://www.gnu.org/licenses/gpl-3.0.txt

(See also LICENSE file included with the source)




About

Cardoon Electronic Circuit Simulator

Resources

License

Stars

Watchers

Forks

Packages

No packages published