Context Reasoning and Decision Modelling System for IoT Scenario using Fuzzy Logic

The Internet of Things is great technology of having a self aware system based on the sensor, networking devices, embedded software’s, and many more. Using these technologies, various things or objects in the environment can be controlled and monitored. The various IOT devices can be communicate with each other. These devices may wire or wireless with applying sufficient constrained. In last few decade the IOT become grow tremendously and there is huge amount of research, development and integration still remain in many areas of society. Many of the researchers have to develop a significant amount of IOT system to become a cost effective, efficient, and safe. Sensors in IoT generate large amount of data continuously and however to add some values in raw data required for understanding. In order to effective services of IoiT must be understand of user's context such as location, position, current situation, expression, social context, task etc. Context-aware system has proven to be successful in understanding sensor data. This research work focused on context-aware in IoT environments to provide contextualised information services. The goal is to present the contextualization that must be used in the IoT context-aware systems to provide information services. In this, context can be defined with the different parameters such as location, timing, activity. Also, this work presents the implementation of the context-aware secure routing approach to a system and also defines the architecture of the secure routing between the nodes.


INTRODUCTION
Nowadays, billions of people use the Internet for surfing the web, using social networking applications, sending and receiving emails, banking, shopping online, playing games and many other tasks. Also, the Internet has been used for controlling and managing our lifestyle and making it more accessible. Imagine a world or a time where everything around us, from smart tiny objects, smartphones, smart eyeglasses, smart homes, smart TVs, air-conditioners, light bulbs, refrigerators, vehicles are connected to each other and the Internet. Also, they are controlled, monitored, and sometimes, actuating, interacting among themselves, this is the world of the Internet of things (IoT). It is believed that the Internet of Things will connect many of the objects around us to the Internet. It will create an intelligent environment and will increase the quality of life since it could be deployed in everything and will allow access from anyplace anytime. The IoT will create smart environments including smart buildings, smart businesses, smart transportations and smart cities. Moreover, the IoT technology is recognized as one of the most significant areas of future technology, and it is grabbing the attention of governments and researchers as well as industries. The IoT enables a wide range of applications with potentially critical functions of sensing and actuating which need to be secure. Sensitive data and information will be collected by sensors, cameras, and other devices from different users, for instance, companies, governments, hospitals and other users. Thus, security remains to be one of the most sensitive issues given the danger if the system falls under attack. Because of the combination of both objects and communication networks, the IoT applications can be vulnerable in physical and cyberspace. The security of the IoT is still a big concern as all new technologies and services depend on securing the information and protection of private data to success. Security challenges occur in IoT at various levels due to the idea of this technology for many reasons. First, most of the IoT communications are wireless, which could be vulnerable to attack. Second, a huge number of nodes and amount of data exchanged. Third, some of IoT applications will be vulnerable to physical attack. Finally, limited computation, transmission and energy capabilities in most of the IoT components which lead to the limited implementation of elaborate security schemes.
In IoT network, essential component is the Sensor node and according to the sensor data IoT network work. But Sesnor collected huge amount of the data and store in the database without analyzed due to that user not getting specific information within time. The lack of context-aware management is also closely related to the lack user and data privacy. In case it include data protection/encryption methods (even using asymmetric encryption and public key methods), data cannot be efficiently stored/handled. On the other hand, lack of encryption violates the user and data privacy. More investigations into the more significant privacy and data-protection eco-system are required to overcome current limits of how current information systems deal with privacy and protection of information of users and develop ways to respect the needs and expectations better.
In context-awareness, there are some steps to produce context information. In each one of these steps, there are different consolidated techniques. No standard architecture for context-aware secure routing was seen. Therefore, the definition of a standard architecture to provide context-aware secure routing information services is an open issue and remains a topic of extreme importance.

Context Awareness system
The various sensor are available for sensing the data in realtime scenario and also useful for data context processing for predicting the situation and take appropriate action in real time application with context classification and present sensing technologies. Sensor allows the system to have information about real-time scenario of the context such as Circumstance, situation, phase, position, posture, attitude, place, point; terms; regime; footing, standing, status, occasion, surroundings, environment, location, dependence, condition and connection. Many of the researcher and literature have studied the main three main approaches for sensor in context awareness.
Sensor Infrastructure: such approach allows the sensor to spread all over the geographical area for acquire and provide the context for smart gadgets.
Sensor integration: Such approach plays important role for implementing the smart system. In this system integrates the more complex algorithms and hardware to small and simple sensor.
Derived context: A Novel approach has consisting of involving applications which make deductions from contextual data.

RELATED WORK
Now a day's sensor systems are based on the recognition of basic active modes, such as speech recognition and handwriting, for which there is now a large body of research work. These systems sense and incorporate data about illumination, noise level, location, time, and people other than the user, as well as many other pieces of information to adjust their model of the user's environment [2]- [4].
The various approach used by authors to describe the context awareness, The context is any data and that can describe the state of an entity and entity is any that is relevant to the interaction between a user and application. Context-Aware [2]- [3]. Any system is context if it uses the context information and service related to the user and it also depends on the user's task. Gray and Salber (2001) [4] build upon this definition to derive a definition for sensed context, where they note that the notion of 'interaction' in the definition of context from Dey and Abowd is ambiguous. They arrive at the following definition: Sensed context are properties that characterize a phenomenon, are detected and that are potentially relevant to the tasks supported by an application and the means by which those tasks performed [4]. Context can be considered to be everything that effects the computation except explicit input and output. These definitions help us to get a feeling of what context is. But also make clear that context is a broad concept [5]. Dourish (2004) says it like this: 'Context' is a slippery notion. Perhaps appropriately, it is a concept that keeps to the periphery, and slips away when one attempts to define it [6]. Pervasive or Ubiquitous Computing evolved from Distributed Computing to Mobile Computing to its current state, from which follow naturally that this acquiring takes place by distributed sources and should be able to deal with moving objects [7]- [8]. Gray et. al. presented context sensed of location or temperature based on sensors or sensor networks [4]. Data management solutions in this field focus on seeing the sensor network as a database [9] The most mentioned requirement in discussions about context with other researchers was about the privacy of the user. Newman et. al. notice that during tracking users during the day with badges, users did not wear them because of privacy issues [10]. Another way of dealing with this issue is use both access rules and obfuscation rules to deliver different context information to different users of context, such as other people or applications [11].
Proactiveness means to process information on behalf of the user so action can be taken without requiring their attention. This means knowing what a user would want to do with this information and to detect patterns in his or her behaviour. It is one of the most critical requirements for the ambient to be intelligent. Even coins the new term proactive computing which stands for "the movement from human-centered to human-supervised (or even unsupervised) computing [12]- [13].
DeVaul et. al. suggested tractability means that a user can see why something (proactive) happened. Ideally, would like the proactiveness to be understandable and controllable by the user [14]. Chalmers makes this clear by saying that, in ubiquitous scenarios, it should also be possible to focus on the tool (the computer) to have it "present-at-hand". An example here could be the dashboard of a car, at which, in case something goes wrong can have the car present-at-hand [15]. The last characteristic which is maybe not so relevant but is very specific to context awareness is that users will probably "misuse" the intelligence of the ambient. As an example, Albrecht Schmidt mentioned the automatic door-opening where we know we can open the door by waving our hand before it and can misuse it to keep the door open for someone else, although we will not go through it ourselves.

PROPOSED SYSTEM
The single source gathered the information is usually limited and may not be entirely reliable, accurate and complete. Hence focused on the multi-sensor data in a multi-level merging scheme to improve the accuracy and robustness of context-aware. The collected from the multi-sensors are combines for providing the better judgment, and it is the task of the multi-sensor fusion.  Figure 1 shows a decision level fusion fuzzy which integrates heterogeneous source of knowledge, information and sensors. It consists of context DB and context reasoning engines. It understands the gather contexts, checking the consistency and monitoring the context information and sensed and inferred context data could be converted to useful information according to the inference rules. The determination of location and recognition of activities, high-level contexts are detected by incorporating association rules between the primary contexts in a reasoning engine. Then the decision level fusion fuzzy applied in context reasoning engine improves the efficiency of context and then context detection algorithm by applying new rules which are acquired from a various source of information such as existing context information, expert knowledge, user preferences or constraints.

Sensor network
There are various types of the sensors are deployed in the proposed sensor network for acquiring the context information. Generally, the sensor is divided into the three categories [26] physical, virtual, and logical. The physical sensor has commonly used a type of the sensor and its physical deployed. Some sensor is commonly available such as temperature, humidity, microphone, touch. Second, the virtual sensor does not have any physical presence. It retrieves the data from the many sources and presents the sensor data. Third, it is also called as the software sensor (logical sensor). It combines both sensors such as physical and virtual for getting perfect or meaningful information.

Context Database
The application implements contextual dimensions and lets the user define context dependencies in a friendly way. Particularly, each user can define her/his semantics of descriptive terms using fuzzy domains, allowing custom input data and getting flexible queries according to user needs [24]. In proposed system the context as it has been considered in computational areas to develop context aware applications, in which query results can be affected according to the current situation.

Context Association rules
Rule generation at minimum-support values to ensure that, even with fewer occurrences, training data is not ignored for useful rules; the extracted rules are stored in a database for efficient retrieval when needed. Rule pruning is not done in proposed system [25]. In the test instance arrives at the classifiers for the classification, projections of classification rules are made on the basis of the attributes on test instances from the already derived association rules. It is defined in the form of the rules and then combines these rules using the decision level fusion algorithm may generate a more powerful understanding of the current situation.

Expert knowledge
An expert system is a computer program developed to simulate the reasoning and decision-making process of domain experts based on the knowledge and current situation of user. The purpose is to develop an expert system to support context-aware learning activities that user for differentiating a set of learning targets in the real time.

Fuzzy System
It is a method of determining the decision-making process with the help of some parameters human-like reasoning strategy, and it is achieved by defining the so-called linguistic variables; linguistic labels and membership functions [16]. It is realized using the fuzzy if-then rules that enable the linguistic statements to be treated mathematically. In this thesis, fuzzy inference system is applied to model the context uncertainty and incorporate a new source of knowledge using human rules, and it is used for device placements and indoor/outdoor environment detection.

Context detection
The activities recognized with the help of different sensors (i.e. body, location, motion, and video sensors) are low level activities and they are not in a capacity to be used for certain types of analysis and decision making [27]. With the help of ontology, where we use the context information and link all the related activities in a chain, then with the help of customized rules we get the higher level activities that are more usable for decision making.

Working Scenario
Data Systems has database of n number of users (it may be admin, or some new guest) biometric (face, retina, fingerprint or palm print). Then standards rating of sensors used in IoT scenario customized by admins.
Cloud has main processing unit by monitoring all context and activities of sensors, send its respective control to respective sensors and fetching all required information or access from data systems and admin respectively User1 has main admin having all control access and customization options and priorities assign to different users.
User2 has second authorized admin if main admin not available. And then all controls given to user2.

Camera1 and Camera2 are main devices to grant the permission and send respective notification to admin and give access respectively or if by cloud processing unit
Car has its own sensors network which provides context for processing to cloud and its own for sake of admin or priorities user granted by admin Admin's Company Drone or Truck has also its own sensors network to work autonomously using its context and also working priority given by admin Admin Office and House has also its own sensors network, they work according to admin's context and priorities set by admin or user2

Database System
It is mainly required for storage of user's credentials or privilege or settings or required face images or data.

User Constraint
It's the input given by user to reasoning model.

Fuzzy Inference Model
Let us consider that access to a specific area of a home is allowed to other's person and admin only if the images of persons available in database systems. To estimate this condition, the system relies on a single sensor; a video camera mounted on the door of the front gate. Although there is a single camera, two types of translation events are generated based on the video stream: • Face recognition events: people within the camera scope are recognised, and a message with their data (including their role) is sent to the inference system.
• Location events: users' distance from the door is estimated, and a message is sent to the inference system if they are close to the door and facing it.
• Relation events: if the data available in the database say that people are in some relation to admin or others, a message is sent to the inference system. The same scenario can be given for area of office of admin.
Note that, although all these events are formed with a level of discussion uncertainty between 0 and 1, they include two different uncertainty models: a probabilistic model for recognition (the face recognition software has a success rate less than 100%, depending on illumination conditions, occlusions, and so on.), and an intensity-based model for the distance (the notion of "close" is fuzzy, as smaller distances are "closer").
Relation events are crisp: either the database (Database System) supports a relation, or it does not, and the database is assumed to be exhaustive.  RESULT AND DISCUSSION In the propose context reasoning and decision modelling system is implemented using Fuzzy Logic Toolbox. The simulation in this contribution is conducted using MATLAB. The simulation is carried out to measure the following sets of parameters.

Evaluation Parameters
A confusion matrix contains information about actual and predicted classifications done by a classification system. Performance of such systems is commonly evaluated using the data in the matrix a is the number of correct predictions that an instance is negative, b is the number of incorrect predictions that an instance is positive, c is the number of incorrect of predictions that an instance negative, and d is the number of correct predictions that an instance is positive.

SP=
The F-score (F-measure) is a harmonic mean of precision and recall, as calculated using the equation: F-score = β is commonly 0.5, 1, or 2.

Evaluation Results
The below figure shows the different scenario such as Office, home according to the scenario set the values and reasoning are done with the help of the Fuzzy inference system and rules of the FIS system. The result is shown in figure 3 with the help of the confusion matrix and in the confusion matrix value is calculated in the diagonal view it means that blue box it is the output value of the matrix. The figure 4 shows fuzzy inference system are use the member function for the different parameters such as the temperature, distance, pressure, luminance and time.

For Context Awareness (classification and decision) Model
Devices are classified based on their geographical positions and this contextual information is used for event detection. In this approach, a complete match is carried out to fetch device type and provider from the database. Reliability is not proved with even the proof of concept in this approach. Communication cost in terms of energy, PDR is also not addressed in and the time analysis is based on the statistical data which is not appropriate approach in the context of IoT. Even the results the proposed are encouraging; it has not been possible to validate the capability of the proposed approach in actual test bed with multi-technology sensor nodes.  5. CONCLUSION AND FUTURE SCOPE Addressing of ubiquitous thing in IoT is one of the main issues in resource constrained IoT. In this work identity in the context also defined with the help of the unique address to the node. The Context-Aware in our work decides according to the user, activity, location, time. It can measure with the help of the some parameters such as accuracy, true positive rate, true negative rate, false positive rate, false negative rate, error rate, precision, recall, specificity and Fmeasure. But it still has abundant space for improving and the core protocol CBRP proposed here can be improved continuously by the theory circles as a fundamental protocol framework, and can also be enhanced to a cluster-type protocol. We will keep on doing the research on this field.