^{1}

^{*}

^{2}

Boolean control network consists of a set of Boolean variables whose state is determined by other variables in the network. Boolean network is used for modeling complex system. In this paper, we have presented a model of a context-aware system used in smart home based on Boolean control networks. This modeling describes the relationship between the context elements (person, time, location, and activity) and services (Morning Call, Sleeping, Guarding, Entertainment, and normal), which is effective to logical inference. We apply semi tensor matrix product to describe the dynamic of the system. This matrix form of expression is a convenient and reasonable way to design logic control system.

Context-awareness is an important characteristic for smart home. Context-aware system reacts and adapts according to the changes in the domain environment. Researchers in different fields make a lot of contribution for context-aware system. The goal of the context-aware system in smart home is to provide services that maximize the user’s comfort and safety while minimizing the user’s explicit interaction with the environment as well as the cost of the service [^{n} possible states and the dynamics of BN is converted into an equivalent algebraic form as a standard discrete-time linear system using the matrix expression of logic. One possible way to enrich the dynamics is to consider BN with inputs and outputs called Boolean control network (BCN). Our aim is to create a mathematical model that explains the system and represents the effects of different components and to make predictions about behavior. A context-aware system can be considered as a Boolean control networks, where context elements are treated as control inputs and different services as state variables. We used left semi-tensor matrix product to describe the dynamics of the system.

In real environment, different types of sensor is used to collect situational (user ID, location, activity, etc.) and environmental (temperature, humidity, illumination, CO_{2}, etc.) data. Context is formed with this data. Context- aware system offer different types of services to the user based on the context information. The set of rules (logic expression) are used for this purpose. Using left semi tensor product, we can derive linear algebraic equation of these logic expression. These linear algebraic equations express state-spaces. For smart home architecture, an important term is inference. Inference system can deduce knowledge from knowledge base which helps to provide context-aware service for home user. Matrix expression is a new and convenient approach for logic inference.

The rest of the paper is organized as follows: Section 2 presents a brief review of related topics for Boolean control network. Section 3 presents mathematical modeling of context-aware system followed by conclusion and future work are drawn in Section 4.

A Boolean control network (BCN) is a discrete-time logical dynamic control system. Its dynamics can be expressed as

where,

Boolean control network can be represented as directed graph with n nodes and m inputs. An edge from node i to node j represents that node j is effected by node i.

D. Cheng, et al. proposed the concept of left semi-tensor product and used it to represent BCNs in a linear algebraic state-space form [

A logical variable represents value from a set D = {T, F}, or {1, 0}. For matrix expression we identify truth “T” and false “F”, with the vectors

where, _{k} and

Definition 1: A matrix _{n×m}. If

Definition 2: Unlike Kronecker product (Ä), the semi-tensor product (⋉) is a generalization of the conventional matrix product that allows multiplying two matrices of arbitrary dimensions. The left semi tensor product of two matrices

where a is equal to least common multiple of n and p (lcm(n, p)).

A Boolean function can be converted into an algebraic form using the left semi-tensor matrix product. Any Boolean function of n variables

Definition 3: A 2 × 2^{r} matrix M_{σ} is said to be the structure matrix of the r-ary logical operator s if

Definition 4: A swap matrix W_{[m,n]} is an mn × mn matrix, defined as follows. Its rows and columns are labeled by double index (i, j), the columns are arranged by the ordered multi-index Id(i, j: m, n), and the rows are arranged by the ordered multi-index Id(j, i: m, n). The element at position [(I, J), (i, j)] is then

Logical Operator | Structure Matrix | Logical Operator | Structure Matrix |
---|---|---|---|

Negation (Ø) | Disjunction (Ú) | ||

Conjunction (Ù) | Conditional (®) | ||

Biconditional («) | Exclusive or | ||

Dummy (sd) | Power reduced |

We can make structure matrix of the function

Step 1. Using the fact that pM = (I_{2} Ä M)p , all factors of structure matrices M_{j} or I_{2} Ä M_{j} can be move to the front and move all the variables, p_{i}, to the rear of the product.

where

Step 2. Using a swap matrix the order of two logical variables can be changed W_{[2]}p_{i}p_{j} = p_{j}p_{i}

Step 3. Using a power-reducing matrix, the power of the p_{i}’s can all be reduced to 1. The coefficient matrices, generated by reducing orders, can be moved to the front part.

The dynamics of BCNs can be represented by a set of Boolean functions, so a linear algebraic state-space representation can be possible using left semi-tensor matrix product.

Theorem: Consider a BCN with state variables

where, the matrix L is called the transition matrix of the BCN and

Using the following algorithm, scalar form of the logical unknowns can be easily calculated.

Algorithm: Let,

The scalar form of {p_{j}} can be calculated from i inductively as follows:

Step 1. Set

Step 2. Calculated p_{j} and q_{j},

In smart home context-aware system provides different types of services. We can define each service as a logical function of context elements and states. These context elements and states are Boolean logical variables with value either true or false. Logical equation of smart home context-aware system are expressed as

where,

This model realizes five output services, Morning Call Service (y_{1}), normal service (y_{2}), Entertainment Service (y_{3}), Sleeping Service (y_{4}) and Guarding Service (y_{5}). For each service we consider separate service state. So there are five service states, Morning Call state (x_{1}), normal state (x_{2}), Entertainment state (x_{3}), Sleeping state (x_{4}), and Guarding state (x_{5}). For input it uses eight context elements with Boolean logic values true and false. These context elements are categorized as person u_{1} (father (p), mother (q), son (r), daughter (s)), time (morning (u_{2}), evening (u_{7}), night (u_{5})), location (bedroom (u_{3}), sofa (u_{8}), outside (u_{6})) and activity (lying (u_{4})). Each service state can be defined by logical relation between the context elements.

Using logic variables we can express logic Equation (9) as follows:

This logical function (11) can be converted into an algebraic function using left semi-tensor matrix product (⋉), definition and theorems described in introduction section as:

where, _{d} structure matrix,

Using Equation (12) logic equation can be simplified as

The logical functions in (13) can be represented by structure matrix of logical operator and the applying the properties of left semi-tensor product can be represented as:

where, M_{c} = structure matrix of logical conjunction operation, M_{d} = structure matrix of logical disjunction operation, I_{2} = identity matrix and W_{[2]} = swap matrix.

Applying left semi-tensor product on both sides the system of logical Equation (14) can be converted into a linear algebraic equation as:

where,_{32} [14 14 10 10 14 14 10 10 14 14 10 10 14 14 16 16 14 ××× 32 32 32 32 32 32 32 32 32].

Morning call service (y_{1}), sleeping service (y_{4}), entertainment service (y_{3}) is a subset of normal service. When any of the service (morning call, sleeping and entertainment) is true that time normal service will be false. We can define each services as

The logical functions in (16) can be represented by structure matrix of logical operator and the applying the properties of left semi-tensor product can be represented as:

where, M_{c} = structure matrix of logical conjunction operation, M_{d} = structure matrix of logical disjunction operation, I_{2} = identity matrix and W_{[2]} = swap matrix.

Applying left semi-tensor product on both sides the system of logical equations can be converted into a linear algebraic equation as:

where, _{32} [10 10 16 16 16 16 16 16 ××× 31 32 31 32 31 32].

Every service is composed of some controlling facilities to turn on and off of home appliances and device. Morning call service (c_{1}) turns on the alarm device (b), room light (c), blind (d), coffee maker (e), water heater (f). Sleeping service (c_{2}) turns off the room light and blind. Whenever nobody is inroom that time Guarding service (c_{3}) turns off all the appliances and device. Entertainment service (c_{4}) turns on the TV (h), room light. When a user is in home then normal service (c_{5}) turns on light, air conditioner (g), blind. We can describe the service by the output function of home appliances and device.

Applying left semi-tensor matrix product together on both sides of algebraic equation of (18).

where,

The first and last few columns L_{s} ared_{32} [32 16 32 32 32 32 32 32 32 32 32 32 32 32 ××× 32 32 32 32 24 32 28]. This liner model considers vector values of logic, in real world we use scalar values for controlling. According to algorithm presented in Section 1.6 the values of different service outputs can be calculated and tabulated in

Service | b | c_{1} c_{2} c_{3} c_{4} c_{5} | x | b c d e f g h |
---|---|---|---|---|

Morning call | 1 0 0 0 0 | 1 1 1 1 1 1 0 | ||

Normal | 0 1 0 0 0 | 0 1 1 0 0 1 0 | ||

Entertainment | 0 0 1 0 0 | 0 1 0 0 0 1 1 | ||

Sleeping | 0 0 0 1 0 | 0 0 0 0 0 1 0 | ||

Guard | 0 0 0 0 1 | 0 0 0 0 0 0 0 |

Boolean control network is a logic-based control system. Boolean control network is realizable in Smart home context-aware control system. All the logical variables represented by values 1 or 0 in this system. In this paper, we have used Boolean control network for context-aware system. To control any system modeling is an important issue. We have defined the logic relation between context information and state variables. Then these logic relations are converted to matrix expression using semi tensor matrix product. With this matrix expression, we can control and do inference easily. At present, we have applied the network with 5 nodes, number of nodes can be extended based on the state of the service. In future, we will use k-value logic to express the logic relation more efficiently.

M. Humayun Kabir,M. Robiul Hoque, (2015) Context-Aware System Modeling Based on Boolean Control Network. Open Journal of Applied Sciences,05,661-668. doi: 10.4236/ojapps.2015.511065