Implemented and tested Triggered{Mean, RectifiedMean, RootMeanSquare} - #3916
Open
AHaumer wants to merge 5 commits into
Open
Implemented and tested Triggered{Mean, RectifiedMean, RootMeanSquare}#3916AHaumer wants to merge 5 commits into
AHaumer wants to merge 5 commits into
Conversation
AHaumer
requested review from
GallLeo,
MartinOtter,
christiankral,
dietmarw and
tobolar
December 13, 2021 17:37
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 ≥ 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. |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
There was a problem hiding this comment.
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
removed their request for review
January 20, 2022 09:27
dietmarw
removed their request for review
January 23, 2026 09:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.