Open Journal of Applied Sciences
Vol.05 No.11(2015), Article ID:60866,8 pages
10.4236/ojapps.2015.511065

Context-Aware System Modeling Based on Boolean Control Network

M. Humayun Kabir1, M. Robiul Hoque2

1Department of Applied Physics Electronics and Communication Engineering, Islamic University, Kushtia, Bangladesh

2Department of Computer Science and Engineering, Islamic University, Kushtia, Bangladesh

Copyright © 2015 by authors and Scientific Research Publishing Inc.

This work is licensed under the Creative Commons Attribution International License (CC BY).

http://creativecommons.org/licenses/by/4.0/

Received 6 October 2015; accepted 30 October 2015; published 2 November 2015

ABSTRACT

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.

Keywords:

Mathematical Modeling, Context-Aware System, Smart Home, Boolean Control Network, Semi-Tensor Matrix Product

1. Introduction

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 [1] . Context-aware systems can be implemented using production rules (if-then relationships), neural networks, support vector machines, fuzzy logic, Bayesian networks, etc. [2] - [5] . Boolean network (BN) was introduced by Kauffman to formulate the cellular networks [6] . A BN network consists of a set of Boolean variables whose state is determined by other variables in the network. BN is also used for modeling some other complex systems such as neural networks, social and economic networks. The state of each variable at time t + 1 can be determined by the state of its spatial neighbors at time t. A BN network with n variables has 2n 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, CO2, 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.

2. Boolean Control Networks

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

where, are n + m-ary logical functions, are states, are control inputs.

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. Figure 1 shows the graphical representation of a BCN.

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 [7] [8] . A briefly review on some topics are represented, which is useful for studying BCNs in a control-theoretic framework.

2.1. Matrix Expression of Logic

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

Figure 1. Graphical representation of two inputs and four nodes boolean control network.

where, is the ith column of the identity matrix Ik and

Definition 1: A matrix is called a logical matrix if Col(L) Ì Dn. The set of n × m logical matrices is denoted by ℒn×m. If, then it has the form or in compact form.

2.2. Left Semi-Tensor Matrix Product

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 and is

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

2.3. Algebraic Representation of Boolean Functions

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

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

Table 1 listed some of the structure matrices used in BCN.

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

Table 1. Structure matrix for basic logical operators.

2.4. Procedure to Make Structure Matrix

We can make structure matrix of the function in the following three steps.

Step 1. Using the fact that pM = (I2 Ä M)p , all factors of structure matrices Mj or I2 Ä Mj can be move to the front and move all the variables, pi, to the rear of the product.

where

Step 2. Using a swap matrix the order of two logical variables can be changed W[2]pipj = pjpi

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

2.5. Algebraic Representation of BCNs

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 and inputs with Then the dynamics of Equation (1) can be expressed as

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

2.6. Solution of a Logical Equation

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

Algorithm: Let, where are in vector form. Then:

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

Step 1. Set

Step 2. Calculated pj and qj, , recursively by

3. Mathematical Modeling of Context-Aware System

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, are n-ary logical functions, are logical functions, are states, are outputs, are control inputs.

This model realizes five output services, Morning Call Service (y1), normal service (y2), Entertainment Service (y3), Sleeping Service (y4) and Guarding Service (y5). For each service we consider separate service state. So there are five service states, Morning Call state (x1), normal state (x2), Entertainment state (x3), Sleeping state (x4), and Guarding state (x5). For input it uses eight context elements with Boolean logic values true and false. These context elements are categorized as person u1 (father (p), mother (q), son (r), daughter (s)), time (morning (u2), evening (u7), night (u5)), location (bedroom (u3), sofa (u8), outside (u6)) and activity (lying (u4)). Each service state can be defined by logical relation between the context elements. Figure 2 shows the state diagram of this system.

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

Figure 2. State diagram.

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, , Md structure matrix, transition matrix. Table 1 listed some of the structure matrix used in Boolean control network.

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, Mc = structure matrix of logical conjunction operation, Md = structure matrix of logical disjunction operation, I2 = 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,. The first and last few columns of L are d32 [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 (y1), sleeping service (y4), entertainment service (y3) 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

(16)

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, Mc = structure matrix of logical conjunction operation, Md = structure matrix of logical disjunction operation, I2 = 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:

(17)

where, , H = δ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 (c1) turns on the alarm device (b), room light (c), blind (d), coffee maker (e), water heater (f). Sleeping service (c2) turns off the room light and blind. Whenever nobody is inroom that time Guarding service (c3) turns off all the appliances and device. Entertainment service (c4) turns on the TV (h), room light. When a user is in home then normal service (c5) turns on light, air conditioner (g), blind. We can describe the service by the output function of home appliances and device.

(18)

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

(19)

where, , ,

The first and last few columns Ls ared32 [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 Table 2.

Table 2. Solutions of equation.

4. Conclusion

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.

Cite this paper

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

References

  1. 1. Khalili, A.H., Chen, W.U. and Aghajan, H. (2009) Autonomous Learning of User’s Preference of Music and Light Services in Smart Home Applications. Behavior Monitoring and Interpretation Workshop at German AI Conf.

  2. 2. Hong, J.-Y., Suh, E.-H. and Kim, S.-J. (2009) Context-Aware Systems: A Literature Review and Classification. Journal of Expert Systems and Applications, 36, 8509-8522. http://dx.doi.org/10.1016/j.eswa.2008.10.071

  3. 3. Mozer, M.C. (1998) The Neural Network House: An Environment That Adapts to Its Inhabitants. Proceedings AAAI Spring Symposium on Intelligent Environments.

  4. 4. Gu, T., Pung, H.K. and Zhang, D.Q. (2005) A Service-Oriented Middleware for Building Context-Aware Services. Journal of Network and Computer Applications, 28, 1-18. http://dx.doi.org/10.1016/j.jnca.2004.06.002

  5. 5. Park, H.-S. and Cho, S.-B. (2012) A Modular Design of Bayesian Networks Using Expert Knowledge: Context-Aware Home Service Robot. Journal of Expert Systems and Applications, 39, 2629-2642. http://dx.doi.org/10.1016/j.eswa.2011.08.118

  6. 6. Kauffman, S.A. (1993) The Origins of Order: Self-Organization and Selection in Evolution. Oxford University Press, New York.

  7. 7. Cheng, D., Qi, H. and Li, Z. (2011) Analysis and Control of Boolean Networks: A Semi-Tensor Product Approach. Springer. http://dx.doi.org/10.1007/978-0-85729-097-7

  8. 8. Laschov, D. and Margaliot, M. (2011) A Maximum Principle for Single-Input Boolean Control Network. IEEE Transactions on Automatic Control, 56, 913-917. http://dx.doi.org/10.1109/TAC.2010.2101430