How do I use Inverse LaPlace Transform
11 views (last 30 days)
Show older comments
I need to inverse LaPlace transform this.
clc; clear all; close
num=[100 4000 70000 600000 3e6];
den=[1000 5e4 1.1e6 1.3e7 9e7 3e8 1e9];
pfract(num,den)
H=tf(num,den)
damp(H);
Output =
From input 1 to output:
-1.329e-17 s + 0.01076
----------------------
s^2 + 32.47 s + 324.7
From input 2 to output:
1.167e-17 s + 0.03493
---------------------
s^2 + 15.55 s + 155.5
From input 3 to output:
3.961e-18 s + 0.05431
---------------------
s^2 + 1.981 s + 19.81
Continuous-time transfer function.
The output is in partial fraction form. I need the inverse to get into the time domain for all three inputs.
I have tried using ilaplace(H) and I get this error.

0 Comments
Answers (1)
Walter Roberson
on 10 Mar 2021
you need to use the symbolic toolbox. Query the coefficients for the tf to get cell arrays of numeric coefficients. Use poly2sym to construct symbolic polynomials. Divide appropriate parts. ilaplace.
2 Comments
Walter Roberson
on 10 Mar 2021
Edited: Walter Roberson
on 10 Mar 2021
The s you see in your transfer functions is not a symbolic variable: it is a label introduced into the display. Sort of like
den=[1000 5e4 1.1e6 1.3e7 9e7 3e8 1e9];
exponent = length(den)-1:-1:0;
strjoin(den + " s^" + exponent, " + ")
Just text, not an actual variable.
Your pfract() is not part of MATLAB; it appears to be part of a textbook; code can currently be found at https://www.scribd.com/document/177697560/Chapter-13-m-files-docx . I am not going to type it in for this purpose, so I will work just on the easy transfer function, H:
num = [100 4000 70000 600000 3e6];
den = [1000 5e4 1.1e6 1.3e7 9e7 3e8 1e9];
H = tf(num,den)
N = H.Numerator
D = H.Denominator
syms s t
time_domain = cellfun(@(n,d) simplify(ilaplace(poly2sym(n,s)/poly2sym(d,s), s, t)), N, D)
You will notice that this is expressed in terms of roots of polynomials of degree 6. Unfortunately MATLAB does not offer any way of expanding those even for degree up to 4. https://www.mathworks.com/matlabcentral/answers/618168-how-do-i-plot-an-inverse-laplace-symbolic-to-vectorized-equations#answer_517418
I could write code that broken upon those sums of roots, but it is a nuisance to get right as the roots are not used directly (they are used in exp(ROOT*t) for example)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!