I’m not sure that I clearly enough reflected the essence of a small problem in the title of the topic, but I’ll try to reveal its essence in the question itself.
https://www.wolframalpha.com/input/...
We have two signals.
If the signal is shifted more to the positive region (up along the $y-axis$), then we "mentally associate the $+1$ sign with it, if it is negative (down the $y-axis$), then we" mentally associate the $-1$ sign with it".
If both the positive and negative regions are approximately the same, then the DC component should be approximately equal to zero.
How is it possible to extract the DC component of the signal proportional to the displacement about the y-axis:
1. Use mathematical functions? If so, which ones?
2. Use filters? If so, which filter to choose to solve this problem?
I am an amateur in signal processing, I began to study this theme not so long ago.