摘要
光电分选机是一种利用光电技术分析识别物料的品质优劣,并利用压缩空气将劣质物料剔除的高科技设备。该设备由于采用独特而有效的筛选方式,被广泛应用在颗粒状物料品质检测与分级领域,可有效提高物料的品质等级,增加其附加值,提高加工技术的自动化程度,具有很好的社会与经济效益。因此,对光电分选机的研究有着重要的现实意义。
本课题主要对光电分选机的检测系统进行研究,设计了一种以Xilinx公司的FPGA芯片XC3S200和高速线阵CCD传感器为核心的光电检测系统。它的主要功能是通过CCD传感器对高速下落的颗粒状物料进行动态扫描,由图像数字转换器对CCD输出信号进行信号调理、A/D转换,FPGA对转换后的图像数据进行高速处理,完成剔除信号的输出。
检测系统的硬件设计包括FPGA核心电路的设计;线阵CCD驱动电路的设计;图像数字转换器的接口电路设计;通信电路的设计。按照设计要求,制作了印制电路板。
检测系统的软件部分包括利用DCM完成CCD驱动时序的设计;图像数字转换器的控制接口和相关双采样时序的设计;制定与分选机主控制器之问的通信协议和数据报文的滤波;图像数据的采集和中值滤波处理;对滤波后的图像数据进行二值化处理和异物位置的判断;利用FPGA内部的BlockRAM对检测信号进行可调延迟时间的设计;气枪控制系统的时序设计;检测指示电路的驱动时序设计;CCD像素位置的校准;CCD数字图像数据的存储。
本文采用Verilog语言进行硬件电路描述,程序都是基于自顶向下的模块化的设计方法。利用ISE8.2、Synplify Pro8.1和Modelsim6.1软件平台对各模块进行设计、仿真、实现。最后对设计的程序进行下载和在线调试。经过大量的实验,检测系统已成功驱动CCD,完成对图像数据的采集、预处理、识别检测。
Photoelectric sorter is a high-tech device, which distinguish the materials' quality with photoelectricity and remove the inferior stuffs with the help of compressed air. Because of the unique technical and sort feature, the device is widely used in detecting and grading of grainy materials, which can effectively improve materials' quality and the automatization level of machining technology, so, it gains great social and economic benefits. Therefore, the study on the photoelectric sorter is of great importance and practical significance.
The thesis mainly studies the detection system of photoelectric sorter and designs the photoelectric detection system based upon XC3S200 FPGA and high-rate linear CCD. The function of detection system scans the falling grainy materials in high speed by CCD sensor. The CCD output signal through the image digitizer which includes the image signal conditioning, A/D converter is high-rate processed by FPGA. Then the detection system sends out removed signals.
The hardware design of detection system includes the core circuit of FPGA; drive circuit of CCD; the interface circuit of digitizer; communication circuit. Printed circuit board is designed following request.
The software design of detection system includes the driving time sequence design of CCD by DCM; the control interface and CDS time sequence of XRD98L59; constituting communication protocols with main control system and implementing data message filter; acquiring image data and implementing median filter; image binarization and the position of infested objects recognition; implementing delay time adjusting of detected signals by BlockRAM; the time sequence of the air gun control system; the driving time sequence for detecting show circuit; adjusting the position of CCD pixel; storaging the digital image data of CCD.
In this paper, the hardware description is realized in Verilog language. The design of system software takes top-down metheod and the way of modularization. Using the platform of ISE8.2, Synplify Pro8.1, Modelsim6.1 software has completed the simulation, synthesis, implementation and configuration of every module. The program is downloaded in XC3S200 and debugged in-line. The experimental results prove detection system has accomplished driving of CCD, image acquisition, image pre-processing, image recognition and detection.
引文
[1]Pasikatan M C, Dowell F E. Sorting systems based on optical methods for detecting and removing seeds infested internally by insects or fungi. Applied Spectroscopy Reviews, 2001,36(4):399-416.
[2]陈善峰,王俊.农产品分级技术及品质检测设备的现状与发展趋势.粮油加工与食品机械,2000,(4):8-10.
[3]Miller B K, Delwiche M J.A color vision system for peach grading. Transactions of the ASAE, 1989,32(4):1484-1490.
[4]范平.浅析色选技术在中国的发展过程.粮食科技与经济,2005,(4):46-47.
[5]Pasikatan M C, Melchor C. Evaluation of a High-speed Color Sorter for Segregation of Red and White Wheat. Applied Engineering in Agriculture, 2003,19(1):71-76.
[6]孟楚年,赵建柱,张承凯等.大火色选机.粮食与饲料工业,1997,(3):15-18.
[7]Liao K, Paulsen M R, Reid J F. Real-time Detection of color and surface defects of maize kernels using machine vision. Journal of Agricultural Engineering Research, 1994, 59(1):263-271.
[8]王志健,王勤海.关于色选机性能与质量的评价.西部粮油科技,2003,(2):12-14.
[9]张麟.光电色选机及其应用.农机与食品机械,1997,(5):25-27.
[10]王诚,薛小刚,钟信潮.FPGA/CPLD设计工具—Xilinx ISE 5.x使用详解.北京:人民邮电出版社,2003.
[11]黄智伟.FPGA系统设计与实践.北京:电子工业出版社,2005.
[12]徐欣,于红旗,易凡.基于FPGA的嵌入式系统设计.北京:机械工业出版社,2005.
[13]王灵芝,林培杰,黄春晖.FPGA的配置及其接口电路的设计.电子测量与仪器学报,2007,21(4):109-112.
[14]王庆有.CCD应用技术.天津:天津大学出版社,2000.
[15]蔡文贵,李永远,许振华.CCD技术及应用。北京:电子工业出版社,1992.
[16]Wang Qingyou.Study on vibration measurement with the use of CCD.SPIE,1999,3558:339-341.
[17]佟首峰,阮锦,郝志航.CCD图像传感器降噪技术的研究.光学精密工程,2000,4(2):140-145.
[18]李明伟,黄鸽,刘静茹.一种高速线阵 CCD 图像数据采集系统.仪器与仪表学报,2005,26(5):716-720.
[19]李艺琳,冯勇,安澄全.用相关双采样技术提高 CCD 输出信号的信噪比.电测与仪器,1999,(5):31-32.
[20]宗献波.光电分选机数据采集系统的研究:(硕士学位论文).大连:大连理工大学,2006.
[21]陈维龙,王辉.高速电磁阀的驱动方法探讨.中国机电工业,2001,(22):56-57.
[22]连长震,李建秋,周明等.电控燃油喷射用高速电磁阀驱动方式研究.汽车工程,2002,24(4):310-313.
[23]Ciletti, Michael D. Advanced digital design with the Verilog HDL. Beijing:Publishing House of Electronics Industry, 2004.
[24]夏宇闻.Verilog数字系统设计教程.北京:北京航空航天大学出版社,2003.
[25]孙航.Xilinx可编程逻辑器件的高级应用与设计技巧.北京:电子工业出版社,2004.
[26]万文,王学良,汪骏发.基于 XRD98L61 的线阵 CCD 图像采集系统的设计.电子技术,2002,(6):378-382.
[27]Castleman K R.Digital image processing.Beijing:Tsinghua University Pr.,1998.
[28]章毓晋.图像工程上册—图像处理和分析.北京:清华大学出版社,2003.
[29]Sun T,Neuvo Y.Detai 1-preserving median based filters in image processing.Pattern Recognit.Lett,1994,15(1):341-347.
[30]李雷鸣,张焕春,张波.一种基于FPGA的图像中值滤波器的硬件实现.电子工程师,2004,30(2):47-50.
[31]杨明,杨羽,张溯.基于图像内容的中值滤波器设计及其FPGA实现.中国集成电路,2006,80(1):26-28.
[32]Sugata G,Rajiv M.Detection of composite edges.IEEE Transaction on Image Processing,1994,(1):14-25.
[33]张文革,段晨东.线阵CCD检测技术中二值化方法的研究.现代电子技术,2003,160(17):92-97.
[34]Peter M, Adhami R. Approaches to image binarization in current automated fingerprint identification systems. The 37th Southeastern Symposium on System Theory, Tuskegee, 2005:276-281.
[35]Hasenplaugh W C, Neifeld M A. Image binarization techniques for correlation-based pattern recognition. Society of Photo-Optical Instrumentation Engineers, 1999,38(11): 1907-1917.
[36]Appiah K, Andrew H.A single-chip FPGA implementation of real-time adaptive background model. IEEE International Conference on Field Programmable Technology, Singapore, 2005:95-102.
[37]Deng D, Chen S, Joos G. FPGA implementation of PWMpattern generators. Canadian Conference on Electrical and Computer Engineering, Toronto, 2001:1279-1284.
[38]Fratta A, Griffero G, Guglielmi P. Application of new FPGA-based top-performance digital control techniques to PWM power converters. IECON 2004-30th Annual Conference of IEEE Industrial Electronics Society, Busan, 2004:810-815.
[39]谭文虎,彭新生,刘守印等.AT24系列存储器数据串并转换接口的 IP 核设计.现代电子技术,2002,137(6):16-19.
[40]任晓东,文博.CPLD/FPGA高级应用开发指南.北京:电子工业出版社,2003.
[41]宋帷城,王林.复杂FPGA的新型调试工具—软件逻辑分析仪.计算机应用与软件,2005,22(4):93-95.
[42]吴健,赵飞,朱骏.复通信系统中FPGA设计的仿真与验证.通信与广播电视,2005,(1):14-19.
[43]万翔.ChipScope Pro在FPGA调试中的应用.计算机与网络,2005,(21):58-59.