UNCERTAINTIES KNOWLEDGE
1) OWL Contextual
6.3.2. Activity Recognition with Ontological Modelling Framework
The activity reasoning engine performs three main tasks to reason with π, π, and π knowledge. In the first task, the reasoning engine analyses each action within the activities at multi granularity level: coarse-grained action (ππ) and fine-grained (ππ) as discussed in CHAPTER 4. The ππ activity level mainly considers attributes under which a given activity must be fulfilled. These attributes are location, time interval and key objects. The attributes for each activity are stored in the ontological model/graph-based database and can be queried using SPARQL Protocol and RDF query language (SPARQL) or description logic (DL) query approach, respectively. Furthermore, to detect missing actions or sensors for a given activity, aforementioned attributes are used to create a set of lists to describe mandatory/optional dependencies and 13 Allen rules to identify missing actions; more details in section 6.3.2.1. Secondly, the ππ are analysed using π model to detect incomplete actions from the set of actions described in the model. The fuzzy rules are used to combine multiple sensor data at a given time window and infer if the fuzzy state corresponds to ππ. In addition, a set of ππ are defined with importance weighting to calculate overall completion of an ADL using
fo:fuzzyLabel annotation and weightedSum concept type; further elaborated in section 6.3.2.2.
Thirdly, the uncertainty related to the events is taken into consideration based on attributes identified from task one to perform activity level uncertainty reasoning and action-specific uncertainty reasoning based on the result of task two. Section 6.3.2.3 provides further details in performing task three.
6.3.2.1. Detecting Missing Sensors
The mandatory actions or context events are those that are considered essential in order to conduct the activity and they follow specific sequences. To describe sequence dependencies in OWL, hasMandatoryDependences object property, is used within the class description of the ADL. For example, while making tea (π΄1), the occupant must βstartβ by picking up the kettle
FUZZY AND UNCERTAINTIES KNOWLEDGE
(π΄) to fill up with a tap on (π΅) and heat the water βbeforeβ turning the kettle switch (πΆ) on. On the other hand, optional actions are those that allow the occupant to conduct other actions without conducting the optional action. To describe optional sequences dependencies in OWL,
hasOptionalDependences object property, is used within the class description of the ADL. For
instance, the occupant may βstartβ by opening the cupboard (π·) to take the tea mug out (πΈ) and spoon (πΉ) out; here during πΉ during π· or π· contains πΉ can be used. However, occupants may also pick up the mugs and spoon from the mug and cutlery stand by the kitchen sink/platform. Hence, opening cupboard (π·) action is defined as optional for π΄1.
Table 6.1. Example of Finding Missing Actions and Potential Sensor Failure. π΄1 (partial OWL class description): =
hasMandatoryAction some (π΄ ππ π΅ ππ πΆ ππ πΈ) hasOptionalAction some (π· ππ πΉ)
hasMandatoryDependences some ((π΄ π π‘πππ‘ π΅, π΅ ππππππ πΆ), β¦) * hasOptionalDependences some ((π· π π‘πππ‘ πΈ, π· ππππ‘ππππ πΉ), β¦) Conducted action sequences: π΄π΅πΆπ·πΈπΉ
Observed event sequences: π΄π΅πΈπΉ
Following steps are taken to find missing actions/failed sensor: 1. Retrieve both types of dependencies for π΄1 activity 2. Check mandatory dependencies for π΄, π΅ and πΈ.
o Mandatory action π΄ start π΅ OK. o Mandatory action π΅ before πΈ FAIL. o Mandatory action π΅ before πΆ EXPECTED. o Mandatory action π΅ before πΈ FAIL. 3. Check Optional dependencies for E and F
o Optional action π΅ before πΈ FAIL, o Optional action πΈ before πΉ FAIL. o Optional action π· contains πΈ EXPECTED. o Optional action π·contains πΉ EXPECTED.
4. Check last message or request status from the sensors attached to πΆ and π· within the threshold amount? β YES = missing action, NO = sensor failure
OWL Example:
*βππ ππππππ‘πππ¦π·ππππππππππ π πππ ((((π π‘πππ‘π π πππ π΄) πππ ππππππ π πππ π΅)), πππ πππππ βππ π πππ πΆ))
In order to identify the missing sensors/actions, let us assume, both of the mandatory and optional example actions (π΄-πΉ) are conducted sequentially and observed by the sensor network but failed to administer πΆ and π· actions. Hence, the observed π΄π΅πΈπΉ sequences of events are analysed by retrieving both types of dependencies for A1 activity. The mandatory actions π΄ and π΅ satisfy Allenβs βstartβ rule but fail to match any actions sequences between π΅ and πΈ. The expected mandatory action is π΅ before πΆ. However, it fails to see any mandatory dependencies between π΅ and πΈ. The action πΈ is not part of any mandatory dependency sequences, hence optional dependencies are check for the rest of the events, πΈ and F. The optional dependencies sequences failed to match action link with B and πΈ, πΈ and πΉ. However, both πΈ and πΉ actions expected action π· to be conducted but missing from the observed sequences. The sensor event log can be further checked to see when the last message was received from the sensors attached
FUZZY AND UNCERTAINTIES KNOWLEDGE
to πΆ and π· objects when a given threshold or request status check in order to determine if the sensor active or failed. Table 4.6 describes the above kitchen scenario and the process of finding the missing sensors and potential sensor failures.
6.3.2.2. Detecting Incomplete Actions
The incomplete actions of one or more objects with multiple sensors observations are detected using fuzzy reasoning. The actions are observed and matched against a set of criteria at prior (or initial), present, and post states with fixed three-second window size. The set of criteria for prior state of action are used to detect changes at the end of the present state and the expected set of goals after having performed the action at post-state. For example, to detect βpouringβ action, the prior state assumes that kettle is on the base and turned off, the kettle has some water (i.e., half the amount measured with picofarads (pF) value of 15), water temperature is very hot, and the cup is not full. As the user moves the kettle, the position (roll, yaw and pitch) is observed until the end of the present state time window and compare if the kettle has at least been moved and tilted in proportion to the half of the water amount (i.e., triangular function with (27.61, 20, 10) pF values). The fuzzy thresholds-based reasoning can help identify to what membership degree the movement of the kettle when half full fall under. The post-state of the action is to verify if the water level in the kettle has decreased, the cup has been filled (i.e., not empty) and the temperature was raised (i.e., hot or very hot). Likewise, other fine-grained actions such as βdrinkingβ from the cup are detected with relevant sensors. Figure 6.6 describes βpouringβ and βdrinkingβ measurements at the initial and new state of the kettle and cup with sensors (i.e., liquid level, position data and object temperature) attached. In addition, a snapshot of fuzzy reasoning based on rules describing a set of criteria to be satisfied at three states is presented in Table 6.2.
Figure 6.6. Detecting incomplete actions by combining position and water level sensor to detect βpouringβ actions
FUZZY AND UNCERTAINTIES KNOWLEDGE
Table 6.2. Example of detecting incomplete actions using fuzzy reasoning for pouring and drinking actions.
S Conditions
1 [kettle=onβkettle=off, kettle_liquid_pf=!empty, cup_liquid_pf !=full, kettle_obj_temp>=hot OR very hot] 2 Kettle pouring:
- IF liquid_pf >= full (30), THEN at least roll, yaw, pitch till half threshold amount (9.19, 20, 10). - IF liquid_pf (15) <= half (15), THEN at least roll, yaw, pitch till half threshold amount (27.61, 20, 10). - IF liquid_pf <= empty (8), THEN at least roll, yaw, pitch till half threshold amount (50.03, 20, 10). Cup filling:
- IF liquid_pf >= full (20), THEN at least roll, yaw, pitch till half threshold amount (20, 10, 5). - IF liquid_pf(10) <= half (10), THEN at least roll, yaw, pitch till half threshold amount (20. 10. 10). - IF liquid_pf <= empty (9), THEN at least roll, yaw, pitch till half threshold amount (30, 10, 15).
3 [kettle=off, liquid_pf<=half, cup_liquid_pf!=empty, cup_obj_temp AND kettle_obj_temp >= hot OR very hot]
Note: S: state, (1): prior, (2) present and (3) post
6.3.2.3. Uncertainty Reasoning at Activity and Action Level
The activity reasoning results from task one and two are used as evidence for probabilistic reasoning at the activity and action level. Therefore, SSBN is created based on the MTheory and MFrags defined in the PR-OWL model and evidences are mapped to relevant probabilistic distribution table which contains possible states and probabilistic values of occurring. These states include Boolean values in the PR-OWL and assumes fuzzy states of the sensor/object is reasoned in task two of the reasoning process. For instance, battery level of a given sensor is measured as 10%, the result from fuzzy reasoning in task two would be βlowβ and this low value will be used as a piece of evidence for a given po2:DeclarativeProbability table, i.e., change probability value for the state of βlowβ to 100% and others possible values in the table to 0%. The effected probability tables which depend on the sensor to function correctly in the SSBN will be propagated. Likewise, the collection of pieces of evidence is applied to the SSBN and the uncertainties defined at action/activity levels are calculated.