1. Smart Environments withSmart Environments with
WSN and Smart-M3WSN and Smart-M3
Irene DonatiIrene Donati
Luca FaggianelliLuca Faggianelli
Wireless Sensor Networks M - ProjectWireless Sensor Networks M - Project
2. Implementation of a Wireless Sensor Network forImplementation of a Wireless Sensor Network for
rooms temperature monitoring by using MC1322xrooms temperature monitoring by using MC1322x
family zigbee wireless nodes from Freescale.family zigbee wireless nodes from Freescale.
Data sharing with Smart-M3: interoperable semanticData sharing with Smart-M3: interoperable semantic
platform, graph based, from Nokia Research Centerplatform, graph based, from Nokia Research Center
Towards global smart governor for house managementTowards global smart governor for house management
* www.beautifullife.info/urban-design/smart-house-with-amazing-ability-to-transform/* www.beautifullife.info/urban-design/smart-house-with-amazing-ability-to-transform/
Project scopeProject scope
3. - J-Tag port and in-circuit hw debug- J-Tag port and in-circuit hw debug
- UART communication on USB- UART communication on USB
- Joystick, buttons and LEDs- Joystick, buttons and LEDs
- Battery or power supply- Battery or power supply
- MMA7260Q 3-axis accelerometer- MMA7260Q 3-axis accelerometer
- MPXV5010G pressure and temperature- MPXV5010G pressure and temperature
MC1322x FamilyMC1322x Family ARM basedARM based
microcontrollers. Onchip radiomicrocontrollers. Onchip radio
2.4GHz IEEE 802.15.4 compliant2.4GHz IEEE 802.15.4 compliant
Wireless Sensor NodesWireless Sensor Nodes
4. Smart-M3Smart-M3 is an open-source project that aims to provide a Semanticis an open-source project that aims to provide a Semantic
Web information sharing infrastructure between software entities and devices. ItWeb information sharing infrastructure between software entities and devices. It
combines the ideas of distributed, networked systems and semantic web. Thecombines the ideas of distributed, networked systems and semantic web. The
ultimate goal is to enable smart environments and linking of real and virtual worlds.ultimate goal is to enable smart environments and linking of real and virtual worlds.
““
””- Wikipedia- Wikipedia
Graph Store
Devices
Interoperability
Smart-M3 architectureSmart-M3 architecture
Smart Space
Agents
Smart-M3Smart-M3
Classic DB operationsClassic DB operations
++
SubscriptionSubscription systemsystem
on data removal andon data removal and
insertioninsertion
Physical devices
and software
services (web
applications, etc)
5. Graph StoreGraph Store
Graph Store
<Subj> <Predicate> <Object><Subj> <Predicate> <Object>
<Node> <Edge> <Node><Node> <Edge> <Node>
<Sue> <Listen> <Spotify><Sue> <Listen> <Spotify>
<Sue> <Cook> <Cookies><Sue> <Cook> <Cookies>
Data is organized inData is organized in
triplestriples notnot in tablesin tables
with columns and rows.with columns and rows.
Graphs are queried inGraphs are queried in
a language calleda language called
SPARQL.SPARQL.
NodeNode
EdgeEdge
6. Sensors deployedSensors deployed
all around theall around the
househouse
Sensors DeploymentSensors Deployment
Nodes are connected to theNodes are connected to the
coordinator in acoordinator in a star topologystar topology, due, due
to its simplicity and to the size of theto its simplicity and to the size of the
househouseCoordinatorCoordinator
8. Coordinator - M3 AgentCoordinator - M3 Agent
CoordinatorCoordinator
16bit Signed16bit Signed
Fixed PointFixed Point
1/100 precision1/100 precision
NumberNumber
of samplesof samples
MACMAC
OptionalOptional
XORXOR
M3 AgentM3 Agent
N(1)N(1) Device(8)Device(8) TEMP(1*N)TEMP(1*N) LRC(0-1)LRC(0-1)
MSGMSG
UART USB
START byte 0xFFSTART byte 0xFF
ESCAPE byte 0xEEESCAPE byte 0xEE
●
M3 Agent collects data from PANM3 Agent collects data from PAN
Coordinator over UARTCoordinator over UART
●
Python script with PySerialPython script with PySerial
●
HW requirements: USB/UART and TCPHW requirements: USB/UART and TCP
communication (e.g.: Raspberry PI ARMcommunication (e.g.: Raspberry PI ARM
based board)based board)
9. M3 Agent - Smart-M3M3 Agent - Smart-M3
●
M3 Agent communicates with Smart-M3 Agent communicates with Smart-
M3 through Python API (available inM3 through Python API (available in
JAVA, PHP, etc)JAVA, PHP, etc)
●
TCP communication, Smart-M3 mayTCP communication, Smart-M3 may
be anywherebe anywhere
M3 AgentM3 Agent
GraphGraph
TCP TCP
Smart-M3
Serialized in XML
with SSAP
protocol
12. Deductive ReasoningDeductive Reasoning
Sensor_456dcfSensor_456dcf
Room_1234Room_1234
Pool roomPool room
SensorData_123abcSensorData_123abc
25
““The Pool room has a temperature of 25°C”The Pool room has a temperature of 25°C”
This information has never been stated, it has been deducted by theThis information has never been stated, it has been deducted by the
Smart Environment!Smart Environment!
13. Sensor_456dcf
Room_1234
Pool room25
The two information come from different worlds: it's not
correct and not convenient to mix them.
SensorData_123abc
HasSensorData
Knowledge base and data separationKnowledge base and data separation
?
14. Init ScanActive AssociateScanActive
Wait Confirm
Associate
Wait Confirm
Listen
SendDataSendData
Data rateData rate
1 TX each1 TX each
N cyclesN cycles
Counter = 0
Counter = 0
127
127
255255
End Device State MachineEnd Device State Machine
TemperatureTemperature
simulated fromsimulated from
arrayarray
Tunable dataTunable data
aggregationaggregation
Data buffer andData buffer and
counter: 1B percounter: 1B per
sample.sample.
Used values:Used values:
●
11
●
1010
15. STARTSTART
Init
ScanED
Start
Start
Coord
ScanED
Wait Confirm
Start Coord
Wait Confirm
SerialMSG()SerialMSG()
Coordinator State MachineCoordinator State Machine
N(1)N(1) Device(8)Device(8) TEMP(1*N)TEMP(1*N)
Prepare thePrepare the MSGMSG
and send it overand send it over
UARTUART End Device (short)End Device (short)
addressesaddresses sequentiallysequentially
assigned, using aassigned, using a
countercounter
Listen
20. By increasing the value of BE_min from 0 to 3 :By increasing the value of BE_min from 0 to 3 :
●
the average delay of the transmission time increasesthe average delay of the transmission time increases
●
number of retransmissions decreasesnumber of retransmissions decreases
The average delay of transmission time doubles when passingThe average delay of transmission time doubles when passing
from TX frequency 1/127 (cycles of the state machine) tofrom TX frequency 1/127 (cycles of the state machine) to
1/255 (cycles of the state machine):1/255 (cycles of the state machine):
●
the delay introduced by the counter, used to manage thethe delay introduced by the counter, used to manage the
throughput , is not quantifiable. But since the average TX delaythroughput , is not quantifiable. But since the average TX delay
doubles when passing from a frequency throughput 1/127 todoubles when passing from a frequency throughput 1/127 to
1/225 (cycles of the state machine) we can assume that the1/225 (cycles of the state machine) we can assume that the
delay introduced by the counter is a constant parameterdelay introduced by the counter is a constant parameter
Experimental data analysis [1/2]Experimental data analysis [1/2]
21. The throughput is consistent to the model:The throughput is consistent to the model:
●
given the same frequency and packet size,given the same frequency and packet size,
decreasing BE_min the throughput is higher wrt to higher BE_mindecreasing BE_min the throughput is higher wrt to higher BE_min
Moreover we can see that it's more convenient to use dataMoreover we can see that it's more convenient to use data
aggregation. Since we get more measurements in less time and lessaggregation. Since we get more measurements in less time and less
TX packets which leads to energy saving.TX packets which leads to energy saving.
Experimental data analysis [2/2]Experimental data analysis [2/2]
We are not sure how to interpret the absence of re-TX for 10bytesWe are not sure how to interpret the absence of re-TX for 10bytes
data packets when 3 devices are TX anddata packets when 3 devices are TX and
No re-TX observed when using only 1ED, probably it is due to theNo re-TX observed when using only 1ED, probably it is due to the
delay added by the counter used to manage the throughput and todelay added by the counter used to manage the throughput and to
the counter for data aggregation,when presentthe counter for data aggregation,when present