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

37 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by