Coder Social home page Coder Social logo

crstnn / wirelessbushfiresensornetwork Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 1.14 MB

Implemented in C using POSIX Threads and OpenMPI. A simulation of a WSN with sensors communicating with satellites in order to detect bushfires in an area.

Makefile 0.36% C 98.61% Shell 1.03%

wirelessbushfiresensornetwork's Introduction

Wireless Bushfire Sensor Network

Joint collaboration implemented in C using POSIX Threads and OpenMPI. A simulation of a WSN consensus algorithm utilising sensors that communicate with satellites in order to detect bushfires within a particular area.

Network design layout (copyright-free image from https://unsplash.com/photos/er7EeL-4MqQ)

DESIGN SCHEMA FOR THE SENSOR NETWORK

On initilisation, we create a base station which always exists at the last rank on the MPI network, and wherein the sensor nodes take occupation of all the other ranks in the network. There are some strict specifications to the running of this program as the user specifies command line arguments of the cartesian grid that must follow an n * m form factor. Then, a master (base station) node must be specified. If an n * m + 1 nodes are not specified an informative error ensues and the user must re-specify the parameters given the aforementioned schema.

Another user-specified command line argument is the WSN's communication interval (in seconds). This allows the user to decide the network's polling frequency. This is an important feature as if a bushfire sensor detection network does not have a wired connection, it may rely on solar power or battery power which could cause a fault in the entire network, if the polling frequency were to be too often causing a complete diminution of its power resources.

Also, it should be noted that the user can specify the number of iterations, as a command line argument, that they would like the network to function for. Its total runtime can be calculated by multiplying the interval with the iterations argument. The network proceeds to check for any local consensus of overheated sensor nodes. This means that for a given node that has achieved the threshold temperature (85° C) it sends a request to its adjacent neighbor nodes (the number of requests range between 2 to 4 nodes depending where the sensor node is within the cartesian grid). These packets are then sent back to the node attempting to achieve local overheat consensus whereby the given sensor node checks that at least 2 or more adjacent nodes are greater than the threshold temperature minus 5 (> 85 - 5). If this occurs a (C) structure is sent back to the base station ready to post the detailed event information to the specified log files. If this local consensus does not occur then the packet is never sent and this process continues to repeat. Of course, at the base station these overheat report packets are cross-checked with the satellite sensor to ensure no false positives. If the two temperatures match (from the satellite and the sensor nodes) then it is logged as a 'confirmed report' or otherwise a 'false report'.

TERMINATION

Sensor nodes create an IRecv message at the beginning of execution listening for a message tagged BASENODESHUTDOWN. Then, individually, as their final instruction, they will check to see if this message was received. If the message is recieved, each node will run MPI_Finalize, simulating a shutdown. This form of shutdown, termed 'graceful shutdown', prevents final processing of data/memory from being interrupted, such that the WSN can be appropriately shutdown.

wirelessbushfiresensornetwork's People

Contributors

crstnn avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.