How can I hold an impulse value for a given time period using Simulink?

조회 수: 3 (최근 30일)
Hancheol
Hancheol 2013년 8월 30일
Hi
I am doing some research using Simulink, and want to hold an impulse value for a given time period.
For example, if the input is an impulse at t = 10, that is,
x(t) = 1 (10 <= t <= 10.02), 0 (elsewhere),
then my desired output is the following:
y(t) = 1 (10 <= t <= 15), 0 (elsewhere).
In other words, I want to hold the impulse value (1) for five more seconds.
How can I do this?
Thanks in advance. :)

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 8월 30일
Use a zoh block with sample time set to 5
  댓글 수: 2
Hancheol
Hancheol 2013년 8월 30일
Hi Azzi Thanks for your answer. ;) You're right. I tried a simulation in which I had created an impulse, added a zoh, and got a successful result. But when I try this to my situation, it does not work. In my case the impulse (input) comes from an 'edge detector' block, and I'm wondering if this affects the results...
Azzi Abdelmalek
Azzi Abdelmalek 2013년 8월 30일
I think it's not a good solution, because the zoh block will hold during 5s the first value, if it's the high value of your pulse (suppose 1), then the zoh will hold the value 1 during 5s, and if it's 0, then 0 will be hold). We should find another solution

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by