Simulink modeling solution needed

Hi
I got struck in one of the simulink model design. prob is like this.... I get some series of constant values from a signal, it will be compared with some constant[for ex. 1.1]. if true, a counter is decremented[first initialized to zero] and that counter value is compared with 2nd threshold value[for ex. -10]. if threshold is reached i.e -10 or more, i need to reset the whole set up to 0 starting from decrement counter.
all the design should be done in simulink only. thanks in advance

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 10월 21일

0 개 추천

Use the "Discrete-Time Integrator" block from library Simulink>Discrete. It has an option to allow external reset.
Use the "Compare to Constant" block to compare your signal with a constant. Also, use the same block to compare the counter with -10 and then trigger the reset of the Integrator.
Or use a Unit Delay block, start off with this demo model, rtwdemo_counter.mdl.

댓글 수: 2

spoon
spoon 2011년 10월 22일
what if the signal is a series of constant numbers. ?
Fangjun Jiang
Fangjun Jiang 2011년 10월 22일
It will be same.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Additional Math and Discrete에 대해 자세히 알아보기

제품

질문:

2011년 10월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by