My general question in control theory was: should I work thru some ancient classical design problems, as they do, with root-locus, nyquist, Nichols, and bode plots? As a minor issue, I would need to select examples from among a few books. But the design methodology appeared to be: use frequency domain analysis to estimate control system parameter values which would lead to a desirable time-domain response of the system.

It occurred to me that my computer and Mathematica® are powerful enough to show the time-domain response in real time.

I can simulate the system in the time domain. I don’t need to be predicting the time-domain effect of changing a parameter in the frequency domain: I can move a slider and see the effect of varying parameters.

Too much work, you say? On the contrary. It’s way easier than, say, multiple plots of a function at different parameter values. Basically just wrap a “manipulate” command around one plot command.

Now, I’m not talking – yet – about a complicated simulation for modeling nonlinear effects (perhaps most important would be saturation, a maxed-out control effort). What I’m saying is that simulation is cheap and requires almost no coding in Mathematica®l. This will still require that I estimate the range of parameter values, and it will require that I have some idea what I can accomplish by changing a specific parameter, so I’ll still be learning something about design. But I won’t be working in one room (frequency domain) while trying to change something in another room (time domain).

I don’t have a control system example, but in order to make sure I could do this in Mathematica®l, I used the following example from bequette. We have a transfer function with one unknown parameter tn…

I get the time-domain behavior in response to a unit step input…

A typical static presentation of the behavior of the system would look like:

(This was an illustration of “numerator dynamics”: the system eventually tends to the new set point of 1, but for some values of tn, the initial response of the system is in the wrong direction.)

There is a command called Manipulate. Apply it to a plot command, for example, and Mathematica® gives me a slider. The graph changes as I slide the blue ball. Not only an animation, but one I get to control (no pun intended). And, yes, I can have more than one slider.

Here are 3 snapshots of the slider in different positions. For this problem, the response is immediate.

As I said, why should I sit in the frequency domain trying to estimate time-domain behavior? I can watch the time domain as I change parameters.

(It took some time getting that to work; none of the help file examples included the parameter as an argument in the function definition, but the way I did it, it needs to be.)

Advertisements
(function(){var c=function(){var a=document.getElementById("crt-587638823");window.Criteo?(a.parentNode.style.setProperty("display","inline-block","important"),a.style.setProperty("display","block","important"),window.Criteo.DisplayAcceptableAdIfAdblocked({zoneid:388248,containerid:"crt-587638823",collapseContainerIfNotAdblocked:!0,callifnotadblocked:function(){a.style.setProperty("display","none","important");a.style.setProperty("visbility","hidden","important")}})):(a.style.setProperty("display","none","important"),a.style.setProperty("visibility","hidden","important"))};if(window.Criteo)c();else{if(!__ATA.criteo.script){var b=document.createElement("script");b.src="//static.criteo.net/js/ld/publishertag.js";b.onload=function(){for(var a=0;a<__ATA.criteo.cmd.length;a++){var b=__ATA.criteo.cmd[a];"function"===typeof b&&b()}};(document.head||document.getElementsByTagName("head")[0]).appendChild(b);__ATA.criteo.script=b}__ATA.criteo.cmd.push(c)}})();
(function(){var c=function(){var a=document.getElementById("crt-389320569");window.Criteo?(a.parentNode.style.setProperty("display","inline-block","important"),a.style.setProperty("display","block","important"),window.Criteo.DisplayAcceptableAdIfAdblocked({zoneid:837497,containerid:"crt-389320569",collapseContainerIfNotAdblocked:!0,callifnotadblocked:function(){a.style.setProperty("display","none","important");a.style.setProperty("visbility","hidden","important")}})):(a.style.setProperty("display","none","important"),a.style.setProperty("visibility","hidden","important"))};if(window.Criteo)c();else{if(!__ATA.criteo.script){var b=document.createElement("script");b.src="//static.criteo.net/js/ld/publishertag.js";b.onload=function(){for(var a=0;a<__ATA.criteo.cmd.length;a++){var b=__ATA.criteo.cmd[a];"function"===typeof b&&b()}};(document.head||document.getElementsByTagName("head")[0]).appendChild(b);__ATA.criteo.script=b}__ATA.criteo.cmd.push(c)}})();

## Leave a Reply

Fill in your details below or click an icon to log in:

You are commenting using your WordPress.com account. ( Log Out / Change )

You are commenting using your Twitter account. ( Log Out / Change )

You are commenting using your Facebook account. ( Log Out / Change )

You are commenting using your Google+ account. ( Log Out / Change )

Connecting to %s