# I have a mix signals (2 signals with different dc offset). How to recover another dc value which has been buried by the stronger dc value?

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.

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.

• 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. – Jazzmaniac May 22 '14 at 16:15
• 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. – annj May 22 '14 at 16:53
• 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. – MackTuesday May 22 '14 at 17:57
• If I use adaptive filter, am I able to get both dc signal? – annj May 22 '14 at 23:35
• 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. – geometrikal May 23 '14 at 13:18

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.

• 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. – annj May 23 '14 at 11:02

## Impossible?

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.

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.