Implements a predictive observer for a discrete linear time-invariant (LTI) state-space model.
Refer to Chapter 15, Estimating Model States, of the LabVIEW Control Design Toolkit User Manual for information about using a predictive observer.
| Dialog Box Options |
| Block Diagram Inputs |
| Block Diagram Outputs |
| Parameter | Description |
|---|---|
| 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 function. The default value is FALSE. |
| Input u(k) | Specifies the control action this function applies to the model. If you specify a vector of zeros for Input u(k) or do not wire a value to this parameter, this function does not apply a control action. |
| State-Space | Specifies the mathematical representation of and information about the system for which this function calculates the estimated states. |
| Initial State Estimate xhat(0|-1) | Specifies the initial states from which this function 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 (Predictive) | Specifies the estimator gain matrix this function applies to the difference between the observed output and the estimated output, which is y(k) – Estimated Output yhat(k). You can use the CD Pole Placement VI or the CD Ackermann VI to calculate Observer Gain (Predictive). Observer Gain (Predictive) relates to the Observer Gain (Predictive) of the CD Current Observer Corrector VI through the following relationship: Observer Gain (Predictive) = A · Observer Gain (Current), where A is the state matrix of the State-Space. |
| Parameters | Lists all the parameters associated with this function. Select a parameter from this list to configure the parameter. When you select a parameter, the parameter and its associated Parameter source control appear in the Parameter Information section of the configuration dialog box. |
| Preview | Displays a graphical preview, if available, of the function output or configuration. |
| Parameter Information | Contains the parameters you can configure for this function. You must select a parameter from the Parameters list to make that parameter and its associated Parameter source control visible in the Parameter Information section of the configuration dialog box. |
| Parameter Source | Specifies whether you configure this parameter using the Configuration Dialog Box or a Terminal on the block diagram. The default value is Configuration Dialog Box. If you select Terminal, LabVIEW displays an input for that parameter on the block diagram, and you can wire values to that input to configure this function programmatically. If you select Configuration Dialog Box, LabVIEW removes that input from the block diagram. You then must set the value for this parameter inside the configuration dialog box. |
| Parameter | Description |
|---|---|
| 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 function. The default value is FALSE. |
| Input u(k) | Specifies the control action this function applies to the model. If you specify a vector of zeros for Input u(k) or do not wire a value to this parameter, this function does not apply a control action. |
| State-Space | Specifies the mathematical representation of and information about the system for which this function calculates the estimated states. |
| Initial State Estimate xhat(0|-1) | Specifies the initial states from which this function 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 (Predictive) | Specifies the estimator gain matrix this function applies to the difference between the observed output and the estimated output, which is y(k) – Estimated Output yhat(k). You can use the CD Pole Placement VI or the CD Ackermann VI to calculate Observer Gain (Predictive). Observer Gain (Predictive) relates to the Observer Gain (Predictive) of the CD Current Observer Corrector VI through the following relationship: Observer Gain (Predictive) = A · Observer Gain (Current), where A is the state matrix of the State-Space. |
| Parameter | Description |
|---|---|
| Estimated Output yhat(k) | Returns the estimated output of the State-Space Model. |
| Predicted State Estimate xhat(k+1|k) | Returns the predicted state estimates of the State-Space Model for the next time step k + 1. The length of this vector is equal to the number of model states. |
| Predicted State Estimate xhat(k|k-1) | Returns the estimated states of the State-Space Model estimated at the previous time step. |
| 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 function calculates the Predicted State Estimate xhat(k+1|k) using the Estimated Output yhat(k) and the Predicted State Estimate xhat(k|k–1).
The following equations define the outputs of this function:
Estimated Output yhat(k) = C · xhat(k|k-1) + Du(k)
Predicted State Estimate xhat(k+1|k) = A · xhat(k|k-1) + Bu(k) + Lp[y(k) – yhat(k)]
where Lp is the Observer Gain (Predictive).