How to obtain transfer function coefficients from data plot?
조회 수: 19 (최근 30일)
이전 댓글 표시
Hi all,
I am trying to model the air fuel ratio response to different NOx inputs, and I would like to obtain my system of ODE's from this data.

NOx_i = readtable('NOxIN.csv');
AFR_o = readtable('afrOUT.csv');
AFR_time=AFR_o{:,1};
AFR_val=AFR_o{:,2};
save('AFRout.mat','AFR_time','AFR_val');
load('AFRout.mat','AFR_val');
[AFR_num,AFR_den] = tfdata(AFR_val);
I have extracted the data points and imported them to matlab using readtable, currently as two seperate tables containing time and NOx, and time and AFR. I am currently trying this code to get the transfer function coefficients, but I don't think I am giving the tfdata function the proper input type. It needs to recieve a dynamic system input, but I'm unsure how to get my two tables and data sets into a system that can be read by tfdata.
Any help or suggestions would be greatly appreciated!
댓글 수: 0
채택된 답변
Mathieu NOE
2020년 12월 9일
hello
you need to use tfest
sys = tfest(data,np) estimates a continuous-time transfer function sys using the time-domain or frequency-domain data data and containing np poles. The number of zeros in sys is max(np-1,0).
just looking at the curves , it seems the relationship between the two is a simple as a first order polynomial (because the two curves are very similar only mirrored)
so if it does not work with tfest , I would try to fit a polynomial
추가 답변 (1개)
Star Strider
2020년 12월 11일
‘Is there any way I can get these two sets of data on the same continous time domain?’
Use the Signal Processing Toolbox resample function on both signals using either the same time vector, or the same sampling frequency (these are both options). After that, you should be able to use the System Identification Toolbox funcitons with the resampled signals.
댓글 수: 8
Star Strider
2020년 12월 13일
I suggested plotting the imaginary component of the Fourier transform in order to estimate with reasonable accuracy the number of poles and zeros if the system you are identifyting. It likely has no other utility than that, since the Bode plot of the identified system will simulate it for you and plot the estimated transfer function.
참고 항목
카테고리
Help Center 및 File Exchange에서 Transfer Function Models에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




