0
votes

Imagine I have a continous signal (e.g. a sine) and a periodic rectangular pulse (50%) (blue lines):

enter image description here

While the pulse is switching its state - and a little before and after (yellow line, 2nd plot) - I'd like the continious signal to remain constant. So when the second pulse = 1, there should be a little stair step in the original signal.

How can I implement this behaviour in Simulink?


I thought a simple Zero Order Hold within an enabled subsystem should be enough, but it returns the output from the previous enabled state, which is a little weird (yellow line, 1st plot).

Here you can find a minimal example to play with.:

enter image description here

1

1 Answers

3
votes

Replace your enabled subsysten with a triggerd subsystem / raising edge. Don't put any block in it, just leave the input connected to the output.

enter image description here