ilaplace gives time limited result

조회 수: 1 (최근 30일)
Timo Dietz
Timo Dietz 2021년 10월 5일
댓글: Timo Dietz 2021년 10월 6일
Hello,
I try to apply a periodical pulse signal to a pT1 filter and to convert the result to the time domain.
When the code below is executed, I receive a time domain function, which returns NaN after a certain point in time.
This time point is independent of the chosen pulse period - here 0.2s. Up to 0.2s all looks good.
A sinusodial signal works as expected....
A = 20e3;
B = 10e3;
C= 47e-9;
H_filter = B/(C*A*B*s + (A + B)); % filter definition
T = 100e-3; % pulse period time
v = 10; % factor: pulse width pw = T/v;
Hper_pulse = (1-exp(-T/v*s)) / (s*(1-exp(-T*s))); % periodic pulse signal
in_t = ilaplace(Hper_pulse); % input signal time domain
fplot(in_t, [0 0.25]);
out_s = Hper_pulse * H_filter;
out_t = ilaplace(out_s); % output signal time domain
fplot(out_t, [0 0.25]);
in_t:
out_t:
Any ideas?
Thanks in advance
TD

채택된 답변

Paul
Paul 2021년 10월 6일
Sometimse fplot() gets confused. Does regular plot() show the expected result?
syms s
syms t real
A = 20e3;
B = 10e3;
C= 47e-9;
H_filter = B/(C*A*B*s + (A + B)); % filter definition
T = 100e-3; % pulse period time
v = 10; % factor: pulse width pw = T/v;
Hper_pulse = (1-exp(-T/v*s)) / (s*(1-exp(-T*s))); % periodic pulse signal
in_t(t) = ilaplace(Hper_pulse); % input signal time domain
tvec = 0:1e-4:1;
plot(tvec,double(in_t(tvec)));
out_s = Hper_pulse * H_filter;
out_t(t) = ilaplace(out_s); % output signal time domain
plot(tvec, double(out_t(tvec)));
  댓글 수: 3
Paul
Paul 2021년 10월 6일
편집: Paul 2021년 10월 6일
I wan't even aware thta eval() could be used with a symbolic expression as its input, so can't comment.
Timo Dietz
Timo Dietz 2021년 10월 6일
Maybe that's also the issue with fplot(). Eval() fails at the exact same time values as fplot() does.
Nevertheless, your approach works :-)

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by