Inspiration

Imagine if we could somehow localize a person with in a room, observe his moves and make a prediction about his intention then we can develop wide variety of applications. For instance if user turns-on the light as a daily routine after entering a room and if we could capture the capture the anomaly context of not turning on the light we could develop an app to notify and ask if it should be switched on. Notifying when leaving the room without turning off the light should equally work well. Idea is simple but technically there are many approaches to solve this. This part explains 'why nupic ?'. Other ways include popular image processing for such tasks (with privacy, energy consumption and computation requirements as definite concerns). Basic IR range detection works too, but with increasing context complexity basic thresholding logic is bad. Implememting fuzzy, ANN turns complex with complexity again. Moreover hand those approaches do not consider memory(history) sequences in such tasks. Nupic does that well. Nupic is good at observing coincidences too(From HTM micro circuits / Maths behind HTM paper by Hawkins and George). The current framework of NUPIC is enough for such application development if we could tap well its capabilities. But all this works given the assumption that we could somehow localize the person in a room and observe his cordinates.

Bluetooth LE technology is low cost and energy efficienct connectivity range of 30-60 meters radius (could be Visibility rather connectivity not sure) and lasts for one year on a 1.5 V button cell. Meaning that its best suited for Indoor localiztion. Indoor localization using wireless networks is a big challenge. Use signal strength alone we predict the location of person wearing an electronic device which supports some wireless protocol. But signal signal strength alone is proved to be inconsistent. Additional information is needed. The signal strength values are quite erratic in nature. Its not just random it depends on environments. If environment is dynamic too then the rssi values we get are not trust worthy. Predicting the rssi values helps us to filter outlier values. Since nupic is good at detecting the coincidences, the coincidence of this rssi values from multiple sensors could develop constraints and invariant factors and predict accurately.

What it does

Locate user in an indoor environment. Outdoor environment should be less problematic because indoor environment are too dynamic which produces unpredictable rssi values.

How I built it

I chose light blue bean as the the ble-device. I detect four of these devices with in a room (while only three is enough, i prefer four for reliability and precision. I also believe in the fact more information better results).

I used my surface pro 3 accelerometer and magnetometer sensors for additional context (accelerometer - to judge if i am walking, magn3d - for magnetic north compass direction context. As i said more conincidences might lead to additional information and coincidences help prediction but could be over kill. May be few of those is enough. Intensive research on these will help us understand best factors to consider.) My coordinates change only when i walk. My walk is judge based on accelerometer. The anomaly for the walk/No-wald is detected using negation logic i.e. 'when i don't walk' context is used instead (since that's equally a good negation context). The magnetic compass plays two roles. The direction of walk which helps but more than that the our own physical body could affect rssi values (that could be great factor as far as i know)

Light blue beans will be in beacon mode (not sure if it can be called peripheral device from bluetooth context) and surface pro 3 will be a central device (surface comes with a bluetooth-LE module and could detect light blue bean devices)

Challenges I ran into

Had to hack surface sensors for additional context. Use ros for the opf. since opf does only thing at a time. The conituous polling of rssi values is not working as expected. It crashes after few values. It used to work but it stopped working after updating library.

Accomplishments that I'm proud of

I started working on this before 36 hours of submission deadline . So i am not expecting much from this, and i am quite happy with results. Note: I had to follow same cordinates (with gaussian noise around them is producing wrong results) during training because the co-occurrence of x and y in (x,y) should be at least follow gaussian if not unique. Walking through all coordinates make prediction of x given y more inaccurate. The solution is use four distances from each sensor. That was the plan, but i had to come up with something small for given time frame (personal time frame).

What I learned

Internal working of nupic is more easier and straight forward. Opf restricted me as guide says. But the shortest way to test the working.

In a time frame of two days i learnt a lot about nupic.

Feedback is necessary for outlier detection. A reference SDR to know that given input is outlier somehow is necessary to make it work efficiently.

What's next for NuLocale (Indoor localization using HTM)

Since localization should be done real time, use of feed back should help in reducing wrong prediction. I also want to go for network api for this and my personal reason to learn the api. nupic.research has more resource for nuparking project. GTM is also good to go for my project.

If this works i prefer to use it for NuParking project, which essentially relies on localization. NuParking is about drones or autonomous vehicles help us in parking lots.

May be next hackathon. I missed it this time because of many deadlines.

Built With

Share this project:

Updates