[dorkbotdc-blabber] MATLAB Circuit Simulation and Analysis
Thomas Edwards
tedwards at gmail.com
Wed Apr 1 18:37:25 EDT 2009
The various SPICEs are definitely the "pro way" to do analog circuit
simulation, but probably overkill for someone who just wants to learn
simple stuff. Plus entering all those net lists is a pain.
You may want to try QUCS, which has a nice GUI to build circuits and
then you can do DC and time-domain analysis:
http://qucs.sourceforge.net/screenshots.html
It is open source. There are Win32 binaries on Sourceforge and OS X
binaries in Darwin Ports.
-Thomas
http://www.t11s.com
2009/4/1 Andrew Q Righter <q at theqlabs.com>:
> 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
>
>
> ........................................................................
> .......dorkbot dc: people doing strange things with electricity.........
> ................... http://dorkbot.org/dorkbotdc .......................
> ................... SUBSCRIPTION MANAGEMENT .......................
> ........ http://dorkbot.org/mailman/listinfo/dorkbotdc-blabber ........
> ........................................................................
>
More information about the dorkbotdc-blabber
mailing list