Hello. I'm sorry this post is so wordy, but I wanted to make sure I explained myself as well as I could.
I am trying to clear some of the cobwebs and re-learn some of the controls material from my school days. I'm using Octave to run step tests on systems.
So far, I've been able to plot the step response of a hypothetical DC motor:
P (plant): Angle/Voltage = 1/(s(s+1))
When I plot the step response, the angle increases in a straight line (after acceleration is done) as one would expect. So far so good.
I then put this transfer function in a closed loop with a controller:
C (controller): C = 1
The resulting closed loop transfer function is:
Angle/Reference = CP/(1 + CP)
I then ran a step test on this transfer function and the system is indeed stabilised. The system overshoots, but settles to the value. It looks like a standard second order system. Once again, so far so good.
Finally, I changed the controller to a parallel form PID.
C = 3 + s + 1/s
I then ran a step test on the new closed loop transfer function, and I got a better response. The PID is working. It's not optimised at all, but it's working none the less.
Now here is where I run into trouble. I want to plot the output signal from the controller. A controller is no good if the simulation is assuming you can send infinite voltage to the DC motor!
So I solved the transfer function for controller output:
Cout/Reference = C / (1 + CP)
However, when I run the step test on this transfer function, Octave gives me an error:
error: ss: dss2ss: descriptor matrice "e" singular
My guess is that it's because the transfer function has a higher order polynomial for the numerator than the denominator, but I don't know for sure. I've reached the limits of my memory.
When I did this sort of thing in school, I had access to Simulink. That was easy because I could just throw in an oscilloscope at the controller output and look at the result.
So, my question is, what approach should I take for plotting the controller output using Octave?
Thanks for any help!