How can I periodically estimate the states of a discrete linear time-invariant system in the form $$\dot{\vec{x}}=\textbf{A}\vec{x}+\textbf{B}\vec{u}$$ $$\vec{y}=\textbf{C}\vec{x}+\textbf{D}\vec{u} $$if the measurements of its output $y$ are performed in irregular intervals? (suppose the input can always be measured).

My initial approach was to design a Luenberger observer using estimates $\hat{\textbf{A}}$, $\hat{\textbf{B}}$, $\hat{\textbf{C}}$ and $\hat{\textbf{D}}$ of the abovementioned matrices, and then update it periodically every $T_s$ seconds according the following rule:

If there has been a measurement of $y$ since the last update: $$\dot{\hat{x}}=\hat{\textbf{A}}\hat{x}+\hat{\textbf{B}}\hat{u}+\textbf{L}(y_{measured}-\hat{\textbf{C}}\hat{x})$$ If not: $$\dot{x}=\hat{\textbf{A}}\hat{x}+\hat{\textbf{B}}\hat{u}$$

(I have omitted the superscript arrows for clarity)

I believe that there may be a better way to do this, since I'm updating the observer using an outdated measurement of $y$ (which is outdated by $T_s$ seconds in the worst case).

Thank's in advance.

  • $\begingroup$ Can't you interpolate the output values to the suitable instants ? $\endgroup$ – Yves Daoust Sep 3 '15 at 12:26

My intuition on this is that you would actually perform a single instantaneous update in the moment that you receive a measurement, where this update is dependent upon the time since the last update.

The reason for this intuition goes as follows: Consider finely discretizing the system. Let's assume tht the matrices $A,B,C,D$ are known. In fact, let's just ignore the matrix $D$, since we can equivalently define observation $\tilde{y} = \mathbf{C}\vec{x} = \vec{y} - \mathbf{D}\vec{u}$. Finally, let's assume some distribution over the initial value $\vec{x}(0)$. In fact, call it gaussian for the niceties of it. This gives us a hidden markov model which can be solved by gaussian message passing on the resultant probabilistic graphical model. By "solve" I mean solving $E[\vec{x}[t]]$, where $\vec{x}[t]$ is the discretized version of the original $\vec{x}$. The factor graph (see paper Factor Graphs and the Sum-Product Algorithm) corresponding to the (hidden, since $\vec{x}$ is not observed) markov system with simply be a long chain of $\vec{x}$ variables and the deterministic relationship between them, every once in a while having an observation coming in. Realtime inference in this graph would consist of essentially a kalman filter, except that most of the time is just the "prediction" step. Only in the instances that there is an observation would you have an "update" step.

Basically, what I'm speculating is that you should actually do something like the following:

If there is no measurement at time $t$, then simply carry on as $$\dot{\hat{x}} = \mathbf{A}\hat{x}+\mathbf{B}\vec{u}$$ However, when an observation is received at time $t$, Update $\hat{x}$ as $$\hat{x}(t) = \hat{x}(t^-) + \mathbf{L}(\vec{y} - \mathbf{C}\vec{x}(t^-))$$

where $t^-$ is the simulated state up until right before the observation was received. This $\mathbf{L}$ would be designed by you, and should depend on the time since the last observation. Exactly the right way to do this escapes me so far unfortunately, but the finely discretized kalman filter analogy may shed some light on what is reasonable here.

Note that this is only considering obtaining an estimate for the hidden state $\vec{x}$. If the state estimate is then to be used for control purposes, one needs to take care about the fact that there are discontinuities in the derivative $\dot{\hat{x}}(t)$ for each $t$ when an observation is received. This can likely be mitigated by simply assigning to those values of $t$ the left or right limits of $\dot{\hat{x}}$ around that observation time.

If I obtain more information on this, I will update.

  • $\begingroup$ If I undesrtood correctly, the proposed algorithm is as follows: - update the state estimate periodically using the LTI model (call this the model update) - if a measurement arrives between two model updates, lets say $k.Ts$ and $(k+1).Ts$ (where $k$ is an integer and $Ts$ is the model updates period), update the state estimate using $\hat{x}(t) = \mathbf{L}(\vec{y} - \mathbf{C}\vec{x}(t^-))$. Is this what you meant? $\endgroup$ – JLagana Oct 8 '14 at 2:29
  • $\begingroup$ Because one of my failed attempts was discretizing the LTI model, and then applying the following algorithm: - update the state estimate periodically every $Ts$ seconds using: $\hat{x}(k+1)=A_{d(T_s)}.\hat{x}(k)+B_{d(T_s)}.u(k)$ (model update) - if a measurement arrives between two model updates, (more precisely $\delta t$ seconds after one update) update the state estimate using $\hat{x}(k+1)=A_{d(\delta t)}.\hat{x}(k)+B_{d(\delta t)}.u(k)+L_{d(\delta T)}.(y(k)-C_d.\hat{x}(k))$ (measurement update) $\endgroup$ – JLagana Oct 8 '14 at 2:43
  • $\begingroup$ - in the next model update, use: $\hat{x}(k+1)=A_{d(T_s-\delta t)}.\hat{x}(k)+B_{d(T_s-\delta t)}.u(k)$ Where $M_{d(n)}$ means the discretized $M$ matrix when using a sample time of $n$ seconds. $\endgroup$ – JLagana Oct 8 '14 at 2:44
  • $\begingroup$ Maybe my response wasn't well suited for a comment... If something is unclear let me know $\endgroup$ – JLagana Oct 8 '14 at 3:10
  • $\begingroup$ I'm not actually proposing to discretize the model. I only used that reasoning as a motivation for the proposed solution. Do you have an example system that I can play with in MATLAB? $\endgroup$ – bean Oct 8 '14 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.