Corrects state estimates made at the previous time step for a discrete linear time-invariant (LTI) state-space model.
![]() | Note This VI verifies that the State-Space Model model is observable. This VI returns an error if the model is not observable. You can use the CD Observability Matrix VI to determine manually if the model is observable. |
Refer to Chapter 15, Estimating Model States, of the LabVIEW Control Design Toolkit User Manual for information about using a current observer.

![]() |
Output y(k) specifies the measurements a sensor makes on the State-Space Model. You also can use the Discrete State-Space function to simulate the behavior of a state-space model. | ||||||
![]() |
Initialize is TRUE if you want to restart the calculation from any initial values you provide. Initialize is FALSE if you do not want to restart this VI. The default value is FALSE. | ||||||
![]() |
Input u(k) specifies the control action this VI applies to the model. If the D matrix of the state-space model is 0, do not wire a value to the Input u(k) parameter. If the D matrix of the State-Space Model is not 0, you must wire a value to the Input u(k) parameter. In this situation, you cannot design a controller u(k) based on the Corrected State Estimate xhat(k|k). | ||||||
![]() |
State-Space Model specifies the mathematical representation of and information about the system for which this VI calculates the estimated states. | ||||||
![]() |
Initial State Estimate xhat(0|-1) specifies the initial states from which this VI begins estimating the model states. If you do not specify a value for this parameter, Initial State Estimate xhat(0|-1) is a vector of zeros. | ||||||
![]() |
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
| ||||||
![]() |
Observer Gain (Current) specifies the estimator gain matrix this VI applies to the difference between the observed output and the estimated output, which is Output y(k) – Estimated Output yhat(k). You can use the CD Pole Placement VI or the CD Ackermann VI to calculate the Observer Gain (Current).
The Observer Gain (Current) relates to the the Observer Gain (Predictive) of the Predictive Observer function through the following relationship: Observer Gain (Current) = A–1 · Observer Gain (Predictive), where A is the state matrix of the State-Space Model. |
||||||
![]() |
Predicted State Estimate xhat(k|k-1) specifies the estimated states at the previous time step k – 1. This VI uses this parameter to calculate the Corrected State Estimate xhat(k|k). | ||||||
![]() |
Estimated Output yhat(k) returns the estimated output of the State-Space Model. | ||||||
![]() |
Corrected State Estimate xhat(k|k) returns the corrected state estimates at time k. The length of this vector is equal to the number of model states. | ||||||
![]() |
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
|
At each time step k, this VI calculates the Corrected State Estimate xhat(k|k) using the Estimated Output yhat(k), any control action Input u(k), and the Predicted State Estimate xhat(k|k-1) calculated at the previous time step.
This VI uses the following equations to calculate the outputs.
Estimated Output yhat(k) = C · Predicted State Estimate xhat(k|k-1) + D · Input u(k)
where C and D are the output and direct feedthrough matrices, respectively, of the State-Space Model.
Corrected State Estimate xhat(k|k) = Predicted State Estimate xhat(k|k-1) + Lc [Output y(k) – Estimated Output yhat(k)]
where Lc is the Observer Gain (Current).