next up previous contents index
Next: Frequency Up: Acoustics of digital audio Previous: Synthesizing a Sinusoid   Contents   Index


Superposing Sinusoids

If two sinusoids have sufficiently different frequencies, they don't interact acoustically; the power of the sum is the sum of the powers, and they are likely to be heard as separate sounds. Something more complicated happens when two sinusoids of closely neighboring frequencies are combined, and something yet again when the two frequencies happen to be equal. Here we'll treat this last case.

We have seen that adding two sinusoids with the same frequency and the same phase (so that the two signals are proportional) gives a resultant sinusoid with the sum of the two amplitudes. If the two have different phases, though, we have to do some algebra.

If we fix a frequency $\omega $, there are two useful representations of a general (real) sinusoid at frequency $\omega $; the first is the original SINUSOID formula, which is expressed in magnitude-phase form (also called polar form:

\begin{displaymath}
x[n] = a \cdot \cos \left ( \omega n + \phi \right )
\end{displaymath}

and the second is the sinusoid in rectangular form:

\begin{displaymath}
x[n] = c \cdot \cos \left ( \omega n \right ) +
s \cdot \sin \left ( \omega n \right ) .
\end{displaymath}

Solving for $c$ and $s$ in terms of $a$ and $\phi$ gives:

\begin{displaymath}
c = a \cdot \cos \left ( \phi \right )
\end{displaymath}


\begin{displaymath}
s = - a \cdot \sin \left ( \phi \right )
\end{displaymath}

and vice versa we get:

\begin{displaymath}
a = \sqrt { {c^2} + {s^2}}
\end{displaymath}


\begin{displaymath}
\phi = - \arctan {{s} \over {c}}
\end{displaymath}

We can use this to find the amplitude and phase of a sum of two sinusoids at the same frequency $\omega $ but with possibly different amplitudes and phases, say, $a_1$, $a_2$, $\phi_1$, and $\phi_2$. We just write the sum expicitly, convert to rectangular form, add the two, and finally convert back to magnitude-phase form:

\begin{displaymath}
{a_1} \cos \left ( {\omega} n + {\phi_1} \right ) +
{a_2} \cos \left ( {\omega} n + {\phi_2} \right )
\end{displaymath}


\begin{displaymath}
= {a_1} \cos \left ( {\omega} n \right ) \cos \left ( {\phi...
...in \left ( {\omega} n \right ) \sin \left ( {\phi_1} \right )
\end{displaymath}


\begin{displaymath}
+ {a_2} \cos \left ( {\omega} n \right ) \cos \left ( {\phi...
...in \left ( {\omega} n \right ) \sin \left ( {\phi_2} \right )
\end{displaymath}


\begin{displaymath}
=
\left (
{a_1} \cos \left ( {\phi_1} \right ) +
{a_2} \...
...{\phi_2} \right )
\right )
\sin \left ( {\omega} n \right )
\end{displaymath}


\begin{displaymath}
= {a_3} \cos \left ( {\phi _3} \right ) \cos \left ( \omega...
...\sin \left ( {\phi _3} \right ) \sin \left ( \omega n \right )
\end{displaymath}


\begin{displaymath}
= {a_3} \cos \left ( \omega n + {\phi _ 3} \right )
\end{displaymath}

where we have chosen $a_3$ and $\phi_3$ so that:

\begin{displaymath}
{a_3} \cos {\phi_3} = {a_1} \cos {\phi _1} + {a_2} \cos {\phi_2},
\end{displaymath}


\begin{displaymath}
{a_3} \sin {\phi_3} = {a_1} \sin {\phi _1} + {a_2} \sin {\phi_2}.
\end{displaymath}

Solving for $a_3$ and $\phi_3$ gives

\begin{displaymath}
{a_3} =
{ \sqrt {
{{a_1} ^ 2} + {{a_2} ^ 2} +
2 {a_1} {a_1} \cos \left ( {\phi_1} - {\phi_2} \right )
}} ,
\end{displaymath}


\begin{displaymath}
{\phi_3} =
\arctan \left ( {
{
{a_1} \sin {\phi_1} + {a_...
...r {
{a_1} \cos {\phi_1} + {a_2} \cos {\phi_2}
}
} \right )
\end{displaymath}

In general, the amplitude of the sum can range from the difference of the two amplitudes to their sum, depending on the phase difference. As a special case, if the two sinusoids have the same amplitude $a = {a_1} = {a_2}$, the amplitude of the sum turns out to be:

\begin{displaymath}
{a_3} = 2 a \cos \left ( { {{\phi_1} - {\phi_2}} \over 2 } \right )
\end{displaymath}

By comparing the more general formula for $a_3$ above with the equation for the MEAN POWER OF THE SUM OF TWO SIGNALS, we learn that the correlation of two sinusoids of the same frequency is given by:

\begin{displaymath}
{\mathrm{COR}} \left \{ {
{a_1} \cos \left ( {\omega} n +...
...t \}
= {a_1} {a_2} \cos \left ( {\phi_1} - {\phi_2} \right )
\end{displaymath}


next up previous contents index
Next: Frequency Up: Acoustics of digital audio Previous: Synthesizing a Sinusoid   Contents   Index
Miller Puckette 2005-02-21