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.)