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.

  • $\begingroup$ Sorry about readibility, changed to roman letters. $\endgroup$ Feb 11, 2017 at 23:04
  • $\begingroup$ 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$ Feb 12, 2017 at 0:10
  • $\begingroup$ so you don't need any answer? I tried to give one, but don't understand what you mean with 'manipulated variable'. $\endgroup$
    – Phab
    Mar 14, 2017 at 7:14


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.