<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OJAppS</journal-id><journal-title-group><journal-title>Open Journal of Applied Sciences</journal-title></journal-title-group><issn pub-type="epub">2165-3917</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ojapps.2015.511065</article-id><article-id pub-id-type="publisher-id">OJAppS-60866</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Biomedical&amp;Life Sciences</subject><subject> Chemistry&amp;Materials Science</subject><subject> Computer Science&amp;Communications</subject><subject> Engineering</subject><subject> Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  Context-Aware System Modeling Based on Boolean Control Network
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>.</surname><given-names>Humayun Kabir</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>M.</surname><given-names>Robiul Hoque</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref></contrib></contrib-group><aff id="aff2"><addr-line>Department of Computer Science and Engineering, Islamic University, Kushtia, Bangladesh</addr-line></aff><aff id="aff1"><addr-line>Department of Applied Physics Electronics and Communication Engineering, Islamic University, Kushtia, 
Bangladesh</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>h.2011.kabir@gmail.com(.HK)</email>;</corresp></author-notes><pub-date pub-type="epub"><day>02</day><month>11</month><year>2015</year></pub-date><volume>05</volume><issue>11</issue><fpage>661</fpage><lpage>668</lpage><history><date date-type="received"><day>6</day>	<month>October</month>	<year>2015</year></date><date date-type="rev-recd"><day>accepted</day>	<month>30</month>	<year>October</year>	</date><date date-type="accepted"><day>2</day>	<month>November</month>	<year>2015</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  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.
 
</p></abstract><kwd-group><kwd>Mathematical Modeling</kwd><kwd> Context-Aware System</kwd><kwd> Smart Home</kwd><kwd> Boolean Control Network</kwd><kwd> Semi-Tensor Matrix Product</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>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 [<xref ref-type="bibr" rid="scirp.60866-ref1">1</xref>] . Context-aware systems can be implemented using production rules (if-then relationships), neural networks, support vector machines, fuzzy logic, Bayesian networks, etc. [<xref ref-type="bibr" rid="scirp.60866-ref2">2</xref>] - [<xref ref-type="bibr" rid="scirp.60866-ref5">5</xref>] . Boolean network (BN) was introduced by Kauffman to formulate the cellular networks [<xref ref-type="bibr" rid="scirp.60866-ref6">6</xref>] . 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 2<sup>n</sup> 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.</p><p>In real environment, different types of sensor is used to collect situational (user ID, location, activity, etc.) and environmental (temperature, humidity, illumination, CO<sub>2</sub>, 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.</p><p>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.</p></sec><sec id="s2"><title>2. Boolean Control Networks</title><p>A Boolean control network (BCN) is a discrete-time logical dynamic control system. Its dynamics can be expressed as</p><p>where, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x7.png" xlink:type="simple"/></inline-formula>are n + m-ary logical functions, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x8.png" xlink:type="simple"/></inline-formula>are states, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x9.png" xlink:type="simple"/></inline-formula>are control inputs.</p><p>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. <xref ref-type="fig" rid="fig1">Figure 1</xref> shows the graphical representation of a BCN.</p><p>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 [<xref ref-type="bibr" rid="scirp.60866-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.60866-ref8">8</xref>] . A briefly review on some topics are represented, which is useful for studying BCNs in a control-theoretic framework.</p><sec id="s2_1"><title>2.1. Matrix Expression of Logic</title><p>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</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Graphical representation of two inputs and four nodes boolean control network</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-2310500x10.png"/></fig><p>where, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x12.png" xlink:type="simple"/></inline-formula>is the ith column of the identity matrix I<sub>k</sub> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x13.png" xlink:type="simple"/></inline-formula></p><p>Definition 1: A matrix <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x14.png" xlink:type="simple"/></inline-formula> is called a logical matrix if Col(L) &#204; Dn. The set of n &#215; m logical matrices is denoted by ℒ<sub>n&#215;m</sub>. If<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x15.png" xlink:type="simple"/></inline-formula>, then it has the form <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x16.png" xlink:type="simple"/></inline-formula> or in compact form<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x17.png" xlink:type="simple"/></inline-formula>.</p></sec><sec id="s2_2"><title>2.2. Left Semi-Tensor Matrix Product</title><p>Definition 2: Unlike Kronecker product (&#196;), 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 <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x18.png" xlink:type="simple"/></inline-formula> and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x19.png" xlink:type="simple"/></inline-formula> is</p><p>where a is equal to least common multiple of n and p (lcm(n, p)).</p></sec><sec id="s2_3"><title>2.3. Algebraic Representation of Boolean Functions</title><p>A Boolean function can be converted into an algebraic form using the left semi-tensor matrix product. Any Boolean function of n variables <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x21.png" xlink:type="simple"/></inline-formula> can be equivalently represented as a mapping <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x22.png" xlink:type="simple"/></inline-formula></p><p>Definition 3: A 2 &#215; 2<sup>r</sup> matrix M<sub>σ</sub> is said to be the structure matrix of the r-ary logical operator s if</p><p><xref ref-type="table" rid="table1">Table 1</xref> listed some of the structure matrices used in BCN.</p><p>Definition 4: A swap matrix W<sub>[m,n]</sub> is an mn &#215; 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</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Structure matrix for basic logical operators</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Logical Operator</th><th align="center" valign="middle" >Structure Matrix</th><th align="center" valign="middle" >Logical Operator</th><th align="center" valign="middle" >Structure Matrix</th></tr></thead><tr><td align="center" valign="middle" >Negation (&#216;)</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x25.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >Disjunction (&#218;)</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x26.png" xlink:type="simple"/></inline-formula></td></tr><tr><td align="center" valign="middle" >Conjunction (&#217;)</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x27.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >Conditional (&#174;)</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x28.png" xlink:type="simple"/></inline-formula></td></tr><tr><td align="center" valign="middle" >Biconditional (&#171;)</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x29.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >Exclusive or</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x30.png" xlink:type="simple"/></inline-formula></td></tr><tr><td align="center" valign="middle" >Dummy (sd)</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x31.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >Power reduced</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x32.png" xlink:type="simple"/></inline-formula></td></tr></tbody></table></table-wrap></sec><sec id="s2_4"><title>2.4. Procedure to Make Structure Matrix</title><p>We can make structure matrix of the function <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x33.png" xlink:type="simple"/></inline-formula> in the following three steps.</p><p>Step 1. Using the fact that pM = (I<sub>2</sub> &#196; M)p , all factors of structure matrices M<sub>j</sub> or I<sub>2</sub> &#196; M<sub>j</sub> can be move to the front and move all the variables, p<sub>i</sub>, to the rear of the product.</p><p>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x35.png" xlink:type="simple"/></inline-formula></p><p>Step 2. Using a swap matrix the order of two logical variables can be changed W<sub>[<xref ref-type="bibr" rid="scirp.60866-ref2">2</xref>]</sub>p<sub>i</sub>p<sub>j</sub> = p<sub>j</sub>p<sub>i</sub></p><p>Step 3. Using a power-reducing matrix, the power of the p<sub>i</sub>’s can all be reduced to 1. The coefficient matrices, generated by reducing orders, can be moved to the front part.</p></sec><sec id="s2_5"><title>2.5. Algebraic Representation of BCNs</title><p>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.</p><p>Theorem: Consider a BCN with state variables <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x37.png" xlink:type="simple"/></inline-formula> and inputs <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x38.png" xlink:type="simple"/></inline-formula> with <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x39.png" xlink:type="simple"/></inline-formula> Then the dynamics of Equation (1) can be expressed as</p><p>where, the matrix L is called the transition matrix of the BCN and</p></sec><sec id="s2_6"><title>2.6. Solution of a Logical Equation</title><p>Using the following algorithm, scalar form of the logical unknowns can be easily calculated.</p><p>Algorithm: Let, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x42.png" xlink:type="simple"/></inline-formula>where <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x42.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x43.png" xlink:type="simple"/></inline-formula> are in vector form. Then:</p><p>The scalar form of {p<sub>j</sub>} can be calculated from i inductively as follows:</p><p>Step 1. Set <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x44.png" xlink:type="simple"/></inline-formula></p><p>Step 2. Calculated p<sub>j</sub> and q<sub>j</sub>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x45.png" xlink:type="simple"/></inline-formula>, recursively by</p></sec></sec><sec id="s3"><title>3. Mathematical Modeling of Context-Aware System</title><p>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</p><p>where, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x49.png" xlink:type="simple"/></inline-formula>are n-ary logical functions, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x50.png" xlink:type="simple"/></inline-formula>are logical functions, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x51.png" xlink:type="simple"/></inline-formula>are states, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x52.png" xlink:type="simple"/></inline-formula>are outputs, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x52.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x53.png" xlink:type="simple"/></inline-formula>are control inputs.</p><p>This model realizes five output services, Morning Call Service (y<sub>1</sub>), normal service (y<sub>2</sub>), Entertainment Service (y<sub>3</sub>), Sleeping Service (y<sub>4</sub>) and Guarding Service (y<sub>5</sub>). For each service we consider separate service state. So there are five service states, Morning Call state (x<sub>1</sub>), normal state (x<sub>2</sub>), Entertainment state (x<sub>3</sub>), Sleeping state (x<sub>4</sub>), and Guarding state (x<sub>5</sub>). For input it uses eight context elements with Boolean logic values true and false. These context elements are categorized as person u<sub>1</sub> (father (p), mother (q), son (r), daughter (s)), time (morning (u<sub>2</sub>), evening (u<sub>7</sub>), night (u<sub>5</sub>)), location (bedroom (u<sub>3</sub>), sofa (u<sub>8</sub>), outside (u<sub>6</sub>)) and activity (lying (u<sub>4</sub>)). Each service state can be defined by logical relation between the context elements. <xref ref-type="fig" rid="fig2">Figure 2</xref> shows the state diagram of this system.</p><p>Using logic variables we can express logic Equation (9) as follows:</p><fig id="fig2"  position="float"><label><xref ref-type="fig" rid="fig2">Figure 2</xref></label><caption><title> State diagram</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/1-2310500x56.png"/></fig><p>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:</p><p>where, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x59.png" xlink:type="simple"/></inline-formula>, M<sub>d</sub> structure matrix, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x59.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x60.png" xlink:type="simple"/></inline-formula>transition matrix. <xref ref-type="table" rid="table1">Table 1</xref> listed some of the structure matrix used in Boolean control network.</p><p>Using Equation (12) logic equation can be simplified as</p><p>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:</p><p>where, M<sub>c</sub> = structure matrix of logical conjunction operation, M<sub>d</sub> = structure matrix of logical disjunction operation, I<sub>2</sub> = identity matrix and W<sub>[<xref ref-type="bibr" rid="scirp.60866-ref2">2</xref>]</sub> = swap matrix.</p><p>Applying left semi-tensor product on both sides the system of logical Equation (14) can be converted into a linear algebraic equation as:</p><p>where,<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x64.png" xlink:type="simple"/></inline-formula>. The first and last few columns of L are d<sub>32</sub> [14 14 10 10 14 14 10 10 14 14 10 10 14 14 16 16 14 &#215;&#215;&#215; 32 32 32 32 32 32 32 32 32].</p><p>Morning call service (y<sub>1</sub>), sleeping service (y<sub>4</sub>), entertainment service (y<sub>3</sub>) 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</p><disp-formula id="scirp.60866-formula109"><label>(16)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2310500x65.png"  xlink:type="simple"/></disp-formula><p>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:</p><disp-formula id="scirp.60866-formula110"><graphic  xlink:href="http://html.scirp.org/file/1-2310500x66.png"  xlink:type="simple"/></disp-formula><p>where, M<sub>c</sub> = structure matrix of logical conjunction operation, M<sub>d</sub> = structure matrix of logical disjunction operation, I<sub>2</sub> = identity matrix and W<sub>[<xref ref-type="bibr" rid="scirp.60866-ref2">2</xref>]</sub> = swap matrix.</p><p>Applying left semi-tensor product on both sides the system of logical equations can be converted into a linear algebraic equation as:</p><disp-formula id="scirp.60866-formula111"><label>(17)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2310500x67.png"  xlink:type="simple"/></disp-formula><p>where, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x68.png" xlink:type="simple"/></inline-formula>, H = δ<sub>32</sub> [10 10 16 16 16 16 16 16 &#215;&#215;&#215; 31 32 31 32 31 32].</p><p>Every service is composed of some controlling facilities to turn on and off of home appliances and device. Morning call service (c<sub>1</sub>) turns on the alarm device (b), room light (c), blind (d), coffee maker (e), water heater (f). Sleeping service (c<sub>2</sub>) turns off the room light and blind. Whenever nobody is inroom that time Guarding service (c<sub>3</sub>) turns off all the appliances and device. Entertainment service (c<sub>4</sub>) turns on the TV (h), room light. When a user is in home then normal service (c<sub>5</sub>) turns on light, air conditioner (g), blind. We can describe the service by the output function of home appliances and device.</p><disp-formula id="scirp.60866-formula112"><label>(18)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2310500x69.png"  xlink:type="simple"/></disp-formula><p>Applying left semi-tensor matrix product together on both sides of algebraic equation of (18).</p><disp-formula id="scirp.60866-formula113"><label>(19)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/1-2310500x70.png"  xlink:type="simple"/></disp-formula><p>where, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x71.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x71.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x72.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x71.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x72.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x73.png" xlink:type="simple"/></inline-formula></p><p>The first and last few columns L<sub>s</sub> ared<sub>32</sub> [32 16 32 32 32 32 32 32 32 32 32 32 32 32 &#215;&#215;&#215; 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 <xref ref-type="table" rid="table2">Table 2</xref>.</p><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Solutions of equation</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Service</th><th align="center" valign="middle" >b</th><th align="center" valign="middle" >c<sub>1</sub> c<sub>2</sub> c<sub>3</sub> c<sub>4</sub> c<sub>5</sub></th><th align="center" valign="middle" >x</th><th align="center" valign="middle" >b c d e f g h</th></tr></thead><tr><td align="center" valign="middle" >Morning call</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x74.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >1 0 0 0 0</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x75.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >1 1 1 1 1 1 0</td></tr><tr><td align="center" valign="middle" >Normal</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x76.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >0 1 0 0 0</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x77.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >0 1 1 0 0 1 0</td></tr><tr><td align="center" valign="middle" >Entertainment</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x78.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >0 0 1 0 0</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x79.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >0 1 0 0 0 1 1</td></tr><tr><td align="center" valign="middle" >Sleeping</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x80.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >0 0 0 1 0</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x81.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >0 0 0 0 0 1 0</td></tr><tr><td align="center" valign="middle" >Guard</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x82.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >0 0 0 0 1</td><td align="center" valign="middle" ><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/1-2310500x83.png" xlink:type="simple"/></inline-formula></td><td align="center" valign="middle" >0 0 0 0 0 0 0</td></tr></tbody></table></table-wrap></sec><sec id="s4"><title>4. Conclusion</title><p>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.</p></sec><sec id="s5"><title>Cite this paper</title><p>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</p></sec></body><back><ref-list><title>References</title><ref id="scirp.60866-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">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.</mixed-citation></ref><ref id="scirp.60866-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">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. &lt;br /&gt;http://dx.doi.org/10.1016/j.eswa.2008.10.071</mixed-citation></ref><ref id="scirp.60866-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Mozer, M.C. (1998) The Neural Network House: An Environment That Adapts to Its Inhabitants. Proceedings AAAI Spring Symposium on Intelligent Environments.</mixed-citation></ref><ref id="scirp.60866-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">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. &lt;br /&gt;http://dx.doi.org/10.1016/j.jnca.2004.06.002</mixed-citation></ref><ref id="scirp.60866-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">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. &lt;br /&gt; 
http://dx.doi.org/10.1016/j.eswa.2011.08.118</mixed-citation></ref><ref id="scirp.60866-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Kauffman, S.A. (1993) The Origins of Order: Self-Organization and Selection in Evolution. Oxford University Press, New York.</mixed-citation></ref><ref id="scirp.60866-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">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</mixed-citation></ref><ref id="scirp.60866-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">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</mixed-citation></ref></ref-list></back></article>