This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have generated a sine wave using 257-point lookup table that covers only one quadrant (4th quadrant). The entries in the table are in Q(1.15) format. [0,....,-32768].
I used linear interpolation to find unknown values from the table. I came across an example in which linear interpolation is implemented and used the same logic.
x -> phase in Q1.15
entries in look up table = 2^(n) + 1 = 2^(8) + 1 = 257
n = 8;
if (x > 0)
{
sign_flag = 1;
x = ~(x);
}
if (x < -16384)
{
x = -32768 - x;
}
x = ~(x);
index = x >> (14-n);
delta = (x & ((1 << (14 - n)) - 1)) << (1 + n);
z = table[index];
y = ((table[index+1] - table[index]) * delta) >> 15;
y = z + y;
1) What is the logic behind index and delta?
2) If delta is calculated using 'x' (phase) in float, what will be the expression of delta without using shift operation?
Hi Ram,
Thank you for reaching out. Are you referencing some of our documentation or algorithms or is this a question on theory?
If this is relevant to theory, unfortunately, we do not answer these types of questions on E2E. E2E is dedicated to providing support with our TI devices and on-chip peripherals. I recommend you to reach out to other forums for this question since it doesn't look to be pertaining to our devices directly
Regards,
Peter