# Cold Chain Logistics Monitoring System with Temperature Modeling

Shaoxin Guo, Fan Zhang, Jianqin Wang

► To cite this version:

Shaoxin Guo, Fan Zhang, Jianqin Wang. Cold Chain Logistics Monitoring System with Temperature Modeling. 6th Computer and Computing Technologies in Agriculture (CCTA), Oct 2012, Zhangjiajie, China. pp.225-233, 10.1007/978-3-642-36124-1_28 . hal-01348103

HAL Id: hal-01348103

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

Submitted on 22 Jul 2016

**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
Cold Chain Logistics Monitoring System with
Temperature Modeling

Shaoxin Guo¹, Fan Zhang¹, Jianqin Wang ¹*

{1.College of Information and Electrical Engineering, China Agricultural University,
Beijing, 100083, China

* Corresponding author, College of Information and Electrical Engineering,
China Agricultural University, Beijing 100083, China, Email: wjqcau@126.com}

**Abstract.** Cold chain logistics guarantees the quality and freshness of some especial agriculture products. At present cold chain logistics monitoring system can just monitor single point of the temperature in the cold chain vehicle body, it cannot estimate the space temperature distribution of cold chain vehicle body. This paper introduces a cold chain logistics monitoring system based on ARM Linux. The data of temperature value in the cold chain vehicle body and the geographic location of cold chain vehicle will be monitored in real time. This paper presents a space temperature modeling method based on mutli-point temperature value to estimate the space temperature distribution of cold chain vehicle body.

**Keywords:** cold chain logistics, ARM, temperature modeling.

# 1 Introduction

The specific characteristics of some special agriculture products like fish, egg, meet and vegetables determined the logistics of those agriculture products must be in low temperature. So the definition of cold chain logistics is based on freezing technology, by the method of refrigeration technique to guarantee the freshness and quality of agriculture products [1].

In the developed country such as USA and Japan, cold chain logistics system was built with the core of information technology, by the use of storage technology, transportation technology, distribution technology, loading and unloading technology, and stock control technology [2].

In recent years by the establishment of the cold chain logistics grid, cold chain logistics have been covered in everywhere of China. But currently there are still some problems of cold chain logistics in China. The problem is the facilities of cold chain logistics is not perfect, the low level of Market-oriented and the competitive environment of cold chain logistics companies is very bad due to the low price competition [3].

The most important key to solve the problem is to build the facilities of cold chain logistics, to enhance the management of cold chain logistics companies, to build the
standard of cold chain logistics. Additionally the management of the cold chain
logistics should be within information technology [4].

So the technologies and facilities for cold chain logistics are necessary for the
development of the modern cold chain logistics [5]. Therefore, to build a cold chain
logistics monitoring system is the way to enhance the efficiency of management in
cold chain logistics.

Li and You proposed a temperature tracking system based on iButton-DS1923 [6],
but this system cannot estimate the temperature distribution of the cold chain vehicle
body and cannot locate the cold chain vehicle. Wang proposed a temperature
monitoring system based on RFID [7]. But this system cannot monitor the temperature
in real-time.

This paper introduces a cold chain logistics monitoring system with temperature
modeling. There are two sub-systems of this monitoring system, one is embedded
system and the other is control center. Embedded system collects the data about
temperature value of cold chain vehicle body and the geographic location of the
vehicle, and then sends the data to control center in real-time. The program run in
control center receives the data from embedded system, draws the graph of
temperature modeling and also shows the geographic location of the cold chain
vehicle.

The definition of temperature modeling in this paper is based on the method of
interpolation to estimate the temperature distribution in the cold chain vehicle body.
There are some interpolation method is widely used. Those methods are distance
weighing, interpolating polynomials, Kriging and spline method [8]. In the group of the
interpolation method, the distance weighing method is most convenient, but huge
error will occur. Spline interpolation method is based on some extreme point, by the
way of control estimate variance to get the smooth spline by polynomial. But it is not
fit to temperature modeling, because the calculation is huge. The Kriging
interpolation can get the optimum linear unbiased estimate, but Kriging interpolation
needs many interpolation points. In the temperature modeling system the number of
interpolation point is limited, so Kriging interpolation is not fit to temperature
modeling. The space interpolation method for temperature modeling should not only
more convenient and precise, but also less calculation.

Because of the continuity characteristic of temperature distribution, this paper
introduces a temperature modeling method based on three dimensions Lagrange
interpolation [9]. Within the temperature modeling method, the temperature in the cold
chain vehicle body will be estimated. So that it is very convenient to monitor the
temperature distribution in the cold chain vehicle body.

## 2 Design of Embedded System

This embedded system was installed in the cold chain vehicle, the core of the
embedded system is a S3C6410 MCU, and it is a 32-bit ARM11 RISC
microprocessor. The memory in this embedded system is 128MB DDR RAM and
1GB NAND FLASH. The MCU controlled 8 temperature sensors, which installed in
the 8 vertex of the cold chain vehicle body. GPS module is used to get the cold chain
vehicle geographic location. GPRS modem in embedded system is used to
communicate with control center. Figure 1 shows the structure of embedded system.
S1 to S8 means temperature sensor No1 to No8.

<figure><img src="image_2.png" /><figcaption>**Fig. 1.** The 8 temperature sensors, GPS module and GPRS modem are connected to the embedded system.</figcaption></figure>

The operating system of embedded system is Linux. Linux is famous for its efficiency flexibility portability and stability. The file system in the embedded system is yaffs2. The application run in the embedded system is to get the temperature value from temperature sensor and cold chain vehicle geographic location from GPS module, and then transfer the data to control center by GPRS modem.

**2.1 The Method of Temperature Measurement**

The temperature sensor DS18B20 is used to measuring the temperature, it can just use
one wire bus to communicate with the MCU [10]. The 8 DS18B20 connected to the
S3C6410 GPIO port. The Linux driver is used to receive the data from DS18B20. The
Linux drivers are like an interface of hardware and Linux kernel. There are two sort
of device controlled by Linux driver, char device and block device. The DS18B20 is
controlled as char device by the Linux driver. The process of read temperature value
is shown in table 1.
<table><caption>**Table 1.** The process of receive temperature value from DS18B20</caption><thead><tr><td>Step</td><td>Function</td></tr></thead><tbody><tr><td>1</td><td>Open device</td></tr><tr><td>2</td><td>Select which ds18b20</td></tr><tr><td>3</td><td>Reset the ds18b20</td></tr><tr><td>4</td><td>Send skip check rom command [0CC]</td></tr><tr><td>5</td><td>Send convert temperature command[0x44]</td></tr><tr><td>6</td><td>Reset the ds18b20</td></tr><tr><td>7</td><td>Send skip check rom command [0CC]</td></tr><tr><td>8</td><td>Send read data register command[0 BE]</td></tr><tr><td>9</td><td>Read temperature data</td></tr></tbody></table>

## 2.2 The Method of Vehicle Location

GPS module is used to locate the cold chain vehicle. GPS (Global Positioning System) is a space satellite navigation system which can provide location almost anywhere in the earth and time information. The GPS module connected to the embedded system through serial port. GPS module send the data include UTC time, longitude, latitude and other information to the MCU through serial port. The program just analyze the frame first with $GPGGA. This frame is most important in GPS, it include most geographic position information, and this frame used very widely. Based on the NMEA-0183 protocol the format of $GPGGA frame is shown in table 2$^{[11]}$.

<table><caption>**Table 2.** The format about GPGGA frame.</caption><thead><tr><th>$GPGGA,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>,<9>,M,<10>,M,<11>,<12>*xx&lt;CR&gt;&lt;LF&gt;</th><th></th></tr></thead><tbody><tr><td>&lt;1&gt;</td><td>UTC time (hhmmss.sss)</td></tr><tr><td>&lt;2&gt;</td><td>Latitude (ddmm.mmmm)</td></tr><tr><td>&lt;3&gt;</td><td>Hemisphere of latitude (N or S)</td></tr><tr><td>&lt;4&gt;</td><td>Longitude (ddddmm.mmmm)</td></tr><tr><td>&lt;5&gt;</td><td>Hemisphere of Longitude (E or W)</td></tr><tr><td>&lt;6&gt;</td><td>State of GPS</td></tr><tr><td>&lt;7&gt;</td><td>Number of Satellite (00 to 12)</td></tr><tr><td>&lt;8&gt;</td><td>horizontal dilution of precision (0.5 to 99.99)</td></tr><tr><td>&lt;9&gt;</td><td>Altitude (-9999.9to9999.9meters)</td></tr><tr><td>&lt;10&gt;</td><td>Height of geoid above WGS84 ellipsoid</td></tr><tr><td>&lt;11&gt;</td><td>Time since last DGPS update</td></tr><tr><td>&lt;12&gt;</td><td>DGPS reference station id</td></tr></tbody></table>

The process of get data about latitude and longitude is first open the device of serial port (/tty/SAC1), and then set baud rate 9600, using read() function to read the
string of GPS module send, and then using the sscанf() function to match the GPGGA
frame and get the data about latitude and longitude.

2.3 The Method of Real-time Data Transmission

GPRS modem is used to transfer the data between embedded system and control
center. GPRS (General packet radio service) is a packet oriented mobile data service
on GSM mobile phone. Because of the packet communication technology is used in
GPRS system, the usages of network resources will be greatly optimized. GPRS
network supports the TCP/IP protocol, and it can connect to the X.25 network [12]. The
data transport rate of GPRS is ranged from 40Kbps to 100Kbps [13]. In China GPRS
network has almost covered everywhere.

GPRS modem connects to Internet base on PPP protocol by AT command. PPP (point-to-point protocol) is the protocol about data transmission between two nodes of network. The link that the protocol creates is Full-duplex. The PPP protocol transport data through the point to point link. PPP protocol packaging the IP datagram and combine the datagram in GPRS packet, finally GPRS modem send the packet off. The merit of PPP is used easily and widely also it supports user verification and IP distribution.

PPP protocol is consists of three parts [14]:

1. High-Level Data Link Control (HDLC) protocol used to package IP packet to link for transmission.

2. Link Control Protocol (LCP) used to set up PPP communication.

3. Network Control Protocol (NCP) that is run atop of PPP and used to negotiate options for a network layer protocol running atop PPP.

The process of the establishment about PPP link is shown in figure 2.

<figure><img src="image_3.png" /><figcaption>Fig. 2. There are 4 steps to establish the PPP link. Step 1 is link establish stage. Step 2 is user verification stage. Step 3 is network-layer protocol stage. And step 4 is link termination stage.</figcaption></figure>

When the PPP link is established, socket API is used to send and receive data in
software layer. Socket API is provided both in Linux and Windows. Control center
bind the process of monitoring program to the port, and listening socket request and
accept the request. The program in embedded system call the send function to send the data to the control center and the program in control center call the recvfrom function to receive the data.

# 3 Space Temperature Modeling

## 3.1 Three Dimensions Lagrange Interpolation

In order to estimate the temperature in the space of the cold chain vehicle body by the temperature sensor installed in the 8 vertex of the cold chain vehicle body. The method of three dimensions Lagrange interpolation is used. The three dimensions Lagrange interpolation is based on one dimension Lagrange interpolation.

suppose that in three-dimensional space $(x,y,z)|x \in [a,b],y \in [c,d],z \in [e,f]$,and it was divided in :

$$a = x_0 < x_1 < \dots < x_m = b \qquad (1)$$

$$c = y_0 < y_1 < \dots < y_n = d \qquad (2)$$

$$e = z_0 < z_1 < \dots < z_l = f \qquad (3)$$

So the m-th power Lagrange basis function about x is:

$$l_i(x) = \prod_{\substack{t=0 \\ t \neq i}}^{m} \frac{x - x_t}{x_i - x_t} \qquad (4)$$

The n-th power Lagrange basis function about y is:

$$l_j(y) = \prod_{\substack{t=0 \\ t \neq j}}^{n} \frac{y - y_t}{y_j - y_t} \qquad (5)$$

The l-th power Lagrange basis function about z is:
$$l_k(z) = \prod_{\substack{t=0 \\ t \neq k}}^{l} \frac{z - z_t}{z_k - z_t} \qquad (6)$$

So the three-dimensional Lagrange basis function is the product of each basis function:

$$l_{ijk}(x, y, z) = l_i(x)l_j(y)l_k(z) \qquad (7)$$

Finally the Lagrange interpolation polynomial is:

$$P(x, y, z) = \sum_{i=0}^{m} \sum_{j=0}^{n} \sum_{k=0}^{l} f(x_i, y_i, z_k) l_{ijk}(x, y, z) = \sum_{i=0}^{m} \sum_{j=0}^{n} \sum_{k=0}^{l} f(x_i, y_i, z_k) \prod_{\substack{i=0 \\ i \neq l}}^{m} \frac{x-x_i}{x-x_i} \prod_{\substack{j=0 \\ j \neq l}}^{n} \frac{y-y_i}{y-y_i} \prod_{\substack{k=0 \\ k \neq l}}^{l} \frac{z-z_k}{z-z_k} \qquad (8)$$

Can prove that the equation (8) is unique[15]. In this polynomial $f(x_i, y_i, z_k)$ is the temperature sensor value in the direction vector $(x_i, y_i, z_k)$ of the cold chain vehicle body. The direction vector $(x,y,z)$ is the point that the temperature to estimate. And the $P(x,y,z)$ is the point $(x,y,z)$ estimated temperature.

## 3.2 Experiment of Space Temperature Modeling

Suppose that the length of the cold chain vehicle body is L, the width of the cold chain vehicle body is W, the height of the cold chain vehicle body is H. In this experiment L is 5.13 meters, W is 2.91 meters and H is 3.86 meters. The temperature sensor parameter about location and temperature value is shown in table 3.

<table><caption>**Table 3.** The location and temperature value about the 8 temperature sensors.</caption><thead><tr><td>ID</td><td>Location</td><td>Value</td></tr></thead><tbody><tr><td>1</td><td>(0,0,0)</td><td>4.11</td></tr><tr><td>2</td><td>(0,0,L)</td><td>3.16</td></tr><tr><td>3</td><td>(0,W,0)</td><td>4.67</td></tr><tr><td>4</td><td>(0,W,L)</td><td>4.12</td></tr><tr><td>5</td><td>(H,0,0)</td><td>3.10</td></tr><tr><td>6</td><td>(H,0,L)</td><td>4.95</td></tr><tr><td>7</td><td>(H,W,0)</td><td>3.34</td></tr><tr><td>8</td><td>(H,W,L)</td><td>4.23</td></tr></tbody></table>

The 8 temperature sensors was installed in the 8 vertex of the cold chain vehicle body. The temperature sensors in each vertex of cold chain vehicle body and its value are shown in figure 3.
<figure><img src="image_4.png" /><figcaption>**Fig. 3.** The position of the 8 temperature sensors and the value of each temperature sensor are displayed.</figcaption></figure>

By the use of three-dimensions Lagrange interpolation, the temperature value in
anywhere of cold chain vehicle body can be estimated. Figure 4 shows the graph of
both temperature ruler and temperature distribution.

<figure><img src="image_5.png" /><figcaption>**Fig. 4.** The temperature ruler and temperature distribution are displayed. If the temperature is near 5 Celsius degrees the color turn to yellow, and if the temperature is near 3 Celsius degrees the color turn to green.</figcaption></figure>

4 Conclusions

This paper proposed a cold chain logistics monitoring system with temperature modeling, and the experiment of this system indicates that:

1. By method of three dimensions Lagrange interpolation, the temperature in anywhere of the cold chain vehicle body can be estimated accurately.

2. The information includes latitude and longitude of cold chain vehicle is also obtained. It reflects the geographic location of the cold chain vehicle.

3. The transmission of all the data is in real-time.

So that the manager in the cold chain logistics company just sit in front of the
control center computer he can view the information about the temperature
distribution and the geographic location of each cold chain vehicle in the company.
And the efficiency of the management in cold chain logistics company will be
enhanced by this cold chain logistics monitoring system.
**Acknowledgments:** This paper is supported by Chinese Universities Scientific Fund (2012QT003).

References

1. Honghing Dong.: China's agricultural products Cold-chain logistics status, Problems and Solutions. J. Ecological Economy. (10), 255--257 (2009)

2. Lixin Liu, Jianrong Li.: Summary of Development Pattern and Government Behavior of Cold Chain Logistics of Agricultural Products. J. Food Science. 29(9), 680--683 (2008)

3. Qinggang Wu.: The Current Situation and the Countermeasures of China's Cold Chain Logistics Development. J. China Business And Market. 25(2), 24--28 (2011)

4. Jianxing Wu, Tao Jin.: Comparative Study on the Development Levels of Domestic and International Cold Chain Logistics for Agricultural Products Based on AHP. J. Journal of Anhui Agricultural Sciences. (6), 3663--3665 (2012)

5. Xiaoshuan Zhang, Shaohua Xing, Zetian Fu, Dong Tian.: Current situation, development trend and countermeasures of aquatic products cold-chain logistics technology. J. Fishery Modernization. 38(3), 45--49 (2011)

6. Peijiang Li, Ting You.: Cold chain recording instrument of temperature and humidity tracking based on iButton-DS1923. Mechanical & Electrical Engineering Magazine. J. MECHANICAL & ELECTRICAL ENGINEERING MAGAZINE. 26(10), 64--68 (2009)

7. Tingman Wang, Xiaoshuan Zhang, Wei Chen, Zetian Fu, Zhaohui Peng.: RFID-based temperature monitoring system of frozen and chilled tilapia in cold chain logistics. J. Transactions of the Chinese Society of Agricultural Engineering. 27(9), 141--145 (2011)

8. Zhonghui Lin, Xingguo Mo, Hongxuan Li, Haibin Li.: Comparison of Three Spatial Interpolation Methods for Climate Variables in China. J. Acta Geographica Sinica. 57(1), 47--56 (2002)

9. Tianxiang Feng.: Multivariate Polynomial Interpolation. J. Journal of Chongqing Three Gorges University. 25(3), 129--132 (2009)

10. Maxim Integrated Products, http://datasheets.maxim-ic.com/en/ds/DS18B20.pdf

11. Bok Joong Yoon, Myung Wook Park, Jung Ha Kim.: UGV (Unmanned Ground Vehicle) Navigation Method using GPS and Compass. SICE-ICASE International Joint Conference (2006)

12. Zhanqiang Zhai, Shaohua Cai.: GPRS/GPS/GIS Based Vehicle Navigation and Monitoring System. J.Bulletin of Surveying and Mapping. (2), 34--36 (2004)

13. Xiukun Xia, Huanxin Xu, Jimin Lai, Aihua Wen.: Wireless Meter Reading Based on GPRS. J. Techniques of Automation and Applications. 28(3), 62--64 (2009)

14. Guoman Liu.: Design and Implementation of PPP in uC/OS-II Operating System. Degree thesis, Northeastern University (2005)

15. Wei Li.: Polynomial Interpolation Problem in R~S Space. Degree thesis, Dalian Jiaotong University (2009)