Given system of ODE:
$\begin{cases} \dot{x}=G+u_1 \\ \dot{z}=-z+\frac{df}{dt} \\ \dot{G}=-G+z \cdot u_2 \end{cases}$
where $f=-x^2$,
$u_1=\frac{d}{dt}(\alpha \sin(\omega \cdot t))$ and $u_2=\alpha \sin(\omega \cdot t)$
f = -x[t]^2;
asys = AffineStateSpaceModel[{x'[t] == G[t] + u1[t], z'[t] + z[t] == D[f, t], G'[t] + G[t] == z[t] u2[t]}, {{x[t], 1}, {G[t], 0}, {z[t], 0}}, {u1[t], u2[t]}, {x[t], z[t], G[t]}, t];
And here is the result of the numerical calculation:
pars = {\[Alpha] = 0.5, \[Omega] = 2 Pi 5, xs = 1, xe = 0};
s1 = \[Alpha] Sin[\[Omega] t];
or = OutputResponse[asys, {D[s1, t], s1}, {t, 0, 500}]
Plot[{or[[1]] - s1, xe}, {t, 0, 25}, PlotRange -> All, PlotPoints -> 100]
Next, I try to get the transfer function of the system:
tf = TransferFunctionModel[asys]
And results:
or = OutputResponse[tf, {D[s1, t], s1}, {t, 0, 500}]
Plot[{or[[1]]}, {t, 0, 5}, PlotRange -> All, PlotPoints -> 100]
Should the results be the same, and if not, why not?