Delayed step/ impulse response

조회 수: 149 (최근 30일)
Daniel Stankowski
Daniel Stankowski 2020년 1월 14일
답변: Paul 2020년 9월 20일
Hi everyone,
I would like to plot an impulse and step response of some arbitrary system sys1.
Normally I would use just a command impulse(sys1,t) or step(sys1,t) however the signals in my case are delayed.
1) The impulse is represented as: diract(t-5)
2) step is represeneted as: 1(t)-2*1(t)(t-tsw)
I know some people use an exponential function for it, but I am unsure why and how,
I would greatly appreciate any help

답변 (2개)

Raj
Raj 2020년 1월 14일
You have your system model and input signals equation. You can just generate your input signals and get the system response for those signals using lsim command.
  댓글 수: 2
Daniel Stankowski
Daniel Stankowski 2020년 1월 16일
Thanks for help but impulse as well as step does not work well with lsim.
I have solved the problem by using pure delay element.
So to plot impulse represented as diract(t-20) i did the folowing
impulse(exp(-20*s)*Tf,t)
where Tf is a closed loop transfer function of mine.
Thanks anyway!
Bill Tubbs
Bill Tubbs 2020년 9월 20일
It seems a shame that this wouldn't be possible as an option in stepDataOptions, similar to specifying the step amplitude. Something like this perhaps:
opt = stepDataOptions('StepTime',10,'StepAmplitude',2);
step(sys,opt)

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


Paul
Paul 2020년 9월 20일
Use the time invariance and lineraity properties of an LTI system. One approach is to generate the the nominal impulse or step response and then use apppropriate time shifing and superposition of the nominal outputs.
sys1 = tf(1,[1 1]);
tsw = 4.3;
t = 0:.01:10; % Important to define tnom such that tsw is one element of t. verify this
sum(t == tsw);
% nominal impulse response
ynom = impulse(sys1,t);
% delayed impulse response
yimp = 0*ynom;
yimp(t >=tsw) = ynom(1:sum(t >= tsw));
% nominal step response
ynom = step(sys1,t);
% first term
y1 = ynom;
% delayed and scaled second term
y2 = 0*ynom;
y2(t >=tsw) = 2*ynom(1:sum(t >= tsw));
% total output
ystep = y1 + y2;
plot(t,[yimp ystep]),grid

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by