Help using structures for idss initial system

4 vues (au cours des 30 derniers jours)
Nicholas
Nicholas le 26 Juin 2012
I am trying to fit a 2 degree of freedom system model with real world data. Here is the current code for the initial guess matrix. (The states are defined as x1, x1dot, x2, x2dot with the input being current from a motor that is converted to force with the torque constant applied to mass 1)
Aguess = [0,1,0,0;-k/m1,-c/m1,k/m1,c/m1;0,0,0,1;k/m2,c/m2,-k/m2,-c/m2];
Bguess = [0;((1/m1*TorqueConst));0;0];
Cguess = eye(4);
Dguess = zeros(4,1);
K = zeros(4);
x0 = zeros(4,1);
init_sys = idss(Aguess,Bguess,Cguess,Dguess,K,x0,0);
init_sys.Structure.a.Free = [0,0,0,0;1,1,1,1;0,0,0,0;1,1,1,1];
init_sys.Structure.a.Minimum = [0,0,0,0;-Inf,-Inf,0,0;0,0,0,0;0,0,-Inf,-Inf];
init_sys.Structure.a.Maximum = [0,0,0,0;0,0,Inf,Inf;0,0,0,0;Inf,Inf,0,0];
init_sys.Structure.b.Free = [0;1;0;0];
init_sys.Structure.c.Free = false;
init_sys.Structure.d.Free = false;
init_sys.Structure.k.Free = false;
My question is if there is a way to not restrict the matrix element, but have them depend on each other. For example the following restrictions:
Aguess(2,3) = -Aguess(2,1);
Aguess(2,4) = -Aguess(2,2);
Aguess(4,3) = -Aguess(4,1);
Aguess(4,4) = -Aguess(4,2);
Or is there a way to set it up so that it will solve for the actual variables (m1, m2, k, and c)?
I am currently trying to fit a set of real world data and the initial guess is relatively close, but as ssest goes through its iterations, it makes the model worse by altering the framework of a two mass system.
Thank you in advance for any help provided!

Réponses (1)

Rajiv Singh
Rajiv Singh le 27 Juin 2012
Coefficient dependence is beyond the scope of idss model structure. Use idgrey model type instead, where in you write a MATLAB function that parameterizes the state space equations. You would use TorqueConst, m1, k, c as input arguments and return the computed values of A, B, C, D, (and optionally also K and x0) as output arguments of this function. See:
or in general:

Catégories

En savoir plus sur Linear Model Identification dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by