Giter Site home page Giter Site logo

scorpio-h / aces Goto Github PK

View Code? Open in Web Editor NEW

This project forked from francescofraternali/aces

0.0 0.0 0.0 749 KB

Automatic Configuration of Energy Harvesting Sensor Nodes with Reinforcement Learning

License: GNU General Public License v3.0

Python 100.00%

aces's Introduction

ACES: Automatic Configuration of Energy Harvesting Sensors with Reinforcement Learning

Objective: ACES uses Reinforcement Learning (RL) with Q Learning to maximize environmental sensing (i.e. temperature monitoring, PIR detection events) while avoiding energy storage depletion. It has been designed for energy harvesting platforms with limited energy storage capacity (i.e. super-capacitor, capacitor, battery).

Wireless Sensor Network Architecture: We target single-hop networks where a Master (Computational Unit) interacts directly with a Slave (i.e. a sensor node) to drive its sensing and collect data. The Figure below reports the wireless sensor network architecture:

WSN

In this example, we use ACES with Pible, our custom battery-free mote for perpetual indoor BLE applications. Pible uses a solar panel to gather energy from the environment and a supercapacitor to store it. It can be used for general indoor building applications as it embeds a variety of sensors: light, temperature, humidity, PIR, reed switch, pressure, accelerometer, gyroscope, and microphone. Pible has a 1F supercapacitor with 5.5V nominal voltage. We consider Pible to stop operations while achieving a voltage level <= 3V as its sensors cannot work correctly under such condition.

We run ACES in our local server, but it can run in a base station (i.e. Raspberry PI) or the cloud.

ACES uses a "day-by-day" learning approach: it uses the last day of data collected to train a Q-Table, then it tests in the coming day using the generated policy. Once the test day is over and new data are collected, the old Q-Table is resumed and a new training is started using all the data collected. In this way, the agent updates the policy over time and adapts it throughout days and weeks without any human intervention.

ACES controls the sleep time of the sensor-node: action 0, 1, 2 and corresponds to a sleeping time of 15 minutes, 5 minutes, 1 minute, and 15 seconds respectively.

How to: Run Main_Sim.py to start ACES. The system will initially look for an existing Q-Table inside the folder Q_tables. If not found, it will calculate a new Q_Table from scratch.

To learn a new Q-Table ACES requires the last day of lighting levels in lux. If those are not present, the system will automatically use all "0" lighting levels.

In "ID_RL.txt" put the name of your experiment and after the comma put the input state of the RL separated by '|'. By default, ACES uses the following observations: the supercapacitor voltage level (i.e. SC_norm), light (i.e. Light) and week/weekend day (i.e. week). Remove one or more observations to check how ACES behaves while having less inputs to learn from.

Enjoy!

aces's People

Contributors

francescofraternali 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.