1

I'm trying to calculate resultant function from adding two sinusoids:

$9\sin(\omega t + \tfrac{\pi}{3})$ and $-7\sin(\omega t - \tfrac{3\pi}{8})$

The correct answer is $14.38\sin(\omega t + 1.444)$, but I get $14.38\sin(\omega t + 2.745)$.

My calculations are (first using cosine rule to obtain resultant $v$ as): $\sqrt{9^2 + (-7)^2 - (2 \cdot 9 \cdot (-7) \cdot \cos(\pi - \tfrac{\pi}{3} + \tfrac{3\pi}{8}))} = 14.38$

And the angle (using the sine rule): $\pi - \arcsin(|-7| \sin(\pi - \tfrac{\pi}{3} + \tfrac{3\pi}{8}) / 14.38) = 157$ ° or $2.745$ radians.

robert bristow-johnson
  • 20,661
  • 4
  • 38
  • 76
Bord81
  • 115
  • 5
  • 2
    Your question will be much more readable if you format the math properly. I have edited a portion of the question to get you started, and you can find complete instructions here: https://dsp.stackexchange.com/editing-help#latex. I have also selected a better tag, since your question is unrelated to wavelets. – MBaz Aug 27 '18 at 18:13
  • Great! Just be mindful of the "" before "sin" and "cos". I fixed those for you. – MBaz Aug 27 '18 at 18:20
  • and lose the asterisks unless you're discussing convolution. – robert bristow-johnson Aug 27 '18 at 18:58

2 Answers2

1

The easiest way (to my mind) to solve the problem is to

  • Use the identity $\sin(A\pm B) = \sin A \cos B \pm \cos A \sin B$, substituting the known numerical values of $\cos B$ and $\sin B$,

  • Gathering the results to express your sum of sinusoids in the form of $C \sin A + D \cos A$,

  • Expressing the resulting function as $\sqrt{C^2+D^2} \sin\left(\omega t + \theta\right)$

Fat32
  • 28,152
  • 3
  • 24
  • 50
Dilip Sarwate
  • 20,349
  • 4
  • 48
  • 94
  • That's more or less the way I'm doing it, but the question is I can't figure out the θ. – Bord81 Aug 27 '18 at 18:38
  • Hint: Set $\frac{C}{\sqrt{C^2+D^2}} = \cos(\theta), \frac{D}{\sqrt{C^2+D^2}} = \sin(\theta) $ and solve $\tan(\theta)=\frac DC$ for $\theta$. – Dilip Sarwate Aug 27 '18 at 18:45
1

This is a trigonometry question, but can also be solved using complex exponentials , which makes it a more DSP type.

We shall use the identitiy: $$ \sin(\phi) = \frac{e^{j\phi} - e^{-j\phi} } {2j} $$

or the more general case: $$ \sin(\omega t + \phi) = \frac{e^{j\omega t} e^{j\phi} - e^{-j\omega t} e^{-j\phi} } {2j} $$

and further more general case: $$ \begin{align} |K| \sin(\omega t + \phi + \theta_k) &= |K|\frac{e^{j\omega t} e^{j\phi}e^{j\theta_k} - e^{-j\omega t} e^{-j\phi}e^{-j\theta_k} } {2j} \\ &= \frac{e^{j\omega t} e^{j\phi}K - e^{-j\omega t} e^{-j\phi}K^* } {2j} \tag{1}\\ \end{align} $$

where $K$ is a complex constant defined as $K = K_r + j K_i = |K| e^{j\theta_k} $ both in rectangular and polar forms.

Now proceed in decomposing the given signal into complex exponentials:

$$ \begin{align} x(t) &= 9 \sin(\omega t + \pi/3) - 7 \sin(\omega t - 3\pi/8) \\ &= (9/{2j})\left( e^{j\omega t} e^{j\pi/3} - e^{-j\omega t} e^{-j\pi/3} \right) - (7/{2j})\left( e^{j\omega t} e^{-j3\pi/8} - e^{-j\omega t} e^{j3\pi/8} \right) \\ &= \frac{ e^{j\omega t}\left[9 e^{j\pi/3} - 7e^{-3\pi/8} \right] - e^{-j\omega t}\left[ 9 e^{-j\pi/3} - 7e^{3\pi/8} \right] }{2j} \tag{2}\\ &= \frac{ e^{j\omega t}K - e^{-j\omega t}K^* }{2j}\\ \end{align} $$

Now denoting $9 e^{j\pi/3} - 7e^{-j3\pi/8} = K$, the last line, Eq(2) becomes similar to Eq(1). Now all you need to do is find the magnitude and phase angle of the complex number $K$, which are :

$$ K = 9 e^{j\pi/3} - 7e^{j3\pi/8} = 1.8212 + 14.2614 j $$ $$ |K| = 14.3772 $$ $$ \theta_k = 1.4438 ~~~\text{ radians } $$

Plugging these values gives you the final answer :

$$\boxed{x(t) = |K|\sin(\omega t + \theta_k) = 14.38 \sin(\omega t + 1.4438) }$$

Fat32
  • 28,152
  • 3
  • 24
  • 50