BITS PILANI IoT PG PROGRAMME DESIGN ASSESSMENT.
The goal of the design assessment is to detect and predict forest fire promptly and accurately to minimize the loss of forests, wild animals, and people in the forest fire.
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
FOREST FIRE DETECTION WIRELESS SENSOR NETWORK
1. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 1
DesignAssessment
FOREST FIRE DETECTION SYSTEM
Abhilash K
BITS ID NO: 2017CIOT055
Date
February 19, 2018
The goal of the design assessment is to detect and predict forest fire promptly and accurately to minimize the loss of forests, wild animals, and people in the
forest fire.
Abbreviations
SN Sensor Node
CN Coordinator Node
CO Carbon Monoxide
CO2 Carbon Dioxide
GPS Global Positioning System
2. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 2
GSM Global System for Mobile
LTE Long Term Evolution
GPRS General Packet Radio Services
ISM Industrial, Scientific and Medical
TSDB Time Series Database
RDBMS Relational Database Management System
NoSQL Non SQL / Not Only SQL
ML Machine Learning
LAT Latitude
LON Longitude
Step 1: Purpose and Requirement Specification
Purpose: Forest Fire Detection System is to collect data on environment conditions such as Temperature, Relative Humidity, Wind Speed, Wind Direction,
Carbon Monoxide (CO), Carbon Dioxide (CO2), GPS Value and Smoke Detection using multiple end nodes.
Behavior: The proposed system will employ ZigBee Mesh Network to communicate and route packets in a geographical area. There are three kinds of nodes,
SN or Sensor Node, RN or Router Node and CN or Coordinator Node participating in the ZigBee Wireless Sensor Network (WSN). Sensor Nodes deployed in
a geographical area collect data from sensors at regular intervals say every 60 seconds and send to Coordinator Node through the ZigBee Mesh Network
routed and relayed through Router Nodes. Coordinator Nodes are computationally powerful nodes than Sensor Nodes and act as coordinator to Sensor
Nodes in the ZigBee Mesh Network. The main role of Coordinator Node is to gather and cluster data from Sensor Nodes, manage alarms and commands, and
3. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 3
build the core network. Router Nodes route and relay data from the Sensor Nodes to the Coordinator Node in the ZigBee Mesh Network. The communication
range of Coordinator Nodes span several kilometers to guarantee a reliable service by means of 802.16 (Wi-Max) communication. Coordinator Nodes can
also include GSM/LTE/GPRS modules just in case there is a cellular data link available in the area. Coordinator Nodes send data received from Sensor
Nodes to the Cloud where data is collected and analyzed.
Systems Management/ Data Analysis Management/ Application Deployment Requirement: System does remote monitoring, remote data analysis, and
application is also remotely deployed on the Cloud.
Step 2: Process Specification
Read Sensor
Store Value
WAIT 60 SECONDS
4. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 4
Step 3: Domain Model Specification
Domain Model defines various physical, virtual entities and services.
Physical Entity – Environment which is monitored.
Virtual Entity – Environment
Devices – Temperature Sensor, Relative Humidity Sensor, Wind Speed Sensor, Wind Direction Sensor, CO Sensor, CO2 Sensor, Smoke
Detection Sensor, GPS Sensor, GSM/LTE/GPRS Module, ZigBee Module, WiFi Module.
Services – Controller service native to Sensor Node which monitors temperature, relative humidity, wind speed, wind direction, CO and CO2
levels, smoke detection, and sends messages routed and relayed from Router Nodes to the Coordinator Node in the ZigBee Mesh Network.
Controller Service native to Coordinator Node send messages received from Sensor Nodes in the ZigBee Mesh Network to the Cloud through
802.16 (WiMax) or GSM/LTE/GPRS using REST Web services. Controller Service native to Coordinator Node can also receive Control
Commands from the Cloud through MQTT Broker in the Cloud.
5. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 5
Sensor
Temperature
Sensor
Humidity
Sensor
Wind Speed
Sensor
Wind Direction
Sensor
CO
Sensor
CO2
Sensor
Smoke Detector
Device MinicomputerOn-device Resource
Attached to
Attached to
Network Resource
Resource
Physical Entity
Environment
Virtual Entity
Environment
Relates to
Services
Associated with
Exposes
Monitor
Active Digital Artifact
Application
Human User
User
Subscribers
Invokes
Associated with hosts
Sensor
GPS
Invokes
6. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 6
Step 4: Information Model Specification
Corresponding to physical environment – there is a virtual entity – expanding on each virtual entity environment.
Virtual Entity:
Environment
Entity Type:
Environment
Attribute: State
Attribute Name:
Temperature
Attribute:
State
Attribute Name:
Humidity
Attribute: State
Attribute Name:
Wind Speed
Attribute: State
Attribute Name:
Wind Direction
Attribute: State
Attribute Name:
CO
Attribute: State
Attribute Name:
CO2
Attribute: State
Attribute Name:
Smoke
Temperature:
val
Humidity: val Wind Speed: val Wind Direction: val CO: val CO2: val Smoke: val
Has value Has value Has value Has value Has value Has value Has value
Attribute: State
Attribute Name:
Lat/Long
Lat/Long: val
Has value
7. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 7
Step 5: Service Specifications Model
Derived from the highlighted portions of process and information model – Service Model.
Controller Service that runs as a native service on the Sensor Node and monitors parameters every 60 seconds. The Controller Service then
sends the data to the Coordinator Node routed and relayed through ZigBee Mesh Network by Router Nodes.
Name: Controller
Type: Native
Output
Temperature
Humidity
CO
CO2
Wind Speed
Wind Direction
Smoke
Lat/Lon
Schedule
Interval: Every 60
Seconds
Has Output
Has Schedule
8. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 8
Step 6: Deployment Level Specification
The system has multiple Sensor Nodes deployed in different geographical areas for monitoring – temperature, relative humidity, wind speed,
wind direction, CO and CO2 levels, smoke detection, GPS location. The system uses ZigBee Mesh Network for communication and routing
data. During ZigBee Mesh Network deployment each Sensor Node will record its geolocation based on GPS information. Sensor Nodes
equipped with sensors send data to Coordinator Node through Router Nodes. Coordinator Nodes send data to the Cloud, data is stored in
various databases schemes such as Time Series Database (TSDB) for Sensor data and Relational Database Management Systems
(RDBMS) or NoSQL Database for all other data in the Cloud.
Sensor Nodes employ a bi-directional API mode communication scheme with Coordinator Node through ZigBee Mesh Network. Sensor Nodes
can also receive commands to change alarm thresholds or node working mode. The communication protocol includes the following
communication message types:
1. Automatic Data Message: Periodic message containing sensor data.
2. Node Status Message: Messages containing data regarding sensor status, power level, memory availability, additional status and so
forth.
3. Command Message: Messages from Coordinator Node with commands.
Coordinator Nodes employ communication with the Cloud through REST Web Service. Coordinator Node has GPS capability, provide time
information and also have the capability to detect time drifts from other nodes. In addition to the Sensor Node communication messages types
Coordinator Node communication protocol also include the following communication message types:
9. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 9
1. Alarm Message: Not only alarm messages themselves, but also bi-directional confirmation messages (error checking messages) to
ensure that the alarm message has been properly transmitted and received.
2. Command Message: Messages from Cloud with commands.
Data received from Coordinator Nodes is subjected to analysis in the Cloud using Machine Learning (ML) algorithms. ML takes measured data
as input to produce weather index, which measures the likelihood for the weather to cause fire.
Cloud applications are provided for visualizing data through dashboards, graphs and charts. Cloud applications employ three levels of security
mechanism to access the data. Username and Password is required for authentication. Role Base Access Control (RBAC) privileges, API
Token required for API operations from Cloud applications.
In certain emergency situations – example smoke detection or extremely high temperature will be reported by Sensor Nodes to Coordinator
Node which will trigger alarms send to the Cloud which in turn will trigger sending automated Voice Call, SMS or Email to the concerned forest
officials.
Cloud applications can publish Control Commands to topics in the MQTT Broker in the cloud. Coordinator Nodes subscribe to topics in the
MQTT Broker in the cloud for Control Commands which in turn will be send to Sensor Nodes in the ZigBee Mesh Network for e.g. to change
monitoring intervals.
10. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 10
Sensor Node Sensor Node
Resources Resources
Sensor Node
Device
Controller
Service
Controller
Service
Observer Node
Sensor Node
Device
Controller
Service
Coordinator Node
Device
Resources
Resources RDBMS/
NoSQL
Web Service Analytics
Component
Application
Application
Observer Node
Sensor Node
Device
Time series DB
Local
Cloud
IOT Level 5
MQTT Broker
11. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 11
Legend
CN Coordinator Node
RN Router Node
SN Sensor Node
CN
Cloud
SN
SN
SN
ZigBee Mesh Network
12. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 12
Step 7: Functional View Specification
1. Device, Device Management Group
2. Device Functional Group, Communication Functional Group
3. Controller
4. Web
Sensor
Node
Resources
Controller
Service
Sensor
Node
Resources
Controller
Service
Observer Node
Coordinator
Node
Resources
Controller
Service
Sensor Computing
Device
Management
Application
Database
Security
SSL/TLS
API Token
APIs Protocols
Communication
Web Native
Services
Web
App
Server
Database
Server
Analytics Observer
Application
RDBMS/
NoSQL
Observer Node
Web Service
Application
Device
1
1
1
1
2
1
2
1
3
3
1
4
1
5
1
4
4
6
1 7
1
8
1
5
1
4
4
5
1
4
4
Time series DB
MQTT Broker
6
1
MQTT
Broker
Analytics
Component
13. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 13
5. Database Management, Security (Database)
6. Application Maps to Application Functional Group (Web Application, Application Server, Database Server), Security (Application
Security)
7. Analytics Maps to Application Functional Group
8. Observer Maps to Application Functional Group
Step 8: Operational View Specification
Sensor Node
Microcontroller: Raspberry Pi 3 Model B
Raspberry Pi 3 Model B is chosen due to the following reasons:
CPU
Enough number of GPIO pins (40) to connect the sensors.
No complex arithmetic to be done.
No safety critical requirements.
Memory requirements.
Enough memory to host software.
I/O
Connect sensors via GPIO pins.
GPS module via USB port.
14. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 14
XBee module via USB port.
Network
Support for ZigBee protocol through XBee Java library from Digi.
Power
Lithium Polymer (LiPo) battery.
.
Other Hardware
Sensors: Temperature, Humidity, Wind Speed, Wind Direction, CO, CO2, Smoke.
Geolocation: GPS Module.
Communication: XBee Module.
Communication Model – Sensor Node and Coordinator Node
The communication model employed between Sensor Nodes and Coordinator Node is ZigBee Wireless Mesh Network with Router Nodes for
routing and relaying packets from Sensor Node to Coordinator Node.
Advantages of Mesh Network
The range is extended as it allows data to hop node to node and insertion of any node is easy in the network.
The network is self-healing type as in case of failure of any node or lost connection conditions, data can be routed through other
healthy nodes in the network.
15. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 15
Communication Protocol Stack – Sensor Node and Coordinator Node
Link Layer: 802.15.4 / ZigBee
Network Layer: AODV (Ad hoc On-Demand Distance Vector Routing)
Application Support Sub Layer:
Application Support Data Entity (ASDE)
Application Support Layer Management Entity (ASME)
Application Support Layer Information Base (AIB)
Application Framework:
Application Object (End point)
ZigBee Device Object (ZDO).
ZigBee Device Profile
API: XBee Java Library from Digi.
Communication Protocol Stack – Coordinator Node and Network Server on the Cloud
Link Layer: 802.16 or GSM/LTE/GPRS
Network Layer: IPv4/IPv6
Transport Layer: TCP
Application Layer: HTTP, MQTT
APIs: REST APIs, Eclipse Paho MQTT Pub/Sub Client
16. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 16
Services
Controller on Sensor Node: Hosted on device. Implemented as Java code running inside Java SE 8 for ARM JVM using Open JDK Device
IO to access data from sensors, run as native code. Controller will use XBee Java Library to send data from sensors to Coordinator Node.
Controller on Coordinator Node: Hosted on device. Implemented as Java code running inside Java SE 8 for ARM JVM. Controller will use
REST APIs to send and receive data from the Cloud. Eclipse Paho Java MQTT client API will be used for subscribing to MQTT Topics in the
Cloud to receive Control Commands from Cloud applications.
Java SE 8 for ARM
Java SE 8 for ARM platform is chosen for Controller due to the following reasons,
Enables to develop highly functional, reliable, and portable applications.
Offers industry-leading reliability, performance, throughput, security and cross-platform support.
Rich Java SE APIs and support for third-party libraries such as Open JDK Device IO, XBee Java Library from Digi and Eclipse Paho
MQTT Client APIs.
Faster development.
17. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 17
Step 9: Device and Component Integration
Sensor Node
The various sensors and other hardware components are interfaced with Raspberry Pi 3 Model B in the following ways,
RASPBERRY PI 3
MODEL B
GPIOUSBUSB
5V MICRO
USB POWER TEMPERATURE SENSOR
HUMIDITY SENSOR
WIND SPEED SENSOR
WIND DIRECTION SENSOR
CO SENSOR
CO2 SENSOR
GPS MODULEXBEE MODULE
LiPo
Battery
SMOKE SENSOR
18. Design Assessment for FOREST FIRE DETECTION SYSTEM February 19, 2018 18
Step 10: Application Development
Application
The data received from Coordinator nodes through REST APIs will be stored in databases in the cloud. The sensor data will be stored in Time
series database such as InfluxDB. The system, user and node information will be stored in the Relational Database such as MySQL. The web
interface of the application for the users to interact with the system will be developed using React JS or JQuery and HTML5 components. The
middle tier of the application will be developed using Spring Cloud and Netflix OSS. The web services will be exposed as REST services. The
dashboard of the application will display charts and graphs of the time series data from the sensors stored in the Time series database.
Chart.JS will be used to display charts and graphs in the dashboard. Eclipse Mosquitto MQTT Broker Topics will be used for sending Control
Commands from Cloud applications to Coordinator Nodes. Eclipse Paho MQTT client APIs will used for Pub/Sub communication between
Cloud applications and Coordinator Nodes for Control Commands through Eclipse Mosquitto MQTT Broker. The web, middle tier, MQTT
broker and database components will be deployed on Amazon Elastic Compute Cloud (EC2) or on premise.
Security
Authentication will be performed through username and password stored in the database. Role Based Access Control (RBAC) will be enforced
to assign various levels of user privileges in accessing the application. Once authenticated and authorized to access the application, API
Token will be required to send along with every request to the backend services from the application.
Management
The application management will be done through Spring Cloud and Netflix OSS components. Database management will performed through
Influx DB and MySQL Database Management operations. MQTT Broker management will performed through Mosquitto Management
Interfaces.