Given simple system of ODE.
\begin{cases} \dot{x_1}=-x_1+u \\ \dot{x_2}=-x_2-x_1 \end{cases}
As an output, I want to use $y=\dot{x_1}$.
I'm trying to convert to an affine state-space, but in the case of such an output, descriptor matrix is singular (code in Mathematica for example).
asys = AffineStateSpaceModel[{x1'[t] == -x1[t] + u[t], x2'[t] == -x2[t] - x1[t]}, {{x1[t], 1}, {x2[t], 1}}, {u[t]}, {x'[t]}, t] // Simplify
I got the idea to add a differentiating filter:
\begin{cases} \dot{x_1}=-x_1+u \\ \dot{x_2}=-x_2-x_1 \\ \frac{1}{k}\dot{X}+X=\dot{x_1} \end{cases}
And now $y=X \approx \dot{x_1}$ and $k>>1$.
Are there some simpler ways to modify the equation and get $y=\dot{x_1}$?
Isn't it possible to use: $\dot{\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}} = \begin{bmatrix} -1 & 0\\ -1 & -1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}+ \begin{bmatrix} 1 \\ 0 \end{bmatrix} u$ and as output
$y = \begin{bmatrix} -1 & 0 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}+ \begin{bmatrix} 1 \\ 0 \end{bmatrix} u$
with $y = -x_1+u = \dot{x_1}$