PRACTICAL APPLICATIONS AND SOLUTIONS USING LABVIEW™ SOFTWARE Edited by Silviu Folea Practical Applications and Solutions Using LabVIEW™ Software Edited by Silviu Folea Published by InTech Janeza Trdine 9, 51000 Rijeka, Croatia Copyright © 2011 InTech All chapters are Open Access articles distributed under the Creative Commons Non Commercial Share Alike Attribution 3.0 license, which permits to copy, distribute, transmit, and adapt the work in any medium, so long as the original work is properly cited. After this work has been published by InTech, authors have the right to republish it, in whole or part, in any publication of which they are the author, and to make other personal use of the work. Any republication, referencing or personal use of the work must explicitly identify the original source. Statements and opinions expressed in the chapters are these of the individual contributors and not necessarily those of the editors or publisher. No responsibility is accepted for the accuracy of information contained in the published articles. The publisher assumes no responsibility for any damage or injury to persons or property arising out of the use of any materials, instructions, methods or ideas contained in the book. Publishing Process Manager Iva Lipovic Technical Editor Teodora Smiljanic Cover Designer Jan Hyrat Image Copyright Sofia, 2010. Used under license from Shutterstock.com LabVIEW™ is a trademark of National Instruments. This publication is independent of National Instruments, which is not affiliated with the publisher or the author, and does not authorize, sponsor, endorse or otherwise approve this publication. First published July, 2011 Printed in Croatia A free online edition of this book is available at www.intechopen.com Additional hard copies can be obtained from orders@intechweb.org Practical Applications and Solutions Using LabVIEW™ Software, Edited by Silviu Folea p. cm. ISBN 978-953-307-650-8 free online editions of InTech Books and Journals can be found at www.intechopen.com Contents Preface IX Part 1 Virtual Instruments 1 Chapter 1 Virtual Instrument for Online Electrical Capacitance Tomography 3 Zhaoyan Fan, Robert X. Gao and Jinjiang Wang Chapter 2 Low-Field NMR/MRI Systems Using LabVIEW and Advanced Data-Acquisition Techniques 17 Aktham Asfour Chapter 3 DH V 2.0, A Pocket PC Software to Evaluate Drip Irrigation Lateral Diameters Fed from the Extreme with on-line Emitters in Slope Surfaces 41 José Miguel Molina-Martínez, Manuel Jiménez-Buendía and Antonio Ruiz-Canales Chapter 4 Application of Virtual Instrumentation in Nuclear Physics Experiments 57 Jiri Pechousek Part 2 Hardware in the Loop Simulation 81 Chapter 5 Real-Time Rapid Embedded Power System Control Prototyping Simulation Test-Bed Using LabVIEW and RTDS 83 Karen Butler-Purry and Hung-Ming Chou Chapter 6 The Development of a Hardware-in-the-Loop Simulation System for Unmanned Aerial Vehicle Autopilot Design Using LabVIEW 109 Yun-Ping Sun Chapter 7 Equipment Based on the Hardware in the Loop (HIL) Concept to Test Automation Equipment Using Plant Simulation 133 Eduardo Moreira, Rodrigo Pantoni and Dennis Brandão VI Contents Part 3 eHealth 153 Chapter 8 Sophisticated Biomedical Tissue Measurement Using Image Analysis and Virtual Instrumentation 155 Libor Hargaš, Dušan Koniar and Stanislav Štofan Chapter 9 Instrument Design, Measurement and Analysis of Cardiovascular Dynamics Based on LabVIEW 181 Wei He, Hanguang Xiao, Songnong Li and Delmo Correia Chapter 10 ECG Ambulatory System for Long Term Monitoring of Heart Rate Dynamics 201 Agustín Márquez-Espinoza, José G. Mercado-Rojas, Gabriel Vega-Martínez and Carlos Alvarado-Serrano Part 4 Test and Fault Diagnosis 227 Chapter 11 Acoustical Measurement and Fan Fault Diagnosis System Based on LabVIEW 229 Guangzhong Cao Chapter 12 Condition Monitoring of Zinc Oxide Surge Arresters 253 Novizon, Zulkurnain Abdul-Malek, Nouruddeen Bashir and Aulia Part 5 Practical Applications 271 Chapter 13 Remote Instrumentation Laboratory for Digital Signal Processors Training 273 Sergio Gallardo, Federico J. Barrero and Sergio L. Toral Chapter 14 Digital Image Processing Using LabView 297 Rubén Posada-Gómez, Oscar Osvaldo Sandoval-González, Albino Martínez Sibaja, Otniel Portillo-Rodríguez and Giner Alor-Hernández Chapter 15 Remote SMS Instrumentation Supervision and Control Using LabVIEW 317 Rafael C. Figueiredo, Antonio M. O. Ribeiro, Rangel Arthur and Evandro Conforti Chapter 16 Lightning Location and Mapping System Using Time Difference of Arrival (TDoA) Technique 343 Zulkurnain Abdul-Malek, Aulia, Nouruddeen Bashir and Novizon Chapter 17 Computer-Based Control for Chemical Systems Using LabVIEW ® in Conjunction with MATLAB ® 363 Syamsul Rizal Abd Shukor, Reza Barzin and Abdul Latif Ahmad Contents VII Chapter 18 Dynamic Wi-Fi Reconfigurable FPGA Based Platform for Intelligent Traffic Systems 377 Mihai Hulea, George Dan Moiş and Silviu Folea Part 6 Programming Techniques 397 Chapter 19 Extending LabVIEW Aptitude for Distributed Controls and Data Acquisition 399 Luciano Catani Chapter 20 Graphical Programming Techniques for Effective, Fast and Responsive Execut 421 Marko Jankovec Chapter 21 The Importance of a Deep Knowledge of LabVIEW Environment and Techniques in Order to Develop Effective Applications 437 Riccardo de Asmundis Preface The book consists of 21 chapters which present applications implemented using the LabVIEW environment, belonging to several distinct fields such as engineering, chemistry, physics, fault diagnosis and medicine. In the context of the applications presented in this book, LabVIEW offers major advantages especially due to some characteristic features. It is a graphical programming language which utilizes interconnected icons (functions, structures connected by wires), resembling a flowchart and being more intuitive. Taking into account different objectives, LabVIEW can be considered an equivalent of an alternative to the classic programming languages. It is important to mention that the implementation time for a software application is reduced as compared to the time needed for implementing it by using other environments. The built-in libraries and the virtual instruments examples (based on VIs), as well as the software drivers for almost all the existing data acquisition systems make the support and the use of devices produced by more than fifty companies, including industrial instruments, oscilloscopes, multimeters and signal generators possible in LabVIEW. The LabVIEW platform is portable, being able to run on multiple devices and operating systems. Programming in LabVIEW involves the creation of the graphical code (G) on a PC, where it is afterwards compiled. Tools specific to different targets such as industrial computers with real time operating systems (PXI), programmable automation controllers (Compact RIO), PDAs, microcontrollers or field-programmable gate arrays (FPGAs) are used and after that the compiled code is downloaded to the target. Chapter 1 presents a virtual instrument for image capture and display associated with the electrical capacitance tomography (ECT), a noninvasive measurement method for visualizing temporal and spatial distributions of materials within an enclosed vessel. According to the hardware circuitry configuration and the combination of electrodes for the ECT, the VI is implemented using seven major functional modules: switching control, data sampling, data normalization, permittivity calculation, mesh generation, image generation, and image display. X Preface Chapter 2 describes a LabVIEW based NMR spectrometer (Nuclear Magnetic Resonance) working at low field. This spectrometer allows the detection of the NMR signals of both 1H and 129 Xe at 4.5 mT. The aim of this chapter is to present the advances accomplished by the author in the development of low-field NMR systems. The flexibility of the system allows its use for a palette of NMR applications without (or with minor) hardware and software modification. Chapter 3 introduces a new version of drip irrigation design software (DH V 2.0) for usage with mobile devices like Smartphones or pocket PCs. It uses LabVIEW PDA as the programming language. The software allows the users of drip irrigation systems to evaluate their sensibility to changing conditions (water needs, emitters, spacing, slope, etc.) for all the diameters of commercial polythene drip lines. Chapter 4 presents a new method for the design of computer-based measurement systems that can be seen in the use of up-to-date measurement, control and testing systems based on reliable devices. The measurement systems built with the help of the LabVIEW modular instrumentation offer a popular approach to nuclear spectrometers construction. By replacing the former single-purpose system, units with universal data acquisition modules, a lower-cost solution that is reliable, fast, and takes high-quality measurements, is achieved. Chapter 5 describes a real-time rapid embedded control prototyping simulation and a simple power system case study implementation. The detailed implementation of an overcurrent relay for controller-in-the-loop simulation is described, including the setting and programming of a real-time digital simulator and the programming in CompactRIO, which includes the FPGA and the real-time processor by using LabVIEW. A synchronization technique which allows the readers to make the correction decision on the method to be used based on the application and its requirements is proposed and also discussed. Chapter 6 presents a continuing research on the design and verification of an autopilot system for an unmanned aerial vehicle (UAV) through hardware-in-the-loop (HIL) simulations. The software development environment used for HIL simulations is LabVIEW. Different control methods for developing the UAV autopilot system design are applied and the comparison between the results obtained from HIL simulations is presented in this chapter. Chapter 7 proposes a HIL-based system, where a Foundation Fieldbus control system manages the simulation of a generic plant in an industrial process. The simulation software is executed on a PC, and it has a didactic purpose for engineering students learning to control a process similar to the real one. The plant is simulated on a computer, implemented in LabVIEW and represents a part of the fieldbus network simulator FBSIMU. Chapter 8 presents a solution for measuring object beating frequency from a video sequence using tools of image analysis and spectral analysis. It simplifies the methods [...]... further expanded to include multiple-excitation (Fan & Gao, 2011), grouping schemes (Olmos, et al., 2008), and advanced image retrieving algorithms to improve the time and spatial resolution of ECT 16 Practical Applications and Solutions Using LabVIEW™ Software 5 Reference Alme, K J & Mylvaganam, S (2007) Comparison of Different Measurement Protocols in Electrical Capacitance Tomography using Simulations”,... excitations of the electrodes and reconstruct tomographic 4 Practical Applications and Solutions Using LabVIEW™ Software images of the materials; as well as 3) electrodes mounted on the outer (for non-metallic containers) or inner surface of the container According to the type of excitation signals being used, ECT can be divided into two categories: AC-based (sine-wave excitation) and charge-discharge-based... Matrix (S) The operation of matrix transpose, matrix multiplication, and numerical division in Equation (9) are realized by using the 2D Array Transpose, Matrix Multiplication, and number division modules as shown in Figure 6 10 Practical Applications and Solutions Using LabVIEW™ Software Fig 6 Permittivity Calculation subVI designed with LBP algorithm Mathematically, the LBP method uses the transposed... CPU, the image generation and image display subVI’s takes about 10 ms to process each frame of permittivity distribution 14 Practical Applications and Solutions Using LabVIEW™ Software The time delay is measured by looping the subVI’s for 1,000 times Such a time delay needs to be considered in the frame rate calculation as discussed in section 2.2, where the data sampling and circuit switching control... conclusion that this software is an excellent platform for developing robotic projects as well as vision and image processing applications Chapter 15 presents the feasibility of a flexible and low cost monitoring and control solution using SMS, which can be easily applied and adapted to various applications The developed system was applied to a RF signal procedure measurement for saving time and staff in this... amplitude Vij is approximately proportional to Cij The simplified relationship can be expressed as: 6 Practical Applications and Solutions Using LabVIEW™ Software Vij = − C ij Cf Ve (2) Through the lock-in amplifier, the output sine wave from pre-amplifier is mixed with the original excitation signal and then processed by a low pass filter Thus a measurable DC voltage equal to the value of Vij is available... generated by Mesh Generation subVI to create a frame image showing the permittivity distribution within the sensing area 12 Practical Applications and Solutions Using LabVIEW™ Software Fig 10 Design of Image Generation subVI Four functional subVI’s, Create Mesh.vi, 2048.vi, Normals.vi, and Perm2Color.vi are created in the Image Generation subVI to process the permittivity data as well as generate constant... electronics first measures the inter-electrode capacitance between electrodes one and two, then between one and three, and up to one and N Then, the capacitances between electrodes two and three, and up to two and N are measured For each scanning frame, the measurements continue until all the inter-electrode capacitances are measured and the capacitances can be represented in a matrix, which is symmetric with... components and DAQ card, the DC voltage Vij in each measurement step is sampled 50 times at a sampling rate of 512 kSamples/sec The results are averaged through a MEAN subVI The capacitance value is calculated from Vij with the known feedback capacitance, Cf, and excitation signal voltage amplitude, Ve The relationship is expressed as: C ij = − Vij Ve Cf (5) 8 Practical Applications and Solutions Using LabVIEW™. .. spectrometer working at 55.84 MHz (high field) 18 Practical Applications and Solutions Using LabVIEW™ Software Some groups have NMR systems working at low field for the specific application of measurement of the polarization1 for the NMR of hyperpolarized gases (129Xe, 3He…) Most of these systems were actually developed by modifying high frequency and high cost commercial spectrometers One research . PRACTICAL APPLICATIONS AND SOLUTIONS USING LABVIEW™ SOFTWARE Edited by Silviu Folea Practical Applications and Solutions Using LabVIEW™ Software Edited. orders@intechweb.org Practical Applications and Solutions Using LabVIEW™ Software, Edited by Silviu Folea p. cm. ISBN 978-953-307-650-8 free online editions of InTech Books and Journals can. logic for the sequential excitations of the electrodes and reconstruct tomographic Practical Applications and Solutions Using LabVIEW™ Software 4 images of the materials; as well as 3)