Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented and tested Triggered{Mean, RectifiedMean, RootMeanSquare} #3916

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AHaumer
Copy link
Contributor

@AHaumer AHaumer commented Dec 13, 2021

I noticed that the blocks {Mean, RectifiedMean, RootMeanSquare} are extremely usefull to inspect the results of power electronics simulations, but they depend on constant frequency. Therefore I created a triggered version of these blocks.
Mathematically it is not correct to talk about these characteristc values, if the period of the input signal is not constant.
So the values during the periods of time with varying frequency are more or less an estimaton, but during peridos of time with constant frequency they are 100% correct.
The blocks react on the positive edge of the Boolean trigger signal. For instance, in applications with synchronous machines the trigger could be deduced from the angle of rotation - once per revolution or once per polepair.

@AHaumer AHaumer added enhancement New feature or enhancement L: Blocks Issue addresses Modelica.Blocks labels Dec 13, 2021
@AHaumer AHaumer self-assigned this Dec 13, 2021
Comment on lines +2315 to +2319
If parameter <strong>yGreaterOrEqualZero</strong> in the Advanced tab is <strong>true</strong> (default = <strong>false</strong>),
then the modeller provides the information that the mean of the input signal is guaranteed
to be &ge; 0 for the exact solution. However, due to inaccuracies in the numerical integration scheme,
the output might be slightly negative. If this parameter is set to true, then the output is
explicitly set to 0.0, if the mean value results in a negative value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid I do not understand the reason for the implementation of yGreaterOrEqualZero:

  • Is it a side effect that has to be suppressed or is this just a "normal" integration phenomenon?
  • It possibly shall be explained under which circumstances a slightly negative output occurs
  • What happens if -- in the above case -- the negative input is fed to the block in a simulation model:
    • Is then the output slightly positive (instead of negative)?
    • Shall we also implement countermeasure for this case?

Simulation results

  • Possibly some analytical reference signals shall be provided and compared to the triggered block calculations.
  • We shall then also explain in the documentation what signals shall be compared to each other.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was Introduced some time ago (I'm not sure who did that). The reason is simple:
The result of mean could be slightly negative due to numerical reasons, although the analytical result is zero.
This is annoying since Mean is used in RootMeanSquare, and RMS can only be greater or euqal to zero.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simulation results

  • Possibly some analytical reference signals shall be provided and compared to the triggered block calculations.
  • We shall then also explain in the documentation what signals shall be compared to each other.

@AHaumer this shall be provided to the users to better understand the purpose of the example(s)

@tobolar tobolar removed their request for review January 20, 2022 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement L: Blocks Issue addresses Modelica.Blocks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants