Discrete-Time System ID Process

For a discrete-time LTI model , the system identification algorithm is as follows:

  1. Let and
  2. Compute the OLS
  3. Extract .

Intuition

We start with our well-known discrete-time . We can rewrite this equation in matrix-vector form as

We can make our life easier by transposing the equation to place our data points in rows that are vertically stacked. This yields the inner product

We do this so we do not have to transform our least squares later on. Since the dimensions of are and the dimensions of are , we can ensure that there are exactly columns and rows in by taking its transpose. We now want to define our stacked matrices for timesteps . Therefore, , whereas and . We end up with a very familiar equation in .

So what’s up with the dimensionality? Matrix has the dimensions since there are timesteps, representing the rows in , and columns since the state vector has elements, whereas the vector of control inputs has elements. Therefore, each row in has a combined of elements. We can use the same reasoning for since the state vector will always contain elements.

We can now use least squares optimization to find a matrix that minimizes the coefficient matrices and . We do so using

Note that OLS only works when is invertible is full column rank has linearly independent columns. Here are the two other possibilities:

  • If least squares is not possible since is not invertible.
  • If has columns AND is full column rank there is more than one solution for .