I'm buildning a system identification library on GitHub where I focusing on real world problems and real tools that works.
The current method I'm working on now is called Observer Controller Identification(OCID). It have its orgins from NASA back in 1994. The drawback with that is OCID is very sensitive to noise and I have an idea how to solve that issue.
Assume that we have the actuall system, where we measure $U(k)$, $U_f(k)$ and $Y(k)$ only and then we get the state space model
$$x(k+1) = Ax(k) + Bu(k)\\y(k) = Cx(k) + Du(k)$$
Plus the kalman gain matrix $K$ because we assume that the estimated state vector $\hat x(k)$ is equal to the state vector $x(k)$.
Now when we have our state vector $\hat x(k)$ and we know our observer and we know feedback signal $U_f(k)$
Question:
Is it possible to find the LQR control law $L$ from:
$$U_f(k) = L \hat x(k)$$
By using pseudo inverse? In this case $\hat x(k)$ is data and $U_f(k)$ is also data, but $L$ is a matrix.
Summarize:
- I measure input signal $U(k)$, output signal $Y(k)$ and feedback signal $U_f(k)$
- From $U(k)$ and $Y(k)$, I can identify a state space model with an algorithm called OKID from my library. I'm also get the kalman gain matrix $K$
- I assume that the state vector $x(k)$ is equal to the estimated state vector $\hat x(k)$ - deadbeat observer
- I know $U_f(k)$ and $\hat x(k)$ and they are data. Can I find control law $L$ from $U_f(k) = L\hat x(k)$ then?

You can write the equations as follows: $$ \begin{bmatrix} U_f^T(k) \\ U_f^T(k+1) \\ \vdots \\ U_f^T(k+N) \end{bmatrix} =\begin{bmatrix} \hat{x}^T(k) \\ \hat{x}^T(k+1) \\ \vdots \\ \hat{x}^T(k+N) \end{bmatrix} L^T $$ Now you can solve this by using least squares methods. Note that it must be $N \geq n$ where $n$ is the system degree.