## Happenings – 2012 Jun 2

What’s been happening?

Earthquakes – of magnitude 2.5 or greater, in the Bay Area? None at all this past week, so the total ends at 11 for the month of May.

I’ll explain the following picture in just a moment, but I assure you it is not a record of a seismic event.

A technical post last Monday? Nope, not this past week. For one thing, a couple of my “proofs” were only suggestive rather than accurate – that’s a gentle way of saying they weren’t actually right. And that’s a euphemism for “they were wrong!”

For another thing, I saw a couple of other facts I wanted to add. Anyway, the post that should have gone out last Monday is almost ready to go this Monday – I need one more picture, perhaps a couple of links, and final edits.

I also spent a fair bit of time on Mathematica® itself.

While playing around with elementary control theory in version 8, I used one of the control theory commands, “output response”, to see the response of a second-order system to a unit step input. That is, I asked for the time-domain response of this transfer function to a unit step input:

(I set $k = \tau = 1\$, and $\zeta = 2, 3, 4\$.)

And what I got was the opening screen shot. It looks like the systems have bifurcations to chaotic behavior.

Nonsense. These are damped second order linear ODEs.

… and I can get it just by simplifying the answers (from “output response”) before I plot them. On the other hand, no “simplify” command was required in the now–replaced “control system professional” – believe me, I went back and checked.

Incidentally, the problem occurs only for $\zeta = 3\$, of the 3 integers (2, 3, 4) which I tried – but I don’t care how widespread the problem is… once is enough.

Furthermore, doing it the old-fashioned way – simply plotting the inverse Laplace transform – works just fine.

Okay… it was finally time to upgrade to Mathematica version 8.0.4.

It didn’t help.

And the upgrade takes a little time… because I insist on editing “MenuSetup.tr” to set “apple–u” as a keystroke to underscore text, as apple-b and apple-i are bold and italic. And I never remember where the file is. (This time I made a note.)

If you decide to edit that file yourself, make damn sure you have an untouched copy – because if you make a mistake in it, Mathematica may not run: it may not be able to display its menu!

Anyway, I think I’ve decided that for the mathematics of control theory in general, I will stay with the older and more direct Mathematica commands, such as the Inverse Laplace Transform. I will reserve such things as “output response” for specific numerical transfer functions or state space models. And keep my fingers crossed.

A byproduct of upgrading to 8.0.4 is that I got to consider CDF – i.e. computable document format. I had seen that there was a WordPress plug-in for it.

Unfortunately, I can’t use the plug-in while I am hosted by WordPress itself. If I choose to host this blog elsewhere, and use the WordPress software, then I can use the plug-in, and then I could have interactive Mathematica output in my posts.

But cool as that sounds, I’m not ready to leave WordPress.com .

I also considered another alternative.

I have long been used to printing PDFs on my Macintosh… it’s just a variant of the print command.

Well, WordPress will let me upload PDFs. Could I simply replace my laboriously constructed posts – inserting screenshots is still very time-consuming – by a PDF?

No…

I can upload one… the problem is that clicking on a link to it downloads the PDF. I can’t seem to display the PDF as a post.

I also found a graphics command that I didn’t know about: stream plot.

It’s not perfect, but it’s a significant improvement over vector plot. Actually, “significant improvement” is a serious understatement – the vector plot command has missed all the interesting detail:

And with that, it’s time for math.

Posted in diary. 4 Comments »

### 4 Responses to “Happenings – 2012 Jun 2”

1. rip Says:

OK, I’ve been playing with a transfer function / state space model for a CSTR – continuous stirred tank reactor – and it’s clear that //Simplify should be automatic after asking for OutputResponse. The mess had more to do with the numerical solution than with the general equation being specialized.

2. Ed Mendes Says:

I am experiencing quite a bit of problems when using OutputResponse. Even though the system is stable, the step response calculated by OutputResponse goes to infinity.

• rip Says:

hi ed,

exactly what is the system, and what is the input?

Nevermind, i found your example on the Mathematica newsgroup. Let me look at it.

• rip Says:

Hi Ed,

the problem is with Output Response – i don’t know why… Simplify didn’t seem to help – but if i compute and plot the inverse Laplace transform (for a unit step input), everything looks fine.