필터 지우기
필터 지우기

I want to perform inverse Laplace transform but my code does not seem to work

조회 수: 13 (최근 30일)
I am trying to perform inverse Laplace transform the following way, but I am getting an answer that is not satisfying.
syms s K tau a
fun2 = ((60*K*(exp(-a*s)))/tau)/(s*(s + 1/tau));
y2 = ilaplace(fun2);
pretty(y2)
/ exp(-a s) \ K ilaplace| -------------, s, t | 60 | / 1 \ | | s | s + --- | | \ \ tau / / ------------------------------------ tau
I am getting the answer that code shows, but it is not helpful as it does not perform the Laplace inverse transform. I do not know how to solve the problem.

채택된 답변

Paul
Paul 2023년 10월 27일
Hi Carlos,
ilaplace assumes that all signals are causal, which wouldn't be true in this case if a < 0.
Add the appropriate assumption, and ilaplace returns a closed-form expression.
syms s K tau a
assume(a >= 0)
fun2 = ((60*K*(exp(-a*s)))/tau)/(s*(s + 1/tau))
fun2 = 
y2 = ilaplace(fun2)
y2 = 
  댓글 수: 4
Paul
Paul 2023년 10월 27일
You may be more familiar with the term unit step, or step, function, rather than Heaviside function.
It shows up in y2 as a result of the time shift property of the unilateral Laplace transform:
f(t-a)*u(t-a) -> exp(-a*s)*F(s) , a > = 0
u(t) is the same as heaviside(t)
y2(a) = 0 regardless of the value of heaviside(0).
Paul
Paul 2023년 10월 27일
Also, you have to be careful with Matlab if you want to apply the time shift property by hand because ilaplace does not always tack on the heaviside to the result like it should (others may have different opinion).
For example
syms s K tau t a
assume(a >= 0)
fun2(s) = ((60*K)/tau)/(s*(s + 1/tau))
fun2(s) = 
y2(t) = ilaplace(fun2)
y2(t) = 
Now, if we want to find the ilapalce of exp(-a*s)*fun2(s), it's tempting to just shift y2(t) to the right by a
y2(t-a)
ans = 
whch is incorrect. Instead, we have to tack on the heaviside to the y2(t) first and then shfit
y2(t) = y2(t)*heaviside(t);
y2(t-a)
ans = 
which is the same result as above (after canceling tau in result above).

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by