A software solution for displacement and angular speed measurement through virtual instrumentation

Similar documents
A software solution for mechanical change measurement through virtual instrumentation

LV-Link 3.0 Software Interface for LabVIEW

Digital Logic Circuits

Application Note: Pulse and Direction for the Position and Velocity Commands

Chapter 2: Your Boe-Bot's Servo Motors

EKT 314/4 LABORATORIES SHEET

dspic30f Quadrature Encoder Interface Module

LabVIEW 8" Student Edition

A COMPARISON STUDY OF THE COMMUTATION METHODS FOR THE THREE-PHASE PERMANENT MAGNET BRUSHLESS DC MOTOR

EE 314 Spring 2003 Microprocessor Systems


Single Chip FPGA Based Realization of Arbitrary Waveform Generator using Rademacher and Walsh Functions

Laboratory set-up for Real-Time study of Electric Drives with Integrated Interfaces for Test and Measurement

ME375 Lab Project. Bradley Boane & Jeremy Bourque April 25, 2018

CHAPTER 4 CONTROL ALGORITHM FOR PROPOSED H-BRIDGE MULTILEVEL INVERTER

CONSIDERATIONS ON USING THE VIRTUAL INSTRUMENTS FOR THE ACQUISITION AND ANALYSIS OF EXPERIMENTAL DATA FROM DYNAMIC SYSTEMS

High-speed and High-precision Motion Controller

Using LabVIEW Tool for Verifying the Functioning of an Electronic Programmable Circuit

Industrial Automation Training Academy. Arduino, LabVIEW & PLC Training Programs Duration: 6 Months (180 ~ 240 Hours)

The Allen-Bradley Servo Interface Module (Cat. No SF1) when used with the Micro Controller (Cat. No UC1) can control single axis

A Virtual Instrument for Automobiles Fuel Consumption Investigation. Tsvetozar Georgiev

EC O4 403 DIGITAL ELECTRONICS

Programmable Encoder Designed in LabVIEW

Measuring Voltage and Time Quantities of a Signal Through a Virtual Oscilloscope

Momentum and Impulse. Objective. Theory. Investigate the relationship between impulse and momentum.

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

Labview Based Gain scheduled PID Controller for a Non Linear Level Process Station

FRIDAY, 18 MAY 1.00 PM 4.00 PM. Where appropriate, you may use sketches to illustrate your answer.

Theory of Logic Circuits. Laboratory manual. Exercise 4

LV8716QAGEVK Evaluation Kit User Guide

Logic diagram: a graphical representation of a circuit

Electrical Materials may be referred to a metal, dielectrics,electrical insulators or conductors,paramagnetic materials and many other.

EKT 314/4 LABORATORIES SHEET

Chapter 7: Instrumentation systems

AutoBench 1.1. software benchmark data book.

Computer Architecture: Part II. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

EEE 301 Digital Electronics

E2.11/ISE2.22 Digital Electronics II

Laser Induced Fluorescence Imaging Of Thermal Damage in Polymer Composites Using LabView and IMAQ Vision

Drum Instruction Programming

6. FUNDAMENTALS OF CHANNEL CODER

Ultrasonic Sensor Based Contactless Theremin Using Pipeline CORDIC as Tone Generator

Temperature Monitoring and Fan Control with Platform Manager 2

Ch 5 Hardware Components for Automation

Data output signals May or may not be same a input signals

PC-based controller for Mechatronics System

Module 5. DC to AC Converters. Version 2 EE IIT, Kharagpur 1

Name: Class: Date: 1. As more electronic systems have been designed using digital technology, devices have become smaller and less powerful.

1. The decimal number 62 is represented in hexadecimal (base 16) and binary (base 2) respectively as

Multifunction counter board, optically isolated, encoder, incremental counter, timer/counter, SSI, PWM,...

PROJECT 5: DESIGNING A VOICE MODEM. Instructor: Amir Asif

Using SigLab with the Frequency Domain System Identification Toolbox

PIC Functionality. General I/O Dedicated Interrupt Change State Interrupt Input Capture Output Compare PWM ADC RS232

II. LAB. * Open the LabVIEW program (Start > All Programs > National Instruments > LabVIEW 2012 > LabVIEW 2012)

Design of double loop-locked system for brush-less DC motor based on DSP

Measurement Studio NI-DAQmx.NET Examples

Sensitivity of Series Direction Finders

Exam #2 EE 209: Fall 2017

Optimized BPSK and QAM Techniques for OFDM Systems

Course Overview. Course Overview

PWM System. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Electronic Instrumentation

DC motor control using arduino

Microcontroller Based Closed Loop Speed and Position Control of DC Motor

crio Resolver Simulation crio RVDT Simulation Manual V3.0

Designing Filters Using the NI LabVIEW Digital Filter Design Toolkit

Asst. Prof. Thavatchai Tayjasanant, PhD. Power System Research Lab 12 th Floor, Building 4 Tel: (02)

Design of PID Control System Assisted using LabVIEW in Biomedical Application

Data acquisition and instrumentation. Data acquisition

Real-time Math Function of DL850 ScopeCorder

Sfwr Eng/TRON 3DX4, Lab 4 Introduction to Computer Based Control

Temperature Monitoring and Fan Control with Platform Manager 2

Digital Electronics Course Objectives

An FPGA 1Gbps Wireless Baseband MIMO Transceiver

Design of Message Authentication Code with AES and. SHA-1 on FPGA

Applying Multisensor Information Fusion Technology to Develop an UAV Aircraft with Collision Avoidance Model

Freescale Semiconductor, I SECTION 11 TIME PROCESSOR UNIT

Computer Numeric Control

More Meaningful PSpice Simulations via LabVIEW*

CHAPTER 5 NOVEL CARRIER FUNCTION FOR FUNDAMENTAL FORTIFICATION IN VSI

CHAPTER 1 INTRODUCTION...

Introduction to DSP ECE-S352 Fall Quarter 2000 Matlab Project 1

Data Sheet. AEDB-9340 Series 1250/2500 CPR Commutation Encoder Modules with Codewheel. Features. Description. Applications

Design of a High Throughput 128-bit AES (Rijndael Block Cipher)

As before, the speed resolution is given by the change in speed corresponding to a unity change in the count. Hence, for the pulse-counting method

ISONIC PA AUT Spiral Scan Inspection of Tubular Parts Operating Manual and Inspection Procedure Rev 1.00 Sonotron NDT

INCLINED PLANE RIG LABORATORY USER GUIDE VERSION 1.3

LabVIEW Basics Peter Avitabile,Jeffrey Hodgkins Mechanical Engineering Department University of Massachusetts Lowell

Spec. Instructor: Center

Effective Teaching Learning Process for PID Controller Based on Experimental Setup with LabVIEW

CHAPTER 6. CALCULATION OF TUNING PARAMETERS FOR VIBRATION CONTROL USING LabVIEW

Microprocessor-Based Precision Speed Measurement

Graphical Control Panel User Manual

X3M. Multi-Axis Absolute MEMS Inclinometer Page 1 of 13. Description. Software. Mechanical Drawing. Features

Signal Generation in LabVIEW

Simulation for RFID-Based Red Light Violation Detection:

CS302 - Digital Logic Design Glossary By

AC : A STUDENT PROJECT: DEVELOPING LABVIEW DRIVERS FOR A MEASUREMENT BRIDGE

A Novel Adaptive Method For The Blind Channel Estimation And Equalization Via Sub Space Method

BNC-2121 Connector Accessory for 660X Devices

Transcription:

software solution for displacement and angular speed measurement through virtual instrumentation NICOLE PTRSCOIU RON PONT DRIN TOMUS OGDN SOCHIRC utomatics, pplied Informatics and Computers Engineering University of Petrosani Universitatii, 336 Petrosani ROMNI patrascoiu@upet.ro http://ime.upet.ro/caiac/cadre.html bstract: - This paper presents a software solution to implement a displacement and angular speed measurement for a mobile that is moving in a linear or circular direction. For this, is determined function to sensing the direction of movement and also the algorithm through which is make the measurement and these are implemented using a virtual instrument built in LabVIEW. Thus it is possible to use a data acquisition boards for general use, such as PCI-64, which has no inputs for quadrature signals with a quadrature encoder, such as E6-CW5C or HEDS 55 that generates such signals. Key-Words: - quadrature encoder, algorithm, measurement, virtual instrument, data acquisition board Introduction Movement is defined as a physical quantity of a mechanical change through is possible to provide information about position of a material point or mobile against a reference system. Quantities derived from this, which may be considered, are: position, distance or proimity. In many applications the displacement is considered as a vector so it is necessary to calculate both size and direction for this quantity. Usual procedure for calculating the size of this quantity is to use incremental displacement sensor that generates a pulse train by of these pulses acquired from sensor. Same incremental displacement sensor can be used to detect the direction of movement if it provides two trains of pulses shifted by one quarter of the period, in which case it is named quadrature encoder. quadrature encoder can have up to three channels channels,, and Z. There are data acquisition boards that accept at their counters signals provided by encoder quadrature signals such as the NI 6, NI 65, and NI 68 (M series devices) but there are also data acquisition boards that not accept such signals like the NI PCI-64 (E series devices) []. In this case it is necessary to achieve a logical system to detect the direction of motion and also to increment or decrement a value depending of the direction of movement. Such a system can be achieved through hardware structure but also can be done by a software solution using digital inputs and counters on the data acquisition board. Problem Formulation To make a determination either linear or angular displacement is first necessary to determine its direction. fter that, it can control the direction for the counter through which is determined the value of displacement by the train of pulses. To measure angular displacement we use PCI- 64E, a data acquisition board from National Instruments that has 8 digital I/O (DIO DIO7) lines (TTL/CMOS) and two 4-bit counter/timers without having the dedicated inputs to connect a quadrature encoder. Control the operation of the data acquisition boards is achieved through a program written in LabVIEW graphical programming language called virtual instrument. To achieve the determination of displacement direction is needed in these conditions to be used two digital inputs to connect to the signals and carried over from the quadrature encoder. Displacement value is obtained by the pulses or, and its direction is determined by purposes, otherwise said, by increment or decrement the counter value []. The angular speed value is obtained by pulses during the prescribed time [3]. To realize the virtual instrument for displacement and angular speed measurement based on two trains of pulses shifted by one quarter of period is necessary to synthesize a control command for establish direction and an algorithm to control the counters and to etract the content of the counters in the prescribed time. ISSN: 79-598 ISN: 978-96-474-36-3

3 Problem Solution The software solution of the problem consists in creating a virtual instrument which can be used to detect the direction of displacement and measure the angular speed and displacement values. 3.. Identification of movement direction s noted above, identification of the direction of movement is needed to control the direction of. For synthesizing the command control signal called Counting Selection is considered a chart signals that identify all the possibilities of combining the two pulse trains according to the direction of rotation. ased on this chart, 8 distinct states denoted by S i (i =... 7), can be identified and is constructed the states transition graph shown in Fig. [4]. S S S 7 S To identify a minimal configuration of the sequentially system is built a reduced matri of states. Technique used to reduce the number of states from primitive matri, is based only on the equivalence from the theory of sequential automatic and reduction of state is through merging or anneation in compliance with specific rules [5]. To obtain the ecitation functions of the sequentially system is required to encode the reduced matri states. It notes the eistence of 4 reduced states so that it would be necessary to encrypt them using two state variables i.e. and. To take account of hazard that occurs due to simultaneous change of more than one input variable during transition between two states is used the Gray code. To construct the ecitation functions, represented by logic functions for states and is necessary to build matrices of transition for reduced states and their number must be equal to the number of state variables. These matrices are shown in Fig.3 in which notation X means states impossible during operation. S 6 S 3 S 5 S 4 Fig.. Transition graph of states ased on the transition graph is built the primitive matri (Fig..) that contain on the columns the correlation between combination of the input signals (Channel and Channel ) and on the rows contains all possible transitions from one internal stable state. This is accompanied by full matri of the output that contains the values of output variable during both states and transitions. Columns are cyclic coded using Gray code. States Counting Selection S S S 5 - S S S 4 - S S S - S 3 S - S 3 S 4 S 3 - - S 4 S 4 S 5 - S S 5 S S 5 S 6 - S 6 - S 5 S 6 S 7 S 7 S - - S 7 Fig.. Primitive matri of states and output Fig. 5. State transition matri for pplying the method of synthesis of logical functions based on Karnaugh diagrams it can identify the logical functions of the ecitation variables (states), respectively for function of output signal Counting Selection as follows: Counting Selection Fig. 3. State transition matri From equations () can be seen that the output signal is identical to the state which simplifies implementation with logic gates for the scheme that generate the control signal for direction. ased on logical functions () can create a logical diagram of the system through which make () ISSN: 79-598 ISN: 978-96-474-36-3

selection for direction of and in Fig.4 is shown the software structure of this system built with logical functions in LabVIEW. re used Compound rithmetic/logic functions through which can select basic arithmetic or logic operations with two or more variables. with decreasing speed, this method has poor measurement accuracy at low speed. The algorithm used to measurement the angular displacement and speed is shown in Fig.6. and its implementation by virtual instrumentation, called RPM, SubVI in the main program is shown in Fig.7. Read N No countup N = N N 7 Yes countdown N = 4 - N Number of pulses = N ngular displacement 36 a degree N n Fig.4. Software structure used to selection This will be a sub-structure, SubVI called SELECT, in the main program used to determine the displacement and angular speed values. RPM ngular speed N 6 n msec pulses/sec pulses/min 3.. ngular displacement and speed measurement Determination of displacement is achieved by the pulses (increments of angular displacement) that correspond to the slots of incremental encoder. They are epressed in degrees and the value of an increment for angular displacement corresponds to the relation epressed by ratio between the angle at the center of the circle and the number of slots. ngular speed measurement is based on of pulses during the prescribed time. The basic measuring process of pulse during a prescribed time method is shown in Fig.5. The duration of a measurement cycle is fied and set a priori. The speed pulse counter and the timer are both started at a rising edge of the speed pulse. The pulse counter is stopped when the timer runs to the end of the prescribed time. The angular speed is then derived from the content of the pulse counter and the prescribed time. Start Prescribed time Stop Start Prescribed time Stop Fig. 5. Pulse during prescribed time. This method can result in a loss of up to one speed pulse. s the duration of speed pulse increases No left movement RPM L= - RPM α L= - α = true Yes right movement RPM R= RPM α R = α Fig.6. ngular displacement and speed measurement algorithm Fig.7. lgorithm implementation by virtual instrumentation Getting prescribed time necessary for calculating speed is achieved by using function Tick Count (ms) that returns the timer value, in milliseconds, between passages consecutive in the While Loop. 4. System Implementation with Virtual Instrument program developed in LabVIEW is called a virtual instrument (VI) and it has two components the block diagram that represent program itself and the front panel that is user interface. Through such a ISSN: 79-598 3 ISN: 978-96-474-36-3

Left Select : Counter (ctr) Count Down = false CTR= 4 - N Left = false Signalisation of direction CTR= Real time read Pulse = N False STRT Identification of movement direction CTR = N Calculate movement parameters Right Select : Counter (ctr) Count Up = true CTR = N XOR Right = true Signalisation of direction Fig.8. Fig.5. Main program algorithm virtual instrument can be controlled the operation of the data acquisition board PCI-64 whose digital inputs DIO and DIO are used for acquisition of True SELECT RPM Channel and Channel signals from incremental sensor. The main program algorithm is shown in Fig.8 and this includes SubVI's SELECT and RPM and has a like basic structure While Loop that ensure the continuous running of the program until the user stop it through the STOP button. ased on this algorithm is built the virtual instrument whose block diagram is shown in Fig.9 cquisition is eecuted in two sequences and the program begins with reset of the local variable CTR and timing setting that will be used for defining the graphical representation of X-signal for the Channel respectively Channel graphical indicators. The input signals Channel and Channel are taken from the incremental sensor by line and line of the digital port port of the data acquisition board PCI 64E using DQ ssistant function. This function creates, edits, and runs tasks using NI- DQm that is data acquisition driver. Reading through this function is an array with eight boolean components corresponding to the eight digital inputs of the data acquisition board and through Inde rray function are selected components with inde and that correspond to digital inputs DIO respectively DIO. Thus the two components will be the inputs Channel and Channel of the system developed for determining the direction of displacement, system that generates the output signal Counting Selection [6]. Once direction is selected, this it will be displayed on the front panel and the selection signal is also used for selecting the direction of (Count Up or Count Down) by applying it to the Fig.9. Diagram bloc of the virtual instrument ISSN: 79-598 4 ISN: 978-96-474-36-3

selection of a terminal structure of the Case structure. Through this structure is also selected one of the counters ctr or ctr so that the upwards is performed by counter ctr and downwards is performed by counter ctr. For the two counters ctr and ctr values may be increasing (Count Up) when their value increases with each pulse applied to the entry CtriSource (i = or ) in domain [... 4 = 67776] or may be decreasing (Count Down) when its value decreases with each pulse applied to the entry CtriSource (i = or ) in domain [ 4 = 67776... ]. So if it detects a number N higher than 7 is considered selected counter ctr and is carried downwards ever since the maimum counter value ( 4 ) which requires that the value of the number of pulses and hence calculation of displacement and angular speed values are obtains by difference between constant 4 and value of N representing the output of function DQm Read (Counter U3 CH Samp) Displacement in clockwise is considered that be displayed with positive sign and displacement in counterclockwise is considered that be displayed with negative sign. This convention require continuous tracking of the value of the two counters and this is achieved by using local variable CTR whose value is loaded into each of the two counters selected according sense through the input parameter initial count of the DQm Create Virtual Channel function. Displaying number of pulses and calculating the displacement and angular speed, given the agreement between the direction of displacement and sign of these dimensions, is achieved through a Case structure. Selection of the two cases is done through the comparison between the value N that represent the output of the function DQm Read and constant 7 (considered to be cover for measurements made under the following conditions: measurement time for one direction of displacement about 33 minutes, n = slots and maimum speed 5 rev/min.) Views of the front panel that is user interface, corresponding to the two directions of movement corresponding to two states of operation for the virtual instrument are presented in Fig. 4 Conclusion Using the virtual instrument in this form have a very high interest only for data acquisition systems that no accept at their counters signals provided by Fig.. User interface of the virtual instrument quadrature encoder, and these systems are use to measure displacements or angular velocities. Function testing was done both for direction displayed and for measuring displacements or angular velocities. Tests were performed using quadrature encoders with 4, (E6-CW5C) respectively 5 (HEDS 55) pulses/revolution for a wide range of speeds, connected to digital inputs of the PCI 64E data acquisition board, from which were used and the two counters ctr and ctr. References: [] * * *. DQ M Series User Manual. National Instruments Corporation. ustin, Teas, 8. [] Webster.G.J. The measurement, Instrumentation and Sensors Handbook. CRC Press LLC, [3] Yuhua L., Fengshou G. and others. The measurement of instantaneous angular speed. Mechanical Systems and Signal Processing 9 (5) 786 85 [4] Patrascoiu N, Poanta. and others. Detection of motion direction implemented by virtual instrumentation. Recent dvanced in utomation & Information WSES Proceeding (ICI ), (7-75) [5] Carroll J., Long D. Theory of Finite utomata. Prentice Hall, New Jersey, 989 [6] Patrascoiu N. Data acquisition systems. Virtual Instrumentation (in Romanian) Ed. Didactica si Pedagogica, ucuresti, 4 ISSN: 79-598 5 ISN: 978-96-474-36-3