idssdata
State-space data for identified system
Syntax
Description
Examples
Obtain Identified State-Space Matrices
Obtain the identified state-space matrices for a model estimated from data.
Identify a model using data.
load icEngine.mat data = iddata(y,u,0.04); sys = n4sid(data,4,'InputDelay',2);
data
is an iddata
object representing data sampled at a sampling rate of 0.04 seconds.
sys
is an idss
model representing the identified system.
Obtain identified state-space matrices of sys
.
[A,B,C,D,K] = idssdata(sys);
Obtain Initial State of Identified Model
Obtain the initial state associated with an identified model.
Identify a model using data.
load icEngine.mat data = iddata(y,u,0.04); sys = n4sid(data,4,'InputDelay',2);
data
is an iddata
object representing data sampled at a sampling rate of 0.04 seconds.
sys
is an idss
model representing the identified system.
Obtain the initial state associated with sys
.
[A,B,C,D,K,x0] = idssdata(sys);
A
, B
, C
, D
and K
represent the state-space matrices of the identified model sys
. x0
is the initial state identified for sys
.
Obtain Uncertainty Data of State-Space Matrices of Identified Model
Obtain the uncertainty matrices of the state-space matrices of an identified model.
Identify a model using data.
load icEngine.mat data = iddata(y,u,0.04); sys = n4sid(data,4,'InputDelay',2);
data
is an iddata
object representing data sampled at a sampling rate of 0.04 seconds.
sys
is an idss
model representing the identified system.
Obtain the uncertainty matrices associated with the state-space matrices of sys
.
[A,B,C,D,K,x0,dA,dB,dC,dD,dx0] = idssdata(sys);
dA
, dB
, dC
, dD
and dK
represent the uncertainty associated with the state-space matrices of the identified model sys
. dx0
represents the uncertainty associated with the estimated initial state.
Obtain State-Space Matrices for Multiple Identified Models
Obtain the state-space matrices for multiple models from an array of identified models.
Identify multiple models using data.
load icEngine.mat data = iddata(y,u,0.04); sys2 = n4sid(data,2,'InputDelay',2); sys3 = n4sid(data,3,'InputDelay',2); sys4 = n4sid(data,4,'InputDelay',2); sys = stack(1,sys2,sys3,sys4);
data
is an iddata
object representing data sampled at a sampling rate of 0.04 seconds.
sys
is an array of idss
models. The first entry of sys
is a second-order identified system. The second and third entries of sys
are third- and fourth-order identified systems, respectively.
Obtain the state-space matrices for the first and third entries of sys
.
[A,B,C,D,K,x0] = idssdata(sys,1); [A,B,C,D,K,x0] = idssdata(sys,3);
Obtain State-Space Matrices for Identified Model as Cell Array
Obtain the state-space matrices of an array of identified models in cell arrays.
Identify multiple models using data.
load icEngine.mat data = iddata(y,u,0.04); sys3 = n4sid(data,3,'InputDelay',2); sys4 = n4sid(data,4,'InputDelay',2); sys = stack(1,sys3,sys4);
data
is an iddata
object representing data sampled at a sampling rate of 0.04 seconds.
sys
is an array of idss
models. The first entry of sys
is a third-order identified system and the second entry is a fourth-order identified system.
Obtain the state-space matrices of sys
in cell arrays.
[A,B,C,D,K,x0] = idssdata(sys,'cell');
A
, B
, C
, D
and K
are cell arrays containing the state-space matrices of the individual entries of the identified model array sys
. x0
is a cell array containing the estimated initial state of the individual entries of the identified model array sys
.
Input Arguments
sys
— Identified linear model
idss
| idtf
| idproc
| idpoly
| idgrey
| model array
Identified linear model, specified as one of the following model objects.
If sys
is not an identified state-space model
(idss
or idgrey
), then it is
first converted to an idss
model. This conversion
results in a loss of the model uncertainty information.
sys
can be an array of identified models.
j1,...,jN
— Model array indices
integers
Model array indices, specified as integers. Specify up to
N indices, where N is the number
of models in sys
.
Output Arguments
A
, B
, C
, D
, K
— State-space matrices
arrays | cell array
State-space matrices that represent sys
as:
If sys
is an array of identified models and you do
not specify the 'cell'
input option, then
A
, B
, C
,
D
, and K
are multi-dimensional
arrays. To access a state-space matrix, such as A
, for
the ith entry in sys
, use
A(:,:,i)
.
If sys
is an array of identified models and you
specify the 'cell'
input option, then
A
, B
, C
,
D
, and K
are cell arrays with
one entry for each model in sys
.
x0
— Initial states
column vector | matrix | cell array
Initial states, returned as a column vector or array.
If sys
is an idss
or
idgrey
model, then x0
contains
the initial state values obtained during estimation. These values are stored
in the Report.Parameters
property of
sys
.
For other model types, x0
is zero.
If sys
is an array of identified models and you do
not specify the 'cell'
input option, then
x0
contains one column for each entry in
sys
.
If sys
is an array of identified models and you
specify the 'cell'
input option, then
x0
is a cell array with one entry for each model in
sys
.
dA
, dB
, dC
, dD
, dK
— Uncertainties associated with the state-space matrices
arrays | cell arrays
Uncertainties associated with the state-space matrices
A
, B
, C
,
D
, and K
. The uncertainty
matrices represent one standard deviation of uncertainty.
If sys
is an array of identified models, then
dA
, dB
,
dC
, dD
, and
dK
are multi-dimensional arrays. To access the
state-space matrix, say A, for the k-th entry of
sys
, use
A(:,:,k)
.
If sys
is an array of identified models and you do
not specify the 'cell'
input option, then
dA
, dB
,
dC
, dD
, and
dK
are multi-dimensional arrays. To access a
state-space matrix, such as dA
, for the
ith entry in sys
, use
dA(:,:,i)
.
If sys
is an array of identified models and you
specify the 'cell'
input option, then
dA
, dB
,
dC
, dD
, and
dK
are cell arrays with one entry for each model in
sys
.
dx0
— Uncertainties associated with the initial states
column vector | matrix | cell array
Uncertainty associated with the initial states, returned as a column
vector or array. dx0
represents one standard deviation
of uncertainty.
If sys
is an array of identified models and you do
not specify the 'cell'
input option, then
dx0
contains one column for each entry in
sys
.
If sys
is an array of identified models and you
specify the 'cell'
input option, then
dx0
is a cell array with one entry for each model
in sys
.
Version History
Introduced in R2012a
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)