Creating PTn transfer function by

9 ビュー (過去 30 日間)
Ruben Dumas
Ruben Dumas 2020 年 3 月 26 日
コメント済み: Star Strider 2020 年 3 月 27 日
Hi
I have results ofthe response of a system on different inputs.
I want to create a couple transfer functions of the from TF = k/(Ts+1)^n, with n=1 or 2 or 3. So 'k' and 'T' need to be determined.
Is it possible in matlab to generate a response of this transfer function with unknown 'k' and 'T'. Because I would like to determine them by minimising the the mean square error of the response of the transfer function and the real response of the system.

採用された回答

Star Strider
Star Strider 2020 年 3 月 26 日
To fit them in the time domain:
syms k s T
TF1 = k/(T*s+1);
TF2 = k/(T*s+1)^2;
TF3 = k/(T*s+1)^3;
TF1t = ilaplace(TF1);
TF1fcn = matlabFunction(TF1t);
TF2t = ilaplace(TF2);
TF2fcn = matlabFunction(TF2t);
TF3t = ilaplace(TF3);
TF3fcn = matlabFunction(TF3t);
B0 = [T0; k0];
B = lsqcurvefit(@(b,t),TF1fcn(b(1),b(2),t), B0, xdata, ydata);
and similarly for the others, where ‘xdata’ and ‘ydata’ are the time and amplitude data.
The System Identification Toolbox, for all its strengths, is not intended for this sort of parameter estimation.
  2 件のコメント
Ruben Dumas
Ruben Dumas 2020 年 3 月 27 日
I did not expect an answer this quick, thank you!
It works for most simple input signals, but for something like a chirp signal I couldn't get it to run. I tried to laplace transform the input signal u(t) -> U(s) and multiply it with the TF1/2/3 so when I transform U(s)*TF1/2/3 back I could get y(t). But it works with multisine signals so it is not that big of a deal.
Thank you again for the answer!
Star Strider
Star Strider 2020 年 3 月 27 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSignal Radiation, Collection, and Reflection についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by