introduction
With the development of virtual instrument technology, new measurement and control methods that use "virtual instruments" to replace traditional instruments are replacing traditional measurement and control systems, that is, using data acquisition cards, signal conditioning cards or other computer peripheral hardware to collect and detect signals, and then using computers to process, calculate and analyze signals and display test results.
Labwindows/CVI is an integrated software development environment based on the standard C language. The steps for developing virtual instruments are mainly to first determine the basic framework of the program, create the user interface, then complete the writing of the program code, and finally create the project file, add the program file, header file, and user interface file to the project, and compile and debug to generate an executable file.
1 Design of data acquisition card
Traditional data acquisition cards include multiplexers, amplifiers, sample/hold devices, A/D converters, D/A converters and other devices. The PCI (peripheral component interconnect) bus is a high-performance 32/64-bit address data multiplexing high-speed peripheral device interface local bus. With the continuous improvement of the performance of microprocessors, people have continuously put forward new requirements for the I/O bandwidth of microcomputer systems. The original standard buses, such as ISA, EISA and Mc, have gradually become unable to meet the requirements of modern data acquisition technology. The introduction of the PCI local bus has broken the bottleneck of data transmission. With its excellent performance and adaptability, it has become the mainstream of the microcomputer bus. The data acquisition system based on the PCI bus is the development direction of the high-speed data acquisition system. The overall structure of the data acquisition card based on the PCI bus can be designed as shown in Figure 1:
After completing the hardware design of the data acquisition card, you need to write the driver for the board. WDM (Window Driver Model) is a driver model strongly promoted by Microsoft, which provides more features, including plug-and-play, power management, WMI, etc., and WDM is also a cross-platform driver model that can be recompiled and run on different platforms without modifying the code.
2 Virtual Oscilloscope Software Design
The virtual oscilloscope test system obtains discrete data through peripheral hardware circuits and displays and analyzes the signal in the time domain. This obtains test results that are close to those of real instruments. This design uses a data acquisition card to obtain analog signals, and its software structure is shown in Figure 2:
1) Signal acquisition module
Since this design uses a non-NI data acquisition card, it cannot be implemented directly using the LabWindows/CVI function library. However, the driver of the board design is generally provided in the form of a dynamic link library, so for LabWindows/CVI, the dynamic link library in the driver can be directly used to sample the experimental data file. We store the collected data in a one-dimensional array for analysis and calculation.
2) Waveform display module
The design uses the Graph provided by LabWindows/CVI to display the waveform. The collected data is stored in a dynamic array with adjustable size, and the data is analyzed in the time domain and displayed in a graph. The waveform display module also includes basic operations such as superposition and subtraction of AB channel waveforms. The implementation method is to use C language to simply add and subtract data elements.
3) Time domain analysis module
The time domain analysis includes the autocorrelation of channels A and B, the cross-correlation analysis of the AB channel signals, the convolution of the AB channel, and the Lissajous diagram of the AB channel. The correlation operation design is completed using the Convolve() function in the LabWindows/CVI function library. The convolution is completed using the Correlate() function. The left side of Figure 2 shows the signal of the AB channel, where the pulse signal can be expressed as:
The sine signal can be expressed as: x(n)=sin(k), 0≤k≤1024, k∈Z. The right side of Figure 3 shows the result of the convolution of x(n) with u(k). The horizontal axis represents the number of sampling points, a total of 1024 points, and the vertical axis represents the amplitude. The amplitude gain is 1V/d.
4) Signal conditioning module
The signal conditioning module is mainly designed to adjust the vertical gain, vertical displacement, and horizontal gain of the signal. The specific implementation of the design is also achieved through the operation of the array in C language. Figure 4 shows the program flow chart of the signal conditioning module.
5) Storage Module
Due to the limitation of storage hardware, real oscilloscope can only store 2 to 4 data. However, in the virtual digital storage oscilloscope, unlimited data can be accessed arbitrarily by using storage media such as hard disk, and the storage is safer. The specific implementation method is: the storage samples the measured signal, then converts it into an array, and then saves the array to a file. The reading is just the opposite. The working process is shown in Figure 5.
3 Test results and simulation analysis
According to the design process of LabWindows/CVI, we completed the design of the virtual oscilloscope and sampled and analyzed the sine signal. The results are shown in Figure 6:
The main problem of virtual instrument is the simulation of instrument, and simulation includes two aspects, one is the simulation of instrument function, the other is the simulation of instrument appearance and panel. This design focuses on the simulation of instrument function.
1) Simulation of data processing and waveform storage functions
Through the design of virtual instrument software functions, we have completed the display of signals, correlation operations, convolution operations, file storage and reading, and basically realized the functions of the oscilloscope, achieving the goal of simulation.
2) Bandwidth simulation
Generally speaking, the bandwidth of a virtual oscilloscope generated directly by a computer is actually the bandwidth of the computer, and the upper limit of the frequency it can measure depends on the performance of the computer. In fact, the oscilloscope is limited by various factors, and its bandwidth is much lower than the bandwidth of the computer. The main factors that limit the bandwidth of the oscilloscope are:
① Limitation of the upper operating frequency of the oscilloscope.
② Limitation of Y channel amplifier bandwidth.
③ Limitation of the scanning speed of the timing circuit.
In order to achieve the simulation effect, a 100MHz, -3dB low-pass digital filter is designed for the virtual oscilloscope. Although the use of IIR filters such as Chebishev can better maintain the amplitude-frequency characteristics of the measured signal, its phase-frequency characteristics are not ideal. Therefore, a FIR filter is designed using a rectangular window to ensure that the signal passing through the filter can linearly approach the phase of the measured signal. The spectrum characteristics of the rectangular window are shown in the following formula (see Figure 7).
As shown in Figure 7
4 Conclusion
The emergence of virtual instruments is a turning point for the test and measurement industry. It means that we can change the performance of the instrument anytime and anywhere by changing the virtual instrument software module according to our needs. However, it is still difficult to complete the development of a high-performance virtual test system. The non-interchangeability between different interface buses requires us to develop different hardware drivers for each interface bus, which reduces the versatility of virtual instruments. The contradiction between the complexity of high-performance virtual instrument interface circuits and the need for high-speed data measurement is also a reason that restricts its widespread application. However, as an emerging instrumentation technology, virtual instrument technology has only developed for a few decades. I believe that with the continuous development and improvement of computer technology and virtual instrument technology, it will replace traditional instruments and become the main force in the instrumentation industry.
Previous article:Design and verification of logic chip function test system using FPGA chip
Next article:Effectively measure power supply ripple using RIGOL programmable digital oscilloscope
- Popular Resources
- Popular amplifiers
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- In what situations are non-contact temperature sensors widely used?
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- DDR2 Specification Chinese Version.pdf
- Video demonstration, how to quickly implement the drive test of ST sensor (LSM6DSOX) through STM32 microcontroller
- 【Example】Conduction + radiation, rectification case!
- [Support eSports] Invite your friends to join the 19 National Competition Exchange Group and share a thousand-yuan cash gift!
- What is a hysteresis comparator?
- More than 20 commonly used power symbols
- 【Maturity Cycle】Maturity Cycle of Automotive Electronics Engineers
- A collection of ESP32 experience posts. Netizens who are learning ESP32 can take a look.
- 883 Q What does Q stand for in the device identification?
- Received the prize, I feel the delivery speed is very fast now