필터 지우기
필터 지우기

How to reset a signal to zero after certain intervals in simulink?

조회 수: 50 (최근 30일)
rnayek
rnayek 2014년 6월 6일
댓글: rnayek 2014년 6월 9일
Let me first describe my problem. I am having a signal which comprises acceleration signal(for 20s) followed by zero signal (for 10s) and again followed by acceleration signal(for 20s) and again followed by zero signal (for 10s) and this goes on. Now I am also simultaneously integrating the acceleration signal to get the velocity. Now the problem I am facing is that during the period of zero acceleration I get a non-zero constant value of velocity(as obtained from the last integration of non-zero acceleration) which I want to reset to zero for each periods of the zero acceleration signals. Is there any way of doing that? Please help me!!

채택된 답변

Rashmil Dahanayake
Rashmil Dahanayake 2014년 6월 8일
편집: Rashmil Dahanayake 2014년 6월 8일
You need to create an external reset signal checking the acceleration zero instances. Then double click on integrator parameters an tick the check box external reset for initial condition. In your case initial condition should be zero.
Updated file attached

추가 답변 (1개)

Rick Rosson
Rick Rosson 2014년 6월 7일
The integrator block provides an option to allow you to reset the state variable using an external trigger signal. Please review the doc:
  댓글 수: 1
rnayek
rnayek 2014년 6월 8일
I tried doing what you said but still I am unable to resolve the issue. Would you please show me how to do reset a signal after certain time interval based on some external signal?? I am attaching my SIMULINK model; I implore you to make the necessary change in my model. Thanks in advance.

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

카테고리

Help CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by