Hi, I have 3 columns, time(in s), output(in V), input(in V) respectively, where by using iddata, is it correct for me to determine the ['Frequency',time] in seconds ? or should i do it in frequency (Hz)
tf = iddata(data(:,2),data(:,3),'Frequency',time)
sys = tfest(tf,2)
By using the system identification app, after importing the output and input values and estimation using state space model it turns that that the order is 2. Is it right for to to key in [tfest(tf,2)] in this case ? Or doing it wrongly?
Any help is appreciated !

 채택된 답변

Star Strider
Star Strider 2017년 2월 3일

2 개 추천

I would use this syntax (from the documentation):
  • data = iddata(y,u,Ts) creates an iddata object containing a time-domain output signal y and input signal u, respectively. Ts specifies the sample time of the experimental data.
Specifically with respect to your data, I would do something like this:
time = data(:,1);
Ts = mean(diff(time));
time_data = iddata(data(:,2),data(:,3),Ts);
freq_data = fft(time_data);
freq_units = freq_data.units;
Fr = freq_data.frequency;
sys = tfest(freq_data,2)
NOTE I do not have your data so this is UNTESTED CODE. I cannot be certain it will work without modification.

댓글 수: 4

Hi Star Strider !
My apologies for the late reply, i tried out your code and it plotted out a graph (assuming that it's correct), it gave the comment
if true
Status:
Estimated using TFEST on frequency domain data "freq_data".
Fit to estimation data: 100% (simulation focus)
FPE: 1.778e-10, MSE: 1.773e-10
end
May i ask why the estimation data actually does ? (since it waver between the %)
Your help is greatly appreciated ! Thank for you your patient , hope to hear from you
Star Strider
Star Strider 2017년 2월 5일
Waking up here ...
My pleasure!
The tfest told you that it was able to fit your data, and that it did so quite accurately. I cannot find anything in the R2016b documentation that explains the output you got, so there could be version differences. The mean squared error (MSE) is on the order of machine precision, so the fit to your data are excellent!
Niam
Niam 2017년 2월 6일
Thanks again for the clear explanation ! It have benefited me in many ways for understanding ! (:
Star Strider
Star Strider 2017년 2월 6일
My pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2017년 2월 3일

0 개 추천

The 'Frequency' parameter should have frequencies. If you have sample times then pass them as the third parameter with no 'Frequency' option; https://www.mathworks.com/help/ident/ref/iddata.html

댓글 수: 1

Niam
Niam 2017년 2월 3일
I understand for this part now , do you have any idea for the System identification app ?

댓글을 달려면 로그인하십시오.

카테고리

질문:

2017년 2월 3일

댓글:

2017년 2월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by