Hello,
I try to obtain the maximum value of a continuous variable. For this I have used two different approaches:
For the two approaches u = input and y = output (i.e. the max value of u)
1 - y=max((u), y)
This solution involvess non-linear solving and makes th e simulation heavier.
2- Detection of a max value by using a derivative of the input signal u. Comparing this value with the precendent detecting local maximum and keeping the bigger (bloc triggeredMax in the standard Modelica Library).
This solution requires a derivation and is not efficient in case of a monotonic varaition of the input signal.
Do you know another more efficient solution ?
Thanks in advance.