How to obtain transfer function coefficients from data plot?
17 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Derek Johnson
el 9 de Dic. de 2020
Comentada: Star Strider
el 13 de Dic. de 2020
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 comentarios
Respuesta aceptada
Mathieu NOE
el 9 de Dic. de 2020
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
2 comentarios
Más respuestas (1)
Star Strider
el 11 de Dic. de 2020
‘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 comentarios
Star Strider
el 13 de Dic. de 2020
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.
Ver también
Categorías
Más información sobre Transfer Function Models en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




