LabVIEW realizes near infrared measurement

Publisher:数字冒险Latest update time:2016-11-02 Source: elecfansKeywords:LabVIEW Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  The near-infrared spectrum (1) refers to a section of the electromagnetic spectrum between the visible spectrum and the mid-infrared spectrum, that is, the light region between 780-2526nm. Near-infrared spectroscopy (NIRS) can be divided into short-wavelength near-infrared band and long-wavelength near-infrared band, with the band ranges of 780-1100nm and 1100-2526nm respectively. Due to the high frequency, the absorption of molecules in the NIR spectrum is mainly the absorption of the frequency doubling and sum of molecular vibrations. NIRS analysis technology is based on the characteristic absorption of hydrogen-containing groups in the analyzed substance, such as OH, CH, NH, SH, PH, etc. in the near-infrared region. Using computer technology and chemometric methods, a series of analysis and processing are performed on the optical data of the scanned test sample, and finally the quantitative analysis task of the relevant components of the sample is completed.

The near-infrared whole-grain wheat composition measurement system   based on virtual instrument mainly includes instrument software, hardware and modeling software. Both the instrument software and hardware adopt modular design. The hardware modularization mainly consists of optical path, detector and signal conditioning circuit and virtual instrument data acquisition board; the software modularization mainly consists of signal acquisition module, I/O control module, data analysis module, data storage and display module. The software platform adopts the graphical programming language LabVIEW, and the modeling adopts the stepwise regression analysis [6] method.

  1. Hardware Design

  1.1 Optical Path Design

  The light source consists of 14 near-infrared light-emitting diodes (LEDs). Each LED passes through a near-infrared narrow-band interference filter with a wavelength between 890nm and 1050nm to form monochromatic near-infrared light. The near-infrared light is focused on the sample to be tested through a Fresnel lens, and after being scattered and absorbed in the sample, it is received by the detector. Since the current of the LED determines its light intensity, each LED has a separate adjustable constant current circuit to ensure the stability of the light source.

  The bandwidth of the narrowband interference filter is 10nm, and the range used is 890nm~1050nm. When measuring, first use each wavelength to irradiate the sample in turn to obtain the spectral data of each wavelength sample, and then use the stepwise regression algorithm to select the wavelength that has a significant impact on the component to be measured. When predicting, just bring the absorbance of the selected wavelength into the model calculation.

  This system uses a single detector and arranges 14 wavelength narrow-band filters as closely as possible on a circular bracket. When the same current passes through, the light intensity of the LED at different wavelengths is different. Therefore, the filters with weaker LED light wavelengths (i.e., filters with wavelengths that are significantly different from 890nm and 940nm) are arranged close to the center of the circle to enhance the effective light intensity.

  The focal length of the Fresnel lens is 20mm, the lens is 40mm away from the bracket, and 20mm away from the detector. The Fresnel lens, bracket, and detector are fixed vertically on a straight line passing through their centers. The thickness of the sample cell is 20mm (after deducting the sample cell wall), and the two sides of the sample cell that transmit light are frosted to further enhance the uniformity of the light source. The transmittance of the sample cell for each wavelength of near-infrared within the measurement range is approximately the same. Therefore, the error caused by the sample cell is approximately the same for each wavelength.

  1.2 Light source circuit design

  The light source of this system uses near-infrared light-emitting diodes. Because of its low light intensity, it will not cause damage to the sample, is suitable for non-destructive testing, and has a service life of more than ten years. The wavelengths selected are 890nm and 940nm, and the bandwidth is 40nm~50nm. By adjusting the current of each LED, the light intensity of each wavelength after passing through the narrow-band filter is approximately the same. The circuit controls the LEDs to emit light in turn to obtain the photometric value of the sample at a single wavelength in a time-sharing manner. In order to ensure that the current of the LED is stable and adjustable, a constant current source circuit is used.

  1.3 Signal conversion circuit design

  The detector is a silicon photocell that is relatively sensitive in the short-wave near-infrared region. Since the short-circuit current generated by the photocell has a good linear relationship with the light intensity, the voltage for AD conversion can be obtained through I/V conversion. Since the light source LED has a small luminous angle and good unidirectionality, it can be approximated as a parallel light source. The LED is placed at 2 times the focal length of the Fresnel lens, and the detector is placed at 1 times the focal length on the other side. A circular silicon photocell is selected, which is opposite to the arrangement of the filter.

  The photocell works in zero bias, i.e. photovoltaic mode, to achieve precise linear operation. The photocell bias is maintained at zero potential by the virtual ground of the operational amplifier, and the short-circuit current is converted into voltage. The switch for switching the gain resistor selects a small 5V relay, which is controlled by a triode through the I/O port in the data acquisition card. When measuring the blank light path, a smaller resistor is selected. When measuring the sample, the light intensity is weak due to the absorption of the sample, so a larger resistor is selected to obtain a higher gain.

  1.4 Data Acquisition Card

  The acquisition board used in this system is in the form of an expansion card for the microcomputer system. The data acquisition card is NI's PCI-6040E, and its accessory CB-68LP is also used. The CB-68LP is used to lead the pins on the PCI card to the outside of the host for easy wiring.
 

 
software design

 

  The core idea of ​​virtual instrument technology is to use the hardware/software resources of computers to softwareize (i.e., virtualize) the technology that originally required hardware implementation, so as to minimize system costs and enhance system functions and flexibility. Based on the important role of software in VI systems, the American NI company proposed the slogan "Software is the instrument".

  2.1 Program front panel design

  The front panel is equivalent to the operable panel of a real instrument. You can complete the required tasks by operating this panel. The front panel includes: start run button, digital I/O line control button, channel selection, input acquisition times control, display mean and graphic display controls.

  2.2 Flowchart Design

  In LabVIEW, the flowchart is equivalent to the devices and connections inside the real instrument, which is the soul of software programming. This part mainly includes signal acquisition module, I/O control module, signal analysis module, data acquisition module and data display module. This system scanned 40 whole wheat samples with known crude protein content and obtained 40 spectral data. Then, the spectral data of 36 samples (4 were eliminated) were used to model and predict the crude protein content of the sorted wheat. Among them, 26 were used as calibration sets to establish the calibration model between wheat crude protein content and spectral data; 10 were used as prediction sets to test the prediction ability of the model. The modeling model of the calibration set samples is: C=4.77-60.24A890+122.17A910-40.63A940+83.83A1020-89.66A1050, where C is the crude protein content of the whole wheat sample, and A890, A910, A940, A1020, and A1050 are the absorbances at the corresponding wavelengths.

  According to this relationship model, the absorbance value of the corresponding wavelength in the scanned spectrum is substituted to obtain the crude protein content value of a whole grain of wheat. The correlation coefficient between the predicted value in the calibration set and the chemical value is R=0.845, and the standard deviation is SEC=0.84. The correlation coefficient between the predicted value in the prediction set and the chemical value is R=0.834, and the standard deviation is SEP=0.93.

  Due to the small amount of modeling samples and certain errors in the scanning spectrum of the instrument itself, there is a certain deviation between the predicted results and the actual chemical values. As can be seen from the above figure, despite this, in situations where the accuracy requirements are not very precise (such as on-site measurement, rapid detection, etc.), it can be used for rapid and non-destructive detection of the crude protein content of whole wheat.

  This system uses the rich software resources of computers to realize the softwareization of some hardware and save material resources. Its hardware and software adopt standardized, modular and systematic design principles. The system has stable performance, convenient debugging, expansion and maintenance, and a friendly human-computer interface. It increases the flexibility of the system and can directly analyze and process test data in real time. At the same time, this software program is packaged into an executable program, which can be run on a computer without LabVIEW software installed, so that it does not rely on programming software to execute, increasing its scope of application and flexibility.


Keywords:LabVIEW Reference address:LabVIEW realizes near infrared measurement

Previous article:I/O interface device driver for LabVIEW
Next article:Virtual Temperature Measurement System Reference Design

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号