《電子技術應用》
您所在的位置:首頁 > 可編程邏輯 > 設計應用 > 交換位技術改進FPGA-PWM計數器性能
交換位技術改進FPGA-PWM計數器性能
摘要: 簡單改變FPGA計數器規格使作為DAC功能PWM計數器的紋波降低。
Abstract:
Key words :

  簡單改變FPGA計數器規格使作為DAC功能PWM計數器的紋波降低。

  當需要一些模擬輸出和系統中有FPGA時,很可能選擇使用如圖1的PWM模塊和簡單低通濾波器。FPGA的輸出是固定頻率、計數器和數字比較器使占空比可變的典型波形(表1)。

PWM模塊和簡單低通濾波器

FPGA OUTPUT

 

  假設高信號使能,計數器每個時鐘周期進行計數,PWM輸出的頻率為時鐘頻率的2次冪分頻。通過連接前置比例器,使用使能來降低輸出頻率。由于輸出頻率固定,濾波器容易計算。已知占空比50%時,出現最壞的紋波。最大紋波和上升時間的限制結合決定濾波器類型和RC(電阻/電容)值。

  對表1中編碼進行非小改動,能夠改進PWM電路的性能。但在原先系統中,最大紋波電流發生在50%占空比時,最小紋波電流發生在最小占空比時,改進的版本顯示最大紋波等于標準版的最小值。關鍵是產生最高頻率的可能性,還能保持平均的占空比常數。輸出脈沖頻率越高,濾波器性能越好。

  從左到右交換所有位來修改由重編二進制比較器組成表1。MSB(最高有效位)變成LSB(最低有效位),LSB變成MSB,等等(表2)。只需重編位,而不需額外寄存器或邏輯單元。

Rewiring Modification

  表3顯示了4位PWM發出的脈沖序列。表3中,可以看到50%占空比時(第二列,值為8),頻率最大,為時鐘頻率的2分頻。在第一個紋波出現點(第二列,值為1),傳統PWM系統中有同樣的紋波,也就是說,脈沖序列是相同的。

Simulation Result

  英文原文:

  Swapping bits improves performance of FPGA-PWM counter

  A simple change to the specification of an FPGA counter lowers the ripple of a PWM counter functioning as a DAC.

  Stefaan Vanheesbeke, Ledegem, Belgium; Edited by Charles H Small and Fran Granville -- EDN, 9/13/2007

  When you need some analog outputs and you have an FPGA in your system, you probably choose to use a PWM module and a simple lowpass filter such as those in Figure 1. The output of the FPGA is typically a waveform with a fixed-frequency, variable-duty cycle, which a counter and a digital comparator generate (Listing 1).

  Suppose that Enable is high, the counter counts up every clock cycle, and the frequency of the PWM output is the clock frequency divided by 2 count bits. You can use Enable to lower the output frequency by connecting it to a prescaler. Because the output frequency is fixed, the filter is easy to calculate, because you know that the worst-case ripple happens at a duty cycle of 50%. The combination of the desired maximum ripple and settling time determines the filter type and RC (resistance/capacitance) values.

  With a small change to the code in Listing 1, you can improve the performance of the PWM circuit. Whereas in the original system, the maximum ripple currents occur at a duty cycle of 50% and the minimum ripple currents occur at the minimum duty cycle, the improved version shows a maximum ripple equal to the minimum of the standard version. The trick is to generate the highest frequency possible but keep the average duty cycle constant. The higher the frequency of the pulses on the output, the better the filter does its job.

 

 

  The modification to Listing 1 consists of rewiring the binary comparator with all the bits swapped from left to right. The MSB (most significant bit) becomes the LSB (least significant bit), the LSB becomes the MSB, and so on (Listing 2). You do only a rewiring requiring no extra registers or logic.

  Listing 3 shows the pulse trains that a 4-bit PWM emits. In Listing 3, you see that at 50% duty cycle (Value=8, second column), the frequency is maximum and equal to the clock frequency divided by two. At the first point at which some ripple shows up (Value=1, second column), there is exactly the same ripple as in the conventional PWM system—that is, the pulse train is the same.

  英文原文地址:http://www.edn.com/article/CA6475009.html

此內容為AET網站原創,未經授權禁止轉載。
主站蜘蛛池模板: 万全影院亚洲影院理论片 | 男女牲高爱潮免费视频男女 | 97久久曰曰久久久 | 加勒比色综合久久久久久久久 | 99pao在线视频成精品 | 久久国产三级 | 一级毛片免费观看不卡视频 | 美女视频在线观看黄 | 久久久综合结合狠狠狠97色 | 免费乱淫视频 | 日韩精品一区二区三区毛片 | 久久国产精品一国产精品 | 亚洲欧美在线精品一区二区 | 美欧毛片| 欧美一区二区三区在线视频 | 乱子伦农村xxxx | 国产午夜精品久久理论片 | 亚洲精品国产福利一区二区三区 | 91精品国产手机 | 被老外玩爽的中国美女视频 | 那里有黄色网址 | 免费观看女人一摸全是水 | 色天使影院| 免费的特黄特色大片在线观看 | 国产特黄特色的大片观看免费视频 | 国产在线观看精品 | 亚洲素人在线 | 亚洲毛片在线免费观看 | 免费a级在线观看播放 | 手机毛片在线 | 办公室紧身裙丝袜av在线 | 国产亚洲欧美一区二区三区 | 午夜三级a三级三点在线观看 | 成人午夜看片在线观看 | 久久久久欧美精品观看 | 亚洲天堂视频在线免费观看 | 亚洲欧洲日本天天堂在线观看 | 国产日韩视频在线观看 | 男人的天堂精品国产一区 | 男女乱淫真视频免费观看 | 手机在线视频一区 |