User`s guide

Identifying State-Space Models
K = zeros(2,2);
x0 = [0;0];
2 Construct the continuous-time state-space model object:
m = idss(A,B,C,D,K,x0,'Ts',0);
3 Specify the parameter values in the structure matrices that you do not
want to estimate:
m.As = [0 1;0 NaN];
m.Bs = [0;NaN];
m.Cs = m.c;
m.Ds = m.d;
m.Ks = m.k;
m.x0s = [NaN;0]
m.NoiseVariance = [0.01 0; 0 0.1];
4 Estimate the m odel structure:
m = pem(data,m)
where d ata is n a me of th e iddata
object containing time-domain o r
frequency-domain data. The i
terative search for a m inim um i s initialized
by the parameters in the nomin
al model
m. The continuous-time model is
sampled using the same sampl
ing interval as the data.
5 To simulate this system using the sampling interval T = 0.1 for input u
and the noise realization e, use the following commands:
e = randn(300,2);
u = idinput(300);
simdat = iddata([],[u e],'Ts', 0.1) ;
y = sim(m,simdat)
The continuous system is automatically sampled using Ts=0. 1.Thenoise
sequence is scaled according to the matrix
m.noisevar.
If you discover that the motor was not initially at rest, you can estimate x
2
(0)
by setting the second element of the
x0s structure matrix to NaN,asfollows:
m_new = pem(data,m,'x0s',[NaN;NaN])
3-99