• 回复
  • 收藏
  • 点赞
  • 分享
  • 发新帖

SPWM中,如何计算sin值的数组,方便采点!

SPWM中,如何计算sin值的数组,方便采点!新手求解。。
全部回复(10)
正序查看
倒序查看
2011-08-24 10:25

有软件 “正弦表生成器”

0
回复
617463359
LV.2
3
2011-08-24 11:04
@hongjie0216
有软件“正弦表生成器”
呵呵。。找到了。。还是3Q!
0
回复
617463359
LV.2
4
2011-08-24 11:05
单片机正弦波代码生成程序 正弦波生成器,共享一下!!
0
回复
2011-08-24 11:40

做一个三角函数表:

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

0
回复
617463359
LV.2
6
2011-08-24 15:42
@kangzhenyi
做一个三角函数表:Sin1=0.01745240643728351sin2=0.03489949670250097sin3=0.05233595624294383sin4=0.0697564737441253sin5=0.08715574274765816sin6=0.10452846326765346sin7=0.12186934340514747sin8=0.13917310096006544sin9=0.15643446504023087sin10=0.17364817766693033sin11=0.1908089953765448sin12=0.20791169081775931sin13=0.22495105434386497sin14=0.24192189559966773sin15=0.25881904510252074sin16=0.27563735581699916sin17=0.2923717047227367sin18=0.3090169943749474sin19=0.3255681544571567sin20=0.3420201433256687sin21=0.35836794954530027sin22=0.374606593415912sin23=0.3907311284892737sin24=0.40673664307580015sin25=0.42261826174069944sin26=0.4383711467890774sin27=0.45399049973954675sin28=0.4694715627858908sin29=0.48480962024633706sin30=0.49999999999999994sin31=0.5150380749100542sin32=0.5299192642332049sin33=0.544639035015027sin34=0.5591929034707468sin35=0.573576436351046sin36=0.5877852522924731sin37=0.6018150231520483sin38=0.6156614753256583sin39=0.6293203910498375sin40=0.6427876096865392sin41=0.6560590289905073sin42=0.6691306063588582sin43=0.6819983600624985sin44=0.6946583704589972sin45=0.7071067811865475sin46=0.7193398003386511sin47=0.7313537016191705sin48=0.7431448254773941sin49=0.7547095802227719sin50=0.766044443118978sin51=0.7771459614569708sin52=0.7880107536067219sin53=0.7986355100472928sin54=0.8090169943749474sin55=0.8191520442889918sin56=0.8290375725550417sin57=0.8386705679454239sin58=0.848048096156426sin59=0.8571673007021122sin60=0.8660254037844386sin61=0.8746197071393957sin62=0.8829475928589269sin63=0.8910065241883678sin64=0.898794046299167sin65=0.9063077870366499sin66=0.9135454576426009sin67=0.9205048534524404sin68=0.9271838545667873sin69=0.9335804264972017sin70=0.9396926207859083sin71=0.9455185755993167sin72=0.9510565162951535sin73=0.9563047559630354sin74=0.9612616959383189sin75=0.9659258262890683sin76=0.9702957262759965sin77=0.9743700647852352sin78=0.9781476007338057sin79=0.981627183447664sin80=0.984807753012208sin81=0.9876883405951378sin82=0.9902680687415704sin83=0.992546151641322sin84=0.9945218953682733sin85=0.9961946980917455sin86=0.9975640502598242sin87=0.9986295347545738sin88=0.9993908270190958sin89=0.9998476951563913sin90=1
厉害。。如何生成。。
0
回复
rhb5945
LV.4
7
2011-09-01 23:59
SPWM正弦表生成表格
0
回复
lcmouse
LV.3
8
2011-09-06 14:38
@rhb5945
[图片]SPWM正弦表生成表格

 

定标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
};

 

 

0
回复
avinh
LV.1
9
2011-10-06 19:46
顶楼主的无私!
0
回复
dxsmail
LV.11
10
2011-10-06 20:15
顶上去。。。好东西。。。。呵。。。
0
回复
xhb7906021
LV.1
11
2011-10-09 17:14
@dxsmail
顶上去。。。好东西。。。。呵。。。

想请教一下,用这正弦表生成固定的脉宽波,高压也是固定的,在较大的负载时输出是正弦波,但空载时如何控制?我试过输出波形没法看的,不过我没有输出电压处的反馈,假如这里有反馈该如何处理?是在不同的输出功率改正弦波脉宽还是?这里我总是不清楚.就是不功率输出时如何反馈,如何再控制电压输出波形幅度?

望能指教一下.多谢了!

0
回复