Semantic Reasoning and Verification for Ambient Assisted Living
Thibaut Tiberghien, Mounir Mokhtari, Liu Yan & Dong Jin Song
- FSFMA 2014
2nd French Singaporean Workshop on Formal Methods and Applications 13 May 2014, Singapore
Semantic Reasoning and Verification for Ambient Assisted Living - - PowerPoint PPT Presentation
Semantic Reasoning and Verification for Ambient Assisted Living Thibaut Tiberghien, Mounir Mokhtari, Liu Yan & Dong Jin Song FSFMA 2014 2nd French Singaporean Workshop on Formal Methods and Applications 13 May 2014, Singapore
Thibaut Tiberghien, Mounir Mokhtari, Liu Yan & Dong Jin Song
2nd French Singaporean Workshop on Formal Methods and Applications 13 May 2014, Singapore
2
2010
10 20 30 40 50 60 70 80
Males Females
2050
10 20 30 40 50 60 70 80
Males Females 0% 2% 4% 6% 2% 4% 6% 0% 2% 4% 6% 2% 4% 6% Age Age
3
* United Nations, World Population Prospects: The 2010 Revision. http://esa.un.org/unpd/ wpp/index.htm
4
* Resident Old-Age Support Ratio. Department of Statistics Singapore. http://www.singstat.gov.sg
5
* Dr. Philip Yap, Khoo Teck Puat Hospital, Singapore
Number of frail elderly
5000 15000 25000 35000 45000 2000 2010 2020 2030
6
7
« Sensor prototyping » « Micro context acquisition » « Context awareness » « Reasoning techniques » « Modelling » « Service platform » « User interface plasticity » « Human factors »
« Rules verification » « Information consistency » « Wireless communication » « Discovery protocols » « Privacy »
8
« Sensor prototyping » « Micro context acquisition » « Context awareness » « Reasoning techniques » « Modelling » « Service platform » « User interface plasticity » « Human factors »
« Rules verification » « Information consistency » « Wireless communication » « Discovery protocols » « Privacy » collaboration with Liu Yan, Dong Jin Song, NUS (PAT)
9
10
11
12
Legend
datatypeProperty
Class
subClassOf
stageForAlert isAlone inRoomSince inRoomFor doesActivitySince doesActivityFor
Resident
liveIn/detectedIn/cameFrom
motionMeasured
Environment
lastUsed
Object
hasValue lastUpdate hasLastUpdate
Sensor
indicateLocation indicateUse
SensorState Furniture Door SensorType House Room Outside Bedroom Bathroom Livingroom Kitchen Toilet ...
useNow locatedIn partOf type hasPossibleState/ hasCurrentState attachedTo deployedIn
name snoozeTime
believedToDo
name needHands getConfidenceScore
Context
busy
Caregiver Location Activity
solved riskLevel
Deviance Reminder
ackHandled acknowledgement
Notification
name model repeat id timeSent stage
Service
name
Device
watchesAfter runningFor solvedBy helpsWith usedBy escalateTo hasAckService deployedIn
Person
13
14
∀ Sensor se; SensorState st; Room r, r2; House h; Resident u; Timestamp t;
⋀ {se deployedIn r} ⋀ {r partOf h} ⋀ {u liveIn h} ⋀ {u detectedIn r2} ⋀ {r2 ≠ r} ⋀ {se lastUpdate t} ⟹ {u detectedIn r} ⋀ {u cameFrom r2} ⋀ {u inRoomSince t}
15
16
17
18
Cogitation (conscious mind) Cerebration (unconscious mind) Knowledge formalisation
S t i m u l u s ( ~ e v e n t ) Cerebral cortex
19
Legend invoke service exchange data
model.n3 home.n3 rules.n3 dump.n3 Stimulistener Cortex Cerebration* Cogitation EYE Decision Interpreter NTriplestore 1.live event 0.loaded once when ubismart starts 2.update(live event) 3.think i.think iv.think ii.query iii.update v.dump vii.think x.update ix.inferred triples vi.ontological dump at each inference viii.loaded in memory at each inference 5.decision xi.decision
20
Service Delivery Modules Sensing Modules Configuration Modules Reasoning Modules "X" SensorFlowManager (Routing)D I K W?
21 Legend
datatype property
litteral
update query
johndoe
livingroom toilet house pir2 pir2_off pir6 pir6_on
believedToDo detectedIn partOf liveIn deployedIn deployedIn hasCurrentState hasCurrentState motion partOf
7
motion motion
7
id
A2
id
A6
hasLastUpdate
2012-06-27 13:07:58
hasLastUpdate
2012-06-27 08:42:27
Legend
datatype property
litteral
update query
johndoe
livingroom toilet house pir2 pir2_on pir2_off pir6 pir6_on
believedToDo detectedIn partOf liveIn deployedIn deployedIn hasCurrentState hasCurrentState motion partOf
7
motion motion
7
id
A2
id
A6
hasLastUpdate
2012-06-27 13:07:58
hasLastUpdate
2012-06-27 13:08:08
hasCurrentState
22
23 Legend
datatype property
litteral
update query
johndoe
livingroom toilet house pir2 pir2_on pir6 pir6_on
believedToDo detectedIn partOf liveIn deployedIn deployedIn hasCurrentState motion partOf
7
motion
1
motion
8
id
A2
id
A6
hasLastUpdate
2012-06-27 13:07:58
hasLastUpdate
2012-06-27 13:08:08
hasCurrentState
24
{?u qol:detectedIn ?r. ?r a qol:Bathroom. ?u qol:inRoomFor ?d. ?d math:lessThan 1800. ?a1 a qol:Hygiene. ?u qol:canDo ?a1} => {?a1 qol:getScore 9}.
Legend
datatype property
litteral
update query
johndoe
hygiene livingroom toilet house pir2 pir2_on pir6 pir6_on
believedToDo cameFrom partOf liveIn deployedIn deployedIn hasCurrentState motion partOf
7
motion
1
motion
8
id
A2
id
A6
hasLastUpdate
2012-06-27 13:07:58
hasLastUpdate
2012-06-27 13:08:08
believedToDo detectedIn hasCurrentState
25
26
27
28
10 20 30 40 50 60 1 (344) 16 (2804) 31 (5264) 46 (7724) 61 (10184) 76 (12644) 91 (15104) 106 (17564) 121 (20024) 136 (22484) 151 (24944) 166 (27404) 181 (29864) 196 (32324) 211 (34784) 226 (37244) 241 (39704)
EYE Reasoning Duration (s) Nb of houses (Nb of triples) 34s 200 homes
29
Back-end
ZigBee gateway Wi-Fi router Tiny debian machine Server with web service repository Serial/USB LAN
30
31
events missed correct recognition events missed correct recognition
17% 29% 71% 83%
3 6 9 12 24/02/12 27/02/12 01/03/12 04/03/12 07/03/12 10/03/12 13/03/12
Nb of reminders per day
32
Bedroom 1 Livingroom Bedroom 2 Kitchen WC Bath
door open/close sensor motion sensor internet-connected gateway (BeagleBone)
33
Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 00:00 06:00 12:00 18:00 00:00 Go out Nap Occupied Sleep time day
34
2012-06-04 640 640 640 640 640 2012-06-05 824 824 824 824 824 2012-06-06 339 339 339 339 339 2012-06-07 1 2012-06-08 362 362 362 362 362 2012-06-09 781 781 781 781 781 2012-06-10 470 470 470 470 470 2012-06-11 543 543 543 543 543 2012-06-12 835 835 835 835 835 2012-06-13 388 388 388 388 388 2012-06-14 340 340 340 340 340 2012-06-15 585 585 585 585 585 2012-06-16 362 362 362 362 362 2012-06-17 371 371 371 371 371 2012-06-18 590 590 590 590 590 2012-06-19 409 409 409 409 409 2012-06-20 134 134 134 134 134 2012-06-21 274 274 274 274 274 2012-06-22 4 2012-06-23 394 394 394 394 394 2012-06-24 256 256 256 256 256 2012-06-25 288 288 288 288 288 2012-06-26 471 471 471 471 471 2012-06-27 422 422 422 422 422 2012-06-28 446 446 446 446 446 2012-06-29 518 518 518 518 518 2012-06-30 418 418 418 418 418 2012-07-01 191 191 191 191 191 2012-07-02 309 309 309 309 309 2012-07-03 250 250 250 250 250 2012-07-04 299 299 299 299 299 2012-07-05 1 2012-07-06 1 2012-07-07 1 2012-07-08 1 2012-07-09 42 42 42 42 42 2012-07-10 309 309 309 309 309 2012-07-11 172 172 172 172 172 2012-07-12 199 199 199 199 199Outside Living room Kitchen Bedroom3 Bedroom2 Bedroom
Mon. Tue. Wed. Thu. Fri. Sat. Sun.
35
Liu Yan & Dong Jin Song (PAT) @Peacehaven Nursing Home
36
37
Counterexamples PAT Model Checker Verification: Safety, Liveness Modelling: Environment, System Design Stakeholders: Nurses, Engineers Collecting Patient behaviours Collecting Requirements
38
39
40
#assert SmartBedroom() |= [](UsingWrongBed -> <>RemindedWrongBed); #define InConsistency (Pos_Person[1] == SHOWROOM && ShowerFlag && sensors[PIR] == SILENT); # define ConflictReminder (ReminderStage[ShowerNoSoap * 2] != 0 && ReminderStage[WanderingInSR * 2] != 0);
41
Bugs? Property Result Nb of states Nb of transitions Execution time (s)
J
P1.2 True 1,433,654 2,038,064 815
J
P1.3 True 10,783,353 15,832,370 7,045
J
P2.1 True 1,599,797 2,430,351 1,945
L
P2.2 False 68,178 130,734 39
L
P2.3 False 2,192,251 4,531,005 12,414
L
P2.4 False 832,144 1,663,779 729
L
P2.5 False 4,314 5,150 1.6
J
P2.6 True 1,579,579 2,377,381 1,913
L
P3 True 572 745 0.3
L
P4.1 True 14,675 20,615 6.1
L
P4.2 True 2,446 3,036 1.11
L
P4.3 True 2,332,744 3,001,756 1,047
42
System part # Rules # Non-reachable # Redundant/ #Duplicated # Conflict Bedroom 17 2 8/3 2 Shower Room 22 5 16/2
3.05
43
44
45