ImageVerifierCode 换一换
格式:DOCX , 页数:23 ,大小:99.44KB ,
资源ID:9246258      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-9246258.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(低频数字式相位测量仪1.docx)为本站会员(b****8)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

低频数字式相位测量仪1.docx

1、低频数字式相位测量仪1 电子竞赛低频数字式相位测量仪 目 录1 设计原理 31.1 系统方案设计 31.1.1 测量方法的比较与选择 31.2 设计方案的确定 32 系统硬件的基本组成部分 42.1 移向网络 42.2 相位处理 62.2.1 信号处理电路 62.2.2 相位测量电路 73 系统的软件原理设计 84 系统的调试 84.1 测量仪器仪表 84.2 移相网络电路参数测定 84.3 两路输出的正弦信号峰-峰值测定 95 结果分析 96 参考文献 10附 录 10低频数字式相位测量仪摘要:低频数字相位测量仪是在工业领域中经常用到的一种测量工具,主要应用于同频率正弦信号间的相位差的测量显

2、示。本系统采用Cyclone EP2C35F48I8作为数据处理及控制核心,由移相网络,相位测量以及显示电路组成。该系统可以对20Hz20kHz频率范围内的信号进行高频采样处理,并把收集到的数据送入FPGA进行相位差测量运算并送显示电路显示,测相绝对误差不大于2。 关键词: 低频;移向网络;相位测量仪;FPGA1 设计原理1.1 系统方案设计1.1.1 测量方法的比较与选择1)DFT测相法即将待测信号通过A/D转换得到f(n)、f(n)按离散傅里叶变换得出离散频谱F(k)、f(n)和F(k)为傅里叶变换对,通过运算得到两路信号的基波相位,从而计算出相位差。DFT测相法的精度受限于ADC的采样精

3、度,需要高速ADC对信号进行过采样,测量方案复杂,可以通过采集卡在计算机上实现虚拟仪器,所以主要应用在精度要求很高的场合和虚拟仪器中。2)填充计数测相法 即两路同频的正弦信号经过信号整形电路后得到方波信号,方波信号经过鉴相器后,得到两路输入信号的相位差信号,用固定频率的采样脉冲进行填充并计数,从而计算出相位差。填充计数测相法主要应用在要求一定的精度,测量的频率不是太高但实时性要求很强的场合,易于实现数字化和自动化,低频数字相位仪适合用填充计数法。填充计数测相法的基本算法:若正弦波整形后的方波信号频率为f,周期为T,采样脉冲周期为TC,方波一个周期内对采样脉冲计数为,n则被测信号频率f=1/T=

4、1/nTC。同样的方法测出两个同频正弦波起点之间的时间差为t,则两信号的相位差。1.2 设计方案的确定 根据系统测量方法及电路设计的简单可靠性,所以系统由三部分组成:移向网络、相位测量、显示部分构成。结构如图1所示。2 系统硬件的基本组成部分2.1 移向网络对于A路输出,将波形信号输入不加移相而直接输出;而B路输出,是将波形信号经过低移相网络进行移相变化输出。通过改变开关K1、K2的位置来控制相移范围。移向网络电路图如图所示。 信号输出A、B的相位关系,电位器Rw1接的是电压跟随器,调节电位器Rw1可以使B输出在范围内。调节电位器Rw2、Rw3可以调节A输出和B输出的正弦信号峰值在0.35V范

5、围内变化。采用NE5532运算放大器是为了减少输出对EC网络的影响。 NE5532运算放大器有10KHZ的带宽,能使输出信号真实地反映RC网络相移情况。用开关K1、K2同时分别接电阻R1、R2、R3,可以使频率为100HZ、1KHZ、10KHZ的相移在范围内变化。R1、R2、R3的数值是实验值。理论估算值根据 (1-1) UR、UC 分別为A、B输出幅值; (1-2) 为相位角,C为电容值; (1-3) f为输入频率;当电阻、电容的系数阻抗相等时,移相满足90要求。 (1-4) (1-5) 当f变化时, (1-6) (1-7) =15.9k (1-8)为使移相范围大于,则在高通电路中使电阻小于

6、15.9K,在低通电路中大于15.9K。 电容不变,当频率变化时,对应阻值的变化。频率阻值电容100HZ160k10uF1KHZ16k10uF10KHZ1.6k10uF2.2 相位处理2.2.1 信号处理电路相位测量前置级是信号处理电路,由阻抗变换和放大、限幅、电平转换、整形电路组成。如图所示。 阻抗变换和放大采用同比例放大,具有输入阻抗高的特点,但有共模输入电压,为了提高输入电阻,限制共模输入电压幅值,在输入端并联100电阻。限幅电路的主要目的是限制信号的幅度,保护运放的输入级且提高输入电压的变化速度。将信号转换成幅值5V的方波。整形电路是将输出电压波形边沿变陡去除噪声.信号处理电路的相位超

7、前输出端、相位滞后输出端的信号给FPGA。2.2.2 相位测量电路测量两个信号之间的相位差通过计算实现。 (2-1) (2-2)其中 t 两个信号之间的时间差;N两个信号之间的计数器的计算值;T计数器之间的时钟周期;两个信号之间的相位差;Tx被测信号的周期;f计数器的时钟频率;fx被测信号的频率。计数模块MEASURE_N计算N。频率计数模块FREQ24T测被测信号的频率fx,BCD_TO_8421模块将fx由二-十进制转换成二进制数。计算相位模块CONSIDER计算相位差。COUNT模块将相位差由二进制数转换成二-十进制数。最后进过译码用四位数码管显示出相位差。3 系统的软件原理设计4 系统

8、的调试4.1 测量仪器仪表 (1) 信号发生器 RIGOL DG3061A (2) 数字式万用表 RIGOL DM3051 (3) 数字存储式示波器 RIGOL DS1102CA4.2 移相网络电路参数测定用函数发生器分别产生100HZ、1KHz、10KHZ正弦信号,开关K1、K2同时拨至位置1、2、3,用示波器观察移相前后的相位差。 开关 内容输入信号频率连续移相范围 1100HZ-44.76 44.35 21KHZ-45.43 43.76 310KHZ-45.74 43.21 4.3 两路输出的正弦信号峰-峰值测定当频率f变化,幅值为5V时,对应输出峰-峰值的变化范围如表所示。 信号输出

9、频率100HZ1KHZ10KHZA6.8mv 5.08v5.4mv 4.96v3.8mv 3.76vB14mv 5.80v14.4mv 5.64v7.4mv 4.28v 5 结果分析 1、当信号输入时移相网络输出相移范围为-45.7444.35满足题目要求; 2、两路输出在正弦信号峰-峰值均可在0.35V范围内变化; 3、实现了相位差的数字显示,分辨率为0.1,符合题目要求。 4 、相位测量绝对误差2。6 参考文献1高吉祥.唐朝京.模拟电子线路设计M.北京:电子工业出版社,20072 潘松.黄继业.EDA技术与VHDLM.北京:清华大学出版社,2009 3周雪.电子技术基础M.北京电子工业出版

10、社,2004.附 录library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all; entity bcd_to_8421 is port(clk:in std_logic c_in:in std_logic_vector(23 downto 0); c_out:out std_logic_vector(14 downto0); end bcd_to_8421; architecture arch of bcd_to_8421 is signal a,b:

11、std_logic_vector(23 downto 0); begin process(clk) -BCD_TO_8421 begin if clkevent and clk=1then a=c_in; b=a(23downto20)*11000011010100000000+ a(19 downto 16)*10011100010000000 + a(15 downto 12) *1111101000000+ a(11 downto 8)*1100100000+ a(7 downto 4)*1010000+ a(3 downto 0); end if;c_out=b(14 downto 0

12、) end process; end arch;library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; entity consider is port(clk:in std_logic; n:in std_logic_vector(25 downto 0); freq:in std_logic_vector(14 downto 0); cout:out std_logic_vector(10 downto 0); end consider;

13、 architecture arch of consider is signal c0,c1,e,e0,d0,d1,d2,d3:integer range 0 to 400000000; signal count:std_logic_vector(10 downto 0); signal j :std_logic_vector(14 downto 0); signal m:std_logic_vector(25 downto 0); begin process(n,clk) begin if clkevent and clk=1then m=n; c0=conv_integer(m); d0=

14、c0*315; d1=d0/1024; end if ; end process; process(clk,freq) -CONSIDER begin if clkevent and clk=1then j=freq; c1=conv_integer(j); e=c1*d1; e0=e/2048; count=conv_std_logic_vector(e0,11); end if ; end process; cout=count; end arch; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned

15、.all; use ieee.std_logic_arith.all; entity count is port(clk,clr:in std_logic; c_in:in std_logic_vector(10 downto 0); c_out1,c_out2,c_out3,c_out4:out std_logic_vector(3 downto 0); end count; architecture arch of count is signal b1,b2,b3,b4:std_logic_vector(3 downto 0); signal a:std_logic_vector(1 do

16、wnto 0); signal mid:std_logic_vector(15 downto 0); begin process(clk,clr,c_in) -COUNT begin if clkevent and clk=1then if clr=0then a=00; b1=0000; b2=0000; b3=0000; b4 mid=00000&c_in; a if mid=1010then mid=mid-1010; b2=b2+1; if b2=1001then b2=0000; b3=b3+1; if b3=1001then b3=0000; b4=b4+1; end if ; e

17、nd if ; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; entity count is port(clk,clr:in std_logic; c_in:in std_logic_vector(10 downto 0); c_out1,c_out2,c_out3,c_out4:out std_logic_vector(3 downto 0); end count; architecture arch of count is s

18、ignal b1,b2,b3,b4:std_logic_vector(3 downto 0); signal a:std_logic_vector(1 downto 0); signal mid:std_logic_vector(15 downto 0); begin process(clk,clr,c_in) -COUNT begin if clkevent and clk=1then if clr=0then a=00; b1=0000; b2=0000; b3=0000; b4 mid=00000&c_in; a if mid=1010then mid=mid-1010; b2=b2+1

19、; if b2=1001then b2=0000; b3=b3+1; if b3=1001then b3=0000; b4=b4+1; end if ; end if ; else b1=mid(3 downto 0); end if ; anull; end case; end if; end if; end process; c_out4=b4; c_out3=b3; c_out2=b2; c_out1=b1; end arch; else b1=mid(3 downto 0); end if ; anull; end case; end if; end if; end process;

20、c_out4=b4; c_out3=b3; c_out2=b2; c_out1=b1;end arch; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity freq_t is port(clk:in std_logic;-1 Hz shi zhong freq_en:out std_logic; cnt_clr:out std_logic; load:out std_logic); end freq_t; architecture a of freq_t is signal di

21、v2clk:std_logic; begin process(clk) -FREQ24T begin if clkevent and clk=1then -1 Hz shi zhong 2 fen pin div2clk=not div2clk; end if; end process; process(clk,div2clk) begin if clk=0and div2clk=0then cnt_clr=1; else cnt_clr=0; end if; end process; load=not div2clk; freq_en clk10=clk0; clk11=clk1; if c

22、lk10=0 and clk11=0then count10); end if ; if clk10=0then x=1; end if ; if x=1then if clk10=1then if clk11=0then y=1; end if ; if y=1then if clk11=1then count01=count1; count1=count1; else count01=count1+1; end if ; end if ; end if ; end if; if count01=0 then a=1; else a clk20=clk1; clk21=clk0; if cl

23、k20=0and clk21=0then count20); end if ; if clk20=0then x=1; end if ; if x=1then if clk20=1then if clk21=0then y=1; end if ; if y=1then if clk21=1then count02=count2; count2=count2; else count2=count2+1; end if ; end if ; end if ; end if ; if count02=0 then a=0; else aa=1; end case; count0=count01 or

24、 count02; end if; f_out=a; n_out=count0; end process; end arch; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; entity disp is port(clk,a:in std_logic; inl:in std_logic_vector(3 downto 0); inm:in std_logic_vector(3 downto 0); inh:in std_logic

25、_vector(3 downto 0); inhh:in std_logic_vector(3 downto 0); midd:out std_logic_vector(7 downto 0); disp1:out std_logic_vector(2 downto 0); end disp; architecture arch of disp is signal mid:std_logic_vector(4 downto 0); signal disp2:std_logic_vector(2 downto 0); begin process(clk,inl,inm,inh,inhh) -DISP begin if clkevent and clk=1then if disp2=111then disp2=010; else disp2=disp2+1; end if ; disp1midmidmidmidmiddnu

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2