Skip to main content
5 of 8
added Nasser's solution
Phab
  • 1.6k
  • 9
  • 15

OutputResponse in V9 vs V10

I have same code that works in version 9.0.1, but not in version 10.0.1.0 (according to @Sektor, it works in 10.0.0.0, too).

in = UnitStep[t - 20] - UnitStep[t - 75];
tMax = 100;
time = {t, 0, tMax};

thisWcA = TransferFunctionModel[{{{0.9 (1 + 19 s)}}, 19 s}, s]

Wp23 = TransferFunctionModel[{{{E^((-2) s)}}, (1 + 2 s)^5}, s]

out = OutputResponse[
  SystemsModelFeedbackConnect[
   SystemsModelSeriesConnect[thisWc, Wp23]], in, time]

One can approximate the TF in v10 with (thanks to @Nasser):

Wp23Approx = SystemsModelDelayApproximate[Wp23]

outApprox = 
 OutputResponse[
  SystemsModelFeedbackConnect[
   SystemsModelSeriesConnect[thisWc, Wp23Approx]], in, time]

Then the Error changes from

NestList::intnm: Non-negative machine-sized integer expected at position 3 in NestList[#1/. Control`RecastDEquationsDump`xx$_[t+Optional[Pattern[<<2>>]]]:>Control`RecastDEquationsDump`xx$[t+Control`RecastDEquationsDump`nn0$+1]&,Control`RecastDEquationsDump`y$615011[t]->Control`RecastDEquationsDump`stVar$6154[t]+Control`RecastDEquationsDump`cst$6156 Subscript[\[FormalU], 1][t],2.]. >> ....

to

NDSolve::ndsz: At t == 20.00000000000057`, step size is effectively zero; singularity or stiff system suspected. >>

Surprisingly in v9 (and 10.0.0.0) both ways give the same result: enter image description here

Edit: I'm using Win7 64bit

Phab
  • 1.6k
  • 9
  • 15