Affine Nonlinear Systems

Affine systems are nonlinear systems that are linear in the input. They can be specified in multiple ways and can also be converted to other systems models.

A system specified using an ODE.

 In[1]:= XAffineStateSpaceModel[m x''[t] + c[x] x'[t] + k[x] == F[t], x[t], F[t], x[t], t]
 Out[1]=

A system specified using its components.

 In[2]:= XAffineStateSpaceModel[{{Subscript[f, 1][Subscript[x, 1], Subscript[x, 2]], Subscript[f, 2][Subscript[x, 1], Subscript[x, 2]]}, {{Subscript[g, 11][Subscript[x, 1], Subscript[x, 2]]}, {Subscript[g, 21][Subscript[x, 1], Subscript[x, 2]]}}, {Subscript[h, 1][Subscript[x, 1], Subscript[x, 2]]}}, {Subscript[x, 1], Subscript[x, 2]}]
 Out[2]=

Systems obtained from other systems models.

 In[3]:= XAffineStateSpaceModel /@ {StateSpaceModel[{{{Subscript[a, 11], Subscript[a, 12]}, {Subscript[a, 21], Subscript[a, 22]}}, {{Subscript[b, 11]}, {Subscript[b, 21]}}, {{Subscript[c, 11], Subscript[c, 12]}}, {{0}}}, {Subscript[x, 1], Subscript[x, 2]}, SamplingPeriod ->None, SystemsModelLabels -> None], TransferFunctionModel[{{{1}}, (-2) s + s^2}, s], NonlinearStateSpaceModel[ {{Subscript[f, 1][Subscript[x, 1], Subscript[x, 2]] + Subscript[u, 1] Subscript[g, 11][Subscript[x, 1], Subscript[x, 2]], Subscript[f, 2][Subscript[x, 1], Subscript[x, 2]] + Subscript[u, 1] Subscript[g, 21][Subscript[x, 1], Subscript[x, 2]]}, {Subscript[ h, 1][Subscript[x, 1], Subscript[x, 2]]}}, {Subscript[x, 1], Subscript[x, 2]}, {Subscript[u, 1]}, {Automatic}, Automatic , SamplingPeriod -> None]}
 Out[3]=

A NonlinearStateSpaceModel that is not input linear is approximated.

 In[4]:= XAffineStateSpaceModel[ NonlinearStateSpaceModel[ {{Subscript[f, 1][Subscript[x, 1], Subscript[x, 2], Subscript[u, 1]], Subscript[f, 2][Subscript[x, 1], Subscript[x, 2], Subscript[u, 1]]}, {Subscript[h, 1][Subscript[x, 1], Subscript[x, 2], Subscript[ u, 1]]}}, {Subscript[x, 1], Subscript[x, 2]}, {Subscript[u, 1]}, {Automatic}, Automatic , SamplingPeriod -> None]]
 Out[4]=

A linear AffineStateSpaceModel is exactly converted to linear systems models.

 In[5]:= Xassm = AffineStateSpaceModel[ {{Subscript[x, 1] + Subscript[x, 2], Subscript[x, 1]}, {{ 1 }, {1 }}, {Subscript[x, 1]}, {{ 0 }}}, {Subscript[x, 1], Subscript[x, 2]}, Automatic, {Automatic}, Automatic , SamplingPeriod -> None];
 In[6]:= X{StateSpaceModel[assm], TransferFunctionModel[assm]}
 Out[6]=

In general, affine models are approximated during conversion to linear systems models.

 In[7]:= Xassm = AffineStateSpaceModel[ {{Subscript[x, 1] + Subscript[x, 2] + Subscript[x, 1] Subscript[x, 2], Subscript[x, 1]}, {{ 1 }, {1 + Subscript[x, 2] }}, {Subscript[x, 1]}, {{ 0 }}}, {Subscript[x, 1], Subscript[x, 2]}, Automatic, {Automatic}, Automatic , SamplingPeriod -> None];
 In[8]:= X{StateSpaceModel[assm], TransferFunctionModel[assm]}
 Out[8]=

The conversion to a NonlinearStateSpaceModel is exact.

 In[9]:= XNonlinearStateSpaceModel[ AffineStateSpaceModel[ {{Subscript[f, 1][Subscript[x, 1], Subscript[ x, 2]], Subscript[f, 2][Subscript[x, 1], Subscript[x, 2]]}, {{ Subscript[g, 11][Subscript[x, 1], Subscript[x, 2]] }, {Subscript[g, 21][Subscript[x, 1], Subscript[x, 2]] }}, {Subscript[h, 1][Subscript[x, 1], Subscript[x, 2]]}, {{ 0 }}}, {Subscript[x, 1], Subscript[x, 2]}, {Subscript[u, 1]}, {Automatic}, Automatic , SamplingPeriod -> None] ]
 Out[9]=

Questions? Comments? Contact a Wolfram expert »