




已阅读5页,还剩11页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
中文 5650 字 - 1 - 中文 5650字 附 录 Research & Development of Virtual Oscillograph Based on LabVIEW Abstract: This paper introduces the design process of a virtual oscillograph based on LabVIEW. Mainly analyzes the amplitude value and time base adjusting methods during the real-time display. At the same time, it simply introduces the basic thought when measuring the period and frequency of the waveform gate voltage method and its application. At the end of this paper, combining the parameter measurement and waveform display of the virtual oscillograph with the modern motor close-loop lock-phase speed control, it analyzes the parameter measurements effect in PID control. Keywords: Virtual Oscillograph; Time-Base; Motion Control . INTRODUCTION In the rapidly developing industry control field, measuring technologies and apparatus become more and more important. But because of the disadvantages of the traditional instruments such as high price, single function, bad expansibility, etc., they can hardly meet the industry requirement. With the development of computer technologies and virtual instruments (VI for short), the scope designed by users becomes widely. There are many different functions with the same hardware which can make two or more machines work synchronously with the advanced bus technologies such as PXI bus technology 1.Virtual instruments become more and more popular for its upstanding characteristics like low cost, multi-function, facility and so on. All measuring instruments consist of three parts: data acquisition, data analysis and results output 2. In these three parts, data acquisition can be done by the system hardware like A/D module or digital I/O modules. Data analysis and results output can be completed by software system based on computer. So, if given some necessary data acquisition hardware, a measuring instrument based on computer can be constituted. The software technology is the essential one in the virtual instrument. 3 Visual C+, LabVIEW, LabWindows/CVI, VEE etc. are all development software environment. LabVIEW is a graphic programming language called G language, which can be used in GPIB, VXI, PXI, PCI Bus and data acquisition cards based hardware system, has powerful analyzing ability. Its graphic programming method can be used to finish the total program by dataflow clearly and simply. Using its embedded board card driver interface, we can conveniently operate a board card. 4, 5 Multi-channel digital oscillograph, which mainly used in real-time data acquisition, is one of the most widely used general measuring instruments. It also can display the changes of some electric signals and compare the differences among different signals. So the research and development of virtual oscillograph is the hotspot in the area. Making use of the Graph platte in LabVIEW, you can conveniently acquire the dynamic waveforms and make them displayed. But most virtual oscillographs based on LabVIEW use the Graph platte to operate and analyze the waveform data. Although this is very facile to use, it also has many disadvantages: (1) When the waveform changes all the time, the screen will keep refreshing and the graph platte could not properly work. (2) The operation method cant satisfy most of operators because it is different from the tradition oscillograph in operation. To solve these problems, this paper brings forward 附 录 - 2 - some ways. In the real- time waveform display, we redevelop the waveform operation and introduce some related software arithmetic. It introduces the exploiting thinking of adjusting dynamic time base and put forward two concepts: the FIFO process and E-M process. In addition, it introduces a successful gate-voltage measure way in the measurement of the period and frequency, and based on which, the paper puts forward the application in the close-loop lock-phase System. II. RESEARCH ON THE MULTICENTER DIGITAL OSCILLOGRAPHS SOFTWARE ARITHMETIC The virtual oscillograph introduced by this paper is mainly used in laboratory for the measurement and storage of various analog signals. The main functions are: data acquisition, waveform display, parameter measurement, waveform storage and replay etc. It has 64 analog signal input channels and can take 8 signal observations at the same time with the choice of switch matrix. According to the requirement, we use the NI-6133 Daq card for the data acquisition. The block diagram of virtual oscillograph is shown in Fig. 1: 6 Now we will introduce the soft arithmetic to the basic functions of virtual oscillograph. A. Characteristics of Graph Control In LabVIEW, there are three controls for waveform displaying: Graph, Chat and x-y graph. Every control has its own advantages. This paper takes Graph control for example to discuss the soft arithmetic to the basic function of virtual oscillograph. Graph oscillograph displays all waveform data input in the screen at a time. Every time when the waveform data are input, the screen will be freshed. 7 Using its own operation tools, you can move, zoom the waveform or use the cursors to measure the parameters. But it could not work well on dynamic waveform. So its necessary to develop a more convenient operation tool to real-time display of dynamic waveform. In the virtual oscillograph introduced in this paper, there are some basic functions such as amplitude and position value adjustment, time base change, trigger mode selection etc. The oscillographs front panel is shown in fig.2. 附 录 - 3 - B. Amplitude Value Adjustment Multi-center oscillograph can display more than one waveform at the same time, so it is very convenient to compare every signal change. Every waveform displayed should be operated separately through the selecting box on the front panel. At first, we distribute the screen into 1010 grids and set every channel a Y-axis. The value of every one of the 10 grids in the Y-axis is equal to the value of related amplitude knob control. With the property node of the waveform graph, you can set the minimum value of each Y-axis as -5 times much as the knob value whereas the maximum value set 5 times. So when you change the amplitude knob value, the minimum and the maximum value of the relevant Y-axis should be changed at the same time, the waveform display can be zoomed as required, and the zero point position is kept in the original location. Use an array to save the amplitude values every Y-axis changed. When a channel is selected, put its old amplitude value to the knob first; and after adjusting, replace the related array element with the new value. And then the amplitude value change function is finished. C. Time Base Adjustment Time base adjusting is one of the basic functions in oscillograph. The time base adjusting knobs value shows the time of every one grid of X-axis in the screen which is the nodus during the oscillograph design procedure. 1) Basic Clew According to the characteristics of the Graph control, it displays all the data input at a time. So distribute the X- axis into 10 grids and make every grids time t. If the waveform could bestride the whole X-axis, the time spent to collect all the data is 10t. Suppose the boards sampling rate is f, in other word, the board collects f data every second. So the number N needed in the waveform is: N= fl0t =l0ft ( 1) Keeping the board sampling at the frequency of f, the program reads N data points from the board memory and put them to the oscillograph in every loop. Change the t value is to change the N value read from board memory every time, and thus adjust the time base in the real-time sampling. But through the experiment we can see, when the time base is too long (100ms) or too short (=v and Xi-1v, the waveform is across the gate voltage from the top down, called negative edge. At the same time, to eliminate the infection brought by interference, get ride of the positive and negative edges whose interval is less than 10 sample points. So the position of positive and negative edge is acquired. Because the sampling rate is unchangeable, so the time slot between two sampling data is fixed. Thus the signal frequency and period can be calculated. 9 Suppose the sampling rate is f0 , the period is T0, T0 = 1/ f0, sampling rates error coefficient is a. The measured signals frequency is f, period is T, T= 1/f; the frequency measured actually is fC, TC, TC= 1/fC. Suppose at every sample time the sample contains k full periods of the measured signal, and the exact time is kT . The time of the first edge cross the gate point phase is t. Because of the disperse sample, at the kth period, the time when signal passes across the gate point phase t+kT may have an error T0. Considering the sampling rate error, at the worst state, at the kth period, the time when signal passes across the gate point phase is t+kT+(kT T0 ), and the time the k signal periods pass is t+kT+(kT T0) .So there it is: Suppose the sample length is L, there is LTokT. Put it on the Eq. (2) above, there is: When a is far smaller than 1/L, increasing the L value can increase the measure precision consumedly. When a is as much as 1/L, there is no significance to increase the L value. a is fixed on systems hardware. With a, it can find the proper L value that make the sample and calculation process under the best precision. Suppose the square signal, its pulse duration is T, the one measured is TC, so there is: 附 录 - 7 - What discussed above is the period and frequency measurement in the sampling procedure, putting forward the measurement precision theory. But to the amplitude, rise time or spectrum analyze etc. are not discussed in this paper. Using the data group collected, the user can develop other better measurements. In LabVIEW, there is plenty of measuring VIs, which can measure the parameter exactly. 10 Combining the control procedure with virtual oscillograph can achieve better effect. Next, take DC motors PWM speed control for instance, it will introduce the function that using virtual oscillograph in PID and closed loop feedback controlling. IV. APPLICATION IN MOTOR SPEED CONTROL Lock-phase technology plays an important role on motor speed control. With the technology, it can improve the precision of motor speed; and also, it does stepless speed variation control only by changing the specified frequency, that will be conveniently used on controlling more than one motor work synchronously. 11 The basic theory diagram that indicates the speed control system based on PPL closed-loop lock-phase is shown in Fig.7. Suppose the specified pulse met the motor speed is fR, the pulse from photo sensor is fF. Compare their frequency and phase in the phase comparator, and bring the signal voltage proportion to frequency and phase difference. This voltage controls the motor speed through the low-pass filter to synchronize the motor speed and the specified control signal. In case the load is fluctuating which changed the motor speed, the pulse output from photo sensor is changing at the same time. There is difference between it and the specified signal. So the output of the phase comparator through the low-pass filter and driver circuit is changing, and make the motor faster or slower until the two frequencies of feedback and specified become equal. At that time, the motor is steady again. The feedback frequency is locked to the specify frequency, so the system control precision is very high. Combining the phase comparator and computer, taking the advantage of measurement and control of virtual instruments, we can get the digital lock-phase closed loop circuit. The theory diagram is shown in Fig 8. 附 录 - 8 - In the diagram, motor speed is converted into square signal in proportion it refers to through the photo-sensor. If the speed value measured by virtual oscillograph is lower than the necessary one, the output frequency should be increased; oppositely, the output frequency should be decreased. In the actual controlling, the anticipant speed can be achieved quickly by comparing the frequency measured and specified, adjusting through PID. Following the PID theory, putting the secular equation and Jury criterion together, there are: Therefore, to keep the system working steadily, we should set KP = 1, KI = 1/2 It is quickly to adjust the output frequency to the anticipated one by PID revision. We can get the proper square signal through the wave form generator with the specific frequency, and the low-pass filter can convert it into relevant control voltage. The whole procedure is quick and steady. Using the measure function of virtual oscillograph can complete the same work as lock phase speed control system. Its advantage to traditional lock- phase speed control system is that it can use the control theory in the procedure, optimizing the control method. At the same time, the whole changing signal curve can be seen in the virtual oscillograph, the operator can clearly see the control and feedback state so as to solve the problems met with better methods. Using the multicenter and bus technology, it can control more than one motor at the same time, make them work synchronously, that is propitious to product line management and remote control. V. CONCLUSION The virtual oscillograph in this paper not only has the functions that common oscillographs have such as data acquire and display, parameter measurement, but also can be used in industry control, as an important part in motor speed control system. In the actual application, its flexibility is popular with more and more people. With different hardware, more complex and agile measuring system will be produced. With the development of computer and measurement technology, virtual instrument technology will play a more important role in many fields. VI. ACKNOWLEDGMENT This work is supported by natural science foundation of China under the research project 50375008 and 60575052. VII. REFERENCES 1 W.Jang, and F.Yuan,Design, of multicenter virtua oscillograph, China measurement technology, Vol.30 No.4, July, 2004. 2 F. M. Li, B. L. Ren, and W. W. Liu, the means of designing virtual instrument applications in LabVIEW environment, Journal of Shenyang University, Vol. 16, No.2, Apr.2004, China 3 J. C. Dong, Design of virtual oscilloscope based on LabVIEW, Journal of Qingdao University, Vol 17, No.3, Sept. 2002 附 录 - 9 - 4 Getting started with LabVIEW, National Instruments Corporation, USA, 2003 5 J. H. Liu, Graphic language LabVIEW on virtual instruments tutorial, XiDian University Press, Xian China, 2001 6 M.Li, and Z.M.Wang, Design and implementation of virtual instrument based on LabVIEW 7i, Instrumentation Analysis Monitoring, No.4, 2004, China 7 LabVIEW user manual, National Instruments Coorperation, USA, 2003 8 B. Du, Measuring frequency and pulse-width in virtual- scope, Measurement & Control Technology, Vol 20, No.1, 2001, China 9 Data acquisition fundamental , National Instruments Corporation, USA, 2003 10 Beyon and J. Y., Hands-on exercise manual for LabVIEW programming, data acquisition and analysis, Upper Saddle River, N. J. Prentice Hall PTR, 2001 11 W. P. Huang, A single-chip microcomputer-based DC motors speed regulating system with all-digital and PLL control, Coal miner automation, No.3, 1997 附 录 - 10 - 基于 LabVIEW 的虚拟示波器研究和开发 摘要 :介绍了一种基于 LabVIEW 环境下开发的虚拟示波器的软件设计过程;重点介绍了示波器实时显示过程中的幅值和时基调整的方法,在保证实时性的前提下,对于 长短 时基显示分别提出了各自的处理算法;同时,简要介绍了波形的时频测量的基本思想:门槛电压法及其应用;并在此基础上,将其应用于现代电机闭环锁相调速系统,分析了参数测量在 PID 控制中的作用;实验结果表明,该虚拟示波器实时性能良好,对系统的闭环控制起到了很好的作用。 关键词: 虚拟示波器;时基;运动控制 . 引文 在高速发展的工业控制领域,测量技术和仪器变得越来越重要。但由于传统手段的弊端,如价格 昂贵、功能单一、可扩展性不好等,很难满足业界的要求。随着计算机技术和虚拟仪器的发展,用户的设计范围变得比较广泛。用先进的总线技术,同样的硬件可以使两个或者两个以上的机器同步工作,实现很多不同的功能,如 PXI 总线技术 1。这些突出的特点,例如成本低、多功能等使得虚拟仪器的使用越来越广泛。 所有的测量仪器都包括三个部分:数据采集部分,数据分析部分和结果输出部分 2。在这三个部分中,数据采集部分可以由硬件系统的 A/D 模块或数字 I/O 模块来完成。而数据分析和结果输出部分可由计算机基础上的软件系统来完成。因此,如 果给予一些必要的数据采集硬件,基于计算机便可构成测量仪器硬件。同时,在虚拟仪器中,软件技术也是必不可少的 3。 Visual C+, LabVIEW,LabWindows/CVI, VEE 等都是开发的软件环境。 LabVIEW 是一个叫做 G 语言的图形化编程语言。它可用在以 GPIB、 VXI 总线、 PXI 总线、 PCI 总线和数据采集卡等为基础的硬件系统,具有强大的分析能力。它的图形化编程方法可以用简单 清晰 的数据流来完成总程序。 利用其嵌入式板卡驱动程序界面,我们可以很方便地操作一个板卡 4,5。 多通道数字示波器主要用 于实时数据采集,是一个最广泛使用的通用测量仪器。它还能够显示出一些电信号的变化并比较彼此之间的差异。因此,研究和开发虚拟示波器是一个热点领域。在LabVIEW 中利用 Graph platte,你可以很方便 地 获取动态波形,并 把 它们显示出来。大多数基于LabVIEW 的虚拟示波器都使用 Graph platte 来操作和分析波形数据。虽然 它 很容易使用,但也存在不少缺点:( 1)当波形一直变化时,屏幕就会一直刷新, Graph platte 就不能正常工作;( 2)它的操作方法并不能满足大多数的使用者,因为它在操作时不同于传统的示波器。本文提出了一些办法来解决这些问题。在实时显示波形时,我们重建了波形操作并 介绍 了一些相关的软件算法。在介绍中利用了时基上的动态调整并提出两个概念: FIFO 进程和 E-M 进程。此外,还介绍了一个在测量时间和频率中成功测量门槛电压的途径,并在此基础上提出了在锁相环系统中的应用。 II. 多通道数字示波器软件算法的研究 本文介绍的虚拟示波器主要用于实验室中各种模拟信号的测量与存储。其主要功能有:信号采集、波形显示、参数测量、波形存储与回放等。具 有 64 路模拟信号输入通道,通过开关矩阵的选择,可同时进行 8 路信号的观测。根据要求,硬件上选用 NI - 6133 同步采集卡作为信号采集模块。该虚拟示波器的主要实现框图如图 1 所示 6。 附 录 - 11 - 下面将介绍虚拟示波器基本功能的软件算法实现。 A: Graph控件的特点 LabVIEW 提供了 3 种波形显示方式 : Graph, Chat, X-Y Graph。每种示波器各自具有不同的特点。本文以 Graph 为例,介绍虚拟示波器基本功能的程序实现。 Graph 示波器是将一次输入示波器的波形数据全部显示出来,每进行一次数据输入操作, 便会刷新屏幕一次 7。利用自带的操作工具,你可以移动、缩放波形或使用光标来测量参数。但是它不能用于动态波形。因此,我们有必要开发一个更为方便的波形操作工具以实现动态波形的实时显示。 在本文中介绍的虚拟示波器,有一些基本的功能,如有幅值位置及时基调整、触发方式选择等。图 2 显示了该示波器的前面板。 B:幅值调整 示波器具有多通道同时显示的功能,便于各个信号之间的比较。对于每一条显示的波形,应该能够分别对其进行操作。通过面板上的通道选择框,选定某一条波形后,可以单独对该波形进行操作。将示波器屏幕分成 1010 个网格。对于幅值调整按钮,其上 的 数值对应示波器纵轴方向每一小格所代表的信号幅度。因此,可以为每条波形设置一个 Y 坐标轴,利用波形图的属性 节 点,将每个坐标轴的最小值 设置 为幅值调节旋钮所对应数值的 -5 倍,最大值为其对应数值的 5 倍。这样,在改变幅值大小的同时改变波形所对应 Y 轴的最大最小值,将显示的波形按照要求放大或缩小,同时保持波形 的 零点位置不变。 设 置 一个幅值数组,用于存储每次调整后的波形幅值大小。这样,每当选择某一条波形时,先将其上一次调整的幅值数据赋给幅值调整按钮,在调整完毕后, 用 新调整的值覆盖相应的数组元 素。这样,即完成了波形幅值调整的功能。 C:时基调整 时基调整是示波器中最基本的功能之一。时基调整按钮的数值表示屏幕网格每一小格所代表的时间。这是示波器设计过程的难点。 附 录 - 12 - 1) 基本思路 根据 Graph 示波器的特点, 要 将一次输入的所有波形数据点全部显示出来。故将屏幕 X 轴分成10 格,设每格所表示的时间为 t,如果波形能够横跨整个 X 轴,则采集该段波形所需的时间为 10t。再设板卡采样频率为 f,即 1s 内采 f 个数据点。因此,所需要波形数据点个数 N 应为: N= fl0t =l0ft ( 1) 保持 数据采集板卡以频率 f 采集,程序在每一次循环内读取板卡内存的 N 个数据并放入示波器中显示。改变 t 的值即改变每次读取的 N
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025企业展览馆设计建设合同范本
- 2025供用电合同协议范本
- 2025个体健身房器材租赁合同样式
- 2025年钢材购销合同范本
- 浙江省浙南名校联盟2024-2025学年高二下学期4月期中考试 生物 含答案
- 患者康复护理
- 金属活动性顺序教学
- 职场魔方培训体系构建
- 急性放射病的临床护理
- 办公室内勤年终总结模版
- 2025年江苏南通市通州区鑫汇控股集团下属子公司招聘笔试参考题库含答案解析
- 【公开课】巴西+课件-2024-2025学年七年级地理下学期人教版
- 国际压力性损伤-溃疡预防和治疗临床指南(2025年版)解读课件
- 高强瓦楞原纸产品商业计划书
- 2024年首都机场集团招聘笔试参考题库附带答案详解
- GB/T 20041.21-2017电缆管理用导管系统第21部分:刚性导管系统的特殊要求
- 航空煤油 MSDS 安全技术说明书
- 导热系数测定仪期间核查方法、记录 Microsoft Word 文档
- 云南省劳动合同样本(共8页).doc
- 《科技想要什么》读书笔记ppt课件
- 申请泉州市职工医疗互助补助流程图
评论
0/150
提交评论