fitting a transfer function from acquired data with tfest

조회 수: 9 (최근 30일)
Maxim
Maxim 2012년 11월 26일
Hi,
I would like to fit a transfer function with data I have acquired. I am using the tfest function for this but the function isn't fitting the kind of transfer function I need. I know that my transfer function has the form:
N = [x 0]
D = [a b c d 1]
with this knowlegde I have detailed in the function that I need 1 zero and 4 poles. But tfest doesn't get my nominator right. It always adds a constant in my nominator wich ruins my fit...
can someone help me with this?
thank you!

답변 (1개)

Rajiv Singh
Rajiv Singh 2012년 11월 26일
What do you mean by "nominator"? N or D? Note that IDTF creates transfer functions that have a monic polynomial for the denominator (D). In general, if you want to fix certain entries to their known values, you have to do a multi-step construction:
N = [NaN 0];
D = [1 NaN(1,3), 1];
% say, you want N(2) and D(end) to be fixed.
model = idtf(N,D);
model.Structure.num.Free(2) = false;
model.Structure.den.Free(end) = false;
model = tfest(data, model);
  댓글 수: 2
Maxim
Maxim 2012년 11월 27일
thank you, I can do the fit in the right form. But the fit itself is very bad.. it does not even come close to my data
Rajiv Singh
Rajiv Singh 2012년 11월 27일
Difficult to say why without looking at the data. But fixing parameters can adversely affect the quality of the fit. You may try a free form estimation, get the model with a good fit and then reduce it or transform it to get it in the form you want. You can then even update the coefficients of the final form to improve fit to data.
model1 = tfest(data, Np, Nz);
model2 = some_reduction_of_model1_to_get_desired_form;
model2refined = tfest(data, model2);
The problem usually is bad initialization of the model coefficients by the estimator in presence of constraints. In the code snippet I gave earlier, you can try replacing NaNs with finite values obtained from your own intuition into what those values ought to be. You can then study the effect of initial guesses on the quality of the final results and perhaps use that as a guide to converge to good results.

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

카테고리

Help CenterFile Exchange에서 Transfer Function Models에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by