SlideShare a Scribd company logo
1 of 33
Download to read offline
Joshua Shinavier


 Semantics and Sensors




Wednesday Nights in the Tetherless World (TWed)
            November 28th, 2012
Overview




•   intro to sensors

•   semantic sensor networks

•   components of an application

•   a demo




                       2
What is a sensor?



•   any device that measures a physical quantity

    •   e.g. temperature, pressure, electrical potential

•   more abstract quantities are sometimes measured by
    “sensors”

    •   e.g. the number of bicycles available at a bicycle
        sharing station

•   however, for our purposes...




                              3
Sensors look like this




           4
How do you talk to a sensor?


•   basic sensors produce simple analog or digital
    signals,

•   or use simple protocols such as I²C

•   they don’t understand HTTP

•   nor even TCP/IP

•   they need to be connected with a more general-
    purpose device

    •   e.g. a microcontroller



                                 5
OK, how do you talk to a microcontroller?

  •   concerns of low-power, low-resource devices

      •   constrained CPU and memory

      •   battery life, if battery-powered

      •   range, if wireless

  •   there are many solutions

      •   e.g. Constrained Application Protocol (CoaP)

          •   interoperates with HTTP

      •   here, we will use Open Sound Control (OSC)

          •   simple messaging format for multimedia devices

                                 6
Some interrelated concepts


    •   ubiquitous computing

    •   ambient intelligence

    •   perceptual intelligence

    •   Humanistic Intelligence

    •   wearable computers

    •   Internet of Things

    •   Web of Things




                  7
Some quantities we can measure with
              sensors




                 8
Simple physics



•   force / pressure
                               •   electrical potential,
•   strain / deformation           current

•   flex / bend                •   magnetic field strength

•   stretch                    •   flow of liquids and
                                   gases
•   linear displacement

•   angular displacement
                               •   etc. etc. etc.




                           9
The environment



•   air temperature

•   barometric pressure         •   ambient light level(s)

•   humidity                    •   ambient noise

•   dust and smoke level        •   ambient vibration

•   gas concentrations




                           10
Where you are, what’s around you




•   GPS position                   •   identified objects

•   compass heading                    •   (RFID, visual object
                                           recognition, etc.)
•   attitude, acceleration,
                                   •   distance and motion
    angular momentum

•   altitude                           •   (doppler,
                                           rangefinders)




                              11
Sensing yourself


•   respiratory rate           •   muscle activity (EMG)

•   heart rate / pulse         •   eye movement (EOG)

•   blood pressure             •   brain activity (EEG)

•   skin temperature           •   body position and
                                   movement
•   skin resistance and
    capacitance                •   facial expression...

•   perspiration               •   voice...




                          12
Common themes in semantic sensor
          networks




               13
Sources of sensor data and metadata


•   gathering sensor data from source x, e.g.

    •   sensor data from wireless networks

    •   sensor data from mobile phones

    •   citizen sensing

•   gathering sensor metadata

    •   through human input

    •   derived from raw measurements



                            14
Modeling and publication of sensor data



 •   ontological representation of sensor data

 •   sensor metadata as Linked Data

 •   integration of streaming sensor data with static
     metadata, web service APIs

 •   annotation of sensor data with quality measures

 •   publishing historical time series data




                             15
Applications of sensor data




•   complex event processing over sensor data streams

•   composition of sensor web APIs

•   ubiquitous computing applications

•   search over sensor data

•   stream reasoning over sensor data




                              16
Components of a semantic sensor
     network application




               17
Two kinds of sensor-based applications


 •   time-series applications

     •   sensors make observations at regular intervals

     •   e.g. air temperature sampled every minute, smoke
         level sampled every ten seconds

 •   event-driven applications

     •   sensors make observations in response to events

     •   e.g. movement detected via infrared or RFID,
         flipping of a switch, events of voice or gesture



                                18
Sensor network ontologies


•   Observations and Measurements model in OWL

    •   OGC Sensor Web Enablement Initiative

•   Semantic Sensor Network ontology

    •   W3C Semantic Sensor Network Incubator Group

•   OntoSensor ontology

    •   builds on SUMO and ISO 19115 (geo metadata)

•   there are many others



                            19
Modeling an observation

                  Sensor                       Place


                                                                           Feature
                                      location
                                                       featureOfInterest

                                Observation
                                                  observedProperty
                                                                             Property
                  samplingTime           result


           Interval                            ResultData


                 hasEnd                        value         uom
  hasBeginning


Instant               Instant          (numeric)             UnitOfMeasurement



                                          20
Some options for RDF streams



•   SPARQL 1.1 Update

•   SparqlPuSH

    •   SPARQL + pubsubhubbub

•   RDFAgents

    •   provenance chains via Named Graphs

•   roll your own




                           21
Continuous SPARQL


•   typically, SPARQL is used to query for historical data

•   continuous SPARQL queries for future data

    •   first submit the query, then wait for matching data

    •   as matching data arrives, answers are produced

•   continuous SPARQL languages and frameworks:

    •   C-SPARQL, SPARQLstream, EP-SPARQL,
        StreamingSPARQL, Groppe et al.’s, INSTANS, ...




                             22
Demo: the Monitron

                            humidity and
                            temperature
                              sensor

             barometric                 optical dust
          pressure sensor                detector
 RGB
 LED

                            Omnisensory                          host
                             Monitron                          computer
speaker

         electret
       microphone                                 PIR motion
                              color light           sensor
                               sensor
          piezo vibration
              sensor                        photoresistor




                                 23
Monitron architecture
•   Arduino Nano + multiple sensors

•   sensors are sampled continuously in a cycle

    •   samples are aggregated, observations made at
        regular intervals

•   observations and error messages are sent to a host
    computer as OSC messages

•   host computer may send commands to the Monitron

•   a process on the host computer rdfizes received
    observations,

    •   adding them to an RDF stream using RDFAgents

    •   each observation is contained in an RDF graph
                            24
Step #1: build the device



•   order parts

•   snip wires

•   solder here

•   heat-shrink there

•   done!




                        25
Step #2: write the firmware

   •   the output of the device looks like:

/om/system/time 1753A23
/om/sensor/7bb206l0/vibr 1753A23 1754CEE 10000 0.003 0.022 0.021 0.000000
/om/sensor/md9745apzf/sound 1753A23 1754CEE 10000 0.254 0.792 0.507 0.001740
/om/sensor/photo/light 1753A23 1754CEE 10000 0.561 0.567 0.565 0.000020
/om/sensor/rht03/humid 1754CFC 1754D03 1 0.490 0.490 0.490 0.000000
/om/sensor/rht03/temp 1754CFC 1754D03 1 1.000 22.600 22.600 0.000000
/om/sensor/bmp085/press 1754D0B 1754D17 1 1.000 101209.000 101209.000 0.000000
/om/sensor/bmp085/temp 1754D0B 1754D17 1 1.000 23.500 23.500 0.000000
/om/sensor/gp2y1010au0f/dust 1754D1F 1754D29 1 0.160 0.160 0.160 0.000000
/om/sensor/se10/motion 1753A23 1754D2E 1 0



   •   for each observation:

       •   sensor id, time interval, #samples, min val, max
           val, mean, variance


                                      26
Step #3: extend the sensor ontology




•   you need classes for the
    specific sensors of your device

•   each one produces a different
    kind of observation

•   with different units of
    measurement




                               27
Step #4: describe your sensors

    •    each sensor is an instance of a Sensor subclass

    •    a device contains more than one sensor if it measures
         more than one quantity (e.g. temperature + pressure)

:avago-adjd-s311-cr999_1 a m:ColorLightLevelSensor ;
   rdfs:label "color light level sensor of Monitron #1" ;
   rdfs:comment "an Avago Technologies ADJD-S311-CR999 miniature surface mount RGB digital
color sensor which has been calibrated to output red, green, and blue color values from 0 to 1" .

:bosch-bmp085_1_thermometer a m:Thermometer ;
   rdfs:label "thermometer #1 of Monitron #1" ;
   rdfs:comment "a Bosch BMP085 digital (barometric) pressure sensor which has been calibrated
to output temperature values in degrees Celsius" .

:bosch-bmp085_1_barometer a m:Barometer ;
   rdfs:label "barometer of Monitron #1" ;
   rdfs:comment "a Bosch BMP085 digital (barometric) pressure sensor which has been calibrated
to output pressure values in pascals" .

                                               28
Step #5: add programming logic
•   what should the host computer do when it receives a
    “coffeepot half full” observation?

•   each type of observation must be translated in a
    slightly different way

•   a class hierarchy in Java works nicely




                            29
Step #6: start streaming
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix monitron: <http://fortytwo.net/2012/08/monitron#> .
@prefix om: <http://schemas.opengis.net/om/2.0/> .
@prefix time: <http://www.w3.org/2006/time#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://fortytwo.net/2012/08/universe#> .

:event-UXhu5B5
   om:Procedure :bosch-bmp085_1_thermometer ;
   om:featureOfInterest :room_1 ;
   om:observationLocation :room_1 ;
   om:observedProperty monitron:airTemperature ;
   om:result [
     om:uom monitron:degreesCelsius ;
     om:value 23.3 ;
     a om:ResultData] ;
   om:samplingTime [
     a time:Interval ;
     time:hasBeginning [
        a time:Instant ;
        time:inXSDDateTime "2012-11-28T07:50:06.132-05:00"^^xsd:dateTime] ;
     time:hasEnd [
        a time:Instant ;
        time:inXSDDateTime "2012-11-28T07:50:06.145-05:00"^^xsd:dateTime]] ;
   a monitron:AirTemperatureObservation .
                                           30
Step #7: submit a continuous query

PREFIX   :      <http://fortytwo.net/2012/08/universe#>
PREFIX   m:     <http://fortytwo.net/2012/08/monitron#>
PREFIX   om:    <http://schemas.opengis.net/om/2.0/>
PREFIX   rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-
ns#>

SELECT ?result ?value WHERE {

    ?obs rdf:type m:VibrationLevelObservation .

    ?obs om:result ?result .
    ?result om:value ?value .

    ?obs om:observationLocation ?loc .
    ?loc m:containedIn :winslowBuilding .
}

                               31
Step #8: receive results
         subscribers




         RDFAgents


            host
          computer


            OSC



           Monitron



             I²C,
             etc.



           sensors


              32
Thanks!


•   Tetherless World Constellation:

    •   http://tw.rpi.edu

•   Code:

    •   https://github.com/joshsh/laboratory

•   Contact:

    •   josh@fortytwo.net, @joshsh




                    33

More Related Content

Viewers also liked

Nevro net призыв к действию август 13
Nevro net   призыв к действию август 13Nevro net   призыв к действию август 13
Nevro net призыв к действию август 13Shchoukine Timour
 
Neuroweb presentation Oct13 v2
Neuroweb presentation Oct13 v2Neuroweb presentation Oct13 v2
Neuroweb presentation Oct13 v2Shchoukine Timour
 
приложение 4. российские лаборатории в области нейроэлектроники и нкт
приложение 4. российские лаборатории в области нейроэлектроники и нктприложение 4. российские лаборатории в области нейроэлектроники и нкт
приложение 4. российские лаборатории в области нейроэлектроники и нктShchoukine Timour
 
форсайт нейронета постановка
форсайт нейронета   постановкафорсайт нейронета   постановка
форсайт нейронета постановкаShchoukine Timour
 
приложение в. учёные в области нейроэлектроники и нкт
приложение в. учёные в области нейроэлектроники и нктприложение в. учёные в области нейроэлектроники и нкт
приложение в. учёные в области нейроэлектроники и нктShchoukine Timour
 
Analyz sostoyanoya i dinamiki mirovogo ryinka neirotehnologyi
Analyz sostoyanoya i dinamiki mirovogo ryinka neirotehnologyiAnalyz sostoyanoya i dinamiki mirovogo ryinka neirotehnologyi
Analyz sostoyanoya i dinamiki mirovogo ryinka neirotehnologyiShchoukine Timour
 
Nevro net call for action en july30th
Nevro net   call for action en july30thNevro net   call for action en july30th
Nevro net call for action en july30thShchoukine Timour
 
Neuro web foresight en vfeb2014 eng
Neuro web foresight en vfeb2014 engNeuro web foresight en vfeb2014 eng
Neuro web foresight en vfeb2014 engShchoukine Timour
 
NeuroWeb Foresight Results vMar2014 (Russian version)
NeuroWeb Foresight Results vMar2014 (Russian version)NeuroWeb Foresight Results vMar2014 (Russian version)
NeuroWeb Foresight Results vMar2014 (Russian version)Pavel Luksha
 
В.Алейник -- системные подходы П.Чекланда и Г.П.Щедровицкого
В.Алейник -- системные подходы П.Чекланда и Г.П.ЩедровицкогоВ.Алейник -- системные подходы П.Чекланда и Г.П.Щедровицкого
В.Алейник -- системные подходы П.Чекланда и Г.П.ЩедровицкогоAnatoly Levenchuk
 
Federating efforts towards a thrivable world
Federating efforts towards a thrivable worldFederating efforts towards a thrivable world
Federating efforts towards a thrivable worldHelene Finidori
 

Viewers also liked (13)

Nevro net призыв к действию август 13
Nevro net   призыв к действию август 13Nevro net   призыв к действию август 13
Nevro net призыв к действию август 13
 
Neuroweb presentation Oct13 v2
Neuroweb presentation Oct13 v2Neuroweb presentation Oct13 v2
Neuroweb presentation Oct13 v2
 
Neuroweb Feb2014 rus
Neuroweb Feb2014 rusNeuroweb Feb2014 rus
Neuroweb Feb2014 rus
 
Ws 26 5plus
Ws 26 5plusWs 26 5plus
Ws 26 5plus
 
приложение 4. российские лаборатории в области нейроэлектроники и нкт
приложение 4. российские лаборатории в области нейроэлектроники и нктприложение 4. российские лаборатории в области нейроэлектроники и нкт
приложение 4. российские лаборатории в области нейроэлектроники и нкт
 
форсайт нейронета постановка
форсайт нейронета   постановкафорсайт нейронета   постановка
форсайт нейронета постановка
 
приложение в. учёные в области нейроэлектроники и нкт
приложение в. учёные в области нейроэлектроники и нктприложение в. учёные в области нейроэлектроники и нкт
приложение в. учёные в области нейроэлектроники и нкт
 
Analyz sostoyanoya i dinamiki mirovogo ryinka neirotehnologyi
Analyz sostoyanoya i dinamiki mirovogo ryinka neirotehnologyiAnalyz sostoyanoya i dinamiki mirovogo ryinka neirotehnologyi
Analyz sostoyanoya i dinamiki mirovogo ryinka neirotehnologyi
 
Nevro net call for action en july30th
Nevro net   call for action en july30thNevro net   call for action en july30th
Nevro net call for action en july30th
 
Neuro web foresight en vfeb2014 eng
Neuro web foresight en vfeb2014 engNeuro web foresight en vfeb2014 eng
Neuro web foresight en vfeb2014 eng
 
NeuroWeb Foresight Results vMar2014 (Russian version)
NeuroWeb Foresight Results vMar2014 (Russian version)NeuroWeb Foresight Results vMar2014 (Russian version)
NeuroWeb Foresight Results vMar2014 (Russian version)
 
В.Алейник -- системные подходы П.Чекланда и Г.П.Щедровицкого
В.Алейник -- системные подходы П.Чекланда и Г.П.ЩедровицкогоВ.Алейник -- системные подходы П.Чекланда и Г.П.Щедровицкого
В.Алейник -- системные подходы П.Чекланда и Г.П.Щедровицкого
 
Federating efforts towards a thrivable world
Federating efforts towards a thrivable worldFederating efforts towards a thrivable world
Federating efforts towards a thrivable world
 

Similar to Semantics and Sensors

Sensors on android
Sensors on androidSensors on android
Sensors on androidChinmay V S
 
Iit kgp workshop
Iit kgp workshopIit kgp workshop
Iit kgp workshopArpan Pal
 
Autonomous robotics based on simple sensor inputs.
Autonomous robotics based on simplesensor inputs.Autonomous robotics based on simplesensor inputs.
Autonomous robotics based on simple sensor inputs. sathish sak
 
Self-aware and Self-expressive Active Music Systems
Self-aware and Self-expressive Active Music SystemsSelf-aware and Self-expressive Active Music Systems
Self-aware and Self-expressive Active Music Systemsawarenessproject
 
MIPI DevCon 2016: Mobile User Interface Aggregation for Heterogeneous Compute...
MIPI DevCon 2016: Mobile User Interface Aggregation for Heterogeneous Compute...MIPI DevCon 2016: Mobile User Interface Aggregation for Heterogeneous Compute...
MIPI DevCon 2016: Mobile User Interface Aggregation for Heterogeneous Compute...MIPI Alliance
 
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14Samarth Shah
 
3 Sensing and Sensors.ppt
3 Sensing and Sensors.ppt3 Sensing and Sensors.ppt
3 Sensing and Sensors.pptAbhishek597701
 
IoT BASED SMART HOME USING ARDUINO
IoT BASED SMART HOME USING ARDUINOIoT BASED SMART HOME USING ARDUINO
IoT BASED SMART HOME USING ARDUINOAYSHA S KABEER
 
Floweather, environment monitoring system based on sensor networks — 2010
Floweather, environment monitoring system based on sensor networks — 2010Floweather, environment monitoring system based on sensor networks — 2010
Floweather, environment monitoring system based on sensor networks — 2010Domenico Schillaci
 
Intelligent sensor networks 15 11-2016
Intelligent sensor networks 15 11-2016Intelligent sensor networks 15 11-2016
Intelligent sensor networks 15 11-2016Ron van Dooren
 
COMP 4010 Lecture6 - Virtual Reality Input Devices
COMP 4010 Lecture6 - Virtual Reality Input DevicesCOMP 4010 Lecture6 - Virtual Reality Input Devices
COMP 4010 Lecture6 - Virtual Reality Input DevicesMark Billinghurst
 
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...RADIO6ENSE Srl
 
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...Cecilia Occhiuzzi
 
1693579833307_Sensors.ppt
1693579833307_Sensors.ppt1693579833307_Sensors.ppt
1693579833307_Sensors.pptPrabhaCB1
 
COMP 4010 - Lecture 3 VR Systems
COMP 4010 - Lecture 3 VR SystemsCOMP 4010 - Lecture 3 VR Systems
COMP 4010 - Lecture 3 VR SystemsMark Billinghurst
 

Similar to Semantics and Sensors (20)

Lecture3 - VR Technology
Lecture3 - VR TechnologyLecture3 - VR Technology
Lecture3 - VR Technology
 
Sensors on android
Sensors on androidSensors on android
Sensors on android
 
Senslab - open hardware - fossa2010
Senslab - open hardware - fossa2010Senslab - open hardware - fossa2010
Senslab - open hardware - fossa2010
 
Iit kgp workshop
Iit kgp workshopIit kgp workshop
Iit kgp workshop
 
Autonomous robotics based on simple sensor inputs.
Autonomous robotics based on simplesensor inputs.Autonomous robotics based on simplesensor inputs.
Autonomous robotics based on simple sensor inputs.
 
Self-aware and Self-expressive Active Music Systems
Self-aware and Self-expressive Active Music SystemsSelf-aware and Self-expressive Active Music Systems
Self-aware and Self-expressive Active Music Systems
 
Self-aware and Self-expressive Active Music Systems
Self-aware and Self-expressive Active Music SystemsSelf-aware and Self-expressive Active Music Systems
Self-aware and Self-expressive Active Music Systems
 
MIPI DevCon 2016: Mobile User Interface Aggregation for Heterogeneous Compute...
MIPI DevCon 2016: Mobile User Interface Aggregation for Heterogeneous Compute...MIPI DevCon 2016: Mobile User Interface Aggregation for Heterogeneous Compute...
MIPI DevCon 2016: Mobile User Interface Aggregation for Heterogeneous Compute...
 
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14
Futuristic World with Sensors and Smart Devices [ Electronics Rocks'14
 
3 Sensing and Sensors.ppt
3 Sensing and Sensors.ppt3 Sensing and Sensors.ppt
3 Sensing and Sensors.ppt
 
IoT BASED SMART HOME USING ARDUINO
IoT BASED SMART HOME USING ARDUINOIoT BASED SMART HOME USING ARDUINO
IoT BASED SMART HOME USING ARDUINO
 
Floweather, environment monitoring system based on sensor networks — 2010
Floweather, environment monitoring system based on sensor networks — 2010Floweather, environment monitoring system based on sensor networks — 2010
Floweather, environment monitoring system based on sensor networks — 2010
 
Intelligent sensor networks 15 11-2016
Intelligent sensor networks 15 11-2016Intelligent sensor networks 15 11-2016
Intelligent sensor networks 15 11-2016
 
COMP 4010 Lecture6 - Virtual Reality Input Devices
COMP 4010 Lecture6 - Virtual Reality Input DevicesCOMP 4010 Lecture6 - Virtual Reality Input Devices
COMP 4010 Lecture6 - Virtual Reality Input Devices
 
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...
 
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...
Wireless Sensing by Passive Radiofrequency Identification: Research, Systems ...
 
0 b0k73f kxjbk1txc5q3jmvdjhymm
0 b0k73f kxjbk1txc5q3jmvdjhymm0 b0k73f kxjbk1txc5q3jmvdjhymm
0 b0k73f kxjbk1txc5q3jmvdjhymm
 
5756139.ppt
5756139.ppt5756139.ppt
5756139.ppt
 
1693579833307_Sensors.ppt
1693579833307_Sensors.ppt1693579833307_Sensors.ppt
1693579833307_Sensors.ppt
 
COMP 4010 - Lecture 3 VR Systems
COMP 4010 - Lecture 3 VR SystemsCOMP 4010 - Lecture 3 VR Systems
COMP 4010 - Lecture 3 VR Systems
 

More from Joshua Shinavier

Transpilers Gone Wild: Introducing Hydra
Transpilers Gone Wild: Introducing HydraTranspilers Gone Wild: Introducing Hydra
Transpilers Gone Wild: Introducing HydraJoshua Shinavier
 
An Algebraic Data Model for Graphs and Hypergraphs (Category Theory meetup, N...
An Algebraic Data Model for Graphs and Hypergraphs (Category Theory meetup, N...An Algebraic Data Model for Graphs and Hypergraphs (Category Theory meetup, N...
An Algebraic Data Model for Graphs and Hypergraphs (Category Theory meetup, N...Joshua Shinavier
 
In Search of the Universal Data Model (ISWC 2019 Minute Madness)
In Search of the Universal Data Model (ISWC 2019 Minute Madness)In Search of the Universal Data Model (ISWC 2019 Minute Madness)
In Search of the Universal Data Model (ISWC 2019 Minute Madness)Joshua Shinavier
 
In Search of the Universal Data Model (Connected Data London 2019)
In Search of the Universal Data Model (Connected Data London 2019)In Search of the Universal Data Model (Connected Data London 2019)
In Search of the Universal Data Model (Connected Data London 2019)Joshua Shinavier
 
Algebraic Property Graphs (GQL Community Update, oct. 9, 2019)
Algebraic Property Graphs (GQL Community Update, oct. 9, 2019)Algebraic Property Graphs (GQL Community Update, oct. 9, 2019)
Algebraic Property Graphs (GQL Community Update, oct. 9, 2019)Joshua Shinavier
 
Building an Enterprise Knowledge Graph @Uber: Lessons from Reality
Building an Enterprise Knowledge Graph @Uber: Lessons from RealityBuilding an Enterprise Knowledge Graph @Uber: Lessons from Reality
Building an Enterprise Knowledge Graph @Uber: Lessons from RealityJoshua Shinavier
 
A Graph is a Graph is a Graph: Equivalence, Transformation, and Composition o...
A Graph is a Graph is a Graph: Equivalence, Transformation, and Composition o...A Graph is a Graph is a Graph: Equivalence, Transformation, and Composition o...
A Graph is a Graph is a Graph: Equivalence, Transformation, and Composition o...Joshua Shinavier
 
Evolution of the Graph Schema
Evolution of the Graph SchemaEvolution of the Graph Schema
Evolution of the Graph SchemaJoshua Shinavier
 
TinkerPop: a story of graphs, DBs, and graph DBs
TinkerPop: a story of graphs, DBs, and graph DBsTinkerPop: a story of graphs, DBs, and graph DBs
TinkerPop: a story of graphs, DBs, and graph DBsJoshua Shinavier
 
semantic markup using schema.org
semantic markup using schema.orgsemantic markup using schema.org
semantic markup using schema.orgJoshua Shinavier
 
The Real-time Web in the Age of Agents
The Real-time Web in the Age of AgentsThe Real-time Web in the Age of Agents
The Real-time Web in the Age of AgentsJoshua Shinavier
 
Real-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter AnnotationsReal-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter AnnotationsJoshua Shinavier
 
Real-time #SemanticWeb in 140 chars
Real-time #SemanticWeb in 140 charsReal-time #SemanticWeb in 140 chars
Real-time #SemanticWeb in 140 charsJoshua Shinavier
 
The state of the art in Linked Data
The state of the art in Linked DataThe state of the art in Linked Data
The state of the art in Linked DataJoshua Shinavier
 

More from Joshua Shinavier (17)

Anything-to-Graph
Anything-to-GraphAnything-to-Graph
Anything-to-Graph
 
Transpilers Gone Wild: Introducing Hydra
Transpilers Gone Wild: Introducing HydraTranspilers Gone Wild: Introducing Hydra
Transpilers Gone Wild: Introducing Hydra
 
TinkerPop 2020
TinkerPop 2020TinkerPop 2020
TinkerPop 2020
 
An Algebraic Data Model for Graphs and Hypergraphs (Category Theory meetup, N...
An Algebraic Data Model for Graphs and Hypergraphs (Category Theory meetup, N...An Algebraic Data Model for Graphs and Hypergraphs (Category Theory meetup, N...
An Algebraic Data Model for Graphs and Hypergraphs (Category Theory meetup, N...
 
In Search of the Universal Data Model (ISWC 2019 Minute Madness)
In Search of the Universal Data Model (ISWC 2019 Minute Madness)In Search of the Universal Data Model (ISWC 2019 Minute Madness)
In Search of the Universal Data Model (ISWC 2019 Minute Madness)
 
In Search of the Universal Data Model (Connected Data London 2019)
In Search of the Universal Data Model (Connected Data London 2019)In Search of the Universal Data Model (Connected Data London 2019)
In Search of the Universal Data Model (Connected Data London 2019)
 
Algebraic Property Graphs (GQL Community Update, oct. 9, 2019)
Algebraic Property Graphs (GQL Community Update, oct. 9, 2019)Algebraic Property Graphs (GQL Community Update, oct. 9, 2019)
Algebraic Property Graphs (GQL Community Update, oct. 9, 2019)
 
Building an Enterprise Knowledge Graph @Uber: Lessons from Reality
Building an Enterprise Knowledge Graph @Uber: Lessons from RealityBuilding an Enterprise Knowledge Graph @Uber: Lessons from Reality
Building an Enterprise Knowledge Graph @Uber: Lessons from Reality
 
A Graph is a Graph is a Graph: Equivalence, Transformation, and Composition o...
A Graph is a Graph is a Graph: Equivalence, Transformation, and Composition o...A Graph is a Graph is a Graph: Equivalence, Transformation, and Composition o...
A Graph is a Graph is a Graph: Equivalence, Transformation, and Composition o...
 
Evolution of the Graph Schema
Evolution of the Graph SchemaEvolution of the Graph Schema
Evolution of the Graph Schema
 
TinkerPop: a story of graphs, DBs, and graph DBs
TinkerPop: a story of graphs, DBs, and graph DBsTinkerPop: a story of graphs, DBs, and graph DBs
TinkerPop: a story of graphs, DBs, and graph DBs
 
semantic markup using schema.org
semantic markup using schema.orgsemantic markup using schema.org
semantic markup using schema.org
 
The Real-time Web in the Age of Agents
The Real-time Web in the Age of AgentsThe Real-time Web in the Age of Agents
The Real-time Web in the Age of Agents
 
Linked Process
Linked ProcessLinked Process
Linked Process
 
Real-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter AnnotationsReal-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter Annotations
 
Real-time #SemanticWeb in 140 chars
Real-time #SemanticWeb in 140 charsReal-time #SemanticWeb in 140 chars
Real-time #SemanticWeb in 140 chars
 
The state of the art in Linked Data
The state of the art in Linked DataThe state of the art in Linked Data
The state of the art in Linked Data
 

Semantics and Sensors

  • 1. Joshua Shinavier Semantics and Sensors Wednesday Nights in the Tetherless World (TWed) November 28th, 2012
  • 2. Overview • intro to sensors • semantic sensor networks • components of an application • a demo 2
  • 3. What is a sensor? • any device that measures a physical quantity • e.g. temperature, pressure, electrical potential • more abstract quantities are sometimes measured by “sensors” • e.g. the number of bicycles available at a bicycle sharing station • however, for our purposes... 3
  • 5. How do you talk to a sensor? • basic sensors produce simple analog or digital signals, • or use simple protocols such as I²C • they don’t understand HTTP • nor even TCP/IP • they need to be connected with a more general- purpose device • e.g. a microcontroller 5
  • 6. OK, how do you talk to a microcontroller? • concerns of low-power, low-resource devices • constrained CPU and memory • battery life, if battery-powered • range, if wireless • there are many solutions • e.g. Constrained Application Protocol (CoaP) • interoperates with HTTP • here, we will use Open Sound Control (OSC) • simple messaging format for multimedia devices 6
  • 7. Some interrelated concepts • ubiquitous computing • ambient intelligence • perceptual intelligence • Humanistic Intelligence • wearable computers • Internet of Things • Web of Things 7
  • 8. Some quantities we can measure with sensors 8
  • 9. Simple physics • force / pressure • electrical potential, • strain / deformation current • flex / bend • magnetic field strength • stretch • flow of liquids and gases • linear displacement • angular displacement • etc. etc. etc. 9
  • 10. The environment • air temperature • barometric pressure • ambient light level(s) • humidity • ambient noise • dust and smoke level • ambient vibration • gas concentrations 10
  • 11. Where you are, what’s around you • GPS position • identified objects • compass heading • (RFID, visual object recognition, etc.) • attitude, acceleration, • distance and motion angular momentum • altitude • (doppler, rangefinders) 11
  • 12. Sensing yourself • respiratory rate • muscle activity (EMG) • heart rate / pulse • eye movement (EOG) • blood pressure • brain activity (EEG) • skin temperature • body position and movement • skin resistance and capacitance • facial expression... • perspiration • voice... 12
  • 13. Common themes in semantic sensor networks 13
  • 14. Sources of sensor data and metadata • gathering sensor data from source x, e.g. • sensor data from wireless networks • sensor data from mobile phones • citizen sensing • gathering sensor metadata • through human input • derived from raw measurements 14
  • 15. Modeling and publication of sensor data • ontological representation of sensor data • sensor metadata as Linked Data • integration of streaming sensor data with static metadata, web service APIs • annotation of sensor data with quality measures • publishing historical time series data 15
  • 16. Applications of sensor data • complex event processing over sensor data streams • composition of sensor web APIs • ubiquitous computing applications • search over sensor data • stream reasoning over sensor data 16
  • 17. Components of a semantic sensor network application 17
  • 18. Two kinds of sensor-based applications • time-series applications • sensors make observations at regular intervals • e.g. air temperature sampled every minute, smoke level sampled every ten seconds • event-driven applications • sensors make observations in response to events • e.g. movement detected via infrared or RFID, flipping of a switch, events of voice or gesture 18
  • 19. Sensor network ontologies • Observations and Measurements model in OWL • OGC Sensor Web Enablement Initiative • Semantic Sensor Network ontology • W3C Semantic Sensor Network Incubator Group • OntoSensor ontology • builds on SUMO and ISO 19115 (geo metadata) • there are many others 19
  • 20. Modeling an observation Sensor Place Feature location featureOfInterest Observation observedProperty Property samplingTime result Interval ResultData hasEnd value uom hasBeginning Instant Instant (numeric) UnitOfMeasurement 20
  • 21. Some options for RDF streams • SPARQL 1.1 Update • SparqlPuSH • SPARQL + pubsubhubbub • RDFAgents • provenance chains via Named Graphs • roll your own 21
  • 22. Continuous SPARQL • typically, SPARQL is used to query for historical data • continuous SPARQL queries for future data • first submit the query, then wait for matching data • as matching data arrives, answers are produced • continuous SPARQL languages and frameworks: • C-SPARQL, SPARQLstream, EP-SPARQL, StreamingSPARQL, Groppe et al.’s, INSTANS, ... 22
  • 23. Demo: the Monitron humidity and temperature sensor barometric optical dust pressure sensor detector RGB LED Omnisensory host Monitron computer speaker electret microphone PIR motion color light sensor sensor piezo vibration sensor photoresistor 23
  • 24. Monitron architecture • Arduino Nano + multiple sensors • sensors are sampled continuously in a cycle • samples are aggregated, observations made at regular intervals • observations and error messages are sent to a host computer as OSC messages • host computer may send commands to the Monitron • a process on the host computer rdfizes received observations, • adding them to an RDF stream using RDFAgents • each observation is contained in an RDF graph 24
  • 25. Step #1: build the device • order parts • snip wires • solder here • heat-shrink there • done! 25
  • 26. Step #2: write the firmware • the output of the device looks like: /om/system/time 1753A23 /om/sensor/7bb206l0/vibr 1753A23 1754CEE 10000 0.003 0.022 0.021 0.000000 /om/sensor/md9745apzf/sound 1753A23 1754CEE 10000 0.254 0.792 0.507 0.001740 /om/sensor/photo/light 1753A23 1754CEE 10000 0.561 0.567 0.565 0.000020 /om/sensor/rht03/humid 1754CFC 1754D03 1 0.490 0.490 0.490 0.000000 /om/sensor/rht03/temp 1754CFC 1754D03 1 1.000 22.600 22.600 0.000000 /om/sensor/bmp085/press 1754D0B 1754D17 1 1.000 101209.000 101209.000 0.000000 /om/sensor/bmp085/temp 1754D0B 1754D17 1 1.000 23.500 23.500 0.000000 /om/sensor/gp2y1010au0f/dust 1754D1F 1754D29 1 0.160 0.160 0.160 0.000000 /om/sensor/se10/motion 1753A23 1754D2E 1 0 • for each observation: • sensor id, time interval, #samples, min val, max val, mean, variance 26
  • 27. Step #3: extend the sensor ontology • you need classes for the specific sensors of your device • each one produces a different kind of observation • with different units of measurement 27
  • 28. Step #4: describe your sensors • each sensor is an instance of a Sensor subclass • a device contains more than one sensor if it measures more than one quantity (e.g. temperature + pressure) :avago-adjd-s311-cr999_1 a m:ColorLightLevelSensor ; rdfs:label "color light level sensor of Monitron #1" ; rdfs:comment "an Avago Technologies ADJD-S311-CR999 miniature surface mount RGB digital color sensor which has been calibrated to output red, green, and blue color values from 0 to 1" . :bosch-bmp085_1_thermometer a m:Thermometer ; rdfs:label "thermometer #1 of Monitron #1" ; rdfs:comment "a Bosch BMP085 digital (barometric) pressure sensor which has been calibrated to output temperature values in degrees Celsius" . :bosch-bmp085_1_barometer a m:Barometer ; rdfs:label "barometer of Monitron #1" ; rdfs:comment "a Bosch BMP085 digital (barometric) pressure sensor which has been calibrated to output pressure values in pascals" . 28
  • 29. Step #5: add programming logic • what should the host computer do when it receives a “coffeepot half full” observation? • each type of observation must be translated in a slightly different way • a class hierarchy in Java works nicely 29
  • 30. Step #6: start streaming @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix monitron: <http://fortytwo.net/2012/08/monitron#> . @prefix om: <http://schemas.opengis.net/om/2.0/> . @prefix time: <http://www.w3.org/2006/time#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix : <http://fortytwo.net/2012/08/universe#> . :event-UXhu5B5 om:Procedure :bosch-bmp085_1_thermometer ; om:featureOfInterest :room_1 ; om:observationLocation :room_1 ; om:observedProperty monitron:airTemperature ; om:result [ om:uom monitron:degreesCelsius ; om:value 23.3 ; a om:ResultData] ; om:samplingTime [ a time:Interval ; time:hasBeginning [ a time:Instant ; time:inXSDDateTime "2012-11-28T07:50:06.132-05:00"^^xsd:dateTime] ; time:hasEnd [ a time:Instant ; time:inXSDDateTime "2012-11-28T07:50:06.145-05:00"^^xsd:dateTime]] ; a monitron:AirTemperatureObservation . 30
  • 31. Step #7: submit a continuous query PREFIX : <http://fortytwo.net/2012/08/universe#> PREFIX m: <http://fortytwo.net/2012/08/monitron#> PREFIX om: <http://schemas.opengis.net/om/2.0/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax- ns#> SELECT ?result ?value WHERE { ?obs rdf:type m:VibrationLevelObservation . ?obs om:result ?result . ?result om:value ?value . ?obs om:observationLocation ?loc . ?loc m:containedIn :winslowBuilding . } 31
  • 32. Step #8: receive results subscribers RDFAgents host computer OSC Monitron I²C, etc. sensors 32
  • 33. Thanks! • Tetherless World Constellation: • http://tw.rpi.edu • Code: • https://github.com/joshsh/laboratory • Contact: • josh@fortytwo.net, @joshsh 33