SPWM中,如何计算sin值的数组,方便采点!
做一个三角函数表:
Sin1=0.01745240643728351sin2=0.03489949670250097 sin3=0.05233595624294383
sin4=0.0697564737441253 sin5=0.08715574274765816 sin6=0.10452846326765346
sin7=0.12186934340514747 sin8=0.13917310096006544 sin9=0.15643446504023087
sin10=0.17364817766693033 sin11=0.1908089953765448 sin12=0.20791169081775931
sin13=0.22495105434386497 sin14=0.24192189559966773 sin15=0.25881904510252074
sin16=0.27563735581699916 sin17=0.2923717047227367 sin18=0.3090169943749474
sin19=0.3255681544571567 sin20=0.3420201433256687 sin21=0.35836794954530027
sin22=0.374606593415912 sin23=0.3907311284892737 sin24=0.40673664307580015
sin25=0.42261826174069944 sin26=0.4383711467890774 sin27=0.45399049973954675
sin28=0.4694715627858908 sin29=0.48480962024633706 sin30=0.49999999999999994
sin31=0.5150380749100542 sin32=0.5299192642332049 sin33=0.544639035015027
sin34=0.5591929034707468 sin35=0.573576436351046 sin36=0.5877852522924731
sin37=0.6018150231520483 sin38=0.6156614753256583 sin39=0.6293203910498375
sin40=0.6427876096865392 sin41=0.6560590289905073 sin42=0.6691306063588582
sin43=0.6819983600624985 sin44=0.6946583704589972 sin45=0.7071067811865475
sin46=0.7193398003386511 sin47=0.7313537016191705 sin48=0.7431448254773941
sin49=0.7547095802227719 sin50=0.766044443118978 sin51=0.7771459614569708
sin52=0.7880107536067219 sin53=0.7986355100472928 sin54=0.8090169943749474
sin55=0.8191520442889918 sin56=0.8290375725550417 sin57=0.8386705679454239
sin58=0.848048096156426 sin59=0.8571673007021122 sin60=0.8660254037844386
sin61=0.8746197071393957 sin62=0.8829475928589269 sin63=0.8910065241883678
sin64=0.898794046299167 sin65=0.9063077870366499 sin66=0.9135454576426009
sin67=0.9205048534524404 sin68=0.9271838545667873 sin69=0.9335804264972017
sin70=0.9396926207859083 sin71=0.9455185755993167 sin72=0.9510565162951535
sin73=0.9563047559630354 sin74=0.9612616959383189 sin75=0.9659258262890683
sin76=0.9702957262759965 sin77=0.9743700647852352 sin78=0.9781476007338057
sin79=0.981627183447664 sin80=0.984807753012208 sin81=0.9876883405951378
sin82=0.9902680687415704 sin83=0.992546151641322 sin84=0.9945218953682733
sin85=0.9961946980917455 sin86=0.9975640502598242 sin87=0.9986295347545738
sin88=0.9993908270190958 sin89=0.9998476951563913 sin90=1
定标Q12的正弦表
const int sinTab[361]=
{
0,71,143,214,286,357,428,499,570,641,
711,782,852,921,991,1060,1129,1198,1266,1334,
1401,1468,1534,1600,1666,1731,1796,1860,1923,1986,
2048,2110,2171,2231,2290,2349,2408,2465,2522,2578,
2633,2687,2741,2793,2845,2896,2946,2996,3044,3091,
3138,3183,3228,3271,3314,3355,3396,3435,3474,3511,
3547,3582,3617,3650,3681,3712,3742,3770,3798,3824,
3849,3873,3896,3917,3937,3956,3974,3991,4006,4021,
4034,4046,4056,4065,4074,4080,4086,4090,4094,4095,
4096,4095,4094,4090,4086,4080,4074,4065,4056,4046,
4034,4021,4006,3991,3974,3956,3937,3917,3896,3873,
3849,3824,3798,3770,3742,3712,3681,3650,3617,3582,
3547,3511,3474,3435,3396,3355,3314,3271,3228,3183,
3138,3091,3044,2996,2946,2896,2845,2793,2741,2687,
2633,2578,2522,2465,2408,2349,2290,2231,2171,2110,
2048,1986,1923,1860,1796,1731,1666,1600,1534,1468,
1401,1334,1266,1198,1129,1060,991,921,852,782,
711,641,570,499,428,357,286,214,143,71,
0,-71,-143,-214,-286,-357,-428,-499,-570,-641,
-711,-782,-852,-921,-991,-1060,-1129,-1198,-1266,-1334,
-1401,-1468,-1534,-1600,-1666,-1731,-1796,-1860,-1923,-1986,
-2048,-2110,-2171,-2231,-2290,-2349,-2408,-2465,-2522,-2578,
-2633,-2687,-2741,-2793,-2845,-2896,-2946,-2996,-3044,-3091,
-3138,-3183,-3228,-3271,-3314,-3355,-3396,-3435,-3474,-3511,
-3547,-3582,-3617,-3650,-3681,-3712,-3742,-3770,-3798,-3824,
-3849,-3873,-3896,-3917,-3937,-3956,-3974,-3991,-4006,-4021,
-4034,-4046,-4056,-4065,-4074,-4080,-4086,-4090,-4094,-4095,
-4096,-4095,-4094,-4090,-4086,-4080,-4074,-4065,-4056,-4046,
-4034,-4021,-4006,-3991,-3974,-3956,-3937,-3917,-3896,-3873,
-3849,-3824,-3798,-3770,-3742,-3712,-3681,-3650,-3617,-3582,
-3547,-3511,-3474,-3435,-3396,-3355,-3314,-3271,-3228,-3183,
-3138,-3091,-3044,-2996,-2946,-2896,-2845,-2793,-2741,-2687,
-2633,-2578,-2522,-2465,-2408,-2349,-2290,-2231,-2171,-2110,
-2048,-1986,-1923,-1860,-1796,-1731,-1666,-1600,-1534,-1468,
-1401,-1334,-1266,-1198,-1129,-1060,-991,-921,-852,-782,
-711,-641,-570,-499,-428,-357,-286,-214,-143,-71,0
};