Problems using 'tfest' for generating transfer function

46 views (last 30 days)
Hello guys...
I am trying to find a transfer function for my signal, that matches with the moving average block of my signal. I used tfest to recreate the signal using the generated coefficients. However, the accuracy is very low at 2%. I am wondering how to increase it, or am I doing something wrong.
In another case, to verify whether the function works, I tried with tf = 1/(s+1), generated the signals, used 'tfest' to get the transfer function, I got 0.1404/(s+0.1998) , which is way-way off.
let me know what you think of this.
Have a nice day..
data_0= iddata(T_avg_mean,T_pedal,0.01);
>> tf_estimated = tfest(data_0,2)
tf_estimated =
From input "u1" to output "y1":
-0.0188 s + 0.005945
--------------------------
s^2 + 7.891e-06 s + 0.4232
Continuous-time identified transfer function.
Parameterization:
Number of poles: 2 Number of zeros: 1
Number of free coefficients: 4
Use "tfdata", "getpvec", "getcov" for parameters and their uncertainties.
Status:
Estimated using TFEST on time domain data "data_0".
Fit to estimation data: 2.051%
FPE: 128.3, MSE: 128.3
  10 Comments
RITAM BASU
RITAM BASU on 28 Nov 2022
I dont have any problems... The process is exactly as per my requirement...But the values were not satisfactory.. that is why i made further comments.. Thanks a lot for your help again..
Have a nice day...

Sign in to comment.

Accepted Answer

Mathieu NOE
Mathieu NOE on 8 Nov 2022
Moved: Mathieu NOE on 17 Nov 2022
hello again
here a bunch of files to post process your data
I don't have the ID toolbox but I have the Signal Processing Tbx ( I use invfreqz to get the num/den model from a frequency domain model (cf Bode plot)
the Bode plot and coherence plot is obtained with my function mytfe_and_coh.m (also attached)
coherence plot is also good to have to make sure the input signal (x) has energy distributed accross the entire frequency range (otherwise the results may be inaccurate in frequency domain that has been poorly excited);
I don't put all the codes here in the window otherwise it's gonna be very clutered
see the attachements and maybe that can help you
see identified models Bode plots are precisely matchind the tfe Bode plot
NB : I identified the models in the discrete domain, use d2cm to get back to continuous if needed

More Answers (0)

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!