Memory block for continuous signal

Hello,

I want to calculate the global min of a signal over a specific time. Here is my MWE :

It is inspired from an old topic on this forum : https://forum.plexim.com/t/how-to-identify-the-highest-value-of-a-signal-over-time

But this solution won’t work anymore because memory block won’t accept continuous signal. I’m using plecs 4.9.7.

Is there another way to do that ?

I tried use the ZOH to discretise the signal but this delay my signal.

Thanks,

Sincerely,

Paul

Hello Paul,

The error message you’re encountering is to prevent common modeling errors that can lead to undesirable results.

One solution is to place a Zero Order Hold (ZOH) block with a sample time of “-1”. This converts the continuous sine wave output to a value that is sampled every major time step, which is an appropriate input to the Memory block. The ZOH in this configuration does not introduce a delay, but rather will correctly represent that the value is constant between simulation steps. The only effective difference will be in the scope that you will see the staircase like discrete waveform instead of the interpolated continuous waveform.

Regards,

Bryan