Installing the D-SR Toolbox for MATLAB
Simple use of DSR
A discrete time linearized state space model can simply be computed in the MATLAB command window as follows:
[A,B,C,D,CF,F,x0]=dsr(Y,U,L)
The Kalman filter gain matrix is then, K=CF*inv(F) when F is nonsingular.
As a ruke of thumb chose the prediction horizon L as low as possible.
Closed loop identification
For noisy systems with feedback in the data one may use the, DSR_e, function in the D-SR Toolbox which may be executed in MATLAB as:
[A,B,C,D,K,F,x0] = dsr_e(Y,U,L,g,J,n)
where, g, is a structure parameter. g=0 if the feedthrough matrix D=0 and g=1 if D is to be estimated. Put g=0 for closed loop data/systems.
Integer parameter L is as above and J >1 and "large".
"With DSR the model is served and ready to use.."