Having in the Time domain Input-Output spectrum. Get the model Transfer Function. Feed the Input to the model and get the predicted Output in the time domain.

Hello everyone, as the title says I used tfest and I got my transfer function but now I would like to feed that estimated transfer function with my input data and get the predicted output in the time domain. Can someone please say how I should do that?
Thanks

 Accepted Answer

I figured out in my own.
You have in the time domain input/output data and you want identify your system by using a transfer function.
1. Encapsulate your data in a iddata object as follow:
encapsulated_IO_data=iddata(output_data,input_data,sample_size_of_your_data);
2. Try to identify your system by using tfest:
sys = tfest(encapsulated_IO_data,1,0); % where 1 means 1 pole and 0, 0 zeros (for example)
3. And finally apply the funtion lsim to check (in the time domain) how much your transfer function is approximating its prediction to the measured output response.
[X,Tx] = lsim(sys,input_data,t); %X represents the output of your model to your input data
plot(X,output_data); % now you can compare visually your prediction versus your measured output

More Answers (0)

Asked:

on 4 Oct 2018

Edited:

on 6 Oct 2018

Community Treasure Hunt

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

Start Hunting!