Let say I have a time-varying signal which is a mixture of two signals with different dc offsets. If I apply the fft on that signal, I will only get the dc value (at f=0hz) with stronger energy. How can I obtain another dc value which has less energy?

Is there any other methods that I can use to extract both dc values? Please advice. Thank you.

Additional info:

I have a mix signal and it contains 2 signals with different frequency; one is at 20hz and another one is at 40hz. Also these 2 signals have different dc offsets. I am interested to obtain the dc offsets for both signals so I use the signal processing toolbox in Matlab to perform the FFT analysis in order to find the dc values (at f=0hz).

However,I found out that only dc value (measured in power spectral density) at 20hz appears at the resulted FFT. How do I know that the appear dc value is belong to 20hz? I know it because I firstly measured the 20hz signal individually and obtain its dc offset and then do the same thing for 40hz signal (from here I know that the dc value for 40hz is smaller than 20hz). Only then, I measured both signals concurrently to obtain the mix signals.

  • 4
    $\begingroup$ You don't get the stronger one - you get the sum of the two. So there's no way to extract either the stronger nor the weaker one without already knowing one of the two. $\endgroup$
    – Jazzmaniac
    May 22, 2014 at 16:15
  • $\begingroup$ Hi, thank you for your feedback. However, I don't think your assumption is correct. If you read again my post above, I have add extra information. I know which dc signal is strong and which is not since I measured them individually before I concurrently measuring both. $\endgroup$
    – annj
    May 22, 2014 at 16:53
  • 2
    $\begingroup$ Jazzmaniac's comment isn't an assumption, it's a direct result of the math. Without seeing your methods first hand I'd have to conclude you're making an error somewhere. $\endgroup$ May 22, 2014 at 17:57
  • $\begingroup$ If I use adaptive filter, am I able to get both dc signal? $\endgroup$
    – annj
    May 22, 2014 at 23:35
  • 3
    $\begingroup$ You can't get the two DC values from the mixture of the signals. You can only get the sum. To get the individual values you would have to do the fft of the individual signals. 0 DC is just the average of the signal. Your question is like asking "two numbers add to 6, what are they?". IF the resulting mixture has the same DC value as one of the signal then the other one must have a DC value of 0. $\endgroup$ May 23, 2014 at 13:18

2 Answers 2


In general, to be able to separate two signals, you need two different mixtures of there signals. It's very similar to solving a system of equations with two unknowns. You need two equations if you have two unknowns. If you simply have a signal which is a sum of two other signals, you cannot retrieve the individual components.

  • $\begingroup$ In my case I have two different mixtures of the signals in which I measured them concurrently which produced a signal, Vsum. If I use adaptive filtering, I'm afraid I will lose the weaker dc value. $\endgroup$
    – annj
    May 23, 2014 at 11:02


At first glance, it sounds like you are asking for the impossible.

Let me give you an analogy: let's replace "DC offset" ("0 Hz") with red marbles, "20 Hz" with green marbles, and "40 Hz" with blue marbles.

Imagine Bob dumps all of a jar of red and green marbles into the swimming pool. Then Mallory dumps all of a jar of red and blue marbles in the swimming pool.

Later, we make a measurement at a single point in time and find roughly 22 thousand red marbles, 10 thousand green marbles, and 5 thousand blue marbles in the pool.

So Bob's jar must have had about 10 thousand green marbles in it, and Mallory's jar must have had about 5 thousand blue marbles in it.

How many red marbles did Bob's jar have in it? It's not possible to calculate it from the given information.

more information

There are several ways to estimate the DC offset of these signals, but all of them require more information.

Off the top of my head, here are a few:

  • Somehow measure Bob's red marbles and Mallory's red marbles in isolation, before they are mixed together.
  • Somehow measure Mallory's red marbles in isolation, and then subtract that number from the total in the pool to estimate Bob's red marbles.

  • If one of the signals is somehow varying (say, it's connected for a second, then disconnected for a second, then connected again, over and over), then it's "DC" value can be estimated by doing a FFT of the mixture over a very long time, and looking at the the amplitude of mixed signal at the connect/disconnect rate (in this case, the 0.5 Hz bin). The "long time" is necessary to discriminate the 0.5 Hz bin from the ideal 0 Hz bin.

  • Make several measurements at different proportions. After Bob has dumped in half his jar and Mallory has dumped in a quarter of his jar, stop and count the total red marbles in the pool. Then count the total after both jars are completely emptied into the pool.

  • Try to measure the proportions of green to red. If you grab a handful of marbles from Bob's jar ahead of time, and you count 5 red marbles and 10 green marbles in your hand before returning them to Bob's jar, you can estimate that there are about half as many red marbles as green marbles in Bob's jar. So since we later find out there were about 10 thousand green marbles in Bob's jar, there must have been about 5 thousand red marbles in Bob's jar.

  • There's probably many other techniques, all requiring more information.

  • 1
    $\begingroup$ The first two wish the problem away. The third option modulates one unknown DC signal with a known 0.5 Hz envelope to make estimation possible via a known non-DC component, which relies on the other signal not having no energy at 0.5 Hz. The fourth option discovers that 2 signals can be reconstructed from two independent linear combinations, but the question states that only one such combination is available. And the fifth just estimates, so it's a variant of the first two options. Phonon is right. $\endgroup$
    – MSalters
    Jul 24, 2014 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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