为了实现对正弦信号频率的高精度测量,设计了一种基于FPGA的数字频率计;除测量频率外,该装置还可以测量双路方波信号的时间间隔和脉冲信号占空比。该频率计以FPGA和单片机为核心,采用“多路并行计数法”实现信号频率的高精度测量。输入信号经高频放大和比较模块转换为方波信号输入FPGA单元,经多路不同倍数分频后进行并行计数,最后由单片机选择输出精度高的一路计数值,利用换算关系得出最终的测量结果。经测试,该数字频率计可实现1Hz~199 MHz、10 mVrms~1 Vrms正弦信号的频率测量,相对误差的绝对值不大于0.0001%;100Hz~1 MHz、50mV~1V同频方波的时间间隔测量,测量范围为0.1μs~100 ms,相对误差的绝对值不大于1%;50mV~1V、1Hz~5 MHz脉冲信号的占空比测量,相对误差的绝对值不大于1%。因此,具有测量精度高、测量频率范围宽和测量幅度范围大的特点。
In order to measure the frequency of a sinusoidal signal in high precision, the article designs a digit frequency meter based on FPGA (field programmable gate array). Besides measuring frequency, the device can also measure the time interval of two square signals and the duty ratio of a pulse signal. With FPGA and MCU (micro control unit) as the kernel, the meter adopts the method called 'Parallel Multi?Ways Counting Method' to realize the high precise measurement. Specifically, signals would input FPGA after high frequency amplification module and high frequency comparing module. And then signals would be divided into multi-ways to decrease frequency by different times and be counted synchronously. Finally, MCU would select the mostaccurate result and get the final result after computing. After the test, the meter can measure the frequency of a sinusoidal signal from 1 Hz to 199 MHz and from l0 mVrms to 1 Vrms with the relative error not above 0. 0001%; the meter can measure the time interval of two square signals from 50 mV to 1 V and from 100 Hz to 1 MHz with the relative error not above 1% the meter can measure the duty ratio of a pulse signal from 50 mV to 1 V and from 1 Hz to 5 MHz with the relative error not above 1%. Therefore, the meter has thefeature of high precision, wide frequency range and wide amplitude.