For an analog closed loop feedback control, I can do the following to model the response of a second-order physical system with an order 1 zeros polynomial to a step disturbance. I have a proportional controller, with no gain on the feedback signal.
physTF = TransferFunctionModel[Kp*(ta*s + 1)/((t1*s + 1) (t2*s + 1)), s];
contTF = TransferFunctionModel[Kc];
backTF = TransferFunctionModel[1];
clTF = SystemsModelFeedbackConnect[
SystemsModelSeriesConnect[physTF, contTF], backTF];
dist = M*UnitStep[t];
params = {ta -> 0.1, t1 -> 0.3, t2 -> 0.6, Kp -> 5, Kc -> 0.1, M -> 1};
resp = OutputResponse[clTF /. params, dist /. params, {t, 0, 10}];
Plot[resp, {t, 0, 2}, PlotRange -> All]
How might I approach the problem for the case where the manipulated variable is subject to a constraint. For example, when the manipulated variable can saturate or only has discrete allowed values?
The simulink solution in MATLAB is to have a quantizer block followed by a saturation block.
contTF
stands for controller transfer function, which in this instance is just a proportional gain, but generally might have integrating or a semi-proper derivative term in it. I ran my old code, and now edited code, on Mathematica 11 and found it to be functioning. $\endgroup$