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

2837xD的例程cla_ex1_asin中的CLAasinTable是怎么来的?

float CLAasinTable[]={
0.0, 1.0, 0.0,
0.000000636202, 0.999877862610, 0.007815361896,
0.000005099694, 0.999510644409, 0.015647916155,
0.000017268312, 0.998895919094, 0.023514960332,
0.000041121765, 0.998029615282, 0.031434003631,
0.000080794520, 0.996905974725, 0.039422875916,
0.000140631089, 0.995517492804, 0.047499840611,
0.000225244584, 0.993854840311, 0.055683712914,
0.000339579512, 0.991906765146, 0.063993984848,
0.000488979852, 0.989659972212, 0.072450958820,
0.000679263611, 0.987098979366, 0.081075891529,
0.000916805182, 0.984205946802, 0.089891150305,
0.001208627040, 0.980960476685, 0.098920384204,
0.001562502549, 0.977339379243, 0.108188712551,
0.001987071928, 0.973316400729, 0.117722933997,
0.002491973784, 0.968861907789, 0.127551759665,
0.003087995053, 0.963942521723, 0.137706074532,
0.003787242692, 0.958520694794, 0.148219231941,
0.004603341138, 0.952554219267, 0.159127386977,
0.005551660294, 0.945995657913, 0.170469875522,
0.006649579796, 0.938791682505, 0.182289647088,
0.007916796475, 0.930882303984, 0.194633761132,
0.009375683410, 0.922199974574, 0.207553958472,
0.011051710808, 0.912668537890, 0.221107321885,
0.012973941175, 0.902201997769, 0.235357042896,
0.015175614174, 0.890703070035, 0.250373315541,
0.017694840102, 0.878061473098, 0.266234382514,
0.020575425537, 0.864151902887, 0.283027765009,
0.023867860513, 0.848831624374, 0.300851714968,
0.027630504055, 0.831937595031, 0.319816937941,
0.031931014547, 0.813283013821, 0.340048646894,
0.036848083955, 0.792653161200, 0.361689022958,
0.042473551274, 0.769800358920, 0.384900179460,
0.048914992206, 0.744437830278, 0.409867752228,
0.056298910750, 0.716232177740, 0.436805274317,
0.064774696786, 0.684794109766, 0.465959540059,
0.074519565699, 0.649666934178, 0.497617226179,
0.085744766889, 0.610312179660, 0.532113122767,
0.098703445606, 0.566091493186, 0.569840443472,
0.113700678529, 0.516243664372, 0.611263845480,
0.131106395009, 0.459855210927, 0.656936015611,
0.151372169232, 0.395822366759, 0.707518998893,
0.175053263659, 0.322801460177, 0.763811905770,
0.202837883870, 0.239143420888, 0.826787304376,
0.235586468765, 0.142806299514, 0.897639596948,
0.274385149825, 0.031236880585, 0.977850174820,
0.320619535938, -0.098791845166, 1.069276441800,
0.376078169620, -0.251407364538, 1.174275392129,
0.443100143614, -0.431959397725, 1.295878193174,
0.524789871827, -0.647485610469, 1.438041695773,
0.625336471263, -0.907400624736, 1.606018804842,
0.750500589935, -1.224540947101, 1.806917563896,
0.908377657341, -1.616794995066, 2.050569262035,
1.110633894185, -2.109729648039, 2.350920816737,
1.374584721437, -2.740985157716, 2.728353889708,
1.726848242753, -3.567962877198, 3.213722960014,
2.210117561056, -4.682006534082, 3.855770086891,
2.896554011854, -6.236312386687, 4.735651038017,
3.916505715382, -8.505488022524, 5.997790945975,
5.526855868703, -12.026617159136, 7.922628470498,
8.298197116322, -17.983705080358, 11.123941286820,
13.741706072449, -29.488929624542, 17.203344479111,
27.202707817485, -57.466598393615, 31.741016484669,
83.158101335898, -171.803399517566, 90.149831709374
};

上面的这个数组不知道怎么来的。

result = A0 + fVal*(A1 + A2*fVal);还有结果为什么是这么计算的?是什么特别的算法吗?

Susan Yang:

有很多方法可以完成查找表lookup table。可以使用Matlab生成表格,然后将其另存为CSV文件并将其复制到Excel或记事本中,然后在其中进行编辑。或者,您可以在Excel中完成全部操作。

F28377D 1天研讨会的实验4使用了5象限查找表,我将其附上。研讨会文件在这里:

training.ti.com/c2000-f2837xd-microcontroller-workshop

user6383421:

回复 Susan Yang:

我想问的不是用什么工具生成的数据表,而是想问这个数据表是依据什么公式计算生成的!

user6383421:

回复 Susan Yang:

好的!谢谢!

Susan Yang:

回复 user6383421:

不客气。后续有其他问题,欢迎随时发新帖

user6383421:

回复 Susan Yang:

你好!CLAasinTable中的参数3个一组,每组参数是不是用matlab中的回归分析函数coeff生成的拟合曲线的参数值?一共64组,分别对应arcsin曲线的64等分的曲线段的拟合参数。然后用64组拟合参数表示的拟合曲线方程求64个arcsin的值,然后与asin_expected中的值做对比。这个例程大概是这样吧?

Susan Yang:

回复 user6383421:

应该是这样的,您可以在英文论坛再次确认一下

e2e.ti.com/…/171

user6383421:

回复 Susan Yang:

好的!

user6383421:

回复 Susan Yang:

我用matlab验证了。三个数据为一组是一条拟合曲线的系数,一共64条拟合曲线!

Susan Yang:

回复 user6383421:

谢谢您的反馈!

赞(0)
未经允许不得转载:TI中文支持网 » 2837xD的例程cla_ex1_asin中的CLAasinTable是怎么来的?
分享到: 更多 (0)