低频数字相位测量仪 下载本文

内容发布更新时间 : 2024/6/18 20:56:03星期一 下面是文章的全部内容请认真阅读。

摘 要

低频数字相位测量仪

向文芳

摘 要

设计了一个基于现场可编程门阵列(FPGA)和AT89S51单片机相结合的低频

数字相位测量仪。本系统可分为三大基本组成部分:数据测量电路、数据运算控制电路和数据显示电路。FPGA数据测量电路的功能就是实现将待测正弦信号的周期、相位差转变为19位的数字量。单片机数据运算控制电路的功能就是负责读取FPGA测量到的数据,并根据这些数据计算待测正弦信号的频率及两路同频正弦信号之间的相位差,同时通过功能键切换,显示出待测信号的频率和相位差。数据显示电路的设计采用静态显示方式,显示电路由8片1位串入8位并出的74LS164芯片组成。

本系统拟用FPGA和单片机相结合,构成整个系统的测控主体。整个系统发挥了FPGA和单片机各自的优势,具有高速而可靠的测控能力,具有比较强的数据处理能力,键盘输入及显示控制比较灵活,系统可扩展性比较好,整个系统性能价格比比较好。

关键词 FPGA,单片机,频率,相位差,相位测量仪

I

攀枝花学院本科毕业设计(论文) ABSTRACT

ABSTRACT

The paper has designed a low frequency digital phase measuring instrument based on the system which communicates FPGA and the microcontroller (AT89S51). This system includes three modules: data measuring electric circuit, data operation control circuit and data display electric circuit. The function of the FPGA data measuring electric circuit is transforms the cycle, phase difference of the two input sine signals to be 19 bit of digital data. The function about microcontroller data operation control circuit is to read the data which FPGA has measured, and according to these data computations the frequency and the phase difference between two group sine signals which have same frequencies, simultaneously through the function key switch, displaying the frequency and phase difference of the two group sine signals. The data display electric circuit’s design adopting the static state display mode, the display circuit is composed by 8 pieces of 74LS164 chip (8-bit Serial-Input/Parallel-Output shift Register).

This system plans with FPGA and the microcontroller, framing the phase measuring instrument’s dominant measurement and control system. The overall system has displayed FPGA and the microcontroller respective superiority, has high speed and the reliable measurement and control ability, and has the quite strong capacity of deal with data, the keyboard entry and the display control also quite flexible. The system’s extension is quite good. All the superiorities make the good performance price ratio of this low frequency digital phase measuring instrument.

Keywords

FPGA, Microcontroller, Frequency, Phase difference, Phase

measurement system

II

目 录

目 录

摘 要 ................................................................................................................................. I ABSTRACT .................................................................................................................... II

1 绪论 ............................................................................................................................... 1

1.1 课题背景 ................................................................................................................... 1 1.1.1 研究意义 ............................................................................................................. 1 1.1.2 研究现状、水平及发展趋势 ................................................................................. 1 1.2 课题核心 ................................................................................................................... 3

2 系统设计 ....................................................................................................................... 4

2.1 设计要求 ................................................................................................................... 4 2.2 总体设计思想 ............................................................................................................ 4 2.3 总体测量思路 ............................................................................................................ 5

3 设计方案 ....................................................................................................................... 6

3.1 测量方案 ................................................................................................................... 6 3.1.1频率测量 .............................................................................................................. 6 3.1.2 相位差测量 .......................................................................................................... 8 3.2 正弦波信号发生器设计 .............................................................................................. 9 3.3 信号整形电路的设计 .................................................................................................. 9 3.3.1 方案论证 ............................................................................................................. 9 3.3.2 关于四电压比较器LM339 .................................................................................. 11 3.4 移相网络设计 .......................................................................................................... 11 3.4.1 性能要求 ........................................................................................................... 11 3.4.2 方案论证 ........................................................................................................... 11

4 FPGA数据测量电路的设计 ........................................................................................ 14

4.1 设计原理 ................................................................................................................. 14 4.1.1 设计思路 ........................................................................................................... 14 4.1.2 FPGA数据测量电路的测量原理 .......................................................................... 14 4.1.3 精度分析 ........................................................................................................... 14 4.2 FPGA概述................................................................................................................. 15 4.3 设计平台 ................................................................................................................. 16 4.3.1 软件设计平台 .................................................................................................... 16

1