ΣSigmaStudio Ask AI Русский Log in

Generating overtones with fixed phases in SigmaDSP processors

SigmaDSP & SigmaStudio Alexei_Bazlaev Mar 15, 2017 00:00 1 replies Original on forum ↗
Thread Summary

Thread Summary

The user discusses generating sine tones with fixed phase relationships in SigmaDSP processors, noting that using the built-in sine tone generators in SigmaStudio does not maintain consistent phase relationships. The solution involves using a sawtooth generator as a phase accumulator and a lookup table (LUT) with sine wave values to generate multiple sine tones with precise phase relationships. The LUT size should be odd, and the sawtooth output must be adjusted to fit the LUT input range for accurate sine wave generation.
AI Generated Content
Subscribe
Alexei_Bazlaev Question
Mar 15, 2017 00:00

Dear colleagues!
I would like to share my experience in generating overtones (harmonics) of the sine tone with fixed phase relationships in SigmaDSP processors. For example if we need to generate sine tones sin(wt), sin(2wt), sin(3wt),... with the strictly specified phase relationships, it will be not enough to use sine tone generators from the toolbox of SigmaStudio. Even if we will specify the initial phases, these generators will not keep phase relationships intact and their phases will be permanently shifting. Even if we will generate equal tones using two generators with the same initial phases, the shift between their phases will permanently change.
Usually to generate overtones of the fundamental frequency with the fixed phase relationships, engineers use multiplication of sine tones by itself and summing the products with different coefficients. For example, sin(2x)=1-2(sin(x-pi/2))^2, sin(3x)=3sin(x)-4(sin(x))^3. But these techniques are pretty bulky and are not universal. What if we need to generate any arbitrary overtone of sin(x), for example sin(5x) or even sin(1,5x)? It will be hard enough to realize it using restricted resources of SigmaDSP. Moreover the amplitudes and phase relationships of the products are hardly predictable.
But this is not the problem for SigmaDSP to generate any sine tone the same way as it is realized in modern DDS IC's. We need the sawtooth generator, which will serve as the phase accumulator, and the lookup table (LUT) with the sine wave values. When the level of the sawtooth generator is equal to the index of the LUT, the output of the LUT will be equal the value of the element with that index. In this manner we can generate multiple signals with any desired forms and phase relationships. The number of points of the LUT of sine wave must be odd, and the last point must be equal to the first. The more points in the LUT, the more SFDR, the more accuracy of the phase relationships and the less the minimal phase shift. The frequency of the sawtooth generator must be equal to the required frequency of the fundamental sine tone. In the example there is one fundamental tone sin(x) and two overtones sin(2x), sin(3x). Their phase relationships are strictly specified in the LUTs. Because the value of the sawtooth is changed between -1,..,+1 we need to lift it above the zero, so we add 1 Volt DC and multiply it by 0.5. After this manipulation the output of the sawtooth will change between 0,..+1, which is within the range of the fractional input of the LUT. It is also possible to use LUT with the integer input, in that case we should multiply the sawtooth by half of the LUT's size, in my example it is 96, so the input of the LUT will change between 1,...,+193. But in that case because of the stepped sine envelope, generation of the sine tone will not be very smooth, and SFDR of such sine generator will not be very good.

With best regards!

multiples of frequency

sine generator

sin(x) sin(2x) sin(3x)

phase relationships

overtones

phase shift

harmonics

in-phase

Show More

bf6789f65f4981ea26864c6a4712902b.png
bf6789f65f4981ea26864c6a4712902b.png
bf6789f65f4981ea26864c6a4712902b.png-620x383.png
bf6789f65f4981ea26864c6a4712902b.png-620x383.png
b130d5eb06b018b41fc45f760cc2b8e9.png
b130d5eb06b018b41fc45f760cc2b8e9.png
b130d5eb06b018b41fc45f760cc2b8e9.png-520x414.png
b130d5eb06b018b41fc45f760cc2b8e9.png-520x414.png
a9aa7921d46e704208f85934e6eb29ba.png
a9aa7921d46e704208f85934e6eb29ba.png
a9aa7921d46e704208f85934e6eb29ba.png-506x407.png
a9aa7921d46e704208f85934e6eb29ba.png-506x407.png
76dff1e4ccae4db4baa3de29d07f4585.png
76dff1e4ccae4db4baa3de29d07f4585.png
76dff1e4ccae4db4baa3de29d07f4585.png-509x405.png
76dff1e4ccae4db4baa3de29d07f4585.png-509x405.png
EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin