0

I am interested in designing a simulink block which detects if the past 4 and the current input values are same or not. How to do it using the delay blocks and relational operators since the relational operators take only two inputs at a time?

1 Answer 1

1

I think if you 4 Unit Delay blocks in succession, you will get the previous 4 values by looking at the output of each block. You didn't say whether you were using a fixed-step or variable-step solver. Normally, you should be using a fixed-step solver for this type of operation.

With regards to the equality test, I would recommend comparing the absolute value of the difference between the 2 numbers to a small threshold rather than doing a pure equality test, especially if your signals are of the double data type. The blocks you need for that are:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.