Digital Spectrum AnalyzerWord格式文档下载.docx
《Digital Spectrum AnalyzerWord格式文档下载.docx》由会员分享,可在线阅读,更多相关《Digital Spectrum AnalyzerWord格式文档下载.docx(10页珍藏版)》请在冰豆网上搜索。
专业班级:
电子信息工程0703班
学生姓名:
海振国
指导教师:
于海雁
1.Introduction
Nowdaysasthespectrumanalyzersinmarketarequiteexpensive,mostofthecollegescan’taffordtobuymanyforstudents’experiments.Sospectrumanalyzersaremainlyusedforresearchs.However,onlytoseethefrequencyspectrumintheirtextbooksisnotenoughforthecollegestudents.It’surgenttohavespectrumanalyzersintheirexperimentclass.Thiskindofspectrumanalyzerweinventedisquitesimpleandcheap,andit’spropertyindexisenoughforcollegeexperiments.
2.GeneralDesign
Thesystem’sgeneraldesignisshowninFigure1.TwomainchipsareaFPGAandasinglechipprocessor.WeuseC8051singlechipprocessorasthecontroldevice,andFPGAasthedigitalsignalprocessingchip.Wecandividethissystemintosixparts,namelyprocessingtheinputsignal,A/Dsampling,digitalmixing,CICdecimationfilter,FIRlow-passfilter,andFFT.Basedonthesamplingtheoems,wecutaappropriatelengthoftimedomainsignalandconvertittodigitalsignal.ThenwecangetthefrequencyspectrumaccordingtothespecificstepsanddisplayitbyLCD.Moreoverwemaketheinterfaceintellective.
Figure1.Thesystem’sgeneraldesign
3.MainTechniques
3.1FFTBasedonDigitalDownConverting
Thisisthemostimportanttheoryaswellasthehighlightinallthesystem.WiththefastdevelopmentofA/DconvertingandDSPtechnique,theFFTbasedondigitaldownconvertingcansolvemanyproblemsthattraditionalFFThassuchasbeingshortofmemory.
3.2DDS
Theswept-frequencysignalgeneratorbasedonDDStechniqueconsistsofareferencefrequencysource,aphaseaccumulator,aRAMusedtostorethesinesamplingpoints,aD/Aconverterandalowpassfilter.
Wesetthefrequencyofthereferencefrequencysourceasandthecountercapacityofthephaseaccumulatoras(Nisthedigitoftheaccumulator).IfthefrequencywordisM,thenthefrequencyoftheDDSsystem’soutputsignalis,andtheresolutionis.Inordertooutputsignalwithbandwidthin0~5MHzbutthelowpassfilterislimited,sowesetas200MHzandthephaseaccumulator’sbytewidthas32.Theaccumulator’shigh10bitsisusedastheROM’saddresstoreadthewavegraph(onesinewaveperiodissampled1024points).Moreoverwealsosetthefrequencywordas32bits.
4.HardwareDesign
4.1AGCcircuit
InordertosatisfytheA/DsamplingweshouldaddAGCcircuit.InthissystemwechooseADcompany’sAD603astheAGCcircuit’smainchip.Thischipisalownoise,voltagecontroledlineargainamplifieranditiswidelyused.
TheAGCcircuitisshownasbelowinfigure2:
Figure2.AGCCircuit
4.2ADConvertingCircuit
InthissystemwechooseTI’sADS2806asourA/Dconverter.Itisa12-bitA/Dconverter.ItsSFDRis73dB,SNRis66dB,andsamplingrateis32Msps.ADS2806circuitisshowninfigure3asbelow.
Figure3.ADS2806circuit
4.3FPGAandItsPeripheralInterface
TheFPGAwechoosedisEP3C40F484ofAlteraCycloneIIIseries.Initthereare39,600Les,126multipliersand4PLLsaswellas1,134,000bitsmemory.
Somanyresoursesareenoughtous.
FPGAanditsperipheralinterfacecircuitsareshowninfigure4:
Figure4.FPGAanditsperipheralinterface
5.SoftwareDesign
Allthesoftwaredesignincludestwoparts,theyareFPGAsoftwaredesignandsinglechipprocessorsoftwaredesign.Asthemaincontroldevice,thesinglechipprocessor’sjobaretoinitializethesystem,tocontrolthekeyboardandtheLCD.AndtheFPGAisusedtoprocessthecomplexddata.Thesystem’sflowchartisshowninfigure5below:
Afterpoweron,thesinglechipprocessorwillinitializeallthesystemsuchaswritingthedefaultvalueoftheCICandFIRfilterandthefrequencyofthedigitalmixer.Afterinitialization,thesystemwillworkbasedonthedefaultcenterfrequencyandresolutionandwaitthekeyboardtoinput.Whentheuserinputthenewcenterfrequencyandresolution,thesinglechipprocessorwillrefreshtheLCD.
Figure5.Thesystemflowchart
6.AnalysisofTestResultandConclusion
Wetestedoursystemusingmatlab.Theresultisshowninfigure6.Thehorizontalaxisisresolution,anditsunitis10Hz/square.Theverticalaxisisamplitudevalue.Fromthefirstpicturewecanseethatthespectrumofthesinewaveisoneverticalline.Thereislittleleakedspectrum.Soitiscoincidentwiththeidealcase.Fromthesecondpicture,wecangettheconclusionthatresultisalsowhatwewant.
Thissystemcanworkwelljustaswhatweexpected.Itisconvinienttooperate.Moreoveritisquitecheap.Soitissuitabletocolleges’experimentteaching.
Figure6.Thetestresult
1引言
目前,由于频谱分析仪价格昂贵,高等院校只是少数实验室配有频谱仪。
但电子信息类教学,如果没有频谱仪辅助观察,学生只能从书本中抽象理解信号特征,严重影响教学实验效果。
针对这种现状提出一种基于FPGA的简易频谱分析仪设计方案,其优点是成本低,性能指标满足教学实验所要求的检测信号范围。
2设计方案
图1为系统设计总体框图。
1、系统所用的两个主要芯片是FPGA和单片机。
我们用C8051系列单片机中的作为控制器,FPGA为数字信号算法处理单元。
系统设计遵循抽样定理,我们可以将这个系统分为六个部分,分别为输入信号的A/
D采样,混叠,CIC抽取滤波器,FIR低通滤波器和FFT。
在时域内截取一段适当长度信号,对其信号抽样量化,按照具体的步骤求取信号的频谱,并在LCD上显示信号的频谱,同时提供友好的人机会话功能。
图1:
该系统的总体设计
3理论分析
3.1数字下变频FFT
随着高速A/D转换和DSP技术的发展,数字下变频的快速傅里叶变换FFT(FastFourierTransform)技术能够有效减少传统FFT技术存在的内存不足。
在高中频、高采样率系统中实现信号频谱的高分辨率、低存储量和低运算量,从而极大提高系统的实时性。
3.2直接数字频率合成器DDS原理
用直接数字频率合成器DDS(DirectDigitalSynthesiz-er)原理实现扫频信号的信号源主要由参考频率源、相位累加器、正弦波采样点存储RAM、数模转换器及低通滤波器构成。
设参考频率源频率为fclk,计数容量为2N的相位累加器(N为相位累加器的位数),若频率控制字为M,则DDS系统输出信号的频率为fout=fclk/2N×
M,而频率分辨率为△f=fclk/2N。
为达到输出频率范围为5MHz的要求,考虑到实际低通滤波器性能的限制,fclk为200MHz,相位累加器的位数为32位。
其中高10位用做ROM地址读波表(1个正弦波周期采样1024个点),频率控制字也为32位,这样理论输出频率满足要求。
4系统硬件设计
4.1AGC电路
输入信号经高速A/D采样,信号幅度必须满足A/D的采样范围,最高为2-3V,因此该系统设计应加AGC电路。
AGC电路采用AD603型线性增益放大器。
图2为AGC电路。
图2:
AGC电路
4.2A/D转换电路
ADS2806是一款12位A/D转换器,其特点为:
无杂散信号动态范围(SFDR)为73dB;
信噪比(SNR)为66dB;
具有内部和外部参考时钟;
采样速率为32MS/s。
图3为ADS2806的电路。
为使A/D转换更稳定,在A/D转换器的电源引脚上增加滤波电容,抑制电源噪声。
该电路结构简单,在时钟CLK的驱动下,数据端口实时输出数据,供FPGA读取。
图3:
ADS2806电路
4.3FPGA及外围接口模块
选用CycloneⅢ系列EP3C40F484型FPGA,该器件内部有39600个LE资源,有1134000bit的存储器,同时还有126个乘法器和4个PLL锁相环。
由于该器件内部有大量资源,因而可满足其内部实现数字混频、数字滤波、以及FFT运算。
FP-GA正常工作时,主要需要的外部接口有:
时钟电路、JTAG下载电路、配置器件及下载电路。
图4为FPGA的外围接口电路。
图4:
FPGA及外围接口
5系统软件设计
系统软件设计包括单片机和FPGA两部分,单片机作为整个系统的核心控制单元,主要负责系统的初始化、键盘输入控制以及LCD显示等功能;
而FPGA的高速并行计算性能使其很适合进行实时性要求较高的信号处理运算。
系统软件流程如图5所示。
图5:
系统流程图
系统上电后,单片机分别初始化系统各个模块,写入默认的CIC、FIR滤波器参数和写入默认的数字混频器频率值。
初始化完成后,系统开始以默认的中心频率和分辨率分析频谱,进入等待键盘输入状态。
当用户通过键盘重新输人中心频率和分辨率等参数后,单片机重新刷新LCD,同时可通过键盘操作LCD上的画面,移动光标,利用软件计算对应光标处的频率值并在LCD上显示,而且还可以对整个图像进行放缩以方便观察频谱。
6测量结果分析
先通过Matlab软件进行仿真,分别用程序测试频率为10Hz的正弦波方波,系统仿真结果如图6所示。
从图6a看出10Hz正弦波频谱是一条谱线,其周围只有很少泄漏频率分量,符合理想情况。
图6b是10Hz方波的分析结果,其结果也是符合理论的。
图6:
测试结果
指导教师评语:
指导教师签字:
年月日