How do I use Inverse LaPlace Transform

8 visualizaciones (últimos 30 días)
Anthony Mullins
Anthony Mullins el 10 de Mzo. de 2021
Editada: Walter Roberson el 10 de Mzo. de 2021
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.

Respuestas (1)

Walter Roberson
Walter Roberson el 10 de Mzo. de 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 comentarios
Anthony Mullins
Anthony Mullins el 10 de Mzo. de 2021
Why do I need to use the syms the default is s and I am already in s variables. I also have no idea how to do the rest.
Walter Roberson
Walter Roberson el 10 de Mzo. de 2021
Editada: Walter Roberson el 10 de Mzo. de 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, " + ")
ans = "1000 s^6 + 50000 s^5 + 1100000 s^4 + 13000000 s^3 + 90000000 s^2 + 300000000 s^1 + 1000000000 s^0"
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)
H = 100 s^4 + 4000 s^3 + 70000 s^2 + 600000 s + 3e06 ------------------------------------------------------------------------- 1000 s^6 + 50000 s^5 + 1.1e06 s^4 + 1.3e07 s^3 + 9e07 s^2 + 3e08 s + 1e09 Continuous-time transfer function.
N = H.Numerator
N = 1x1 cell array
{1×7 double}
D = H.Denominator
D = 1x1 cell array
{1×7 double}
syms s t
time_domain = cellfun(@(n,d) simplify(ilaplace(poly2sym(n,s)/poly2sym(d,s), s, t)), N, D)
time_domain = 
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)

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by