TI中文支持网
TI专业的中文技术问题咨询交流网站

Application Report SPRA496 文档反正切表问题

1 >.
I don't know if that's right
The 0-0.99 Q15 format corresponds to 0-32768
The 0-0.25 Q15 format corresponds to the 0-pi / 4-> 0-8192 45 degree subdivision into 128 pieces
45/128 = 0.3515625 degree
table degree[129] =
{
0,
0.3515625,
.
.
.
..
44.6484375,
45
}
2 >.
Here is SPRA496 document Q15_ATAN
table[129]={
0
,81,163,244,326,407,489,570,651,
732,813,894,975,1056,1136,1217,1297,
1377,1457,1537,1617,1696,1775,1854,1933,
2012,2090,2168,2246,2324,2401,2478,2555,
2632,2708,2784,2860,2935,3010,3085,3159,
3233,3307,3380,3453,3526,3599,3670,3742,
3813,3884,3955,4025,4095,4164,4233,4302,
4370,4438,4505,4572,4639,4705,4771,4836,
4901,4966,5030,5094,5157,5220,5282,5344,
5406,5467,5528,5589,5649,5708,5768,5826,
5885,5943,6000,6058,6114,6171,6227,6282,
6337,6392,6446,6500,6554,6607,6660,6712,
6764,6815,6867,6917,6968,7018,7068,7117,
7166,7214,7262,7310,7358,7405,7451,7498,
7544,7589,7635,7679,7724,7768,7812,7856,
7899,7942,7984,8026,8068,8110,8151,8192,
}
I don't understand table[1] = 81?table[1] = 163 ?
table[127] = 8151?
What is the generation pattern of the above table elements?
How is this part of the value generated

thank you

Susan Yang:

已经在下面链接内回复了,您可以跟踪一下

e2e.ti.com/…/3532481

Susan Yang:

回复 Susan Yang:

the atan(x), where x can be from 0 to 1.0, is a nonlinear function and as as such the lookup table is nonlinear too. The lookup table is basically an 8-bit approximation of the atan(x) function. The argument x is right shifted to get an 8-bit equivalent pointer to the corresponding approximate angle value in the lookup table.

Example:

atan(0): 0 is converted to 0 and points to the first element in the lookup table: 0

atan(1.0): 1.0 is converted to 128 and points to the last (129) element in the lookup table: 8192=0.25 Q15 (equals PI*0.25=45deg)

atan(0.5): 0.5 is converted to 64 and points to the 65 element in the lookup table: 4836=0.149 Q15 (equals P*0.1475= 26.56deg)

atan(0.25): 0.25 is converted to 32 and points to the 33 element in the lookup table: 2555=0.077 Q15 (equals P*0.077= 14.03deg)

and so on.

赞(0)
未经允许不得转载:TI中文支持网 » Application Report SPRA496 文档反正切表问题
分享到: 更多 (0)