Borrar filtros
Borrar filtros

Laplace domain vs. transfer function : not same result?!!

1 visualización (últimos 30 días)
Anna
Anna el 26 de Feb. de 2020
Dear all,
I am currently trying to get the time-domain response equation of a system. So I tried implementing it in Matlab. First, I did it by using sym variables and completing my calculation in laplace domain, and then inversing it to time-domain. However, the result didn't look like it should. So then, I defined a transfer function via tf and used lsim to compute the result. Here's my script:
syms alpha s H
% system definition and response calculation to gate function 1
system = 1/(s + 1/alpha);
response_gate_1 = ilaplace(1/s * (1-exp(-s*H)) * system);
% definition of variable values
alpha = 15;
H = 32;
t = 0:100;
% system definition and response calculation to gate function 2
sys = tf(1,[1 1/alpha]);
u_ = double(subs(ilaplace(1/s * (1-exp(-s*H)))));
response_gate_2 = lsim(sys,u_,t);
% plot of both results
figure(1)
plot(t,subs(response_gate_1))
hold on
plot(t,response_gate_2)
I am wondering now, why both results are not looking the same? I.e. why lsim (orange curve) gives me a correct result and my first calculation (blue curve) not? The thing is, that I would like to get the function in time-domain and not a vector with the results as I get using lsim...
Any comments on that? Probably it's just a stupid little mistake I made somewhere...
Thanks a lot,
Anna

Respuestas (0)

Categorías

Más información sobre Dynamic System Models en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by