MATLAB Answers

ilaplace returns unexpected answer

7 views (last 30 days)
I am having trouble understanding MATLAB's unability to find the inverse Laplace of delayed step response ( heaviside()).
For example, notice in the below code, the coefficient of "s" is "-3".
syms t s ;
f3=(exp(-6*s))/(s-4)
F=ilaplace(f3,s,t);
pretty(F);
which returns a fine answer of
heaviside(t - 6) exp(4 t - 24)
But, when I change the coefficient of “s” to “3” ( positive 3), I get the below answer.
/ exp(6 s) \
ilaplace| --------, s, t |
\ s - 4 /
what could be the problem! the hand written answer is heaviside(t + 6) exp(4 t + 24)
Appreicate the help.

  0 Comments

Sign in to comment.

Accepted Answer

David Goodmanson
David Goodmanson on 10 Nov 2020
Edited: David Goodmanson on 10 Nov 2020
Hi Abdulla,
You mention +- 3 as the coefficient, but are using +-6 in the actual example so I will stay with that. Looking at things the other way around, suppose s real for convenence, and replace 4 by n for generality. Then
Integral{0,inf} heaviside(t-A)*exp(-s*t)*exp(n*t) dt
= Integral{A,inf} exp(-s*t)*exp(n*t) dt
= (1/(s-n))*exp(-s*A)*exp(n*A) s > n A >= 0
The function exp(-6*t) has A = 6, giving heaviside(t-6). The integral is from 6 to inf, which works.
On the other hand, exp(6*t) has A = -6, giving heaviside(t+6) as you noted. But this implies
Integral{-6,inf} exp(-s*t)*exp(n*t) dt
which can't be, because the lower limit for t is 0. ilaplace doesn't know what to do, and punts.

  5 Comments

Show 2 older comments
David Goodmanson
David Goodmanson on 14 Nov 2020
Hi Paul,
Yes, I might have said that better. The integral in the second case is from t = -6 to inf, but by the definition of the laplace transform the region of integration is t >= 0. So the section of the integration from -6 to 0 is impossible. The same objection doesn't arise in the first case, where integration from 6 to inf does not conflict with t >= 0.
Paul
Paul on 14 Nov 2020
Setting aside what ilaplace does and just continuing with a math discussion ....
To derive your result I start with the one-sided Laplace transform, which is defined with limits of integration from t = 0 to t = inf (or from t = 0-epsilon to t inf if we care about Dircal delta functions). To evaluate that integral we use a change of variables that leads to your expression:
Integral{A,inf} (etc.). (with A < 0 for the case of interest)
But I started with the correct definition of the one-sided Laplace transform, so there must be some reason other than the defintion of the one-sided Laplace transform as to why that resulting integral can't be evaluated.
One possibility is that the one-sided Laplace transform is only defined for functions that themsevles are only defined over the domain t >= 0. In this case, the integrand is undefined (for A < 0).
However, is that limitation of the domain fundamentally required? Can the one-sided Laplace transform apply to functions that are defined over the domain -inf < t < inf, but limited to functions that must satisfy f(t) = 0 for t < 0? If this were allowed, would the integrand be well-defined?
A few references I've checked all state that f(t) is only defined for t>=0. But I don't know if that's just because those are the class of functionst that we typically care about, or if the whole process breaks down if we extend the domain to t<0 with the constraint f(t<0) = 0.
David Goodmanson
David Goodmanson on 17 Nov 2020
Hi Paul,
For another point of view It makes sense to calculate the inverse laplace transform, which involves an integral in the complex plane.
In what follows we have the lemma
h(t-c)*h(t-d) = h(t-max(c,d)) a)
With the one sided laplace transform, you start with the agreement that the integral in the time domain is 0 to inf. That's the same as saying that the function being transformed is h(t)*f(t). The function h(t)*f(t) can be zero for awhile after t = 0, but if can't spill into t <0.
For A > 0, the laplace transform of
h(t-A)*exp(n*t)
is
(1/(s-n))*exp(-s*A)*exp(n*A) s > n A >= 0
and doing the explicit inverse laplace transform goes right back to
h(t-A)*exp(n*t) = h(t)*h(t-A)*exp(n*t) % from a)
This is all in accord with everything happening for t>0.
For A < 0 the inverse laplace procedure applied to
(1/(s-n))*exp(-s*A)*exp(n*A)
still produces
h(t-A)*exp(n*t) A < 0
as you might expect. But this function has nonzero values for t < 0, and the inverse laplace transform does not meet the requirements. Also, saying
h(t-A)*exp(n*t) = h(t)*h(t-A)*exp(n*t) A < 0
does not work since
h(t)*h(t-A) = h(t) A < 0 % from a)

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!