| Simulink Parameter Estimation | ![]() |
www.kxcad.net Home > CAE Software Index > MATLAB Index >
| On this page… |
|---|
The @State object is similar to the @Parameter object. One @State object corresponds to each Simulink block with states in the model.
The syntax to create a state object is
h = ParameterEstimator.State('block');
h = ParameterEstimator.State('block', Value);
h = ParameterEstimator.State('block', Value, Minimum,
Maximum);
In the first case, the state vector is initialized from the model containing the block. In the other cases, block does not need to exist in the workspace at the time of object creation. However, it is required at estimation time.
Descriptions of some important properties of state objects are given in the following table.
State Object Properties
Property | Description |
|---|---|
Block | Name of the Simulink block whose states are defined by this object. |
Dimensions | Scalar value to store the number of states of the relevant block. |
Value | Column vector to store the value of the state for the block specified by this object. The length of this vector should be consistent with the Dimensions property. |
Estimated | A Boolean array of the same size as that of Value. Depending on the value of the elements of the Estimated property, the behavior of the corresponding elements of Value is as follows:
|
InitialGuess | Separate properties are required to hold the initial and current values of the states. So, when the InitialGuess property is initialized with a value, both it and the Value property are assigned the same value. Depending on the value of the elements of the Estimated property, the behavior of the corresponding elements of InitialGuess is as follows:
|
Minimum, Maximum | State vector range. |
TypicalValue | The typical values of the states. This property is used in estimations for scaling purposes. The default value is 1. |
Ts | Sampling time of discrete blocks. Set to zero for continuous blocks. This property is read-only and is currently used for information only. |
Domain | String to hold the physical domain of the block. Used for SimMechanics or SimPowerSystems blocks with states. |
To create a state object for the f14/Actuator Model block in the f14 model, use
st1 = ParameterEstimator.State(gcb)
MATLAB returns
(1) State data for f14/Actuator Model block:
The block has 1 continuous state(s).
State value : 0
Initial guess : 0
Estimated : false
After a state object is created, you can modify its properties using this syntax:
ic1.Estimated = true; % Estimate this state
Most of the properties, for example, Estimated and TypicalValue, support scalar expansion with respect to the size of Value.
Description of two important methods are given next:
hiliteBlock — Highlights the referenced blocks associated with state objects in the Simulink diagram.
update — Updates the state object after the Simulink model has been modified. If the size of Value property changes, then the other properties are reset to their default values.
| Creating Parameter Objects | Creating Estimation Objects | ![]() |
© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments