Vous êtes sur la page 1sur 6

International Journal Of Communication And Computer Technologies

Volume 01 No.1, Issue: 01 JULY 2012

AUTOMATED MANAGEMENT OF HOME APPLIANCES USING RTOS


B.JAI KUMAR #1 & P.MAHENDRAN #2 II-ME-EMBEDDED SYSTEM TECHNOLOGIES#1 ASSISTANT PROFESSOR / DEPARTMENT OF ECE#2 Email:- jaikumarbecse@gmail.com#1 Email:-tm_dav@yahoo.com #2 KSR COLLEGE OF ENGINEERING TIRUCHENGODE, NAMAKKAL, TAMILNADU
Abstract To develop a Real Time Operating System for managing embedded devices used in home and building automation. The embedded software applications require performing a task which is efficiently achieved by dividing the global task into many smaller subtasks. This presents a Distributed Operating System (DOS) based on the Service-Oriented Architecture (SOA) to manage all embedded devices in a home network at high level of interoperability. Each subtask apart from executing its own task, services a part of the global task. When the consequences for failure are expensive or, worse, life threatening, VxWorks RTOS is the only choice. Wireless sensor networks have become an essential part of home and building automation, especially for energy management and health monitoring. The concept of dynamic assignment of priorities to interrupts is discussed which reduces the time delay for a lower priority task which under some circumstances becomes a higher priority task. Slicing of interrupt timings is also discussed which can be used to improve the performance. The highest priority task is serviced more number of times and with lesser time period. Hence it need not wait for the slack time of other previously higher priority interrupts. Wireless sensor networks represent a promising technology especially in home and building automation. These networks have nowadays many applications in energy management, security and health monitoring. Index TermsService Oriented Architecture, Distributed Operating System, Real Time Operating System(RTOS), Wireless Sensor Networks.

priority task is serviced more number of times and with lesser time period. Hence it need not wait for the slack time of other previously higher priority interrupts. Wireless sensor networks play a vital role in home and building automation, for energy management system and health monitoring. Energy meter reading is given to ARM processor by using an IR sensor fixed to the meter to detect the number of times the metal plate in it rotates and cuts the IR rays between the IR-Tx and Rx. Voltage sensor and current sensor are interfaced to microcontroller the capacitor bank is powered and the capacitor banks are used to power the uninterrupted working of the home and building. Everything will be monitored in LCD. If any human appeared in room, then automatically load1 will be ON by using PIR sensor to save the energy. If temperature getting more than normal then AC machine automatically getting adjusted.

I. INTRODUCTION VxWorks is the RTOS that powers more than 1 billion real-time systems across the globe, from small consumer products to commercial airliners. When the consequences for failure are expensive or, worse, life threatening, VxWorks RTOS is the only choice. After 30 years of RTOS leadership and consistently successful deployments, Wind River is the name you know you can trust. Slicing of interrupt timings is also discussed which can be used to improve the performance .the highest

Fig 1.Block Diagram of System

Page 20
International Journal Of Communication And Computer Technologies

www.ijccts.org

International Journal Of Communication And Computer Technologies


Volume 01 No.1, Issue: 01 JULY 2012

Here we are using scheduling method to get the real time output and accuracy using PC. Keyboard is used for manual control this tendency will increase especially with the emerging technology that requires more intelligence in managing the energy that is consumed and produced by the home itself in order to enable the integration of smart electrical current counters, sensors and other related appliances. The networked embedded devices in home and building applications can be classified into two classes. The first class is embedded devices that have an Ethernet interface with enough resources to run the standard TCP/IP stack. These devices are called Service-Oriented Architecture (SOA)-ready devices and can be directly integrated with IP-based networks. The second class is the resourceconstrained embedded devices, which are based on a network standard different from Ethernet network standards like IEEE 802.15.4. These devices have minimal resources and small size in order to enhance the mobility requirement. These devices are not IPready in their design and do not have enough resources to run the standard TCP/IP network stack. They are usually called SOA not-ready devices.

Fig 3. Diagram for SOA-DOS Implementation A. Devices Monitor This represents a user interface to monitor and analyze the data and events coming from embedded layer. The devices data will be filled with the data received from the embedded devices upon GET requests from clients or receiving events from event driven embedded devices. The sensing data and event data can be very useful for auditing, service quality management and performance analysis. B. Devices Management The devices management is based on the devices database and has user interfaces for configuring the information of all devices in the embedded layer like access information (IPv4, IPV6), name, location, software version, and other additional information. C. Services Management This is responsible for publishing the services of the devices in the embedded layer to clients in the Internet. It provides the required information about the capabilities of these devices and how they can be accessed and used. It is based on the services database which contains the service description files for all embedded devices in the embedded layer. The SOA-DOS provides two types of service discovery to discover the services of the embedded devices: dynamic and static service discovery. Using dynamic service discovery requires enabling the dynamic service description in the WSDiscovery module on the configured embedded device. In this case the WS-Discovery will send a service description file in JSON format including the description of all device services to the services management module in SOA-DOS. This file can be sent each time the device is being turned on or upon receiving a discovery request from the SOA-DOS.

Fig 2. General Flow of entire process Our SOA-based Distributed Operating System (SOA-DOS) proposes a feasible and more realistic model for managing all embedded devices in home or building environment from both classes SOA-ready and SOA-not ready devices II. SOA -DOS IMPLEMENTATION The SOA-DOS manages all tasks concerning the communication between the different embedded devices in a home network and the access to the services of these devices from Internet

Page 21
International Journal Of Communication And Computer Technologies

www.ijccts.org

International Journal Of Communication And Computer Technologies


Volume 01 No.1, Issue: 01 JULY 2012

Using the static service discovery requires disabling the dynamic service description in WS-Discovery. In this case the administrator of the SOA-DOS must insert the service description of the device's services into the services database in order to enable the services management to publish. The benefit of using the static service discovery instead of the dynamic one is decreasing the network overhead in embedded layer and that will improve the reliability and the quality of the service. Furthermore the services management in SOA-DOS can publish these services in different format than JSON like XML or WSDL D. Events Management This module is used to configure and manage the relationships between event senders and their listeners. Simply the module, upon receiving an event, will save its data and notify all listeners that are subscribed to this event in the events data. Generally, each embedded device or client in Internet has to subscribe to its interesting events in the SOADOS in order to receive notifications about them. This method is called asynchronous method, and it is more effective than the polling method in terms of network overhead and event sending time. The subscription to events can be also manually configured for some devices by the administrator through configuring event relationships between these embedded devices according to user requirements. The Event Management listens on a specific port in order to receive the POST requests that contain the events data in JSON format E. Queue Management and dispatcher Accessing embedded devices in a network based on a networking protocol different from that used in the Ethernet requires an adaptation or transformation. This layer represents an intrinsic interface by integrating embedded devices into Internet, especially wireless sensors with limited resources. Furthermore most of the adapted IP protocols for wireless sensor networks only support a limited number of multiple simultaneous connections. For example the IP protocol, which is the dominant protocol in wireless sensor networks enabled for IP-based networking, needs to determine the number of the simultaneous connections at compile time. Every new connection requires its own static memory. There is a limit for the number of supported connections and if the number of simultaneous incoming connections exceeds this limit, a problem of refusing the new connection will raise and sometimes the connections which are

already in use will freeze. This represents a critical problem that decreases the reliability of the integrated communication. That means the actual implementations of adapted IP protocols for wireless sensor networks do not handle efficiently with multiple simultaneous connections.

Fig 4. Diagram for Queue and Dispatcher Service We took this point of failure into consideration when designing SOA-DOS by implementing a queue management and dispatcher in order to organize multiple simultaneous user requests to one of devices services. In SOA-DOS each embedded device has a queue and a dispatcher to dispatch the queued requests to the suitable gateway in the layer by calling the requester F. Cache Management The caching is an optional mechanism in the client-server model, and it is well-known in Internet. Simply the cache is a part of memory to save the last requested information in order to reuse this information on demand quickly by the same requested client or by other clients during a specific period of time. Applying the caching model helps in reducing the load on the server, because the server does not need to reprocess and prepare the response's data. The caching concept will be very useful in accessing a wireless sensor network, especially if the state of the requested resources on these embedded devices slowly or rarely changes. In our SOA-DOS we adapted the caching concept according to our layered architecture

Page 22
International Journal Of Communication And Computer Technologies

www.ijccts.org

International Journal Of Communication And Computer Technologies


Volume 01 No.1, Issue: 01 JULY 2012

In first scheme, all the subtasks are in a sequential infinite loop, where each subtask gets executed only once in an iteration of while loop. The ISRs are very small as they are used only to set flags which are checked in the super loop. This architecture is not efficient as an interrupt flag once checked in the super loop, will be checked only after all the other interrupt flags have been checked or/and serviced if required. Every task, immaterial of its criticality (priority), is treated equally because of which a potentially higher priority task has to wait for the other tasks. The servicing of the interrupt flag also depends on the current position of program counter. Fig 5.Diagram of Cache Allocation In the first one the cache is located on the embedded devices, and each embedded device has to validate whether the last data in cache still be valid or not, depending on the request time coming from the client and the device's current time. This solution will not be efficient for a wireless sensor network, because it will increase the request size by including the cache's control parameters which leads to increase network overhead and power consumption. Furthermore this solution needs time synchronization between the client and the requested device. The second caching possibility depends on locating the cache in SOA-DOS layer. In this case the caching module in the SOA-DOS validates whether to get the response from the SOA-DOS's cache or from the embedded device depending on the client's request time and the time of inserting the last requested service data for this device in the cache. When the SOA-DOS answers the client from its cache, there will be no communication with the embedded layer, thus leads to decrease response time, network overhead and power consumption in the embedded layer. The third possibility is based on locating the cache on the client's side, and in this case the client takes over the cache validating process. The disadvantage of this method is the lack of interoperability, because the client should not only know the service's URL of the device but also needs more information in order to adjust the right maximum cache time, which usually depends on how often the sensing data on the embedded device change. A long caching time may lead to send old or wrong data to the client, which will in turn decrease the reliability of the whole communication. III. Real Time Operating System A. High-Performance Real-time Kernel Facilities The VxWorks kernel, wind, includes multitasking with preemptive priority scheduling, inter task synchronization and communications facilities, interrupt handling support, watchdog timers, and memory management. B. C++ Development Support In addition to general C++ support including the iostream library and the standard template library, the optional component Wind Foundation Classes adds the following C++ object libraries: VxWorks Wrapper Class library Tools.h++ library from Rogue Wave The VxWorks multitasking kernel, wind, uses interrupt-driven, priority-based task scheduling. It features fast context switch times and low interrupt latency. Under VxWorks, any subroutine can be spawned as a separate task, with its own context and stack. Other basic task control facilities allow tasks to be suspended, resumed, deleted, delayed, and moved in priority. C. Interrupt Handling Support VxWorks supplies routines for handling hardware interrupts and software traps without having to resort to assembly language coding. Routines are provided to connect C routines to hardware interrupt vectors, and to manipulate the processor interrupt level.

Page 23
International Journal Of Communication And Computer Technologies

www.ijccts.org

International Journal Of Communication And Computer Technologies


Volume 01 No.1, Issue: 01 JULY 2012

Fig 6. RTOS system with ISR Services

Fig 8. Flow Chart for the main program

VI. CONCLUSION Fig 7. Loop Execution For ISR Our proposed SOA-based distributed operating system represents a user-friendly model for managing all distributed embedded devices in a heterogeneous network environment like in home network. It is especially targeting deep resourceconstrained embedded devices like in wireless sensor networks, enabling them to integrate into Internet at a high level of interoperability. Designing a universal SOA-based operating system at the level of home or other local environments that allows just one universal Internet connection seems to be a feasible and cost realistic solution. Using a SOA-based distributed operating system provides valuable benefits for managing embedded networks. In heterogeneous environment like Industries, Homes, Hospitals use a specific OS to perform a task. The designing of a OS will take more time, complexity. Certain OS results in high cost too. Instead of designing an OS, it is very easy to develop a RTOS. It will take less time, less money compared to an OS. Design of RTOS, developed using Vxworks. REFERENCES

Page 24
International Journal Of Communication And Computer Technologies

www.ijccts.org

International Journal Of Communication And Computer Technologies


Volume 01 No.1, Issue: 01 JULY 2012

[1]

[2]

[3]

[4]

[5]

[6]

[7]

[8]

[9]

[10]

A. Selman, R.Moeller. SOA Distributed Operating System for Managing Embedded Devices in Home and Building Automation.2011,03 March 2011. A. Dunkels. "Full TCP/IP for 8-Bit Architectures". Proceedings of the first International Conference on Mobile Applications, Systems and Services (MOBISYS2003), May 2003. G. Mulligan. The 6lowpan architecture. In Proceedings of the 4th workshop on Embedded networked sensors, New York, USA, 2007. E. Zeeb, A. Bobek and F. Golatowski. Service-oriented architecture for embedded systems using devices profile for web services. In 2nd International IEEE Workshop on SOCNE07, 2007. M. Durvy, J. Abeille, P. Wetterwald, C. OFlynn, B. Leverett,E. Gnoske, M. Vidales, G. Mulligan, N. Tsiftes, N. Finne, and A. Dunkels. Making Sensor Networks IPv6 Ready. In SenSys, 2008. A. Sleman, R. Moeller, "Integration of Wireless Sensor Network Services into other Home and Industrial networks", in International Conference ICTTA, 2008. B. Priyantha, A. Kansal, M. Goraczko, and F. Zhao. Tiny web services: design and implementation of interoperable and evolvable sensor networks. In Proceedings of SenSys, 2008. T. Kindberg, J. Barton, J. Morgan, G. Becker, D. Caswell,P. Debaty, G. Gopal, M. Frid, V. Krishnan, H. Morris, J. Schettino, B. Serra, and M. Spasojevic. People, places, things: web presence for the real world. Mob. Netw. Appl., 2002. D. Guinard and V Trifa. Towards the web of things: Web mashups for embedded devices. In International World Wide Web Conference, Madrid, Spain, 2009. Adam Dunkels, Bjrn Grnvall, and Thiemo Voigt. Contiki a Lightweight and Flexible Operating System for Tiny Networked

[11]

[12]

[13]

[14]

[15]

[16]

[17]

[18]

Sensors. In Proceedings of the IEEE Emnets, USA, 2004. D. Crockford. The application/json media type for JavaScript Object Notation (JSON). The Internet Engineering Task Force (IETF), Network Working Group, RFC 4627, July 2006. S. Chakrabarti , E. Nordmark, IPv6 LoWPAN Neighbor Discovery and Addressing Choices , March 2010. J. Romkey, RFC 1055. A NONSTANDARD FOR TRANSMISSION OF IP DATAGRAMS OVER SERIAL LINES: SLIP, June l988. C.E.Otero, A.Velazquez, I.Kostanic, C.Subramanian, J.Pinelli, L. Buist, RealTime Monitoring of Hurricane Winds using Wireless and Sensor Technology, Journal of Computers, Vol. 4, Nov 2009. X. Li, and W. Zhang, The design and implementation of home networks systems using OSGi compliant middleware, IEEE Transactions on Consumer Electronics, vol. 50, no. 2, pp. 528-534, May 2004. R. D. Redondo, A. F. Villas, M. Ramos, J. J. Pazos Arias, and M. Rey Lpez, Enhancing residential gateways: OSGi service composition, IEEE Transactions on Consumer Electronics, vol. 53, no. 1, pp. 8795, Feb. 2007. C. Y. Leong, A. R. Ramli and T. Perumal, "A rule-based framework for heterogeneous subsystems management in smart home environment", IEEE Transactions on Consumer Electronics, vol.55, no.3, pp.12081213, August 2009. T. Perumal, A. R. Ramli, and C. Y. Leong, "Design and implementation of SOAP-based residential management for smart home systems", IEEE Transactions on Consumer Electronics, vol. 54, pp. 453-459, 2008.

Page 25
International Journal Of Communication And Computer Technologies

www.ijccts.org

Vous aimerez peut-être aussi