Contenuto principale

La traduzione di questa pagina non è aggiornata. Fai clic qui per vedere l'ultima versione in inglese.

Conversione dei dati della matrice MIMO in tabella orario per la stima del modello a tempo continuo

Stimare una funzione del modello a tempo continuo convertendo prima i dati della matrice in una tabella orario.

Caricare i dati, che comprendono la matrice di input usteam, la matrice di output ysteam e il tempo di campionamento Ts.

load sdatasteam.mat usteam ysteam Ts

Combinare usteam e ysteam nella tabella orario singola ttsteam. Per creare una variabile per ciascun canale, è necessario specificare esplicitamente ogni colonna della matrice.

tts = timetable(usteam(:,1),usteam(:,2),ysteam(:,1),ysteam(:,2),...
    'rowtimes',seconds(Ts*(1:size(usteam,1))));
head(tts,4)
      Time       Var1       Var2        Var3        Var4   
    ________    _______    _______    ________    _________

    0.05 sec    -1.5283     2.0584     0.57733     -0.12274
    0.1 sec      1.4412     -2.005     0.75804    -0.086114
    0.15 sec     1.4314     2.0584    -0.76577     -0.19845
    0.2 sec      1.4412    -1.9806     0.47721     -0.20577

Stimare un modello stato-spazio a tempo continuo.

nx = 3;
sysc = ssest(tts,nx,'InputName',["Var1" "Var2"],'OutputName',["Var3" "Var4"]);

Paragonare il modello con i dati.

compare(tts,sysc)

Figure contains 2 axes objects. Axes object 1 with ylabel Var3 contains 2 objects of type line. These objects represent Validation data (Var3), sysc: 90.8%. Axes object 2 with ylabel Var4 contains 2 objects of type line. These objects represent Validation data (Var4), sysc: 62.29%.