How can I convert a transfer function into time dependent using ilaplace

39 ビュー (過去 30 日間)
Tejas
Tejas 2013 年 10 月 17 日
コメント済み: lithika 2014 年 2 月 28 日
I have tried to use ilaplace
X2=(F*G3+C*G3)/(1+C*G3); % F,G3,C are transfer functions generated using tf
v=sym('X2');
x=ilaplace(v);
then i use it to plot a function using plot but when i try to run the code i get an error as shown below
??? The following error occurred converting from sym to double: Error using ==> mupadmex Error in MuPAD command: DOUBLE cannot convert the input expression into a double array.

回答 (1 件)

Jonathan LeSage
Jonathan LeSage 2013 年 10 月 17 日
The ilaplace function works on symbolic expressions and not transfer function models. You need to convert the transfer function, X2, into a symbolic expression prior to using the ilaplace function.
Here are some links to some relevant functions:
To get you started, here is some example code of one potential method of conversion:
% Your transfer function model
X2 = (F*G3+C*G3)/(1+C*G3);
% Extract the numerator/denominator
[num,den] = tfdata(X2);
% Build symbolic expression using the numerator/denominator
syms s
arrayNum = cell2mat(num);
arrayDen = cell2mat(den);
X2_symbolic = poly2sym(arrayNum,s)/poly2sym(arrayDen,s);
% Valid usage of ilaplace on a symbolic
x = ilaplace(X2_symbolic);

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by