# Subtracting signals to re-construct the middle

Below image represents a sample of some of my captured data. There are three waves if you will. The middle wave has a very large dip ( cluttered by noise ) .

My goal here is to try and resurrect the middle wave to be noise free ( as much as possible ) . I will know I succeeded when the middle wave looks very 'similar' to the other two .

Here is what I am thinking, but I am not sure if the idea I have in mind is mathematically correct.

Given the red portion ( samples between 1920 to 2080 ) and the yellow portion ( samples between 2020 to 2170 ), I can take two FFT's. I can then determine the frequency that is dominant in both sample sets. If I take the average between these two ( FFT from red portion and FFT of yellow portion ), would that give me a mathematically correct estimation of what the middle wave should be?

## 1 Answer

No, you can't restore a low - frequency signal by DFT of its parts due to the periodic DFT nature and because
$$IDFT(DFT( \frac{U(t) + V(t)}{2})) == \frac{U(t) + V(t)}{2}$$ by definition.
You can apply filtering or smoothing to remove the high - frequency noise.