Research of Food Safety Detection Based on Multi-sensor Data Fusion Technology

This study presents a method for food safety testing based on multi-sensor data fusion, mainly to deal with food safety testing to detect the most common substances, these materials include: formaldehyde, heavy metals lead and cadmium and organ phosphorus and carbamate pesticides. Because it is more sensors, so the detection system will generate a lot of signals. Limited ability of the sensor output signals, these signals are often relatively weak and because the system will be applied to on-site testing and site environment is complex signal is easily influenced by many factors. System design related circuit, using a variety of chips, purify and amplify the signal processing of analog to digital conversion. The final article, but also on data fusion technology relevant circumstances were introduced to the relevant algorithm analysis shows. The experiment data shows that the system has a wide detection range and the configuration is simple with low detection cost which shows the method prompted can meet the engineering requirements of food safety detection.


INTRODUCTION
Today's economy has improved continuously, people paid more attention to food safety issues. Food safety has become a growing topic of concern, is mentioned in many occasions. As food safety issues related to the health problems of the people, so the countries in the world for food safety issues to maintain a high degree of attention. Relevant authorities of countries with strict food safety management standard and is constantly expanding food safety testing program, but also a corresponding increase in the relevant safety standards, to develop a more rigorous testing eligibility criteria (Vallejo Jr. et al., 2007).
In recent years, the food industry has a good momentum of development technology, the food industry is gradually becoming intensive, scientific, the basic trend of modern China's economic development and make a contribution.
At the same time, the rapid development of the food industry, some problems have emerged, the most prominent of which is the rapid detection of food safety problems. There will be some problems in accordance with the previous detection methods, such as: the detection accuracy of some detection methods is high, but the detection rate is relatively slow, you need to wait a long time to arrive at a final test results, thus affecting the efficiency; some detection speed detection method is relatively fast, in a short time will be able to draw the final test data, but its detection accuracy and sometimes they cannot protect.
Some detection methods cannot achieve food security field testing, the test results will be the scene of instability, as well as field data cannot be saved, etc., cannot meet the needs of the industry-site rapid testing; detection technology, while others can collect large amounts of data in the field, However, due to weak data analysis algorithms are more complex to timely data analysis and comparison, the same cannot meet the needs of field testing; detection technology, while also able to solve the problem, but the cost is too high to detect only in similar laboratories and other environments, applications cannot achieve a large area is not conducive to the promotion of advanced technologies. These problems are greatly limits the rapid development of the food industry, the prospects for the development of the food industry has a greater impact, making the food industry to promote economic development has limitations (Elmoudi and Chakhar, 2005).
At the same time, people's level of concern about food issues has risen to a new level. Now, more and more people at the same time concerned about the nutritional value of food and also began to focus on food safety, many consumers are starting to spend more money to buy more healthy green food. Therefore, food safety testing technology improvement and innovation, promoting regional economic development and meet the needs of the people, are of great significance.

SYSTEM DESIGN OVERVIEW
Based on this project in multi-sensor data fusion technology in food safety testing, can be divided into three parts, namely: sensor circuit; data collection; data processing section. Only through close cooperation with the three parts of the sensor, data acquisition and data analysis system organically combine to improve the detection performance of the system. Overall structure of the system is shown in Fig. 1.
Sensor module: Food safety testing standards continue to improve, for food safety testing technology with the new requirements, continuously improve the process of detection technology, the first concern is related to the sensor selection and research. Compared to other signals, electrical signals are the easiest to collect, signal transmission, a variety of instruments to facilitate the analysis and processing. Therefore, in the process of food safety testing, first need to convert various kinds of information into an electrical signal (Siaterlis and Maglaris, 2004).
After a certain concentration of formaldehyde solution dubbed, it can be made formalin. Protein after exposure to formaldehyde can produce irreversible degeneration of the organism has a lot of damage, long in the environment mixed with formaldehyde; it will generate a lot of negative consequences. In the process of growth and metabolism of organisms, some time will naturally produce some formaldehyde, formaldehyde content of these often very low and will not cause harm to humans, but sometimes, in the process of food production and conservation will be adding certain amount formaldehyde, which is required attention. In this system, the method of the sensitive film with the piezoelectric sensor is to detect and analyze the content of formaldehyde.
Agricultural products in the growth process, it will use a certain amount of pesticides, pesticide and some species will naturally degrade into harmless substances and some in a very long period of time will keep the original characters, situations pesticide residues therefrom production. Long-term consumption of food containing traces of pesticides on the body will produce a variety of injuries. Using a spectrophotometer as a sensor, the ability to organophosphate and carbamate pesticide concentrations that can be converted into an optical signal recognition system and through the photosensitive sensor assembly, the light signals into electrical signals, analysis of such substances. Data acquisition module design is shown as: Data acquisition module: After a multi-sensor system is converted, it will produce a large variety of data about the safety of food quality, these data will enter the data acquisition system. Since the sensor is only responsible for conversion of the signal, so the output signal is very weak, so the need to go through the amplifying circuit is amplified, using AM401 in the present system to the original signal enlargement processing. Because more often food safety inspection system for field use in the detection and detection of the scene is different from the laboratory, environmental factors are more complex, many factors will interfere with the detection system (Brooks and Iyengar, 1997). At the same time during operation of the circuit itself will produce "noise", in order to improve the detection accuracy, the amplified signal also need to go through a low-pass filter circuit, the signal is filtered using MAX274 impurity processing. Since the signal from the sensor output into an analog signal, so even after analog-digital conversion circuit which converts the analog signals into digital signals, a process that is A/D converter. Meanwhile, the system is a multi-sensor circuit, data acquisition is large, if the data directly into the data processing circuit, it will bring a lot of pressure to the processor, so the processing circuit in the data before entering, first data supplied to the data preprocessing circuit, pre-processing of these data, thereby improving system processing capability of data (Davison and Kita, 2001).
Data processing module design: After the acquisition of various data signals, are sent to the data processing system. Work performance and speed in food safety inspection system, are directly affected by the data processing capabilities of data processing modules and affect the speed. In the data processing system, the data processor is a very important part of the test results finally obtained is correct, to a large extent depends on this (Murphy, 1998). System chosen processor is EMP240, inherited the ease and at the same time the old Quick Launch CPLD has excellent performance, but also greatly reduces the chip's power consumption as well as production costs, chip capacity and performance has been the greatly improved. Meanwhile, in order to improve the detection accuracy, saving operation time, reduce testing costs, select the appropriate external device is also very important. The system is also designed with a reset circuit, oscillator circuit and a separate power supply system. Meanwhile, in order to facilitate the operator to read the relevant detection result, the system is also designed LCD1602 LCD module. Describes the principles concerning LCD1602 display, the controller, as well as read and write operations, also written operating procedures related to the LCD screen. Finally, in order to facilitate the operator to input the relevant information, the system also joined the keyboard module (Hall, 2002). Details of the keyboard works, control method and the method of the keyboard to jitter research is used to improve the accuracy of the keyboard operation, reduce the probability of error is generated.

THE DESIGN AND APPLICATION OF THE SENSOR CIRCUIT
Piezoelectric sensor circuit design: The piezoelectric sensor output signal after the signal is sent immediately oscillator circuit. Oscillation circuit of this system is composed by a standard crystal and 74AHC04, the two together can be used as the system operation clock oscillation circuit used. Because the system will be applied on-site detection of the occasion, in order to eliminate human error in the measurement process and eliminate possible confounding factors, there are some uncertainties in the field, in this circuit, in addition to the use of quartz crystal oscillators, but also joined the contrast oscillator. Contrast oscillator for the signal received by the sensor is analyzed. System work flow chart shown in Fig. 2.
Spectrophotometer module workflow design: Optical signal generated by the light source, under normal circumstances is white. In order to make the light more concentrated, in the optical signal after the aggregation treatment, the optical signal was only sent to a monochromator. Monochromator purpose is to enable dispersion of white light emitted from the light source for a variety of monochromatic light, white light after such treatment, can be detected in accordance with the requirements of, for detecting the corresponding material to provide a variety of monochromatic light.
Recall monochromatic light has passed the sample cell and reference cell, the sample cell is needed to save the test solution, the sample is injected into the pool as a reference analytical reference standards, respectively, in monochromatic light through the sample cell and reference cell after that, it can be very effective in reducing errors during the test due to the unstable situation in the variety of instruments such as the environment or the emergence of the formation, using this method, you can more effectively improve the measurement accuracy and ensure the sensor to the signal is valid for all subsequent data processing work has laid a good foundation. Photoelectric sensor features and structure: In this system, using a photodiode sensor, referred to as a photodiode. It can directly convert light energy into electrical signals, has been widely used in control engineering. The photodiode structure of conventional shape diode structure is very similar. In general, the outside made of ceramics, glass and other materials wrapped up. On the case will be easy to design a light enters the transparent window in order to enhance the sensitivity of the photodiode sensor.

Biosensor research:
In the detection process, the identification device is mainly proteins and enzymes. After the lead and biosensor assembly proteins and enzymes in the biological response to each other, via the transducer converts, can quickly and effectively so that the biological signals into electrical signals, to obtain a measurement system that can be later identified various signals. Because the electrical signal emitted by the biosensor is very weak, but these signals are easily affected by the instability of the test site and therefore, in this system, also joined the signal amplifying circuit and signal filtering circuits. Wherein the signal amplification circuit which amplify the electrical signal and the signal filtering circuit may play a filtering effect of removing impurities, for system noise. For the circuit to generate the analog signal into a digital signal, after signal amplification and filtering analog signals need impurity feed A/D conversion circuit, the A/D conversion, converted into digital signals in order to: facilitate the CPLD of the input signal for further analysis. System work flow chart shown in Fig. 3.

DATA ACQUISITION SYSTEM DESIGN
Design of signal amplifier circuit: The system uses a chip that AM401, chose the chip, the reason is that the sensor signal conversion AM401 is a very typical applications. AM401 is a versatile interface voltage conversion circuit, not only for single grounded voltage signal processing, but also can effectively bridge the differential signal analysis and processing. Under normal circumstances, in order to achieve an output voltage adjustable within a large range, usually require only a few external components can be achieved.
To the microcontroller, sensors or external power supply circuit provides a reference voltage source VREF, voltage reference source can be adjusted via pin VSET, respectively, the output voltage of 5V or 10V. Ceramic capacitor C1 is connected to a reference voltage, its role is to stabilize the reference voltage output. Therefore, regardless of the reference voltage, OP1 op amp is used as a voltage output stage in the circuit and can play the role of the voltage converter. When you need to adjust op amp gain time, you only need to adjust the two resistors connected to it. Operational amplifier OP2 is under normal circumstance and is to play the role of a reference voltage source and current source for external components and sensors. Op amp reference voltage VBG is OP2 positive terminal of the connection.
Design of a low-pass filter circuit: MAX274 are eight bands active filter chip that four second-order section organically combine, the center frequency can be up to 150 kHz. By adjusting and replacing the external resistors R1, R2, R3, R4, can change the center frequency value for each unit of second order sections and also the magnification can be adjusted and changed by an external resistor. The need to set up a variety of low-pass filters, high-pass filter and a band-pass filter case, only need to adjust the resistance R1, R2, R3, R4 can meet the design requirements. Under normal circumstances, the components of the system has the less, fewer external components, the stronger the stability of the system. MAX274 belonging integrated chip, with respect to the system by the RC circuit and is composed of the op amp, more compact, so the performance with more stable, so that interference greatly enhance the overall system performance (Fig. 4).
A/D conversion circuit design: MAX187 chip is to convert analog signals into digital signals twelve, is by taking a sample and hold circuit and a successive approximation register form to complete. Moreover, MAX187 chip to complete the sample and hold is the need for external capacitors to maintain. MAX187 can complete the conversion of the input signal within a very short time. MAX187 chip chip benchmark within about 4.096 volts, the serial interface requires only CS, DOUT and SCLK three data lines and provides connectivity microprocessor interface.
MAX187 chip has a shutdown mode and normal mode of these two forms of work. When SHDN is high state, the system enters normal mode; when SHDN is low state, the chip is turned off. In this state, the current is reduced to 10uA less. When CS is falling, when converted into the initialization cycle starts, analog to digital conversion result, by pin DOUT in unipolar serial format output, high signal occurs, it means the end of a transition period, the data bit tight with subsequently, then, in this form the serial data stream is formed. Design data preprocessing circuit: STC89C51RC SCM system with the system is also designed external reset circuitry. Using a dedicated external reset circuit advantages: a dedicated external reset circuit with a power regulator block the front down detection, can fully guarantee before power down, the system has enough time to save data acquisition; two, when a power failure, when the voltage drops below the operator to set the power supply voltage, a dedicated external reset circuit can immediately command STC89C51RC reset avoid error handling work; three, after power, when the voltage is higher than the operator to set the power supply voltage, only until after the clock oscillation normal, STC89C51RC will start executing commands. These will improve the stability of the system is a great help. When programming caveats: First, before power-on reset in STC89C51RC, the control system must first download a computer terminal sends the command stream. Second, the system begins to run when the system programmable boot program, let the system determine whether to issue a legal download computer terminal command stream, if there is no issue, you need to execute the user program immediately. Conducting watchdog reset or an external manual reset operation when you do not run the system programmable microcontroller bootloader. SCM principles flowchart is shown in Fig. 5.

DATA FUSION TECHNOLOGY
The basic structure is shown in Fig. 6 on data fusion. Purify the raw data filtering, signal amplification, etc., on the basis of the data contained in this level of integration, after the initial treatment of the relevant data, it is necessary for these data preliminary decision, the realization of this function is to feature level fusion results achieved in this process. Finally, Fig. 6: The basic construct of data fusion data fusion is done in the decision-making data fusion. Between these three are complementary and each layer of the working status and processing accuracy, all of the next layer has a crucial role.

Bayesian methods:
In the beginning, the main method of information fusion using Bayesian methods, this method is often used in a static environment. Working process of this method is: for the sensor assembly each signal point are output as an estimator, analysis and comparison of various signals output from the sensor group, wherein some of the error signal to remove the more obvious, the association of each estimator after the composition posterior probability distribution function, after the data arrives, over time, changing the likelihood function, according to Bayes' rule to get assuming a priori probabilities in the probability signal has a clear basis.
Estimation method: Estimation methods used are: least squares, maximum likelihood estimation method and the weighted average method.
Let squared error of the estimate and the minimum value, which is the goal of the least squares method. Least-squares method with high precision and small error, etc., because of the accuracy of the data directly affected the final calculation results, so you should make the most accurate data has the heaviest weight in the calculation process. In actual application, along with a growing number of data acquisitions, highprecision data will be constantly refreshed, so you have to re-empower the weight to the data, so there will be a complex phenomenon calculation. When asked to estimate the amount of minimum variance has progressive, consistency, when you should use the maximum likelihood method. And after correction of the data, you can make these data into an unbiased estimator, but note that some data to be processed can