Anda di halaman 1dari 59

HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY

SCHOOL OF INFORMATION AND COMMUNICATION TECHNOLOGY

THESIS
SUBMITTED FOR PARTIAL FULFILLMENT OF
THE REQUIREMENTS FOR THE DEGREE OF

ENGINEER
IN

INFORMATION TECHNOLOGY

ENVIRONMENT MONITORING SYSTEM


BASED ON INTERNET OF THINGS FOR
GREENHOUSE

Author:
Supervisor:

Nguyen Khoi Nguyen


Class ICT-55
Dr. Ngo Quynh Thu

HANOI 05-2015

REQUIREMENTS FOR THE THESIS


1. Student information
Student name: Nguyen Khoi Nguyen
Tel: 0986209900
Email: nguyennk92@gmail.com
Class: ICT-55
Program: ICT
This thesis is performed at: Network and Communication TechnologyLab, Room 901, B1
Building, Hanoi University of Science and Technology
From 24/02/2015
to 24/05/2015
2. Goal of the thesis
Design an environment monitoring system for Greenhouses model using Wireless
Sensor Network over Internet of Things.
Improve the system's performance by using enchanted multi-path RPL.
3. Main tasks
Study the characteristic of particular plants in Vietnam.
Study the concept of Precision Agriculture and deployed Greenhouses in the world.
Study the concept of Wireless Sensor Network over Internet of Things, RPL and
multi-path RPL.
Design the Greenhouse based on Wireless Sensor Network over Internet of Things,
apply RPL multi-path.
Analyze the results and evaluate the system's performance.
Propose recommendation for future works.
4. Declaration of student:
I Nguyen Khoi Nguyen - hereby warrants that the Work and Presentation in this thesis are
performed by myself under the supervision of Dr.Ngo Quynh Thu.
All results presented in this thesis are truthful and are not copied from any other work.
Hanoi, 24/5/2015
Author

Nguyen Khoi Nguyen


5. Attestation of the supervisor on the fulfillment of the requirements of the thesis:

Hanoi, 29/5/2015
Supervisor

Dr. Ngo Quynh Thu

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

ACKNOWLEDGEMENT

I would like to thank my advisor Dr. Ngo Quynh Thu, Department of


DataCommunication and Computer Networks, School of Information
andCommunication and Technology, for accepting to supervise my graduation
thesis,and for providing me with research background related to Precision
Agriculture and Wireless Sensor Network.
Special thanks to my classmate, my friend, Le Manh Nien, with whom I have
worked with since the very first days on various projects. It was a pleasure working
with you in an interesting and highly motivated atmosphere and to profit from
group discussion. I hope you will success with your own research.
I also want to thank Mr. Le Quan and your thesis about RPL protocol, as well
asyour RPL simulation implementation. Without your system, I could not complete
my research.
Last, but not least, I am especially grateful to my family and my friends who
haveencouraged me during the research. I am also thankful to everyone had
supported me to overcome any difficulties and complete this research successfully.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

TM TT NI DUNG N TT NGHIP
Internet of Things v ang l 1 trong nhng xu th pht trin mi trong lnh vc
Cng ngh thng tin. Trong , mng cm bin khng dy l mt nn tng khng th
khng nhc n. Mng cm bin khng dy m ra nhng hng nghin cu v ng
dng mi trong lnh vc ty bin khng dy. Mt trong nhng ng dng in hnh i vi
cc h thng mng cm bin khng dy l kim sot v o c cc yu t mi trng trong
nng nghip. Bng vic s dng nhng nt cm bin tch hp kh nng thu thp thng s
mi trng, chng ta c th thit lp 1 h thng gim st v iu khin nhng yu t nh
hng n s pht trin ca cy trng.
Vit Nam, h thng nng nghip thng minh cha thc s c u t v ch trng
do nhng hn ch v cng ngh cng nh hiu qu kinh t cha c kim chng. Tuy
nhin, trong nhng nm gn y, bin i kh hu c nhng tc ng khng nh n
nng nghip ti Vit Nam. ng thi, nhng thnh cng nht nh t nhng m hnh nh
knh v nng nghip chnh xc trn th gii cho thy y l 1 hng i ha hn cho
nng nghip Vit Nam trong tng lai.
Trong cc m hnh mng cm bin khng dy, vi in hnh rng buc nng lng
thp, thi gian s dng di, RPL ang l giao thc nh tuyn c s dng rng ri v
cho hiu nng cao. Tuy nhin, bn thn RPL vn c nhng hn ch ca n, c th k n l
kh nng cn bng nng lng thp v qu trnh khc phc li mt nhiu thi gian. Hu
qu ca vic ny l s mt gi tin trong qu trnh truyn d liu, khin cho hiu nng ca
ton b h thng b gim, tin cy ca d liu khng cao.
n ny tp trung vo 2 cng vic chnh: thit k m hnh kim sot cc yu t mi
trng da trn mng cm bin khng dy, ph hp vi nhng bi ton thc t Vit Nam
v p dng giao thc truyn tin a ng da trn RPL ci thin hiu nng h thng.
nh gi hiu nng, n m phng h thng da trn nhng tiu chun ca IoT, vi
nhng ci t tng ng trn thit b tht.
Kt qu m phng cho thy h thng t hiu qu v nng lng cng nh m bo
tin cy ca d liu. ng thi, vic p dng giao thc truyn tin a ng cng cho
thy hiu qu trong vic ci thin hiu nng h thng, vi t l nhn gi tng t 2% n 4%
v t hiu sut cao trong cn bng nng lng.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

ABSTRACT OF THESIS

Internet of things has been a trend in Information Technology for a few year. And its
most notable application is Wireless Sensor Network(WSN). WSN, with the help of
Internet of things, has opened up a brand new development and application area. One of
which is environment monitoring and control in agriculture, or Precision Agriculture. By
using the network of wireless nodes with embedded sensors which can sense their
surrounding environment, we can establish a system to measure and control the paramters
affecting the plants.
In Vietnam, Precision Agriculture is still a new concept due to limitation in
technologies as well as doubts in its effectiveness. However, global climate changes have
greatly and badly affect agriculture in Vietnam. Moreover, many successful application of
Precision Agriculture in the world show that this is a promising way of development in
agriculture in Vietnam.
In a wireless sensor network, which typically a lossy and lower powered one, RPL is
proven to be very effective and is a routing protocol of choice of many WSN. However,
there are still flaws within RPL, most notable is that RPL does not take into consideration
the energy level the system as a whole and the repair process can be considered time
consuming. This results in the the loss of package and overall, decrease the system's
performance.
This thesis focus on 2 main tasks: design a greenhouse model to monitor environment
information based on the technologies of Wireless Sensor Network over Internet of things
and apply multi-path RPL to the performance of system. For evaluation, this thesis include
a simulation based on Internet of things technology, with the configuration paramenters
closest to real world devices.
The simulation results show the the system's effectiveness and trustworthy. Moreover,
by applying the multi-path RPL, the system's performance is improved: package delivery
rate go up by 2% to 4% and the system archives better energy balance.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

TABLE OF CONTENTS

REQUIREMENTS FOR THE THESIS ..........................................................2


ACKNOWLEDGEMENT .................................................................................3
TM TT NI DUNG N TT NGHIP..............................................4
ABSTRACT OF THESIS ..................................................................................5
LIST OF FIGURES ...........................................................................................8
LIST OF TABLES .............................................................................................9
LIST OF ABBREVIATIONS..........................................................................10
PART I. PROBLEM STATEMENT AND SOLUTION ORIENTATION 12
CHAPTER I. Introduction ..........................................................................12
I. Precision Agriculture and Greenhouse model ........................................12
II. The concept ...........................................................................................17
III. Problem statement ................................................................................24
PART II. RESEARCH RESULT ...................................................................26
CHAPTER I. The design of multipath RPL ..............................................26
I. Faster Local Repair .................................................................................26
II. Energy Load Balancing: ........................................................................28
III. ELB-FLR..............................................................................................32
CHAPTER II. GreenHouse desgin and data acquisition requirements .35
I. Flowers and advantages of environment control system ........................35
II. Greenhouse design.................................................................................37
III. Data acquisition requirements ..............................................................39
IV. Types of sensors and controlling parameters in greenhouse ...............45
CHAPTER III. System simulation .............................................................47
I. OMNeT++ ..............................................................................................47
II. System simulation .................................................................................47
III. OMNet++ project structure ..................................................................48
CHAPTER IV. Performance Evaluation ...................................................49
I. Network setup .........................................................................................49
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

II. Result analysis .......................................................................................50


CHAPTER V. Conclusion and future works.............................................56
References .........................................................................................................57

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

LIST OF FIGURES

Figure 1: Basic construction of sensor node ......................................................14


Figure 2: Wireless sensor network .....................................................................14
Figure 3: Typical Greenhouse and remote control.............................................15
Figure 4: Environment control system for Greenhouse model ..........................16
Figure 5:Un-beacon CSMA ...............................................................................20
Figure 6: FLR data forwarding ..........................................................................27
Figure 7: FLR package reception .......................................................................28
Figure 8: ELB DIO processing ..........................................................................30
Figure 9: ELB data forwarding diagram. ...........................................................31
Figure 10: ELB-FLR data forwarding ...............................................................33
Figure 11: ELB-FLR package reception ............................................................34
Figure 12: Idea temperature range of some flowers ..........................................35
Figure 13: Idea humidity range of some flowers ...............................................36
Figure 14: Photophilic characteristic (surveyed from 40 kind of flowers) ........36
Figure 15: One of typical Greenhouse deployment ...........................................37
Figure 16: typical of small field .........................................................................38
Figure 17: design for small size field .................................................................38
Figure 18: design for normal size field ..............................................................38
Figure 19: design for large size field..................................................................39
Figure 20: Effect of temperature on major physiological processes of plants ...40
Figure 21: End-to-end delay...............................................................................52
Figure 22: Packet delivery rate ............... ! .
Figure 23: Residual Energry ..............................................................................55

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

LIST OF TABLES
Table 1: IoT layers and characteristic ................................................................18

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

LIST OF ABBREVIATIONS
Abbreviation

Phrase

ACK

Acknowledgement

ADC

Analog to Digital Converter

CSMA

Carrier Sense Multiple Access

CSMA/CA

Carrier Sense Multiple Access / Collision Avoidance

DAG

Directed Acyclic Graph

DAO

Destination Advertisement Object

DIO

DODAG Information Object

DIS

DODAG Information Solicitation

DMR

DAG-based multipath routing protocol

DODAG

DAG-based multipath routing protocol

ELB

Energy Load Balancing

FLR

Faster Local Repair

GDP

Gross Domestic Product

GH

GreenHouse

IANA

Internet Assigned Numbers Authority

ICMP

Internet Control Message Protol

IEEE

Institute of Electrical and Electronics Engineers

IETF

Internet Engineering Task Force

IoT

Internet of Things

IP

Internet Protocol

IPV6

Internet Protocol version 6

MAC

Media Access Control

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

10

MTU

Maximum Transmission Unit

OF

Objective Function

OSI

Open Systems Interconnection

PA

Precision Agriculture

PHY

Physical Layer

RAM

Random Access Memory

RDC

Radio Duty Cycling

RF

Reduce-Function

ROLL

Routing over low-power and lossy network (IETF WG)

RPL

IPv6 Routing Protocol for Low-power and Lossy


Networks

TCP

Transmission Control Protocol

UDP

User Datagram Protocol

WSN

Wireless Sensor Network

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

11

PART I. PROBLEM STATEMENT AND SOLUTION ORIENTATION


CHAPTER I. INTRODUCTION
I. Precision Agriculture and Greenhouse model
I.1. Precision Agriculture
The concept of precision agriculture has been around for some time now.
Blackmore et al., in 1994 [1] defined it as a comprehensive system designed to
optimize agricultural production by carefully tailoring soil and crop management to
correspond to the unique condition found in each field while maintaining
environmental quality. Its acceptance in the United States of America has been
formally recognised by the drafting of a bill on PA by the US Congress in 1997 [2].
The early adopters during that time found precision agriculture to be unprofitable
and the instances of implementation of precision agriculture were few and far
between. Further, the high initial investment in the form of electronic equipment for
sensing and communication meant that only large farms could afford it. The
definiton of PA is: an integrated information- and production-based farming
system that is designed to increase long term, site-specific and whole farm
production efficiency, productivity and profitability while minimizing unintended
impacts on wildlife and the environment [2].
Precision Agriculture refers to a set of technologies that introduce the concept
of local variation into the large-scale mechanization, which is essential to large
fields [3]. With the determination of soil, air conditions and plant development,
these technologies can lower the production cost by fine-tuning seeding, fertilizer,
chemical and water use, and potentially increasing production and lowering costs.
These can be achieved through the approach of agricultural control and
management based on direct chemical, biological and environmental sensing. In
order to increase crop yield, improve quality, regulate the growth period and
improve the economic efficiency, the optimum condition of crop growth is realized
when analyzing these factors obtained by this system. Environment control system
is very complex and needs to execute different processes: automatic monitoring,
information processing, real-time control and online optimization. The development
of environment measurement and control system has made considerable progress in
the developed countries, and reached the multi-factors comprehensive control level,
but if we introduce the foreign existing systems, the price is very expensive and
maintenance isnt convenient. WSN is a network of small sensing devices known as
sensor nodes or motes, arranged in a distributed manner, which collaborate with
each other to gather, process and communicate over wireless channel about some
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

12

physical phenomena. The sensor motes are typically low-cost, low-power, small
devices equipped with limited sensing, data processing and wireless communication
capabilities with power supply. WSN can form an useful part of the automation
system architecture in modern control system. Wireless communication can be used
to collect the measurements and to communicate between the centralized control
and the actuators located to the different parts of this system. Wireless Sensor
Networks (WSN) plays a major role in this approach.
The Precision farming system has the following parts:
Sensing agricultural parameters.
Identification of sensing location and data gathering.
Transferring data from crop field to control station for decision making.
Actuation and Control decision based on sensed data.

I.2. WSN technology


Wireless Sensor network, or Low power and lossy network, is a network of
small sensing devices known as sensor nodes or motes, arranged in a distributed
manner , which collaborate with each other to gather, process and communicate
over wireless channel about some physical phenomena. Their structure and
characteristics depend on their electronic, mechanical and communication
limitations but also on the requirements of the specific application. One of the most
important network limitations is energy conservation. Wireless sensors operate on
limited power sources therefore, their main focus is on power conservation through
appropriate optimization of communication and operation management. Several
analyses of energy efficiency of sensor networks have been realized and several
algorithms that lead to optimal topologies for power conservation have been
proposed. Inside WSN, the sensor motes are typically low-cost, low-power, small
devices equipped with limited sensing, data processing and wireless
communication capabilities with power supply. WSN provides a bridge between
the real physical and virtual worlds. Furthermore, using WSN, people are allowed
he ability to observe the previously unobservable at a fine resolution over large
spatio-temporal scales. WSN can be used for many different applications range,
from military implementations in the battlefield, to environmental monitoring [4], in
health sectors[5], as well as emergency responses and various surveillances[5].
WSN is consisted of numbers of elements, called sensor node. The main duty
of each sensor node is monitor parameters are temperature, humidity, pressure,
power-line voltage, and vital body functions etc. Each of them contains a
transducer, microcomputer, transceiver and power source, as shown in Figure 1.
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

13

SENSING

COMMUNICATION

COMPUTING

MICRO PROCESSOR
SENSOR
UNIT

ADC

PROTOCOLS

TRANSCEIVER

MEMORY

POWER UNIT

Figure 1: Basic construction of sensor node

There are 4 main components, they are:


The transducer generates electrical signals based on sensed physical
effects and phenomena.
The microcomputer processes and stores the sensor output.
The transceiver transmits and receives radio signals, and power source
provides electricity to these devices.
The size of these devices is usually very small and powered by either
battery, energy scavenging like solar cells or mains powered.
The significant impact of the WSN is to make prominent concept of IoT real
life. The collaboration of two provide better environmental monitoring, energy
savings, smart grids, more efficient factories, better logistics, better healthcare.

Figure 2: Wireless sensor network

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

14

I.3. Greenhouse model


One of applications deployment of PA in particular is Greenhouse (GH) model.
Greenhouse is a kind of place which can change plant growth environment, create
the best conditions for plant growth, and avoid influence on plant growth due
to outside changing seasons and severe weather[6] [7]. In a GH, there may be a
different structure of the crop in different stages of its growth. As per the actual
conditions of the green house and the requirements of the crop at a different
location in Green House, the application is expected to control acuter like pump,
valve, carton slider and fans etc. For greenhouse measurement and control
system, in order to increase crop yield, improve quality, regulate the growth
period and improve the economic efficiency, the optimum condition of crop growth
is obtained on the basis of taking full use of natural resources by changing
greenhouse environment factors such as temperature, humidity, light, CO2
concentration. Greenhouse measurement and control system is a complex system, it
needs to various parameters in greenhouse automatic monitoring, information
processing, realtime control and online optimization. The development of
greenhouse measurement and control system has made considerable progress
in the developed countries, and reached the multi-factors comprehensive
control level, but if we introduce the foreign existing systems, the price is very
expensive and maintenance isnt convenient.

Figure 3: Typical Greenhouse and remote control

Crop growth is mainly influenced by the surrounding environmental


climatic variables, the amount of water and the fertilizers supplied by irrigation.
Greenhouse is ideal for cultivation of proper crop, in which climatic and
fertilization variables can be controlled to allow an optimal growth and
development of the crop.
As the climate and fertilization are independent issues, they have different
control problems. The exact need of nutrients and amount water for different
crop species can be very well controlled, by automated machine which works on
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

15

collected data. The amount of water and fertilizers require to the plant is a
function of climate environmental conditions on which growth of the crop is
depended. So that greenhouse crop production is a complex issue[8].

Figure 4: Environment control system for Greenhouse model

The Climatic Control Variables are the dynamic behaviour of the greenhouse.
Microclimate is a combination of physical processes involving energy transfer
(which includes radiation and heat) and mass balance (which includes water
vapour fluxes and CO2 concentration). This system depends on the outlet
environmental conditions, architecture of the greenhouse, performance of the
control actuators and variety of crop. Proper ventilation and heating are the
main way of controlling green house climate.
From the paricular needs, the general design and operation of GH must satisfies
these requirements:
Continuously work for long time.
Auto repair when error occurs.
High sustainability: System must work in harsh condition.
High performance: The packet delivery rate need to be as high as
possible.
Energy constraint.
Flexible for various requirements.
Low cost, easy to maintain, expand.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

16

II. The concept


II.1. Internet of Things
The internet, from small local network in small university, has growth into
universe, ubiquitous network used regularly and now approaching up to 3 billion
users worldwide[9]. With internet, individual and groups were allowed to connect
and communicate with each other. Over years, many of new services, protocols
were added and internet are becoming more complete. As the Internet of routers,
servers and personal computers has been maturing, another revolution has been
going on The Internet of Things (IoT). The term IoT had been in discussion since
1991, but it is not until 1999 when Kevin Ashton proposed[10], in the fields of
industrial system. The Internet of Things represents a vision in which the Internet
extends into the real world embracing everyday objects. Physical items are no
longer disconnected from the virtual world, but can be controlled remotely and can
act as physical access points to Internet services. An Internet of Things makes
computing truly ubiquitous a concept initially put forward by Mark Weiser in the
early 1990s[11]. This development is opening up huge opportunities for both the
economy and individuals. However, it also involves risks and undoubtedly
represents an immense technical and social challenge.
The Internet of Things vision is grounded in the belief that the steady advances
in microelectronics, communications and information technology we have
witnessed in recent years will continue into the foreseeable future. In fact due to
their diminishing size, constantly falling price and declining energy consumption
processors, communications modules and other electronic components are being
increasingly integrated into everyday objects today.
The scale of IoT is already estimated to be immense, with potential of trillions
of devices becoming IP-enabled. As a result, it mandates for every devices to be
IPv6-ready, which offers an extremely large space address that can assign to every
devices in contrast with IPv4. And, it also need a new set of ICMPv6 and
mechanism to send those packaged in order to construct and make WSN works.
In our system, we proposed a communication stack based on ContikiOS. This
design is widely used in WSN systems:

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

17

OSI Layer
Application
Transport
Network

Data link
Physical

IoT Layer
Application
Transport
Net layer
ICMP
Adaption
layer

IoT Technology
CoAP, CoAPs
UDP
IPv6
RPL, IPsec
6LoWPAN
[12][13]

MAC layer

802.15.4 MAC

RDC layer

(none)

PHY layer

802.15.4 PHY

Testing system
Client - Server
UDP
IPv6
RPL
6LoWPAN
Un-beacon mode
CSMA
ContikiMAC [14]
Framer802.15.4
cc2420 driver

Table 1: IoT layers and characteristic

II.1.1. Physical layer


We use IEEE 802.15.4 frame format. With the simulated hardware of choice is
cc2420. The CC2420 is a true single-chip 2.4 GHz IEEE 802.15.4 compliant RF
transceiver designed for low power and low voltage wireless applications. CC2420
includes a digital direct sequence spread spectrum baseband modem providing a
spreading gain of 9 dB and an effective data rate of 250 kbps. Key features:
250kbps 2.4GHz IEEE 802.15.4 Chipcon Wireless Transceiver
8MHz Texas Instruments MSP430 microcontroller (10k RAM, 48k Flash)
Integrated ADC, DAC, Supply Voltage Supervisor, and DMA Controller
Integrated onboard antenna with 50m range indoors / 125m range outdoors
Integrated Humidity, Temperature, and Light sensors
Ultra low current consumption
Fast wakeup from sleep (<6s)
Hardware link-layer encryption and authentication
Programming and data collection via USB
TinyOS support : mesh networking and communication implementation.
II.1.2. Radio Duty Cycling - RDC layer
RDC is a in-between layer that only added to an IoT communication stack due
to its support of low-power characteristic. Radio is undoubtly the most energyconsuming part in a sensor node. A node should not be turned on all the time to
listen and / or waiting for trasmission. Instead, it only needs to wake up a short
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

18

amount of time to do its work and then go back to sleep to save energy. Such thing
can be done by implementing a Radio Duty Cycling design ContikiMAC in this
case. ContikiMAC uses only asynchronous mechanisms, no additional signaling
messages, nor package headers. ContikiMAC packages are link layer frame.
ContikiMAC has a significantly more power-efficient wake-up mechanism that
previous one. This is achieved by precise timing through a set of timing constraints.
ContikiMAC use periodical wake-ups to listen for packet transmission. If a
possible signal is picked, a node will stay a little longer trying to decode the signal.
Unicast is done by having the sender continuously send out message until an
acknowledgement response. In case of broadcast, the process is identical to unicast,
but instead of stop when ack received, the sender keeps sending out message the
whole wake-up time.
II.1.3. Mac layer
This layer is responsible for dertemining who is allowed to access the media at
any time. For wired devices, a CSMA with collision detection is used since it is
very easy to detect collision before hand in a wired network. However, it is nearly
impossible to do that with wireless devices, a CSMA with Collision advoidance
(CSMA/CA) is used instead. The typical CSMA mode used in IoT is un-beacon
mode.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

19

Un-slotted CSMA

NB = 0,
BE = macMinBE

Delay for
random(2BE - 1) unit
backoff periods

Perform CCA

Y
Channel idle?
N
NB = NB+1,
BE = min(BE+1, aMaxBE)

NB>
macMaxCSMABackoffs
?

Y
Failure

Success

Figure 5:Un-beacon CSMA

II.1.4. Network layer


As we mentioned before, there would be billion of devices connected to the
internet in the near future. And the world is already run out of addresses for Ipv4.
Therefore, adapting to a new Internet Protocol (Ipv6) is an absolute requirement for
systems in future. However, while there is no problem in using Ipv6 with a PC or
smartphones, it is much more difficult to fully utilize Ipv6 in case of embedded

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

20

small devices. The problems lie in these devices' low-powered, memory-limited


characteristic as Ipv6 requires much more memory space compared to Ipv4.
According to the IEEE 802.15.4, the standard MTU size is 128 bytes, that is
without the security. If security is turned on, there would be only 80 bytes left for
MAC payload. A UDP/IPV6 header already occupy 48 bytes at least, which left us
with only 32 bytes for our data. The 6LoWPAN comes to the rescue here as an
adaption layer. The new standard proposed by 6LoWPAN helps carry Ipv6
packages over 802.15.4 link. It defines a Mesh Addressing header to support sub-IP
forwarding, a fragmentation header to support IPv6 minimum MTU necessary,
which is 1280 bytes. And by using link-local address, it reduces a significant
amount of length.
II.1.5. Transport layer
In a WSN, which is also typically a Lossy and Low-Powered Networks (LLNs),
saving energy is the most important task. And also take into consideration that there
is not a clear proposal for reliable transport, the use of User Datagram Protocol
(UDP) and retransmission control mechanism at application layer propose a good
trade-off between enery cost and reliability. In contrast to TCP, UDP uses a simple
connectionless transmission model with a minimum of protocol mechanism. It has
no handshaking dialogues, and thus exposes any unreliability of the underlying
network protocol to the user's program. There is no guarantee of delivery, ordering,
or duplicate protection. UDP provides checksums for data integrity, and port
numbers for addressing different functions at the source and destination of the
datagram.
II.1.6. Application layer
This system implements a simple Client-Server program, in which the Client
send data about surrounding environment to Server. The Client will be sensor
modules periodically sensing and forward data to base station (Server). The Server
is an appilcation installed on base station (DODAG root), it is reponsible for
initilization and maintainence of DODAG root. The server will always listen to
Client in a predefined port and store the collected data.

II.2. IPv6 Routing Protocol for Low-power and Lossy Network


RPL [9][10] is a de-facto standard routing protocol entirely defined for IPv6
WSNs. It is a proactive, distance vector routing protocol, currently under
specification by the ROLL working group of the IETF. RPL is designed to be a very
flexible protocol in the sense of providing a standard of few basic mechanisms,
which form the smallest common denominator or of functionality on different WSN
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

21

applications can agree. Variety of extensions has been provided to tailor RPL
framework to the particular requirements. In this chapter, the RPL is briefly
explained with assumption of only one physical network and one root with no
downward routing provided.
RPL constructs and maintain network as a directed acyclic graph (DAG), which
can be divided into several destination-oriented DAG (DODAG). And, this
DODAG can be considered as a logical routing topology over physical network. An
objective function (OF) [15]defines how routing metrics, optimization objectives,
and functions to calculate rank as well as compare neighbor with aspect of rank.
The rank of a node is relative distance of this node toward the base station. It may
be built on node-quality (hop-count, residual energy, etc) or link-quality (expected
transmission number, delay transmission time, etc).
The RPL routing protocol specifies a set of new ICMPv6 [16]control messages
to construct DODAG and to aid communication between root and source node. A
RPL Control Message is identified by a code, and composed of a base that depends
on the code, and a series of options. Most RPL Control Message has the scope of a
link. The only exception is for the DAO/DAO-ACK messages in non-storing mode,
which are exchanged using a unicast address over multiple hops and thus uses
global or unique-local addresses for both the source and destination addresses. For
all other RPL Control messages, the source address is a link-local address, and the
destination address is either the all-RPL-nodes multicast address or a link-local
unicast address of the destination. The all-RPL-nodes multicast address is a new
address with a requested value of FF02::1A (to be confirmed by IANA)
In accordance with [16], the RPL Control Message consists of an ICMPv6
header followed by a message body. The RPL Control message is an ICMPv6
information message with a requested Type of 155 (to be confirmed by IANA).
Within scope of this paper, we do not consider downward routing, hence, only
two kinds of message are involved, they are:
DODAG Information Solicitation (DIS) - code field is 0x00 (to be
confirmed by IANA) - is used to solicit DIO message from neighbor, it
acts as an initial strobe for a nearby DODAG.
DODAG Information Object (DIO) - code field is 0x01 (to be confirmed
by IANA) - is issued by DODAG root, in order to construct a DODAG.
DIO message contains: DODAG information (InstanceID, Version,
DODAGID immutable, only root node can modify) and nodes rank.
RPL Terminology
The terminology is used within the scope of RPL, and is excerpted from [17]:
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

22

DAG (Directed Acyclic Graph): a directed graph having the property that all
edges are oriented in such a way that no cycles exist. All edges are contained
in paths oriented toward and terminating at one or more root nodes.
DAG root: a node within the DAG that has no outgoing edge. Because the
graph is acyclic, by definition all DAGs must have at least one DAG root and
all paths terminate at a DAG root.
Destination Oriented DAG (DODAG): a DAG rooted at a single destination,
i.e. at a single DAG root (the DODAG root) with no outgoing edges.
DODAG root: the DAG root of a DODAG. The DODAG root may act as a
border router for the DODAG, and in particular it may aggregate routes in
the DODAG, and may redistribute DODAG routes into other routing
protocols.
Rank: a node's Rank defines the node's individual position relative to other
nodes with respect to a DODAG root. Rank strictly increases in the Down
direction and strictly decreases in the Up direction. The exact way Rank is
computed depends on the DAG's Objective Function (OF). The Rank may
analogously track a simple topological distance, may be calculated as a
function of link metrics, and may consider other properties such as
constraints.
Objective Function (OF): defines how routing metrics, optimization
objectives, and related functions are used to compute Rank. Furthermore, the
OF dictates how parents in the DODAG are selected and thus the DODAG
formation.
DODAGID: the identifier of a DODAG root.
DODAG Version: a specific iteration ("Version") of a DODAG with a given
DODAGID.
Version: a sequential counter that is incremented by the root to form a new
Version of a DODAG. A DODAG Version is identified uniquely by the
(InstanceID, DODAGID, Version) tuple.
DODAG parent: a parent of a node within a DODAG is one of the
immediate successors of the node on a path towards the DODAG root. A
DODAG parent's Rank is lower than the node's.
DIO: DODAG Information Object
DIS: DODAG Information Solicitation

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

23

II.3. Multi Path


RPL routing algorithm has been proven its efficiency as a lightweight rounting
algorithm in Wireless Sensor Network. However, there are still much to consider as
well as room for improvements. Let us take a look at some properties of RPL and
WSN to make it more efficient:
Load balancing: RPL normally doesn't consider about nodes' energy level.
RPL determines its route mostly by hop count and/or rank quality. This
would easily leads to unbalanced route: a node will be chosen as a parent too
much that its energy ran out quickly. Where as the second best route, even
only a liitle worse than the best route here, is never chosen unless the best
route is broken.
Maintainace energy usage: RPL itself provides a mechanism to quickly
repair itself in case of broken link by the use of ICMPv6. This, even with
flexible trickler timer algorithm, still cost a lot in term of package count. And
of course this will also cost nodes' power.
Three enchanted methods have been proposed: Energy Load Balancing (ELB),
Faster Local Repair (FLR) and a combination of both (ELB-FLR) to be integrated
into RPL. As the name suggest, ELB take into consideration not only rank quality /
hop count but also energy level of the node. Therefore, the route path taken will be
distributed evenly. FLR, on the other hand, designed to solve the problems of
having to send ICMPv6 everytime we need to update a node's parent list. The nodes
will now consider other nodes with the same rank, called sibling nodes, in addition
to only parent nodes (nodes with higher rank). We will go into details of each
enchantment in the next chapter.

III. Problem statement


Over the past few years, many scenarios of Precision Agriculture have been
research, and many models of Greenhouse with environment monitoring system
were designed. However, these designs has various open issues:
The pratical problem: The Greenhouse monitoring system has to specify
which environment variables needed to control and how frequently the
system has to control; which kind of fields and plants will be growth.
Studies must specify how much can environment variables affect the plants.
The performance of Greenhouse monitoring system: Since the data collected
from wireless sensor network needed to be as much as possible. Usually, a
WSN has package loss based on its size, the larger the system, the higher
package loss. We see a package loss ratio of up to 15% in our set up. The
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

24

package delivery rate can still be improved by applying enchanment


methods to the original RPL.
Energy and system's lifetime: WSN in Greenhouse does not require a strictly
energy requirement, that is, usually the sensors node is constantly powered
and will not die easily. However, an energy saving and balancing solution
still needed to improve the overall performance and nodes' lifetime.
From the background concept and problems above, my thesis will focus on
design greenhouse models suitable for Vietnam environment
andapplyingRPL-based multi-path protocol for improving Greenhouse
environment monitoring performance of WSN based on Internet of Things
For more details, the thesis will considers these terms:
Studies about plants, especially flower in Hanoi and Dalat, which focus
on their characteristic which depends on environment parameters.
Studies about the environment parameters, how they can affect the
plants.
Studies about the Greenhouse model, design the Wireless Sensor
Network for Greenhouse which satisfy the real lifes requirements.
Apply the multi-path solution into existing RPL-routing algorithm to
improve the performance of the system.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

25

PART II. RESEARCH RESULT


CHAPTER I. THE DESIGN OF MULTIPATH RPL
I. Faster Local Repair
Originally, when there's a route failure in RPL, a node needs to send DIS
message and wait for DIO message. This phase took a lot of time. Moreover, if the
packet queue is not empty, DIO message will be delayed to be sent on later time.
Another problem is that this local repair consumes a lot of energy. The more local
repair triggered by a node, the faster it runs out of energy. FLR overcomes this
problem by considering sibling nodes, which are neighboor nodes having the same
rank. A node should store those sibling nodes in its routing table as back-up nodes.
In case of broken route, these back up nodes will be used, thus reduce the cost of
having a local or even worse, a global repair.

I.1. DODAG construction


In the beginning, all sensor nodes are awake and have their transceiver in listen
mode in order to receive the network construction message (DIO).
Step 0: This stage is triggered only when the base station (BS) constructs
DODAG information, which is a unique tuple (InstanceID, Version,
DODAGID) plus its rank.
Step 1: BS initializes DODAG information (InstanceID, Version,
DODAGID) and its self-rank. It encapsulated this information in DIO
message and multicast the message toward all its neighbors.
Step 2: Upon reception of DIO, sensor node determines whether or not the
DIO message should be processed, and records the newest DODAG
information (InstanceID, Version, DODAGID), considers rank of the
neighbor to put in parent list if possible, and modifies its rank if needed.
Step 3: If the rank is equal to self-rank, put neighbor into siblings-list.
Step 4: It changes the rank field of original DIO message, and multicasts to
its own neighbor
Step 5: Whenever a sensor node receives a DIO message, it repeats step 2
and step 3.
Step 6: After a pre-defined interval, if sensor node has not received any DIO
message, it fires DIS message in order to solicit DIO message from its
neighbor.
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

26

At the end of this stage, each node has a parent list, and the best rank parent is
selected as preferred parent.

I.2. Fast Local Repair mechanism


The steps of FLR will be as follow:
It considers the sibling list, and only triggers FLR when this list is not empty.
Otherwise, trigger a normal local repair or costly global repair.
It promotes all its siblings to become its parents in parents-list.
Clear the siblings-list.

Self increase its rank by RPL minimum hop rank increment.

Figure 6: FLR data forwarding

By following these rules, a node having broken path can quickly having a new
parent nodes without the needs of multicasting DIS and waiting for DIO. This
should greatly reduce end-to-end delay as well as energy usage.
Moreover, by self-increase its rank, that node becomes the child of all its
sibling node. Only then, the receiver should know that the broken route node is no

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

27

longer a candidate for either its parent or sibling nodes, and remove routing
information of that broken node from its routing table.

Figure 7: FLR package reception

II. Energy Load Balancing:


The main idea is to use an energy-awareness Objective Function, and energyawareness parent switching to make the next-hop determination more precise, lightweight load-balancing solution. We will next go the details of ELB.

II.1. DODAG construction:


Step 0: This stage is triggered only when the base station (BS) constructs
DODAG information, which is a unique tuple (InstanceID, Version,
DODAGID) plus its rank.
Step 1: BS initializes DODAG information (InstanceID, Version,
DODAGID) and its self-rank. It encapsulated this information in DIO
message and multicast the message toward all its neighbors.
Step 2: Upon reception of DIO, sensor node determines whether or not the
DIO message should be processed, and records the newest DODAG
information (InstanceID, Version, DODAGID), considers rank of the
neighbor to put in parent list if possible, and modifies its rank if needed.
Step 3: It changes the rank field of original DIO message, and multicasts to
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

28

its own neighbor


Step 4: Whenever a sensor node receives a DIO message, it repeats step 2
and step 3.

Step 5: After a pre-defined interval, if sensor node has not received any DIO
message, it fires DIS message in order to solicit DIO message from its
neighbor.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

29

Figure 8: ELB DIO processing

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

30

Figure 9: ELB data forwarding diagram.

At the end of this stage, each node has a parent list, and the best rank parent is
selected as preferred parent.

II.2. Energy-awareness objective function


Normally, a node will select a preferred parent nodes based on hop count / rank
quality. Therefore, there is a high chance that a node will be used too much and
quickly ran out of energy. To solve this problem, ELB use an objective function that
not only taken hop-count but also the residual energy-level of the nodes. The
detailed formula of this objective function is as follow:
1. We consider 1 hop has a valued of 100. Denoted RankInc = 100.
2. The rank of root is equal to RankInc.

3. Each node has its own energy level calculated as:


ResidualEnergy ( node )
EnergyLevel(node) = MaxmimumEnergy ( node ) * 100

4. The hop count (minimum number of hop needed to forward a package


to the DODAG root) is calculated as:
Rank ( node )
Hop(node) = RankInc

5. Finally, the rank of a node is calculated as:


Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

31

Rank(node)=(Hop(parent)+1)*RankInc EnergyLevel(node)

II.3. Energy-awareness parent switching


An energy-awareness load balancing is provided for the whole network by
switching a node's prefered parent on every transmisstion turn. That is, a node's
parents having the same hop count and energy level should be evenly chosen so that
no parent node is exploited. The least recently used parent node is always
prioritized to be selected.

II.4. Summary
ELB aims to provide an energy-awareness load balancing in a wireless sensor
network. It is ensured that all of the parent nodes of a sensor will in turn be chosen
as preferred parent by take into consideration a node's residual energy. Therefore, it
results in a load balancing in term of energy. Also, the lifetime of the whole
network should be improved as well, since every best-rank parents are switched turn
by turn.

III. ELB-FLR
This methods aim to take advantages from both of previous enchanment. ELB
defined the term "rank" a little different than FLR. In ELB, rank is calculated by
hop-count and energy level. Therefore when FLR take places, these nodes having
the same hop-count but different energy level is not considered as siblings. Thus,
the number of sibling nodes to be used as back-up is greatly reduced. The term
sibling nodes need to be redefined as follow:

Siblings = neighbor with the same hop count


With this definition of sibling nodes, FLR can still work perfectly when it
comes to dealing with broken route. The sibling nodes can still be promoted to
parent nodes. Only then, ELB can take place and choose a suitable parent node
based on energy-level. This will not only helps reducing end-to-end delay but also
prolonging network's life.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

32

Figure 10: ELB-FLR data forwarding

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

33

Figure 11: ELB-FLR package reception

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

34

CHAPTER II. GREENHOUSE DESGIN AND DATA


ACQUISITION REQUIREMENTS
I. Flowers and advantages of environment control system
Vietnam, as known as a agriculture country, owns a large farming industry
which contributed about 74% of 2014s GDP[18]. Within agriculture, the
cultivation area holds major density. However, the changes of global climate from
nearly years caused significant impact in cultivation.
The bonsai and flowers farming industry, from the past few years, raised from
small and individual area into a large, high profit area. There are about 15 thousans
herta used to grow flowers, distributed in area around Red river, Cuu Long river,
Dalat and Hanois suburban [19].

Figure 12: Idea temperature range of some flowers

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

35

Lyly
Bell flowers
Phalaenopsis orchids

Flowers

Rose
lilies
gladiolus
chrysanthemums
Gerberas (2)
Gerberas
Carnation
0%

10%

20%

30%

40%

50%

60%

70%

80%

90% 100%

Humidity (percentage)

Figure 13: Idea humidity range of some flowers

Unknown, 5%

Weak light, 10%

Very Strong
light, 10%

Normal light, 40%


Strong light, 35%

Weak light

Normal light

Strong light

Very Strong light

Unknown

Figure 14: Photophilic characteristic (surveyed from 40 kind of flowers)

Unlike paddy, corn, and other food plants, flowers can only growth under given
conditions, depending on what kind the flower is. Furthermore, only high
quality flowers can give high value. Since the quality of products depends
much on the environments effect, the used of environment monitoring system
is necessary to ensure the quality and productivity.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

36

II. Greenhouse design


Greenhouse models for Precision Agriculture have already been developed in a
lot of countries. These greenhouse usually comes with different size and design to
meet particular requirements. In Vietnam, Precision Agriculture and Greenhouse
model was deployed few years ago, and primarily placed in Dalat, where farmer
growth high quality and high value flowers.

Figure 15: One of typical Greenhouse deployment

These system focus on the automation farming method: auto open/close roof,
auto irrigation system, etc... but hasnt focus on the environment control system yet.
From the section above, we known that the flowers depend a lot on the environment
parameters, so the desgin of Greenhouse in this thesis will mention on the
implementation of the environment control system: how many sensors should we
need, how we populate these nodes.
By careful observation of greenhouses in Vietnam as well as taking Vietnam's
economic circumstances, we propose 3 types of Greenhouse: small size, medium
size and large size.

II.1. Small field


With the size that smaller than 20x20m, small field usually suitable for the use
of home. It offers a low cost, easy to maintainence solution for home business. The
figure 16 below captured the typical small size field, which place on rooftop of
apartment. The GH model for this kind of field is actually simple too. Farmers only
need to use one sensor node if the range of this node is large, or two nodes in case
of smaller cover range sensor, and one node for base station. We also do not need to

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

37

implement WSN and RPL in this situation due to the simply structure of the system.
The figure 17 describe the design for this size of field.

Figure 16: typical of small field

Figure 17: design for small size field

II.2. Medium field


Medium field is the field with size about 50m width and 20m height. This type
of greenhouse is most suitable for medium business and can be deployed in urban
area. The number of sensors needed in this set up is up to 10 sensors depends on the
coverage range of each sensor. WSN and RPL is applicable for this design,
however, with this kind of greenhouse, the performance is very high and does not
require any more enchantment (100% package delivery rate).

Figure 18: design for normal size field


Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

38

II.3. Large field


The most common field size in Vietnam is about 150x50m. Most of family
agriculture cooperations in this city have this large size. In this case, we devide this
flat into 24 grids, each has a size of 13.2mx13.2m. Each grid is populated by 3
sensor and The sensors are placed at about 6m from each other. The base station is
placed at the shorter edge. The number of sensor is calculated as follow:
Ns = Nc 2 + [(fw 1) + ((Nc fw) (1 / fw) 1) + ((Nc fw) (1 1 / fw)
2)] [20]
where: Ns is the number of sensors, Nc is the number of grid and fw is the
length of the garden.

Figure 19: design for large size field

In this setup, the technology of IoT and RPL are put to the test. They already
show a reasonable performance (up to 85% package delivery rate) but there still
room to improve. We will discuss the improvement in the enchanted RPL compares
to original RPL in the next chapter.

III. Data acquisition requirements


III.1. Effect of natural parameters into plants
From the above section, we can conclude that, by controlling these natural
parameters, we can guarantee and improve the quality of plants. To control these
stuffs, first we need to measure and collect the data from nodes, but how often
should we need to collect the data ? This situation should be carefully consider
because choosing the suitable degree of measurement could enhance the
performance of the whole system and reduce the power consumption of each
sensors.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

39

To find the suitable answer for this question, we study on how frequent that
these conditions change their value, and the mechanism that plant use to react with
the changes.
III.1.1. Temperature
Temperature has the massive effect on plants. Suitable air temperature can
enhance the speed of photosynthesis, nutrition absorption and nutrition exchange
inside plants. Plants can growth within wide range of temperature, and each one has
the lowest bound and highest bound of temperature, where this plant can stop all the
inside process if the environment temperature exceed these bounds.

Figure 20Effect of temperature on major physiological processes of plants [21] [22]

The direct impact of temperature into plants happens when plants live outside
their temperatures range:
Cold damage: With in low temperature, the leaf could be sere, or shed. The
tree try to minimize its metabolism, then there is no chance for flower to
bloomed.
Hot damage: When the temperature is too high, leaf could be burned, and
tree will dead as result. However, a little bit higher temperature can
stimulate the plant growing faster.
Beside the direct impact, temperature also has indirect impact on plants.
Photosynthesis process contains light reaction (day time) and dark reaction (night
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

40

time). While the light reaction totally depend on light, the dark reaction almost
controlled by temperature. When the temperature decrease to low point, the
enzymes can not work well.
Knowing about the impact of temperature into plants, we not only optimize the
living condition, but also control the productivity, time and quality of plants,
especially flowers.
Control the blooming time of flower: As describled above, low temperature
slow down the blooming time of flower, and vice versa. Another word, we
can adjust the time of blooming event. This ability is very useful because
flower is more valueable if bloom in the right time (cenemory, annivesary,
holiday,..)
Control the quality of flower: Some flowers (orchid, dahlia, ...) different
color of flower within different temperature, and soil condition. Therefore,
we have right to decide the most valuable production by adjust the
temperature of Greenhouse.
III.1.2. Air humidity
All plants inhale carbon dioxide through their leaves. This gas is used in
photosynthesis. As the plant opens its leaf pores to take in carbon dioxide, some of
the moisture in the leaf can escape. Thus the plants sweat water vapor into the air
whenever they breath.
Dry air causes plants to transpire moisture much more rapidly than does humid
air. Waterin the leaves evaporates very quickly into air, causing the plant to lose
moisture at a rapid rate. When leaves begin to lose water faster than the roots can
absorb it - disaster strikes. It is an evil the plant inflicts on itself, in self defense. In
order not to lose more water to the air, the plant will almost completely close its leaf
pores. This slows down the flow of moisture from the plant effectively, but
unfortunately it also reduces the intake of carbon dioxide. Without supplies of
carbon dioxide, the cells begin to die and the plant looks tired and ill.
The important point to remember is that dry air pulls water out of the leaves
faster than theroots can supply the leaves. Under these conditions, it doesn't matter
how much you water such a plant it doesn't help. Over watering only reduces the
amount of air in the soil and invites root rot.

When plants have the right humidity they thrive, because they open their pores
completely and so breath deeply without threat of excessive water loss. When the
air is moist, there is little water lost from the leaf. Damping down the benches and
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

41

surrounds, also misting leaves will keep the air moist. Rapid temperature rises
damage orchids too. It means thatthe plant's leaves become warm and
physiologically active, while the root system in it's solid rooting medium, is still
cold and consequently Physiologically dormant. The active leaves are demanding
large quantities of water and nutrients which the root system cannot possibly
supply.
Under these conditions, photosynthesis, transpiration and the other vital plant
processes, are severely restricted and as a result, developing flower growth and new
growth are damaged. Rapid rises in temperature on sunny days can be avoided by
opening vents or doors early in the morning - and letting the greenhouse warm
gradually.
III.1.3. Soil humidity
Soil humidity directly affect the process of water exchange, as well as the
development of harmed insects and disease. In general, humidity in Vietnam is
high, but different regions do not have the same value.
In particular, many kind of flowers living in Vietnam came from non-tropical
region (eg, tulip...), which only growth in low humidity. Therefore, these flowers
need to live under the humidity that continuously controlled.
Like temperature, each plant has its own ideal range of humidity. Too low or
too high value of humidity can harm the plant:
High humidity can prevent the water exchange, thus the plant is very hard to
analyse the nutrion. As the result, the flower usually has the bad quality, or
even dead. Harmful insects and diseases can also growth fast in this
condition.
Low humidity cause the water leak, therefore, plant does not growth well.
III.1.4. Light
Light has three principal characteristics that affect plant growth: quantity,
quality, and duration.
Light quantity refers to the intensity or concentration of sunlight and varies
with the season of the year. The maximum is present in the summer and the
minimum in winter. The more sunlight a plant receives (up to a point), the better
capacity it has to produce plant food through photosynthesis. As the sunlight
quantity decreases the photosynthetic process decreases. Light quantity can be
decreased in a garden or greenhouse by using shade-cloth or shading paint above
the plants. It can be increased by surrounding plants with white or reflective
material or supplemental lights.
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

42

Light quality refers to the color or wavelength reaching the plant surface.
Sunlight can be broken up by a prism into respective colors of red, orange, yellow,
green, blue, indigo, and violet. On a rainy day, raindrops act as tiny prisms and
break the sunlight into these colors producing a rainbow. Red and blue light have
the greatest effect on plant growth. Green light is least effective to plants as most
plants reflect green light and absorb very little. It is this reflected light that makes
them appear green. Blue light is primarily responsible for vegetative growth or leaf
growth. Red light when combined with blue light, encourages flowering in plants.
Fluorescent or cool-white light is high in the blue range of light quality and is used
to encourage leafy growth. These lights are excellent for starting seedlings.
Incandescent light is high in the red or orange range but generally produces too
much heat to be a valuable light source. Fluorescent "grow" lights have a mixture of
red and blue colors that attempts to imitate sunlight as closely as possible. They are
costly and generally not of any greater value than regular fluorescent lights.
Light duration or photoperiod refers to the amount of time that a plant is
exposed to sunlight. When the concept of photoperiod was first recognized it was
thought that the length of periods of light triggered flowering. The various
categories of response were named according to the light length (i.e., short-day and
long-day). It was then discovered that it is not the length of the light period but the
length of uninterrupted dark periods that is critical to floral development. The
ability of many plants to flower is controlled by photoperiod.
There is two groups of plants: light-like plants and shade-like plants. While the
first group needs direct and high intensity of light to well growth, the other one only
growth under shade. Like temperature and humidity, high and low intensity of light
could impact the plants:
Weak light sometimes is not enough for photosynthesis process, which lead
to low quality of production.
Strong light, on the other hand, can burn the leaf and destroy the
chlorophyll. By the other word, too strong light can kill the plant.

III.2. Data acquisition requirement


From the above section, we can conclude that, by controlling these natural
parameters, we can guarantee and improve the quality of plants. To control these
stuffs, first we need to measure and collect the data from nodes, but how often
should we need to collect the data ? This situation should be carefully consider
because choosing the suitable degree of measurement could enhance the
performance of the whole system and reduce the power consumption of each
sensors.
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

43

To find the suitable answer for this question, we study on how frequent that
these conditions change their value, and the mechanism that plant use to react with
the changes.
III.2.1. Light and temperature data
In theory, light must be control continously because tree depends too much on
light and temperature. However, start from the particular situation, the value of
them can be measured periodically, because of these reasons:
High intensity of light or high temperature could instantly kill the tree, but it
is almost impossible under greenhouse, and the climate of Vietnam.
The tree itself has the mechanism to protect and react with the change of
them in short time.
In certain season, we can predict the value of light and temperature in
specific time, with small errors.
In artifact light condition, we can exaclty determine the value of light and
maintain the value of temperature.
III.2.2. Air and soil humidity data
High air humidity in long time is the the main reason for most of disease and
insect.
Low air humidity can instantly prevent the photosynthesis, low air moisture
in long time can prevent plant rejecting Carbon Dixide, which very harmful
to plant itself.
High soil humidity (after baste or under flooded condition) may kill the root
in couple of minutes.

III.3. Data measurement frequencies


From the above studies, we can see that different data requires a different
sensing period. We propose the following environment parameter measurement
period:

Light sensing: Once every 30 seconds.


Air temperature sensing: Once every 10 seconds.
Air humidity sensing: Once every 5 seconds.
Soil sensing (pH and humidity): Once every 2 seconds.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

44

IV. Types of sensors and controlling parameters in greenhouse


IV.1. Air temperature control
Growth of Plants depends on the photosynthesis process which is a
measure of photosynthetically active radiation. It is observed that proper
temperature level influences the speed of sugar production by photosynthesis
radiation. Temperature has to be control properly since higher radiation level
may give a higher temperature. Hence, in the diurnal state, it is necessary to adjust
the temperature at an optimal level for the photosynthesis process. In nocturnal
conditions, plants are not active therefore; it is not necessary to maintain such a high
temperature. For this reason, two temperature set-points are usually considered are
diurnal and nocturnal [23].
In favourable weather conditions of temperature during the daytime the
energy required to reach the optimal temperature is provided by the sun. In fact,
the usual diurnal temperature control problem is the refrigeration of the greenhouse
using natural ventilation to achieve the optimal diurnal temperature. On the other
hand, heating of the greenhouse up to required temperature is the case of
nocturnal temperature control. Some cases forced-air heaters are commonly
used as heating systems.

IV.2. Humidity control


Water vapour inside the greenhouse is one of the most significant variables
affecting the crop growth. High humidity may increase the probability of diseases
and decrease transpiration. Low humidity may cause hydria stress, closing the
stomata and thus it may lower down the process of photosynthesis which depends
on the CO2 assimilation. The humidity control is complex because if
temperature changes then relative humidity changes inversely. Temperature and
humidity are controlled by the same actuators. The main priority is for
temperature control because it is the primary factor in the crop growth. Based
on the inside relative humidity value the temperature set-point can be adjusted
to control the humidity within a determined range. Hence to control the required
humidity is very complex task. For proper control of humidity internal air can be
exchange with outside air by properly controlling ventilations of the green house
[24].

IV.3. Soil control


Soil water also affects the crop growth. Therefore, the monitor & control of soil
condition has a specific interest, because good condition of a soil
may
produce the proper yield. The proper irrigations and fertilizations of the crops
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

45

are varies as per the type, age, phase and climate. The pH value, moisture
contains, electric conductivity and the temp of a soil are some key parameters. The
pH valves and other parameters will help to monitor the soil condition. The
temperature and the moisture can be controlled by the irrigation techniques like
drift and sprinkles system in a greenhouse. The temperature of the soil and
the inside temperature of the green house are interrelated parameters, which can
be, control by proper setting of ventilation. Since the temperature control is
depends on direct sun radiation and the screen material used, the proper set point
can adjust to control soil temperature. The temperature set-point value
depends on actual temperature of the inside and outside of the greenhouse
[25].

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

46

CHAPTER III. SYSTEM SIMULATION


I. OMNeT++
OMNeT++ is an object-oriented modular discrete event network simulation
framework. It has a generic architecture, so it can be (and has been) used in various
problem domains:
Modeling of wired and wireless communication networks
Protocol modeling
Modeling of queueing networks
Modeling of multiprocessors and other distributed hardware systems
Validating of hardware architectures
Evaluating performance aspects of complex software systems
In general, modeling and simulation of any system where the discrete event
approach is suitable, and can be conveniently mapped into entities communicating
by exchanging messages.
OMNeT++ simulations can be run under various user interfaces. Graphical,
animating user interfaces are highly useful for demonstration and debugging
purposes, and command-line user interfaces are best for batch execution

II. System simulation


We implemented the whole IoT stacks using Omnet++. The overview of our
implementation is as follow:
Application layer demonstrate the process of sensing environment data and
send them to base station
UDP in transport layer
IPV6 with RPL and 6LoWPAN in network layer.
CSMA-CA for MAC layer.
ContikiMac for RDC layer.
Specifcation of 802.15.4 250kbps 2.4GHz Chipcon CC2420 for physic layer.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

47

III. OMNet++ project structure


Folder simulations includes system configuration (omnetpp.ini, WSN.ned)
and testing result folder (result)
o File simulations/omnetpp.ini: contains network configurations.
o File simulations/WSN.ned contains communication stack definition
of each module (sensors node, statistics and world manager)
Folder src: contains source code.
o Folder src/package has 5 sub-folders (data, segment, packet, frame,
signal and strobe) which defines packet format at each layer
o Folder src/util contains 3 modules: statistics model, world manager
and signal manager.
o Folder src/apps contains code for Client-Server applications.
o Folder src/core contains code for each layer driver and utilities.
The energest module is one that use capsule algorithm to estimate time
operation of cc2420 and then calculate the energy consumption of each sensor node.
o Folder src/mote contains client.ned and server.ned which describe
the sensor nodes and base stations components and create connection
among them.
OMNeT++ simulations can be run under various user interfaces. Graphical,
animating user interfaces are highly useful for demonstration and debugging
purposes, and command-line user interfaces are best for batch execution.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

48

CHAPTER IV. PERFORMANCE EVALUATION


I. Network setup
We set up the sensors accordingly to our design mentioned in chapter 2. We
have 3 scenario for 3 sizes of greenhouse: small-sized, medium-sized and largesized. The nodes are configurated to have a range of 47m, charged with 2AA
batteries with the total capacity of 2000 mAh and operation voltage of 1.5V. The
residual energy is set at 0.3%.
The sensors will periodically sense data according to our result from previous
parts:

Light sensing: Once every 30 seconds.


Air temperature sensing: Once every 10 seconds.
Air humidity sensing: Once every 5 seconds.
Soil sensing (pH and humidity): Once every 2 seconds.

Each sensors then try to send these data back to the base station.
For small-sized and medium-sized, the perfomance was superb with almost
100% Package Delivery Rate using only simple RPL routing. For that reason, we
will not discuss the improvement of Multipath routing in these two scenario, we
will mainly focus on our result in large-sized field. The 3 following methods will be
used to measure the improvement of our multipath RPL:
Packet delivery rate: this is the ratio of number of package received in
the base station to number of package sent from nodes.
End-to-end delay: this is calculated by divide the total delay to the total
number of package has been received by application layer in Server. It
represent time difference between data sent at each nodes and received
at the base station.
Data error received at base station: During the experiment, I recorded the
value of data sent from sensor nodes and base station. Then, the set of
data will be synthesized to result the general error during the transmit
time by comparing the data from choosen nodes and base station.
Residual energy-level distribution: energy in each sensor nodes is
divided into 100 equally level. In this method, the number of node in
each level is counted.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

49

II. Result analysis


After running time of 1800 seconds, there are 74232 packets sent over the
network. These packets contains the information of light, temperature, soil humidity
and air humidity. The ratio of numbers of each type is described in figure 21:

Figure 21: Ratio of packets

II.1. Package Delivery Rate


After calculating the package delivery ratio by the percent of successfully
transferred packages and total sent packages. The result is presented in the table 2:

Delivered ratio (%)

Total

Light

Air
Soil
temperature Send
humidity humidity

Received Ratio
(%)

RPL

73.05

88.62

87.00

85.21

74232

65208

87.84%

ELB

78.07

92.04

90.21

89.12

74232

67552

91.00%

FLR

75.95

91.67

89.92

87.71

74232

67455

90.87%

ELBFLR

78.21

93.32

91.39

89.64

74232

68530

92.32%

Table 2: Packet Delivery Rate in detail


Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

50

Figure 22: Overall Packet delivery rate

ELB-FLR shown to have the best PDR (92.3%). ELB and FLR alone shown
some improvement yet having roughly equal result: 91% and 90.8% respectively.
RPL has the worst package delievery rate with only 87.8% package successfully
deliveried. It can be explained that because RPL use more ICMPv6 message to
maintain its route, there is higher chance of traffic congestion, and FLR tackle this
issue by reduce the amount of these messages. Moreover, ELB provides a parent
switching mechanism to prevent a few good parents from having much higher load
than the rest and quickly ran out of power. ELB-FLR gives the best result since
FLR provides a set of sibling nodes. These nodes can in turn act as parent nodes,
giving ELB more choices when it comes to parent switching.

II.2. End-to-end delay


In this section, we measure the end-to-end delay of packets produced by
different routing solutions: RPL, ELB, FLR, ELB-FLR. Packet delay is the amount
of time that packet took to be transmitted successfully. The average packet delay is
calculated by the following formula:
Packet delay = total delay / number of packet received
The detail packet delay of each measured parameters is presented seperatedly in
table 3:

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

51

Packet delay (ms)


Light

Air humidity

Soil
Humidity

Temperature

RPL

194.72

212.62

201.63

211.98

ELB

301.3

334.44

316.42

332.97

FLR

192.84

212.5

200

213.51

ELB-FLR

248.77

266.1

251.27

270.34

Table 3: Packet delay in detail

Figure 23: Overall End-to-end delay

FLR (202 msec) shown a little improvement compared to normal RPL (203
msec). However ELB and ELB-FLR cause a significant higher delay (319 msec and
253 msec respectively). It can be explained that FLR actually reduced the number
of ICMPv6 message needed to maintain RPL route, therefore reduce the amount of
time data payload needs to wait for those ICMPv6 in package queue. On the other
hand, ELB and ELB-FLR tries to balance energy load by choosing different parent
at any transmission. Under the circumstances of our network setup, 1 node may
have many parent nodes, therefore the parent switching get really slow, thus
increase the overall delay of package.
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

52

However, these delay is in acceptable range, as a greenhouse monitoring


system does not need pin-point accuracy on time constraint.

II.3. Data error received at Base Station

Temperature error
Error (Celcious)

2
1.5
1
0.5
0
0

500

1000

1500

2000

2500

3000

2500

3000

Time

RPL

ELB

FLR

FLR+ELB

Figure 24: Temperature Error at BS

Light error
160

Error (Lux)

140
120
100
80
60
40
20
0
0

500

1000

1500

2000

Time

RPL

ELB

FLR

FLR+ELB

Figure 25: Light Error at BS

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

53

Error (%)

Air humidity error


18
16
14
12
10
8
6
4
2
0
0

500

1000

1500

2000

2500

3000

2500

3000

Time

RPL

ELB

FLR

FLR+ELB

Figure 26: Air humidity Error at BS

Error (%)

Soil humidity error


18
16
14
12
10
8
6
4
2
0
0

500

1000

1500

2000

Time

RPL

ELB

FLR

FLR+ELB

Figure 27: Soil humidity Error at BS

All above figures (from Fig.24 to Fig.27) represent the error between data
received at the BS produced by RPL, ELB, FLR, ELB-FLR and the data sent at the
sensors. Obviously, the high data error leads to the decreased monitoring quality.
As shown in the previous figures, RPL routing protocol produces the highest data
error, compared to ELB, FLR and ELB-FLR. The reason of this characteristic is
that RPL achieves the worst packet delivery rate (as described in previous section).
This low packet delivery rate leads to the data error produced at the BS. More
concretely, pH level and light intensity varies slightly according to the time while
temperature and humidity fluctuates more strongly. Thus, the data error received at
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

54

the BS of pH level and light intensity is smaller than error of temperature and
humidity. In addition, among five above parameters (pH level, light intensity,
humidity of the air and the soil, temperature), it is necessary to measure the
humidity with the highest sampling rate. This high sampling rate leads to the more
frequent humidity error produced at the BS. In conclusion, the implementation of
multipath-based RPL protocols ELB, FLR, ELB-FLR can help to the performance
increase of environment monitoring parameters.

II.4. Residual Energy

It can be seen that ELB, FLR and ELB-FLR provided more nodes with high
residual energy level. Where ELB and FLR provided roughly the same result, ELBFLR combined shows much promising sin0063e it both reduce the number of
overhead package and maintain a balanced level of energy among nodes.

Figure 28: Residual Energry


Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

55

CHAPTER V. CONCLUSION AND FUTURE WORKS

In this thesis, we have studied the concept of Precision Agriculture and the
deployment of Greenhouse using Wireless Sensor Network over Internet of Things.
We also studied the popular plants and flowers in Vietnam and their characteristic
to determine how environment affects their growth. Using these information, we
concluded how important certain environment parameters are and how often should
we measure them to not only ensure plants' safety but also save energy. By careful
observation of real world Greenhouse models and Vietnam's particular requirement,
we came up with a design of Greenhouse suitable for Vietnamese farmers. We also
studied the multipath solution based on RPL and apply it to improve the system's
performance. Last, we set up a simulation and the out come result was very
promising.
However, these designs have only been implemented and tested in simulation
environment. For real world applications, there are a lot of others' factor that can
affect and degrade the system's performance. Another problems is that the multipath
enchanment is still in theory and not yet implemented and tested on real devices.
Overall, this research is aimed toward deploying a real world application of
WSN for Greenhouse in Vietnam. But due to our limited time and knowledge, we
only be able to design and evaluate it through simulation. It is a great challenge for
us, and we need more affordable work in the future to realize our idea.

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

56

REFERENCES

[Blackmore, S.(1994). Precision Farming: An Introduction. Outlook on


1] Agriculture 23(4) 4, 275-280..
[G. R. &. D. Corporation., A General Introduction to Precision Agriculture,
2] Australian Centre for Precision Agriculture..
[N. Zhang M. Wang, and N. Wang; Precision Agriculture a Worldwide
3] Overview Computers and.
[Antonio-Javier Garcia-Sanchez, "Wireless Sensor Networks for precision
4] agriculture," European Plant Phenotyping Network, Septemter2012..
[Chen Yang Lu, Mani B.Srivastava, John A.Stakovic, Andreas Terzis, Matt
5] Welsh JeongGil Ko, "Wireless Sensor Networks for Health Care"..
[Maneesha Vinodivi Ramesh, "Wireless Sensor Networks for Disaster
6] Monitoring"..
[Wang Linji. The Design of Realizing Change Temperature Control in
7] Greenhouse by PLC, Journal of ELECTRICAL ENGINEERING, 2008, 5, pp.
81-83.
[Liu Yanzheng, Teng Guanghui, Liu Shirong. The problem of the control
8] system for Greenhouse Climate Journal of Chinese Agricultural Science
Bulletin, 2007, 23, pp. 154-157.
[K. Mayer, K. Taylor, and K. Ellis. Cattle health monitoring using wireless
9] sensor networks. In Second IASTED International Conference on
Communication and Computer Networks, Cambridge, Massachusetts, USA,
Nov. 2004..
[Internet live stats. [Online].
10] http://www.internetlivestats.com/internet-users/, last visited in May 2014.
[Kevin Ashton. RFID Journal. [Online].
11] http://www.rfidjournal.com/articles/view?4986, last visited in May 2014.
[Weiser, M.: The Computer for the 21st Century. Scientific American
Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

57

12] 265(9):6675 (1991).


[J. Hui and D. Culler, "IP is Dead, Long Live IP for Wireless Sensor Networks,"
13] in International Conference on Embedded Networked Sensor Systems (ACM
SenSys), Raleigh, North Carolina, USA, November 2008..
[N. Kushalnagar, J. Hui, D. Culler G. Montenegro, "Transmission of IPv6
14] Packets over IEEE 802.15.4 Networks," September 2007..
[A. Dunkels, "The ContikiMAC Radio Duty Cycling Protocol," SICS, SICS
15] Technical Report ISBN 1100-3154, December 2011..
[P. Thubert, "RPL Objective Function 0," draft-ietf-roll-of0-19 (work in
16] progess), August 2011..
[S.Deering and M.Gupta Conta, "Internet Control Message Protocol (ICMPv6)
17] for the Internet Protocol version 6 (IPv6) Specification," IETF RFC 4443,
2006..
[(2014, May) [Online]. http://tools.ietf.org/html/draft-ietf-roll-rpl-19#section-2,
18] last visited in May 2014.
[Tng cc thng k Thng co bo ch v tnh hnh kinh t - x hi nm 2014
19] 27/12/2014..
[B nng nghip v pht trin nng thn N PHT TRIN NGNH
20] TRNG TRT N NM 2020, TM NHN N NM 2030 16/4/2012.
[Sherine M. Abd El-kader, Basma M. Mohammad El-Basioni. Precision
21] farming solution in Egypt using the wireless sensor network technology. Open
Access funded by Faculty of Computers and Information, Cairo University.
doi:10.1016/j.eij.2013.06.
[A Zrbek-sokolnik, Temperature stress and responses of plants. In: Ahmad P,
22] Prasad MNV (eds) Environmental adaptations and stress tolerance of plants in
the era of climate change. New York: Springer; 2012113134.
[
A. H Fitter, Hay RKM. Environmental physiology of plants, 3rd edn.
23] London: Academic Press; 2002.
[

J. Thelen et al. Radio wave propagation in potato fields. In First workshop

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

58

24] on Wireless Network Measurements (located with WiOpt 2005), Riva del
Garda, Italy, Apr. 2005..
[
W. Zhang, G. Kantor, and S. Singh Integrated wireless sensor/actuator
25] networks in agricultural applications. In Second ACM International
Conference on Embedded Networked Sensor Systems (SenSys), page 317,
Baltimore, Maryland, USA, Nov. 2004..
[
Rodrguez, F. Modeling and hierarchical control of greenhouse crop
26] production (in Spanish). PhD thesis, University of Almera, Spain, 2002..

Thesis is performed by: Nguyen Khoi Nguyen - 20101949 ICT 55

59

Anda mungkin juga menyukai