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.


enter image description here

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.


DC component is the zero frequency component. If you look at the DFT expression, this would mean summing up the input. So in mathematical terms this would be the sum (or the running sum) based on your application.

In terms of filtering again this would be an averaging filter. Like moving average.

  • $\begingroup$ I tried the moving average filter and got the following result. Input_Output Moving Average Obviously, the filter itself also needs to be configured. If the dc component is a signal at zero frequency, maybe try filter synthesis, which will firmly cut off all frequencies, just above zero. Is an elliptical filter suitable for this? $\endgroup$ – dtn Jun 5 '20 at 7:22
  • $\begingroup$ You would need to tweak the length of moving average based on application. I have given a similar answer on a different question, there the question was extracting DC for analog signals...but I have illustrated the digital way as well. dsp.stackexchange.com/questions/66770/… $\endgroup$ – Dsp guy sam Jun 5 '20 at 7:32
  • $\begingroup$ Is it implementable in Simulink? $\endgroup$ – dtn Jun 5 '20 at 7:35
  • $\begingroup$ Havnt tried it in simulink, but shouldn't be more than 20 lines of MATLAB code $\endgroup$ – Dsp guy sam Jun 5 '20 at 7:38
  • $\begingroup$ On the other hand, in Simulibk there are great opportunities for working with filters. Maybe all the same, we may choose one of them (Chebyshev, Butterworth, Elliptical, etc.)? Which one is good for this? $\endgroup$ – dtn Jun 5 '20 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.