why exp(a*t) is not equal to ilaplace ((s*i-a)^-1) in matlab
Mostra commenti meno recenti
we know that one of the ways to obtain exp(A*t), when A is a n-by-n matrix is exp(A*t) = ilaplace [ (S*I-A)^-1 ] but the result of exp(A*t) and ilaplace [ (S*I-A)^-1 ] are not equal!
e.g
A = [-3 -1;2 1]
exp(A*t) = [ exp(-3*t), exp(-t) ; exp(2*t), 1]
ilaplace [ (S*I-A)^-1 ] = [ 2*exp(-2*t) - exp(-t), exp(-2*t) - exp(-t); 2*exp(-t) - 2*exp(-2*t), 2*exp(-t) - exp(-2*t)]
what is wrong?
Risposta accettata
Più risposte (3)
KJ N
il 9 Nov 2017
To help anyone else coming here: if you want to compute the matrix exponential e^(A t), where A is a n x n square matrix and t is a variable, and you DO NOT want to do simply do the by-element exponential, i.e. you want to compute the equivalent of the inverse Laplace of s*eye(n)-A, which is important in state-space analysis of linear systems, you want to use expm(A*t), not exp(A*t).
>> A = [0 1; -2 -3]
A =
0 1
-2 -3
>> syms t;expm(A*t)
ans =
[ 2*exp(-t) - exp(-2*t), exp(-t) - exp(-2*t)]
[ 2*exp(-2*t) - 2*exp(-t), 2*exp(-2*t) - exp(-t)]
>> syms s;ilaplace(inv(s*eye(rank(A))-A))
ans =
[ 2*exp(-t) - exp(-2*t), exp(-t) - exp(-2*t)]
[ 2*exp(-2*t) - 2*exp(-t), 2*exp(-2*t) - exp(-t)]
Youssef Khmou
il 3 Lug 2013
hi Sina,
first you have to use the element wise operator in the power :
try :
syms t s;
A=[-3 -1;2 1];
F1=exp(A.*t);
F2=abs(ilaplace((s*(sqrt(-1))-A).^(-1)));
One problem that exist is on the imaginary part of t .
2 Commenti
Sina
il 3 Lug 2013
Youssef Khmou
il 3 Lug 2013
ok then, it gives almost the result not like the one you posted :
syms t s;
A=[-3 -1;2 1];
F1=exp(A.*t);
F2=(ilaplace((s*eye(2)-A).^(-1)))
Greg Heath
il 3 Lug 2013
0 voti
In addition to the surprising fact that you did not post your exact code, your expression for exp(A*t) is incorrect.
Categorie
Scopri di più su Geoscience in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!