My question is a continuation of the topic Which way of solving from nonlinear control to choose?, and in the future I plan to expand this question.
I want to try to apply this article https://www.wolfram.com/mathematica/new-in-10/nonlinear-control-systems/asymptotic-output-tracking.html but for a different ODE or ODE system.
Edit: Take system of ODE with output $y$ for example:
$\begin{cases} \frac{dx}{dt}=H \cdot \sin(t)+u \\ \frac{dH}{dt}+h \cdot H = \frac{df}{dt} \\ y=x \end{cases} $
where $f=-x^2$, $x$ and $H$ - variables, $h$ - constant, $y$ - output.
To begin with Asymptotic Output Tracking, we transform system of ODE into the affine state-space https://reference.wolfram.com/language/ref/AffineStateSpaceModel.html.
Here is my code.
Clear["Derivative"]
ClearAll["Global`*"]
pars = {xs = -1, h = 1}
f = -x^2
ode = {x', H'} == {H Sin[t] + u, f' - h H}
asys = AffineStateSpaceModel[
NonlinearStateSpaceModel[{ode[[2]], {x}}, {{x, xs}, {H,
1}}, {u}]]
I would be grateful for any help and support in resolving the issue.
NEW EDIT:
This is my code for $f=\log (\text{sech}(1-x(t)))$ and two outputs y={D[f, x[t]], x[t]}
Clear["Derivative"]
ClearAll["Global`*"]
pars = {xs = -1, xe = 1, h = 1, \[Beta] = 1}
f = Log[Sech[(x[t] - xe)]]
assm = AffineStateSpaceModel[{x'[t] == H[t] Sin[t] + u[t],
H'[t] + h H[t] == D[f, t]}, {{x[t], xs}, {H[t], 0}},
u[t], {D[f, x[t]], x[t]}, t]
ref = Exp[-\[Beta] t]
pars1 = {Subscript[p, 1] -> -1}
fb = AsymptoticOutputTracker[assm, ref, {Subscript[p, 1]}] /. pars1
csys = SystemsModelStateFeedbackConnect[assm, fb]
{xe, OutputResponse[{csys}, {0, 0}, {t, 0, 10}]}
Plot[%, {t, 0, 10}, PlotRange -> All]
NEW PROBLEM (16.02.2021):
Clear["Derivative"]
ClearAll["Global`*"]
f = -((x[t] + \[Alpha]1 Sin[\[Omega]1 t] -
xe)^2 + (y[t] + \[Alpha]2 Sin[\[Omega]2 t] - ye)^2)
asys = AffineStateSpaceModel[{x'[t] ==
f \[Alpha]1 Sin[\[Omega]1 t] + u1[t],
y'[t] == f \[Alpha]2 Sin[\[Omega]2 t] + u2[t]}, {{x[t],
xs}, {y[t], ys}}, {u1[t], u2[t]}, {f \[Alpha]1 Sin[\[Omega]1 t],
f \[Alpha]2 Sin[\[Omega]2 t]}, t] // Simplify
pars1 = {Subscript[r, 1] -> (-(\[Alpha]1 Sin[\[Omega]1 t])^3),
Subscript[r, 2] -> (-(\[Alpha]2 Sin[\[Omega]2 t])^3),
Subscript[p, 1] -> -5, Subscript[p, 2] -> -5}
pars = {\[Alpha]1 = 0.35, \[Omega]1 = 1, \[Alpha]2 = 0.35, \[Omega]2 =
2, xs = -1, xe = 1, ys = 2, ye = -2, h1 = 1, h2 = 1}
fb = AsymptoticOutputTracker[
asys, {Subscript[r, 1], Subscript[r, 2]}, {Subscript[p, 1],
Subscript[p, 2]}] /. pars1 // Simplify
ERROR:
AsymptoticOutputTracker::dmat2: The decoupling matrix {{0.,Sin[t] (<<1>>)},{0.,Sin[2 t] (<<1>>)}} has no columns with two or more nonzero elements, and hence the extension algorithm fails.
AsymptoticOutputTracker::dmat2: The decoupling matrix {{0.,Sin[t] (<<1>>)},{0.,Sin[2 t] (<<1>>)}} has no columns with two or more nonzero elements, and hence the extension algorithm fails.
What is this error related to?