Transfer functions of data

15 visualizzazioni (ultimi 30 giorni)
Amazing Trans
Amazing Trans il 4 Ott 2012
Hi there,
I have a csv file that have 3 column that consists of 3000 data. Column 1 is time in ms. Column 2 is the data of first value datas. (Commanded velocity) Column 3 is the data of second value datas. (Actual Velocity)
I would like to do a transfer function of the first with second. and plot a bode plot then find the natural frequency.
what i did was below. I guess tf is not the first thing i should be using to do a tf of 2 sets of values. Anybody know what i should use?
if true
% code
data = xlsread('data.csv');
Gc = tf(data(:,1),data(:,2))
<--- this is the part where it says the values of the "num" and den properties must be row vectors or cell arrays of row vectors, where each vector is nonempty and containing numeric data.
end
  2 Commenti
Azzi Abdelmalek
Azzi Abdelmalek il 4 Ott 2012
can you be more clear?
what Gc = tf(data(:,1),data(:,2)) means
Amazing Trans
Amazing Trans il 4 Ott 2012
I want a transfer function between a input and output. column 2 is the input, column 3 is the output/actual value.

Accedi per commentare.

Risposte (1)

Rajiv Singh
Rajiv Singh il 4 Ott 2012
Modificato: Rajiv Singh il 4 Ott 2012
If I understood the question, you want the transfer function between input, recorded in the second column, against y which is recorded in the third column. If so, you need a transfer function estimation function such as TFEST, or OE.
Ts = data(2,1)-data(1,1); % assuming uniform time grid
z = iddata(data(:,3), data(:,2), Ts)
model = tfest(z, 2); % second order transfer function

Categorie

Scopri di più su Linear Model Identification in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by