Design of Virtual Phase Difference Meter Based on Virtual Instrument LabVIEW

Publisher:SparkleMagicLatest update time:2015-09-17 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  With the rapid development of computer technology, microelectronics technology and electronic testing technology, a new type of test instrument, Virtual Instrument (VI), has emerged. It is a new type of instrument with vitality. The concept of virtual instrument was first proposed. This hardware support makes full use of the unique intelligent functions of computers such as calculation, storage, return visit, call, display and file management, and software-based professional functions of traditional instruments, so that they are integrated with computers. In this way, a new instrument that is the same as traditional instruments in appearance and function, while fully enjoying the intelligent resources of computers, is formed. The main functions of virtual instruments are composed of three parts: data acquisition, data testing and analysis, and result output display. Among them, data analysis and result output can be completely completed by computer-based software systems. Therefore, as long as certain data acquisition hardware is provided, a measuring instrument composed of computers can be formed.

  1. Graphical software development platform LabVIEW

  LabVIEW (Laboratory Virtual Instrument Engineering workbench) is a graphical program development environment, mainly used in data acquisition, data analysis, testing and instrument control. It has many similarities with traditional programming languages, such as similar data types, data flow control structures, program debugging tools, and hierarchical and modular programming features. However, the biggest difference between the two is that traditional programming languages ​​use text languages ​​for programming, while LabVIEW uses graphical languages ​​(i.e. various icons, graphic symbols, connections, etc.) to write programs in the form of block diagrams. [2]

  A LabVIEW program consists of three main parts: front panel, block diagram program, and icon route port. The front panel is an interactive graphical user interface of the LabVIEW program, which is used to set user input and display program output, with the purpose of simulating the front panel of a real instrument. The block diagram program uses graphical language to control the control and indication quantities on the front panel. The icon route port is used to define the LabVIEW program as a subroutine so that it can be called in other programs, which enables LabVIEW to achieve hierarchical and modular programming.

  2. Design of Virtual Phase Difference Meter

  1. System composition and functions

  This virtual instrument uses the Lab-PC-1200 data acquisition card of the American NI company, which is directly inserted into the corresponding standard bus expansion slot of the computer to form a PC-DAQ (Data Acquisition) card-type virtual instrument. It mainly measures the amplitude, frequency, phase difference, etc. of two sinusoidal signals of the same frequency. The system composition block diagram is shown in Figure 1:

  


  2. Panel design

  The soft panel program provides users with a friendly graphical interface. All objects in the panel can basically be divided into control quantities and display quantities. Control quantities are used to simulate switches and knobs on traditional instruments; display quantities are used to display measurement and processing results.

  LabVIEW provides a very rich interface control objects, which can quickly design a vivid, intuitive, and easy-to-operate user interface. The virtual phase difference meter soft panel designed in this paper is shown in Figure 2.

  

 

  The left side of the soft panel is a real-time waveform display, which can display two waveforms sampled from channel 0 and channel 1 in real time; the right side is a Lissajous figure, and below it are waveform adjustment, waveform selection, and the measurement results of frequency, amplitude, phase, and phase difference. In addition, when running the virtual instrument, a storage window will pop up, which can save all historical measurement records before the end of the program in the specified file for observation, analysis, and further processing.

  3. Program flowchart structure design

  The block diagram of the virtual phase difference meter is shown in Figure 3. It uses a graphical programming language and is very intuitive. The block diagram includes four parts: waveform acquisition, waveform display and adjustment, waveform measurement, and data storage.

  

 

  (1) Waveform acquisition: This virtual instrument uses the Lab-PC-1200 data acquisition card from the American NI company, with a maximum sampling frequency of 100KHz, an input signal range of -5V~+5V, and two sampling channels 1 and 0. This part consists of AIConfig, AI Start, AI Read, AI Single Scan and AI Clear. Max&Min and a shift register are used to control the reading speed of the sampled data. [page]

  (2) Waveform display and adjustment: First, the two analog input signals (two-dimensional arrays) collected by the data acquisition subroutine are divided into two one-dimensional arrays according to the different acquisition channels using the Index Array function. Then, they are respectively formed into clusters with a starting point x0 = 0 and a time interval Δx = 0.001 using the Bundle function. Finally, the two clusters are formed into a cluster array using the Build Array function and sent to the waveform chart to observe two columns of real-time waveforms. If the two one-dimensional arrays are directly formed into a cluster using the Bundle function and sent to the waveform chart, two columns of Lissajous figures of sine waves can be observed. The three Case structures in the block diagram are used to control the amplitude adjustment, time base adjustment, and waveform selection on the soft panel. The display effect of the real-time waveform on the screen can be adjusted by adjusting these knobs and the vertical pointer slider with the mouse.

  (3) Waveform measurement: mainly measure the frequency, amplitude and phase difference of two sine waves, and focus on the measurement method of phase difference. This paper adopts the spectrum analysis method to measure the phase. The principle is to obtain the frequency domain characteristics of two sine signals through the Amplitude and Phase Spectrum subroutine, take the phase value corresponding to each frequency component of the signal in the phase-frequency characteristic curve of the two signals, and then use the Index Array function to determine the phase of the main frequency components of the two signals according to the number of cycles of the sampled signal, and subtract them to get the phase difference [4]. The block diagram program is shown in Figure 4.

  

 

  (4) Data storage: The data storage part consists of Open/Create/Replace File, Write File, Close File and Simple Error Handler. In addition, the Format into String function is used to define the data storage format, and the Get Data/Time String function is used to return the time of each measurement. The block diagram program is shown in Figure 5.

  4. Discussion of measurement results

  The "phase-shift bridge" circuit is used for testing. The measurement results obtained in a certain state are as follows, which are slightly different from the theoretical values ​​of the parameters. The reason is that on the one hand, various noises and interferences will inevitably be generated during the data acquisition, transmission and conversion process, and external interference will also invade the system. Therefore, in the data processing process, digital measurement will cause certain errors; on the other hand, the frequency of the signal should be determined, but there will be frequency deviation in practice, which is also the reason for the inaccurate phase difference measurement. In addition, there are also errors between the parameter values ​​marked on the device and the actual values, but continuous improvement of the measurement algorithm and the use of data acquisition cards with better performance will achieve better measurement results.

  

 

  3. End

  At present, NI and HP in the United States are in a leading position in the research of virtual instruments. Purchasing their virtual instrument products will definitely help our scientific research and teaching work, but the price is very expensive. Therefore, it is also feasible to research and develop virtual instruments according to one's own needs. The virtual phase difference meter introduced in this article combines the basic functions of oscilloscope and phase difference meter. It is flexible and convenient to use and effectively improves the teaching conditions of electrical engineering experiments in our college. It is believed that with the continuous development of computer technology and measurement and control technology, virtual instruments will become an important method and means of future teaching and scientific research, and will gradually replace traditional instruments to become the mainstream of test instruments.

Reference address:Design of Virtual Phase Difference Meter Based on Virtual Instrument LabVIEW

Previous article:LabVIEW releases EXE containing shared variables and solves related problems
Next article:Labview FAQ Differences

Recommended ReadingLatest update time:2024-11-16 19:44

LabVIEW Zoom Palette
  The Scaling sub-palette is shown in Figure 1. The nodes in the sub-palette are used to convert voltage readings to temperature or strain units, etc.   Figure 1 Zoom sub-palette   Table 1 lists the nodes in the Zoom sub-palette and their functions.   Table 1 Zoom sub-palette nodes and their functions
[Test Measurement]
LabVIEW Zoom Palette
Research on Timing in LabVIEW
The two most commonly used VIs for timing in LabVIEW are Wait (ms).vi and Wait Until Next ms Multiple. This article will use actual examples to explain the difference between these two VIs. If you don't want to read the detailed discussion below, you can just read the following conclusions: If you want to imp
[Test Measurement]
Research on Timing in LabVIEW
LabVIEW Transparency Effect - Very Useful
There is a tool in Labview's editing tools that I hadn't discovered before, but now it's really fun. It is a transparent brush that can make many things transparent. Here: ​After selecting, click the part that needs to be transparent or the background that needs to be transparent. It will be processed like
[Test Measurement]
Design method to implement correlation filtering in Labview development environment
1 Introduction In the current testing field, correlation detection methods are increasingly used for filtering. Correlation filtering can be used to easily separate signals of a specific frequency from complex signals to be measured (including useful signals, DC offsets, random noise and harmonic frequency components,
[Test Measurement]
Design method to implement correlation filtering in Labview development environment
Development of Battery Management System Monitoring Platform Based on LabVIEW
1 Introduction As one of the core technologies of electric vehicles, power battery integration plays a decisive role in the performance of electric vehicle operation. To ensure the safe and efficient application of power batteries, it is necessary to monitor their operating status online in real time and co
[Power Management]
Developing a Part Finishing and Inspection System Using NI Smart Cameras and LabVIEW
Industry: Aerospace, Manufacturing, Imaging Products: LabVIEW, NI 1722 Challenge: Automated deburring and final inspection of turbine wings for aircraft engines. Solution: Built a robotic cell based on NI LabVIEW to precisely deburr and perform quality inspection of turbine wings using the NI 1722 smart camera. “U
[Test Measurement]
Design of real-time monitoring system for photovoltaic power generation based on LabVIEW and RS485 communication
    A photovoltaic power generation monitoring system based on LabVIEW data acquisition and RS485 communication is designed, which can monitor the operating electrical parameters and environmental parameters of the photovoltaic power generation system in real time and count the power generation information. The system
[Microcontroller]
Design of real-time monitoring system for photovoltaic power generation based on LabVIEW and RS485 communication
Test of the volt-ampere characteristics of a single junction transistor based on LabVIEW
The unijunction transistor is a new type of electronic device developed in recent years. It has an important electrical property, namely the negative resistance characteristic, which can greatly simplify the structure of various pulse generating unit circuits such as self-excited multivibrator, step wave generator a
[Test Measurement]
Test of the volt-ampere characteristics of a single junction transistor based on LabVIEW
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号