User`s guide
Estimating Linear Grey- Box Models
The first step in grey-box modeling is to write an M-file that returns
state-space matrices as a function of user-de fined parameters and information
about the model.
Use the following format to implement the linear grey-box model in an M-file:
[A,B,C,D,K,x0] = myfunc(par,T,CDm file,aux)
where the matrices A, B, C, D, K ,andx0 represent both the continuous-time
and d iscrete-time s tate-space description of the system,
myfunc is the n ame
of the M-file,
par contains the parameters as a column vector, and T is the
sampling interval.
aux contains auxiliary variables in your system. You use
auxiliary variables to vary system parameters at the input to the function,
and avoid editing the M-file.
CDmfile is an optional argument that describes whether the resulting
state-space m atrices are in discrete time or continuous time. By default,
CDmfile='cd', which means that the sampling interval property of the model
Ts determines whether the model is continuous or discrete in time. For more
information about these arguments, see the
idgrey reference page.
Use
pem to estimate your grey-box model.
Example – Representing a Grey-Box Model in an
M-File
In this example, you represent the structure of the following continuous-time
model:
xt xt ut
yt xt et
() () ()
() () (
=
⎡
⎣
⎢
⎤
⎦
⎥
+
⎡
⎣
⎢
⎤
⎦
⎥
=
⎡
⎣
⎢
⎤
⎦
⎥
+
01
0
0
10
01
12
θθ
))
()x 0
0
3
=
⎡
⎣
⎢
⎤
⎦
⎥
θ
5-7