필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Anna
Anna 2020년 2월 26일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dynamic System Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by