danielholley1982
New member
- Joined
- Apr 19, 2016
- Messages
- 1
I am working on a problem where I have a sine wave as shown below (in this example it is a 1 Hz wave with 1024 points).
I then have a second sine wave of the same frequency added to this signal at a phase offset of 128 points, or a eighth-wave. But the combined signal looks like the following.
Now, knowing the frequency, as well as both phases, is there any way to determine the amplitude of either wave?
My theory is to add and subtract the desired phased waveform at an amplitude of 1.0, and see the difference between them. This works in the use-case described below, but I can not explain why. I may be completely on the wrong path and there is another better way, but trail and error has lead me here.
I have tried adding the sine wave to the signal as well as subtracting in the following manner:
First I generate the sine and cosine waves:
Then I subtract the desired frequency from the signal:
And add the desired frequency to the signal:
Next I add the two results together:
Then I get the result of multiplying Z times the sine and cosine, respectfully and subtract from each other:
This works with the second sine wave positioned at 128, (or eighth wave) from the first. But not in any other configuration. This will give me the amplitude of the first wave, irrespective of the amplitude of the second wave. If I could figure out why this works, my hope is to expand this into more complex situations where I can filter the signals separately.
I then have a second sine wave of the same frequency added to this signal at a phase offset of 128 points, or a eighth-wave. But the combined signal looks like the following.
Now, knowing the frequency, as well as both phases, is there any way to determine the amplitude of either wave?
My theory is to add and subtract the desired phased waveform at an amplitude of 1.0, and see the difference between them. This works in the use-case described below, but I can not explain why. I may be completely on the wrong path and there is another better way, but trail and error has lead me here.
I have tried adding the sine wave to the signal as well as subtracting in the following manner:
First I generate the sine and cosine waves:
Then I subtract the desired frequency from the signal:
And add the desired frequency to the signal:
Next I add the two results together:
Then I get the result of multiplying Z times the sine and cosine, respectfully and subtract from each other:
This works with the second sine wave positioned at 128, (or eighth wave) from the first. But not in any other configuration. This will give me the amplitude of the first wave, irrespective of the amplitude of the second wave. If I could figure out why this works, my hope is to expand this into more complex situations where I can filter the signals separately.