Two 'sine tone with phase and gain' generating the same tone are out of phase and maybe drifting, it seems to me. Why?
So if trying to make one 1k, 0 phase and the other 1k, 180 phase and sum them with the summer, they won't cancel.
I find a phase where they cancel, but it seems random and it looks like it floats to a random real value when the phase is changed 1 degree in the Sigma GUI.
4.7 Build0 rev 1831
software
sigmastudio
SigmaDSP Audio Processors
Hello,
Which DSP and what sample rate are you working with? I tried it with a ADAU1701 at 48K and the two oscillators cancel so well that I thought my eval board wasn't working. There are some known issues with the resolution of the frequency parameter passed from SigmaStudio to the DSP -- where a 1000 Hz tone maps to 999.99046 Hz while (for example) a 750 Hz tone works out exactly. It turns out that* the frequency is represented exactly in parameter memory only when the number of samples within one period is a power of two. This has been discovered and demonstrated in several EZ posts:
https://ez.analog.com/dsp/sigmadsp/f/q-a/574775/tone-generation/
* College textbooks would say, It can be shown that... Thanks to @MichaelSchwarzAER for mathematically proving that the number of samples in the period must be a power of two, not merely an integer.
My test project runs on a ADAU1701MINIZ eval board and looks like this:
"Phase Increment" is the frequency param. It's defined as param = 2f / Fs which for a 1KHz tone at 48K sample rate is 0.04166666... Note that the parameter word's resolution fails after the 7th decimal digit, resulting in the known frequency error. By contrast, the 750 Hz example produces a decimal which terminates nicely. Regardless, my test project remains silent at either frequency after running for hours.
If you could attach the project where you discovered the problem, this may help us explain your results.
Best regards,
Bob
One additional thought -- when making the linked project, I was surprised to find the "Theremin" drifting as the -1701 warmed up. It was so bad that I had to add an auto-zero scheme. This despite that it's all crystal controlled. The difference there is that the Theremin project involves the 1701's converters which add a significant latency (which may drift). From your description I assumed that you're summing the two oscillators internally as I tried above without issues -- but I'd thought to mention this possibility just in case separate converters are involved.
Please log in to reply.
