How to find the frequencies, amplitudes, and initial phases of the original signals from a sum of the signals?

1.1k Views Asked by At

I have checked the other related posts (see 1 and 2), but it didn't solve my problem which is explained below:

Consider three simple sine waves as follows:

$$ x_{1}=a_{1} \sin \left (\omega_{1} t+\phi_{1} \right ) \\ x_{2}=a_{2} \sin \left (\omega_{2} t+\phi_{2} \right ) \\ x_{3}=a_{3} \sin \left (\omega_{3} t+\phi_{3} \right ) $$ where $x_{i}$ is the instantaneous value of the corresponding signal, $a_{i}, \omega_{i}$ and $\phi_{i}$ are the amplitude, frequency and phase respectively.

If I add these three waves, I will get

$x=x_{1}+x_{2}+x_{3}$

How can I get back the amplitude, frequency and phase values of the component signals from $x$?

3

There are 3 best solutions below

1
On BEST ANSWER

Consider the Fourier transform of $x(t)$, let us call it $X(\omega)$. Since the Fourier transform is linear and $x(t) = x_1(t)+x_2(t)+x_3(t)$ we have $X(\omega)=X_1(\omega)+X_2(\omega)+X_3(\omega)$. For $x_i(t) = a_i \sin(\omega_i \cdot t + \phi_i)$ we have $X_i(\omega) = \jmath \pi a_i \left(\delta(\omega+\omega_i)- \delta(\omega-\omega_i)\right)$ where $\delta(\omega)$ is the Dirac delta "function". Therefore, the Fourier transform of $x(t)$ is given by $$X(\omega) = \sum_{i=1}^3 \jmath \pi a_i {\rm e}^{\jmath \phi_i}\left(\delta(\omega+\omega_i)- \delta(\omega-\omega_i)\right).$$ Therefore, if the frequencies are distinct, in theory all you have to do is to find the delta "peaks" in the spectrum. Their location will tell you the frequencies $\omega_i$, their complex amplitude will give $a_i$ (magnitude) and $\phi_i$ (phase).

Of course in practice we are usually faced with the situation that we do not have the entire function $x(t)$ available but only a limited number of samples of $x(t)$. In this case, the problem is called harmonic retrieval and has been very well studied in the literature. There are non-parametric ("low resolution") schemes based on the DFT (which can identify frequencies only if they are separated by more than one over the observation window) as well as parametric schemes that achieve a resolution that is only limited by the amount of additive noise (look for things like Capons method, Prony method, the MUSIC algorithm, ESPRIT). Alternatively, you can always use a maximum likelihood estimator. Such methods should be covered in most textbooks on digital signal processing.

If the frequencies are not distinct, the problem does not have a unique solution, see John's answer.

1
On

First, there's no solution to this problem in general. For suppose that all three frequencies are $1$, all three phases are zero, and $a_1 = 1, a_2 = 2, a_3 = 3$. Then $x(t) = 6\sin(t)$. From this, it's impossible to recover the values of the $a_i$, for $a_1 = 6, a_2 = a_3 = 0$ is an equally good answer.

Second, you're only going to be able to recover the frequencies/amplitudes up to sign, because $A \sin(kt) = (-A) \sin ((-k)t)$, and the phases up to an additive multiple of $2\pi$.

And, of course, the solutions can be permuted: you cannot, even when you've broken the signal into three parts, know which one came from $x_1$, which from $x_2$, and which from $x_3$.

Now let's assume that the frequencies are all different, but unknown. One question is, "Do you need the exact values, or is this a question of deriving answers from physical observed data, where approximate answers would suffice, because the data is also approximate?"

I'm going to assume you need precise answers, and that you have no idea what the frequencies might be. If you did have a sense of the greatest frequency, then a fast fourier transform with a peak frequency about 100 times your highest-possible would give you a very good idea of the three true frequencies.

For the last case -- different frequencies, etc.: @Florian seems to have written a very nice summary, so I'll stop here.

9
On

You can use the Fourier transform. Let's use the definition:

$$\mathcal{F}\left\{f(t)\right\}(\xi) \triangleq \widehat{f}(\xi) = \int_{-\infty}^\infty f(t)e^{-2\pi it\xi}dt$$

Then:

$$\mathcal{F}\left\{a\sin(\omega t+\phi)\right\}(\xi) = \frac{a}{2}e^{-2\pi i \phi\xi/\omega}\left[\delta\left(\xi-\frac{\omega}{2\pi}\right)+\delta\left(\xi+\frac{\omega}{2\pi}\right)\right]$$

You can recover the coefficients of the deltas by integrating the Fourier transform of your function in a small interval and taking the limit:

$$L = \lim_{\epsilon\to 0^+}\int_{c-\epsilon}^{c+\epsilon} \widehat{f}(\xi)d\xi$$

For $f(t)=a\sin(\omega t+\phi)$, if you do that around $c=\omega/2\pi$, the limit of the integral gives $L = \frac{a}{2}e^{-2\pi i \phi c/\omega} = \frac{a}{2}e^{-\pi i \phi}$. So $a = 2\|L\|$ and $\phi = -\frac{1}{\pi}\angle L$.

This link has some examples of how to do this on Matlab with discrete data and the Fast Fourier Transform.