摘 要:PWM是D/A轉(zhuǎn)換的一種方法,當PWM中的調(diào)制信號為正弦波時,得到的是SPWM波形。采樣控制理論中有一個重要結(jié)論是沖量相等而形狀不同的窄脈沖加在具有慣性的環(huán)節(jié)上時,其效果基本相同。SPWM法就是以該結(jié)論為理論基礎(chǔ)。通過面積等效法確定SPWM的脈沖寬度,運用數(shù)學軟件MAPLE進行運算,按照嚴格的時序控制輸出波形。采用VHDL硬件描述語言進行設計實現(xiàn)并使用Max+PlusⅡ進行仿真驗證,得到一組隨著脈寬變化的數(shù)字信號。根據(jù)D/A轉(zhuǎn)換器原理,把SPWM波形轉(zhuǎn)換成正弦波輸出。
關(guān)鍵詞:CPLD;VHDL;Max+PlusⅡ;面積等效法;時序;MAPLE
Design and Realization Based on the SPWM Sine Wave
LI Gang,AI Liang
(Changzhi College,Changzhi,046011,China)
Abstract:PWM is one method of D/A transformation.When PWM modulation signal is sine wave,SPWM waveform is obtained.In sampling control theory,there is an important theory that its effect is basic same when the pulse with the impulse are equal but the shape is different.The principle of SPWM takes the conclusion as the rationale.The pluse width of SPWM is determined by method of equiralent area it carries on the operation using mathematics software MAPLE,according to strict sequential control output wave shape. Using the VHDL hardware description language to carry on the design to realize and use Max+PlusⅡto carry on the simulation confirmation,obtaining a group diaital signal along with pulse width change.According to the D/A switch principle ,to make the SPWM profile tranforms into the sine wave and then output.
Keywords:CPLD;VHDL;Max+PlusⅡ;method of equivalent area;succession;MAPLE
SPWM波的產(chǎn)生可用單片機、專用芯片和可編程邏輯器件等來實現(xiàn),他是一組等幅、等距而不等寬的脈沖序列。采用等效面積法生成的SPWM波形精度高,更接近正弦波,且諧波分量小,同時也對CPU的運算速度提出更高的要求。
1 面積等效的SPWM控制算法
利用正弦波小塊面積S與脈沖面積β相等原則(如圖1),將正弦波的正半周分為N等分,則每一等分的寬度為π/N弧度,利用面積等效法計算出半個周期內(nèi)N個不同的脈寬值,脈寬產(chǎn)生的公式: