I derived a differential equation for a system that I am studying that takes the following form:
$$\dot{x}-au_1(x-x_0)=bu_2+cu_1$$
This was derived from expanding a non-linear differential equation as a Taylor series about the operating point $x_0$ and eliminating higher order terms. I want to convert this into a state-space model in the form:
$$\mathbf{\dot{x}}=\mathbf{Ax}+\mathbf{Bu}$$ $$\mathbf{y}=\mathbf{Cx}+\mathbf{Du}$$
The input $u_1$ is actually part of the $\mathbf{A}$ matrix in this system, I'm assuming that makes this a time variant system?
I'm struggling to understand how to deal with the constant term $x_0$ from the trimmed operating point.
I was curious to see how Simulink handled this, so I used the linearization app to derive a state-space model from the original non-linear differential equation at the operating point $x_0$ and the output it gave takes the following form:
$$\mathbf{A}=d=a*u_{1trimmed}$$ $$\mathbf{B}=[\begin{matrix}c&b\end{matrix}]$$ $$\mathbf{C}=1$$ $$\mathbf{D}=0$$
Where $u_{1trimmed}$ is the value of input $u_1$ trimmed about the operating point $x_0$. However, it has completed ignored the $x_0$ term and this has led to errors in the system response at the operating point $x_0$ because $\dot{x}$ is not zero at the operating point without the $x_0$ term.
Is there a way of keeping the input $u_1$ in the $\mathbf{A}$ matrix and keeping the offset term $x_0$ in the model? Or, is an LTI state-space model not appropriate for this kind of system?
For info. I simulated the original non-linear model, a linearised time-domain model and the Simulink derived state-space model and plotted the results (see figure below). Hopefully you can see that the state-space model does not behave well at the trimmed operating point $x_0=5$ (start of the simulation). I'm assuming that this is because it has ignored the $x_0$ term from the model and that error is integrating over time.