ModelicaStandardLibrary icon indicating copy to clipboard operation
ModelicaStandardLibrary copied to clipboard

Implement continuous version of SignalExtrema

Open AHaumer opened this issue 2 years ago • 2 comments

Triggered by a discussion with @GallLeo and looking into #3762, I developed a continuous block to detect signal extrema, based on derivative. It works for non-differentiable inputs, too.

AHaumer avatar Jul 29 '22 10:07 AHaumer

@dietmarw @AHaumer We had a discussion in https://github.com/modelica/ModelicaStandardLibrary/pull/3762#issuecomment-796930746 regarding whether or not the name shall contain Continuous or Sampled not. I think we are back to this point. One simple way out is to move the models:

  • Modelica.Blocks.Math.ContinuousSignalExtrema => Modelica.Blocks.Math.Continuous.SignalExtrema
  • Modelica.Blocks.Math.SignalExtrema => Modelica.Blocks.Math.Discrete.SignalExtrema

christiankral avatar Sep 06 '22 12:09 christiankral

I think the proposal of @christiankral is the way to go.

dietmarw avatar Sep 06 '22 13:09 dietmarw

I think the proposal of @christiankral is the way to go.

@AHaumer @HansOlsson @MartinOtter do you have any objections

christiankral avatar Oct 16 '22 21:10 christiankral

As already mentioned by @dietmarw in https://github.com/modelica/ModelicaStandardLibrary/pull/3762#issuecomment-789551941, it might be worth to point again to the LastLib proof of concept how to calculate the signal extrema without events or derivatives.

beutlich avatar Nov 16 '22 20:11 beutlich