# The Application of CPLD and ARM in Food Safety Testing Data Fusion

Jianjun Ding, Xihua Wang, Chao Sun

► To cite this version:

Jianjun Ding, Xihua Wang, Chao Sun. The Application of CPLD and ARM in Food Safety Testing Data Fusion. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.36-40, 10.1007/978-3-642-18354-6_6. hal-01563451

HAL Id: hal-01563451

https://inria.hal.science/hal-01563451

Submitted on 17 Jul 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# The Application of CPLD And ARM In Food Safety Testing Data Fusion

Jianjun Ding¹, Xihua Wang ¹,², Chao Sun¹

1. Physics and information school, Jianghan University, Wuhan, Hubei Province, P. R. China

2. Mechanical Engineering school, Hubei University of Technology, Wuhan, Hubei Province, P. R. China

ddijd@126.com

**Abstract:** Analyzes the main features of CPLD, and describes the process that use ARM for data fusion after obtaining a large number of food safety testing signals, and gives principle of CPLD. This system has realized the data fusion processing, and has the performances that easy to operation, high sensitivity, strong data analysis capability, stable output and so on. Improving the performance of system data processing greatly and reducing the development costs effectively, provides an effective method of data processing for food safety testing.

**Key words:** ARM, CPLD, Data fusion, Food safety testing

## 1 Introduction

As food safety affecting people's health and safety directly, more and more attention has been paid to it. While food security becoming the focus of which the public concern about, administration departments have also taken various measures to enhance the work of food safety testing. With the development of safety detection, all kinds of test items and test equipments were available. After each test, there will be a large number of data. In this case, on one side, could improve the level of food security testing, and on the other hand, new requirements for data acquisition and processing technology would be proposed.

CPLD is short for Complex Programmable Logic Device. Comparing with previous data collector, it has a higher acquisition speed and more stable. In the previous case, after data collecting, single chip microcomputer was used as the main
tool for data Analysis. But with the growing data flow and the requirements for real-
time from modern testing technology, the single chip microcomputer can not meet
these requirements[1]. ARM embedded technology could be used to solve these
problems wonderfully. It will meet the requirements of improving data collection
speed and data processing speed effectively by combining CPLD technology with the
ARM.

## 2 The Design of System Structure

This system use EPM7128S and ARM7. System flow chart is shown in picture(1).
There will be a variety of detection volume during food safety testing process and
circuit designed are multi-sensor circuit. Basing on actual requirements we can
increase or decrease sensors signals output channels. Signals from various channels
enter into CPLD first. CPLD controls signals from the strobe. The sensors output
signals are so weak that system will take on signal amplification and frequency
processing after signals gating through the CPLD. After processing the signals, they
will be sent into A/D. In this way, it will be easy for ARM to take on data fusion. In
the ARM processor, the signals collected will be processed by many methods,
including wavelet analysis, least-squares method, DS evidence theory, fuzzy neural
network and so on. Then calling for database to analyze and compare the signals.
Finally, the test results are sent to the monitors, printers, or saved by network. Test
results are saved for the purpose of data analysis and archiving.
<figure><img src="image_2.png" /><figcaption>Pic(1) System Flow Chart</figcaption></figure>

**3 Principle of CPLD**

CPLD work logic flow chart is shown in picture(2). The main functions of CPLD are controlling of data collection, determining sensors work state, controlling A/D change.

Food safety testing has so many detection items that a lot of types and a large number of sensors are involved. It is very important to judge the state of the sensors[2]. Through a preliminary analysis of sensors output signals, we can discover non-normal state sensors. When the sensors are not working properly that the system will send warning signals immediately. This will remind the inspectors not to analyze the wrong output. In this way, it will save the time of data acquisition and analysis. What's more, it can also increase system efficiency and reliability. As the multiple sources put into the circuit nearly at the same time that it needs CPLD to control A / D conversion work. Through the CPLD module internal clock frequency, pulse signals are generated[2]. Once count time, A / D conversion start to work for one time.

Another pulse signal will be issued after A / D conversion completed. And then the data will be sent to the ARM for the next step processing. CPLD's work signal is
empty at that time, indicating that the data has been removed by ARM processor[3]
and CPLD can select a new signal channel and receive the new sensors output signals.

<figure><img src="image_3.png" /><figcaption>Pic(2) CPLD Work Logic Flow Chart</figcaption></figure>

## 4 ARM Data Processing

During the previous data fusion process, use single chip microcomputer for data processing when the amount of data is small. Data will be sent to the PC when there is a large amount of data. So there are some problems. For example: some data may lose during the process of transmission; A longer transmission time will be needed when there is enormous amount of data, and it is easy to be affected by the external environment. In the process of food testing, as the sensors signals have an important influence on test results, and many cases require to achieve the rapid detection, so the whole system have a higher demand with real-time data transmission and stability. With the development of embedded technology, the system's data processing capabilities continue to increase, and can completed the work of data fusion in the field gradually[4].

In this system, ARM processor needs to monitor the working status of each
sensor and use several fusion algorithms on the sensors output signals at the same time. There has been a simple comparative analysis to evaluate sensors working conditions when the data into the CPLD. But only a simple estimate is not enough. It still needs the ARM processor for further identification. System identification method is adaptive fusion algorithm in wavelet analysis. In the testing process, by calling the database, compare with the state of each sensor in sensor systems. Estimate the reliability of data[5] and accept the sensor data according to the reliability. Sensors data fusion use the least square method, DS evidence theory and fuzzy neural network technology. Least squares method is simple and easy to operate. In this way the system can reduce the computational burden. DS evidence theory has the advantage of a strong theoretical foundation. It can deal with the uncertainty caused by random and ambiguity[6]. This has great significance. Because during the process of sampling, the sensor may be affected by sampling time, sampling frequency, a sudden change in environmental conditions and so on. System can not avoid to occur some errors and uncertainties. DS evidence theory can analyze and solve such problems effectively. Fuzzy neural network has the function of learning algorithm and high convergence speed. It can get the required input-output relationship quickly[7]. So, in this way, by calling the database, system can analyze data by itself. This can reduce the pressure on the system operation and save the test time.

## 5 Conclusion

Food safety testing technology plays a significant role in the process of protecting food safety. Detection system with the CPLD can be used to improve data acquisition speed and ensure the security of data acquisition and stability at the same time. That will display the multi-sensor group's function fully. Using of ARM technology and a variety of data fusion methods will help to achieve real-time data analysis and improve the speed of system detection. It will also help to facilitate the system in the actual detection and promotion. The using of multi-sensor group will meet the requirement that the same or different materials can be tested at the same time. This can reduce test cost and improve the detection speed. This method can simplify the process of food safety testing operation and easy to handle. So it will reduce the work volume and improve the level of food safety testing to some extent.
References

1. Rongfang Zong: The Design of Data Acquisition and Control System Based on CPLD. Shanxi Electronic Technology. 3, 27 (2008)

2. Hua Fu, Yaning Liu: Mine Monitoring System Based on Network of ARM and Data Fusion. Express Information of Mining Industry. 3, 73--75 (2007)

3. Yanling Qing: High-speed Data Acquisition and Signal Processing. Sichuan University. 33--34 (2006)

4. Shengli Hu, Ruiguo Ding, Pan Liu: Research on the Information Integration Model of Embedded Multi-sensor. Journal of Anhui University of Science and Technology (Natural Science). 1, 61--62 (2008)

5. Quan Yuan, Zhaoyang Dong, Qing Wang: Adaptive Multi-sensor Fusion Algorithm Based on Wavelet Neural Network. Journal of Beihang University. 34, 1331 (2008)

6. Xinpeng Hua, Huiyi Zhang, Lan Zhang: Multi-sensor Data Fusion Technology and Its Research Progress. China Instrument. 5, 41--42 (2008)

7. Yunfei Bai, Erguang Qu: Multi-sensor Information Fusion Technology and Its Application. Mechanical Management and Development. 1, 69--70 (2008)