基于USB总线的DSP与PC通信设计及PC信号处理
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随工业环境越来越复杂,现场工程师对工业现场设备监控仪器的便携性、数据传输的速度和可靠性要求越来越高。针对这种情况,本文充分利用USB总线的即插即用、数据传输可靠性和高速等特点,配合DSP强大的控制与数字信号处理功能,设计了一种新型的便携式数据采集系统解决方案,并将其应用于焊接过程。
     本文主要完成了数据采集与传输单元、USB固件程序、USB驱动程序、PC机信号显示与处理四大部分任务。
     在数据采集与传输方面,采用DSP自带高速ADC模块,实现了分辨率10位,采样速率可达2MHz的高速采样。通过扩展USB控制芯片,实现了与PC机53MByte/s的高速数据传输,从而使数据采集系统变得更加便携易用。
     在USB固件程序方面,采用完全中断驱动的方式完成了设备枚举和数据采集。CPU处理前台任务时,USB的传输可在后台进行。确保了最佳的传输速率和更好的软件结构,同时简化了编程和调试。
     在USB驱动程序方面,利用DriverWorks开发环境,它以面向对象的思想完全封装了DDK(Device Driver Model)的所有库函数,通过Driver Works提供的类,轻松地编写出USB驱动程序,与采用传统的DDK相比,大大缩短了驱动程序开发周期。
     在PC机应用程序方面,动态显示模块采用多线程技术和高速数据转储的形式实现了高速大量数据实时显示和保存,较好地解决了在Windows平台上实现高速、大量数据实时显示时所出现的丢失数据、屏幕刷新等问题。静态分析模块结合Matlab提供的编程接口实现了算法复杂的小波分析。依据“计算机软件”即是仪器的思想,使本系统完全具备了虚拟仪器的特点。
     本课题研究和设计了USB技术在数据采集与PC通讯系统的应用,并给出了一套可行的整体开发解决方案。
The conditions around the machines in the industry field become more and more complicated. The requirement is increasing to make those monitoring and controlling instruments simple and ease of use from the field engineers. To satisfy the demands, with the benefits of USB, such as ease of use, true plug and play, high speed transmission and dependability, this paper provides a new resolution of portable virtual instrument system with USB and DSP(Digital Signal Processor)which has powerful control system and high speed data processing ablity.
     The main tasks of the paper go as follows: data acquisition and transmission, USB firmware design, USB driver design and application software design on PC.
     In data acquisition and transmission unit, the paper adopts AD module of DSP, making the system has 10 bit resolution and 2MHz sampling speed. It also realizes 53MByte/s data transmission to PC by expanding USB control chip. Thus the data acquisition system becomes more convenient and easier to be used.
     In USB firmware design unit, the paper adopts complete interrupt mode to accomplish the enumeration of USB device and A/D conversion. USB transmission is processed in backstage of CPU,while CPU is processing the missions of proscenium. Thus the optimal transmission speed and excellent structure of software are guaranteed.
     In USB dirver design unit, the paper uitilizes the developing environment of DriverWorks which encapsulates the library of DDK(Device Driver Kit) by the idea of OOP.(Oriented Object Programme) . USB device driver can be easily developed with the classes which are provided by DriverWorks. Compared to DDK, the period of development of driver is greatly shortened.
     In the application software unit, to realize high speed and mass of data real time display and store, dynamic display module introduces the programming technology of multi-thread and high speed data transforming. The problems of data loss, screen update is resolved preferably. By combining the extern interface of Matlab, static analyzing module accomplishs complicated arithmetic data analysis, such as denoising and characteristic pick-up by wavelet. According to the theory of“software is just virtual instrument”, the whole system absolutely has the characters of virtual instrument.
     This M.S. degree project’s main task is to research & develop the use of USB tech in data acquisition and PC communication system, and provide a whole doable solution.
引文
[1]刘嘉,殷树言等.数字化焊接机及其特点(J).成都:电焊机. 2001,31(6):8-10.
    [2]秦树人等著.智能控件化虚拟仪器系统(M).北京:科学出版社. 2004年.
    [3]孔德仁,何云峰,狄长安编著.仪表总线技术及应用(M).北京:国防工业出版社. 2005年.
    [4] Quintans, C; Moure, M J; Pena, M D V; Mandado, E.A virtual instrumentation laboratory based on a reconfigurable coprocessor(J) . IEEE Transactions on Instrumentation and Measurement. 2006,55(2):635-645.
    [5] Chung-Ping Young; Devaney, M.J.; Shyh-Chyang Wang.Universal serial bus enhances virtual instrument-based distributed power monitoring. Instrumentation and Measurement(J), IEEE Transactions onVolume 50, Issue 6, Dec. 2001 Page(s):1692– 1697
    [6] Peter Cleaveland. Data aquisition boards for USB, PCI, and PCMCIA(J). Instrumentation & Control Systems. 1997,70(5):314-321.
    [7]林和明.基于DSP波控CO2弧焊电源控制系统的研究:硕士论文.华中科技大学.2005年.
    [8]白日辉,孙广,何建平等.基于DSP的CO2焊短路过程控制(J).电焊机.2004,34(3):18-19.
    [9]李鹤岐,徐德进,李芳.脉冲MIG焊机数字化控制设计(J).电焊机.2002,32(8):1-4.
    [10]黄石生,冯桑,方平等.基于DSP的电阻点焊检测与智控技术研究(J).华南理工大学学报(自然科学版).2002,30(11):27-30.
    [11]黄堪强,陈树君,殷树言等.用DSP控制的三相弧焊逆变电源PFC技术(J).北京工业大学学报.2003,29(2):151-154.
    [12]谢瑞和著.串行技术大全(M).北京:清华大学出版社.2003年.
    [13] Murthy, Reshma M. S.. Communication between two hosts using the universalserial bus protocol(J). COMPUTER SCIENCE,1998,36(5):1362-1371.
    [14] Brian Betts,PCI Express and USB 2.0 improve performance of PC-based measurements(J),EDN. 2005,50(5):143-154.
    [15] Laurianne McLaughlin. The USB 2.0 Express ( J ) . Macworld. San Francisco:2004,21(3):27-35.
    [16]陈逸等译.USB大全(M).北京:中国电力出版社.2001年.
    [17] Universal Serial Bus Specification Reversion l. (lM), Compaq, Intel, Microsoft, NEC, Sep 1998
    [18] Don Anderson著.精英科技译.USB系统体系(M).北京:中国电力出版社.2001年.
    [19]许永和编著.健莲科技改编. USB外围设备设计与应用(M).北京:中国电力出版社.2002年.
    [20]张念淮、江浩编著.USB总线接口开发指南(M).北京:国防工业出版社.2001年.
    [21] Kevin Lynn. Universal serial bus (USB) power management. WESCON/98 :15-17 Sept.1998 Page(s):194 - 201
    [22]萧世文编著.USB 2.0硬件设计(M).北京:清华大学出版社.2002年.
    [23]廖济林编著.USB2.0应用系统开发实例精讲(M).北京:电子工业出版社.2006年.
    [24] Patrick Yeh, Andy Wang and B.C. Tseng. High speed data transmission common mode noise suppression - application to USB 2.0 and IEEE 1394(J).Electronic Materials and Packaging. 2002,21(7):183-192.
    [25]张芳兰等著.TMS320C2xx用户指南(M).北京:电子工业出版社.1999年.
    [26]刘和平等编著.TMS320LF240X DSP结构、原理及应用(M).北京:北京航空航天大学出版社.2002年.
    [27]王秀清于祯.基于TMS320VC5x的USB2.0硬件接口设计(J).微计算机信息.2005,37(9):45-51.
    [28]凌仕勇,黄兆华.DSP平台的USB接口设计及系统开发(J).华东交通大学学报.2005,22(5):34-41.
    [29]聂鑫田建生等.采用DSP的USB2.0通信接口设计(J).电子信息技术. 2004,37(10):25-33.
    [30]覃章健,黄洪全,葛良全.基于USB2.0的实时数据采集系统研究(J).中国测试技术.2005,31(5):57-64.
    [31]刘好朋,张翠芳.基于USB接口的DSP数据采集卡(J).中国测试技术.2005,28(10):78-84.
    [32] ISP1581 USB interface device DataSheet(M), Philips, December 2002.
    [33]张建鹏,解国明等.基于ISP1581型接口电路的USB20接口设计(J).国外电子元器件.2005,10(9):51-59.
    [34] Philips Semiconductors Inc. ISP1581 Programming Guide Rev 1.0[DB/OL](J).Mar.2002.
    [35] Li Deshi,Chen Jian,Wu Yadong,The device USB interface and software development for electric parameter measuring instrument(J),Proc. SPIE Int. Soc. Opt. 2003,52(11):581-591.
    [36]黎美,刘笃仁.基于USB2.0的接口芯片ISP1581的应用与设计(J).中国集成电路.2005,41(71):37-85.
    [37] Khalil, M.I.A.USB-based data acquisition system for neutron TOF measurements (J). Measurement Science and Technology. 2006,17(1):1-7.
    [38] Lucio Di Jasio. Embedded USB ( J ) . Appliance Design. Troy: 2005, 53(8):153-164.
    [39] Alex Mendelsohn.Data acquisition board packs USB and 300-MHz DSP(J) , Electronic Engineering Times. Manhasset: 2005 , 23(4):1369-1382.
    [40]罗枫,王军.一种基于USB接口的实时信号采集系统设计(J).北京:无线电工程.2005,35(11):36-42.
    [41]张应辉,饶云波编著.Windows操作系统原理与实践(M).北京:北京航空航天大学出版社.2006年.
    [42]张慧娟、周利华等编. Windows环境下的设备驱动程序设计(M).西安:西安电子科技人学出版社.2002年.
    [43]武安河编著.Windows2000/XP WDM设备驱动程序开发(M).北京:电子工业出版社.2005年.
    [44]刁修民,刘亚斌等.在Visual C++环境下实现高速数据采集的几个问题(J).计算机测量与控制.2003.11(2):131-134.
    [45]张琦,朱善军等.Windows下多线程的数据采集技术(J).北京:中国仪器仪表.2001.04(3):11-15.
    [46]杨建武,郑刚.采用Win32多线程方法编写数据采集程序的难点与对策(J).北京:微计算机信息.1999,15(5):53-59.
    [47]范永凯,林君等.基于PC机的多客户响应实时数据采集系统(J).长春:吉林大学学报.2002,20(4):17-23.
    [48]张庆华,吴印等.基于Windows数据连续采集实时分析的实现及应用(J).南京:南京理工大学学报.2002,38(3):79-84.
    [49]胡峪,刘静编著.VC++高级编程技巧与示例(M).西安:西安电子科技大学出版社. 2001年.
    [50]王伟,林和明,朱六妹等.CO2焊接电弧瞬态信号的检测、显示和分析(J).成都:电焊接.2004,34(10):34-40.
    [51]飞思科技产品研发中心编著.MATLAB6.5应用接口编程(M).北京:电子工业出版社.2003年.
    [52]刘志俭著.MATLAB应用接口用户指南(M).北京:科学出版社.2000年.
    [53] Application Program Interface Guide(M).The Mathworks.Inc.1999.
    [54]许轲,蔡艳等.基于DSP的CO2焊短路过渡过程数字信息快速提取系统(J).成都:电焊机.2005,35(2):71-76.
    [55]宣兆志,李国辉等.小波分析在CO2弧焊控制中的应用(J).长春:吉林大学学报(工学版).2006,36(4):45-53.
    [56]薛海涛,李桓等. CO2焊短路过渡过程缩颈信息的小波提取(J).哈尔滨:焊接学报.2004,25(1):75-80.
    [57]薛家祥,张晓囡等,弧焊过程电信号小波软阈值消噪(J).哈尔滨:焊接学报.2004,21(2):18-22.
    [58]飞思科技产品研发中心编著.小波分析理论与实现(M).北京:电子工业出版社.2005年.
    [59] Gordon, Rachel Singer; Stephens*, Michael.To USB or not to USB(J). Computers in Libraries. 2006,26(8):44-46.
    [60] Remple, T.B..USB on-the-go interface for portable devices(J). Consumer Electronics, 2003. ICCE. 2003 IEEE International Conference on 17-19 June 2003 Page(s):8-9

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700