Data structure for system identification toolbox for multiple input multiple output data

Hello,
I'm trying to analyze data in the system identification toolbox.
The imput variables are time, pressure, angle and distance and the outputs are temperature values from T1 to T6, like in the attached data sheet.
I'm struggeling to get the data into the toolbox.
Can I load the whole data set into the toolbox?
This is what I tryied so far:
clc, close all, clear all
data = xlsread('MiMO.xlsx');
save MiMO.mat data;
load MiMO.mat
time=data(:,1);
pressure=data(:,2);
angle=data(:,3);
distance=data(:,4);
T1=data(:,5);
T2=data(:,6);
T3=data(:,7);
T4=data(:,8);
T5=data(:,9);
ST=1; % Sampling time in seconds
MiMO_Data=iddata(['time';'pressure';'angle','distance'],['T1','T2','T3','T4','T5'],ST);
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
MiMO_Data.ImputName={'time';'pressure';'angle','distance'};
MiMO_Data.OutputName={'T1','T2','T3','T4','T5'};
systemIdentification;
I used iddata structure to get the whole data into the system identification toolbox,
but the structure seems not right.

5 Kommentare

hello
before we even start with how to speak matlab code, simply look at the data :
pressure, angle and distance are constant all the time so you can't use that as input variables (as they don't vary )
also even if they vary we should ask ourself if they are input or output variables
basically , all yout T values just vary linearly with time but we don't have the "physical" input variable in your data
it could be that there is only one single independant input variable in your problem so it's basically even simpler to modelize.
Hello Mathieu,
thanks for your answer.
The data from the table is only exemplary and not relevant. They are only used to develop the method with which the real values are then analysed. They are just placeholders for the real data that I don't have yet. But they will have multiple input and output variables.
hello again
this line
MiMO_Data=iddata(['time';'pressure';'angle','distance'],['T1','T2','T3','T4','T5'],ST);
is wrong because instead of giving data to iddata, you're giving char arrays (with size error so that's why you get : Error using vertcat)
try this instead :
data = xlsread('MiMO.xlsx');
ST=1; % Sampling time in seconds
MiMO_Data=iddata(data(:,1:4),data(:,5:9),ST); % MiMO_Data=iddata(['time';'pressure';'angle','distance'],['T1','T2','T3','T4','T5'],ST);
whos
Name Size Bytes Class Attributes MiMO_Data 21x4x5 8247 iddata ST 1x1 8 double ans 1x33 66 char data 21x9 1512 double
Hello Mathieu,
thanks for your support.
Now it's working just fine.
Have a nice day.
hello Steffen
glad I could help
have a nice day too

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte

Version

R2021b

Gefragt:

am 14 Feb. 2025

Kommentiert:

am 17 Feb. 2025

Community Treasure Hunt

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

Start Hunting!

Translated by