2
$\begingroup$

enter image description here

It shoud approach to 1 and remains at 1, but when time over 20s it deteriorates.

Mathematica 12.1

Plot[OutputResponse[    Rationalize[
    TransferFunctionModel[
     Unevaluated[{{(0.045 (0.005 + s) (1 + 10. s))/(
       s^3 (1 + (0.09 (0.005 + s) (1 + 10. s))/(s^3 (2 + s))))}}], s, 
     SamplingPeriod ->None, SystemsModelLabels -> None]], UnitStep[t],
    t] // Evaluate, {t, 0, 40}]
$\endgroup$
4
  • 1
    $\begingroup$ Please show us the code text rather than the screenshot of it. $\endgroup$
    – xzczd
    May 31, 2021 at 15:17
  • $\begingroup$ And, please don't add bugs tage before WRI or the community has confirmed it as a bug. $\endgroup$
    – xzczd
    May 31, 2021 at 15:32
  • $\begingroup$ Strongly related, if not duplicate: mathematica.stackexchange.com/q/27505/1871 $\endgroup$
    – xzczd
    May 31, 2021 at 15:39
  • $\begingroup$ ok . I am glad to be educated. $\endgroup$
    – eason
    May 31, 2021 at 15:39

1 Answer 1

3
$\begingroup$

One way is:

f = (0.045*(0.005 + s)*(1 + 10. s))/(s^3 (1 + (0.09*(0.005 + s)*(1 + 10. s))/(s^3*(2 + s))));

g = OutputResponse[TransferFunctionModel[{{f}}, s], UnitStep[t], {t, 0, 40}]

Plot[g, {t, 0, 40}, PlotRange -> All]

Workaround:

sys = Rationalize[(0.045*(0.005 + s)*(1 + 
     10. s))/(s^3 (1 + (0.09*(0.005 + s)*(1 + 10. s))/(s^3*(2 + 
          s)))), 0] // Factor // ExpandAll

u = UnitStep[t];
func = InverseLaplaceTransform[sys*LaplaceTransform[u, t, s], s, t];

Plot[func, {t, 0, 40}, PlotRange -> All]
$\endgroup$
1
  • $\begingroup$ "OutputResponse can't be calculated analytically is very complex. Only way is by numerics." No, in this case it can. (Takes about 50 seconds on my laptop. ) We then just need a higher WorkingPrecision. Of course pure numeric approach shown by you is better. $\endgroup$
    – xzczd
    May 31, 2021 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.