フィルターのクリア

How to convert symbolic expressions to transfer functions

165 ビュー (過去 30 日間)
Qian Feng
Qian Feng 2016 年 10 月 31 日
コメント済み: Walter Roberson 2023 年 8 月 7 日
I am encountering the problem of converting a symbolic expression to become a transfer function. Specifically, the linear system I am dealing with contains a non-constant distributed delay term which requires performing an integration to obtain the corresponding transfer function. However, it seems that the integration operator int cannot be applied with tf variables directly.
On the other hand, if there is a way to convert symbolic expressions to transfer functions, then this problem can be easily handled in symbolic setting first.
Thanks a lot
  3 件のコメント
Star Strider
Star Strider 2016 年 11 月 1 日
I suggested a similar approach yesterday. It’s apparently not a polynomial.
Qian Feng
Qian Feng 2016 年 11 月 2 日
編集済み: Walter Roberson 2016 年 11 月 2 日
Here is the code,
r = 1;
s = tf('s');
syms x
A4 = [-1 x; -1-x^3 -1];
Ap = int(A4*exp(x*s),x, -r, 0);
The reason why we have an integration there is because I am dealing with a distributed delay term in the time domain.
The problem is that it seems we cannot mix a tf variable with a symbolic variable here.
However, the aforementioned integration can be easily handle if s is a symbolic variable, which is the reason why I asked about how to transfer a symbolic entity into a tf one.

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

採用された回答

Walter Roberson
Walter Roberson 2016 年 11 月 2 日
  12 件のコメント
Paul
Paul 2021 年 2 月 27 日
Cool code. Siight mod to also handle the case when symExp is a constant.
syms s
symExp(s) = 5;
ExpFun = matlabFunction(symExp);
ExpFun = str2func(regexprep(func2str(ExpFun), '\.([/^\\*])', '$1'));
TF = tf(ExpFun(tf('s')));
TF
TF =
5
Static gain.
Sanjeet Kumar
Sanjeet Kumar 2023 年 3 月 2 日
Great, works well, Thanks!

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

その他の回答 (2 件)

HyunSang Park
HyunSang Park 2018 年 5 月 28 日
If you're just trying to find the peak value of the bode magnitude plot, might I suggest avoid using tf altogether? the peak value is when d(G(jw))/dw = 0. You can easily find the derivative with syms, and the plug in the w to the original tf.

Murugan venkatesan
Murugan venkatesan 2023 年 8 月 7 日
In order to analyze the bifurcation, the input impedance expression how to plot the bode graph..
  1 件のコメント
Walter Roberson
Walter Roberson 2023 年 8 月 7 日
I do not understand how people can use your answer to convert symbolic expressions to transfer functions? Could you show how your solution could be used for the example symExp = (s+2)/(s^2+5*s+9); ?

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

カテゴリ

Help Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by