[dorkbotdc-blabber] MATLAB Circuit Simulation and Analysis

Tim Slagle tim at slagle.org
Wed Apr 1 18:49:40 EDT 2009


For commercial users, MATLAB is $2K per license and Simulink is $3K.  Annual support is $350 for MATLAB and $540 for Simulink.  And then they soak you for each add-on package, $1K for MATLAB tookboxes and $2K for Simulink (including SimElectronics).  It was definitely worth it for my company because MATLAB really boosted productivity for high-salaried research types, but then when you need to have all the techs and engineers running their own license for the chip test system you put together it adds up pretty fast.  Now there are great free numerical and plotting libraries in Python which can do a lot of what MATLAB does if you are starting without an existing code base or deep pockets.  No sense learning to use a tool you can't afford once you can't use the student discount version...

It would be interesting to know what sort of free SPICE packages there are, I know about LTspice:
  http://www.linear.com/designtools/software/
and I used various free versions of Berkeley SPICE when doing chip simulations in grad school back in the dark ages.  There are some cool-looking visual circuit simulators out there now, the ones aimed at students are $hundreds and others are $thousands.  If there is interest I can go through my bookmarks and send out a list. 
--Tim





________________________________
From: Andrew Q Righter <q at theqlabs.com>
To: dorkbotdc-blabber at dorkbot.org
Cc: HacDC Public Discussion <blabber at hacdc.org>
Sent: Wednesday, April 1, 2009 6:19:31 PM
Subject: Re: [dorkbotdc-blabber] MATLAB Circuit Simulation and Analysis

Thanks Tim and Mike! I think I will stick with SPICE then for the circuit simulation and analysis portions.

I am currently running student versions of MATLAB with Simulink and Simscape. Simulink+Simscape offers a nice size library of components to build models of circuits and such so it looked to me like it could be promising, but now I'm not so sure what the benefits of using MATLAB's Simscape system simulation version SPICE or, from what I read, I'm thinking it's two different tasks to tackle.


On Wed, Apr 1, 2009 at 4:01 PM, Tim Slagle <tim at slagle.org> wrote:


MATLAB is great for image processing or matrix math because it has the built-in syntax and libraries to make the source code very compact - just like writing the equations down.  It is interpreted so you pay a price in execution speed for simple loops that don't use the vector libraries.  Recent MATLAB versions have added a just-in-time compiler to make loops and such run faster, and that has boosted the speed a lot for people who write code C or FORTRAN style instead of using the vectorization.  But considering the cost of the package, unless you will take advantage of the libraries you'd probably better off using C/C++ if you are already comfortable with them.

MATLAB also has support for sparse matrices, although I haven't used that feature.  If you look at a circuit as a vector of nodes and the interconnections between nodes as a matrix, most of the matrix elements would be zero (no connection).  So sparse matrices can save memory in big circuits, and I think SPICE uses sparse matrix solvers internally.  But as far as I know there are no built-in or add-on packages for circuit simulation in MATLAB, at least through the MathWorks.

There is also a sister package Simulink that is typically used for control theory and system simulation, and it is better for time-sequential computations.  You can model your system by drawing block diagrams and then write code for each block's functions.  And, there is a SimElectronics add-on for it.  But Simulink is even more expensive than MATLAB.  (They are independent products although I'm sure you can go back and forth).
--Tim




----- Original Message ----
> From: Mike O'Dell <mo at ccr.org>
> To: dorkbotdc-blabber at dorkbot.org
> Cc: HacDC Public Discussion <blabber at hacdc.org>
> Sent: Wednesday, April 1, 2009 2:38:34 PM
> Subject: Re: [dorkbotdc-blabber] MATLAB Circuit Simulation and Analysis
>
> that sure sounds more like SPICE than Matlab
>
> based on my (admittedly thin) experience, Matlab excels at
> jobs where closed-form analytic solutions exist, ideally in
> matrix form. Signal processing and control theory come to
> mind as natural fits. While one can formulate DC circuits
> in such forms, it's a lot more natural to do it in SPICE
> since the input form is a transliteration of the schematic.
>
> i'd be interested to find out that similar facilities exist
> for Matlab, but in my experience, Matlab is for system
> dynamics (control loops) and SPICE is for circuit dynamics.
>
>      -mo
> ........................................................................
> .......dorkbot dc: people doing strange things with electricity.........
> ................... http://dorkbot.org/dorkbotdc .......................
> ...................   SUBSCRIPTION MANAGEMENT    .......................
> ........ http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber ........
> ........................................................................

........................................................................
.......dorkbot dc: people doing strange things with electricity.........
................... http://dorkbot.org/dorkbotdc .......................
...................   SUBSCRIPTION MANAGEMENT    .......................
........ http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber ........
........................................................................



-- 
Andrew Q Righter
q at theqlabs.com

Founder: The Q Labs
CoFounder: HacDC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://music.columbia.edu/pipermail/dorkbotdc-blabber/attachments/20090401/f3741c72/attachment.html


More information about the dorkbotdc-blabber mailing list