Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Work on Basic Mathematica Stephen!
Replies: 81   Last Post: Jun 4, 2013 5:59 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Noqsi

Posts: 51
Registered: 12/8/10
Applying Mathematica to practical problems
Posted: May 30, 2013 6:09 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Changing the topic here.

On Tuesday, May 28, 2013 1:49:00 AM UTC-6, Richard Fateman wrote:

> Learning Mathematica (only) exposes a student to a singularly erroneous
> model of computation,


A personal, subjective judgement. However, I would agree that exposing the student to *any* single model of computation, to the exclusion of others, is destructive.

> Nice that you concede it is eccentric.

Concede? I praise its eccentricity! It takes me places other tools cannot easily go.

> Productive perhaps if you do not
> encounter a quirk.


There is no nontrivial quirk-free software.

> Especially a hidden quirk that gives the wrong
> answer but no warning.


Mathematica applied to real problems is pretty good here.

> And if you are not in a hurry for numerical
> results.


OK, let's consider how I use Mathematica in mixed-signal chip design. For my video chain chips, I start with two different approches in Mathematica. I have a nonlinear simulation environment that breaks the chip down into blocks, represented by functions, and composes a function representing the effect of a single clock step on the chip state from these functions. I iterate that function to "simulate". Some of the blocks are initially represented as Z transforms, so Mathematica's algebraic capabilities come in handy. The ease of partial evaluation helps with optimization: by evaluating as much of the function as possible before iterating it, special cases like consta nt inputs become very simple and fast.

I also have a Mathematica model that starts as symbolic Z and Fourier transforms, and models the chip as linear operators. For numerical results, these operators turn into matrices.

Once I've established the design parameters, I reduce the functional blocks to circuits and simulate with that fine Berkeley product, SPICE, the liguafranca of circuit simulation. You think Mathematica has problems? You've never used SPICE.

Linguistically, SPICE is an absolute mess. "Grammar" is utterly ad-hoc, and variable with dialect. "1N914B" is a perfectly good model name for a diode, but "2N2222A" cannot be used to name a transistor model in some dialects. There are a couple of dozen different dialects around, most containing incompatible proprietary extensions.

For quirky unpredictability, SPICE is much, much worse than Mathematica. SPICE users get used to seeing spurious "trap oscillations", large amounts of energy appearing out of nowhere, and ridiculous time steps. Tuning the numerics to get sane results is an arcane art. As a programming language, SPICE is about as sophisticated as BASIC, but much less regular. Nevertheless, SPICE is very widely used and very productive. In the end, people find that it gets the job done (although many get rather exasperated in the process!.

But the big problem with SPICE isn't that it's quirky and error-prone, but that it buries the problem in (mostly irrelevant) detail. I'm simulating thousands of transistors, each with ~100 model parameters, with state changing on picosecond time scales. My SPICE chip simulations tend to run at a billion times slower than real time. Data output is voluminous and difficult to analyze (sometimes I read it into Mathematica for reduction). These problems limit the range of questions I can practically ask of SPICE.

On the other hand, the iterated function approach in Mathematica is 10,000-100,000 times faster than the SPICE approach, so it's a lot better for probing high-level behavior. The linear algebra approach in Mathematica is even faster: bang a few matrices together and it tells me approximately what I'd get from averaging an unlimited number of simulation runs.

Because SPICE is so slow and detailed it's very difficult to use as a design tool, where the question is "I want this behavior, how do I get it?" It'sbetter for design verification: "I have this circuit, how will it behave?". The linear approach in Mathematica is the quickest for design optimization, but of course it can't probe nonlinear phenomena in "large signal" cases. The iterated function approach in Mathematica is a good compromise to bridge the gap.

So, when I have two Mathematica models and a SPICE model that agree that the design will meet requirements, and agree with each other where their capabilities overlap, I release the design to the layout contractor. One result is another SPICE model, extracted from the silicon geometry, for verification. This model is extremely complex, with tens of thousands of "parasitic" resistors and capacitors, but I'll run a few test cases through it before releasing the design to the mask aggregator. So, before any silicon is patterned, I get four fairly independent looks at the design from different viewpoints through two radically different tools.

There are still many things that can go wrong before I have an actual chip powered up and processing video. Some of them involve other software, but they have nothing to do with Mathematica, so I won't go into them here.

The real world simply doesn't work the way you imagine in this case. The design process involves cross checks between multiple tools and models, so few design errors escape detection. Furthermore, I haven't seen any errors attributable to the "quirks" of Mathematica in this process. I, of course, make and (hopefully) correct errors at a rapid pace. SPICE is rather treacherous. But correct and accurate calculation in Mathematica just isn't a problem in this engineering flow.



Date Subject Author
5/12/13
Read Work on Basic Mathematica Stephen!
David Park
5/13/13
Read Re: Work on Basic Mathematica Stephen!
psycho_dad
5/13/13
Read Re: Work on Basic Mathematica Stephen!
psycho_dad
5/14/13
Read Re: Work on Basic Mathematica Stephen!
Nasser Abbasi
5/15/13
Read Re: Work on Basic Mathematica Stephen!
szhorvat@gmail.com
5/16/13
Read Re: Work on Basic Mathematica Stephen!
szhorvat@gmail.com
5/16/13
Read Re: Work on Basic Mathematica Stephen!
Dr. Peter Klamser
5/17/13
Read Re: Work on Basic Mathematica Stephen!
Andrzej Kozlowski
5/17/13
Read Re: Work on Basic Mathematica Stephen!
Murray Eisenberg
5/17/13
Read Re: Work on Basic Mathematica Stephen!
Dr. Peter Klamser
5/18/13
Read Re: Work on Basic Mathematica Stephen!
Dr. Peter Klamser
5/19/13
Read Re: Work on Basic Mathematica Stephen!
Murray Eisenberg
5/19/13
Read Re: Work on Basic Mathematica Stephen!
paulmchale7@gmail.com
5/19/13
Read Re: Work on Basic Mathematica Stephen!
paulmchale7@gmail.com
5/23/13
Read Re: Work on Basic Mathematica Stephen!
szhorvat@gmail.com
5/24/13
Read Re: Work on Basic Mathematica Stephen!
David Park
5/20/13
Read Re: Work on Basic Mathematica Stephen!
Ingolf Dahl
5/20/13
Read Re: Work on Basic Mathematica Stephen!
David Annetts
5/22/13
Read Re: Work on Basic Mathematica Stephen!
mathgroup
5/23/13
Read expanding the use of symbolic computation in engineering .. was Re:
Richard Fateman
5/24/13
Read Re: expanding the use of symbolic computation in engineering .. was Re:
W. Craig Carter
5/23/13
Read Re: Work on Basic Mathematica Stephen!
David Park
5/23/13
Read Re: Work on Basic Mathematica Stephen!
mathgroup
5/24/13
Read Re: Work on Basic Mathematica Stephen!
Richard Fateman
5/25/13
Read Re: Work on Basic Mathematica Stephen!
David Park
5/25/13
Read Re: Work on Basic Mathematica Stephen!
Richard Fateman
5/25/13
Read Re: Work on Basic Mathematica Stephen!
David Park
5/28/13
Read Re: Work on Basic Mathematica Stephen!
Alexei Boulbitch
5/28/13
Read Re: Work on Basic Mathematica Stephen!
Alexei Boulbitch
6/4/13
Read Re: Work on Basic Mathematica Stephen!
Bill Rowe
5/24/13
Read Re: Work on Basic Mathematica Stephen!
David Park
5/27/13
Read Re: Warsaw Univ. course, was Re: Work on Basic Mathematica Stephen!
Noqsi
5/28/13
Read Re: Warsaw Univ. course, was Re: Work on Basic Mathematica Stephen!
Richard Fateman
5/31/13
Read Re: Warsaw Univ. course, was Re: Work on Basic Mathematica Stephen!
David Bailey
6/1/13
Read Re: Warsaw Univ. course, was Re: Work on Basic Mathematica Stephen!
Richard Fateman
6/2/13
Read Re: Warsaw Univ. course, was Re: Work on Basic Mathematica Stephen!
David Bailey
6/3/13
Read Re: Warsaw Univ. course, was Re: Work on Basic Mathematica Stephen!
Richard Fateman
6/3/13
Read Re: Warsaw Univ. course, was Re: Work on Basic Mathematica Stephen!
David Bailey
6/4/13
Read Re: Warsaw Univ. course, was Re: Work on Basic Mathematica Stephen!
Andrzej Kozlowski
5/29/13
Read Re: Warsaw Univ. course, was Re: Work on Basic Mathematica Stephen!
fd
5/30/13
Read Applying Mathematica to practical problems
Noqsi
5/31/13
Read Re: Applying Mathematica to practical problems
Richard Fateman
5/31/13
Read Re: Applying Mathematica to practical problems
Kevin J. McCann
5/31/13
Read Re: Applying Mathematica to practical problems
Andrzej Kozlowski
6/1/13
Read Re: Applying Mathematica to practical problems
Richard Fateman
6/1/13
Read Re: Applying Mathematica to practical problems
Richard Fateman
6/2/13
Read Re: Applying Mathematica to practical problems
Andrzej Kozlowski
6/3/13
Read Re: Applying Mathematica to practical problems
Richard Fateman
6/3/13
Read Re: Applying Mathematica to practical problems
Andrzej Kozlowski
6/1/13
Read Mathematica numerics and... Re: Applying Mathematica to practical problems
Daniel Lichtblau
6/2/13
Read Interval vs default, was Re: Mathematica numerics and... Re: Applying
Richard Fateman
6/2/13
Read Re: Applying Mathematica to practical problems
James Stein
6/3/13
Read Re: Applying Mathematica to practical problems
waku
6/3/13
Read Re: Interval vs default, was Re: Mathematica numerics and... Re: Applying
Daniel Lichtblau
5/27/13
Read Re: Work on Basic Mathematica Stephen!
Noqsi
6/2/13
Read Re: Work on Basic Mathematica Stephen!
David Bailey
5/28/13
Read Re: Work on Basic Mathematica Stephen!
fd
5/31/13
Read Re: Work on Basic Mathematica Stephen!
David Bailey
5/28/13
Read Re: Work on Basic Mathematica Stephen!
fd
6/2/13
Read Re: Applying Mathematica to practical problems
Mark McClure
6/3/13
Read Re: Applying Mathematica to practical problems
Richard Fateman
6/3/13
Read Re: Applying Mathematica to practical problems
Joseph Gwinn
6/3/13
Read Re: Warsaw Univ. course, was Re: Work on Basic
lshifr@gmail.com
6/3/13
Read Re: Warsaw Univ. course, was Re: Work on Basic
lshifr@gmail.com

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.