【正文】
Along with is measured based on the traditional frequency measurement principle frequency meter measuring accuracy the signalling frequency the drop but to reduce, in is practical has the very big limitation, but and so on the precision frequency meter not only has teaches the high measuring accuracy, moreover maintains the constant test precision in the entire frequency measurement region. Using and so on the precision survey principle, unified the monolithic integrated circuit technical design one kind of numeral frequency meter, because has used the shield actuation electric circuit and technical measure and so on digital average value filter, thus could in pared in the frequency range and the scope scope which the width decided to the frequency, the cycle, the pulse width, occupied parameter and so on spatial ratio carries on the survey, and might through the adjustment strobe time initialization measuring accuracy. Selection this kind of synthesis measured the mensuration took the digital frequency meter the survey algorithm, proposed based on the FPGA digital frequency meter design proposal. Has produced this design proposal actual survey effect, proved this design proposal is practical and feasible, can achieve the high frequency measurement precision Keywords Precision survey, microcontroller, frequency meter, strobe time,field programmable gate array1 緒論測量頻率是電子測量技術中最常見的測量之一。選取的這種綜合測量法作為數(shù)字頻率計的測量算法,提出了基于FPGA 的數(shù)字頻率計的設計方案。基于FPGA和單片機的多功能等精度頻率計設計 摘 要基于傳統(tǒng)測頻原理的頻率計的測量精度將隨著被測信號頻率的下降而降低,在實用中有很大的局限性,而等精度頻率計不但有較高的測量精度,而且在整個測頻區(qū)域內保持恒定的測試精度。運用等精度測量原理,結合單片機技術設計了一種數(shù)字頻率計,由于采用了屏蔽驅動電路及數(shù)字均值濾波等技術措施,因而能在較寬定的頻率范圍和幅度范圍內對頻率,周期,脈寬,占空比等參數(shù)進行測量,并可通過調整閘門時間預置測量精度。給出了該設計方案的實際測量效果,證明該設計方案切實可行,能達到較高的頻率測量精度。不少物理量的測量, 如時間、速度等都涉及到或本身可轉化為頻率的測量。而在實際工程中, 并不是對所有信號的頻率測量都要求達到非常高的精度。M法是在給定的閘門時間內測量被測信號的脈沖個數(shù), 進行換算得出被測信號的頻率。這兩種測量法的精度都與被測信號有關, 因而它們屬于非等精度測量法。M /T法的核心思想是通過閘門信號與被測信號同步, 將閘門時間τ控制為被測信號周期長度的整數(shù)倍。預置閘門關閉時, 標準信號并不立即停止計數(shù), 而是等檢測到被測信號脈沖沿到達時才停止, 完成被測信號整數(shù)周期的測量。122 系統(tǒng)設計方案根據頻率計的設計要求,我們可將整個電路系統(tǒng)劃分為幾個模塊,頻率測量模塊,周期測量模塊,脈寬測量模塊,和占空比測量模塊。如圖所示。 頻率計組成模塊框圖 頻率測量模塊①直接測頻法:把被測頻率信號經脈沖整形電路處理后加到閘門的一個出入端,只有在閘門開通時間T(以秒計)內,被計數(shù)的脈沖送到十進制計數(shù)器進行計數(shù);設計數(shù)器的值為N,則可得到被測信號頻率為f=N/T,經分析,本測量在低頻率的相對測量誤差較大,即在低頻段不能滿足本設計的要求。③倍頻法:是指把頻率測量范圍分成多個頻段,使用倍頻技術,根據頻段設置倍頻系數(shù),將經整形的低頻信號進行倍頻后在進行測量,對高頻段則直接進行測量。④等精度測頻法:。標準頻率信號從CNT1的時鐘輸出端CLK輸入,其頻率為fs,經整形后的被測信號從CNT2的時鐘輸入端CLK輸入,設其實際頻率為fx;當預置門控信號為高時,經整形后的被測信號的上升沿通過D觸發(fā)器的Q端同時啟動計數(shù)器CNT1和CNT2。當預置門信號為低時,隨后而至的被測信號的上升沿將兩個計數(shù)器同時關閉。則下式成立:fx/Nx=fs/Ns由此推得:fx=fs*Nx/NsDQCLKENCLKCNT1OUT1CLRCLRCLKCLKENCNT2OUT1●●●預置門控信號標準頻率信號被測信號清零信號 等精度測頻法原理框圖若所測頻率值為fx,其真實值為fxe,標準頻率為fs,一次測量中,由于fx計數(shù)的起停時間都是該信號的上跳沿觸發(fā)的,因此在Tpr時間內對fx的計數(shù)Nx無誤差,在此時間內的計數(shù)Ns最多相差一個脈沖,即fx/Nx=fs/Ns,則下式成立: fxe/Nx=fs/Ns+△et 可分別推得 fx=fs*Nx/Ns fxe=fs*Nx/Ns+△et