Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

sine + cosine = ?

Status
Not open for further replies.

simonbramble

Active Member
If I add together a sinewave and a cosine wave, both of the same frequency and amplitude, what do I get?

I appreciate that (sine squared + cos squared = 1). However, what about just (sine + cos)?

I think the result is another sinewave of a higher amplitude, of the same frequency, but with a phase shift, but I cannot work out what trigonometric identities to use to prove this mathematically.

Please can someone with more mathematical skills than me let me know the answer, together with some sort of mathematical proof (or explanation as to how to work out the answer)!

Thanks

Simon
 
You can write A.sin(wt)+A.cos(wt) as A.sin(wt)+A.sin (wt+pi/2), then use the identity sin+sin=2sin(sum/2)cos(diff/2).
This gives 2A.sin(wt+pi/4)cos(pi/4), which is a sine wave of unchanged frequency w, a phase shift of pi/4 and an amplitude of 2.A.cos(pi/4) = 1.414.A.
 
If the phase of the Sine is 0 deg and the phase of the Cosine is 90, then the phase of the sum will be 45 Deg

Assuming that the amplitude of both Sine and Cosine are 1V pk-pk, the amplitude (or Vout) of the sum will 1/sqrt(2) ... or about 0.707



Vout = [ 1/ sqrt(Vsine^2 + Vcosine^2) ] x [ (Vsine^2 + Vcosine^2) / 2 ] ... <-- there could probably be some simplification here

Interestingly you can change the phase by changing the voltage of either the sine or cosine ... this also changes the Vout
 
Last edited:
alec_t: Thanks very much. I agree with your answer. I was looking for a sin + cos identity and did not think of using a sin + (sin + phase) identity. Easy when you know how!

Beau: I agree with your logic, but the final amplitude is 1.41. Take the case of both being at pi/4. You then add 2 lots of 0.707. Thanks for the intuitive, less mathematical (read: simpler) approach.

Thanks to both

Simon
 
sin(x)+cos(x); x 0 to 2*3.14 - Wolfram|Alpha

... but how do I know that is sinusoidal? It looks sinusoidal, but we cannot be sure. We need trig identities to really work the answer out. I simulated the problem in LTspice and came up with a pure sinewave, phase shifted with an amplitude of 1.41. I checked by doing an FFT on the results. However, maths is the only sure fire way of telling.
 
Via Excel I am getting your result as well.

/Edit To add a graphic. Just for the pleasure of it. /Edit
 

Attachments

  • Seno + coseno.pdf
    72.6 KB · Views: 397
Last edited:
Hmm ... two slight circuit variations ... My original post was based off of Sum1 and NOT Sum2

Sum1 is actually a difference of the Sine and Cosine where Sum2 is the addition of Sine and Cosine.
 

Attachments

  • Sum1.JPG
    Sum1.JPG
    116.6 KB · Views: 418
  • Sum2.JPG
    Sum2.JPG
    119.7 KB · Views: 418
One way to determine if your output is actually sinusoidal after summing Sine and Cosine is to mathematically apply the output to a Third sinusoidal signal phase shifted 225 Deg (45 Deg + 180 Deg = 225 Deg) with the amplitude of 1.414213562373 Volts ... The output of that should be ZERO

This assumes:

Sine = 1V with a 0 Deg phase shift
Cosine = 1V with a 90 Deg phase shift

The Sum should be 1.414213562373 Volts with a 45 Deg phase shift
 
One way to determine if your output is actually sinusoidal after summing Sine and Cosine is to mathematically apply the output to a Third sinusoidal signal...

That is exactly what I did. Although the FFT showed a single spur, I created a third waveform with the amplitude of 1.414213V, phase shifted by 45 deg, then plotted the subtraction of the two. The output was down in the nV.

Interesting about your SUM1 and SUM2 circuits above. I would have said the SUM1 circuit produces the sum of both inputs like you did. Then you realise the current cannot flow into the high impedance non inverting input, so input 1 ends up sinking current from input 2 (and vice versa).
 
simonbramble,
The sum of the sin and cos can be reduced to a single sin or cos term with a phase shift. The answer to your problem is
Sqrt(2)*Sin(wt+Pi/4) . Plotting both expressions produce the same plots. I can show you the derivation if you are interested.

Ratch
 
sin(x)+cos(x); x 0 to 2*3.14 - Wolfram|Alpha

... but how do I know that is sinusoidal?
Oh, that's trivial; the Fourier transform of each of the two functions (sine and cosine)
have only a single frequency, real part = cosine and imaginary part = sine.
Since there's only one frequency, it cannot be a distorted sinewave; it doesn't have harmonics
any more than its terms do.

To put it another way,
sine(a + b) = sine (a) cos (b) + sine (b) cos (a)

set b = pi/4

sine(a + pi/4) = sine(a) * sqrt(1/2) + sqrt(1/2) * cos(a)

multiply both sides by sqrt(2)...
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top